From 99575407445fc793b475f7acd5a1acdd45e07785 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 12 May 2020 00:57:17 +0100 Subject: [PATCH] Consider get_deposit_count and get_deposit_root part of the external interface --- deposit_contract.sol | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deposit_contract.sol b/deposit_contract.sol index 013c133f8..5369024f2 100644 --- a/deposit_contract.sol +++ b/deposit_contract.sol @@ -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)); }