API reference
Vaultody
POST
/vaults/{vaultId}/transaction-requests/contract-interaction
Create Tron Contract Interaction Transaction Request
Creates a contract interaction transaction request for TRC20 token operations on the Tron blockchain. Supports two methods — approve, which authorizes a fee-payer address to spend tokens on behalf of the holder, and transferFrom, which moves tokens from the holder to a recipient where the fee-payer covers the TRX gas cost.
Path parameters
vaultId
string
required
Sender's Vault ID.
Query parameters
context
string
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
Body parameters application/json
context
string
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
data
object
required
item
object
required
amount
string
e.g. 5
Required when method is transfer-from.
assetId
string
required
e.g. 6995822ce883e61317b3d6e8
TRC20 token Chain Asset ID. Native TRX is not allowed.
feePayer
string
required
e.g. TNVVnKu7aAt4zZ5LstHx3B7nfg6xtKggq9
Address paying the TRX energy/bandwidth fee. Must belong to the same vault and have positive TRX balance.
fromAddress
string
required
e.g. TZHvDmEiHBhKt4afaD77hGX38uKM4B8Uyq
Holder address (must belong to the vault). For approve it is the on-chain initiator; for transfer-from it is the token holder being debited.
maxFee
string
e.g. 3
Optional maximum TRX fee for the transaction.
method
string
required
e.g. transfer-from
Contract interaction method, approve = authorize feePayer to spend tokens on behalf of fromAddress (always uint256.max), transfer-from = feePayer moves tokens from fromAddress to toAddress (requires a prior approve).
approve
transfer-from
note
string
required
e.g. yourAdditionalInformationhere
Transaction note (max 250 characters).
toAddress
string
e.g. TRQMiKnp2WcJCVbeLwKAAvQAYizsYxpA1P
Required when method is transfer-from. Recipient of the tokens.
vaultAccountId
string
e.g. 6913471c6b2794841dc8fb81
Unique identifier of the Vault Account.
Response
Returns 201 the request has been successful.
apiVersion
string
required
Specifies the version of the API that incorporates this endpoint.
requestId
string
required
Defines the ID of the request. The `requestId` is generated by Vaultody and it's unique for every request.
context
string
In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.
data
object
required
item
object
required
amountUnit
string
required
Token symbol
assetId
string
required
Chain Asset ID of the TRC20 token.
contractInteractionData
object
required
Contract interaction details.
contractAddress
string
required
TRC20 token contract address.
feePayer
string
required
Address paying the TRX gas fee.
maxFee
string
Maximum fee for the transaction.
method
string
required
Method invoked on the contract.
approve
transfer-from
note
string
required
Transaction note with additional details.
recipients
object[]
required
For approve: a single entry pointing at the token contract address with amount=0. For transfer-from: a single entry with the recipient address and token amount.
address
string
required
Destination address (token contract for approve; recipient for transfer-from)
amount
string
required
Defines the amount sent to the destination address (when method is approve amount is 0 ).
amountUnit
string
required
Token symbol.
convertedAmountToUSD
string
required
Amount calculated in USD.
senders
object
required
Source of the transaction (the token holder address).
address
string
required
Sender's address.
totalTransactionAmount
string
required
Token amount of the transaction (0 for approve).
transactionRequestId
string
required
Represents a unique identifier of the transaction request.
transactionRequestStatus
string
required
Defines the status of the transaction, e.g. "created".
created
await-approval
pending
prepared
signed
broadcasted
success
failed
rejected
mined
mined-with-errors
await-approval-l2
+1