This directory contains example smart contracts. The contracts are written in Rust using the ink! framework. ink! is an Embedded Domain Specific Language (EDSL) that uses attribute macros within standard Rust to define smart contracts.
Install cargo-contract:
cargo install cargo-contractChange into the contracts directory:
cd hello_worldBuild the contracts:
cargo contract buildRun the tests:
cargo testCreate a new contract:
cargo contract new <contract-name>Write the contract in the generated lib.rs file.
Build and run tests like above.
Deploy the contract to the local testnet:
cargo contract uploadInteract with the contract on the local testnet:
cargo contract call- ink! documentation: https://use.ink/getting-started/setup
- hackathon template: https://github.com/scio-labs/inkathon