Module IReceivePolicyGuard
Expand description
Module containing a contract’s types and functions.
interface IReceivePolicyGuard {
enum InboundKind { TRANSFER, MINT }
struct ClaimReceiptV1 { uint8 version; address token; address recoveryAuthority; address originator; address recipient; uint64 blockedAt; uint64 blockedNonce; uint8 blockedReason; InboundKind kind; bytes32 memo; }
function balanceOf(bytes calldata receipt) external view returns (uint256 amount);
function claim(address to, bytes calldata receipt) external;
function burnBlockedReceipt(bytes calldata receipt) external;
event TransferBlocked(address indexed token, address indexed receiver, uint64 indexed blockedNonce, uint256 amount, uint8 receiptVersion, bytes receipt);
event ReceiptClaimed(address indexed token, address indexed receiver, uint64 indexed blockedNonce, uint64 blockedAt, uint8 receiptVersion, address originator, address recipient, address recoveryAuthority, address caller, address to, uint256 amount);
event ReceiptBurned(address indexed token, address indexed receiver, uint64 indexed blockedNonce, uint64 blockedAt, uint8 receiptVersion, address originator, address recipient, address recoveryAuthority, address caller, uint256 amount);
error InvalidReceipt();
error InvalidClaimAddress();
error UnauthorizedClaimer();
error AddressReserved();
}Modules§
- abi
- Contains dynamic ABI definitions for this contract.
Structs§
- Address
Reserved - Custom error with signature
AddressReserved()and selector0x98387502. - Claim
Receipt V1 - @notice Claim receipt for one blocked inbound transfer or mint.
@dev
recipientis the addressedtovalue and may be virtual. The correspondingreceiveremitted in events is the resolved account/master where funds settle. - IReceive
Policy Guard Instance - A
IReceivePolicyGuardinstance. - Invalid
Claim Address - Custom error with signature
InvalidClaimAddress()and selector0x1f842a90. - Invalid
Receipt - Custom error with signature
InvalidReceipt()and selector0xc0098aac. - Receipt
Burned - @notice Emitted when blocked funds are burned with a valid receipt.
@param token TIP-20 token burned by the guard.
@param receiver Resolved account where funds would settle; for virtual recipients its their master.
@param blockedNonce Guard nonce from the burned receipt.
@param blockedAt Block timestamp from the burned receipt.
@param receiptVersion Claim receipt layout version.
@param originator Original sender/originator from the burned receipt.
@param recipient Addressed recipient from the burned receipt; may be virtual.
@param recoveryAuthority Claim authority from the burned receipt.
@param caller Account that submitted the burn.
@param amount Amount of funds burned.
Event with signature
ReceiptBurned(address,address,uint64,uint64,uint8,address,address,address,address,uint256)and selector0x61d14663748cd685c80a8434fc260ea4f4b27e213768b94375aa33b3985bf952. - Receipt
Claimed - @notice Emitted when blocked funds are claimed with a valid receipt.
@param token TIP-20 token released by the guard.
@param receiver Resolved account where funds would settle; for virtual recipients its their master.
@param blockedNonce Guard nonce from the claimed receipt.
@param blockedAt Block timestamp from the claimed receipt.
@param receiptVersion Claim receipt layout version.
@param originator Original sender/originator from the claimed receipt.
@param recipient Addressed recipient from the claimed receipt; may be virtual.
@param recoveryAuthority Claim authority from the claimed receipt.
@param caller Account that submitted the claim.
@param to Address where released funds were sent.
@param amount Amount of funds released.
Event with signature
ReceiptClaimed(address,address,uint64,uint64,uint8,address,address,address,address,address,uint256)and selector0xdfa88f3774430fdb1d282219332a663236ccc8035ba8b9e0df856b374a5db085. - Transfer
Blocked - @notice Emitted when an inbound TIP-20 transfer or mint is blocked and funds are redirected.
@param token TIP-20 token whose funds are held by the guard.
@param receiver Resolved account where funds would settle; for virtual recipients its their master.
@param blockedNonce Guard nonce assigned to the blocked operation.
@param amount Amount of blocked funds held by the guard.
@param receiptVersion Claim receipt layout version.
@param receipt ABI-encoded receipt witness that can be passed to
claim. Event with signatureTransferBlocked(address,address,uint64,uint256,uint8,bytes)and selector0x361d86e46fd139dc3eac4148f16b53597f0f8ddd9aba772aae0034bda5531b1c. - Unauthorized
Claimer - Custom error with signature
UnauthorizedClaimer()and selector0x5c4aa7dc. - balance
OfCall - Function with signature
balanceOf(bytes)and selector0x78415365. - balance
OfReturn - Container type for the return parameters of the
balanceOf(bytes)function. - burn
Blocked Receipt Call - Function with signature
burnBlockedReceipt(bytes)and selector0x96c1264c. - burn
Blocked Receipt Return - Container type for the return parameters of the
burnBlockedReceipt(bytes)function. - claim
Call - Function with signature
claim(address,bytes)and selector0xbb1757cf. - claim
Return - Container type for the return parameters of the
claim(address,bytes)function.
Enums§
- IReceive
Policy Guard Calls - Container for all the
IReceivePolicyGuardfunction calls. - IReceive
Policy Guard Errors - Container for all the
IReceivePolicyGuardcustom errors. - IReceive
Policy Guard Events - Container for all the
IReceivePolicyGuardevents. - Inbound
Kind
Functions§
- new
- Creates a new wrapper around an on-chain
IReceivePolicyGuardcontract instance.