/ink-examples

ink! smart contract examples. With ♥️ by NeoPower

Primary LanguageRust

🦑 ink-examples

ink! smart contract examples (With ♥️ by NeoPower)

🏦 Bank

A simple bank contract example where users can:

  • Deposit funds
  • Withdraw funds
  • Get the current balance

⚙️ Environment Helpers

A contract with some of the most common ink! environment types and functions.

🚀 Basics & Basics II

Simple contracts with basic ink! features:

  • Environment types
  • Environment functions
  • Messages
    • Query
    • Transaction
    • Result (Ok & Errors)
    • Payable messages
  • Storage
    • Get & modify
    • Mappings
  • Events
    • Topics

🔄 Cross Contract Calling

An example implementation of ink! cross contract calling, using Contract references & Builders.

📜 Traits

Something similar to an ERC-20 token using traits.

⛓️ Chain Extensions

Two contracts that connect with a randomness chain extension, using Custom Environment and Chain-extension builder

📶 Upgradeable Contracts

Examples of smart contracts using the Proxy and set_code_hash upgrade alternatives.