类 Helpers
java.lang.Object
org.starcoin.stdlib.Helpers
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static ScriptCalldecode_script(Script script)Try to recognize a DiemScriptand convert it into a structured valueScriptCall.static ScriptFunctionCallTry to recognize a DiemTransactionPayloadand convert it into a structured valueScriptFunctionCall.static TransactionPayloadencode_accept_token_script_function(TypeTag token_type)static TransactionPayloadstatic TransactionPayloadencode_cast_vote_script_function(TypeTag token, TypeTag action_t, AccountAddress proposer_address, Long proposal_id, Boolean agree, BigInteger votes)static TransactionPayloadencode_convert_TwoPhaseUpgrade_to_TwoPhaseUpgradeV2_script_function(AccountAddress package_address)static TransactionPayloadencode_create_account_with_initial_amount_script_function(TypeTag token_type, AccountAddress fresh_address, Bytes _auth_key, BigInteger initial_amount)static TransactionPayloadencode_create_account_with_initial_amount_v2_script_function(TypeTag token_type, AccountAddress fresh_address, BigInteger initial_amount)static TransactionPayloadencode_destroy_terminated_proposal_script_function(TypeTag token_t, TypeTag action_t, AccountAddress proposer_address, Long proposal_id)remove terminated proposal from proposerstatic TransactionPayloadstatic TransactionPayloadencode_execute_on_chain_config_proposal_script_function(TypeTag config_t, Long proposal_id)static TransactionPayloadencode_execute_script_function(TypeTag token_t, AccountAddress proposer_address, Long proposal_id)Once the proposal is agreed, anyone can call the method to make the proposal happen.static TransactionPayloadencode_execute_withdraw_proposal_script_function(TypeTag token_t, AccountAddress proposer_address, Long proposal_id)static TransactionPayloadencode_initialize_script_function(Long stdlib_version, Long reward_delay, BigInteger pre_mine_stc_amount, BigInteger time_mint_stc_amount, Long time_mint_stc_period, Bytes parent_hash, Bytes association_auth_key, Bytes genesis_auth_key, Byte chain_id, Long genesis_timestamp, Long uncle_rate_target, Long epoch_block_count, Long base_block_time_target, Long base_block_difficulty_window, BigInteger base_reward_per_block, Long base_reward_per_uncle_percent, Long min_block_time_target, Long max_block_time_target, Long base_max_uncles_per_block, Long base_block_gas_limit, Byte strategy, Boolean script_allowed, Boolean module_publishing_allowed, Bytes instruction_schedule, Bytes native_schedule, Long global_memory_per_byte_cost, Long global_memory_per_byte_write_cost, Long min_transaction_gas_units, Long large_transaction_cutoff, Long instrinsic_gas_per_byte, Long maximum_number_of_gas_units, Long min_price_per_gas_unit, Long max_price_per_gas_unit, Long max_transaction_size_in_bytes, Long gas_unit_scaling_factor, Long default_account_size, Long voting_delay, Long voting_period, Byte voting_quorum_rate, Long min_action_delay, Long transaction_timeout)static TransactionPayloadencode_initialize_v2_script_function(Long stdlib_version, Long reward_delay, BigInteger total_stc_amount, BigInteger pre_mine_stc_amount, BigInteger time_mint_stc_amount, Long time_mint_stc_period, Bytes parent_hash, Bytes association_auth_key, Bytes genesis_auth_key, Byte chain_id, Long genesis_timestamp, Long uncle_rate_target, Long epoch_block_count, Long base_block_time_target, Long base_block_difficulty_window, BigInteger base_reward_per_block, Long base_reward_per_uncle_percent, Long min_block_time_target, Long max_block_time_target, Long base_max_uncles_per_block, Long base_block_gas_limit, Byte strategy, Boolean script_allowed, Boolean module_publishing_allowed, Bytes instruction_schedule, Bytes native_schedule, Long global_memory_per_byte_cost, Long global_memory_per_byte_write_cost, Long min_transaction_gas_units, Long large_transaction_cutoff, Long instrinsic_gas_per_byte, Long maximum_number_of_gas_units, Long min_price_per_gas_unit, Long max_price_per_gas_unit, Long max_transaction_size_in_bytes, Long gas_unit_scaling_factor, Long default_account_size, Long voting_delay, Long voting_period, Byte voting_quorum_rate, Long min_action_delay, Long transaction_timeout)static TransactionPayloadencode_peer_to_peer_batch_script_function(TypeTag token_type, Bytes _payeees, Bytes _payee_auth_keys, BigInteger _amount)static TransactionPayloadencode_peer_to_peer_script_function(TypeTag token_type, AccountAddress payee, Bytes _payee_auth_key, BigInteger amount)static TransactionPayloadencode_peer_to_peer_v2_script_function(TypeTag token_type, AccountAddress payee, BigInteger amount)static TransactionPayloadencode_peer_to_peer_with_metadata_script_function(TypeTag token_type, AccountAddress payee, Bytes _payee_auth_key, BigInteger amount, Bytes metadata)static TransactionPayloadencode_peer_to_peer_with_metadata_v2_script_function(TypeTag token_type, AccountAddress payee, BigInteger amount, Bytes metadata)static TransactionPayloadencode_propose_module_upgrade_v2_script_function(TypeTag token, AccountAddress module_address, Bytes package_hash, Long version, Long exec_delay, Boolean enforced)static TransactionPayloadencode_propose_script_function(TypeTag token_t, Long voting_delay, Long voting_period, Byte voting_quorum_rate, Long min_action_delay, Long exec_delay)Entrypoint for the proposal.static TransactionPayloadencode_propose_update_consensus_config_script_function(Long uncle_rate_target, Long base_block_time_target, BigInteger base_reward_per_block, Long base_reward_per_uncle_percent, Long epoch_block_count, Long base_block_difficulty_window, Long min_block_time_target, Long max_block_time_target, Long base_max_uncles_per_block, Long base_block_gas_limit, Byte strategy, Long exec_delay)static TransactionPayloadencode_propose_update_reward_config_script_function(Long reward_delay, Long exec_delay)static TransactionPayloadencode_propose_update_txn_publish_option_script_function(Boolean script_allowed, Boolean module_publishing_allowed, Long exec_delay)static TransactionPayloadencode_propose_update_txn_timeout_config_script_function(Long duration_seconds, Long exec_delay)static TransactionPayloadencode_propose_update_vm_config_script_function(Bytes instruction_schedule, Bytes native_schedule, Long global_memory_per_byte_cost, Long global_memory_per_byte_write_cost, Long min_transaction_gas_units, Long large_transaction_cutoff, Long instrinsic_gas_per_byte, Long maximum_number_of_gas_units, Long min_price_per_gas_unit, Long max_price_per_gas_unit, Long max_transaction_size_in_bytes, Long gas_unit_scaling_factor, Long default_account_size, Long exec_delay)static TransactionPayloadencode_propose_withdraw_script_function(TypeTag token_t, AccountAddress receiver, BigInteger amount, Long period, Long exec_delay)static TransactionPayloadencode_queue_proposal_action_script_function(TypeTag token_t, TypeTag action_t, AccountAddress proposer_address, Long proposal_id)queue agreed proposal to execute.static TransactionPayloadencode_revoke_vote_script_function(TypeTag token, TypeTag action, AccountAddress proposer_address, Long proposal_id)static TransactionPayloadstatic Scriptencode_script(ScriptCall call)Build a DiemScriptfrom a structured valueScriptCall.static TransactionPayloadBuild a DiemTransactionPayloadfrom a structured valueScriptFunctionCall.static TransactionPayloadencode_submit_module_upgrade_plan_script_function(TypeTag token, AccountAddress proposer_address, Long proposal_id)static TransactionPayloadassociation account should call this script after upgrade from v2 to v3.static TransactionPayloadencode_take_offer_script_function(TypeTag offered, AccountAddress offer_address)Take Offer and put to signer's Collection<Offered>.static TransactionPayloadencode_unstake_vote_script_function(TypeTag token, TypeTag action, AccountAddress proposer_address, Long proposal_id)static TransactionPayloadstatic TransactionPayloadencode_upgrade_from_v2_to_v3_script_function(BigInteger total_stc_amount)Stdlib upgrade script from v2 to v3static TransactionPayloadencode_withdraw_and_split_lt_withdraw_cap_script_function(TypeTag token_t, AccountAddress for_address, BigInteger amount, Long lock_period)static TransactionPayload
-
构造器详细资料
-
Helpers
public Helpers()
-
-
方法详细资料
-
encode_script
Build a DiemScriptfrom a structured valueScriptCall.- 参数:
call-ScriptCallvalue to encode.- 返回:
- Encoded script.
-
encode_script_function
Build a DiemTransactionPayloadfrom a structured valueScriptFunctionCall.- 参数:
call-ScriptFunctionCallvalue to encode.- 返回:
- Encoded TransactionPayload.
-
decode_script
public static ScriptCall decode_script(Script script) throws IllegalArgumentException, IndexOutOfBoundsExceptionTry to recognize a DiemScriptand convert it into a structured valueScriptCall.- 参数:
script-Scriptvalues to decode.- 返回:
- Decoded
ScriptCallvalue. - 抛出:
IllegalArgumentExceptionIndexOutOfBoundsException
-
decode_script_function_payload
public static ScriptFunctionCall decode_script_function_payload(TransactionPayload payload) throws DeserializationError, IllegalArgumentException, IndexOutOfBoundsExceptionTry to recognize a DiemTransactionPayloadand convert it into a structured valueScriptFunctionCall.- 参数:
payload-TransactionPayloadvalues to decode.- 返回:
- Decoded
ScriptFunctionCallvalue. - 抛出:
DeserializationErrorIllegalArgumentExceptionIndexOutOfBoundsException
-
encode_accept_token_script_function
- 参数:
token_type-TypeTagvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_cancel_upgrade_plan_script_function
- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_cast_vote_script_function
public static TransactionPayload encode_cast_vote_script_function(TypeTag token, TypeTag action_t, AccountAddress proposer_address, Long proposal_id, Boolean agree, BigInteger votes)- 参数:
token-TypeTagvalueaction_t-TypeTagvalueproposer_address-AccountAddressvalueproposal_id-@Unsigned Longvalueagree-Booleanvaluevotes-@Unsigned @Int128 BigIntegervalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_convert_TwoPhaseUpgrade_to_TwoPhaseUpgradeV2_script_function
public static TransactionPayload encode_convert_TwoPhaseUpgrade_to_TwoPhaseUpgradeV2_script_function(AccountAddress package_address)- 参数:
package_address-AccountAddressvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_create_account_with_initial_amount_script_function
public static TransactionPayload encode_create_account_with_initial_amount_script_function(TypeTag token_type, AccountAddress fresh_address, Bytes _auth_key, BigInteger initial_amount)- 参数:
token_type-TypeTagvaluefresh_address-AccountAddressvalue_auth_key-Bytesvalueinitial_amount-@Unsigned @Int128 BigIntegervalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_create_account_with_initial_amount_v2_script_function
public static TransactionPayload encode_create_account_with_initial_amount_v2_script_function(TypeTag token_type, AccountAddress fresh_address, BigInteger initial_amount)- 参数:
token_type-TypeTagvaluefresh_address-AccountAddressvalueinitial_amount-@Unsigned @Int128 BigIntegervalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_destroy_terminated_proposal_script_function
public static TransactionPayload encode_destroy_terminated_proposal_script_function(TypeTag token_t, TypeTag action_t, AccountAddress proposer_address, Long proposal_id)remove terminated proposal from proposer- 参数:
token_t-TypeTagvalueaction_t-TypeTagvalueproposer_address-AccountAddressvalueproposal_id-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_empty_script_script_function
- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_execute_script_function
public static TransactionPayload encode_execute_script_function(TypeTag token_t, AccountAddress proposer_address, Long proposal_id)Once the proposal is agreed, anyone can call the method to make the proposal happen.- 参数:
token_t-TypeTagvalueproposer_address-AccountAddressvalueproposal_id-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_execute_on_chain_config_proposal_script_function
public static TransactionPayload encode_execute_on_chain_config_proposal_script_function(TypeTag config_t, Long proposal_id)- 参数:
config_t-TypeTagvalueproposal_id-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_execute_withdraw_proposal_script_function
public static TransactionPayload encode_execute_withdraw_proposal_script_function(TypeTag token_t, AccountAddress proposer_address, Long proposal_id)- 参数:
token_t-TypeTagvalueproposer_address-AccountAddressvalueproposal_id-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_initialize_script_function
public static TransactionPayload encode_initialize_script_function(Long stdlib_version, Long reward_delay, BigInteger pre_mine_stc_amount, BigInteger time_mint_stc_amount, Long time_mint_stc_period, Bytes parent_hash, Bytes association_auth_key, Bytes genesis_auth_key, Byte chain_id, Long genesis_timestamp, Long uncle_rate_target, Long epoch_block_count, Long base_block_time_target, Long base_block_difficulty_window, BigInteger base_reward_per_block, Long base_reward_per_uncle_percent, Long min_block_time_target, Long max_block_time_target, Long base_max_uncles_per_block, Long base_block_gas_limit, Byte strategy, Boolean script_allowed, Boolean module_publishing_allowed, Bytes instruction_schedule, Bytes native_schedule, Long global_memory_per_byte_cost, Long global_memory_per_byte_write_cost, Long min_transaction_gas_units, Long large_transaction_cutoff, Long instrinsic_gas_per_byte, Long maximum_number_of_gas_units, Long min_price_per_gas_unit, Long max_price_per_gas_unit, Long max_transaction_size_in_bytes, Long gas_unit_scaling_factor, Long default_account_size, Long voting_delay, Long voting_period, Byte voting_quorum_rate, Long min_action_delay, Long transaction_timeout)- 参数:
stdlib_version-@Unsigned Longvaluereward_delay-@Unsigned Longvaluepre_mine_stc_amount-@Unsigned @Int128 BigIntegervaluetime_mint_stc_amount-@Unsigned @Int128 BigIntegervaluetime_mint_stc_period-@Unsigned Longvalueparent_hash-Bytesvalueassociation_auth_key-Bytesvaluegenesis_auth_key-Bytesvaluechain_id-@Unsigned Bytevaluegenesis_timestamp-@Unsigned Longvalueuncle_rate_target-@Unsigned Longvalueepoch_block_count-@Unsigned Longvaluebase_block_time_target-@Unsigned Longvaluebase_block_difficulty_window-@Unsigned Longvaluebase_reward_per_block-@Unsigned @Int128 BigIntegervaluebase_reward_per_uncle_percent-@Unsigned Longvaluemin_block_time_target-@Unsigned Longvaluemax_block_time_target-@Unsigned Longvaluebase_max_uncles_per_block-@Unsigned Longvaluebase_block_gas_limit-@Unsigned Longvaluestrategy-@Unsigned Bytevaluescript_allowed-Booleanvaluemodule_publishing_allowed-Booleanvalueinstruction_schedule-Bytesvaluenative_schedule-Bytesvalueglobal_memory_per_byte_cost-@Unsigned Longvalueglobal_memory_per_byte_write_cost-@Unsigned Longvaluemin_transaction_gas_units-@Unsigned Longvaluelarge_transaction_cutoff-@Unsigned Longvalueinstrinsic_gas_per_byte-@Unsigned Longvaluemaximum_number_of_gas_units-@Unsigned Longvaluemin_price_per_gas_unit-@Unsigned Longvaluemax_price_per_gas_unit-@Unsigned Longvaluemax_transaction_size_in_bytes-@Unsigned Longvaluegas_unit_scaling_factor-@Unsigned Longvaluedefault_account_size-@Unsigned Longvaluevoting_delay-@Unsigned Longvaluevoting_period-@Unsigned Longvaluevoting_quorum_rate-@Unsigned Bytevaluemin_action_delay-@Unsigned Longvaluetransaction_timeout-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_initialize_v2_script_function
public static TransactionPayload encode_initialize_v2_script_function(Long stdlib_version, Long reward_delay, BigInteger total_stc_amount, BigInteger pre_mine_stc_amount, BigInteger time_mint_stc_amount, Long time_mint_stc_period, Bytes parent_hash, Bytes association_auth_key, Bytes genesis_auth_key, Byte chain_id, Long genesis_timestamp, Long uncle_rate_target, Long epoch_block_count, Long base_block_time_target, Long base_block_difficulty_window, BigInteger base_reward_per_block, Long base_reward_per_uncle_percent, Long min_block_time_target, Long max_block_time_target, Long base_max_uncles_per_block, Long base_block_gas_limit, Byte strategy, Boolean script_allowed, Boolean module_publishing_allowed, Bytes instruction_schedule, Bytes native_schedule, Long global_memory_per_byte_cost, Long global_memory_per_byte_write_cost, Long min_transaction_gas_units, Long large_transaction_cutoff, Long instrinsic_gas_per_byte, Long maximum_number_of_gas_units, Long min_price_per_gas_unit, Long max_price_per_gas_unit, Long max_transaction_size_in_bytes, Long gas_unit_scaling_factor, Long default_account_size, Long voting_delay, Long voting_period, Byte voting_quorum_rate, Long min_action_delay, Long transaction_timeout)- 参数:
stdlib_version-@Unsigned Longvaluereward_delay-@Unsigned Longvaluetotal_stc_amount-@Unsigned @Int128 BigIntegervaluepre_mine_stc_amount-@Unsigned @Int128 BigIntegervaluetime_mint_stc_amount-@Unsigned @Int128 BigIntegervaluetime_mint_stc_period-@Unsigned Longvalueparent_hash-Bytesvalueassociation_auth_key-Bytesvaluegenesis_auth_key-Bytesvaluechain_id-@Unsigned Bytevaluegenesis_timestamp-@Unsigned Longvalueuncle_rate_target-@Unsigned Longvalueepoch_block_count-@Unsigned Longvaluebase_block_time_target-@Unsigned Longvaluebase_block_difficulty_window-@Unsigned Longvaluebase_reward_per_block-@Unsigned @Int128 BigIntegervaluebase_reward_per_uncle_percent-@Unsigned Longvaluemin_block_time_target-@Unsigned Longvaluemax_block_time_target-@Unsigned Longvaluebase_max_uncles_per_block-@Unsigned Longvaluebase_block_gas_limit-@Unsigned Longvaluestrategy-@Unsigned Bytevaluescript_allowed-Booleanvaluemodule_publishing_allowed-Booleanvalueinstruction_schedule-Bytesvaluenative_schedule-Bytesvalueglobal_memory_per_byte_cost-@Unsigned Longvalueglobal_memory_per_byte_write_cost-@Unsigned Longvaluemin_transaction_gas_units-@Unsigned Longvaluelarge_transaction_cutoff-@Unsigned Longvalueinstrinsic_gas_per_byte-@Unsigned Longvaluemaximum_number_of_gas_units-@Unsigned Longvaluemin_price_per_gas_unit-@Unsigned Longvaluemax_price_per_gas_unit-@Unsigned Longvaluemax_transaction_size_in_bytes-@Unsigned Longvaluegas_unit_scaling_factor-@Unsigned Longvaluedefault_account_size-@Unsigned Longvaluevoting_delay-@Unsigned Longvaluevoting_period-@Unsigned Longvaluevoting_quorum_rate-@Unsigned Bytevaluemin_action_delay-@Unsigned Longvaluetransaction_timeout-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_peer_to_peer_script_function
public static TransactionPayload encode_peer_to_peer_script_function(TypeTag token_type, AccountAddress payee, Bytes _payee_auth_key, BigInteger amount)- 参数:
token_type-TypeTagvaluepayee-AccountAddressvalue_payee_auth_key-Bytesvalueamount-@Unsigned @Int128 BigIntegervalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_peer_to_peer_batch_script_function
public static TransactionPayload encode_peer_to_peer_batch_script_function(TypeTag token_type, Bytes _payeees, Bytes _payee_auth_keys, BigInteger _amount)- 参数:
token_type-TypeTagvalue_payeees-Bytesvalue_payee_auth_keys-Bytesvalue_amount-@Unsigned @Int128 BigIntegervalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_peer_to_peer_v2_script_function
public static TransactionPayload encode_peer_to_peer_v2_script_function(TypeTag token_type, AccountAddress payee, BigInteger amount)- 参数:
token_type-TypeTagvaluepayee-AccountAddressvalueamount-@Unsigned @Int128 BigIntegervalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_peer_to_peer_with_metadata_script_function
public static TransactionPayload encode_peer_to_peer_with_metadata_script_function(TypeTag token_type, AccountAddress payee, Bytes _payee_auth_key, BigInteger amount, Bytes metadata)- 参数:
token_type-TypeTagvaluepayee-AccountAddressvalue_payee_auth_key-Bytesvalueamount-@Unsigned @Int128 BigIntegervaluemetadata-Bytesvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_peer_to_peer_with_metadata_v2_script_function
public static TransactionPayload encode_peer_to_peer_with_metadata_v2_script_function(TypeTag token_type, AccountAddress payee, BigInteger amount, Bytes metadata)- 参数:
token_type-TypeTagvaluepayee-AccountAddressvalueamount-@Unsigned @Int128 BigIntegervaluemetadata-Bytesvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_propose_script_function
public static TransactionPayload encode_propose_script_function(TypeTag token_t, Long voting_delay, Long voting_period, Byte voting_quorum_rate, Long min_action_delay, Long exec_delay)Entrypoint for the proposal.- 参数:
token_t-TypeTagvaluevoting_delay-@Unsigned Longvaluevoting_period-@Unsigned Longvaluevoting_quorum_rate-@Unsigned Bytevaluemin_action_delay-@Unsigned Longvalueexec_delay-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_propose_module_upgrade_v2_script_function
public static TransactionPayload encode_propose_module_upgrade_v2_script_function(TypeTag token, AccountAddress module_address, Bytes package_hash, Long version, Long exec_delay, Boolean enforced)- 参数:
token-TypeTagvaluemodule_address-AccountAddressvaluepackage_hash-Bytesvalueversion-@Unsigned Longvalueexec_delay-@Unsigned Longvalueenforced-Booleanvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_propose_update_consensus_config_script_function
public static TransactionPayload encode_propose_update_consensus_config_script_function(Long uncle_rate_target, Long base_block_time_target, BigInteger base_reward_per_block, Long base_reward_per_uncle_percent, Long epoch_block_count, Long base_block_difficulty_window, Long min_block_time_target, Long max_block_time_target, Long base_max_uncles_per_block, Long base_block_gas_limit, Byte strategy, Long exec_delay)- 参数:
uncle_rate_target-@Unsigned Longvaluebase_block_time_target-@Unsigned Longvaluebase_reward_per_block-@Unsigned @Int128 BigIntegervaluebase_reward_per_uncle_percent-@Unsigned Longvalueepoch_block_count-@Unsigned Longvaluebase_block_difficulty_window-@Unsigned Longvaluemin_block_time_target-@Unsigned Longvaluemax_block_time_target-@Unsigned Longvaluebase_max_uncles_per_block-@Unsigned Longvaluebase_block_gas_limit-@Unsigned Longvaluestrategy-@Unsigned Bytevalueexec_delay-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_propose_update_reward_config_script_function
public static TransactionPayload encode_propose_update_reward_config_script_function(Long reward_delay, Long exec_delay)- 参数:
reward_delay-@Unsigned Longvalueexec_delay-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_propose_update_txn_publish_option_script_function
public static TransactionPayload encode_propose_update_txn_publish_option_script_function(Boolean script_allowed, Boolean module_publishing_allowed, Long exec_delay)- 参数:
script_allowed-Booleanvaluemodule_publishing_allowed-Booleanvalueexec_delay-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_propose_update_txn_timeout_config_script_function
public static TransactionPayload encode_propose_update_txn_timeout_config_script_function(Long duration_seconds, Long exec_delay)- 参数:
duration_seconds-@Unsigned Longvalueexec_delay-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_propose_update_vm_config_script_function
public static TransactionPayload encode_propose_update_vm_config_script_function(Bytes instruction_schedule, Bytes native_schedule, Long global_memory_per_byte_cost, Long global_memory_per_byte_write_cost, Long min_transaction_gas_units, Long large_transaction_cutoff, Long instrinsic_gas_per_byte, Long maximum_number_of_gas_units, Long min_price_per_gas_unit, Long max_price_per_gas_unit, Long max_transaction_size_in_bytes, Long gas_unit_scaling_factor, Long default_account_size, Long exec_delay)- 参数:
instruction_schedule-Bytesvaluenative_schedule-Bytesvalueglobal_memory_per_byte_cost-@Unsigned Longvalueglobal_memory_per_byte_write_cost-@Unsigned Longvaluemin_transaction_gas_units-@Unsigned Longvaluelarge_transaction_cutoff-@Unsigned Longvalueinstrinsic_gas_per_byte-@Unsigned Longvaluemaximum_number_of_gas_units-@Unsigned Longvaluemin_price_per_gas_unit-@Unsigned Longvaluemax_price_per_gas_unit-@Unsigned Longvaluemax_transaction_size_in_bytes-@Unsigned Longvaluegas_unit_scaling_factor-@Unsigned Longvaluedefault_account_size-@Unsigned Longvalueexec_delay-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_propose_withdraw_script_function
public static TransactionPayload encode_propose_withdraw_script_function(TypeTag token_t, AccountAddress receiver, BigInteger amount, Long period, Long exec_delay)- 参数:
token_t-TypeTagvaluereceiver-AccountAddressvalueamount-@Unsigned @Int128 BigIntegervalueperiod-@Unsigned Longvalueexec_delay-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_queue_proposal_action_script_function
public static TransactionPayload encode_queue_proposal_action_script_function(TypeTag token_t, TypeTag action_t, AccountAddress proposer_address, Long proposal_id)queue agreed proposal to execute.- 参数:
token_t-TypeTagvalueaction_t-TypeTagvalueproposer_address-AccountAddressvalueproposal_id-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_revoke_vote_script_function
public static TransactionPayload encode_revoke_vote_script_function(TypeTag token, TypeTag action, AccountAddress proposer_address, Long proposal_id)- 参数:
token-TypeTagvalueaction-TypeTagvalueproposer_address-AccountAddressvalueproposal_id-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_rotate_authentication_key_script_function
- 参数:
new_key-Bytesvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_submit_module_upgrade_plan_script_function
public static TransactionPayload encode_submit_module_upgrade_plan_script_function(TypeTag token, AccountAddress proposer_address, Long proposal_id)- 参数:
token-TypeTagvalueproposer_address-AccountAddressvalueproposal_id-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_take_linear_withdraw_capability_script_function
association account should call this script after upgrade from v2 to v3.- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_take_offer_script_function
public static TransactionPayload encode_take_offer_script_function(TypeTag offered, AccountAddress offer_address)Take Offer and put to signer's Collection<Offered>.- 参数:
offered-TypeTagvalueoffer_address-AccountAddressvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_unstake_vote_script_function
public static TransactionPayload encode_unstake_vote_script_function(TypeTag token, TypeTag action, AccountAddress proposer_address, Long proposal_id)- 参数:
token-TypeTagvalueaction-TypeTagvalueproposer_address-AccountAddressvalueproposal_id-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_update_module_upgrade_strategy_script_function
public static TransactionPayload encode_update_module_upgrade_strategy_script_function(Byte strategy)- 参数:
strategy-@Unsigned Bytevalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_upgrade_from_v2_to_v3_script_function
public static TransactionPayload encode_upgrade_from_v2_to_v3_script_function(BigInteger total_stc_amount)Stdlib upgrade script from v2 to v3- 参数:
total_stc_amount-@Unsigned @Int128 BigIntegervalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_withdraw_and_split_lt_withdraw_cap_script_function
public static TransactionPayload encode_withdraw_and_split_lt_withdraw_cap_script_function(TypeTag token_t, AccountAddress for_address, BigInteger amount, Long lock_period)- 参数:
token_t-TypeTagvaluefor_address-AccountAddressvalueamount-@Unsigned @Int128 BigIntegervaluelock_period-@Unsigned Longvalue- 返回:
- Encoded
TransactionPayloadvalue.
-
encode_withdraw_token_with_linear_withdraw_capability_script_function
public static TransactionPayload encode_withdraw_token_with_linear_withdraw_capability_script_function(TypeTag token_t)- 参数:
token_t-TypeTagvalue- 返回:
- Encoded
TransactionPayloadvalue.
-