IWalletRegistry
IWalletRegistry
requestNewWallet
Requests a new wallet creation.
Only the Wallet Owner can call this function.
closeWallet
Closes an existing wallet.
Only the Wallet Owner can call this function.
Parameters
Name | Type | Description |
---|---|---|
walletID | bytes32 | ID of the wallet. |
seize
Adds all signing group members of the wallet with the given ID to the slashing queue of the staking contract. The notifier will receive reward per each group member from the staking contract notifiers treasury. The reward is scaled by the rewardMultiplier
provided as a parameter.
Only the Wallet Owner can call this function. Requirements:
The expression
keccak256(abi.encode(walletMembersIDs))
must be exactly the same as the hash stored undermembersIdsHash
for the givenwalletID
. Those IDs are not directly stored in the contract for gas efficiency purposes but they can be read from appropriateDkgResultSubmitted
andDkgResultApproved
events.rewardMultiplier
must be between [0, 100].This function does revert if staking contract call reverts. The calling code needs to handle the potential revert.
Parameters
Name | Type | Description |
---|---|---|
amount | uint96 | Amount of tokens to seize from each signing group member |
rewardMultiplier | uint256 | Fraction of the staking contract notifiers reward the notifier should receive; should be between [0, 100] |
notifier | address | Address of the misbehavior notifier |
walletID | bytes32 | ID of the wallet |
walletMembersIDs | uint32[] | Identifiers of the wallet signing group members |
getWalletPublicKey
Gets public key of a wallet with a given wallet ID. The public key is returned in an uncompressed format as a 64-byte concatenation of X and Y coordinates.
Parameters
Name | Type | Description |
---|---|---|
walletID | bytes32 | ID of the wallet. |
Return Values
Name | Type | Description |
---|---|---|
[0] | bytes | Uncompressed public key of the wallet. |
getWalletCreationState
Check current wallet creation state.
isWalletMember
Checks whether the given operator is a member of the given wallet signing group.
Requirements:
The
operator
parameter must be an actual sortition pool operator.The expression
keccak256(abi.encode(walletMembersIDs))
must be exactly the same as the hash stored undermembersIdsHash
for the givenwalletID
. Those IDs are not directly stored in the contract for gas efficiency purposes but they can be read from appropriateDkgResultSubmitted
andDkgResultApproved
events.The
walletMemberIndex
must be in range [1, walletMembersIDs.length]
Parameters
Name | Type | Description |
---|---|---|
walletID | bytes32 | ID of the wallet |
walletMembersIDs | uint32[] | Identifiers of the wallet signing group members |
operator | address | Address of the checked operator |
walletMemberIndex | uint256 | Position of the operator in the wallet signing group members list |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | True - if the operator is a member of the given wallet signing group. False - otherwise. |
Last updated