Skip to content

auguth/ink-contracts-pocs

 
 

Repository files navigation

ink-contracts

Validator Rewaed Contract

Ink! Environment Setup

Before working with the Validator Reward Contract, ensure your development environment meets the following requirements:

  • Rust & C++ Compiler:

    In addition to Rust, installation requires a C++ compiler that supports C++17. Modern releases of gcc and clang, as well as Visual Studio 2019+, should work.

Installation Steps:

  1. Install Rust Source:

    rustup component add rust-src
  2. Install cargo-contract:

    cargo install --force --locked cargo-contract

How to Use the Contract

  1. Build and Deploy:

    • Clone the ink-contract-pocs repository containing the validator reward contract code.

      git clone https://github.com/auguth/ink-contracts-pocs.git
    • Run the setup script if applicable:

      chmod +x setup.sh && ./setup.sh
    • Open validator_reward_contract folder

      cd validator_reward_contract
    • Build the contract in release mode using cargo-contract:

      cargo contract build --release
    • Deploy the contract to your local or test network using the Polkadot-JS-App or Contracts UI:

      • Upload the WASM binary.
      • Initialize the contract by providing the required constructor parameter (owner).
  2. To Run Test:

    cargo test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%