Skip to content

Commit ca35965

Browse files
Add fn to check mainchain withdrew voted (#30)
1 parent 29e788d commit ca35965

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

contracts/v0.8/ronin/IRoninGatewayV2.sol

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ interface IRoninGatewayV2 is MappedTokenConsumer {
131131
address _voter
132132
) external view returns (bool);
133133

134+
/**
135+
* @dev Returns whether the mainchain withdrew is casted by the voter.
136+
*/
137+
function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool);
138+
134139
/**
135140
* @dev Returns whether the withdrawal is done on mainchain.
136141
*/

contracts/v0.8/ronin/RoninGatewayV2.sol

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,13 @@ contract RoninGatewayV2 is
252252
return _voted(depositVote[_chainId][_depositId], _voter);
253253
}
254254

255+
/**
256+
* @dev {IRoninGatewayV2-mainchainWithdrewVoted}.
257+
*/
258+
function mainchainWithdrewVoted(uint256 _withdrawalId, address _voter) external view returns (bool) {
259+
return _voted(mainchainWithdrewVote[_withdrawalId], _voter);
260+
}
261+
255262
/**
256263
* @dev {IRoninGatewayV2-mainchainWithdrew}.
257264
*/

0 commit comments

Comments
 (0)