Treee is the smart contract layer of the Treee tree-planting protocol, enabling on-chain verification, organization management, and NFT issuance for planted trees.
It powers transparent and auditable sustainability tracking within the Stability Nexus ecosystem.
- Solidity (v0.8.28) — Smart contract development
- Foundry (forge, anvil, cast) — Testing, simulation & deployment
- OpenZeppelin Contracts — Token standards and access control
TreeNft.sol— NFT for planted treesOrganisation.sol— Handles organization logicOrganisationFactory.sol— Deploys and tracks organizationsCareToken.sol,PlanterToken.sol,LegacyToken.sol— Incentive ERC-20 tokens
- Foundry
- Rust toolchain (
rustup) - Node.js (optional, for deployment scripting)
git clone https://github.com/StabilityNexus/Treee-Solidity.git
cd Treee-Solidityforge buildforge testanvilforge script script/Deploy.s.sol:DeployAllContractsAtOnce \
--rpc-url $SEPOLIA_RPC_URL \
--private-key $PRIVATE_KEY \
--broadcastRun a local node:
anvilTest in watch mode:
forge test --watchInteract manually:
cast call <contract-address> "getOrganisationCount()()" --rpc-url http://127.0.0.1:8545| Command | Description |
|---|---|
forge build |
Compile contracts |
forge test |
Run tests |
forge fmt |
Format Solidity code |
forge snapshot |
Create gas usage reports |
anvil |
Start local blockchain node |
We welcome contributions of all kinds!
-
Fork the repo & create a feature branch:
git checkout -b feature/AmazingFeature
-
Commit your changes:
git commit -m "Add some AmazingFeature" -
Run checks:
forge build && forge test && forge fmt
-
Push & open a PR
For bugs, suggestions, or questions — open an issue or reach us on Discord.
© 2025 Treee Project · Stability Nexus ecosystem.

