Skip to main content
Function:
{package}::dex_accounts_entry::approve_max_builder_fee_for_subaccount
ABI Object:
const functionAbi: MoveFunction = {
  name: "approve_max_builder_fee_for_subaccount",
  visibility: "private",
  is_entry: true,
  is_view: false,
  generic_type_params: [],
  params: [
    "&signer",
    "0x1::object::Object<{package}::dex_accounts::Subaccount>",
    "address",
    "u64",
  ],
  return: [],
};
Parameters:
  • signer - The account signer
  • subaccount - The Trading Account object
  • builder_addr - The builder address
  • max_fee - Maximum fee in basis points (u64)
Example:
const transaction = await aptos.transaction.build.simple({
  sender: account.accountAddress,
  data: {
    function: `${PACKAGE}::dex_accounts_entry::approve_max_builder_fee_for_subaccount`,
    typeArguments: [],
    functionArguments: [
      "0x123...abc", // subaccountAddr
      "0xabc...123", // builderAddr (builder/referrer address)
      50, // maxFee (50 basis points = 0.5%)
    ],
  },
});