ink! smart contract examples (With
A simple bank contract example where users can:
- Deposit funds
- Withdraw funds
- Get the current balance
A contract with some of the most common ink! environment types and functions.
Simple contracts with basic ink! features:
Environment types
Environment functions
Messages
- Query
- Transaction
Result
(Ok & Errors)- Payable messages
Storage
- Get & modify
Mappings
Events
- Topics
An example implementation of ink! cross contract calling, using Contract references
& Builders
.
Something similar to an ERC-20
token using traits
.
Two contracts that connect with a randomness chain extension, using Custom Environment
and Chain-extension builder
Examples of smart contracts using the Proxy
and set_code_hash
upgrade alternatives.