pub enum ScriptFunctionCall {
Show 41 variants AccountCreateAccount { auth_key: AccountAddress, }, AccountRotateAuthenticationKey { new_auth_key: Vec<u8, Global>, }, AccountUtilsCreateAndFundAccount { account: AccountAddress, amount: u64, }, AptosGovernanceCreateProposal { stake_pool: AccountAddress, execution_hash: Vec<u8, Global>, }, AptosGovernanceVote { stake_pool: AccountAddress, proposal_id: u64, should_pass: bool, }, ReconfigurationForceReconfigure {}, ResourceAccountCreateResourceAccount { seed: Vec<u8, Global>, optional_auth_key: Vec<u8, Global>, }, StakeAddStake { amount: u64, }, StakeIncreaseLockup { new_locked_until_secs: u64, }, StakeJoinValidatorSet { pool_address: AccountAddress, }, StakeLeaveValidatorSet { pool_address: AccountAddress, }, StakeRegisterValidatorCandidate { consensus_pubkey: Vec<u8, Global>, proof_of_possession: Vec<u8, Global>, network_addresses: Vec<u8, Global>, fullnode_addresses: Vec<u8, Global>, }, StakeRotateConsensusKey { pool_address: AccountAddress, new_consensus_pubkey: Vec<u8, Global>, proof_of_possession: Vec<u8, Global>, }, StakeSetDelegatedVoter { new_delegated_voter: AccountAddress, }, StakeSetOperator { new_operator: AccountAddress, }, StakeUnlock { amount: u64, }, StakeUpdateNetworkAndFullnodeAddresses { pool_address: AccountAddress, new_network_addresses: Vec<u8, Global>, new_fullnode_addresses: Vec<u8, Global>, }, StakeWithdraw {}, AptosCoinClaimMintCapability {}, AptosCoinDelegateMintCapability { to: AccountAddress, }, AptosCoinMint { dst_addr: AccountAddress, amount: u64, }, TokenCreateLimitedCollectionScript { name: Vec<u8, Global>, description: Vec<u8, Global>, uri: Vec<u8, Global>, maximum: u64, }, TokenCreateLimitedTokenScript { collection: Vec<u8, Global>, name: Vec<u8, Global>, description: Vec<u8, Global>, monitor_supply: bool, initial_balance: u64, maximum: u64, uri: Vec<u8, Global>, royalty_points_per_million: u64, }, TokenCreateUnlimitedCollectionScript { name: Vec<u8, Global>, description: Vec<u8, Global>, uri: Vec<u8, Global>, }, TokenCreateUnlimitedTokenScript { collection: Vec<u8, Global>, name: Vec<u8, Global>, description: Vec<u8, Global>, monitor_supply: bool, initial_balance: u64, uri: Vec<u8, Global>, royalty_points_per_million: u64, }, TokenDirectTransferScript { creators_address: AccountAddress, collection: Vec<u8, Global>, name: Vec<u8, Global>, amount: u64, }, TokenInitializeTokenForId { creators_address: AccountAddress, collection: Vec<u8, Global>, name: Vec<u8, Global>, }, TokenInitializeTokenScript {}, TokenTransfersCancelOfferScript { receiver: AccountAddress, creator: AccountAddress, collection: Vec<u8, Global>, name: Vec<u8, Global>, }, TokenTransfersClaimScript { sender: AccountAddress, creator: AccountAddress, collection: Vec<u8, Global>, name: Vec<u8, Global>, }, TokenTransfersOfferScript { receiver: AccountAddress, creator: AccountAddress, collection: Vec<u8, Global>, name: Vec<u8, Global>, amount: u64, }, TransactionPublishingOptionSetModulePublishingAllowed { is_allowed: bool, }, VMConfigSetGasConstants { global_memory_per_byte_cost: u64, global_memory_per_byte_write_cost: u64, min_transaction_gas_units: u64, large_transaction_cutoff: u64, intrinsic_gas_per_byte: u64, maximum_number_of_gas_units: u64, min_price_per_gas_unit: u64, max_price_per_gas_unit: u64, max_transaction_size_in_bytes: u64, gas_unit_scaling_factor: u64, default_account_size: u64, }, ValidatorSetScriptAddValidator { _validator_addr: AccountAddress, }, ValidatorSetScriptCreateValidatorAccount { _new_account_address: AccountAddress, _human_name: Vec<u8, Global>, }, ValidatorSetScriptCreateValidatorOperatorAccount { _new_account_address: AccountAddress, _human_name: Vec<u8, Global>, }, ValidatorSetScriptRegisterValidatorConfig { _validator_address: AccountAddress, _consensus_pubkey: Vec<u8, Global>, _validator_network_addresses: Vec<u8, Global>, _fullnode_network_addresses: Vec<u8, Global>, }, ValidatorSetScriptRemoveValidator { _validator_addr: AccountAddress, }, ValidatorSetScriptSetValidatorConfigAndReconfigure { _validator_account: AccountAddress, _consensus_pubkey: Vec<u8, Global>, _validator_network_addresses: Vec<u8, Global>, _fullnode_network_addresses: Vec<u8, Global>, }, ValidatorSetScriptSetValidatorOperator { _operator_name: Vec<u8, Global>, _operator_account: AccountAddress, }, VersionSetVersion { major: u64, },
}
Expand description

Structured representation of a call into a known Move script function.

impl ScriptFunctionCall {
    pub fn encode(self) -> TransactionPayload { .. }
    pub fn decode(&TransactionPayload) -> Option<ScriptFunctionCall> { .. }
}

Variants

AccountCreateAccount

Fields

auth_key: AccountAddress

Basic account creation methods.

AccountRotateAuthenticationKey

Fields

new_auth_key: Vec<u8, Global>

AccountUtilsCreateAndFundAccount

Fields

account: AccountAddress
amount: u64

AptosGovernanceCreateProposal

Fields

stake_pool: AccountAddress
execution_hash: Vec<u8, Global>

Create a proposal with the backing stake_pool. @param execution_hash Required. This is the hash of the resolution script. When the proposal is resolved, only the exact script with matching hash can be successfully executed.

AptosGovernanceVote

Fields

stake_pool: AccountAddress
proposal_id: u64
should_pass: bool

Vote on proposal with proposal_id and voting power from stake_pool.

ReconfigurationForceReconfigure

Fields

Force an epoch change.

ResourceAccountCreateResourceAccount

Fields

seed: Vec<u8, Global>
optional_auth_key: Vec<u8, Global>

Creates a new resource account and rotates the authentication key to either the optional auth key if it is non-empty (though auth keys are 32-bytes) or the source accounts current auth key.

StakeAddStake

Fields

amount: u64

Add amount of coins from the account owning the StakePool.

StakeIncreaseLockup

Fields

new_locked_until_secs: u64

Similar to increase_lockup_with_cap but will use ownership capability from the signing account.

StakeJoinValidatorSet

Fields

pool_address: AccountAddress

This can only called by the operator of the validator/staking pool.

StakeLeaveValidatorSet

Fields

pool_address: AccountAddress

Request to have pool_address leave the validator set. The validator is only actually removed from the set when the next epoch starts. The last validator in the set cannot leave. This is an edge case that should never happen as long as the network is still operational.

Can only be called by the operator of the validator/staking pool.

StakeRegisterValidatorCandidate

Fields

consensus_pubkey: Vec<u8, Global>
proof_of_possession: Vec<u8, Global>
network_addresses: Vec<u8, Global>
fullnode_addresses: Vec<u8, Global>

Initialize the validator account and give ownership to the signing account.

StakeRotateConsensusKey

Fields

pool_address: AccountAddress
new_consensus_pubkey: Vec<u8, Global>
proof_of_possession: Vec<u8, Global>

Rotate the consensus key of the validator, it’ll take effect in next epoch.

StakeSetDelegatedVoter

Fields

new_delegated_voter: AccountAddress

Allows an owner to change the delegated voter of the stake pool.

StakeSetOperator

Fields

new_operator: AccountAddress

Allows an owner to change the operator of the stake pool.

StakeUnlock

Fields

amount: u64

Similar to unlock_with_cap but will use ownership capability from the signing account.

StakeUpdateNetworkAndFullnodeAddresses

Fields

pool_address: AccountAddress
new_network_addresses: Vec<u8, Global>
new_fullnode_addresses: Vec<u8, Global>

Update the network and full node addresses of the validator. This only takes effect in the next epoch.

StakeWithdraw

Fields

Withdraw from account’s inactive stake.

AptosCoinClaimMintCapability

Fields

Claim the delegated mint capability and destroy the delegated token.

AptosCoinDelegateMintCapability

Fields

Create delegated token for the address so the account could claim MintCapability later.

AptosCoinMint

Fields

dst_addr: AccountAddress
amount: u64

Create new test coins and deposit them into dst_addr’s account.

TokenCreateLimitedCollectionScript

Fields

name: Vec<u8, Global>
description: Vec<u8, Global>
uri: Vec<u8, Global>
maximum: u64

TokenCreateLimitedTokenScript

Fields

collection: Vec<u8, Global>
name: Vec<u8, Global>
description: Vec<u8, Global>
monitor_supply: bool
initial_balance: u64
maximum: u64
uri: Vec<u8, Global>
royalty_points_per_million: u64

TokenCreateUnlimitedCollectionScript

Fields

name: Vec<u8, Global>
description: Vec<u8, Global>
uri: Vec<u8, Global>

TokenCreateUnlimitedTokenScript

Fields

collection: Vec<u8, Global>
name: Vec<u8, Global>
description: Vec<u8, Global>
monitor_supply: bool
initial_balance: u64
uri: Vec<u8, Global>
royalty_points_per_million: u64

TokenDirectTransferScript

Fields

creators_address: AccountAddress
collection: Vec<u8, Global>
name: Vec<u8, Global>
amount: u64

TokenInitializeTokenForId

Fields

creators_address: AccountAddress
collection: Vec<u8, Global>
name: Vec<u8, Global>

TokenInitializeTokenScript

Fields

TokenTransfersCancelOfferScript

Fields

receiver: AccountAddress
creator: AccountAddress
collection: Vec<u8, Global>
name: Vec<u8, Global>

TokenTransfersClaimScript

Fields

creator: AccountAddress
collection: Vec<u8, Global>
name: Vec<u8, Global>

TokenTransfersOfferScript

Fields

receiver: AccountAddress
creator: AccountAddress
collection: Vec<u8, Global>
name: Vec<u8, Global>
amount: u64

TransactionPublishingOptionSetModulePublishingAllowed

Fields

is_allowed: bool

VMConfigSetGasConstants

Fields

global_memory_per_byte_cost: u64
global_memory_per_byte_write_cost: u64
min_transaction_gas_units: u64
large_transaction_cutoff: u64
intrinsic_gas_per_byte: u64
maximum_number_of_gas_units: u64
min_price_per_gas_unit: u64
max_price_per_gas_unit: u64
max_transaction_size_in_bytes: u64
gas_unit_scaling_factor: u64
default_account_size: u64

ValidatorSetScriptAddValidator

Fields

_validator_addr: AccountAddress

ValidatorSetScriptCreateValidatorAccount

Fields

_new_account_address: AccountAddress
_human_name: Vec<u8, Global>

ValidatorSetScriptCreateValidatorOperatorAccount

Fields

_new_account_address: AccountAddress
_human_name: Vec<u8, Global>

ValidatorSetScriptRegisterValidatorConfig

Fields

_validator_address: AccountAddress
_consensus_pubkey: Vec<u8, Global>
_validator_network_addresses: Vec<u8, Global>
_fullnode_network_addresses: Vec<u8, Global>

ValidatorSetScriptRemoveValidator

Fields

_validator_addr: AccountAddress

ValidatorSetScriptSetValidatorConfigAndReconfigure

Fields

_validator_account: AccountAddress
_consensus_pubkey: Vec<u8, Global>
_validator_network_addresses: Vec<u8, Global>
_fullnode_network_addresses: Vec<u8, Global>

ValidatorSetScriptSetValidatorOperator

Fields

_operator_name: Vec<u8, Global>
_operator_account: AccountAddress

VersionSetVersion

Fields

major: u64

Updates the major version to a larger version.

Implementations

Build an Aptos TransactionPayload from a structured object ScriptFunctionCall.

Try to recognize an Aptos TransactionPayload and convert it into a structured object ScriptFunctionCall.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more