Skip to content
ClearClear
Docs
Protocol/ClaimEscrow

ClaimEscrow

Source: contracts/peripherals/ClaimEscrow.sol · Guide: savings · Upgradeable (UUPS proxy)

1 min readUpdated View source

On this page

Functions that change state

Function
Who can call
Also
claimToPayoutTreasury(bytes32 transferId)
onlyRole(SETTLER_ROLE)
claimToWallet(bytes32 transferId, address recipientWallet)
onlyRole(SETTLER_ROLE)
createTransfer(bytes32 transferId, uint256 principalUsdc, uint256 sponsorFeeUsdc, uint64 expiry, bytes32 recipientHintHash)
Checked inside the function
createTransferWithAuthorization(address sender, bytes32 transferId, uint256 principalUsdc, uint256 sponsorFeeUsdc, uint64 expiry, bytes32 recipientHintHash, uint256 validAfter, uint256 validBefore, bytes32 authNonce, uint8 v, bytes32 r, bytes32 s)
onlyRole(SETTLER_ROLE)
grantRole(bytes32 role, address account)
The role's admin role (DEFAULT_ADMIN_ROLE unless set otherwise)
initialize(address usdc, address payoutTreasury, address admin)
Once, when the proxy is initialised
refundExpired(bytes32 transferId)
Anyone
renounceRole(bytes32 role, address account)
Only the account renouncing its own role
revokeRole(bytes32 role, address account)
The role's admin role (DEFAULT_ADMIN_ROLE unless set otherwise)
upgradeTo(address newImplementation)
onlyRole(DEFAULT_ADMIN_ROLE) (via _authorizeUpgrade)
upgradeToAndCall(address newImplementation, bytes data)
onlyRole(DEFAULT_ADMIN_ROLE) (via _authorizeUpgrade)
payable

Read functions

Anyone can call these; they change nothing.

Function
Returns
DEFAULT_ADMIN_ROLE()
bytes32
getRoleAdmin(bytes32 role)
bytes32
hasRole(bytes32 role, address account)
bool
PAYOUT_TREASURY()
address
proxiableUUID()
bytes32
SETTLER_ROLE()
bytes32
supportsInterface(bytes4 interfaceId)
bool
transfers(bytes32)
address sender, uint256 principalUsdc, uint256 sponsorFeeUsdc, uint256 totalLockedUsdc, uint64 expiry, bytes32 recipientHintHash, bool claimed, bool refunded
USDC()
address

Events

Event
AdminChanged(address previousAdmin, address newAdmin)
BeaconUpgraded(address beacon indexed)
Initialized(uint8 version)
RoleAdminChanged(bytes32 role indexed, bytes32 previousAdminRole indexed, bytes32 newAdminRole indexed)
RoleGranted(bytes32 role indexed, address account indexed, address sender indexed)
RoleRevoked(bytes32 role indexed, address account indexed, address sender indexed)
TransferClaimedTreasury(bytes32 transferId indexed, address payoutTreasury indexed, uint256 totalLockedUsdc)
TransferClaimedWallet(bytes32 transferId indexed, address recipientWallet indexed, uint256 principalUsdc, uint256 sponsorFeeUsdc)
TransferCreated(bytes32 transferId indexed, address sender indexed, uint256 principalUsdc, uint256 sponsorFeeUsdc, uint256 totalLockedUsdc, uint64 expiry, bytes32 recipientHintHash)
TransferRefunded(bytes32 transferId indexed, address sender indexed, uint256 totalLockedUsdc)
Upgraded(address implementation indexed)

Errors

No custom errors; failures revert with a reason string.