cupid20103 / stake-delegation-contract

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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】




About

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


Languages

Language:Solidity 86.0%Language:JavaScript 14.0%