Asset Transfer

The following guide shows how to initiate a transfer of USDC on Sepolia Testnet based on Utila asset types.

1. Select Asset

  • USDC contract address (Sepolia):
 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238
  • Sepolia network_id:
"networks/ethereum-testnet-sepolia"

Therefore the asset is defined as:

asset: "assets/erc20.networks/ethereum-testnet-sepolia.0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"

2. Select Amount

amount: "1.3"

3. Select Source/Destination

Utila supports few types of source/destination definitions:

A raw string address, a wallet containing the asset ( vaults/{vault_id}/wallets/{wallet_id})
or a specific wallet address containing the asset: vaults/{vault_id}/wallets/{wallet_id}/addresses/{address_id}.

For simplicity, we will use the raw address form:

source: "0xB70e07bAc842d9547C1d56AB7eF5e27021024f23"
destination: "0x9e21BF0F214cD33b2DC3Bfd49301E86d62b564Dc"

Optional params:

payFeeFromAmount (EVM-only) allows gas fees to be paid from transfer amount:

"payFeeFromAmount": false

add an on-chain memo:

"memo": "my first transfer"

Finally, the API call will be:

curl --request POST \
     --url https://api.utila.io/v2/vaults/19e826e48ef4/transactions:initiate \
     --header 'accept: application/json' \
     --header 'authorization: Bearer "YOUR_BEARER_TOKEN"
     --header 'content-type: application/json' \
     --data '
{
  "details": {
    "assetTransfer": {
      "asset": "assets/erc20.ethereum-testnet-sepolia.0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
      "amount": "1.3",
      "source": "0xB70e07bAc842d9547C1d56AB7eF5e27021024f23",
      "destination": "0x9e21BF0F214cD33b2DC3Bfd49301E86d62b564Dc",
      "payFeeFromAmount": false,
      "memo": "my first transfer"
    }
  }
}
'

Expected Response:

{
  "transaction": {
    "name": "vaults/19e826e48ef4/transactions/90151924a6c7",
    "type": "TRANSACTION",
    "subType": "TOKEN_TRANSFER",
    "state": "AWAITING_POLICY_CHECK",
    "note": "",
    "network": "networks/ethereum-testnet-sepolia",
    "request": {
      "initiator": "users/34e9eedd2b3e",
      "sourceWallet": "vaults/19e826e48ef4/wallets/369806e309a2"
    },
    "signingSession": "",
    "transfers": [
      {
        "amount": "1.3",
        "asset": "assets/erc20.ethereum-testnet-sepolia.0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
        "sourceAddress": {
          "value": "0xB70e07bAc842d9547C1d56AB7eF5e27021024f23"
        },
        "destinationAddress": {
          "value": "0x9e21BF0F214cD33b2DC3Bfd49301E86d62b564Dc"
        }
      }
    ],
    "tokenAllowances": [],
    "designatedSigners": [],
    "evmTransaction": {
      "fromAddress": {
        "value": "0xB70e07bAc842d9547C1d56AB7eF5e27021024f23"
      },
      "toAddress": {
        "value": "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238"
      },
      "value": "0",
      "data": "0xa9059cbb0000000000000000000000009e21bf0f214cd33b2dc3bfd49301e86d62b564dc000000000000000000000000000000000000000000000000000000000013d620",
      "fee": {
        "gasLimit": "45439",
        "maxPriorityFeePerGas": "2625507",
        "maxFeePerGas": "30501983307",
        "gasUsed": ""
      }
    },
    "createTime": "2025-03-13T13:31:05.281801602Z"
  },
  "referencedResources": {},
  "referencedAddressesInfo": {}
}