Documentation Index
Fetch the complete documentation index at: https://docs.decibel.trade/llms.txt
Use this file to discover all available pages before exploring further.
Function:
{package}::dex_accounts_entry::deposit_to_subaccount_at
ABI Object (deposit_to_subaccount_at):
const functionAbi: MoveFunction = {
name: "deposit_to_subaccount_at",
visibility: "private",
is_entry: true,
is_view: false,
generic_type_params: [],
params: [
"&signer",
"address",
"0x1::object::Object<0x1::fungible_asset::Metadata>",
"u64",
],
return: [],
};
Parameters:
signer - The account signer
subaccount_address - The Trading Account address to deposit to
asset_metadata - The fungible asset metadata (USDC)
amount - Amount in smallest unit (e.g., 1000000 = 1 USDC if 6 decimals)
Example:
const transaction = await aptos.transaction.build.simple({
sender: account.accountAddress,
data: {
function: `${PACKAGE}::dex_accounts_entry::deposit_to_subaccount_at`,
typeArguments: [],
functionArguments: [
"0x123...abc", // subaccountAddr
"0x456...def", // usdcAddress (USDC metadata object address)
1000000, // amount (1 USDC with 6 decimals)
],
},
});