The Figment Eth2 Depositor provides a convenient way to send 1 or more deposits in one transaction to the Eth2 Deposit Contract.
- Contract address on mainnet: 0x00000000219ab540356cBB839Cbe05303d7705Fa
- Contract address on (Goerli) testnet: 0x8c5fecdC472E27Bc447696F431E425D02dd46a8c
Below is a list of contracts we use for this service:
- Ownable, Pausable
- OpenZepellin smart contracts. The first contract allows for managing ownership. The second contract allows for pausing the contract and vice versa.
- FigmentEth2Depositor
- A smart contract that accepts X amount of ETH and sends {x / 32} transactions with required collateral (32 ETH) to the Eth2 Deposit Contract.
Installation (DEPRECATED, see PR#26)
- Clone the repository
git clone git@github.com:figment-networks/figment-eth2-depositor.git
- Install the npm dependencies
npm install
- Set a working version of the compiler
npx truffle obtain --solc v0.8.10+commit.fc410830
- Create a
secrets.json
file with:
- Your mnemonic
- Infura projectId
- Ether-scan etherScanApiKey
- Deploy the contract
npx truffle migrate --network goerli
- Run
npx truffle run verify FigmentEth2Depositor --network goerli
Verifying FigmentEth2Depositor
Pass - Verified: https://goerli.etherscan.io/address/0x7F928Cd880Dff0cFbe2055B611908CEc7dBF95E8#contracts
Successfully verified 1 contract(s).
- Choose the amount of Eth2 validator nodes you want to deposit to.
- Instantiate those validators with your chosen
withdrawal_credentials
- Retrieve your validators'
pubkeys
, and generatedeposit_signatures
anddeposit_data_roots
from each that will let you deposit to them. - Use the deposit() function on
FigmentEth2Depositor
with the required ETH value to make the deposits to the Eth2 Deposit Contract.
MIT