Skip to main content

Module input

Module input 

Source
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§

functions
Common function IDs for convenience.
types
Common type tags for convenience.

Structs§

InputEntryFunctionData
A type-safe builder for entry function payloads.
InputEntryFunctionDataBuilder
Builder for InputEntryFunctionData.
MoveI128
An i128 value for Move arguments.
MoveI256
An i256 value for Move arguments.
MoveU256
A u256 value for Move arguments.

Traits§

IntoMoveArg
Trait for types that can be converted to entry function arguments.

Functions§

move_none
Helper to create an Option::None argument for Move.
move_some
Helper to create an Option::Some argument for Move.
move_string
Helper to create a string argument for Move functions.
move_vec
Helper to create a vector argument for Move functions.