Operations
Operations contain the information required to execute transactions. Metadata fields (Contract Types
and Tags
) are optional and can be used to add helpful references to contracts' ABI, simplify operations like decoding payloads, or to categorize operations.
There are two types of operations which are used in proposals depending on the proposal type:
MCM Proposal Operations
Operations in an MCM proposal are used to execute a single transaction per operation. The transaction data is encoded in the transaction
field.
{
"chainSelector": "16015286601757825753",
"transaction": {
"to": "0xb",
"data": "ZGF0YQ==",
"additionalFields": {
"value": 0
},
"contractType": "<CONTRACT_TYPE>",
"tags": [
"tag1"
]
}
}
chainSelector uint64
The chain selector id for the chain that the operation will be executed on.
transaction object
The transaction to be executed.
Timelock Proposal Operations
Operations in an Timelock Proposal can be used to a batch of transaction per operation. The transaction data to be encoded is in the transactions
field.
{
"chainSelector": "16015286601757825753",
"transactions": [
{
"to": "0xb",
"data": "ZGF0YQ==",
"additionalFields": {
"value": 0
},
"contractType": "<CONTRACT_TYPE>",
"tags": [
"tag1"
]
}
]
}
chainSelector uint64
The chain selector id for the chain that the operation will be executed on.
transactions object
The transactions to be executed.
Transactions
Transactions represent the atomic operations that can be executed on a chain. They are composed of the following fields:
{
"to": "0xb",
"data": "ZGF0YQ==",
"additionalFields": {
"value": 0
},
"contractType": "<CONTRACT_TYPE>",
"tags": [
"tag1"
]
}
to string
The target contract address.
data string
The encoded data (hexadecimal) to be sent with the transaction.
additionalFields object
A chain family specific object with data relevant for the execution of operations on each chain.
contractType string optional
A pointer to the contract's ABI or other relevant metadata. This field is not included in the Merkle tree's hashed transaction data.
tags array optional
Tags for categorizing or describing transactions. This field is not included in the Merkle tree's hashed transaction data.