PayloadsController
Ethereum0xdabad81af85554e9ae636395611c58f7ec1aaec5
Proxy implementation: 0x7222182cb9c5320587b5148bf03eee107ad64578
Solidity v0.8.19+commit.7dd6d404
Admin & Risk
Who can change the rules?
Detected upgradeable and ownable controls from the verified ABI.
Current controls
- Implementation
- 0x7222182cb9c5320587b5148bf03eee107ad64578 ↗ Etherscan → smarts proxy
- Owner
- 0x5300a1a15135ea4dc7ad5a167152c01efc9b192a ↗ Etherscan → smarts
Overview
Read Functions
Block #25,170,238 · just nowget contract address from where the messages come
Returns
| Name | Type | Description |
|---|---|---|
| — | address | address of the message registry |
get the expiration delay of a payload
Returns
| Name | Type | Description |
|---|---|---|
| — | uint40 | expiration delay in seconds |
time in seconds where the proposal can be executed (from executionTime) before it expires
Returns
| Name | Type | Description |
|---|---|---|
| — | uint40 | grace period in seconds |
get the maximum time in seconds that a proposal must spend being queued
Returns
| Name | Type | Description |
|---|---|---|
| — | uint40 | max delay in seconds |
get address of the message sender in originator network
Returns
| Name | Type | Description |
|---|---|---|
| — | address | address of the originator contract |
get the minimum time in seconds that a proposal must spend being queued
Returns
| Name | Type | Description |
|---|---|---|
| — | uint40 | min delay in seconds |
get chain id of the message originator network
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256 | chain id of the originator network |
method to decode a message from from governance chain
Parameters
| Name | Type | Description |
|---|---|---|
| message | bytes | encoded message with message type |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint40 | payloadId, accessLevel, proposalVoteActivationTimestamp from the decoded message |
| — | uint8 | |
| — | uint40 |
method to get the executor configuration assigned to the specified level
Parameters
| Name | Type | Description |
|---|---|---|
| accessControl | uint8 | level of which we want to get the executor configuration from |
Returns
| Name | Type | Description |
|---|---|---|
| — | tuple | executor configuration |
get a previously created payload object
Parameters
| Name | Type | Description |
|---|---|---|
| payloadId | uint40 | id of the payload to retrieve |
Returns
| Name | Type | Description |
|---|---|---|
| — | tuple | payload information |
get the current state of a payload
Parameters
| Name | Type | Description |
|---|---|---|
| payloadId | uint40 | id of the payload to retrieve the state from |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint8 | payload state |
get the total count of payloads created
Returns
| Name | Type | Description |
|---|---|---|
| — | uint40 | number of payloads |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
method that defines the address that is allowed to rescue tokens
Returns
| Name | Type | Description |
|---|---|---|
| — | address | the allowed address |
Write Functions
method to cancel a payload
Parameters
| Name | Type | Description |
|---|---|---|
| payloadId | uint40 | id of the payload that needs to be canceled |
method that will create a Payload object for every action sent
Parameters
| Name | Type | Description |
|---|---|---|
| actions | tuple[] | array of actions which this proposal payload will contain |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint40 | id of the created payload |
method called to rescue ether sent erroneously to the contract. Only callable by owner
Parameters
| Name | Type | Description |
|---|---|---|
| to | address | address to send the eth |
| amount | uint256 | of eth to rescue |
method called to rescue tokens sent erroneously to the contract. Only callable by owner
Parameters
| Name | Type | Description |
|---|---|---|
| erc20Token | address | address of the token to rescue |
| to | address | address to send the tokens |
| amount | uint256 | of tokens to rescue |
method to execute a payload
Parameters
| Name | Type | Description |
|---|---|---|
| payloadId | uint40 | id of the payload that needs to be executed |
method to initialize the contract with starter params. Only callable by proxy
Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | address of the owner of the contract. with permissions to call certain methods |
| guardian | address | address of the guardian. With permissions to call certain methods |
| executors | tuple[] | array of executor configurations |
method called by CrossChainController when a message has been confirmed
Parameters
| Name | Type | Description |
|---|---|---|
| originSender | address | address of the sender of the bridged message |
| originChainId | uint256 | id of the chain where the message originated |
| message | bytes | bytes bridged containing the desired information |
Parameters
| Name | Type | Description |
|---|---|---|
| newOwner | address |
method to add executors and its configuration
Parameters
| Name | Type | Description |
|---|---|---|
| executors | tuple[] | array of UpdateExecutorInput objects |
Parameters
| Name | Type | Description |
|---|---|---|
| newGuardian | address | the new guardian address |
Events
emitted when erc20 tokens get rescued
| Name | Type | Indexed | Description |
|---|---|---|---|
| caller | address | ✓ | address that triggers the rescue |
| token | address | ✓ | address of the rescued token |
| to | address | ✓ | address that will receive the rescued tokens |
| amount | uint256 | quantity of tokens rescued |
Event emitted when an executor has been set for a determined access level
| Name | Type | Indexed | Description |
|---|---|---|---|
| accessLevel | uint8 | ✓ | level of access that the executor will be set to |
| executor | address | ✓ | address that will be set for the determined access level |
| delay | uint40 | time in seconds between queuing and execution |
| Name | Type | Indexed | Description |
|---|---|---|---|
| oldGuardian | address | address of previous guardian | |
| newGuardian | address | address of the new guardian |
| Name | Type | Indexed | Description |
|---|---|---|---|
| version | uint8 |
emitted when native tokens get rescued
| Name | Type | Indexed | Description |
|---|---|---|---|
| caller | address | ✓ | address that triggers the rescue |
| to | address | ✓ | address that will receive the rescued tokens |
| amount | uint256 | quantity of tokens rescued |
| Name | Type | Indexed | Description |
|---|---|---|---|
| previousOwner | address | ✓ | |
| newOwner | address | ✓ |
Event emitted when cancelling a payload
| Name | Type | Indexed | Description |
|---|---|---|---|
| payloadId | uint40 | id of the cancelled payload |
Event emitted when a payload has been created
| Name | Type | Indexed | Description |
|---|---|---|---|
| payloadId | uint40 | ✓ | id of the payload created |
| creator | address | ✓ | address pertaining to the caller of the method createPayload |
| actions | tuple[] | array of the actions conforming the payload | |
| maximumAccessLevelRequired | uint8 | ✓ | maximum level of the access control |
Event emitted when a payload has been executed
| Name | Type | Indexed | Description |
|---|---|---|---|
| payloadId | uint40 | id of the payload being enqueued |
emitted when a cross chain message gets received
| Name | Type | Indexed | Description |
|---|---|---|---|
| originSender | address | ✓ | address that sent the message on the origin chain |
| originChainId | uint256 | ✓ | id of the chain where the message originated |
| delivered | bool | ✓ | flag indicating if message has been delivered |
| message | bytes | bytes containing the necessary information to queue the bridged payload id | |
| reason | bytes | bytes with the revert information |
Event emitted when a payload has been queued
| Name | Type | Indexed | Description |
|---|---|---|---|
| payloadId | uint40 | id of the payload being enqueued |