Skip to content

Commit

Permalink
Add fn to check mainchain withdrew voted (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
ducthotran2010 authored Jul 1, 2022
1 parent 29e788d commit ca35965
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contracts/v0.8/ronin/IRoninGatewayV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ interface IRoninGatewayV2 is MappedTokenConsumer {
address _voter
) external view returns (bool);

/**
* @dev Returns whether the mainchain withdrew is casted by the voter.
*/
function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool);

/**
* @dev Returns whether the withdrawal is done on mainchain.
*/
Expand Down
7 changes: 7 additions & 0 deletions contracts/v0.8/ronin/RoninGatewayV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@ contract RoninGatewayV2 is
return _voted(depositVote[_chainId][_depositId], _voter);
}

/**
* @dev {IRoninGatewayV2-mainchainWithdrewVoted}.
*/
function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool) {
return _voted(mainchainWithdrewVote[_withdrawalId], _voter);
}

/**
* @dev {IRoninGatewayV2-mainchainWithdrew}.
*/
Expand Down

0 comments on commit ca35965

Please sign in to comment.