GithubHelp home page GithubHelp logo

iskra-product-contracts's Introduction

ISKRA tokens(ERC20, ERC721, ERC1155), vesting contracts and commands

Before jump into further, the happy case test shell is highly recommended to execute

Environments

compile

Compiles the entire project, building all artifacts

npx hardhat compile

test

Runs mocha tests

npx hardhat test

abi

Exports contracts ABIs

npm run abi

formatter

Rewrite sources with prettier formatter

npm run format

lint

Check source format

npm run lint

Commands

List all hardhat commands

npx hardhat --help

wallet

npx hardhat wallet:add [name]

e.g.
npx hardhat wallet:add test_wallet

transaction

npx hardhat getTransaction [hash]
...

multitoken

npx hardhat deploy MultiToken [uri] [name] [pausable] [burnable]

e.g.
npx hardhat deploy MultiToken "https://metadata.url/{id}" MyToken false false

For more information, please refer MultiToken

gametoken

npx hardhat deploy GameToken [name] [symbol] [initialSupply]

e.g.
npx hardhat deploy GameToken MyToken GT1 1_000_000_000e18

For more information, please refer GameToken

utilitytoken

npx hardhat deploy UtilityToken [name] [symbol] [firstMinter]

e.g.
npx hardhat deploy UtilityToken MyToken GT2 0x3e947aE0A245AcD51A1e1021fE8B50c22D215758

For more information, please refer GameToken

itemnft

npx hardhat deploy [ItemNFT | ItemNFTSnapshot] [name] [symbol] [uri] [burnable]

e.g.
npx hardhat deploy ItemNFTSnapshot MyToken IT1 "https://metadata.url/" true

For more information, please refer ItemNFT

vesting

// At first, you should deploy the vesting implementation contract, and then deploy serveral vesting proxy contracts for beneficiaries
npx hardhat vesting:deploy_impl
// then `~/.iskra_console/deploy/vesting-impl-address.json` file created

// Next, deploy vesting proxy contract; --beacon is optional
npx hardhat vesting:deploy {--beacon [beacon address; use the output from vesting:deploy_impl]}

// Next, you should approve game token to prepare vesting; --token is optional
npx hardhat gametoken:approve --spender [vesting proxy contract address] --amount 10000 {--token [game token address]}

// Next, prepare vesting contract for a beneficiary
npx hardhat vesting:prepare --beneficiary [a beneficiary address] --amount 10000 {--vesting [vesting proxy]} {--token [game token]} {--duration [duration; default is 36]}

// Next, set start time for vesting contract
npx hardhat vesting:setstart --start "2022-05-01 09:00:00" {--vesting [vesting proxy]}

// You can do [vesting:deploy ~ vesting:setstart] at once
npx hardhat vesting:one_stop_setup --beneficiary 0xc4417F73DaC656337cEcfee8c784130f08be4FA7 --amount 10000 --start "2022-05-01 09:00:00"

For more information, please refer Vesting

iskra-product-contracts's People

Watchers

 avatar  avatar  avatar  avatar

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.