From 1b58d54a6ba8d54bd3e802189e07f68b83afc1be Mon Sep 17 00:00:00 2001 From: Hamdi Allam Date: Sun, 9 Dec 2018 13:32:54 -0800 Subject: [PATCH] added eth blocknum to the deposit struct (#85) --- contracts/rootchain/RootChain.sol | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contracts/rootchain/RootChain.sol b/contracts/rootchain/RootChain.sol index ffa3e17..fe8e297 100644 --- a/contracts/rootchain/RootChain.sol +++ b/contracts/rootchain/RootChain.sol @@ -23,7 +23,7 @@ contract RootChain is Ownable { event AddedToBalances(address owner, uint256 amount); event BlockSubmitted(bytes32 root, uint256 blockNumber, uint256 numTxns, uint256 feeAmount); - event Deposit(address depositor, uint256 amount, uint256 depositNonce); + event Deposit(address depositor, uint256 amount, uint256 depositNonce, uint256 ethBlockNum); event StartedTransactionExit(uint[3] position, address owner, uint256 amount, bytes confirmSignatures); event StartedDepositExit(uint nonce, address owner, uint256 amount); @@ -50,6 +50,7 @@ contract RootChain is Ownable { address owner; uint256 amount; uint256 createdAt; + uint256 ethBlocknum; } // exits @@ -121,8 +122,8 @@ contract RootChain is Ownable { public payable { - deposits[depositNonce] = depositStruct(owner, msg.value, block.timestamp); - emit Deposit(owner, msg.value, depositNonce); + deposits[depositNonce] = depositStruct(owner, msg.value, block.timestamp, block.number); + emit Deposit(owner, msg.value, depositNonce, block.number); depositNonce = depositNonce.add(1); }