Transact to EVM Function
Submit a Transaction to an EVM Chain.
Transact to EVM Function is used to submit a transaction to a contract on a Testnet or Mainnet chain. Transact to EVM Function is useful for any midpoint that has a requirement to submit some sort of external data back on-chain, whenever you want to trigger your contract in response to an on-chain event, or when you need to call your contract at an interval.
There are two types of Transact to EVM Function tasks: Testnet and Mainnet. Testnet submits transactions to Testnet chains, and Mainnet submits transactions to Mainnet chains.
chainId: string # required
contractAddress: string # required
functionName: string # required
contractAddress: String. The address of the contract that Transact to EVM Function submits a transaction to. This contract address should exist on the chain you are calling.
functionName: String. This is name of the function you are calling from the Transact to EVM Function task.
arguments: This specifies both the signature of your on-chain function, and the values that are going to be submitted by the Transact to EVM Function task.
arguments.name: String. This is the name of the argument that you are passing in. This is a human-readable name that you set: for clarity, it might be best to set this name to the name of the parameter you are calling.
arguments.datatype: String. This defines the solidity datatype that will be submitted. This datatype must match the datatype of your on-chain function exactly, in the same order as they are defined in the on-chain function.
arguments.value: String. This defines the value that will be submitted on-chain when your Transact to EVM Function submits a transaction. If you directly put in a value, it will be a constant that is always submitted. We recommend entering a variable name that will be interpolated during runtime after it is extracted from a previous source or task.
TimestampUnixtime of execution.
Unit_Price_In_USDThe unit price of the native token on the chain you submitted on. E.g. $1500 for Ethereum.
Cumulative_Gas_UsedThe cumulative amount of gas used by the transaction.
Txn_HashThe Transaction Hash of the transaction.
Contract_AddressThe contract address that contained the EVM function.
Gas_UsedThe gas that was used by the transaction.
Block_NumberThe block number of the transaction.;
TaskDefinitionThe complete definition of this task at runtime.
ComposedResponseDataThe complete set of data that will be posted on-chain
Txn_HashThe transaction hash and chainId of the submitted response
TaskOutputDataThe complete set of returned values from this task.
This task returns any values extracted using the
extractswhich are outlined above.
This section is incomplete.
- Use a variable from a source or a previous task for the value of an argument. This makes the values that you submit back on-chain dynamic.
- Use a variable for your chainId, and have it originate from on-chain. If you use the implicit Chain_ID from your Startpoint Calledsource, you can have a chain-agnostic data bridge that uses the same midpoint.