Giter Club home page Giter Club logo

pledge's Introduction

编译

scrab build 

部署

# 合约声明
starkli declare --keystore ~/.starknet_accounts/key.json --account ~/.starknet_accounts/starkli.json target/dev/helloERC20_pledge.sierra.json

# 合约部署
starkli deploy --keystore ~/.starknet_accounts/key.json --account ~/.starknet_accounts/starkli.json  0x06288817e91cf5ba8658e4e5e4a61fdd8d9195a885d15b59c2f4bd3ebc06c06d  0xba30489493eaefa14bae7ad817be1218f291e4d0b2099fda64ae263ec360cc u256:10000

address 0xba30489493eaefa14bae7ad817be1218f291e4d0b2099fda64ae263ec360cc

合约调用


export STARKNET_RPC="https://starknet-goerli.infura.io/v3/b3f456b556554dd0859813861561874a"


starkli call 0x007889f71086e6dfce3142d3d5db8961dce79cfaef07618a5bb1cf0a3a3ae576 get_total_supply


starkli invoke 0x007889f71086e6dfce3142d3d5db8961dce79cfaef07618a5bb1cf0a3a3ae576  add_white_list 0xba30489493eaefa14bae7ad817be1218f291e4d0b2099fda64ae263ec360cc u256:1000  --keystore ~/.starknet_accounts/key.json --account ~/.starknet_accounts/starkli.json 

# claim 
starkli invoke 0x007889f71086e6dfce3142d3d5db8961dce79cfaef07618a5bb1cf0a3a3ae576 claim --keystore ~/.starknet_accounts/key.json --account ~/.starknet_accounts/starkli.json 

# get_token_by_address 
starkli call 0x007889f71086e6dfce3142d3d5db8961dce79cfaef07618a5bb1cf0a3a3ae576 get_token_by_address 0xba30489493eaefa14bae7ad817be1218f291e4d0b2099fda64ae263ec360cc

# pledge_token 
starkli invoke 0x007889f71086e6dfce3142d3d5db8961dce79cfaef07618a5bb1cf0a3a3ae576 pledge_token u256:100 1 --keystore ~/.starknet_accounts/key.json --account ~/.starknet_accounts/starkli.json 

# get_pledge_account_by_address 
starkli call 0x007889f71086e6dfce3142d3d5db8961dce79cfaef07618a5bb1cf0a3a3ae576 get_pledge_account_by_address 0xba30489493eaefa14bae7ad817be1218f291e4d0b2099fda64ae263ec360cc


# withdrew
starkli invoke 0x007889f71086e6dfce3142d3d5db8961dce79cfaef07618a5bb1cf0a3a3ae576 withdrew u256:10 --keystore ~/.starknet_accounts/key.json --account ~/.starknet_accounts/starkli.json 

# get_total_pledge
starkli call 0x007889f71086e6dfce3142d3d5db8961dce79cfaef07618a5bb1cf0a3a3ae576 get_total_pledge

pledge's People

Contributors

zouyuxuan avatar

Watchers

 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.