Skip to content

Batch Deposit and Service Fee collection Smart Contract for ETH 2.0

License

Notifications You must be signed in to change notification settings

DecentStake/eth2-batch-deposit

 
 

Repository files navigation

Batch Deposit Contract

pipeline status coverage report

This contract enable to deposit to the ETH2 Deposit Contract multiple times in a single transaction.

Usage

You can test the contract on both goerli testnet or in your local development environment.

Integrated ganache-chi

  1. Clone
  2. npm install
  3. In a terminal run npx ganache-cli
  4. In another terminal run npx truffle deploy

Test on your local blockchain

  1. Clone the repository
  2. Install Ganache and Truffle
  3. Run ganache and quick start an empty workspace
  4. Tun truffle deploy to compile & deploy, or just truffle test to compile, deploy and test automatically.

Deploy on Goerli

  1. Get some funds from the faucet
  2. Copy and rename .env.sample to .env
  3. Replace SIGNER_PRIVATE_KEY in .env
  4. Run the script with node scripts/deploy_goerli.js

Functional tests

Assertion libraries supported are chai assertion library and truffle-assertions. Tests are written with Mocha.

You can find test under tests folder and run all the tests using truffle test command

Code coverage

You can test code coverage by simply running npm run coverage, a local blockchain at port 8545 will be automatically provided and shutdown after all the tests are done.

Deploy

To deploy in production is reccomended to use Remix IDE, expected gas usage is around 492,831.

Use older version of solidity

Refer to https://github.com/crytic/solc-select

Security testing

Refer to https://github.com/crytic/slither

Deployed contracts:

About

Batch Deposit and Service Fee collection Smart Contract for ETH 2.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 51.4%
  • JavaScript 48.6%