From fb2acde8a25b90a70398ac6311ccf523faa786de Mon Sep 17 00:00:00 2001 From: Lukasz Zimnoch Date: Mon, 29 Jan 2024 14:07:55 +0100 Subject: [PATCH] Return deposit key from `initializeDeposit` function Returning deposit key can be useful for child contracts using this function. --- solidity/contracts/bridge/DepositorProxy.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/solidity/contracts/bridge/DepositorProxy.sol b/solidity/contracts/bridge/DepositorProxy.sol index f175fc460..578f7721e 100644 --- a/solidity/contracts/bridge/DepositorProxy.sol +++ b/solidity/contracts/bridge/DepositorProxy.sol @@ -57,7 +57,7 @@ abstract contract DepositorProxy { BitcoinTx.Info calldata fundingTx, Deposit.DepositRevealInfo calldata reveal, bytes32 extraData - ) internal { + ) internal returns (uint256) { require(reveal.vault == address(tbtcVault), "Vault address mismatch"); uint256 depositKey = calculateDepositKey( @@ -78,6 +78,8 @@ abstract contract DepositorProxy { // if the deposit has already been revealed so, there is no need to do // an explicit check here. bridge.revealDepositWithExtraData(fundingTx, reveal, extraData); + + return depositKey; } function finalizeDeposit(uint256 depositKey) internal {