Skip to main content

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 for Erc20 contracts and implements it.
  • erc721 β€’ An exemplary implementation of Erc721 NFT tokens.
  • dns β€’ A simple DomainNameService smart 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 Play with It section or our smart contracts workshop.