Expand description
Type-safe entry function payload builders.
This module provides ergonomic builders for constructing entry function payloads with automatic BCS encoding of arguments.
§Overview
InputEntryFunctionData provides a builder pattern that:
- Accepts Rust types directly (no manual BCS encoding)
- Validates function IDs at construction
- Supports all Move types
§Example
ⓘ
use aptos_sdk::transaction::InputEntryFunctionData;
// Simple transfer
let payload = InputEntryFunctionData::new("0x1::aptos_account::transfer")
.arg(recipient_address)
.arg(1_000_000u64)
.build()?;
// Generic function with type args
let payload = InputEntryFunctionData::new("0x1::coin::transfer")
.type_arg("0x1::aptos_coin::AptosCoin")
.arg(recipient_address)
.arg(amount)
.build()?;Modules§
Structs§
- Input
Entry Function Data - A type-safe builder for entry function payloads.
- Input
Entry Function Data Builder - Builder for
InputEntryFunctionData. - Move
I128 - An i128 value for Move arguments.
- Move
I256 - An i256 value for Move arguments.
- Move
U256 - A u256 value for Move arguments.
Traits§
- Into
Move Arg - Trait for types that can be converted to entry function arguments.
Functions§
- move_
none - Helper to create an
Option::Noneargument for Move. - move_
some - Helper to create an
Option::Someargument for Move. - move_
string - Helper to create a string argument for Move functions.
- move_
vec - Helper to create a vector argument for Move functions.