Responsible for transaction construction, signing, and submission. Provides the flow from building Move scripts/entry functions to mempool submission.
- Purpose: Type definitions and module exports related to transactions
script_call: ScriptCall— compiled script bytecodemax_gas: u64— maximum gas amount
- Holds the sender address, private key, and chain ID
build_signed_tx(): Builds aSignedTransactionfrom the payload, sequence number, and gas settings
- Purpose: Transaction submission interface
- Direct submission to the internal mempool (submission to the node's internal mempool rather than through an external RPC)
- Purpose: Build payloads for Move entry function calls
- Purpose: Convert an entry function call into a
TransactionPayload - Logic:
- Convert the
FunctionArglist into a BCS-serialized byte array - Convert the
FunctionTypeTaglist into MoveTypeTags - Build
TransactionPayload::EntryFunction
- Convert the
- Purpose: Type conversion for Move function arguments
- Purpose: Convert each type (U8, U64, U128, Bool, Address, String, Vector) into transaction arguments
- Logic: Parse according to the type and map into the
TransactionArgumentenum
- Purpose: Generate a pair of a type tag and BCS-encoded value
- Logic: Use the Move type parser to generate a
TypeTagand byte array from a string
- Purpose: Build and deploy Move packages
- Purpose: Compile a Move package
- Logic:
- Validate the presence of
Move.toml - Configure build options (
compact/fat) - Run compilation with
BuiltPackage::build()
- Validate the presence of
- Purpose: Build a transaction payload for module publishing
- Logic: Combine compiled code and metadata with
code_publish_package_txn
- Purpose: Compile Move scripts and generate payloads
- Purpose: Extract script bytecode from a Move package
- Constraint: The package must contain exactly one script
- Purpose: Build a
Script-typeTransactionPayloadwith arguments and type parameters
- Purpose: Convert type parameters when invoking swap contracts
Coin(CoinId)-> StructTag for a coinCurveType(Option<CurveTypeTag>)-> Liquid stable/uncorrelated curve type
- Purpose: Convert from swap contract and AMM curve type to
CurveTypeTag - Logic: For the Liquid protocol only, return
LiquidStableorLiquidUncorrelated