EVM: Broadcast Transaction
EVM chains like Ethereum, Polygon, BSC, Arbitrum, etc support the use of templates to broadcast transactions. Select the following based on the template kind
:
Evm
: Use this template if you don't want to worry about gas parameters.Eip1559
: Use this template to interact with chains that support the new EIP-1559 gas standard (most chains do now).Transaction
: Use this template to just pass in the fully serialized EVM transaction (formatted and encoded using eg Ethersjs library)
EMV Template
Request fields | Required - Type | Description |
---|---|---|
| Required - String |
|
| Required - String | Blockchain address of target contract or payee. |
| Optional (Required only if making a payment) - String (representing a integer eg | Amount of the native currency to transfer denominated in WEI. |
| Optional - String | Encoded hex string indicating which function in the smart contract to call with which parameters. Can also be an entire encoded contract in the case of contract deployment. |
| Optional - Integer | The transaction number to guarantee idempotency. If omitted, it will be provided automatically. Note the same nonce can be submitted multiple times with a higher |
Sample request body
200 response example
EIP-1559 Template
Use this template to adjust the maxFeePerGas
and maxPriorityFeePerGas
of an EIP-1559 type-2 transaction. Keep in mind that not all EVM compatible chains support this standard.
Request fields | Required - Type | Description |
---|---|---|
| Required - String |
|
| Required - String | Blockchain address of target contract or payee. |
| Optional (Required if making a payment) - String (representing an integer eg | Amount of the native currency to transfer denominated in WEI. |
| Optional - String | Encoded hex string indicating which function in the smart contract to call with which parameters. Can also be an entire encoded contract in the case of contract deployment. |
| Optional - Integer | The transaction number to guarantee idempotency. If omitted, it will be provided automatically. Note the same nonce can be submitted multiple times with a higher |
| Optional - String (representing an Integer) | The maximum amount of gas that can be spent for executing the transaction. If omitted, it will be calculated automatically. |
| Optional - String (representing an Integer) | The maximum amount of gas to be included as a tip to the validator. If omitted, it will be calculated automatically. |
| Optional - String (representing an Integer) | The maximum amount for gas willing to be paid for the transaction. If omitted, it will be calculated automatically. |
Sample request body
200 response example
Raw Transaction with EthersJS
You can also format the transaction using Ethers JS and the Dfns SDK:
Request fields | Required - Type | Description |
---|---|---|
| Required - String | For EVM, always "Transaction" |
| Required - String | The transaction encoded by EthersJS as shown below |
Sample request body
200 Response Example
EthersJS SDK Sample:
See the full EthersJS docs here: https://docs.ethers.org/v6/
Last updated