Ethereum and EVM Compatible Blockchains (alpha) Actions
sign_transfer
The evm::sign_transfer
action encodes an ETH transfer transaction, signs it with the provided signer data, and broadcasts it to the network.
Inputs
- Name
description
- Type
- optional
- Description
A description of the transaction
- Name
signer
- Type
- required
- Description
A reference to a signer construct, which will be used to sign the transaction.
- Name
to
- Type
- required
- Description
The address of the recipient of the transfer.
- Name
amount
- Type
- required
- Description
The amount, in WEI, to transfer.
- Name
type
- Type
- optional
- Description
The transaction type. Options are 'Legacy', 'EIP2930', 'EIP1559', 'EIP4844'. The default is 'EIP1559'.
- Name
max_fee_per_gas
- Type
- optional
- Description
Sets the max fee per gas of an EIP1559 transaction.
- Name
max_priority_fee_per_gas
- Type
- optional
- Description
Sets the max priority fee per gas of an EIP1559 transaction.
- Name
chain_id
- Type
- optional
- Description
The chain id.
- Name
nonce
- Type
- optional
- Description
The account nonce of the signer. This value will be retrieved from the network if omitted.
- Name
gas_limit
- Type
- optional
- Description
Sets the maximum amount of gas that should be used to execute this transaction.
- Name
gas_price
- Type
- optional
- Description
Sets the gas price for Legacy transactions.
- Name
rpc_api_url
- Type
- optional
- Description
The URL of the EVM API used to fetch and fill transaction data and to broadcast it to the network.
Outputs
When the sign_transfer
action is successfully executed, the following outputs are attached to the action
- Name
tx_hash
- Description
The transaction hash
Example using sign_transfer
// Coming soon
call_contract
The evm::call_contract
action encodes a contract call transaction, signs it with the provided signer data, and broadcasts it to the network.
Inputs
- Name
description
- Type
- optional
- Description
A description of the transaction.
- Name
rpc_api_url
- Type
- optional
- Description
The URL of the EVM API used to broadcast the transaction.
- Name
signer
- Type
- required
- Description
A reference to a signer construct, which will be used to sign the transaction.
- Name
contract_address
- Type
- required
- Description
The address of the contract being called.
- Name
contract_abi
- Type
- optional
- Description
The contract ABI, optionally used to check input arguments before sending the transaction to the chain.
- Name
function_name
- Type
- required
- Description
The contract function to invoke.
- Name
function_args
- Type
- optional
- Description
The contract function arguments
- Name
amount
- Type
- optional
- Description
The amount, in WEI, to transfer.
- Name
type
- Type
- optional
- Description
The transaction type. Options are 'Legacy', 'EIP2930', 'EIP1559', 'EIP4844'. The default is 'EIP1559'.
- Name
max_fee_per_gas
- Type
- optional
- Description
Sets the max fee per gas of an EIP1559 transaction.
- Name
max_priority_fee_per_gas
- Type
- optional
- Description
Sets the max priority fee per gas of an EIP1559 transaction.
- Name
chain_id
- Type
- optional
- Description
The chain id.
- Name
nonce
- Type
- optional
- Description
The account nonce of the signer. This value will be retrieved from the network if omitted.
- Name
gas_limit
- Type
- optional
- Description
Sets the maximum amount of gas that should be used to execute this transaction.
- Name
gas_price
- Type
- optional
- Description
Sets the gas price for Legacy transactions.
Outputs
When the call_contract
action is successfully executed, the following outputs are attached to the action
- Name
tx_hash
- Description
The hash of the transaction.
Example using call_contract
action "call_some_contract" "evm::call_contract" {
contract_address = evm::address(env.MY_CONTRACT_ADDRESS)
function_name = "myFunction"
function_args = [evm::bytes("0x1234")]
from = evm::address(env.MY_ADDRESS)
}
eth_call
The evm::eth_call
command simulates an Ethereum transaction using the eth_call
RPC endpoint.
Inputs
- Name
description
- Type
- optional
- Description
A description of the call.
- Name
rpc_api_url
- Type
- optional
- Description
The URL of the EVM API used to send the RPC request.
- Name
contract_address
- Type
- required
- Description
The address of the contract being called.
- Name
contract_abi
- Type
- optional
- Description
The contract ABI, optionally used to check input arguments before sending the transaction to the chain.
- Name
signer
- Type
- required
- Description
The address that will be used as the sender of this contract call.
- Name
function_name
- Type
- optional
- Description
The contract function to call.
- Name
function_args
- Type
- optional
- Description
The contract function arguments.
- Name
amount
- Type
- optional
- Description
The amount, in Wei, to send in the transaction.
- Name
type
- Type
- optional
- Description
The transaction type. Options are 'Legacy', 'EIP2930', 'EIP1559', 'EIP4844'. The default is 'EIP1559'.
- Name
max_fee_per_gas
- Type
- optional
- Description
Sets the max fee per gas of an EIP1559 transaction.
- Name
max_priority_fee_per_gas
- Type
- optional
- Description
Sets the max priority fee per gas of an EIP1559 transaction.
- Name
chain_id
- Type
- optional
- Description
The chain id.
- Name
nonce
- Type
- optional
- Description
The account nonce of the sender. This value will be retrieved from the network if omitted.
- Name
gas_limit
- Type
- optional
- Description
Sets the maximum amount of gas that should be used to execute this transaction.
- Name
gas_price
- Type
- optional
- Description
Sets the gas price for Legacy transactions.
Outputs
When the eth_call
action is successfully executed, the following outputs are attached to the action
- Name
result
- Description
The contract call result.
Example using eth_call
action "call_some_contract" "evm::eth_call" {
contract_address = evm::address(env.MY_CONTRACT_ADDRESS)
function_name = "myFunction"
function_args = [evm::bytes("0x1234")]
from = evm::address(env.MY_ADDRESS)
}
deploy_contract
The evm::deploy_contract
action encodes a contract deployment transaction, signs it with the provided signer data, and broadcasts it to the network.
Inputs
- Name
description
- Type
- optional
- Description
A description of the transaction
- Name
rpc_api_url
- Type
- optional
- Description
The URL of the EVM API used to broadcast the transaction.
- Name
signer
- Type
- required
- Description
A reference to a signer construct, which will be used to sign the transaction.
- Name
amount
- Type
- optional
- Description
The amount, in WEI, to send with the deployment.
- Name
type
- Type
- optional
- Description
The transaction type. Options are 'Legacy', 'EIP2930', 'EIP1559', 'EIP4844'. The default is 'EIP1559'.
- Name
max_fee_per_gas
- Type
- optional
- Description
Sets the max fee per gas of an EIP1559 transaction.
- Name
max_priority_fee_per_gas
- Type
- optional
- Description
Sets the max priority fee per gas of an EIP1559 transaction.
- Name
chain_id
- Type
- optional
- Description
The chain id.
- Name
nonce
- Type
- optional
- Description
The account nonce of the signer. This value will be retrieved from the network if omitted.
- Name
gas_limit
- Type
- optional
- Description
Sets the maximum amount of gas that should be used to execute this transaction.
- Name
gas_price
- Type
- optional
- Description
Sets the gas price for Legacy transactions.
- Name
contract
- Type
- required
- Description
Coming soon
- Name
constructor_args
- Type
- optional
- Description
Coming soon
- Name
confirmations
- Type
- optional
- Description
Once the transaction is included on a block, the number of blocks to await before the transaction is considered successful and Runbook execution continues.
- Name
verify
- Type
- optional
- Description
- Name
block_explorer_api_key
- Type
- optional
- Description
The URL of the block explorer used to verify the contract.
Outputs
When the deploy_contract
action is successfully executed, the following outputs are attached to the action
- Name
tx_hash
- Description
The hash of the transaction.
Example using deploy_contract
// Coming soon
verify_contract
The evm::verify_contract
action sends the required contract deployment artifacts to a block explorer to verify the contract with the explorer.
Inputs
- Name
block_explorer_api_key
- Type
- required
- Description
The URL of the block explorer used to verify the contract.
- Name
contract_address
- Type
- required
- Description
The contract address to verify.
- Name
artifacts
- Type
- required
- Description
An object containing the deployment artifacts. Schema:
{ "abi": String, "bytecode": String, "source": String, "compiler_version": String, "contract_name": String, "optimizer_enabled": Bool, "optimizer_runs": UInt, "evn_version": String }
Outputs
When the verify_contract
action is successfully executed, the following outputs are attached to the action
- Name
result
- Description
The contract verification result.
Example using verify_contract
action "verify_contract" "evm::verify_contract" {
contract_address = evm::address(env.MY_CONTRACT_ADDRESS)
artifacts = action.artifacts
}
check_confirmations
The evm::check_confirmations
action polls the network until the provided tx_hash
has been confirmed by confirmations
blocks.
Inputs
- Name
tx_hash
- Type
- required
- Description
The transaction hash to check.
- Name
rpc_api_url
- Type
- required
- Description
The URL of the EVM API used to poll for the transaction's inclusion in a block.
- Name
chain_id
- Type
- required
- Description
Coming soon
- Name
confirmations
- Type
- optional
- Description
Once the transaction is included on a block, the number of blocks to await before the transaction is considered successful and Runbook execution continues.
Outputs
When the check_confirmations
action is successfully executed, the following outputs are attached to the action
- Name
contract_address
- Description
The contract address from the transaction receipt.
Example using check_confirmations
action "confirm_deployment" "evm::check_confirmations" {
tx_hash = action.some_deploying_action.tx_hash
confirmations = 1
}
sign_transaction
Coming soon
Inputs
- Name
description
- Type
- optional
- Description
A description of the transaction
- Name
transaction_payload_bytes
- Type
- required
- Description
The unsigned transaction payload bytes.
Outputs
When the sign_transaction
action is successfully executed, the following outputs are attached to the action
- Name
tx_hash
- Description
The hash of the transaction.
Example using sign_transaction
// Coming soon
deploy_contract_create2
Coming soon
Inputs
- Name
description
- Type
- optional
- Description
A description of the transaction
- Name
rpc_api_url
- Type
- optional
- Description
The URL of the EVM API used to broadcast the transaction.
- Name
signer
- Type
- required
- Description
A reference to a signer construct, which will be used to sign the transaction.
- Name
create2_factory_address
- Type
- optional
- Description
Coming soon
- Name
create2_factory_abi
- Type
- optional
- Description
Coming soon
- Name
create2_factory_function_name
- Type
- optional
- Description
Coming soon
- Name
create2_factory_function_args
- Type
- optional
- Description
Coming soon
- Name
amount
- Type
- optional
- Description
The amount, in WEI, to send with the deployment.
- Name
type
- Type
- optional
- Description
The transaction type. Options are 'Legacy', 'EIP2930', 'EIP1559', 'EIP4844'. The default is 'EIP1559'.
- Name
max_fee_per_gas
- Type
- optional
- Description
Sets the max fee per gas of an EIP1559 transaction.
- Name
max_priority_fee_per_gas
- Type
- optional
- Description
Sets the max priority fee per gas of an EIP1559 transaction.
- Name
chain_id
- Type
- optional
- Description
The chain id.
- Name
nonce
- Type
- optional
- Description
The account nonce of the signer. This value will be retrieved from the network if omitted.
- Name
gas_limit
- Type
- optional
- Description
Sets the maximum amount of gas that should be used to execute this transaction.
- Name
gas_price
- Type
- optional
- Description
Sets the gas price for Legacy transactions.
- Name
contract
- Type
- required
- Description
Coming soon
- Name
constructor_args
- Type
- optional
- Description
Coming soon
- Name
expected_contract_address
- Type
- optional
- Description
Coming soon
- Name
salt
- Type
- optional
- Description
Coming soon
- Name
confirmations
- Type
- optional
- Description
Once the transaction is included on a block, the number of blocks to await before the transaction is considered successful and Runbook execution continues.
- Name
verify
- Type
- optional
- Description
- Name
block_explorer_api_key
- Type
- optional
- Description
The URL of the block explorer used to verify the contract.
Outputs
When the deploy_contract_create2
action is successfully executed, the following outputs are attached to the action
- Name
tx_hash
- Description
The hash of the transaction.
- Name
contract_address
- Description
The address of the deployed transaction.
Example using deploy_contract_create2
// Coming soon