Skip to content

mmsaki/ef-deposit

Repository files navigation

ETH1 Deposit Contract tests (WIP)

test function Test
1 🗂️ deposit test_ValidDeposit_Success()
test_InvalidSignature_Fail()
test_InvalidSignatureLength_Fail()
test_InvalidWithdraw_Fail()
test_InvalidWithdrawLength_Fail()
test_ValidPartialDeposit_Success()
test_ValidDepositCount_Success() 🕯️
test_ValidDepositRoot_Success() 🕯️
2 🗂️ merkle 🗂️
key
🗂️ Module
Passing
🕯️ WIP

Validator Keys

Create keys:

./deposit new-mnemonic --num_validators 1 --chain holesky --eth1_withdrawal_address 0xFE948CB2122FDD87bAf43dCe8aFa254B1242c199

Build Validator Transactions

./deposit partial-deposit --chain mainnet --withdrawal_address 0xFE948CB2122FDD87bAf43dCe8aFa254B1242c199 --keystore validator_keys/keystore-m_12381_3600_0_0_0-1733214572.json --amount 31 --output_folder . --regular-withdrawal

Test

Run test with forge test

[⠊] Compiling...
No files changed, compilation skipped
test/deposit.t.sol:DepositTestSuite result: ok. 8 passed; 0 failed; 0 skipped; finished in 537.00ms (1.76s CPU time)

Ran 8 tests for test/deposit.t.sol:DepositTest
[PASS] test_InvalidSignatureLength_Fail(bytes32,bytes32) (runs: 257, μ: 55770, ~: 55770)
[PASS] test_InvalidSignature_Fail(bytes32,bytes32,bytes32) (runs: 257, μ: 72277, ~: 72277)
[PASS] test_InvalidWithdrawLength_Fail(address) (runs: 257, μ: 55736, ~: 55736)
[PASS] test_InvalidWithdraw_Fail(uint8,address) (runs: 257, μ: 72228, ~: 72228)
[PASS] test_ValidDepositCount_Success() (gas: 212)
[PASS] test_ValidDepositRoot_Success() (gas: 191)
[PASS] test_ValidDeposit_Success() (gas: 113343)
[PASS] test_ValidPartialDeposit_Success() (gas: 196945)
Suite result: ok. 8 passed; 0 failed; 0 skipped; finished in 537.00ms (1.76s CPU time)

Ran 1 test suite in 1.11s (537.00ms CPU time): 8 tests passed, 0 failed, 0 skipped (8 total tests)

About

made at ethereum foundation attackathon

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published