Attention!You are viewing outdated ink! 3 docs. Click here to view the latest docs.
Overview
In our examples folder you find a number of examples written in ink!.
Some of the most interesting ones:
delegator‒ Implements cross-contract calling.trait-erc20‒ Defines a trait forErc20contracts and implements it.erc721‒ An exemplary implementation ofErc721NFT tokens.dns‒ A simpleDomainNameServicesmart contract.- …and more, just rummage through the folder 🙃.
To build a single example navigate to the root of the example and run:
cargo contract build
As a result you'll get a file target/flipper.wasm file, a metadata.json file and a <contract-name>.contract file in the target/ folder of your contract.
The .contract file combines the Wasm and metadata into one file and needs to be used when deploying the contract.
For further information, please have a look at the Deploy your Contract section or our smart contracts workshop.