mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-19 23:19:28 +00:00
Consider get_deposit_count and get_deposit_root part of the external interface
This commit is contained in:
parent
3aaf6f06ad
commit
9957540744
@ -18,6 +18,10 @@ interface IDepositContract {
|
||||
bytes calldata signature,
|
||||
bytes32 deposit_data_root
|
||||
) external payable;
|
||||
|
||||
function get_deposit_root() external view returns (bytes32);
|
||||
|
||||
function get_deposit_count() external view returns (bytes memory);
|
||||
}
|
||||
|
||||
// This is a rewrite of the Vyper Eth2.0 deposit contract in Solidity.
|
||||
@ -45,7 +49,7 @@ contract DepositContract is IDepositContract {
|
||||
zero_hashes[height + 1] = sha256(abi.encodePacked(zero_hashes[height], zero_hashes[height]));
|
||||
}
|
||||
|
||||
function get_deposit_root() external view returns (bytes32) {
|
||||
function get_deposit_root() override external view returns (bytes32) {
|
||||
bytes24 zero_bytes24;
|
||||
bytes32 node;
|
||||
uint size = deposit_count;
|
||||
@ -63,7 +67,7 @@ contract DepositContract is IDepositContract {
|
||||
));
|
||||
}
|
||||
|
||||
function get_deposit_count() external view returns (bytes memory) {
|
||||
function get_deposit_count() override external view returns (bytes memory) {
|
||||
return to_little_endian_64(uint64(deposit_count));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user