WaxTrees was created as an incentive for people to donate money by buying virtual NFTs (WaxTrees). At a high level, when someone donates money to plant a tree, they receive an NFT with metadata representing the actual tree planted.

This will hopefully influence more people to donate towards green charities. In other words, WaxTrees hopes to blend the world of NFTs and environmental change.

What it does

WaxTrees is a smart contract that mints and publishes NFTs to the WAX blockchain. The tree represents the type, age, and location of the actual tree planted. You can view the smart contract account here:

You should be able to find a number of transactions. One calling the smart contract, another creating the NFT, and the final adding it to your account as an asset.

As of now, the smart contracts creates an NFT with set metadeta. In the near future, we want to automate this process, add variation, and improve the overall smart contract. By using the Wax Cloud Wallet API, we can create a webpage for users to manage and purchase their NFTs.

How we built it

The smart contract was launched on the Wax Blockchain. We chose Wax since it is PoS, easy to use, and runs C smart contracts. We also used Bash, Docker, Cleos and more. We used the EOS SimpleAssets library to deploy the NFTs.

We ran the WAX development container on Docker. Then, we initialized and configured the network, tested the blockchain, setup wallets/keys and accounts. This took the majority of the time as we ran into many problems.

We wrote a simple smart contract in C to generate an NFT using EOS SimpleAssets library. You can view and run the contract here:

In our Docker Environment, we used WAX-CDT to deploy the contract. In order to call the Smart Contract transaction, we must setup a local wallet and assign it's private/public keys (same as the account created on the test net). You must build the smart contract .cpp first, generating a .wasm and .abi file. You can then deploy the contract to the specified account on the testnet.

cleos -u set contract <walletname> $(pwd) waxnft.wasm waxnft.abi

Next, run the smart contract:

cleos -u push action <walletname> createnft [] -p <walletname>@active

All done! There should now be a newly generated WaxTree NFT in your Test Net account!

Challenges we ran into

Setting up the blockchain and the dependencies we required for WAX was challenging and took a lot of our time. Accounts did not work as expected, and wallet keys got lost.

Accomplishments that we're proud of

Launching our first smart contract.

What we learned

Setting up blockchain is difficult

What's next for Tree Making NFT

Working on a front-end

Providing the platform to charities

Built With

Share this project: