get_build_tx

Build tx

post

Build the transaction body ready for send

Body
channelintegerOptionalExample: 910325
from_addressstringRequiredExample: 0xa5E56D455BF247C475D752721Ba35A0c85Df81Dc
from_chain_namestringRequiredExample: BaseMainnet
to_addressstringRequiredExample: 0xa5E56D455BF247C475D752721Ba35A0c85Df81Dc
to_chain_namestringRequiredExample: ScrollMainnet
token_namestringRequiredExample: USDC
ui_valuestringRequiredExample: 1.2
value_include_gas_feebooleanOptional

if this value is true, the gas fee will be taken within the ui_value, if this value is false, the returned transaction body will add an extra value to ui_value for gas fee.

Responses
0
Successful response
application/json
Responseall of
post
POST /get_build_tx HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 267

{
  "channel": 910325,
  "from_address": "0xa5E56D455BF247C475D752721Ba35A0c85Df81Dc",
  "from_chain_name": "BaseMainnet",
  "to_address": "0xa5E56D455BF247C475D752721Ba35A0c85Df81Dc",
  "to_chain_name": "ScrollMainnet",
  "token_name": "USDC",
  "ui_value": "1.2",
  "value_include_gas_fee": false
}
{
  "data": {
    "bridge_fee": {
      "decimals": 18,
      "raw_value": "1000000",
      "ui_value": "1.2"
    },
    "from_chain_name": "BaseMainnet",
    "gas_fee": {
      "decimals": 18,
      "raw_value": "1000000",
      "ui_value": "1.2"
    },
    "input_value": {
      "decimals": 18,
      "raw_value": "1000000",
      "ui_value": "1.2"
    },
    "max_value": {
      "decimals": 18,
      "raw_value": "1000000",
      "ui_value": "1.2"
    },
    "min_value": {
      "decimals": 18,
      "raw_value": "1000000",
      "ui_value": "1.2"
    },
    "network_type": 1,
    "receive_value": {
      "decimals": 18,
      "raw_value": "1000000",
      "ui_value": "1.2"
    },
    "send_value": {
      "decimals": 18,
      "raw_value": "1000000",
      "ui_value": "1.2"
    },
    "to_chain_name": "ScrollMainnet",
    "token_name": "USDC",
    "txs": {}
  },
  "status": {
    "code": 1,
    "message": "text"
  }
}

Last updated

Was this helpful?