Skip to content

Commit

Permalink
Return deposit key from initializeDeposit function
Browse files Browse the repository at this point in the history
Returning deposit key can be useful for child contracts using this function.
  • Loading branch information
lukasz-zimnoch committed Jan 29, 2024
1 parent 8c068d4 commit fb2acde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion solidity/contracts/bridge/DepositorProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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 {
Expand Down

0 comments on commit fb2acde

Please sign in to comment.