Simple Native ETH Transfer

This action performs a basic native currency (ETH) transfer. By setting isNativeTransfer: true, we indicate that this is a simple value transfer with no contract function call. Consequently, functionSignature must be an empty string and args must be an empty array. Setting populateCallValueDynamically: true ensures the entire ETH balance from the swap is sent to the specified target address.

Request Body

{
  "actions": [
    {
      "target": "0xA4d353BBc130cbeF1811f27ac70989F9d568CeAB",
      "functionSignature": "",
      "args": [],
      "value": "0",
      "isNativeTransfer": true,
      "populateCallValueDynamically": true
    }
  ]
}

Create swap approval transaction for ETH transfer

post

Use this endpoint to initiate a crosschain swap from Optimism to Ethereum with a dynamic ETH transfer. It validates balances, approvals, and prepares swap/bridge execution steps. If isNativeTransfer is true and populateCallValueDynamically is true, the value is determined dynamically at execution.

Query parameters
tradeTypestring · enumRequiredExample: exactInputPossible values:
amountstringRequiredExample: 1000000
inputTokenstringRequiredExample: 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85
outputTokenstringRequiredExample: 0x0000000000000000000000000000000000000000
originChainIdstringRequiredExample: 10
destinationChainIdstringRequiredExample: 42161
depositorstringRequiredExample: 0xA4d353BBc130cbeF1811f27ac70989F9d568CeAB
recipientstringRequiredExample: 0xA4d353BBc130cbeF1811f27ac70989F9d568CeAB
Body
Responses
200

Successful response with approval transaction details

application/json
Responseobject
post
/swap/approval

Last updated