Require deposit amount to fit into uint64 (#9)

Ref https://github.com/ethereum/eth2.0-specs/issues/1726
This commit is contained in:
Alex Beregszaszi 2020-05-13 14:41:37 +01:00 committed by GitHub
parent a8ed83e087
commit df7c2c538a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -82,6 +82,7 @@ contract DepositContract is IDepositContract {
// Check deposit amount
uint deposit_amount = msg.value / GWEI;
require(deposit_amount >= MIN_DEPOSIT_AMOUNT);
require(deposit_amount < 2**64);
// Length checks for safety
require(pubkey.length == PUBKEY_LENGTH);
@ -89,7 +90,6 @@ contract DepositContract is IDepositContract {
require(signature.length == SIGNATURE_LENGTH);
// FIXME: these are not the Vyper code, but should verify they are not needed
// assert(deposit_amount <= 2**64-1);
// assert(deposit_count <= 2**64-1);
// Emit `DepositEvent` log