Giter Site home page Giter Site logo

scm's Introduction

SCM contract

Users can invest in the ICO smart contract with WETH. 2 minutes after 1000 WETH have been raised investors can claim 10 times more SCM tokens than they invested WETH. After an investment increased the total raised WETH over 1000 no client will be able to invest anymore.

Installing Dependencies

Requires npm to be installed.

cd contract
npm install

Running Tests

cd contract
npx hardhat test

Running Tests With Coverage

cd contract
npx hardhat coverage --testfiles "./test/test.ts"

The created HTML report can be found here: /coverage/index.html.

Spinning Up Local Test Network

Start blank test network on localhost.
This will be a blocking call so keep it running and open another tab for the next command.

cd contract
npx hardhat node

Deploy ICO and some users with a WETH balance on localhost with the second tab.

npx hardhat run --network localhost scripts/deploy\_locally.ts

Rust Client to Interact With The ICO

Capabilities

Scm Client 1.0
Let's you interact with the SCM ICO and token

USAGE:
    scm_client [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    claim-scm        Claim your hard earned SCM
    claimable-scm    Tells you how much SCM you can claim
    help             Prints this message or the help of the given subcommand(s)
    ico-status       Queries status of ICO.
    invest           Invest in the ICO
    scm-balance      Tells you how much SCM you own
    weth-balance     Tells you how much WETH you own

Building the Client

Requires cargo to be installd.

cd scm_client
cargo build

Running the Client

This will also build the client first if you didn't already.
This will print the help output and tell you about other commands it supports.

cd scm_client
cargo run -- --help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.