GithubHelp home page GithubHelp logo

cupid20103 / stake-delegation-contract Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 230 KB

A liquidity protocol stake delegation contract for 1inch.exchange.

Solidity 85.98% JavaScript 14.02%
soliidty 1inch truffle

stake-delegation-contract's Introduction

A liquidity protocol stake delegation contract


【Introduction of the A liquidity protocol stake delegation contract】

  • This is a smart contract that:

 


【Workflow】

  • Diagram of workflow
    (※ Anyone can create the stake delegation contract that is process ① in the diagram below) 【Diagram】A liquidity protocol stake delegation contract

 


【Remarks】

  • Version for following the 1inch smart contract
    • Solidity (Solc): v0.6.12
    • Truffle: v5.1.60
    • web3.js: v1.2.9
    • openzeppelin-solidity: v3.2.0
    • ganache-cli: v6.9.1 (ganache-core: 2.10.2)

 


【Setup】

① Install modules

  • Install npm modules in the root directory
$ npm install

② Compile & migrate contracts (on local)

$ npm run migrate:local

③ Test (Mainnet-fork approach)

  • 1: Start ganache-cli
$ ganache-cli -d

(※ -d option is the option in order to be able to use same address on Ganache-CLI every time)


  • 2: Execute test of the smart-contracts (on the local)
    • Test for the contract $ npm run test:delegation ($ truffle test ./test/test-local/StakeDelegation.test.js)


【Demo】



【References】




stake-delegation-contract's People

Contributors

cupid20103 avatar

Stargazers

 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.