From ed3d152818c18dd94131e54bfb1edad9ed5da0c3 Mon Sep 17 00:00:00 2001
From: Aregnaz Harutyunyan <>
Date: Tue, 10 Mar 2026 12:24:56 +0400
Subject: [PATCH 01/12] [EAN-Issue-2530] Added emv-contracts-details move
module
- The module will hold the evm contract names accosiated with the corresponding addresses
- Supra node runtime will utilize this information to retrieve evm block-metadata and automation-registry contract addresses
- Users can retrieve the 0x1::evm_contracts_details::EvmContractsDetails resource to get info on supra native evm contracts
---
.../supra-framework/doc/config_buffer.md | 15 --
.../doc/evm_contracts_details.md | 194 ++++++++++++++++++
.../framework/supra-framework/doc/genesis.md | 31 +++
.../framework/supra-framework/doc/overview.md | 1 +
.../doc/reconfiguration_with_dkg.md | 2 +
.../sources/configs/config_buffer.move | 1 +
.../configs/evm_contracts_details.move | 78 +++++++
.../supra-framework/sources/genesis.move | 10 +
.../sources/reconfiguration_with_dkg.move | 2 +
aptos-move/vm-genesis/src/lib.rs | 30 +++
crates/aptos-genesis/src/lib.rs | 1 +
.../on_chain_config/evm_contracts_details.rs | 122 +++++++++++
types/src/on_chain_config/mod.rs | 2 +
13 files changed, 474 insertions(+), 15 deletions(-)
create mode 100644 aptos-move/framework/supra-framework/doc/evm_contracts_details.md
create mode 100644 aptos-move/framework/supra-framework/sources/configs/evm_contracts_details.move
create mode 100644 types/src/on_chain_config/evm_contracts_details.rs
diff --git a/aptos-move/framework/supra-framework/doc/config_buffer.md b/aptos-move/framework/supra-framework/doc/config_buffer.md
index 0c1a65caddf..f491e823271 100644
--- a/aptos-move/framework/supra-framework/doc/config_buffer.md
+++ b/aptos-move/framework/supra-framework/doc/config_buffer.md
@@ -320,19 +320,4 @@ Typically used in X::on_new_epoch() where X is an on-chaon config.
-
-
-
-
-
-
schema OnNewEpochRequirement<T> {
- let type_name = type_info::type_name<T>();
- let configs = global<PendingConfigs>(@supra_framework);
- include spec_fun_does_exist<T>(type_name) ==> any::UnpackRequirement<T> {
- x: simple_map::spec_get(configs.configs, type_name)
- };
-}
-
-
-
[move-book]: https://aptos.dev/move/book/SUMMARY
diff --git a/aptos-move/framework/supra-framework/doc/evm_contracts_details.md b/aptos-move/framework/supra-framework/doc/evm_contracts_details.md
new file mode 100644
index 00000000000..bb02deba100
--- /dev/null
+++ b/aptos-move/framework/supra-framework/doc/evm_contracts_details.md
@@ -0,0 +1,194 @@
+
+
+
+# Module `0x1::evm_contracts_details`
+
+
+
+- [Resource `EvmContractsDetails`](#0x1_evm_contracts_details_EvmContractsDetails)
+- [Constants](#@Constants_0)
+- [Function `initialize`](#0x1_evm_contracts_details_initialize)
+- [Function `upset_for_next_epoch`](#0x1_evm_contracts_details_upset_for_next_epoch)
+- [Function `on_new_epoch`](#0x1_evm_contracts_details_on_new_epoch)
+
+
+use 0x1::config_buffer;
+use 0x1::error;
+use 0x1::event;
+use 0x1::option;
+use 0x1::simple_map;
+use 0x1::string;
+use 0x1::system_addresses;
+use 0x1::vector;
+
+
+
+
+
+
+## Resource `EvmContractsDetails`
+
+
+
+#[event]
+struct EvmContractsDetails has copy, drop, store, key
+
+
+
+
+details: simple_map::SimpleMap<string::String, address>
+const EEMPTY_DATA: u64 = 1;
+
+
+
+
+
+
+Input keys and values should have the same amount of data
+
+
+const EKEYS_VALUES_MISMATCH: u64 = 2;
+
+
+
+
+
+
+## Function `initialize`
+
+Publishes the EvmContractInfo details.
+
+
+public(friend) fun initialize(supra_framework: &signer, keys: vector<string::String>, values: vector<address>)
+
+
+
+
+public(friend) fun initialize(
+ supra_framework: &signer, keys: vector<String>, values: vector<address>
+) {
+ system_addresses::assert_supra_framework(supra_framework);
+ assert!(!vector::is_empty(&keys), error::invalid_argument(EEMPTY_DATA));
+ assert!(vector::length(&keys) == vector::length(&values), error::invalid_argument(EKEYS_VALUES_MISMATCH));
+ let contract_details = EvmContractsDetails {
+ details: simple_map::new_from(keys, values)
+ };
+ move_to(supra_framework, contract_details);
+ event::emit(contract_details);
+}
+
+
+
+
+public fun upset_for_next_epoch(account: &signer, keys: vector<string::String>, values: vector<address>)
+
+
+
+
+public fun upset_for_next_epoch(account: &signer, keys: vector<String>, values: vector<address>) acquires EvmContractsDetails {
+ system_addresses::assert_supra_framework(account);
+ assert!(!vector::is_empty(&keys), error::invalid_argument(EEMPTY_DATA));
+ assert!(vector::length(&keys) == vector::length(&values), error::invalid_argument(EKEYS_VALUES_MISMATCH));
+ if (!exists<EvmContractsDetails>(@supra_framework)) {
+ std::config_buffer::upsert<EvmContractsDetails>(EvmContractsDetails { details: simple_map::new_from(keys, values) });
+ return
+ };
+ let updated_config = *borrow_global<EvmContractsDetails>(@supra_framework);
+ vector::zip(keys, values, |key, value| {
+ simple_map::upsert(&mut updated_config.details, key, value);
+ });
+ std::config_buffer::upsert<EvmContractsDetails>(updated_config);
+}
+
+
+
+
+EvmContractDetails in buffer, if there is any.
+If supra_framework has a EvmContractDetails, then update the new config to supra_framework.
+Otherwise, move the new config to supra_framework.
+
+
+public(friend) fun on_new_epoch(framework: &signer)
+
+
+
+
+public(friend) fun on_new_epoch(framework: &signer) acquires EvmContractsDetails {
+ system_addresses::assert_supra_framework(framework);
+ if (config_buffer::does_exist<EvmContractsDetails>()) {
+ let new_config = config_buffer::extract<EvmContractsDetails>();
+ if (!exists<EvmContractsDetails>(@supra_framework)) {
+ move_to(framework, new_config);
+ } else {
+ let old_config = borrow_global_mut<EvmContractsDetails>(@supra_framework);
+ *old_config = new_config;
+ };
+ event::emit(new_config)
+ }
+}
+
+
+
+
+fun initialize_evm_contracts_details(supra_framework: &signer, keys: vector<string::String>, values: vector<address>)
+
+
+
+
+fun initialize_evm_contracts_details(
+ supra_framework: &signer,
+ keys: vector<String>,
+ values: vector<address>
+) {
+ evm_contracts_details::initialize(supra_framework, keys, values);
+}
+
+
+
+
public fun upset_for_next_epoch(account: &signer, keys: vector<string::String>, values: vector<address>)
+public fun upsert_for_next_epoch(account: &signer, keys: vector<string::String>, values: vector<address>)
@@ -133,7 +133,7 @@ supra_framework::supra_governance::reconfigure(&framework_signer);
Implementation
-public fun upset_for_next_epoch(account: &signer, keys: vector<String>, values: vector<address>) acquires EvmContractsDetails {
+public fun upsert_for_next_epoch(account: &signer, keys: vector<String>, values: vector<address>) acquires EvmContractsDetails {
system_addresses::assert_supra_framework(account);
assert!(!vector::is_empty(&keys), error::invalid_argument(EEMPTY_DATA));
assert!(vector::length(&keys) == vector::length(&values), error::invalid_argument(EKEYS_VALUES_MISMATCH));
diff --git a/aptos-move/framework/supra-framework/sources/configs/evm_contracts_details.move b/aptos-move/framework/supra-framework/sources/configs/evm_contracts_details.move
index 9e9afb5c388..e4ddab92594 100644
--- a/aptos-move/framework/supra-framework/sources/configs/evm_contracts_details.move
+++ b/aptos-move/framework/supra-framework/sources/configs/evm_contracts_details.move
@@ -41,10 +41,10 @@ module supra_framework::evm_contracts_details {
/// Keys and values will match in lenght and should not be empty, otherwise the call will fail.
/// Example usage:
/// ```
- /// supra_framework::evm_genesis_config::set_for_next_epoch(&framework_signer, vector["contact1_name"], [contract1_address]);
+ /// supra_framework::evm_contracts_details::upsert_for_next_epoch(&framework_signer, vector["contact1_name"], vector[contract1_address]);
/// supra_framework::supra_governance::reconfigure(&framework_signer);
/// ```
- public fun upset_for_next_epoch(account: &signer, keys: vector, values: vector) acquires EvmContractsDetails {
+ public fun upsert_for_next_epoch(account: &signer, keys: vector, values: vector) acquires EvmContractsDetails {
system_addresses::assert_supra_framework(account);
assert!(!vector::is_empty(&keys), error::invalid_argument(EEMPTY_DATA));
assert!(vector::length(&keys) == vector::length(&values), error::invalid_argument(EKEYS_VALUES_MISMATCH));
From b97a3a4491fa45878f8e0a99ddbe784f59657cd1 Mon Sep 17 00:00:00 2001
From: Aregnaz Harutyunyan <>
Date: Mon, 6 Apr 2026 15:03:53 +0400
Subject: [PATCH 03/12] Addressed license headers
---
aptos-move/aptos-vm/src/aptos_vm_viewer.rs | 3 ---
aptos-move/aptos-vm/src/automated_transaction_processor.rs | 3 ---
.../aptos-vm/src/automation_registry_transaction_processor.rs | 3 ---
aptos-move/e2e-testsuite/src/tests/automated_transactions.rs | 3 ---
aptos-move/e2e-testsuite/src/tests/automation_registration.rs | 3 ---
aptos-move/e2e-testsuite/src/tests/vm_viewer.rs | 3 ---
.../framework/src/natives/automation_registry_callbacks.rs | 3 ---
.../src/natives/cryptography/bls12381_bulletproofs.rs | 3 ---
.../framework/src/natives/cryptography/bls12381_scalar.rs | 3 ---
aptos-move/framework/src/natives/cryptography/eth_trie.rs | 3 ---
aptos-move/framework/src/natives/rlp.rs | 3 ---
devtools/assets/license_header.txt | 2 +-
devtools/assets/license_header_utf8.txt | 2 +-
devtools/assets/shared_license_header.txt | 1 +
devtools/assets/shared_license_header_utf8.txt | 1 +
types/src/on_chain_config/automation_registry.rs | 3 ---
types/src/on_chain_config/evm_contracts_details.rs | 3 +++
types/src/on_chain_config/evm_genesis_config.rs | 3 ---
types/src/transaction/automated_transaction.rs | 3 ---
types/src/transaction/automation.rs | 3 ---
types/src/unit_tests/automation.rs | 3 ---
21 files changed, 7 insertions(+), 50 deletions(-)
diff --git a/aptos-move/aptos-vm/src/aptos_vm_viewer.rs b/aptos-move/aptos-vm/src/aptos_vm_viewer.rs
index a5ce78285ef..5bad9355228 100644
--- a/aptos-move/aptos-vm/src/aptos_vm_viewer.rs
+++ b/aptos-move/aptos-vm/src/aptos_vm_viewer.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2024 Supra.
// SPDX-License-Identifier: Apache-2.0
diff --git a/aptos-move/aptos-vm/src/automated_transaction_processor.rs b/aptos-move/aptos-vm/src/automated_transaction_processor.rs
index 84d3eb76430..ab0ccaec3e4 100644
--- a/aptos-move/aptos-vm/src/automated_transaction_processor.rs
+++ b/aptos-move/aptos-vm/src/automated_transaction_processor.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2024 Supra.
// SPDX-License-Identifier: Apache-2.0
diff --git a/aptos-move/aptos-vm/src/automation_registry_transaction_processor.rs b/aptos-move/aptos-vm/src/automation_registry_transaction_processor.rs
index 71125163f6d..3341741a43f 100644
--- a/aptos-move/aptos-vm/src/automation_registry_transaction_processor.rs
+++ b/aptos-move/aptos-vm/src/automation_registry_transaction_processor.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2025 Supra.
// SPDX-License-Identifier: Apache-2.0
diff --git a/aptos-move/e2e-testsuite/src/tests/automated_transactions.rs b/aptos-move/e2e-testsuite/src/tests/automated_transactions.rs
index 931f7b3611a..2b60baf3520 100644
--- a/aptos-move/e2e-testsuite/src/tests/automated_transactions.rs
+++ b/aptos-move/e2e-testsuite/src/tests/automated_transactions.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2024 Supra.
// SPDX-License-Identifier: Apache-2.0
diff --git a/aptos-move/e2e-testsuite/src/tests/automation_registration.rs b/aptos-move/e2e-testsuite/src/tests/automation_registration.rs
index 73648ec2e11..4444ea6cadc 100644
--- a/aptos-move/e2e-testsuite/src/tests/automation_registration.rs
+++ b/aptos-move/e2e-testsuite/src/tests/automation_registration.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2024 Supra.
// SPDX-License-Identifier: Apache-2.0
diff --git a/aptos-move/e2e-testsuite/src/tests/vm_viewer.rs b/aptos-move/e2e-testsuite/src/tests/vm_viewer.rs
index 7f5b7ea6a58..10e0b6e33bc 100644
--- a/aptos-move/e2e-testsuite/src/tests/vm_viewer.rs
+++ b/aptos-move/e2e-testsuite/src/tests/vm_viewer.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2024 Supra.
// SPDX-License-Identifier: Apache-2.0
diff --git a/aptos-move/framework/src/natives/automation_registry_callbacks.rs b/aptos-move/framework/src/natives/automation_registry_callbacks.rs
index 462756d9fd1..bc2aeb2a13d 100644
--- a/aptos-move/framework/src/natives/automation_registry_callbacks.rs
+++ b/aptos-move/framework/src/natives/automation_registry_callbacks.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2025 Supra.
// SPDX-License-Identifier: Apache-2.0
use aptos_native_interface::{SafeNativeBuilder, SafeNativeContext, SafeNativeResult};
diff --git a/aptos-move/framework/src/natives/cryptography/bls12381_bulletproofs.rs b/aptos-move/framework/src/natives/cryptography/bls12381_bulletproofs.rs
index 01530e3accc..7839d844271 100644
--- a/aptos-move/framework/src/natives/cryptography/bls12381_bulletproofs.rs
+++ b/aptos-move/framework/src/natives/cryptography/bls12381_bulletproofs.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2024 Supra.
use crate::natives::cryptography::bulletproofs::abort_codes;
diff --git a/aptos-move/framework/src/natives/cryptography/bls12381_scalar.rs b/aptos-move/framework/src/natives/cryptography/bls12381_scalar.rs
index 1a544baa646..831cbedc52e 100644
--- a/aptos-move/framework/src/natives/cryptography/bls12381_scalar.rs
+++ b/aptos-move/framework/src/natives/cryptography/bls12381_scalar.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2024 Supra.
use aptos_gas_schedule::gas_params::natives::aptos_framework::{
diff --git a/aptos-move/framework/src/natives/cryptography/eth_trie.rs b/aptos-move/framework/src/natives/cryptography/eth_trie.rs
index 6dc32154c90..bafc3006fb2 100644
--- a/aptos-move/framework/src/natives/cryptography/eth_trie.rs
+++ b/aptos-move/framework/src/natives/cryptography/eth_trie.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2024 Supra.
use aptos_gas_schedule::gas_params::natives::aptos_framework::{
diff --git a/aptos-move/framework/src/natives/rlp.rs b/aptos-move/framework/src/natives/rlp.rs
index 413bb9cf867..9f650350766 100644
--- a/aptos-move/framework/src/natives/rlp.rs
+++ b/aptos-move/framework/src/natives/rlp.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2024 Supra.
use aptos_gas_schedule::gas_params::natives::aptos_framework::{
diff --git a/devtools/assets/license_header.txt b/devtools/assets/license_header.txt
index ebc846ed74b..47bc4ada806 100644
--- a/devtools/assets/license_header.txt
+++ b/devtools/assets/license_header.txt
@@ -1,2 +1,2 @@
-Copyright (c) Aptos Foundation
+Copyright (c) Supra.
SPDX-License-Identifier: Apache-2.0
diff --git a/devtools/assets/license_header_utf8.txt b/devtools/assets/license_header_utf8.txt
index 5f8d7b55e16..47bc4ada806 100644
--- a/devtools/assets/license_header_utf8.txt
+++ b/devtools/assets/license_header_utf8.txt
@@ -1,2 +1,2 @@
-Copyright © Aptos Foundation
+Copyright (c) Supra.
SPDX-License-Identifier: Apache-2.0
diff --git a/devtools/assets/shared_license_header.txt b/devtools/assets/shared_license_header.txt
index 18a8743e5f4..87bc810c97d 100644
--- a/devtools/assets/shared_license_header.txt
+++ b/devtools/assets/shared_license_header.txt
@@ -1,3 +1,4 @@
+Copyright (c) Supra.
Copyright (c) Aptos Foundation
Parts of the project are originally copyright (c) Meta Platforms, Inc.
SPDX-License-Identifier: Apache-2.0
diff --git a/devtools/assets/shared_license_header_utf8.txt b/devtools/assets/shared_license_header_utf8.txt
index e5b2ef62fc0..da4c1bddd68 100644
--- a/devtools/assets/shared_license_header_utf8.txt
+++ b/devtools/assets/shared_license_header_utf8.txt
@@ -1,3 +1,4 @@
+Copyright (c) Supra.
Copyright © Aptos Foundation
Parts of the project are originally copyright © Meta Platforms, Inc.
SPDX-License-Identifier: Apache-2.0
diff --git a/types/src/on_chain_config/automation_registry.rs b/types/src/on_chain_config/automation_registry.rs
index 4f68aa12669..e910f61baad 100644
--- a/types/src/on_chain_config/automation_registry.rs
+++ b/types/src/on_chain_config/automation_registry.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2025 Supra.
// SPDX-License-Identifier: Apache-2.0
diff --git a/types/src/on_chain_config/evm_contracts_details.rs b/types/src/on_chain_config/evm_contracts_details.rs
index ea8ae804264..6d995ab838c 100644
--- a/types/src/on_chain_config/evm_contracts_details.rs
+++ b/types/src/on_chain_config/evm_contracts_details.rs
@@ -1,3 +1,6 @@
+// Copyright (c) 2026 Supra.
+// SPDX-License-Identifier: Apache-2.0
+
use crate::on_chain_config::OnChainConfig;
use move_core_types::account_address::AccountAddress;
use serde::{Deserialize, Serialize};
diff --git a/types/src/on_chain_config/evm_genesis_config.rs b/types/src/on_chain_config/evm_genesis_config.rs
index 1901bc9bb64..30b9f08ce0e 100644
--- a/types/src/on_chain_config/evm_genesis_config.rs
+++ b/types/src/on_chain_config/evm_genesis_config.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) Supra Foundation
// SPDX-License-Identifier: Apache-2.0
diff --git a/types/src/transaction/automated_transaction.rs b/types/src/transaction/automated_transaction.rs
index 317547326be..a7b1009ebcc 100644
--- a/types/src/transaction/automated_transaction.rs
+++ b/types/src/transaction/automated_transaction.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2024 Supra.
// SPDX-License-Identifier: Apache-2.0
diff --git a/types/src/transaction/automation.rs b/types/src/transaction/automation.rs
index c374987485d..892afaa63d5 100644
--- a/types/src/transaction/automation.rs
+++ b/types/src/transaction/automation.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2025 Supra.
// SPDX-License-Identifier: Apache-2.0
diff --git a/types/src/unit_tests/automation.rs b/types/src/unit_tests/automation.rs
index eb361d3845c..470b806479d 100644
--- a/types/src/unit_tests/automation.rs
+++ b/types/src/unit_tests/automation.rs
@@ -1,6 +1,3 @@
-// Copyright (c) Aptos Foundation
-// SPDX-License-Identifier: Apache-2.0
-
// Copyright (c) 2024 Supra.
// SPDX-License-Identifier: Apache-2.0
From 66ba102c7c8fdda439cf7fe343c717fe7b7502ee Mon Sep 17 00:00:00 2001
From: Aregnaz Harutyunyan <>
Date: Mon, 20 Apr 2026 00:41:42 +0400
Subject: [PATCH 04/12] Fixed TODO and test failures
---
aptos-move/e2e-tests/src/executor.rs | 7 +-
.../src/tests/automated_transactions.rs | 2 +-
.../src/tests/automation_registration.rs | 14 +-
.../src/aptos_framework_sdk_builder.rs | 8199 ++++++-----------
.../on_chain_config/evm_contracts_details.rs | 44 +-
5 files changed, 2792 insertions(+), 5474 deletions(-)
diff --git a/aptos-move/e2e-tests/src/executor.rs b/aptos-move/e2e-tests/src/executor.rs
index 87da2dbbac4..b483f2c9dbb 100644
--- a/aptos-move/e2e-tests/src/executor.rs
+++ b/aptos-move/e2e-tests/src/executor.rs
@@ -502,8 +502,9 @@ impl FakeExecutor {
/// Executes the transaction as a singleton block and applies the resulting write set to the
/// data store. Panics if execution fails
pub fn execute_and_apply_transaction(&mut self, transaction: Transaction) -> TransactionOutput {
- let mut outputs = self.execute_transaction_block(vec![transaction]).unwrap();
+ let mut outputs = self.execute_transaction_block(vec![transaction.clone()]).unwrap();
assert_eq!(outputs.len(), 1, "transaction outputs size mismatch");
+ println!("transaction execution output: {:#?} : {:#?}", outputs, transaction);
let output = outputs.pop().unwrap();
match output.status() {
TransactionStatus::Keep(status) => {
@@ -522,8 +523,8 @@ impl FakeExecutor {
assert_eq!(
status,
&ExecutionStatus::Success,
- "transaction failed with {:?}",
- status
+ "transaction failed with {:?}, {:?}",
+ status, transaction
);
output
},
diff --git a/aptos-move/e2e-testsuite/src/tests/automated_transactions.rs b/aptos-move/e2e-testsuite/src/tests/automated_transactions.rs
index 2b60baf3520..fdc3fb6e973 100644
--- a/aptos-move/e2e-testsuite/src/tests/automated_transactions.rs
+++ b/aptos-move/e2e-testsuite/src/tests/automated_transactions.rs
@@ -103,7 +103,7 @@ fn check_automated_transaction_successful_execution() {
let payload =
aptos_framework_sdk_builder::supra_account_transfer(dest_account.address().clone(), 100);
let gas_price = 100;
- let max_gas_amount = 100;
+ let max_gas_amount = 1000;
let automation_fee_cap = 100_000;
// Register automation task
diff --git a/aptos-move/e2e-testsuite/src/tests/automation_registration.rs b/aptos-move/e2e-testsuite/src/tests/automation_registration.rs
index 4444ea6cadc..38a476c4b37 100644
--- a/aptos-move/e2e-testsuite/src/tests/automation_registration.rs
+++ b/aptos-move/e2e-testsuite/src/tests/automation_registration.rs
@@ -48,6 +48,8 @@ const HAS_SENDER_ACTIVE_TASK_WITH_ID: &str =
"0x1::automation_registry::has_sender_active_task_with_id";
const GET_TASK_IDS: &str = "0x1::automation_registry::get_task_ids";
+const MAX_GAS_AMOUNT_REGISTRATION: u64 = 500_000_000;
+
struct MultisigAccountData {
multisig_address: AccountAddress,
owners: Vec,
@@ -108,8 +110,8 @@ impl AutomationRegistrationTestContext {
fn create_multisig_account_data(executor: &mut FakeExecutor) -> MultisigAccountData {
// Prepare multisig_account for system task registration
- let multisig_owner1 = executor.create_raw_account_data(1_000_000_000, 0);
- let multisig_owner2 = executor.create_raw_account_data(1_000_000_000, 0);
+ let multisig_owner1 = executor.create_raw_account_data(1_000_000_000_000, 0);
+ let multisig_owner2 = executor.create_raw_account_data(1_000_000_000_000, 0);
executor.add_account_data(&multisig_owner1);
executor.add_account_data(&multisig_owner2);
let multisig_address = create_multisig_account_address(
@@ -126,7 +128,7 @@ impl AutomationRegistrationTestContext {
let account_create_txn = multisig_owner1
.account()
.transaction()
- .max_gas_amount(1_000_000)
+ .max_gas_amount(5_000_000)
.gas_unit_price(100)
.payload(create_multisig_payload)
.sequence_number(0)
@@ -136,7 +138,7 @@ impl AutomationRegistrationTestContext {
let transfer_txn = multisig_owner1
.account()
.transaction()
- .max_gas_amount(1000)
+ .max_gas_amount(5_000_000)
.payload(aptos_stdlib::supra_account_transfer(
multisig_address,
10_000_000,
@@ -230,6 +232,7 @@ impl AutomationRegistrationTestContext {
.payload(automation_txn)
.sequence_number(seq_num)
.gas_unit_price(1)
+ .max_gas_amount(MAX_GAS_AMOUNT_REGISTRATION)
.sign()
}
@@ -259,6 +262,7 @@ impl AutomationRegistrationTestContext {
.payload(automation_txn)
.sequence_number(seq_num)
.gas_unit_price(1)
+ .max_gas_amount(MAX_GAS_AMOUNT_REGISTRATION)
.sign()
}
@@ -283,6 +287,7 @@ impl AutomationRegistrationTestContext {
.payload(automation_txn)
.sequence_number(seq_num)
.gas_unit_price(1)
+ .max_gas_amount(MAX_GAS_AMOUNT_REGISTRATION)
.sign()
}
@@ -300,6 +305,7 @@ impl AutomationRegistrationTestContext {
))
.sequence_number(seq_num)
.gas_unit_price(1)
+ .max_gas_amount(MAX_GAS_AMOUNT_REGISTRATION)
.sign()
}
diff --git a/aptos-move/framework/cached-packages/src/aptos_framework_sdk_builder.rs b/aptos-move/framework/cached-packages/src/aptos_framework_sdk_builder.rs
index 6021de2c273..0e8fa86271c 100644
--- a/aptos-move/framework/cached-packages/src/aptos_framework_sdk_builder.rs
+++ b/aptos-move/framework/cached-packages/src/aptos_framework_sdk_builder.rs
@@ -1,3 +1,4 @@
+
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0
@@ -15,17 +16,14 @@
#![allow(clippy::too_many_arguments)]
#![allow(clippy::arc_with_non_send_sync)]
#![allow(clippy::get_first)]
-use aptos_types::{
- account_address::AccountAddress,
- transaction::{EntryFunction, TransactionPayload},
-};
-use move_core_types::{
- ident_str,
- language_storage::{ModuleId, TypeTag},
-};
+use aptos_types::account_address::{AccountAddress};
+use aptos_types::transaction::{TransactionPayload, EntryFunction};
+use move_core_types::{ident_str};
+use move_core_types::language_storage::{ModuleId, TypeTag};
type Bytes = Vec;
+
/// Structured representation of a call into a known Move entry function.
/// ```ignore
/// impl EntryFunctionCall {
@@ -37,6 +35,7 @@ type Bytes = Vec;
#[cfg_attr(feature = "fuzzing", derive(proptest_derive::Arbitrary))]
#[cfg_attr(feature = "fuzzing", proptest(no_params))]
pub enum EntryFunctionCall {
+
/// Offers rotation capability on behalf of `account` to the account at address `recipient_address`.
/// An account can delegate its rotation capability to only one other address at one time. If the account
/// has an existing rotation capability offer, calling this function will update the rotation capability offer with
@@ -78,10 +77,12 @@ pub enum EntryFunctionCall {
},
/// Revoke any rotation capability offer in the specified account.
- AccountRevokeAnyRotationCapability {},
+ AccountRevokeAnyRotationCapability {
+ },
/// Revoke any signer capability offer in the specified account.
- AccountRevokeAnySignerCapability {},
+ AccountRevokeAnySignerCapability {
+ },
/// Revoke the rotation capability offer given to `to_be_revoked_recipient_address` from `account`
AccountRevokeRotationCapability {
@@ -140,6 +141,7 @@ pub enum EntryFunctionCall {
new_auth_key: Vec,
},
+
AccountRotateAuthenticationKeyWithRotationCapability {
rotation_cap_offerer_address: AccountAddress,
new_scheme: u8,
@@ -194,7 +196,9 @@ pub enum EntryFunctionCall {
code: Vec>,
},
- CoinCreateCoinConversionMap {},
+
+ CoinCreateCoinConversionMap {
+ },
/// Create SUPRA pairing by passing `SupraCoin`.
CoinCreatePairing {
@@ -565,6 +569,7 @@ pub enum EntryFunctionCall {
amount: u64,
},
+
PboDelegationPoolAdminIncreaseLastUnlockPeriod {
pool_address: AccountAddress,
additional_periods: u64,
@@ -583,12 +588,14 @@ pub enum EntryFunctionCall {
pool_address: AccountAddress,
},
+
PboDelegationPoolFundDelegatorsWithLockedStake {
pool_address: AccountAddress,
delegators: Vec,
stakes: Vec,
},
+
PboDelegationPoolFundDelegatorsWithStake {
pool_address: AccountAddress,
delegators: Vec,
@@ -708,6 +715,7 @@ pub enum EntryFunctionCall {
unlock_duration: u64,
},
+
PboDelegationPoolUpdateUnlockingScheduleUnchecked {
pool_address: AccountAddress,
unlock_numerators: Vec,
@@ -756,7 +764,8 @@ pub enum EntryFunctionCall {
},
/// Similar to increase_lockup_with_cap but will use ownership capability from the signing account.
- StakeIncreaseLockup {},
+ StakeIncreaseLockup {
+ },
/// Initialize the validator account and give ownership to the signing account
/// except it leaves the ValidatorConfig to be set by another entity.
@@ -909,39 +918,47 @@ pub enum EntryFunctionCall {
new_voter: AccountAddress,
},
+
StakingProxySetOperator {
old_operator: AccountAddress,
new_operator: AccountAddress,
},
+
StakingProxySetStakePoolOperator {
new_operator: AccountAddress,
},
+
StakingProxySetStakePoolVoter {
new_voter: AccountAddress,
},
+
StakingProxySetStakingContractOperator {
old_operator: AccountAddress,
new_operator: AccountAddress,
},
+
StakingProxySetStakingContractVoter {
operator: AccountAddress,
new_voter: AccountAddress,
},
+
StakingProxySetVestingContractOperator {
old_operator: AccountAddress,
new_operator: AccountAddress,
},
+
StakingProxySetVestingContractVoter {
operator: AccountAddress,
new_voter: AccountAddress,
},
+
StakingProxySetVoter {
operator: AccountAddress,
new_voter: AccountAddress,
@@ -987,7 +1004,8 @@ pub enum EntryFunctionCall {
/// Only callable in tests and testnets where the core resources account exists.
/// Claim the delegated mint capability and destroy the delegated token.
- SupraCoinClaimMintCapability {},
+ SupraCoinClaimMintCapability {
+ },
/// Only callable in tests and testnets where the core resources account exists.
/// Create delegated token for the address so the account could claim MintCapability later.
@@ -1002,6 +1020,7 @@ pub enum EntryFunctionCall {
amount: u64,
},
+
SupraGovernanceAddSupraApprovedScriptHashScript {
proposal_id: u64,
},
@@ -1012,11 +1031,13 @@ pub enum EntryFunctionCall {
///
/// WARNING: currently only used by tests. In most cases you should use `reconfigure()` instead.
/// TODO: migrate these tests to be aware of async reconfiguration.
- SupraGovernanceForceEndEpoch {},
+ SupraGovernanceForceEndEpoch {
+ },
/// `force_end_epoch()` equivalent but only called in testnet,
/// where the core resources account exists and has been granted power to mint Supra coins.
- SupraGovernanceForceEndEpochTestOnly {},
+ SupraGovernanceForceEndEpochTestOnly {
+ },
/// Manually reconfigure. Called at the end of a governance txn that alters on-chain configs.
///
@@ -1027,7 +1048,8 @@ pub enum EntryFunctionCall {
///
/// This behavior affects when an update of an on-chain config (e.g. `ConsensusConfig`, `Features`) takes effect,
/// since such updates are applied whenever we enter a new epoch.
- SupraGovernanceReconfigure {},
+ SupraGovernanceReconfigure {
+ },
/// Create a single-step proposal with the backing `stake_pool`.
/// @param execution_hash Required. This is the hash of the resolution script. When the proposal is resolved,
@@ -1054,7 +1076,9 @@ pub enum EntryFunctionCall {
should_pass: bool,
},
- TransactionFeeConvertToAptosFaBurnRef {},
+
+ TransactionFeeConvertToAptosFaBurnRef {
+ },
/// Used in on-chain governances to update the major version for the next epoch.
/// Example usage:
@@ -1096,10 +1120,12 @@ pub enum EntryFunctionCall {
shareholder: AccountAddress,
},
+
VestingResetLockup {
contract_address: AccountAddress,
},
+
VestingSetBeneficiary {
contract_address: AccountAddress,
shareholder: AccountAddress,
@@ -1111,11 +1137,13 @@ pub enum EntryFunctionCall {
new_beneficiary: AccountAddress,
},
+
VestingSetBeneficiaryResetter {
contract_address: AccountAddress,
beneficiary_resetter: AccountAddress,
},
+
VestingSetManagementRole {
contract_address: AccountAddress,
role: Vec,
@@ -1137,22 +1165,26 @@ pub enum EntryFunctionCall {
contract_addresses: Vec,
},
+
VestingUpdateCommissionPercentage {
contract_address: AccountAddress,
new_commission_percentage: u64,
},
+
VestingUpdateOperator {
contract_address: AccountAddress,
new_operator: AccountAddress,
commission_percentage: u64,
},
+
VestingUpdateOperatorWithSameCommission {
contract_address: AccountAddress,
new_operator: AccountAddress,
},
+
VestingUpdateVoter {
contract_address: AccountAddress,
new_voter: AccountAddress,
@@ -1168,6 +1200,7 @@ pub enum EntryFunctionCall {
contract_addresses: Vec,
},
+
VestingWithoutStakingAdminDelayVesting {
contract_address: AccountAddress,
delay_periods: u64,
@@ -1179,6 +1212,7 @@ pub enum EntryFunctionCall {
contract_address: AccountAddress,
},
+
VestingWithoutStakingCreateVestingContractWithAmounts {
shareholders: Vec,
shares: Vec,
@@ -1204,23 +1238,27 @@ pub enum EntryFunctionCall {
shareholder: AccountAddress,
},
+
VestingWithoutStakingSetBeneficiary {
contract_address: AccountAddress,
shareholder: AccountAddress,
new_beneficiary: AccountAddress,
},
+
VestingWithoutStakingSetBeneficiaryResetter {
contract_address: AccountAddress,
beneficiary_resetter: AccountAddress,
},
+
VestingWithoutStakingSetManagementRole {
contract_address: AccountAddress,
role: Vec,
role_holder: AccountAddress,
},
+
VestingWithoutStakingSetVestingSchedule {
contract_address: AccountAddress,
vesting_numerators: Vec,
@@ -1238,871 +1276,191 @@ pub enum EntryFunctionCall {
contract_address: AccountAddress,
},
+
VestingWithoutStakingVestIndividual {
contract_address: AccountAddress,
shareholder_address: AccountAddress,
},
}
+
impl EntryFunctionCall {
+
/// Build an Aptos `TransactionPayload` from a structured object `EntryFunctionCall`.
pub fn encode(self) -> TransactionPayload {
use EntryFunctionCall::*;
match self {
- AccountOfferRotationCapability {
- rotation_capability_sig_bytes,
- account_scheme,
- account_public_key_bytes,
- recipient_address,
- } => account_offer_rotation_capability(
- rotation_capability_sig_bytes,
- account_scheme,
- account_public_key_bytes,
- recipient_address,
- ),
- AccountOfferSignerCapability {
- signer_capability_sig_bytes,
- account_scheme,
- account_public_key_bytes,
- recipient_address,
- } => account_offer_signer_capability(
- signer_capability_sig_bytes,
- account_scheme,
- account_public_key_bytes,
- recipient_address,
- ),
- AccountRevokeAnyRotationCapability {} => account_revoke_any_rotation_capability(),
- AccountRevokeAnySignerCapability {} => account_revoke_any_signer_capability(),
- AccountRevokeRotationCapability {
- to_be_revoked_address,
- } => account_revoke_rotation_capability(to_be_revoked_address),
- AccountRevokeSignerCapability {
- to_be_revoked_address,
- } => account_revoke_signer_capability(to_be_revoked_address),
- AccountRotateAuthenticationKey {
- from_scheme,
- from_public_key_bytes,
- to_scheme,
- to_public_key_bytes,
- cap_rotate_key,
- cap_update_table,
- } => account_rotate_authentication_key(
- from_scheme,
- from_public_key_bytes,
- to_scheme,
- to_public_key_bytes,
- cap_rotate_key,
- cap_update_table,
- ),
- AccountRotateAuthenticationKeyCall { new_auth_key } => {
- account_rotate_authentication_key_call(new_auth_key)
- },
- AccountRotateAuthenticationKeyWithRotationCapability {
- rotation_cap_offerer_address,
- new_scheme,
- new_public_key_bytes,
- cap_update_table,
- } => account_rotate_authentication_key_with_rotation_capability(
- rotation_cap_offerer_address,
- new_scheme,
- new_public_key_bytes,
- cap_update_table,
- ),
- AutomationRegistryCancelSystemTask { task_index } => {
- automation_registry_cancel_system_task(task_index)
- },
- AutomationRegistryCancelTask { task_index } => {
- automation_registry_cancel_task(task_index)
- },
- AutomationRegistryStopSystemTasks { task_indexes } => {
- automation_registry_stop_system_tasks(task_indexes)
- },
- AutomationRegistryStopTasks { task_indexes } => {
- automation_registry_stop_tasks(task_indexes)
- },
- CodePublishPackageTxn {
- metadata_serialized,
- code,
- } => code_publish_package_txn(metadata_serialized, code),
- CoinCreateCoinConversionMap {} => coin_create_coin_conversion_map(),
- CoinCreatePairing { coin_type } => coin_create_pairing(coin_type),
- CoinMigrateToFungibleStore { coin_type } => coin_migrate_to_fungible_store(coin_type),
- CoinTransfer {
- coin_type,
- to,
- amount,
- } => coin_transfer(coin_type, to, amount),
- CoinUpgradeSupply { coin_type } => coin_upgrade_supply(coin_type),
- CommitteeMapRemoveCommittee { com_store_addr, id } => {
- committee_map_remove_committee(com_store_addr, id)
- },
- CommitteeMapRemoveCommitteeBulk {
- com_store_addr,
- ids,
- } => committee_map_remove_committee_bulk(com_store_addr, ids),
- CommitteeMapRemoveCommitteeMember {
- com_store_addr,
- id,
- node_address,
- } => committee_map_remove_committee_member(com_store_addr, id, node_address),
- CommitteeMapUpdateDkgFlag {
- com_store_addr,
- com_id,
- flag_value,
- } => committee_map_update_dkg_flag(com_store_addr, com_id, flag_value),
- CommitteeMapUpsertCommittee {
- com_store_addr,
- id,
- node_addresses,
- ip_public_address,
- node_public_key,
- network_public_key,
- cg_public_key,
- network_port,
- rpc_port,
- committee_type,
- } => committee_map_upsert_committee(
- com_store_addr,
- id,
- node_addresses,
- ip_public_address,
- node_public_key,
- network_public_key,
- cg_public_key,
- network_port,
- rpc_port,
- committee_type,
- ),
- CommitteeMapUpsertCommitteeBulk {
- com_store_addr,
- ids,
- node_addresses_bulk,
- ip_public_address_bulk,
- node_public_key_bulk,
- network_public_key_bulk,
- cg_public_key_bulk,
- network_port_bulk,
- rpc_por_bulkt,
- committee_types,
- } => committee_map_upsert_committee_bulk(
- com_store_addr,
- ids,
- node_addresses_bulk,
- ip_public_address_bulk,
- node_public_key_bulk,
- network_public_key_bulk,
- cg_public_key_bulk,
- network_port_bulk,
- rpc_por_bulkt,
- committee_types,
- ),
- CommitteeMapUpsertCommitteeMember {
- com_store_addr,
- id,
- node_address,
- ip_public_address,
- node_public_key,
- network_public_key,
- cg_public_key,
- network_port,
- rpc_port,
- } => committee_map_upsert_committee_member(
- com_store_addr,
- id,
- node_address,
- ip_public_address,
- node_public_key,
- network_public_key,
- cg_public_key,
- network_port,
- rpc_port,
- ),
- CommitteeMapUpsertCommitteeMemberBulk {
- com_store_addr,
- ids,
- node_addresses,
- ip_public_address,
- node_public_key,
- network_public_key,
- cg_public_key,
- network_port,
- rpc_port,
- } => committee_map_upsert_committee_member_bulk(
- com_store_addr,
- ids,
- node_addresses,
- ip_public_address,
- node_public_key,
- network_public_key,
- cg_public_key,
- network_port,
- rpc_port,
- ),
- ManagedCoinBurn { coin_type, amount } => managed_coin_burn(coin_type, amount),
- ManagedCoinInitialize {
- coin_type,
- name,
- symbol,
- decimals,
- monitor_supply,
- } => managed_coin_initialize(coin_type, name, symbol, decimals, monitor_supply),
- ManagedCoinMint {
- coin_type,
- dst_addr,
- amount,
- } => managed_coin_mint(coin_type, dst_addr, amount),
- ManagedCoinRegister { coin_type } => managed_coin_register(coin_type),
- MultisigAccountAddOwner { new_owner } => multisig_account_add_owner(new_owner),
- MultisigAccountAddOwners { new_owners } => multisig_account_add_owners(new_owners),
- MultisigAccountAddOwnersAndUpdateSignaturesRequired {
- new_owners,
- new_num_signatures_required,
- } => multisig_account_add_owners_and_update_signatures_required(
- new_owners,
- new_num_signatures_required,
- ),
- MultisigAccountApproveTransaction {
- multisig_account,
- sequence_number,
- } => multisig_account_approve_transaction(multisig_account, sequence_number),
- MultisigAccountCreate {
- num_signatures_required,
- metadata_keys,
- metadata_values,
- timeout_duration,
- } => multisig_account_create(
- num_signatures_required,
- metadata_keys,
- metadata_values,
- timeout_duration,
- ),
- MultisigAccountCreateTransaction {
- multisig_account,
- payload,
- } => multisig_account_create_transaction(multisig_account, payload),
- MultisigAccountCreateTransactionWithHash {
- multisig_account,
- payload_hash,
- } => multisig_account_create_transaction_with_hash(multisig_account, payload_hash),
- MultisigAccountCreateWithExistingAccount {
- multisig_address,
- owners,
- num_signatures_required,
- account_scheme,
- account_public_key,
- create_multisig_account_signed_message,
- metadata_keys,
- metadata_values,
- timeout_duration,
- } => multisig_account_create_with_existing_account(
- multisig_address,
- owners,
- num_signatures_required,
- account_scheme,
- account_public_key,
- create_multisig_account_signed_message,
- metadata_keys,
- metadata_values,
- timeout_duration,
- ),
- MultisigAccountCreateWithExistingAccountAndRevokeAuthKey {
- multisig_address,
- owners,
- num_signatures_required,
- account_scheme,
- account_public_key,
- create_multisig_account_signed_message,
- metadata_keys,
- metadata_values,
- timeout_duration,
- } => multisig_account_create_with_existing_account_and_revoke_auth_key(
- multisig_address,
- owners,
- num_signatures_required,
- account_scheme,
- account_public_key,
- create_multisig_account_signed_message,
- metadata_keys,
- metadata_values,
- timeout_duration,
- ),
- MultisigAccountCreateWithOwners {
- additional_owners,
- num_signatures_required,
- metadata_keys,
- metadata_values,
- timeout_duration,
- } => multisig_account_create_with_owners(
- additional_owners,
- num_signatures_required,
- metadata_keys,
- metadata_values,
- timeout_duration,
- ),
- MultisigAccountCreateWithOwnersThenRemoveBootstrapper {
- owners,
- num_signatures_required,
- metadata_keys,
- metadata_values,
- timeout_duration,
- } => multisig_account_create_with_owners_then_remove_bootstrapper(
- owners,
- num_signatures_required,
- metadata_keys,
- metadata_values,
- timeout_duration,
- ),
- MultisigAccountExecuteRejectedTransaction { multisig_account } => {
- multisig_account_execute_rejected_transaction(multisig_account)
- },
- MultisigAccountExecuteRejectedTransactions {
- multisig_account,
- final_sequence_number,
- } => multisig_account_execute_rejected_transactions(
- multisig_account,
- final_sequence_number,
- ),
- MultisigAccountRejectTransaction {
- multisig_account,
- sequence_number,
- } => multisig_account_reject_transaction(multisig_account, sequence_number),
- MultisigAccountRemoveOwner { owner_to_remove } => {
- multisig_account_remove_owner(owner_to_remove)
- },
- MultisigAccountRemoveOwners { owners_to_remove } => {
- multisig_account_remove_owners(owners_to_remove)
- },
- MultisigAccountSwapOwner {
- to_swap_in,
- to_swap_out,
- } => multisig_account_swap_owner(to_swap_in, to_swap_out),
- MultisigAccountSwapOwners {
- to_swap_in,
- to_swap_out,
- } => multisig_account_swap_owners(to_swap_in, to_swap_out),
- MultisigAccountSwapOwnersAndUpdateSignaturesRequired {
- new_owners,
- owners_to_remove,
- new_num_signatures_required,
- } => multisig_account_swap_owners_and_update_signatures_required(
- new_owners,
- owners_to_remove,
- new_num_signatures_required,
- ),
- MultisigAccountUpdateMetadata { keys, values } => {
- multisig_account_update_metadata(keys, values)
- },
- MultisigAccountUpdateSignaturesRequired {
- new_num_signatures_required,
- } => multisig_account_update_signatures_required(new_num_signatures_required),
- MultisigAccountUpdateTimeoutDuration { timeout_duration } => {
- multisig_account_update_timeout_duration(timeout_duration)
- },
- MultisigAccountVoteTransaction {
- multisig_account,
- sequence_number,
- approved,
- } => multisig_account_vote_transaction(multisig_account, sequence_number, approved),
- MultisigAccountVoteTransactions {
- multisig_account,
- starting_sequence_number,
- final_sequence_number,
- approved,
- } => multisig_account_vote_transactions(
- multisig_account,
- starting_sequence_number,
- final_sequence_number,
- approved,
- ),
- MultisigAccountVoteTransanction {
- multisig_account,
- sequence_number,
- approved,
- } => multisig_account_vote_transanction(multisig_account, sequence_number, approved),
- ObjectTransferCall { object, to } => object_transfer_call(object, to),
- ObjectCodeDeploymentPublish {
- metadata_serialized,
- code,
- } => object_code_deployment_publish(metadata_serialized, code),
- PboDelegationPoolAddStake {
- pool_address,
- amount,
- } => pbo_delegation_pool_add_stake(pool_address, amount),
- PboDelegationPoolAdminIncreaseLastUnlockPeriod {
- pool_address,
- additional_periods,
- } => pbo_delegation_pool_admin_increase_last_unlock_period(
- pool_address,
- additional_periods,
- ),
- PboDelegationPoolDelegateVotingPower {
- pool_address,
- new_voter,
- } => pbo_delegation_pool_delegate_voting_power(pool_address, new_voter),
- PboDelegationPoolEnablePartialGovernanceVoting { pool_address } => {
- pbo_delegation_pool_enable_partial_governance_voting(pool_address)
- },
- PboDelegationPoolFundDelegatorsWithLockedStake {
- pool_address,
- delegators,
- stakes,
- } => pbo_delegation_pool_fund_delegators_with_locked_stake(
- pool_address,
- delegators,
- stakes,
- ),
- PboDelegationPoolFundDelegatorsWithStake {
- pool_address,
- delegators,
- stakes,
- } => pbo_delegation_pool_fund_delegators_with_stake(pool_address, delegators, stakes),
- PboDelegationPoolInitializeDelegationPoolWithAmount {
- multisig_admin,
- amount,
- operator_commission_percentage,
- delegation_pool_creation_seed,
- delegator_address,
- principle_stake,
- unlock_numerators,
- unlock_denominator,
- unlock_start_time,
- unlock_duration,
- } => pbo_delegation_pool_initialize_delegation_pool_with_amount(
- multisig_admin,
- amount,
- operator_commission_percentage,
- delegation_pool_creation_seed,
- delegator_address,
- principle_stake,
- unlock_numerators,
- unlock_denominator,
- unlock_start_time,
- unlock_duration,
- ),
- PboDelegationPoolInitializeDelegationPoolWithAmountWithoutMultisigAdmin {
- amount,
- operator_commission_percentage,
- delegation_pool_creation_seed,
- delegator_address,
- principle_stake,
- unlock_numerators,
- unlock_denominator,
- unlock_start_time,
- unlock_duration,
- } => pbo_delegation_pool_initialize_delegation_pool_with_amount_without_multisig_admin(
- amount,
- operator_commission_percentage,
- delegation_pool_creation_seed,
- delegator_address,
- principle_stake,
- unlock_numerators,
- unlock_denominator,
- unlock_start_time,
- unlock_duration,
- ),
- PboDelegationPoolLockDelegatorsStakes {
- pool_address,
- delegators,
- new_principle_stakes,
- } => pbo_delegation_pool_lock_delegators_stakes(
- pool_address,
- delegators,
- new_principle_stakes,
- ),
- PboDelegationPoolReactivateStake {
- pool_address,
- amount,
- } => pbo_delegation_pool_reactivate_stake(pool_address, amount),
- PboDelegationPoolReplaceDelegator {
- pool_address,
- old_delegator,
- new_delegator,
- } => pbo_delegation_pool_replace_delegator(pool_address, old_delegator, new_delegator),
- PboDelegationPoolSetBeneficiaryForOperator { new_beneficiary } => {
- pbo_delegation_pool_set_beneficiary_for_operator(new_beneficiary)
- },
- PboDelegationPoolSetDelegatedVoter { new_voter } => {
- pbo_delegation_pool_set_delegated_voter(new_voter)
- },
- PboDelegationPoolSetOperator { new_operator } => {
- pbo_delegation_pool_set_operator(new_operator)
- },
- PboDelegationPoolSynchronizeDelegationPool { pool_address } => {
- pbo_delegation_pool_synchronize_delegation_pool(pool_address)
- },
- PboDelegationPoolUnlock {
- pool_address,
- amount,
- } => pbo_delegation_pool_unlock(pool_address, amount),
- PboDelegationPoolUpdateCommissionPercentage {
- new_commission_percentage,
- } => pbo_delegation_pool_update_commission_percentage(new_commission_percentage),
- PboDelegationPoolUpdateUnlockingSchedule {
- pool_address,
- unlock_numerators,
- unlock_denominator,
- unlock_start_time,
- unlock_duration,
- } => pbo_delegation_pool_update_unlocking_schedule(
- pool_address,
- unlock_numerators,
- unlock_denominator,
- unlock_start_time,
- unlock_duration,
- ),
- PboDelegationPoolUpdateUnlockingScheduleUnchecked {
- pool_address,
- unlock_numerators,
- unlock_denominator,
- unlock_start_time,
- unlock_duration,
- last_unlock_period,
- } => pbo_delegation_pool_update_unlocking_schedule_unchecked(
- pool_address,
- unlock_numerators,
- unlock_denominator,
- unlock_start_time,
- unlock_duration,
- last_unlock_period,
- ),
- PboDelegationPoolWithdraw {
- pool_address,
- amount,
- } => pbo_delegation_pool_withdraw(pool_address, amount),
- ResourceAccountCreateResourceAccount {
- seed,
- optional_auth_key,
- } => resource_account_create_resource_account(seed, optional_auth_key),
- ResourceAccountCreateResourceAccountAndFund {
- seed,
- optional_auth_key,
- fund_amount,
- } => resource_account_create_resource_account_and_fund(
- seed,
- optional_auth_key,
- fund_amount,
- ),
- ResourceAccountCreateResourceAccountAndPublishPackage {
- seed,
- metadata_serialized,
- code,
- } => resource_account_create_resource_account_and_publish_package(
- seed,
- metadata_serialized,
- code,
- ),
- StakeAddStake { amount } => stake_add_stake(amount),
- StakeIncreaseLockup {} => stake_increase_lockup(),
- StakeInitializeStakeOwner {
- initial_stake_amount,
- operator,
- voter,
- } => stake_initialize_stake_owner(initial_stake_amount, operator, voter),
- StakeInitializeValidator {
- consensus_pubkey,
- network_addresses,
- fullnode_addresses,
- } => {
- stake_initialize_validator(consensus_pubkey, network_addresses, fullnode_addresses)
- },
- StakeJoinValidatorSet { pool_address } => stake_join_validator_set(pool_address),
- StakeLeaveValidatorSet { pool_address } => stake_leave_validator_set(pool_address),
- StakeReactivateStake { amount } => stake_reactivate_stake(amount),
- StakeRotateConsensusKey {
- pool_address,
- new_consensus_pubkey,
- } => stake_rotate_consensus_key(pool_address, new_consensus_pubkey),
- StakeSetDelegatedVoter { new_voter } => stake_set_delegated_voter(new_voter),
- StakeSetOperator { new_operator } => stake_set_operator(new_operator),
- StakeUnlock { amount } => stake_unlock(amount),
- StakeUpdateNetworkAndFullnodeAddresses {
- pool_address,
- new_network_addresses,
- new_fullnode_addresses,
- } => stake_update_network_and_fullnode_addresses(
- pool_address,
- new_network_addresses,
- new_fullnode_addresses,
- ),
- StakeWithdraw { withdraw_amount } => stake_withdraw(withdraw_amount),
- StakingContractAddStake { operator, amount } => {
- staking_contract_add_stake(operator, amount)
- },
- StakingContractCreateStakingContract {
- operator,
- voter,
- amount,
- commission_percentage,
- contract_creation_seed,
- } => staking_contract_create_staking_contract(
- operator,
- voter,
- amount,
- commission_percentage,
- contract_creation_seed,
- ),
- StakingContractDistribute { staker, operator } => {
- staking_contract_distribute(staker, operator)
- },
- StakingContractRequestCommission { staker, operator } => {
- staking_contract_request_commission(staker, operator)
- },
- StakingContractResetLockup { operator } => staking_contract_reset_lockup(operator),
- StakingContractSetBeneficiaryForOperator { new_beneficiary } => {
- staking_contract_set_beneficiary_for_operator(new_beneficiary)
- },
- StakingContractSwitchOperator {
- old_operator,
- new_operator,
- new_commission_percentage,
- } => staking_contract_switch_operator(
- old_operator,
- new_operator,
- new_commission_percentage,
- ),
- StakingContractSwitchOperatorWithSameCommission {
- old_operator,
- new_operator,
- } => staking_contract_switch_operator_with_same_commission(old_operator, new_operator),
- StakingContractUnlockRewards { operator } => staking_contract_unlock_rewards(operator),
- StakingContractUnlockStake { operator, amount } => {
- staking_contract_unlock_stake(operator, amount)
- },
- StakingContractUpdateCommision {
- operator,
- new_commission_percentage,
- } => staking_contract_update_commision(operator, new_commission_percentage),
- StakingContractUpdateVoter {
- operator,
- new_voter,
- } => staking_contract_update_voter(operator, new_voter),
- StakingProxySetOperator {
- old_operator,
- new_operator,
- } => staking_proxy_set_operator(old_operator, new_operator),
- StakingProxySetStakePoolOperator { new_operator } => {
- staking_proxy_set_stake_pool_operator(new_operator)
- },
- StakingProxySetStakePoolVoter { new_voter } => {
- staking_proxy_set_stake_pool_voter(new_voter)
- },
- StakingProxySetStakingContractOperator {
- old_operator,
- new_operator,
- } => staking_proxy_set_staking_contract_operator(old_operator, new_operator),
- StakingProxySetStakingContractVoter {
- operator,
- new_voter,
- } => staking_proxy_set_staking_contract_voter(operator, new_voter),
- StakingProxySetVestingContractOperator {
- old_operator,
- new_operator,
- } => staking_proxy_set_vesting_contract_operator(old_operator, new_operator),
- StakingProxySetVestingContractVoter {
- operator,
- new_voter,
- } => staking_proxy_set_vesting_contract_voter(operator, new_voter),
- StakingProxySetVoter {
- operator,
- new_voter,
- } => staking_proxy_set_voter(operator, new_voter),
- SupraAccountBatchTransfer {
- recipients,
- amounts,
- } => supra_account_batch_transfer(recipients, amounts),
- SupraAccountBatchTransferCoins {
- coin_type,
- recipients,
- amounts,
- } => supra_account_batch_transfer_coins(coin_type, recipients, amounts),
- SupraAccountCreateAccount { auth_key } => supra_account_create_account(auth_key),
- SupraAccountSetAllowDirectCoinTransfers { allow } => {
- supra_account_set_allow_direct_coin_transfers(allow)
- },
- SupraAccountTransfer { to, amount } => supra_account_transfer(to, amount),
- SupraAccountTransferCoins {
- coin_type,
- to,
- amount,
- } => supra_account_transfer_coins(coin_type, to, amount),
- SupraCoinClaimMintCapability {} => supra_coin_claim_mint_capability(),
- SupraCoinDelegateMintCapability { to } => supra_coin_delegate_mint_capability(to),
- SupraCoinMint { dst_addr, amount } => supra_coin_mint(dst_addr, amount),
- SupraGovernanceAddSupraApprovedScriptHashScript { proposal_id } => {
- supra_governance_add_supra_approved_script_hash_script(proposal_id)
- },
- SupraGovernanceForceEndEpoch {} => supra_governance_force_end_epoch(),
- SupraGovernanceForceEndEpochTestOnly {} => supra_governance_force_end_epoch_test_only(),
- SupraGovernanceReconfigure {} => supra_governance_reconfigure(),
- SupraGovernanceSupraCreateProposal {
- execution_hash,
- metadata_location,
- metadata_hash,
- } => supra_governance_supra_create_proposal(
- execution_hash,
- metadata_location,
- metadata_hash,
- ),
- SupraGovernanceSupraCreateProposalV2 {
- execution_hash,
- metadata_location,
- metadata_hash,
- is_multi_step_proposal,
- } => supra_governance_supra_create_proposal_v2(
- execution_hash,
- metadata_location,
- metadata_hash,
- is_multi_step_proposal,
- ),
- SupraGovernanceSupraVote {
- proposal_id,
- should_pass,
- } => supra_governance_supra_vote(proposal_id, should_pass),
- TransactionFeeConvertToAptosFaBurnRef {} => {
- transaction_fee_convert_to_aptos_fa_burn_ref()
- },
- VersionSetForNextEpoch { major } => version_set_for_next_epoch(major),
- VersionSetVersion { major } => version_set_version(major),
- VestingAdminWithdraw { contract_address } => vesting_admin_withdraw(contract_address),
- VestingDistribute { contract_address } => vesting_distribute(contract_address),
- VestingDistributeMany { contract_addresses } => {
- vesting_distribute_many(contract_addresses)
- },
- VestingResetBeneficiary {
- contract_address,
- shareholder,
- } => vesting_reset_beneficiary(contract_address, shareholder),
- VestingResetLockup { contract_address } => vesting_reset_lockup(contract_address),
- VestingSetBeneficiary {
- contract_address,
- shareholder,
- new_beneficiary,
- } => vesting_set_beneficiary(contract_address, shareholder, new_beneficiary),
- VestingSetBeneficiaryForOperator { new_beneficiary } => {
- vesting_set_beneficiary_for_operator(new_beneficiary)
- },
- VestingSetBeneficiaryResetter {
- contract_address,
- beneficiary_resetter,
- } => vesting_set_beneficiary_resetter(contract_address, beneficiary_resetter),
- VestingSetManagementRole {
- contract_address,
- role,
- role_holder,
- } => vesting_set_management_role(contract_address, role, role_holder),
- VestingTerminateVestingContract { contract_address } => {
- vesting_terminate_vesting_contract(contract_address)
- },
- VestingUnlockRewards { contract_address } => vesting_unlock_rewards(contract_address),
- VestingUnlockRewardsMany { contract_addresses } => {
- vesting_unlock_rewards_many(contract_addresses)
- },
- VestingUpdateCommissionPercentage {
- contract_address,
- new_commission_percentage,
- } => vesting_update_commission_percentage(contract_address, new_commission_percentage),
- VestingUpdateOperator {
- contract_address,
- new_operator,
- commission_percentage,
- } => vesting_update_operator(contract_address, new_operator, commission_percentage),
- VestingUpdateOperatorWithSameCommission {
- contract_address,
- new_operator,
- } => vesting_update_operator_with_same_commission(contract_address, new_operator),
- VestingUpdateVoter {
- contract_address,
- new_voter,
- } => vesting_update_voter(contract_address, new_voter),
- VestingVest { contract_address } => vesting_vest(contract_address),
- VestingVestMany { contract_addresses } => vesting_vest_many(contract_addresses),
- VestingWithoutStakingAdminDelayVesting {
- contract_address,
- delay_periods,
- } => vesting_without_staking_admin_delay_vesting(contract_address, delay_periods),
- VestingWithoutStakingAdminWithdraw { contract_address } => {
- vesting_without_staking_admin_withdraw(contract_address)
- },
- VestingWithoutStakingCreateVestingContractWithAmounts {
- shareholders,
- shares,
- vesting_numerators,
- vesting_denominator,
- start_timestamp_secs,
- period_duration,
- withdrawal_address,
- contract_creation_seed,
- } => vesting_without_staking_create_vesting_contract_with_amounts(
- shareholders,
- shares,
- vesting_numerators,
- vesting_denominator,
- start_timestamp_secs,
- period_duration,
- withdrawal_address,
- contract_creation_seed,
- ),
- VestingWithoutStakingRemoveShareholder {
- contract_address,
- shareholder_address,
- } => vesting_without_staking_remove_shareholder(contract_address, shareholder_address),
- VestingWithoutStakingResetBeneficiary {
- contract_address,
- shareholder,
- } => vesting_without_staking_reset_beneficiary(contract_address, shareholder),
- VestingWithoutStakingSetBeneficiary {
- contract_address,
- shareholder,
- new_beneficiary,
- } => vesting_without_staking_set_beneficiary(
- contract_address,
- shareholder,
- new_beneficiary,
- ),
- VestingWithoutStakingSetBeneficiaryResetter {
- contract_address,
- beneficiary_resetter,
- } => vesting_without_staking_set_beneficiary_resetter(
- contract_address,
- beneficiary_resetter,
- ),
- VestingWithoutStakingSetManagementRole {
- contract_address,
- role,
- role_holder,
- } => vesting_without_staking_set_management_role(contract_address, role, role_holder),
- VestingWithoutStakingSetVestingSchedule {
- contract_address,
- vesting_numerators,
- vesting_denominator,
- period_duration,
- } => vesting_without_staking_set_vesting_schedule(
- contract_address,
- vesting_numerators,
- vesting_denominator,
- period_duration,
- ),
- VestingWithoutStakingTerminateVestingContract { contract_address } => {
- vesting_without_staking_terminate_vesting_contract(contract_address)
- },
- VestingWithoutStakingVest { contract_address } => {
- vesting_without_staking_vest(contract_address)
- },
- VestingWithoutStakingVestIndividual {
- contract_address,
- shareholder_address,
- } => vesting_without_staking_vest_individual(contract_address, shareholder_address),
+ AccountOfferRotationCapability{rotation_capability_sig_bytes, account_scheme, account_public_key_bytes, recipient_address} => account_offer_rotation_capability(rotation_capability_sig_bytes, account_scheme, account_public_key_bytes, recipient_address),
+ AccountOfferSignerCapability{signer_capability_sig_bytes, account_scheme, account_public_key_bytes, recipient_address} => account_offer_signer_capability(signer_capability_sig_bytes, account_scheme, account_public_key_bytes, recipient_address),
+ AccountRevokeAnyRotationCapability{} => account_revoke_any_rotation_capability(),
+ AccountRevokeAnySignerCapability{} => account_revoke_any_signer_capability(),
+ AccountRevokeRotationCapability{to_be_revoked_address} => account_revoke_rotation_capability(to_be_revoked_address),
+ AccountRevokeSignerCapability{to_be_revoked_address} => account_revoke_signer_capability(to_be_revoked_address),
+ AccountRotateAuthenticationKey{from_scheme, from_public_key_bytes, to_scheme, to_public_key_bytes, cap_rotate_key, cap_update_table} => account_rotate_authentication_key(from_scheme, from_public_key_bytes, to_scheme, to_public_key_bytes, cap_rotate_key, cap_update_table),
+ AccountRotateAuthenticationKeyCall{new_auth_key} => account_rotate_authentication_key_call(new_auth_key),
+ AccountRotateAuthenticationKeyWithRotationCapability{rotation_cap_offerer_address, new_scheme, new_public_key_bytes, cap_update_table} => account_rotate_authentication_key_with_rotation_capability(rotation_cap_offerer_address, new_scheme, new_public_key_bytes, cap_update_table),
+ AutomationRegistryCancelSystemTask{task_index} => automation_registry_cancel_system_task(task_index),
+ AutomationRegistryCancelTask{task_index} => automation_registry_cancel_task(task_index),
+ AutomationRegistryStopSystemTasks{task_indexes} => automation_registry_stop_system_tasks(task_indexes),
+ AutomationRegistryStopTasks{task_indexes} => automation_registry_stop_tasks(task_indexes),
+ CodePublishPackageTxn{metadata_serialized, code} => code_publish_package_txn(metadata_serialized, code),
+ CoinCreateCoinConversionMap{} => coin_create_coin_conversion_map(),
+ CoinCreatePairing{coin_type} => coin_create_pairing(coin_type),
+ CoinMigrateToFungibleStore{coin_type} => coin_migrate_to_fungible_store(coin_type),
+ CoinTransfer{coin_type, to, amount} => coin_transfer(coin_type, to, amount),
+ CoinUpgradeSupply{coin_type} => coin_upgrade_supply(coin_type),
+ CommitteeMapRemoveCommittee{com_store_addr, id} => committee_map_remove_committee(com_store_addr, id),
+ CommitteeMapRemoveCommitteeBulk{com_store_addr, ids} => committee_map_remove_committee_bulk(com_store_addr, ids),
+ CommitteeMapRemoveCommitteeMember{com_store_addr, id, node_address} => committee_map_remove_committee_member(com_store_addr, id, node_address),
+ CommitteeMapUpdateDkgFlag{com_store_addr, com_id, flag_value} => committee_map_update_dkg_flag(com_store_addr, com_id, flag_value),
+ CommitteeMapUpsertCommittee{com_store_addr, id, node_addresses, ip_public_address, node_public_key, network_public_key, cg_public_key, network_port, rpc_port, committee_type} => committee_map_upsert_committee(com_store_addr, id, node_addresses, ip_public_address, node_public_key, network_public_key, cg_public_key, network_port, rpc_port, committee_type),
+ CommitteeMapUpsertCommitteeBulk{com_store_addr, ids, node_addresses_bulk, ip_public_address_bulk, node_public_key_bulk, network_public_key_bulk, cg_public_key_bulk, network_port_bulk, rpc_por_bulkt, committee_types} => committee_map_upsert_committee_bulk(com_store_addr, ids, node_addresses_bulk, ip_public_address_bulk, node_public_key_bulk, network_public_key_bulk, cg_public_key_bulk, network_port_bulk, rpc_por_bulkt, committee_types),
+ CommitteeMapUpsertCommitteeMember{com_store_addr, id, node_address, ip_public_address, node_public_key, network_public_key, cg_public_key, network_port, rpc_port} => committee_map_upsert_committee_member(com_store_addr, id, node_address, ip_public_address, node_public_key, network_public_key, cg_public_key, network_port, rpc_port),
+ CommitteeMapUpsertCommitteeMemberBulk{com_store_addr, ids, node_addresses, ip_public_address, node_public_key, network_public_key, cg_public_key, network_port, rpc_port} => committee_map_upsert_committee_member_bulk(com_store_addr, ids, node_addresses, ip_public_address, node_public_key, network_public_key, cg_public_key, network_port, rpc_port),
+ ManagedCoinBurn{coin_type, amount} => managed_coin_burn(coin_type, amount),
+ ManagedCoinInitialize{coin_type, name, symbol, decimals, monitor_supply} => managed_coin_initialize(coin_type, name, symbol, decimals, monitor_supply),
+ ManagedCoinMint{coin_type, dst_addr, amount} => managed_coin_mint(coin_type, dst_addr, amount),
+ ManagedCoinRegister{coin_type} => managed_coin_register(coin_type),
+ MultisigAccountAddOwner{new_owner} => multisig_account_add_owner(new_owner),
+ MultisigAccountAddOwners{new_owners} => multisig_account_add_owners(new_owners),
+ MultisigAccountAddOwnersAndUpdateSignaturesRequired{new_owners, new_num_signatures_required} => multisig_account_add_owners_and_update_signatures_required(new_owners, new_num_signatures_required),
+ MultisigAccountApproveTransaction{multisig_account, sequence_number} => multisig_account_approve_transaction(multisig_account, sequence_number),
+ MultisigAccountCreate{num_signatures_required, metadata_keys, metadata_values, timeout_duration} => multisig_account_create(num_signatures_required, metadata_keys, metadata_values, timeout_duration),
+ MultisigAccountCreateTransaction{multisig_account, payload} => multisig_account_create_transaction(multisig_account, payload),
+ MultisigAccountCreateTransactionWithHash{multisig_account, payload_hash} => multisig_account_create_transaction_with_hash(multisig_account, payload_hash),
+ MultisigAccountCreateWithExistingAccount{multisig_address, owners, num_signatures_required, account_scheme, account_public_key, create_multisig_account_signed_message, metadata_keys, metadata_values, timeout_duration} => multisig_account_create_with_existing_account(multisig_address, owners, num_signatures_required, account_scheme, account_public_key, create_multisig_account_signed_message, metadata_keys, metadata_values, timeout_duration),
+ MultisigAccountCreateWithExistingAccountAndRevokeAuthKey{multisig_address, owners, num_signatures_required, account_scheme, account_public_key, create_multisig_account_signed_message, metadata_keys, metadata_values, timeout_duration} => multisig_account_create_with_existing_account_and_revoke_auth_key(multisig_address, owners, num_signatures_required, account_scheme, account_public_key, create_multisig_account_signed_message, metadata_keys, metadata_values, timeout_duration),
+ MultisigAccountCreateWithOwners{additional_owners, num_signatures_required, metadata_keys, metadata_values, timeout_duration} => multisig_account_create_with_owners(additional_owners, num_signatures_required, metadata_keys, metadata_values, timeout_duration),
+ MultisigAccountCreateWithOwnersThenRemoveBootstrapper{owners, num_signatures_required, metadata_keys, metadata_values, timeout_duration} => multisig_account_create_with_owners_then_remove_bootstrapper(owners, num_signatures_required, metadata_keys, metadata_values, timeout_duration),
+ MultisigAccountExecuteRejectedTransaction{multisig_account} => multisig_account_execute_rejected_transaction(multisig_account),
+ MultisigAccountExecuteRejectedTransactions{multisig_account, final_sequence_number} => multisig_account_execute_rejected_transactions(multisig_account, final_sequence_number),
+ MultisigAccountRejectTransaction{multisig_account, sequence_number} => multisig_account_reject_transaction(multisig_account, sequence_number),
+ MultisigAccountRemoveOwner{owner_to_remove} => multisig_account_remove_owner(owner_to_remove),
+ MultisigAccountRemoveOwners{owners_to_remove} => multisig_account_remove_owners(owners_to_remove),
+ MultisigAccountSwapOwner{to_swap_in, to_swap_out} => multisig_account_swap_owner(to_swap_in, to_swap_out),
+ MultisigAccountSwapOwners{to_swap_in, to_swap_out} => multisig_account_swap_owners(to_swap_in, to_swap_out),
+ MultisigAccountSwapOwnersAndUpdateSignaturesRequired{new_owners, owners_to_remove, new_num_signatures_required} => multisig_account_swap_owners_and_update_signatures_required(new_owners, owners_to_remove, new_num_signatures_required),
+ MultisigAccountUpdateMetadata{keys, values} => multisig_account_update_metadata(keys, values),
+ MultisigAccountUpdateSignaturesRequired{new_num_signatures_required} => multisig_account_update_signatures_required(new_num_signatures_required),
+ MultisigAccountUpdateTimeoutDuration{timeout_duration} => multisig_account_update_timeout_duration(timeout_duration),
+ MultisigAccountVoteTransaction{multisig_account, sequence_number, approved} => multisig_account_vote_transaction(multisig_account, sequence_number, approved),
+ MultisigAccountVoteTransactions{multisig_account, starting_sequence_number, final_sequence_number, approved} => multisig_account_vote_transactions(multisig_account, starting_sequence_number, final_sequence_number, approved),
+ MultisigAccountVoteTransanction{multisig_account, sequence_number, approved} => multisig_account_vote_transanction(multisig_account, sequence_number, approved),
+ ObjectTransferCall{object, to} => object_transfer_call(object, to),
+ ObjectCodeDeploymentPublish{metadata_serialized, code} => object_code_deployment_publish(metadata_serialized, code),
+ PboDelegationPoolAddStake{pool_address, amount} => pbo_delegation_pool_add_stake(pool_address, amount),
+ PboDelegationPoolAdminIncreaseLastUnlockPeriod{pool_address, additional_periods} => pbo_delegation_pool_admin_increase_last_unlock_period(pool_address, additional_periods),
+ PboDelegationPoolDelegateVotingPower{pool_address, new_voter} => pbo_delegation_pool_delegate_voting_power(pool_address, new_voter),
+ PboDelegationPoolEnablePartialGovernanceVoting{pool_address} => pbo_delegation_pool_enable_partial_governance_voting(pool_address),
+ PboDelegationPoolFundDelegatorsWithLockedStake{pool_address, delegators, stakes} => pbo_delegation_pool_fund_delegators_with_locked_stake(pool_address, delegators, stakes),
+ PboDelegationPoolFundDelegatorsWithStake{pool_address, delegators, stakes} => pbo_delegation_pool_fund_delegators_with_stake(pool_address, delegators, stakes),
+ PboDelegationPoolInitializeDelegationPoolWithAmount{multisig_admin, amount, operator_commission_percentage, delegation_pool_creation_seed, delegator_address, principle_stake, unlock_numerators, unlock_denominator, unlock_start_time, unlock_duration} => pbo_delegation_pool_initialize_delegation_pool_with_amount(multisig_admin, amount, operator_commission_percentage, delegation_pool_creation_seed, delegator_address, principle_stake, unlock_numerators, unlock_denominator, unlock_start_time, unlock_duration),
+ PboDelegationPoolInitializeDelegationPoolWithAmountWithoutMultisigAdmin{amount, operator_commission_percentage, delegation_pool_creation_seed, delegator_address, principle_stake, unlock_numerators, unlock_denominator, unlock_start_time, unlock_duration} => pbo_delegation_pool_initialize_delegation_pool_with_amount_without_multisig_admin(amount, operator_commission_percentage, delegation_pool_creation_seed, delegator_address, principle_stake, unlock_numerators, unlock_denominator, unlock_start_time, unlock_duration),
+ PboDelegationPoolLockDelegatorsStakes{pool_address, delegators, new_principle_stakes} => pbo_delegation_pool_lock_delegators_stakes(pool_address, delegators, new_principle_stakes),
+ PboDelegationPoolReactivateStake{pool_address, amount} => pbo_delegation_pool_reactivate_stake(pool_address, amount),
+ PboDelegationPoolReplaceDelegator{pool_address, old_delegator, new_delegator} => pbo_delegation_pool_replace_delegator(pool_address, old_delegator, new_delegator),
+ PboDelegationPoolSetBeneficiaryForOperator{new_beneficiary} => pbo_delegation_pool_set_beneficiary_for_operator(new_beneficiary),
+ PboDelegationPoolSetDelegatedVoter{new_voter} => pbo_delegation_pool_set_delegated_voter(new_voter),
+ PboDelegationPoolSetOperator{new_operator} => pbo_delegation_pool_set_operator(new_operator),
+ PboDelegationPoolSynchronizeDelegationPool{pool_address} => pbo_delegation_pool_synchronize_delegation_pool(pool_address),
+ PboDelegationPoolUnlock{pool_address, amount} => pbo_delegation_pool_unlock(pool_address, amount),
+ PboDelegationPoolUpdateCommissionPercentage{new_commission_percentage} => pbo_delegation_pool_update_commission_percentage(new_commission_percentage),
+ PboDelegationPoolUpdateUnlockingSchedule{pool_address, unlock_numerators, unlock_denominator, unlock_start_time, unlock_duration} => pbo_delegation_pool_update_unlocking_schedule(pool_address, unlock_numerators, unlock_denominator, unlock_start_time, unlock_duration),
+ PboDelegationPoolUpdateUnlockingScheduleUnchecked{pool_address, unlock_numerators, unlock_denominator, unlock_start_time, unlock_duration, last_unlock_period} => pbo_delegation_pool_update_unlocking_schedule_unchecked(pool_address, unlock_numerators, unlock_denominator, unlock_start_time, unlock_duration, last_unlock_period),
+ PboDelegationPoolWithdraw{pool_address, amount} => pbo_delegation_pool_withdraw(pool_address, amount),
+ ResourceAccountCreateResourceAccount{seed, optional_auth_key} => resource_account_create_resource_account(seed, optional_auth_key),
+ ResourceAccountCreateResourceAccountAndFund{seed, optional_auth_key, fund_amount} => resource_account_create_resource_account_and_fund(seed, optional_auth_key, fund_amount),
+ ResourceAccountCreateResourceAccountAndPublishPackage{seed, metadata_serialized, code} => resource_account_create_resource_account_and_publish_package(seed, metadata_serialized, code),
+ StakeAddStake{amount} => stake_add_stake(amount),
+ StakeIncreaseLockup{} => stake_increase_lockup(),
+ StakeInitializeStakeOwner{initial_stake_amount, operator, voter} => stake_initialize_stake_owner(initial_stake_amount, operator, voter),
+ StakeInitializeValidator{consensus_pubkey, network_addresses, fullnode_addresses} => stake_initialize_validator(consensus_pubkey, network_addresses, fullnode_addresses),
+ StakeJoinValidatorSet{pool_address} => stake_join_validator_set(pool_address),
+ StakeLeaveValidatorSet{pool_address} => stake_leave_validator_set(pool_address),
+ StakeReactivateStake{amount} => stake_reactivate_stake(amount),
+ StakeRotateConsensusKey{pool_address, new_consensus_pubkey} => stake_rotate_consensus_key(pool_address, new_consensus_pubkey),
+ StakeSetDelegatedVoter{new_voter} => stake_set_delegated_voter(new_voter),
+ StakeSetOperator{new_operator} => stake_set_operator(new_operator),
+ StakeUnlock{amount} => stake_unlock(amount),
+ StakeUpdateNetworkAndFullnodeAddresses{pool_address, new_network_addresses, new_fullnode_addresses} => stake_update_network_and_fullnode_addresses(pool_address, new_network_addresses, new_fullnode_addresses),
+ StakeWithdraw{withdraw_amount} => stake_withdraw(withdraw_amount),
+ StakingContractAddStake{operator, amount} => staking_contract_add_stake(operator, amount),
+ StakingContractCreateStakingContract{operator, voter, amount, commission_percentage, contract_creation_seed} => staking_contract_create_staking_contract(operator, voter, amount, commission_percentage, contract_creation_seed),
+ StakingContractDistribute{staker, operator} => staking_contract_distribute(staker, operator),
+ StakingContractRequestCommission{staker, operator} => staking_contract_request_commission(staker, operator),
+ StakingContractResetLockup{operator} => staking_contract_reset_lockup(operator),
+ StakingContractSetBeneficiaryForOperator{new_beneficiary} => staking_contract_set_beneficiary_for_operator(new_beneficiary),
+ StakingContractSwitchOperator{old_operator, new_operator, new_commission_percentage} => staking_contract_switch_operator(old_operator, new_operator, new_commission_percentage),
+ StakingContractSwitchOperatorWithSameCommission{old_operator, new_operator} => staking_contract_switch_operator_with_same_commission(old_operator, new_operator),
+ StakingContractUnlockRewards{operator} => staking_contract_unlock_rewards(operator),
+ StakingContractUnlockStake{operator, amount} => staking_contract_unlock_stake(operator, amount),
+ StakingContractUpdateCommision{operator, new_commission_percentage} => staking_contract_update_commision(operator, new_commission_percentage),
+ StakingContractUpdateVoter{operator, new_voter} => staking_contract_update_voter(operator, new_voter),
+ StakingProxySetOperator{old_operator, new_operator} => staking_proxy_set_operator(old_operator, new_operator),
+ StakingProxySetStakePoolOperator{new_operator} => staking_proxy_set_stake_pool_operator(new_operator),
+ StakingProxySetStakePoolVoter{new_voter} => staking_proxy_set_stake_pool_voter(new_voter),
+ StakingProxySetStakingContractOperator{old_operator, new_operator} => staking_proxy_set_staking_contract_operator(old_operator, new_operator),
+ StakingProxySetStakingContractVoter{operator, new_voter} => staking_proxy_set_staking_contract_voter(operator, new_voter),
+ StakingProxySetVestingContractOperator{old_operator, new_operator} => staking_proxy_set_vesting_contract_operator(old_operator, new_operator),
+ StakingProxySetVestingContractVoter{operator, new_voter} => staking_proxy_set_vesting_contract_voter(operator, new_voter),
+ StakingProxySetVoter{operator, new_voter} => staking_proxy_set_voter(operator, new_voter),
+ SupraAccountBatchTransfer{recipients, amounts} => supra_account_batch_transfer(recipients, amounts),
+ SupraAccountBatchTransferCoins{coin_type, recipients, amounts} => supra_account_batch_transfer_coins(coin_type, recipients, amounts),
+ SupraAccountCreateAccount{auth_key} => supra_account_create_account(auth_key),
+ SupraAccountSetAllowDirectCoinTransfers{allow} => supra_account_set_allow_direct_coin_transfers(allow),
+ SupraAccountTransfer{to, amount} => supra_account_transfer(to, amount),
+ SupraAccountTransferCoins{coin_type, to, amount} => supra_account_transfer_coins(coin_type, to, amount),
+ SupraCoinClaimMintCapability{} => supra_coin_claim_mint_capability(),
+ SupraCoinDelegateMintCapability{to} => supra_coin_delegate_mint_capability(to),
+ SupraCoinMint{dst_addr, amount} => supra_coin_mint(dst_addr, amount),
+ SupraGovernanceAddSupraApprovedScriptHashScript{proposal_id} => supra_governance_add_supra_approved_script_hash_script(proposal_id),
+ SupraGovernanceForceEndEpoch{} => supra_governance_force_end_epoch(),
+ SupraGovernanceForceEndEpochTestOnly{} => supra_governance_force_end_epoch_test_only(),
+ SupraGovernanceReconfigure{} => supra_governance_reconfigure(),
+ SupraGovernanceSupraCreateProposal{execution_hash, metadata_location, metadata_hash} => supra_governance_supra_create_proposal(execution_hash, metadata_location, metadata_hash),
+ SupraGovernanceSupraCreateProposalV2{execution_hash, metadata_location, metadata_hash, is_multi_step_proposal} => supra_governance_supra_create_proposal_v2(execution_hash, metadata_location, metadata_hash, is_multi_step_proposal),
+ SupraGovernanceSupraVote{proposal_id, should_pass} => supra_governance_supra_vote(proposal_id, should_pass),
+ TransactionFeeConvertToAptosFaBurnRef{} => transaction_fee_convert_to_aptos_fa_burn_ref(),
+ VersionSetForNextEpoch{major} => version_set_for_next_epoch(major),
+ VersionSetVersion{major} => version_set_version(major),
+ VestingAdminWithdraw{contract_address} => vesting_admin_withdraw(contract_address),
+ VestingDistribute{contract_address} => vesting_distribute(contract_address),
+ VestingDistributeMany{contract_addresses} => vesting_distribute_many(contract_addresses),
+ VestingResetBeneficiary{contract_address, shareholder} => vesting_reset_beneficiary(contract_address, shareholder),
+ VestingResetLockup{contract_address} => vesting_reset_lockup(contract_address),
+ VestingSetBeneficiary{contract_address, shareholder, new_beneficiary} => vesting_set_beneficiary(contract_address, shareholder, new_beneficiary),
+ VestingSetBeneficiaryForOperator{new_beneficiary} => vesting_set_beneficiary_for_operator(new_beneficiary),
+ VestingSetBeneficiaryResetter{contract_address, beneficiary_resetter} => vesting_set_beneficiary_resetter(contract_address, beneficiary_resetter),
+ VestingSetManagementRole{contract_address, role, role_holder} => vesting_set_management_role(contract_address, role, role_holder),
+ VestingTerminateVestingContract{contract_address} => vesting_terminate_vesting_contract(contract_address),
+ VestingUnlockRewards{contract_address} => vesting_unlock_rewards(contract_address),
+ VestingUnlockRewardsMany{contract_addresses} => vesting_unlock_rewards_many(contract_addresses),
+ VestingUpdateCommissionPercentage{contract_address, new_commission_percentage} => vesting_update_commission_percentage(contract_address, new_commission_percentage),
+ VestingUpdateOperator{contract_address, new_operator, commission_percentage} => vesting_update_operator(contract_address, new_operator, commission_percentage),
+ VestingUpdateOperatorWithSameCommission{contract_address, new_operator} => vesting_update_operator_with_same_commission(contract_address, new_operator),
+ VestingUpdateVoter{contract_address, new_voter} => vesting_update_voter(contract_address, new_voter),
+ VestingVest{contract_address} => vesting_vest(contract_address),
+ VestingVestMany{contract_addresses} => vesting_vest_many(contract_addresses),
+ VestingWithoutStakingAdminDelayVesting{contract_address, delay_periods} => vesting_without_staking_admin_delay_vesting(contract_address, delay_periods),
+ VestingWithoutStakingAdminWithdraw{contract_address} => vesting_without_staking_admin_withdraw(contract_address),
+ VestingWithoutStakingCreateVestingContractWithAmounts{shareholders, shares, vesting_numerators, vesting_denominator, start_timestamp_secs, period_duration, withdrawal_address, contract_creation_seed} => vesting_without_staking_create_vesting_contract_with_amounts(shareholders, shares, vesting_numerators, vesting_denominator, start_timestamp_secs, period_duration, withdrawal_address, contract_creation_seed),
+ VestingWithoutStakingRemoveShareholder{contract_address, shareholder_address} => vesting_without_staking_remove_shareholder(contract_address, shareholder_address),
+ VestingWithoutStakingResetBeneficiary{contract_address, shareholder} => vesting_without_staking_reset_beneficiary(contract_address, shareholder),
+ VestingWithoutStakingSetBeneficiary{contract_address, shareholder, new_beneficiary} => vesting_without_staking_set_beneficiary(contract_address, shareholder, new_beneficiary),
+ VestingWithoutStakingSetBeneficiaryResetter{contract_address, beneficiary_resetter} => vesting_without_staking_set_beneficiary_resetter(contract_address, beneficiary_resetter),
+ VestingWithoutStakingSetManagementRole{contract_address, role, role_holder} => vesting_without_staking_set_management_role(contract_address, role, role_holder),
+ VestingWithoutStakingSetVestingSchedule{contract_address, vesting_numerators, vesting_denominator, period_duration} => vesting_without_staking_set_vesting_schedule(contract_address, vesting_numerators, vesting_denominator, period_duration),
+ VestingWithoutStakingTerminateVestingContract{contract_address} => vesting_without_staking_terminate_vesting_contract(contract_address),
+ VestingWithoutStakingVest{contract_address} => vesting_without_staking_vest(contract_address),
+ VestingWithoutStakingVestIndividual{contract_address, shareholder_address} => vesting_without_staking_vest_individual(contract_address, shareholder_address),
}
}
+
/// Try to recognize an Aptos `TransactionPayload` and convert it into a structured object `EntryFunctionCall`.
pub fn decode(payload: &TransactionPayload) -> Option {
if let TransactionPayload::EntryFunction(script) = payload {
- match SCRIPT_FUNCTION_DECODER_MAP.get(&format!(
- "{}_{}",
- script.module().name(),
- script.function()
- )) {
+ match SCRIPT_FUNCTION_DECODER_MAP.get(&format!("{}_{}", script.module().name(), script.function())) {
Some(decoder) => decoder(payload),
None => None,
}
@@ -2110,6 +1468,7 @@ impl EntryFunctionCall {
None
}
}
+
}
/// Offers rotation capability on behalf of `account` to the account at address `recipient_address`.
@@ -2129,28 +1488,15 @@ impl EntryFunctionCall {
/// @param account_public_key_bytes is the public key of the account owner.
/// @param recipient_address is the address of the recipient of the rotation capability - note that if there's an existing rotation capability
/// offer, calling this function will replace the previous `recipient_address` upon successful verification.
-pub fn account_offer_rotation_capability(
- rotation_capability_sig_bytes: Vec,
- account_scheme: u8,
- account_public_key_bytes: Vec,
- recipient_address: AccountAddress,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("account").to_owned(),
- ),
+pub fn account_offer_rotation_capability(rotation_capability_sig_bytes: Vec, account_scheme: u8, account_public_key_bytes: Vec, recipient_address: AccountAddress) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("account").to_owned(),
+ ),
ident_str!("offer_rotation_capability").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&rotation_capability_sig_bytes).unwrap(),
- bcs::to_bytes(&account_scheme).unwrap(),
- bcs::to_bytes(&account_public_key_bytes).unwrap(),
- bcs::to_bytes(&recipient_address).unwrap(),
- ],
+ vec![bcs::to_bytes(&rotation_capability_sig_bytes).unwrap(), bcs::to_bytes(&account_scheme).unwrap(), bcs::to_bytes(&account_public_key_bytes).unwrap(), bcs::to_bytes(&recipient_address).unwrap()],
))
}
@@ -2163,28 +1509,15 @@ pub fn account_offer_rotation_capability(
/// `recipient_address` in the account owner's `SignerCapabilityOffer`, this will replace the
/// previous `recipient_address` upon successful verification (the previous recipient will no longer have access
/// to the account owner's signer capability).
-pub fn account_offer_signer_capability(
- signer_capability_sig_bytes: Vec,
- account_scheme: u8,
- account_public_key_bytes: Vec,
- recipient_address: AccountAddress,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("account").to_owned(),
- ),
+pub fn account_offer_signer_capability(signer_capability_sig_bytes: Vec, account_scheme: u8, account_public_key_bytes: Vec, recipient_address: AccountAddress) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("account").to_owned(),
+ ),
ident_str!("offer_signer_capability").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&signer_capability_sig_bytes).unwrap(),
- bcs::to_bytes(&account_scheme).unwrap(),
- bcs::to_bytes(&account_public_key_bytes).unwrap(),
- bcs::to_bytes(&recipient_address).unwrap(),
- ],
+ vec![bcs::to_bytes(&signer_capability_sig_bytes).unwrap(), bcs::to_bytes(&account_scheme).unwrap(), bcs::to_bytes(&account_public_key_bytes).unwrap(), bcs::to_bytes(&recipient_address).unwrap()],
))
}
@@ -2192,12 +1525,9 @@ pub fn account_offer_signer_capability(
pub fn account_revoke_any_rotation_capability() -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("account").to_owned(),
+ ),
ident_str!("revoke_any_rotation_capability").to_owned(),
vec![],
vec![],
@@ -2208,12 +1538,9 @@ pub fn account_revoke_any_rotation_capability() -> TransactionPayload {
pub fn account_revoke_any_signer_capability() -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("account").to_owned(),
+ ),
ident_str!("revoke_any_signer_capability").to_owned(),
vec![],
vec![],
@@ -2221,17 +1548,12 @@ pub fn account_revoke_any_signer_capability() -> TransactionPayload {
}
/// Revoke the rotation capability offer given to `to_be_revoked_recipient_address` from `account`
-pub fn account_revoke_rotation_capability(
- to_be_revoked_address: AccountAddress,
-) -> TransactionPayload {
+pub fn account_revoke_rotation_capability(to_be_revoked_address: AccountAddress) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("account").to_owned(),
+ ),
ident_str!("revoke_rotation_capability").to_owned(),
vec![],
vec![bcs::to_bytes(&to_be_revoked_address).unwrap()],
@@ -2240,17 +1562,12 @@ pub fn account_revoke_rotation_capability(
/// Revoke the account owner's signer capability offer for `to_be_revoked_address` (i.e., the address that
/// has a signer capability offer from `account` but will be revoked in this function).
-pub fn account_revoke_signer_capability(
- to_be_revoked_address: AccountAddress,
-) -> TransactionPayload {
+pub fn account_revoke_signer_capability(to_be_revoked_address: AccountAddress) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("account").to_owned(),
+ ),
ident_str!("revoke_signer_capability").to_owned(),
vec![],
vec![bcs::to_bytes(&to_be_revoked_address).unwrap()],
@@ -2285,32 +1602,15 @@ pub fn account_revoke_signer_capability(
///
/// Because we ask for a valid `cap_update_table`, this kind of attack is not possible. Bob would not have the secret key of Alice's address
/// to rotate his address to Alice's address in the first place.
-pub fn account_rotate_authentication_key(
- from_scheme: u8,
- from_public_key_bytes: Vec,
- to_scheme: u8,
- to_public_key_bytes: Vec,
- cap_rotate_key: Vec,
- cap_update_table: Vec,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("account").to_owned(),
- ),
+pub fn account_rotate_authentication_key(from_scheme: u8, from_public_key_bytes: Vec, to_scheme: u8, to_public_key_bytes: Vec, cap_rotate_key: Vec, cap_update_table: Vec) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("account").to_owned(),
+ ),
ident_str!("rotate_authentication_key").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&from_scheme).unwrap(),
- bcs::to_bytes(&from_public_key_bytes).unwrap(),
- bcs::to_bytes(&to_scheme).unwrap(),
- bcs::to_bytes(&to_public_key_bytes).unwrap(),
- bcs::to_bytes(&cap_rotate_key).unwrap(),
- bcs::to_bytes(&cap_update_table).unwrap(),
- ],
+ vec![bcs::to_bytes(&from_scheme).unwrap(), bcs::to_bytes(&from_public_key_bytes).unwrap(), bcs::to_bytes(&to_scheme).unwrap(), bcs::to_bytes(&to_public_key_bytes).unwrap(), bcs::to_bytes(&cap_rotate_key).unwrap(), bcs::to_bytes(&cap_update_table).unwrap()],
))
}
@@ -2322,40 +1622,25 @@ pub fn account_rotate_authentication_key(
pub fn account_rotate_authentication_key_call(new_auth_key: Vec) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("account").to_owned(),
+ ),
ident_str!("rotate_authentication_key_call").to_owned(),
vec![],
vec![bcs::to_bytes(&new_auth_key).unwrap()],
))
}
-pub fn account_rotate_authentication_key_with_rotation_capability(
- rotation_cap_offerer_address: AccountAddress,
- new_scheme: u8,
- new_public_key_bytes: Vec,
- cap_update_table: Vec,
-) -> TransactionPayload {
+
+pub fn account_rotate_authentication_key_with_rotation_capability(rotation_cap_offerer_address: AccountAddress, new_scheme: u8, new_public_key_bytes: Vec, cap_update_table: Vec) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("account").to_owned(),
+ ),
ident_str!("rotate_authentication_key_with_rotation_capability").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&rotation_cap_offerer_address).unwrap(),
- bcs::to_bytes(&new_scheme).unwrap(),
- bcs::to_bytes(&new_public_key_bytes).unwrap(),
- bcs::to_bytes(&cap_update_table).unwrap(),
- ],
+ vec![bcs::to_bytes(&rotation_cap_offerer_address).unwrap(), bcs::to_bytes(&new_scheme).unwrap(), bcs::to_bytes(&new_public_key_bytes).unwrap(), bcs::to_bytes(&cap_update_table).unwrap()],
))
}
@@ -2369,12 +1654,9 @@ pub fn account_rotate_authentication_key_with_rotation_capability(
pub fn automation_registry_cancel_system_task(task_index: u64) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("automation_registry").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("automation_registry").to_owned(),
+ ),
ident_str!("cancel_system_task").to_owned(),
vec![],
vec![bcs::to_bytes(&task_index).unwrap()],
@@ -2391,12 +1673,9 @@ pub fn automation_registry_cancel_system_task(task_index: u64) -> TransactionPay
pub fn automation_registry_cancel_task(task_index: u64) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("automation_registry").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("automation_registry").to_owned(),
+ ),
ident_str!("cancel_task").to_owned(),
vec![],
vec![bcs::to_bytes(&task_index).unwrap()],
@@ -2411,12 +1690,9 @@ pub fn automation_registry_cancel_task(task_index: u64) -> TransactionPayload {
pub fn automation_registry_stop_system_tasks(task_indexes: Vec) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("automation_registry").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("automation_registry").to_owned(),
+ ),
ident_str!("stop_system_tasks").to_owned(),
vec![],
vec![bcs::to_bytes(&task_indexes).unwrap()],
@@ -2431,12 +1707,9 @@ pub fn automation_registry_stop_system_tasks(task_indexes: Vec) -> Transact
pub fn automation_registry_stop_tasks(task_indexes: Vec) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("automation_registry").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("automation_registry").to_owned(),
+ ),
ident_str!("stop_tasks").to_owned(),
vec![],
vec![bcs::to_bytes(&task_indexes).unwrap()],
@@ -2445,36 +1718,25 @@ pub fn automation_registry_stop_tasks(task_indexes: Vec) -> TransactionPayl
/// Same as `publish_package` but as an entry function which can be called as a transaction. Because
/// of current restrictions for txn parameters, the metadata needs to be passed in serialized form.
-pub fn code_publish_package_txn(
- metadata_serialized: Vec,
- code: Vec>,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("code").to_owned(),
- ),
+pub fn code_publish_package_txn(metadata_serialized: Vec, code: Vec>) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("code").to_owned(),
+ ),
ident_str!("publish_package_txn").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&metadata_serialized).unwrap(),
- bcs::to_bytes(&code).unwrap(),
- ],
+ vec![bcs::to_bytes(&metadata_serialized).unwrap(), bcs::to_bytes(&code).unwrap()],
))
}
+
pub fn coin_create_coin_conversion_map() -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("coin").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("coin").to_owned(),
+ ),
ident_str!("create_coin_conversion_map").to_owned(),
vec![],
vec![],
@@ -2485,12 +1747,9 @@ pub fn coin_create_coin_conversion_map() -> TransactionPayload {
pub fn coin_create_pairing(coin_type: TypeTag) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("coin").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("coin").to_owned(),
+ ),
ident_str!("create_pairing").to_owned(),
vec![coin_type],
vec![],
@@ -2501,12 +1760,9 @@ pub fn coin_create_pairing(coin_type: TypeTag) -> TransactionPayload {
pub fn coin_migrate_to_fungible_store(coin_type: TypeTag) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("coin").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("coin").to_owned(),
+ ),
ident_str!("migrate_to_fungible_store").to_owned(),
vec![coin_type],
vec![],
@@ -2517,12 +1773,9 @@ pub fn coin_migrate_to_fungible_store(coin_type: TypeTag) -> TransactionPayload
pub fn coin_transfer(coin_type: TypeTag, to: AccountAddress, amount: u64) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("coin").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("coin").to_owned(),
+ ),
ident_str!("transfer").to_owned(),
vec![coin_type],
vec![bcs::to_bytes(&to).unwrap(), bcs::to_bytes(&amount).unwrap()],
@@ -2534,12 +1787,9 @@ pub fn coin_transfer(coin_type: TypeTag, to: AccountAddress, amount: u64) -> Tra
pub fn coin_upgrade_supply(coin_type: TypeTag) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("coin").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("coin").to_owned(),
+ ),
ident_str!("upgrade_supply").to_owned(),
vec![coin_type],
vec![],
@@ -2547,242 +1797,106 @@ pub fn coin_upgrade_supply(coin_type: TypeTag) -> TransactionPayload {
}
/// Remove the committee from the store
-pub fn committee_map_remove_committee(
- com_store_addr: AccountAddress,
- id: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("committee_map").to_owned(),
- ),
+pub fn committee_map_remove_committee(com_store_addr: AccountAddress, id: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("committee_map").to_owned(),
+ ),
ident_str!("remove_committee").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&com_store_addr).unwrap(),
- bcs::to_bytes(&id).unwrap(),
- ],
+ vec![bcs::to_bytes(&com_store_addr).unwrap(), bcs::to_bytes(&id).unwrap()],
))
}
/// Remove the committee in bulk
-pub fn committee_map_remove_committee_bulk(
- com_store_addr: AccountAddress,
- ids: Vec,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("committee_map").to_owned(),
- ),
+pub fn committee_map_remove_committee_bulk(com_store_addr: AccountAddress, ids: Vec) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("committee_map").to_owned(),
+ ),
ident_str!("remove_committee_bulk").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&com_store_addr).unwrap(),
- bcs::to_bytes(&ids).unwrap(),
- ],
+ vec![bcs::to_bytes(&com_store_addr).unwrap(), bcs::to_bytes(&ids).unwrap()],
))
}
/// Remove the node from the committee
-pub fn committee_map_remove_committee_member(
- com_store_addr: AccountAddress,
- id: u64,
- node_address: AccountAddress,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("committee_map").to_owned(),
- ),
+pub fn committee_map_remove_committee_member(com_store_addr: AccountAddress, id: u64, node_address: AccountAddress) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("committee_map").to_owned(),
+ ),
ident_str!("remove_committee_member").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&com_store_addr).unwrap(),
- bcs::to_bytes(&id).unwrap(),
- bcs::to_bytes(&node_address).unwrap(),
- ],
+ vec![bcs::to_bytes(&com_store_addr).unwrap(), bcs::to_bytes(&id).unwrap(), bcs::to_bytes(&node_address).unwrap()],
))
}
/// Update the dkg flag
-pub fn committee_map_update_dkg_flag(
- com_store_addr: AccountAddress,
- com_id: u64,
- flag_value: bool,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("committee_map").to_owned(),
- ),
+pub fn committee_map_update_dkg_flag(com_store_addr: AccountAddress, com_id: u64, flag_value: bool) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("committee_map").to_owned(),
+ ),
ident_str!("update_dkg_flag").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&com_store_addr).unwrap(),
- bcs::to_bytes(&com_id).unwrap(),
- bcs::to_bytes(&flag_value).unwrap(),
- ],
+ vec![bcs::to_bytes(&com_store_addr).unwrap(), bcs::to_bytes(&com_id).unwrap(), bcs::to_bytes(&flag_value).unwrap()],
))
}
/// This function is used to add a new committee to the store
-pub fn committee_map_upsert_committee(
- com_store_addr: AccountAddress,
- id: u64,
- node_addresses: Vec,
- ip_public_address: Vec>,
- node_public_key: Vec>,
- network_public_key: Vec>,
- cg_public_key: Vec>,
- network_port: Vec,
- rpc_port: Vec,
- committee_type: u8,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("committee_map").to_owned(),
- ),
+pub fn committee_map_upsert_committee(com_store_addr: AccountAddress, id: u64, node_addresses: Vec, ip_public_address: Vec>, node_public_key: Vec>, network_public_key: Vec>, cg_public_key: Vec>, network_port: Vec, rpc_port: Vec, committee_type: u8) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("committee_map").to_owned(),
+ ),
ident_str!("upsert_committee").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&com_store_addr).unwrap(),
- bcs::to_bytes(&id).unwrap(),
- bcs::to_bytes(&node_addresses).unwrap(),
- bcs::to_bytes(&ip_public_address).unwrap(),
- bcs::to_bytes(&node_public_key).unwrap(),
- bcs::to_bytes(&network_public_key).unwrap(),
- bcs::to_bytes(&cg_public_key).unwrap(),
- bcs::to_bytes(&network_port).unwrap(),
- bcs::to_bytes(&rpc_port).unwrap(),
- bcs::to_bytes(&committee_type).unwrap(),
- ],
+ vec![bcs::to_bytes(&com_store_addr).unwrap(), bcs::to_bytes(&id).unwrap(), bcs::to_bytes(&node_addresses).unwrap(), bcs::to_bytes(&ip_public_address).unwrap(), bcs::to_bytes(&node_public_key).unwrap(), bcs::to_bytes(&network_public_key).unwrap(), bcs::to_bytes(&cg_public_key).unwrap(), bcs::to_bytes(&network_port).unwrap(), bcs::to_bytes(&rpc_port).unwrap(), bcs::to_bytes(&committee_type).unwrap()],
))
}
/// Add the committee in bulk
-pub fn committee_map_upsert_committee_bulk(
- com_store_addr: AccountAddress,
- ids: Vec,
- node_addresses_bulk: Vec>,
- ip_public_address_bulk: Vec>>,
- node_public_key_bulk: Vec>>,
- network_public_key_bulk: Vec>>,
- cg_public_key_bulk: Vec>>,
- network_port_bulk: Vec>,
- rpc_por_bulkt: Vec>,
- committee_types: Vec,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("committee_map").to_owned(),
- ),
+pub fn committee_map_upsert_committee_bulk(com_store_addr: AccountAddress, ids: Vec, node_addresses_bulk: Vec>, ip_public_address_bulk: Vec>>, node_public_key_bulk: Vec>>, network_public_key_bulk: Vec>>, cg_public_key_bulk: Vec>>, network_port_bulk: Vec>, rpc_por_bulkt: Vec>, committee_types: Vec) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("committee_map").to_owned(),
+ ),
ident_str!("upsert_committee_bulk").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&com_store_addr).unwrap(),
- bcs::to_bytes(&ids).unwrap(),
- bcs::to_bytes(&node_addresses_bulk).unwrap(),
- bcs::to_bytes(&ip_public_address_bulk).unwrap(),
- bcs::to_bytes(&node_public_key_bulk).unwrap(),
- bcs::to_bytes(&network_public_key_bulk).unwrap(),
- bcs::to_bytes(&cg_public_key_bulk).unwrap(),
- bcs::to_bytes(&network_port_bulk).unwrap(),
- bcs::to_bytes(&rpc_por_bulkt).unwrap(),
- bcs::to_bytes(&committee_types).unwrap(),
- ],
+ vec![bcs::to_bytes(&com_store_addr).unwrap(), bcs::to_bytes(&ids).unwrap(), bcs::to_bytes(&node_addresses_bulk).unwrap(), bcs::to_bytes(&ip_public_address_bulk).unwrap(), bcs::to_bytes(&node_public_key_bulk).unwrap(), bcs::to_bytes(&network_public_key_bulk).unwrap(), bcs::to_bytes(&cg_public_key_bulk).unwrap(), bcs::to_bytes(&network_port_bulk).unwrap(), bcs::to_bytes(&rpc_por_bulkt).unwrap(), bcs::to_bytes(&committee_types).unwrap()],
))
}
/// Upsert the node to the committee
-pub fn committee_map_upsert_committee_member(
- com_store_addr: AccountAddress,
- id: u64,
- node_address: AccountAddress,
- ip_public_address: Vec,
- node_public_key: Vec,
- network_public_key: Vec,
- cg_public_key: Vec,
- network_port: u16,
- rpc_port: u16,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("committee_map").to_owned(),
- ),
+pub fn committee_map_upsert_committee_member(com_store_addr: AccountAddress, id: u64, node_address: AccountAddress, ip_public_address: Vec, node_public_key: Vec, network_public_key: Vec, cg_public_key: Vec, network_port: u16, rpc_port: u16) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("committee_map").to_owned(),
+ ),
ident_str!("upsert_committee_member").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&com_store_addr).unwrap(),
- bcs::to_bytes(&id).unwrap(),
- bcs::to_bytes(&node_address).unwrap(),
- bcs::to_bytes(&ip_public_address).unwrap(),
- bcs::to_bytes(&node_public_key).unwrap(),
- bcs::to_bytes(&network_public_key).unwrap(),
- bcs::to_bytes(&cg_public_key).unwrap(),
- bcs::to_bytes(&network_port).unwrap(),
- bcs::to_bytes(&rpc_port).unwrap(),
- ],
+ vec![bcs::to_bytes(&com_store_addr).unwrap(), bcs::to_bytes(&id).unwrap(), bcs::to_bytes(&node_address).unwrap(), bcs::to_bytes(&ip_public_address).unwrap(), bcs::to_bytes(&node_public_key).unwrap(), bcs::to_bytes(&network_public_key).unwrap(), bcs::to_bytes(&cg_public_key).unwrap(), bcs::to_bytes(&network_port).unwrap(), bcs::to_bytes(&rpc_port).unwrap()],
))
}
/// Upsert nodes to the committee
-pub fn committee_map_upsert_committee_member_bulk(
- com_store_addr: AccountAddress,
- ids: Vec,
- node_addresses: Vec,
- ip_public_address: Vec>,
- node_public_key: Vec>,
- network_public_key: Vec>,
- cg_public_key: Vec>,
- network_port: Vec,
- rpc_port: Vec,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("committee_map").to_owned(),
- ),
+pub fn committee_map_upsert_committee_member_bulk(com_store_addr: AccountAddress, ids: Vec, node_addresses: Vec, ip_public_address: Vec>, node_public_key: Vec>, network_public_key: Vec>, cg_public_key: Vec>, network_port: Vec, rpc_port: Vec) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("committee_map").to_owned(),
+ ),
ident_str!("upsert_committee_member_bulk").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&com_store_addr).unwrap(),
- bcs::to_bytes(&ids).unwrap(),
- bcs::to_bytes(&node_addresses).unwrap(),
- bcs::to_bytes(&ip_public_address).unwrap(),
- bcs::to_bytes(&node_public_key).unwrap(),
- bcs::to_bytes(&network_public_key).unwrap(),
- bcs::to_bytes(&cg_public_key).unwrap(),
- bcs::to_bytes(&network_port).unwrap(),
- bcs::to_bytes(&rpc_port).unwrap(),
- ],
+ vec![bcs::to_bytes(&com_store_addr).unwrap(), bcs::to_bytes(&ids).unwrap(), bcs::to_bytes(&node_addresses).unwrap(), bcs::to_bytes(&ip_public_address).unwrap(), bcs::to_bytes(&node_public_key).unwrap(), bcs::to_bytes(&network_public_key).unwrap(), bcs::to_bytes(&cg_public_key).unwrap(), bcs::to_bytes(&network_port).unwrap(), bcs::to_bytes(&rpc_port).unwrap()],
))
}
@@ -2790,12 +1904,9 @@ pub fn committee_map_upsert_committee_member_bulk(
pub fn managed_coin_burn(coin_type: TypeTag, amount: u64) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("managed_coin").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("managed_coin").to_owned(),
+ ),
ident_str!("burn").to_owned(),
vec![coin_type],
vec![bcs::to_bytes(&amount).unwrap()],
@@ -2804,52 +1915,28 @@ pub fn managed_coin_burn(coin_type: TypeTag, amount: u64) -> TransactionPayload
/// Initialize new coin `CoinType` in Supra Blockchain.
/// Mint and Burn Capabilities will be stored under `account` in `Capabilities` resource.
-pub fn managed_coin_initialize(
- coin_type: TypeTag,
- name: Vec,
- symbol: Vec,
- decimals: u8,
- monitor_supply: bool,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("managed_coin").to_owned(),
- ),
+pub fn managed_coin_initialize(coin_type: TypeTag, name: Vec, symbol: Vec, decimals: u8, monitor_supply: bool) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("managed_coin").to_owned(),
+ ),
ident_str!("initialize").to_owned(),
vec![coin_type],
- vec![
- bcs::to_bytes(&name).unwrap(),
- bcs::to_bytes(&symbol).unwrap(),
- bcs::to_bytes(&decimals).unwrap(),
- bcs::to_bytes(&monitor_supply).unwrap(),
- ],
+ vec![bcs::to_bytes(&name).unwrap(), bcs::to_bytes(&symbol).unwrap(), bcs::to_bytes(&decimals).unwrap(), bcs::to_bytes(&monitor_supply).unwrap()],
))
}
/// Create new coins `CoinType` and deposit them into dst_addr's account.
-pub fn managed_coin_mint(
- coin_type: TypeTag,
- dst_addr: AccountAddress,
- amount: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("managed_coin").to_owned(),
- ),
+pub fn managed_coin_mint(coin_type: TypeTag, dst_addr: AccountAddress, amount: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("managed_coin").to_owned(),
+ ),
ident_str!("mint").to_owned(),
vec![coin_type],
- vec![
- bcs::to_bytes(&dst_addr).unwrap(),
- bcs::to_bytes(&amount).unwrap(),
- ],
+ vec![bcs::to_bytes(&dst_addr).unwrap(), bcs::to_bytes(&amount).unwrap()],
))
}
@@ -2858,12 +1945,9 @@ pub fn managed_coin_mint(
pub fn managed_coin_register(coin_type: TypeTag) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("managed_coin").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("managed_coin").to_owned(),
+ ),
ident_str!("register").to_owned(),
vec![coin_type],
vec![],
@@ -2874,12 +1958,9 @@ pub fn managed_coin_register(coin_type: TypeTag) -> TransactionPayload {
pub fn multisig_account_add_owner(new_owner: AccountAddress) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("add_owner").to_owned(),
vec![],
vec![bcs::to_bytes(&new_owner).unwrap()],
@@ -2895,12 +1976,9 @@ pub fn multisig_account_add_owner(new_owner: AccountAddress) -> TransactionPaylo
pub fn multisig_account_add_owners(new_owners: Vec) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("add_owners").to_owned(),
vec![],
vec![bcs::to_bytes(&new_owners).unwrap()],
@@ -2908,118 +1986,69 @@ pub fn multisig_account_add_owners(new_owners: Vec) -> Transacti
}
/// Add owners then update number of signatures required, in a single operation.
-pub fn multisig_account_add_owners_and_update_signatures_required(
- new_owners: Vec,
- new_num_signatures_required: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_add_owners_and_update_signatures_required(new_owners: Vec, new_num_signatures_required: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("add_owners_and_update_signatures_required").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&new_owners).unwrap(),
- bcs::to_bytes(&new_num_signatures_required).unwrap(),
- ],
+ vec![bcs::to_bytes(&new_owners).unwrap(), bcs::to_bytes(&new_num_signatures_required).unwrap()],
))
}
/// Approve a multisig transaction.
-pub fn multisig_account_approve_transaction(
- multisig_account: AccountAddress,
- sequence_number: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_approve_transaction(multisig_account: AccountAddress, sequence_number: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("approve_transaction").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&multisig_account).unwrap(),
- bcs::to_bytes(&sequence_number).unwrap(),
- ],
+ vec![bcs::to_bytes(&multisig_account).unwrap(), bcs::to_bytes(&sequence_number).unwrap()],
))
}
/// Creates a new multisig account and add the signer as a single owner.
-pub fn multisig_account_create(
- num_signatures_required: u64,
- metadata_keys: Vec>,
- metadata_values: Vec>,
- timeout_duration: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_create(num_signatures_required: u64, metadata_keys: Vec>, metadata_values: Vec>, timeout_duration: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("create").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&num_signatures_required).unwrap(),
- bcs::to_bytes(&metadata_keys).unwrap(),
- bcs::to_bytes(&metadata_values).unwrap(),
- bcs::to_bytes(&timeout_duration).unwrap(),
- ],
+ vec![bcs::to_bytes(&num_signatures_required).unwrap(), bcs::to_bytes(&metadata_keys).unwrap(), bcs::to_bytes(&metadata_values).unwrap(), bcs::to_bytes(&timeout_duration).unwrap()],
))
}
/// Create a multisig transaction, which will have one approval initially (from the creator).
-pub fn multisig_account_create_transaction(
- multisig_account: AccountAddress,
- payload: Vec,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_create_transaction(multisig_account: AccountAddress, payload: Vec) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("create_transaction").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&multisig_account).unwrap(),
- bcs::to_bytes(&payload).unwrap(),
- ],
+ vec![bcs::to_bytes(&multisig_account).unwrap(), bcs::to_bytes(&payload).unwrap()],
))
}
/// Create a multisig transaction with a transaction hash instead of the full payload.
/// This means the payload will be stored off chain for gas saving. Later, during execution, the executor will need
/// to provide the full payload, which will be validated against the hash stored on-chain.
-pub fn multisig_account_create_transaction_with_hash(
- multisig_account: AccountAddress,
- payload_hash: Vec,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_create_transaction_with_hash(multisig_account: AccountAddress, payload_hash: Vec) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("create_transaction_with_hash").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&multisig_account).unwrap(),
- bcs::to_bytes(&payload_hash).unwrap(),
- ],
+ vec![bcs::to_bytes(&multisig_account).unwrap(), bcs::to_bytes(&payload_hash).unwrap()],
))
}
@@ -3032,38 +2061,15 @@ pub fn multisig_account_create_transaction_with_hash(
/// Note that this does not revoke auth key-based control over the account. Owners should separately rotate the auth
/// key after they are fully migrated to the new multisig account. Alternatively, they can call
/// create_with_existing_account_and_revoke_auth_key instead.
-pub fn multisig_account_create_with_existing_account(
- multisig_address: AccountAddress,
- owners: Vec,
- num_signatures_required: u64,
- account_scheme: u8,
- account_public_key: Vec,
- create_multisig_account_signed_message: Vec,
- metadata_keys: Vec>,
- metadata_values: Vec>,
- timeout_duration: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_create_with_existing_account(multisig_address: AccountAddress, owners: Vec, num_signatures_required: u64, account_scheme: u8, account_public_key: Vec, create_multisig_account_signed_message: Vec, metadata_keys: Vec>, metadata_values: Vec>, timeout_duration: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("create_with_existing_account").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&multisig_address).unwrap(),
- bcs::to_bytes(&owners).unwrap(),
- bcs::to_bytes(&num_signatures_required).unwrap(),
- bcs::to_bytes(&account_scheme).unwrap(),
- bcs::to_bytes(&account_public_key).unwrap(),
- bcs::to_bytes(&create_multisig_account_signed_message).unwrap(),
- bcs::to_bytes(&metadata_keys).unwrap(),
- bcs::to_bytes(&metadata_values).unwrap(),
- bcs::to_bytes(&timeout_duration).unwrap(),
- ],
+ vec![bcs::to_bytes(&multisig_address).unwrap(), bcs::to_bytes(&owners).unwrap(), bcs::to_bytes(&num_signatures_required).unwrap(), bcs::to_bytes(&account_scheme).unwrap(), bcs::to_bytes(&account_public_key).unwrap(), bcs::to_bytes(&create_multisig_account_signed_message).unwrap(), bcs::to_bytes(&metadata_keys).unwrap(), bcs::to_bytes(&metadata_values).unwrap(), bcs::to_bytes(&timeout_duration).unwrap()],
))
}
@@ -3072,38 +2078,15 @@ pub fn multisig_account_create_with_existing_account(
/// Note: If the original account is a resource account, this does not revoke all control over it as if any
/// SignerCapability of the resource account still exists, it can still be used to generate the signer for the
/// account.
-pub fn multisig_account_create_with_existing_account_and_revoke_auth_key(
- multisig_address: AccountAddress,
- owners: Vec,
- num_signatures_required: u64,
- account_scheme: u8,
- account_public_key: Vec,
- create_multisig_account_signed_message: Vec,
- metadata_keys: Vec>,
- metadata_values: Vec>,
- timeout_duration: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_create_with_existing_account_and_revoke_auth_key(multisig_address: AccountAddress, owners: Vec, num_signatures_required: u64, account_scheme: u8, account_public_key: Vec, create_multisig_account_signed_message: Vec, metadata_keys: Vec>, metadata_values: Vec>, timeout_duration: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("create_with_existing_account_and_revoke_auth_key").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&multisig_address).unwrap(),
- bcs::to_bytes(&owners).unwrap(),
- bcs::to_bytes(&num_signatures_required).unwrap(),
- bcs::to_bytes(&account_scheme).unwrap(),
- bcs::to_bytes(&account_public_key).unwrap(),
- bcs::to_bytes(&create_multisig_account_signed_message).unwrap(),
- bcs::to_bytes(&metadata_keys).unwrap(),
- bcs::to_bytes(&metadata_values).unwrap(),
- bcs::to_bytes(&timeout_duration).unwrap(),
- ],
+ vec![bcs::to_bytes(&multisig_address).unwrap(), bcs::to_bytes(&owners).unwrap(), bcs::to_bytes(&num_signatures_required).unwrap(), bcs::to_bytes(&account_scheme).unwrap(), bcs::to_bytes(&account_public_key).unwrap(), bcs::to_bytes(&create_multisig_account_signed_message).unwrap(), bcs::to_bytes(&metadata_keys).unwrap(), bcs::to_bytes(&metadata_values).unwrap(), bcs::to_bytes(&timeout_duration).unwrap()],
))
}
@@ -3113,30 +2096,15 @@ pub fn multisig_account_create_with_existing_account_and_revoke_auth_key(
/// cannot be any duplicate owners in the list.
/// @param num_signatures_required The number of signatures required to execute a transaction. Must be at least 1 and
/// at most the total number of owners.
-pub fn multisig_account_create_with_owners(
- additional_owners: Vec,
- num_signatures_required: u64,
- metadata_keys: Vec>,
- metadata_values: Vec>,
- timeout_duration: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_create_with_owners(additional_owners: Vec, num_signatures_required: u64, metadata_keys: Vec>, metadata_values: Vec>, timeout_duration: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("create_with_owners").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&additional_owners).unwrap(),
- bcs::to_bytes(&num_signatures_required).unwrap(),
- bcs::to_bytes(&metadata_keys).unwrap(),
- bcs::to_bytes(&metadata_values).unwrap(),
- bcs::to_bytes(&timeout_duration).unwrap(),
- ],
+ vec![bcs::to_bytes(&additional_owners).unwrap(), bcs::to_bytes(&num_signatures_required).unwrap(), bcs::to_bytes(&metadata_keys).unwrap(), bcs::to_bytes(&metadata_values).unwrap(), bcs::to_bytes(&timeout_duration).unwrap()],
))
}
@@ -3144,45 +2112,25 @@ pub fn multisig_account_create_with_owners(
///
/// This is for creating a vanity multisig account from a bootstrapping account that should not
/// be an owner after the vanity multisig address has been secured.
-pub fn multisig_account_create_with_owners_then_remove_bootstrapper(
- owners: Vec,
- num_signatures_required: u64,
- metadata_keys: Vec>,
- metadata_values: Vec>,
- timeout_duration: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_create_with_owners_then_remove_bootstrapper(owners: Vec, num_signatures_required: u64, metadata_keys: Vec>, metadata_values: Vec>, timeout_duration: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("create_with_owners_then_remove_bootstrapper").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&owners).unwrap(),
- bcs::to_bytes(&num_signatures_required).unwrap(),
- bcs::to_bytes(&metadata_keys).unwrap(),
- bcs::to_bytes(&metadata_values).unwrap(),
- bcs::to_bytes(&timeout_duration).unwrap(),
- ],
+ vec![bcs::to_bytes(&owners).unwrap(), bcs::to_bytes(&num_signatures_required).unwrap(), bcs::to_bytes(&metadata_keys).unwrap(), bcs::to_bytes(&metadata_values).unwrap(), bcs::to_bytes(&timeout_duration).unwrap()],
))
}
/// Remove the next transaction if it has sufficient owner rejections.
-pub fn multisig_account_execute_rejected_transaction(
- multisig_account: AccountAddress,
-) -> TransactionPayload {
+pub fn multisig_account_execute_rejected_transaction(multisig_account: AccountAddress) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("execute_rejected_transaction").to_owned(),
vec![],
vec![bcs::to_bytes(&multisig_account).unwrap()],
@@ -3190,46 +2138,28 @@ pub fn multisig_account_execute_rejected_transaction(
}
/// Remove the next transactions until the final_sequence_number if they have sufficient owner rejections.
-pub fn multisig_account_execute_rejected_transactions(
- multisig_account: AccountAddress,
- final_sequence_number: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_execute_rejected_transactions(multisig_account: AccountAddress, final_sequence_number: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("execute_rejected_transactions").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&multisig_account).unwrap(),
- bcs::to_bytes(&final_sequence_number).unwrap(),
- ],
+ vec![bcs::to_bytes(&multisig_account).unwrap(), bcs::to_bytes(&final_sequence_number).unwrap()],
))
}
/// Reject a multisig transaction.
-pub fn multisig_account_reject_transaction(
- multisig_account: AccountAddress,
- sequence_number: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_reject_transaction(multisig_account: AccountAddress, sequence_number: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("reject_transaction").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&multisig_account).unwrap(),
- bcs::to_bytes(&sequence_number).unwrap(),
- ],
+ vec![bcs::to_bytes(&multisig_account).unwrap(), bcs::to_bytes(&sequence_number).unwrap()],
))
}
@@ -3237,12 +2167,9 @@ pub fn multisig_account_reject_transaction(
pub fn multisig_account_remove_owner(owner_to_remove: AccountAddress) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("remove_owner").to_owned(),
vec![],
vec![bcs::to_bytes(&owner_to_remove).unwrap()],
@@ -3259,12 +2186,9 @@ pub fn multisig_account_remove_owner(owner_to_remove: AccountAddress) -> Transac
pub fn multisig_account_remove_owners(owners_to_remove: Vec) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("remove_owners").to_owned(),
vec![],
vec![bcs::to_bytes(&owners_to_remove).unwrap()],
@@ -3272,70 +2196,41 @@ pub fn multisig_account_remove_owners(owners_to_remove: Vec) ->
}
/// Swap an owner in for an old one, without changing required signatures.
-pub fn multisig_account_swap_owner(
- to_swap_in: AccountAddress,
- to_swap_out: AccountAddress,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_swap_owner(to_swap_in: AccountAddress, to_swap_out: AccountAddress) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("swap_owner").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&to_swap_in).unwrap(),
- bcs::to_bytes(&to_swap_out).unwrap(),
- ],
+ vec![bcs::to_bytes(&to_swap_in).unwrap(), bcs::to_bytes(&to_swap_out).unwrap()],
))
}
/// Swap owners in and out, without changing required signatures.
-pub fn multisig_account_swap_owners(
- to_swap_in: Vec,
- to_swap_out: Vec,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_swap_owners(to_swap_in: Vec, to_swap_out: Vec) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("swap_owners").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&to_swap_in).unwrap(),
- bcs::to_bytes(&to_swap_out).unwrap(),
- ],
+ vec![bcs::to_bytes(&to_swap_in).unwrap(), bcs::to_bytes(&to_swap_out).unwrap()],
))
}
/// Swap owners in and out, updating number of required signatures.
-pub fn multisig_account_swap_owners_and_update_signatures_required(
- new_owners: Vec,
- owners_to_remove: Vec,
- new_num_signatures_required: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_swap_owners_and_update_signatures_required(new_owners: Vec, owners_to_remove: Vec, new_num_signatures_required: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("swap_owners_and_update_signatures_required").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&new_owners).unwrap(),
- bcs::to_bytes(&owners_to_remove).unwrap(),
- bcs::to_bytes(&new_num_signatures_required).unwrap(),
- ],
+ vec![bcs::to_bytes(&new_owners).unwrap(), bcs::to_bytes(&owners_to_remove).unwrap(), bcs::to_bytes(&new_num_signatures_required).unwrap()],
))
}
@@ -3346,24 +2241,15 @@ pub fn multisig_account_swap_owners_and_update_signatures_required(
/// Note that this function is not public so it can only be invoked directly instead of via a module or script. This
/// ensures that a multisig transaction cannot lead to another module obtaining the multisig signer and using it to
/// maliciously alter the number of signatures required.
-pub fn multisig_account_update_metadata(
- keys: Vec>,
- values: Vec>,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_update_metadata(keys: Vec>, values: Vec>) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("update_metadata").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&keys).unwrap(),
- bcs::to_bytes(&values).unwrap(),
- ],
+ vec![bcs::to_bytes(&keys).unwrap(), bcs::to_bytes(&values).unwrap()],
))
}
@@ -3373,17 +2259,12 @@ pub fn multisig_account_update_metadata(
/// Note that this function is not public so it can only be invoked directly instead of via a module or script. This
/// ensures that a multisig transaction cannot lead to another module obtaining the multisig signer and using it to
/// maliciously alter the number of signatures required.
-pub fn multisig_account_update_signatures_required(
- new_num_signatures_required: u64,
-) -> TransactionPayload {
+pub fn multisig_account_update_signatures_required(new_num_signatures_required: u64) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("update_signatures_required").to_owned(),
vec![],
vec![bcs::to_bytes(&new_num_signatures_required).unwrap()],
@@ -3394,12 +2275,9 @@ pub fn multisig_account_update_signatures_required(
pub fn multisig_account_update_timeout_duration(timeout_duration: u64) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("update_timeout_duration").to_owned(),
vec![],
vec![bcs::to_bytes(&timeout_duration).unwrap()],
@@ -3407,78 +2285,43 @@ pub fn multisig_account_update_timeout_duration(timeout_duration: u64) -> Transa
}
/// Generic function that can be used to either approve or reject a multisig transaction
-pub fn multisig_account_vote_transaction(
- multisig_account: AccountAddress,
- sequence_number: u64,
- approved: bool,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_vote_transaction(multisig_account: AccountAddress, sequence_number: u64, approved: bool) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("vote_transaction").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&multisig_account).unwrap(),
- bcs::to_bytes(&sequence_number).unwrap(),
- bcs::to_bytes(&approved).unwrap(),
- ],
+ vec![bcs::to_bytes(&multisig_account).unwrap(), bcs::to_bytes(&sequence_number).unwrap(), bcs::to_bytes(&approved).unwrap()],
))
}
/// Generic function that can be used to either approve or reject a batch of transactions within a specified range.
-pub fn multisig_account_vote_transactions(
- multisig_account: AccountAddress,
- starting_sequence_number: u64,
- final_sequence_number: u64,
- approved: bool,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_vote_transactions(multisig_account: AccountAddress, starting_sequence_number: u64, final_sequence_number: u64, approved: bool) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("vote_transactions").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&multisig_account).unwrap(),
- bcs::to_bytes(&starting_sequence_number).unwrap(),
- bcs::to_bytes(&final_sequence_number).unwrap(),
- bcs::to_bytes(&approved).unwrap(),
- ],
+ vec![bcs::to_bytes(&multisig_account).unwrap(), bcs::to_bytes(&starting_sequence_number).unwrap(), bcs::to_bytes(&final_sequence_number).unwrap(), bcs::to_bytes(&approved).unwrap()],
))
}
/// Generic function that can be used to either approve or reject a multisig transaction
/// Retained for backward compatibility: the function with the typographical error in its name
/// will continue to be an accessible entry point.
-pub fn multisig_account_vote_transanction(
- multisig_account: AccountAddress,
- sequence_number: u64,
- approved: bool,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("multisig_account").to_owned(),
- ),
+pub fn multisig_account_vote_transanction(multisig_account: AccountAddress, sequence_number: u64, approved: bool) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("multisig_account").to_owned(),
+ ),
ident_str!("vote_transanction").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&multisig_account).unwrap(),
- bcs::to_bytes(&sequence_number).unwrap(),
- bcs::to_bytes(&approved).unwrap(),
- ],
+ vec![bcs::to_bytes(&multisig_account).unwrap(), bcs::to_bytes(&sequence_number).unwrap(), bcs::to_bytes(&approved).unwrap()],
))
}
@@ -3486,12 +2329,9 @@ pub fn multisig_account_vote_transanction(
pub fn object_transfer_call(object: AccountAddress, to: AccountAddress) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("object").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("object").to_owned(),
+ ),
ident_str!("transfer_call").to_owned(),
vec![],
vec![bcs::to_bytes(&object).unwrap(), bcs::to_bytes(&to).unwrap()],
@@ -3502,229 +2342,121 @@ pub fn object_transfer_call(object: AccountAddress, to: AccountAddress) -> Trans
/// Publishes the code passed in the function to the newly created object.
/// The caller must provide package metadata describing the package via `metadata_serialized` and
/// the code to be published via `code`. This contains a vector of modules to be deployed on-chain.
-pub fn object_code_deployment_publish(
- metadata_serialized: Vec,
- code: Vec>,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("object_code_deployment").to_owned(),
- ),
+pub fn object_code_deployment_publish(metadata_serialized: Vec, code: Vec>) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("object_code_deployment").to_owned(),
+ ),
ident_str!("publish").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&metadata_serialized).unwrap(),
- bcs::to_bytes(&code).unwrap(),
- ],
+ vec![bcs::to_bytes(&metadata_serialized).unwrap(), bcs::to_bytes(&code).unwrap()],
))
}
/// Add `amount` of coins to the delegation pool `pool_address`.
-pub fn pbo_delegation_pool_add_stake(
- pool_address: AccountAddress,
- amount: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+pub fn pbo_delegation_pool_add_stake(pool_address: AccountAddress, amount: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("add_stake").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&pool_address).unwrap(),
- bcs::to_bytes(&amount).unwrap(),
- ],
+ vec![bcs::to_bytes(&pool_address).unwrap(), bcs::to_bytes(&amount).unwrap()],
))
}
-pub fn pbo_delegation_pool_admin_increase_last_unlock_period(
- pool_address: AccountAddress,
- additional_periods: u64,
-) -> TransactionPayload {
+
+pub fn pbo_delegation_pool_admin_increase_last_unlock_period(pool_address: AccountAddress, additional_periods: u64) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("admin_increase_last_unlock_period").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&pool_address).unwrap(),
- bcs::to_bytes(&additional_periods).unwrap(),
- ],
+ vec![bcs::to_bytes(&pool_address).unwrap(), bcs::to_bytes(&additional_periods).unwrap()],
))
}
/// Allows a delegator to delegate its voting power to a voter. If this delegator already has a delegated voter,
/// this change won't take effects until the next lockup period.
-pub fn pbo_delegation_pool_delegate_voting_power(
- pool_address: AccountAddress,
- new_voter: AccountAddress,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+pub fn pbo_delegation_pool_delegate_voting_power(pool_address: AccountAddress, new_voter: AccountAddress) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("delegate_voting_power").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&pool_address).unwrap(),
- bcs::to_bytes(&new_voter).unwrap(),
- ],
+ vec![bcs::to_bytes(&pool_address).unwrap(), bcs::to_bytes(&new_voter).unwrap()],
))
}
/// Enable partial governance voting on a stake pool. The voter of this stake pool will be managed by this module.
/// THe existing voter will be replaced. The function is permissionless.
-pub fn pbo_delegation_pool_enable_partial_governance_voting(
- pool_address: AccountAddress,
-) -> TransactionPayload {
+pub fn pbo_delegation_pool_enable_partial_governance_voting(pool_address: AccountAddress) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("enable_partial_governance_voting").to_owned(),
vec![],
vec![bcs::to_bytes(&pool_address).unwrap()],
))
}
-pub fn pbo_delegation_pool_fund_delegators_with_locked_stake(
- pool_address: AccountAddress,
- delegators: Vec,
- stakes: Vec,
-) -> TransactionPayload {
+
+pub fn pbo_delegation_pool_fund_delegators_with_locked_stake(pool_address: AccountAddress, delegators: Vec, stakes: Vec) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("fund_delegators_with_locked_stake").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&pool_address).unwrap(),
- bcs::to_bytes(&delegators).unwrap(),
- bcs::to_bytes(&stakes).unwrap(),
- ],
+ vec![bcs::to_bytes(&pool_address).unwrap(), bcs::to_bytes(&delegators).unwrap(), bcs::to_bytes(&stakes).unwrap()],
))
}
-pub fn pbo_delegation_pool_fund_delegators_with_stake(
- pool_address: AccountAddress,
- delegators: Vec,
- stakes: Vec,
-) -> TransactionPayload {
+
+pub fn pbo_delegation_pool_fund_delegators_with_stake(pool_address: AccountAddress, delegators: Vec, stakes: Vec) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("fund_delegators_with_stake").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&pool_address).unwrap(),
- bcs::to_bytes(&delegators).unwrap(),
- bcs::to_bytes(&stakes).unwrap(),
- ],
+ vec![bcs::to_bytes(&pool_address).unwrap(), bcs::to_bytes(&delegators).unwrap(), bcs::to_bytes(&stakes).unwrap()],
))
}
/// Initialize a delegation pool without actual coin but withdraw from the owner's account.
-pub fn pbo_delegation_pool_initialize_delegation_pool_with_amount(
- multisig_admin: AccountAddress,
- amount: u64,
- operator_commission_percentage: u64,
- delegation_pool_creation_seed: Vec,
- delegator_address: Vec,
- principle_stake: Vec,
- unlock_numerators: Vec,
- unlock_denominator: u64,
- unlock_start_time: u64,
- unlock_duration: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+pub fn pbo_delegation_pool_initialize_delegation_pool_with_amount(multisig_admin: AccountAddress, amount: u64, operator_commission_percentage: u64, delegation_pool_creation_seed: Vec, delegator_address: Vec, principle_stake: Vec, unlock_numerators: Vec, unlock_denominator: u64, unlock_start_time: u64, unlock_duration: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("initialize_delegation_pool_with_amount").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&multisig_admin).unwrap(),
- bcs::to_bytes(&amount).unwrap(),
- bcs::to_bytes(&operator_commission_percentage).unwrap(),
- bcs::to_bytes(&delegation_pool_creation_seed).unwrap(),
- bcs::to_bytes(&delegator_address).unwrap(),
- bcs::to_bytes(&principle_stake).unwrap(),
- bcs::to_bytes(&unlock_numerators).unwrap(),
- bcs::to_bytes(&unlock_denominator).unwrap(),
- bcs::to_bytes(&unlock_start_time).unwrap(),
- bcs::to_bytes(&unlock_duration).unwrap(),
- ],
+ vec![bcs::to_bytes(&multisig_admin).unwrap(), bcs::to_bytes(&amount).unwrap(), bcs::to_bytes(&operator_commission_percentage).unwrap(), bcs::to_bytes(&delegation_pool_creation_seed).unwrap(), bcs::to_bytes(&delegator_address).unwrap(), bcs::to_bytes(&principle_stake).unwrap(), bcs::to_bytes(&unlock_numerators).unwrap(), bcs::to_bytes(&unlock_denominator).unwrap(), bcs::to_bytes(&unlock_start_time).unwrap(), bcs::to_bytes(&unlock_duration).unwrap()],
))
}
/// Initialize a delegation pool without actual coin but withdraw from the owner's account.
-pub fn pbo_delegation_pool_initialize_delegation_pool_with_amount_without_multisig_admin(
- amount: u64,
- operator_commission_percentage: u64,
- delegation_pool_creation_seed: Vec,
- delegator_address: Vec,
- principle_stake: Vec,
- unlock_numerators: Vec,
- unlock_denominator: u64,
- unlock_start_time: u64,
- unlock_duration: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+pub fn pbo_delegation_pool_initialize_delegation_pool_with_amount_without_multisig_admin(amount: u64, operator_commission_percentage: u64, delegation_pool_creation_seed: Vec, delegator_address: Vec, principle_stake: Vec, unlock_numerators: Vec, unlock_denominator: u64, unlock_start_time: u64, unlock_duration: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("initialize_delegation_pool_with_amount_without_multisig_admin").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&amount).unwrap(),
- bcs::to_bytes(&operator_commission_percentage).unwrap(),
- bcs::to_bytes(&delegation_pool_creation_seed).unwrap(),
- bcs::to_bytes(&delegator_address).unwrap(),
- bcs::to_bytes(&principle_stake).unwrap(),
- bcs::to_bytes(&unlock_numerators).unwrap(),
- bcs::to_bytes(&unlock_denominator).unwrap(),
- bcs::to_bytes(&unlock_start_time).unwrap(),
- bcs::to_bytes(&unlock_duration).unwrap(),
- ],
+ vec![bcs::to_bytes(&amount).unwrap(), bcs::to_bytes(&operator_commission_percentage).unwrap(), bcs::to_bytes(&delegation_pool_creation_seed).unwrap(), bcs::to_bytes(&delegator_address).unwrap(), bcs::to_bytes(&principle_stake).unwrap(), bcs::to_bytes(&unlock_numerators).unwrap(), bcs::to_bytes(&unlock_denominator).unwrap(), bcs::to_bytes(&unlock_start_time).unwrap(), bcs::to_bytes(&unlock_duration).unwrap()],
))
}
@@ -3737,48 +2469,28 @@ pub fn pbo_delegation_pool_initialize_delegation_pool_with_amount_without_multis
/// Supra Foundation to ensure that the allocations of all investors are subject to the terms specified in the
/// corresponding legal contracts. It will be deactivated before the validator set it opened up to external
/// validator-owners to prevent it from being abused.
-pub fn pbo_delegation_pool_lock_delegators_stakes(
- pool_address: AccountAddress,
- delegators: Vec,
- new_principle_stakes: Vec,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+pub fn pbo_delegation_pool_lock_delegators_stakes(pool_address: AccountAddress, delegators: Vec, new_principle_stakes: Vec) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("lock_delegators_stakes").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&pool_address).unwrap(),
- bcs::to_bytes(&delegators).unwrap(),
- bcs::to_bytes(&new_principle_stakes).unwrap(),
- ],
+ vec![bcs::to_bytes(&pool_address).unwrap(), bcs::to_bytes(&delegators).unwrap(), bcs::to_bytes(&new_principle_stakes).unwrap()],
))
}
/// Move `amount` of coins from pending_inactive to active.
-pub fn pbo_delegation_pool_reactivate_stake(
- pool_address: AccountAddress,
- amount: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+pub fn pbo_delegation_pool_reactivate_stake(pool_address: AccountAddress, amount: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("reactivate_stake").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&pool_address).unwrap(),
- bcs::to_bytes(&amount).unwrap(),
- ],
+ vec![bcs::to_bytes(&pool_address).unwrap(), bcs::to_bytes(&amount).unwrap()],
))
}
@@ -3791,26 +2503,15 @@ pub fn pbo_delegation_pool_reactivate_stake(
/// Supra Foundation to ensure that the allocations of all investors are subject to the terms specified in the
/// corresponding legal contracts. It will be deactivated before the validator set it opened up to external
/// validator-owners to prevent it from being abused.
-pub fn pbo_delegation_pool_replace_delegator(
- pool_address: AccountAddress,
- old_delegator: AccountAddress,
- new_delegator: AccountAddress,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+pub fn pbo_delegation_pool_replace_delegator(pool_address: AccountAddress, old_delegator: AccountAddress, new_delegator: AccountAddress) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("replace_delegator").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&pool_address).unwrap(),
- bcs::to_bytes(&old_delegator).unwrap(),
- bcs::to_bytes(&new_delegator).unwrap(),
- ],
+ vec![bcs::to_bytes(&pool_address).unwrap(), bcs::to_bytes(&old_delegator).unwrap(), bcs::to_bytes(&new_delegator).unwrap()],
))
}
@@ -3818,17 +2519,12 @@ pub fn pbo_delegation_pool_replace_delegator(
/// beneficiary. To ensures payment to the current beneficiary, one should first call `synchronize_delegation_pool`
/// before switching the beneficiary. An operator can set one beneficiary for delegation pools, not a separate
/// one for each pool.
-pub fn pbo_delegation_pool_set_beneficiary_for_operator(
- new_beneficiary: AccountAddress,
-) -> TransactionPayload {
+pub fn pbo_delegation_pool_set_beneficiary_for_operator(new_beneficiary: AccountAddress) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("set_beneficiary_for_operator").to_owned(),
vec![],
vec![bcs::to_bytes(&new_beneficiary).unwrap()],
@@ -3839,12 +2535,9 @@ pub fn pbo_delegation_pool_set_beneficiary_for_operator(
pub fn pbo_delegation_pool_set_delegated_voter(new_voter: AccountAddress) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("set_delegated_voter").to_owned(),
vec![],
vec![bcs::to_bytes(&new_voter).unwrap()],
@@ -3855,12 +2548,9 @@ pub fn pbo_delegation_pool_set_delegated_voter(new_voter: AccountAddress) -> Tra
pub fn pbo_delegation_pool_set_operator(new_operator: AccountAddress) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("set_operator").to_owned(),
vec![],
vec![bcs::to_bytes(&new_operator).unwrap()],
@@ -3869,17 +2559,12 @@ pub fn pbo_delegation_pool_set_operator(new_operator: AccountAddress) -> Transac
/// Synchronize delegation and stake pools: distribute yet-undetected rewards to the corresponding internal
/// shares pools, assign commission to operator and eventually prepare delegation pool for a new lockup cycle.
-pub fn pbo_delegation_pool_synchronize_delegation_pool(
- pool_address: AccountAddress,
-) -> TransactionPayload {
+pub fn pbo_delegation_pool_synchronize_delegation_pool(pool_address: AccountAddress) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("synchronize_delegation_pool").to_owned(),
vec![],
vec![bcs::to_bytes(&pool_address).unwrap()],
@@ -3891,33 +2576,22 @@ pub fn pbo_delegation_pool_synchronize_delegation_pool(
pub fn pbo_delegation_pool_unlock(pool_address: AccountAddress, amount: u64) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("unlock").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&pool_address).unwrap(),
- bcs::to_bytes(&amount).unwrap(),
- ],
+ vec![bcs::to_bytes(&pool_address).unwrap(), bcs::to_bytes(&amount).unwrap()],
))
}
/// Allows an owner to update the commission percentage for the operator of the underlying stake pool.
-pub fn pbo_delegation_pool_update_commission_percentage(
- new_commission_percentage: u64,
-) -> TransactionPayload {
+pub fn pbo_delegation_pool_update_commission_percentage(new_commission_percentage: u64) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("update_commission_percentage").to_owned(),
vec![],
vec![bcs::to_bytes(&new_commission_percentage).unwrap()],
@@ -3930,105 +2604,56 @@ pub fn pbo_delegation_pool_update_commission_percentage(
/// This is a temporary measure to allow Supra Foundation to change the schedule for those pools
/// there were initialized with ``dummy/default'' schedule. This method must be disabled
/// before external validators are allowed to join the validator set.
-pub fn pbo_delegation_pool_update_unlocking_schedule(
- pool_address: AccountAddress,
- unlock_numerators: Vec,
- unlock_denominator: u64,
- unlock_start_time: u64,
- unlock_duration: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+pub fn pbo_delegation_pool_update_unlocking_schedule(pool_address: AccountAddress, unlock_numerators: Vec, unlock_denominator: u64, unlock_start_time: u64, unlock_duration: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("update_unlocking_schedule").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&pool_address).unwrap(),
- bcs::to_bytes(&unlock_numerators).unwrap(),
- bcs::to_bytes(&unlock_denominator).unwrap(),
- bcs::to_bytes(&unlock_start_time).unwrap(),
- bcs::to_bytes(&unlock_duration).unwrap(),
- ],
+ vec![bcs::to_bytes(&pool_address).unwrap(), bcs::to_bytes(&unlock_numerators).unwrap(), bcs::to_bytes(&unlock_denominator).unwrap(), bcs::to_bytes(&unlock_start_time).unwrap(), bcs::to_bytes(&unlock_duration).unwrap()],
))
}
-pub fn pbo_delegation_pool_update_unlocking_schedule_unchecked(
- pool_address: AccountAddress,
- unlock_numerators: Vec,
- unlock_denominator: u64,
- unlock_start_time: u64,
- unlock_duration: u64,
- last_unlock_period: u64,
-) -> TransactionPayload {
+
+pub fn pbo_delegation_pool_update_unlocking_schedule_unchecked(pool_address: AccountAddress, unlock_numerators: Vec, unlock_denominator: u64, unlock_start_time: u64, unlock_duration: u64, last_unlock_period: u64) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("update_unlocking_schedule_unchecked").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&pool_address).unwrap(),
- bcs::to_bytes(&unlock_numerators).unwrap(),
- bcs::to_bytes(&unlock_denominator).unwrap(),
- bcs::to_bytes(&unlock_start_time).unwrap(),
- bcs::to_bytes(&unlock_duration).unwrap(),
- bcs::to_bytes(&last_unlock_period).unwrap(),
- ],
+ vec![bcs::to_bytes(&pool_address).unwrap(), bcs::to_bytes(&unlock_numerators).unwrap(), bcs::to_bytes(&unlock_denominator).unwrap(), bcs::to_bytes(&unlock_start_time).unwrap(), bcs::to_bytes(&unlock_duration).unwrap(), bcs::to_bytes(&last_unlock_period).unwrap()],
))
}
/// Withdraw `amount` of owned inactive stake from the delegation pool at `pool_address`.
-pub fn pbo_delegation_pool_withdraw(
- pool_address: AccountAddress,
- amount: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("pbo_delegation_pool").to_owned(),
- ),
+pub fn pbo_delegation_pool_withdraw(pool_address: AccountAddress, amount: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("pbo_delegation_pool").to_owned(),
+ ),
ident_str!("withdraw").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&pool_address).unwrap(),
- bcs::to_bytes(&amount).unwrap(),
- ],
+ vec![bcs::to_bytes(&pool_address).unwrap(), bcs::to_bytes(&amount).unwrap()],
))
}
/// 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.
-pub fn resource_account_create_resource_account(
- seed: Vec,
- optional_auth_key: Vec,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("resource_account").to_owned(),
- ),
+pub fn resource_account_create_resource_account(seed: Vec, optional_auth_key: Vec) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("resource_account").to_owned(),
+ ),
ident_str!("create_resource_account").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&seed).unwrap(),
- bcs::to_bytes(&optional_auth_key).unwrap(),
- ],
+ vec![bcs::to_bytes(&seed).unwrap(), bcs::to_bytes(&optional_auth_key).unwrap()],
))
}
@@ -4037,51 +2662,29 @@ pub fn resource_account_create_resource_account(
/// non-empty (though auth keys are 32-bytes) or the source accounts current auth key. Note,
/// this function adds additional resource ownership to the resource account and should only be
/// used for resource accounts that need access to `Coin`.
-pub fn resource_account_create_resource_account_and_fund(
- seed: Vec,
- optional_auth_key: Vec,
- fund_amount: u64,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("resource_account").to_owned(),
- ),
+pub fn resource_account_create_resource_account_and_fund(seed: Vec, optional_auth_key: Vec, fund_amount: u64) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("resource_account").to_owned(),
+ ),
ident_str!("create_resource_account_and_fund").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&seed).unwrap(),
- bcs::to_bytes(&optional_auth_key).unwrap(),
- bcs::to_bytes(&fund_amount).unwrap(),
- ],
+ vec![bcs::to_bytes(&seed).unwrap(), bcs::to_bytes(&optional_auth_key).unwrap(), bcs::to_bytes(&fund_amount).unwrap()],
))
}
/// Creates a new resource account, publishes the package under this account transaction under
/// this account and leaves the signer cap readily available for pickup.
-pub fn resource_account_create_resource_account_and_publish_package(
- seed: Vec,
- metadata_serialized: Vec,
- code: Vec>,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("resource_account").to_owned(),
- ),
+pub fn resource_account_create_resource_account_and_publish_package(seed: Vec, metadata_serialized: Vec, code: Vec>) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("resource_account").to_owned(),
+ ),
ident_str!("create_resource_account_and_publish_package").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&seed).unwrap(),
- bcs::to_bytes(&metadata_serialized).unwrap(),
- bcs::to_bytes(&code).unwrap(),
- ],
+ vec![bcs::to_bytes(&seed).unwrap(), bcs::to_bytes(&metadata_serialized).unwrap(), bcs::to_bytes(&code).unwrap()],
))
}
@@ -4089,12 +2692,9 @@ pub fn resource_account_create_resource_account_and_publish_package(
pub fn stake_add_stake(amount: u64) -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("stake").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("stake").to_owned(),
+ ),
ident_str!("add_stake").to_owned(),
vec![],
vec![bcs::to_bytes(&amount).unwrap()],
@@ -4105,12 +2705,9 @@ pub fn stake_add_stake(amount: u64) -> TransactionPayload {
pub fn stake_increase_lockup() -> TransactionPayload {
TransactionPayload::EntryFunction(EntryFunction::new(
ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("stake").to_owned(),
- ),
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("stake").to_owned(),
+ ),
ident_str!("increase_lockup").to_owned(),
vec![],
vec![],
@@ -4121,50 +2718,28 @@ pub fn stake_increase_lockup() -> TransactionPayload {
/// except it leaves the ValidatorConfig to be set by another entity.
/// Note: this triggers setting the operator and owner, set it to the account's address
/// to set later.
-pub fn stake_initialize_stake_owner(
- initial_stake_amount: u64,
- operator: AccountAddress,
- voter: AccountAddress,
-) -> TransactionPayload {
- TransactionPayload::EntryFunction(EntryFunction::new(
- ModuleId::new(
- AccountAddress::new([
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1,
- ]),
- ident_str!("stake").to_owned(),
- ),
+pub fn stake_initialize_stake_owner(initial_stake_amount: u64, operator: AccountAddress, voter: AccountAddress) -> TransactionPayload {
+ TransactionPayload::EntryFunction(EntryFunction::new(
+ ModuleId::new(
+ AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]),
+ ident_str!("stake").to_owned(),
+ ),
ident_str!("initialize_stake_owner").to_owned(),
vec![],
- vec![
- bcs::to_bytes(&initial_stake_amount).unwrap(),
- bcs::to_bytes(&operator).unwrap(),
- bcs::to_bytes(&voter).unwrap(),
- ],
+ vec![bcs::to_bytes(&initial_stake_amount).unwrap(), bcs::to_bytes(&operator).unwrap(), bcs::to_bytes(&voter).unwrap()],
))
}
/// Initialize the validator account and give ownership to the signing account.
-pub fn stake_initialize_validator(
- consensus_pubkey: Vec,
- network_addresses: Vec