diff --git a/aptos-framework/doc/account.md b/aptos-framework/doc/account.md index fb6fc9b70..e19645730 100644 --- a/aptos-framework/doc/account.md +++ b/aptos-framework/doc/account.md @@ -936,7 +936,8 @@ is returned. This way, the caller of this function can publish additional resour -
public fun exists_at(addr: address): bool
+#[view]
+public fun exists_at(addr: address): bool
@@ -960,7 +961,8 @@ is returned. This way, the caller of this function can publish additional resour
-public fun get_guid_next_creation_num(addr: address): u64
+#[view]
+public fun get_guid_next_creation_num(addr: address): u64
@@ -984,7 +986,8 @@ is returned. This way, the caller of this function can publish additional resour
-public fun get_sequence_number(addr: address): u64
+#[view]
+public fun get_sequence_number(addr: address): u64
@@ -1039,7 +1042,8 @@ is returned. This way, the caller of this function can publish additional resour
-public fun get_authentication_key(addr: address): vector<u8>
+#[view]
+public fun get_authentication_key(addr: address): vector<u8>
@@ -1425,7 +1429,8 @@ to the account owner's signer capability).
Returns true if the account at account_addr
has a signer capability offer.
-public fun is_signer_capability_offered(account_addr: address): bool
+#[view]
+public fun is_signer_capability_offered(account_addr: address): bool
@@ -1451,7 +1456,8 @@ Returns true if the account at account_addr
has a signer capability
Returns the address of the account that has a signer capability offer from the account at account_addr
.
-public fun get_signer_capability_offer_for(account_addr: address): address
+#[view]
+public fun get_signer_capability_offer_for(account_addr: address): address
@@ -2076,7 +2082,8 @@ The Account does not exist under the new address before creating the account.
### Function `get_guid_next_creation_num`
-public fun get_guid_next_creation_num(addr: address): u64
+#[view]
+public fun get_guid_next_creation_num(addr: address): u64
@@ -2093,7 +2100,8 @@ The Account does not exist under the new address before creating the account.
### Function `get_sequence_number`
-public fun get_sequence_number(addr: address): u64
+#[view]
+public fun get_sequence_number(addr: address): u64
@@ -2133,7 +2141,8 @@ The sequence_number of the Account is up to MAX_U64.
### Function `get_authentication_key`
-public fun get_authentication_key(addr: address): vector<u8>
+#[view]
+public fun get_authentication_key(addr: address): vector<u8>
@@ -2427,7 +2436,8 @@ The authentication scheme is ED25519_SCHEME and MULTI_ED25519_SCHEME.
### Function `is_signer_capability_offered`
-public fun is_signer_capability_offered(account_addr: address): bool
+#[view]
+public fun is_signer_capability_offered(account_addr: address): bool
@@ -2443,7 +2453,8 @@ The authentication scheme is ED25519_SCHEME and MULTI_ED25519_SCHEME.
### Function `get_signer_capability_offer_for`
-public fun get_signer_capability_offer_for(account_addr: address): address
+#[view]
+public fun get_signer_capability_offer_for(account_addr: address): address
diff --git a/aptos-framework/doc/aptos_account.md b/aptos-framework/doc/aptos_account.md
index 80fc8816f..f77fdac11 100644
--- a/aptos-framework/doc/aptos_account.md
+++ b/aptos-framework/doc/aptos_account.md
@@ -462,7 +462,8 @@ receive.
By default, this returns true if an account has not explicitly set whether the can receive direct transfers.
-public fun can_receive_direct_coin_transfers(account: address): bool
+#[view]
+public fun can_receive_direct_coin_transfers(account: address): bool
@@ -813,7 +814,8 @@ Check if the AptosCoin under the address existed.
### Function `can_receive_direct_coin_transfers`
-public fun can_receive_direct_coin_transfers(account: address): bool
+#[view]
+public fun can_receive_direct_coin_transfers(account: address): bool
diff --git a/aptos-framework/doc/aptos_governance.md b/aptos-framework/doc/aptos_governance.md
index 94ec6f5ae..c19ff2462 100644
--- a/aptos-framework/doc/aptos_governance.md
+++ b/aptos-framework/doc/aptos_governance.md
@@ -707,7 +707,8 @@ AptosGovernance.
-public fun get_voting_duration_secs(): u64
+#[view]
+public fun get_voting_duration_secs(): u64
@@ -731,7 +732,8 @@ AptosGovernance.
-public fun get_min_voting_threshold(): u128
+#[view]
+public fun get_min_voting_threshold(): u128
@@ -755,7 +757,8 @@ AptosGovernance.
-public fun get_required_proposer_stake(): u64
+#[view]
+public fun get_required_proposer_stake(): u64
@@ -1289,7 +1292,8 @@ Return a signer for making changes to 0x1 as part of on-chain governance proposa
-public fun initialize_for_verification(aptos_framework: &signer, min_voting_threshold: u128, required_proposer_stake: u64, voting_duration_secs: u64)
+#[verify_only]
+public fun initialize_for_verification(aptos_framework: &signer, min_voting_threshold: u128, required_proposer_stake: u64, voting_duration_secs: u64)
@@ -1432,7 +1436,8 @@ Address @aptos_framework must exist GovernanceConfig and GovernanceEvents.
### Function `get_voting_duration_secs`
-public fun get_voting_duration_secs(): u64
+#[view]
+public fun get_voting_duration_secs(): u64
@@ -1448,7 +1453,8 @@ Address @aptos_framework must exist GovernanceConfig and GovernanceEvents.
### Function `get_min_voting_threshold`
-public fun get_min_voting_threshold(): u128
+#[view]
+public fun get_min_voting_threshold(): u128
@@ -1464,7 +1470,8 @@ Address @aptos_framework must exist GovernanceConfig and GovernanceEvents.
### Function `get_required_proposer_stake`
-public fun get_required_proposer_stake(): u64
+#[view]
+public fun get_required_proposer_stake(): u64
@@ -1993,7 +2000,8 @@ pool_address must exist in StakePool.
### Function `initialize_for_verification`
-public fun initialize_for_verification(aptos_framework: &signer, min_voting_threshold: u128, required_proposer_stake: u64, voting_duration_secs: u64)
+#[verify_only]
+public fun initialize_for_verification(aptos_framework: &signer, min_voting_threshold: u128, required_proposer_stake: u64, voting_duration_secs: u64)
diff --git a/aptos-framework/doc/block.md b/aptos-framework/doc/block.md
index fd19a25fc..5ed52b69e 100644
--- a/aptos-framework/doc/block.md
+++ b/aptos-framework/doc/block.md
@@ -320,7 +320,8 @@ Can only be called as part of the Aptos governance proposal process established
Return epoch interval in seconds.
-public fun get_epoch_interval_secs(): u64
+#[view]
+public fun get_epoch_interval_secs(): u64
@@ -425,7 +426,8 @@ The runtime always runs this before executing the transactions in a block.
Get the current block height
-public fun get_current_block_height(): u64
+#[view]
+public fun get_current_block_height(): u64
@@ -667,7 +669,8 @@ The BlockResource existed under the @aptos_framework.
### Function `get_epoch_interval_secs`
-public fun get_epoch_interval_secs(): u64
+#[view]
+public fun get_epoch_interval_secs(): u64
@@ -710,7 +713,8 @@ The BlockResource existed under the @aptos_framework.
### Function `get_current_block_height`
-public fun get_current_block_height(): u64
+#[view]
+public fun get_current_block_height(): u64
diff --git a/aptos-framework/doc/chain_id.md b/aptos-framework/doc/chain_id.md
index 797c71457..3cd22f09a 100644
--- a/aptos-framework/doc/chain_id.md
+++ b/aptos-framework/doc/chain_id.md
@@ -82,7 +82,8 @@ Publish the chain ID id
of this instance under the SystemAddresses
Return the chain ID of this instance.
-public fun get(): u8
+#[view]
+public fun get(): u8
@@ -135,7 +136,8 @@ Return the chain ID of this instance.
### Function `get`
-public fun get(): u8
+#[view]
+public fun get(): u8
diff --git a/aptos-framework/doc/chain_status.md b/aptos-framework/doc/chain_status.md
index 46219dbe6..4b91cf10f 100644
--- a/aptos-framework/doc/chain_status.md
+++ b/aptos-framework/doc/chain_status.md
@@ -114,7 +114,8 @@ Marks that genesis has finished.
Helper function to determine if Aptos is in genesis state.
-public fun is_genesis(): bool
+#[view]
+public fun is_genesis(): bool
@@ -141,7 +142,8 @@ the same as !is_gene
Testing is_operating()
is more frequent than is_genesis()
.
-public fun is_operating(): bool
+#[view]
+public fun is_operating(): bool
diff --git a/aptos-framework/doc/coin.md b/aptos-framework/doc/coin.md
index 1dc3bd18f..7edc1cf7b 100644
--- a/aptos-framework/doc/coin.md
+++ b/aptos-framework/doc/coin.md
@@ -907,7 +907,8 @@ A helper function that returns the address of CoinType.
Returns the balance of owner
for provided CoinType
.
-public fun balance<CoinType>(owner: address): u64
+#[view]
+public fun balance<CoinType>(owner: address): u64
@@ -936,7 +937,8 @@ Returns the balance of owner
for provided CoinType
.
Returns true
if the type CoinType
is an initialized coin.
-public fun is_coin_initialized<CoinType>(): bool
+#[view]
+public fun is_coin_initialized<CoinType>(): bool
@@ -961,7 +963,8 @@ Returns true
if the type CoinType
is an initial
Returns true
if account_addr
is registered to receive CoinType
.
-public fun is_account_registered<CoinType>(account_addr: address): bool
+#[view]
+public fun is_account_registered<CoinType>(account_addr: address): bool
@@ -986,7 +989,8 @@ Returns true
if account_addr
is registered to r
Returns the name of the coin.
-public fun name<CoinType>(): string::String
+#[view]
+public fun name<CoinType>(): string::String
@@ -1011,7 +1015,8 @@ Returns the name of the coin.
Returns the symbol of the coin, usually a shorter version of the name.
-public fun symbol<CoinType>(): string::String
+#[view]
+public fun symbol<CoinType>(): string::String
@@ -1038,7 +1043,8 @@ For example, if decimals
equals 2
, a balance of
be displayed to a user as 5.05
(505 / 10 ** 2
).
-public fun decimals<CoinType>(): u8
+#[view]
+public fun decimals<CoinType>(): u8
@@ -1063,7 +1069,8 @@ be displayed to a user as 5.05
(505 / 10 ** 2
).
Returns the amount of coin in existence.
-public fun supply<CoinType>(): option::Option<u128>
+#[view]
+public fun supply<CoinType>(): option::Option<u128>
@@ -1313,7 +1320,8 @@ Extracts the entire amount from the passed-in c
Freeze a CoinStore to prevent transfers
-public entry fun freeze_coin_store<CoinType>(account_addr: address, _freeze_cap: &coin::FreezeCapability<CoinType>)
+#[legacy_entry_fun]
+public entry fun freeze_coin_store<CoinType>(account_addr: address, _freeze_cap: &coin::FreezeCapability<CoinType>)
@@ -1342,7 +1350,8 @@ Freeze a CoinStore to prevent transfers
Unfreeze a CoinStore to allow transfers
-public entry fun unfreeze_coin_store<CoinType>(account_addr: address, _freeze_cap: &coin::FreezeCapability<CoinType>)
+#[legacy_entry_fun]
+public entry fun unfreeze_coin_store<CoinType>(account_addr: address, _freeze_cap: &coin::FreezeCapability<CoinType>)
@@ -2113,7 +2122,8 @@ Get address by reflection.
### Function `balance`
-public fun balance<CoinType>(owner: address): u64
+#[view]
+public fun balance<CoinType>(owner: address): u64
@@ -2130,7 +2140,8 @@ Get address by reflection.
### Function `is_coin_initialized`
-public fun is_coin_initialized<CoinType>(): bool
+#[view]
+public fun is_coin_initialized<CoinType>(): bool
@@ -2188,7 +2199,8 @@ Get address by reflection.
### Function `name`
-public fun name<CoinType>(): string::String
+#[view]
+public fun name<CoinType>(): string::String
@@ -2204,7 +2216,8 @@ Get address by reflection.
### Function `symbol`
-public fun symbol<CoinType>(): string::String
+#[view]
+public fun symbol<CoinType>(): string::String
@@ -2220,7 +2233,8 @@ Get address by reflection.
### Function `decimals`
-public fun decimals<CoinType>(): u8
+#[view]
+public fun decimals<CoinType>(): u8
@@ -2236,7 +2250,8 @@ Get address by reflection.
### Function `supply`
-public fun supply<CoinType>(): option::Option<u128>
+#[view]
+public fun supply<CoinType>(): option::Option<u128>
@@ -2403,7 +2418,8 @@ The value of zero_coin
must be 0.
### Function `freeze_coin_store`
-public entry fun freeze_coin_store<CoinType>(account_addr: address, _freeze_cap: &coin::FreezeCapability<CoinType>)
+#[legacy_entry_fun]
+public entry fun freeze_coin_store<CoinType>(account_addr: address, _freeze_cap: &coin::FreezeCapability<CoinType>)
@@ -2423,7 +2439,8 @@ The value of zero_coin
must be 0.
### Function `unfreeze_coin_store`
-public entry fun unfreeze_coin_store<CoinType>(account_addr: address, _freeze_cap: &coin::FreezeCapability<CoinType>)
+#[legacy_entry_fun]
+public entry fun unfreeze_coin_store<CoinType>(account_addr: address, _freeze_cap: &coin::FreezeCapability<CoinType>)
diff --git a/aptos-framework/doc/delegation_pool.md b/aptos-framework/doc/delegation_pool.md
index 205790b4d..b96923272 100644
--- a/aptos-framework/doc/delegation_pool.md
+++ b/aptos-framework/doc/delegation_pool.md
@@ -738,7 +738,8 @@ Scaling factor of shares pools used within the delegation pool
Return whether supplied address addr
is owner of a delegation pool.
-public fun owner_cap_exists(addr: address): bool
+#[view]
+public fun owner_cap_exists(addr: address): bool
@@ -763,7 +764,8 @@ Return whether supplied address addr
is owner of a delegation pool.
Return address of the delegation pool owned by owner
or fail if there is none.
-public fun get_owned_pool_address(owner: address): address
+#[view]
+public fun get_owned_pool_address(owner: address): address
@@ -789,7 +791,8 @@ Return address of the delegation pool owned by owner
or fail if the
Return whether a delegation pool exists at supplied address addr
.
-public fun delegation_pool_exists(addr: address): bool
+#[view]
+public fun delegation_pool_exists(addr: address): bool
@@ -814,7 +817,8 @@ Return whether a delegation pool exists at supplied address addr
.
Return the index of current observed lockup cycle on delegation pool pool_address
.
-public fun observed_lockup_cycle(pool_address: address): u64
+#[view]
+public fun observed_lockup_cycle(pool_address: address): u64
@@ -840,7 +844,8 @@ Return the index of current observed lockup cycle on delegation pool pool_
Return the operator commission percentage set on the delegation pool pool_address
.
-public fun operator_commission_percentage(pool_address: address): u64
+#[view]
+public fun operator_commission_percentage(pool_address: address): u64
@@ -866,7 +871,8 @@ Return the operator commission percentage set on the delegation pool pool_
Return the number of delegators owning active stake within pool_address
.
-public fun shareholders_count_active_pool(pool_address: address): u64
+#[view]
+public fun shareholders_count_active_pool(pool_address: address): u64
@@ -893,7 +899,8 @@ Return the stake amounts on pool_address
in the different states:
(active
,inactive
,pending_active
,pending_inactive
)
-public fun get_delegation_pool_stake(pool_address: address): (u64, u64, u64, u64)
+#[view]
+public fun get_delegation_pool_stake(pool_address: address): (u64, u64, u64, u64)
@@ -920,7 +927,8 @@ Return whether the given delegator has any withdrawable stake. If they recently
some stake and the stake pool's lockup cycle has not ended, their coins are not withdrawable yet.
-public fun get_pending_withdrawal(pool_address: address, delegator_address: address): (bool, u64)
+#[view]
+public fun get_pending_withdrawal(pool_address: address, delegator_address: address): (bool, u64)
@@ -979,7 +987,8 @@ Return total stake owned by delegator_address
within delegation poo
in each of its individual states: (active
,inactive
,pending_inactive
)
-public fun get_stake(pool_address: address, delegator_address: address): (u64, u64, u64)
+#[view]
+public fun get_stake(pool_address: address, delegator_address: address): (u64, u64, u64)
@@ -1060,7 +1069,8 @@ for the rewards the remaining stake would have earned if active:
extracted-fee = (amount - extracted-fee) * reward-rate% * (100% - operator-commission%)
-public fun get_add_stake_fee(pool_address: address, amount: u64): u64
+#[view]
+public fun get_add_stake_fee(pool_address: address, amount: u64): u64
@@ -1097,7 +1107,8 @@ the delegation pool, implicitly its stake pool, in the special case
the validator had gone inactive before its lockup expired.
-public fun can_withdraw_pending_inactive(pool_address: address): bool
+#[view]
+public fun can_withdraw_pending_inactive(pool_address: address): bool
diff --git a/aptos-framework/doc/fungible_asset.md b/aptos-framework/doc/fungible_asset.md
index 4116601a5..55018f171 100644
--- a/aptos-framework/doc/fungible_asset.md
+++ b/aptos-framework/doc/fungible_asset.md
@@ -81,7 +81,8 @@ metadata object can be any object that equipped with Supply has key
+#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
+struct Supply has key
@@ -115,7 +116,8 @@ metadata object can be any object that equipped with Metadata has key
+#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
+struct Metadata has key
@@ -171,7 +173,8 @@ Metadata of a Fungible asset
The store object that holds fungible assets of a specific type associated with an account.
-struct FungibleStore has key
+#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
+struct FungibleStore has key
@@ -210,7 +213,8 @@ The store object that holds fungible assets of a specific type associated with a
-struct FungibleAssetEvents has key
+#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
+struct FungibleAssetEvents has key
@@ -854,7 +858,8 @@ This can only be called at object creation time as constructor_ref is only avail
Get the current supply from the metadata
object.
-public fun supply<T: key>(metadata: object::Object<T>): option::Option<u128>
+#[view]
+public fun supply<T: key>(metadata: object::Object<T>): option::Option<u128>
@@ -885,7 +890,8 @@ Get the current supply from the metadata
object.
Get the maximum supply from the metadata
object.
-public fun maximum<T: key>(metadata: object::Object<T>): option::Option<u128>
+#[view]
+public fun maximum<T: key>(metadata: object::Object<T>): option::Option<u128>
@@ -916,7 +922,8 @@ Get the maximum supply from the metadata
object.
Get the name of the fungible asset from the metadata
object.
-public fun name<T: key>(metadata: object::Object<T>): string::String
+#[view]
+public fun name<T: key>(metadata: object::Object<T>): string::String
@@ -941,7 +948,8 @@ Get the name of the fungible asset from the metadata
object.
Get the symbol of the fungible asset from the metadata
object.
-public fun symbol<T: key>(metadata: object::Object<T>): string::String
+#[view]
+public fun symbol<T: key>(metadata: object::Object<T>): string::String
@@ -966,7 +974,8 @@ Get the symbol of the fungible asset from the metadata
object.
Get the decimals from the metadata
object.
-public fun decimals<T: key>(metadata: object::Object<T>): u8
+#[view]
+public fun decimals<T: key>(metadata: object::Object<T>): u8
@@ -991,7 +1000,8 @@ Get the decimals from the metadata
object.
Return whether the provided address has a store initialized.
-public fun store_exists(store: address): bool
+#[view]
+public fun store_exists(store: address): bool
@@ -1041,7 +1051,8 @@ Return the underlying metadata object
Return the underlying metadata object.
-public fun store_metadata<T: key>(store: object::Object<T>): object::Object<fungible_asset::Metadata>
+#[view]
+public fun store_metadata<T: key>(store: object::Object<T>): object::Object<fungible_asset::Metadata>
@@ -1091,7 +1102,8 @@ Return the amount
of a given fungible asset.
Get the balance of a given store.
-public fun balance<T: key>(store: object::Object<T>): u64
+#[view]
+public fun balance<T: key>(store: object::Object<T>): u64
@@ -1122,7 +1134,8 @@ Return whether a store is frozen.
If the store has not been created, we default to returning false so deposits can be sent to it.
-public fun is_frozen<T: key>(store: object::Object<T>): bool
+#[view]
+public fun is_frozen<T: key>(store: object::Object<T>): bool
diff --git a/aptos-framework/doc/genesis.md b/aptos-framework/doc/genesis.md
index 90607e0d4..38011baa6 100644
--- a/aptos-framework/doc/genesis.md
+++ b/aptos-framework/doc/genesis.md
@@ -812,7 +812,8 @@ The last step of genesis.
-fun initialize_for_verification(gas_schedule: vector<u8>, chain_id: u8, initial_version: u64, consensus_config: vector<u8>, execution_config: vector<u8>, epoch_interval_microsecs: u64, minimum_stake: u64, maximum_stake: u64, recurring_lockup_duration_secs: u64, allow_validator_set_change: bool, rewards_rate: u64, rewards_rate_denominator: u64, voting_power_increase_limit: u64, aptos_framework: &signer, min_voting_threshold: u128, required_proposer_stake: u64, voting_duration_secs: u64, accounts: vector<genesis::AccountMap>, employee_vesting_start: u64, employee_vesting_period_duration: u64, employees: vector<genesis::EmployeeAccountMap>, validators: vector<genesis::ValidatorConfigurationWithCommission>)
+#[verify_only]
+fun initialize_for_verification(gas_schedule: vector<u8>, chain_id: u8, initial_version: u64, consensus_config: vector<u8>, execution_config: vector<u8>, epoch_interval_microsecs: u64, minimum_stake: u64, maximum_stake: u64, recurring_lockup_duration_secs: u64, allow_validator_set_change: bool, rewards_rate: u64, rewards_rate_denominator: u64, voting_power_increase_limit: u64, aptos_framework: &signer, min_voting_threshold: u128, required_proposer_stake: u64, voting_duration_secs: u64, accounts: vector<genesis::AccountMap>, employee_vesting_start: u64, employee_vesting_period_duration: u64, employees: vector<genesis::EmployeeAccountMap>, validators: vector<genesis::ValidatorConfigurationWithCommission>)
@@ -895,7 +896,8 @@ The last step of genesis.
### Function `initialize_for_verification`
-fun initialize_for_verification(gas_schedule: vector<u8>, chain_id: u8, initial_version: u64, consensus_config: vector<u8>, execution_config: vector<u8>, epoch_interval_microsecs: u64, minimum_stake: u64, maximum_stake: u64, recurring_lockup_duration_secs: u64, allow_validator_set_change: bool, rewards_rate: u64, rewards_rate_denominator: u64, voting_power_increase_limit: u64, aptos_framework: &signer, min_voting_threshold: u128, required_proposer_stake: u64, voting_duration_secs: u64, accounts: vector<genesis::AccountMap>, employee_vesting_start: u64, employee_vesting_period_duration: u64, employees: vector<genesis::EmployeeAccountMap>, validators: vector<genesis::ValidatorConfigurationWithCommission>)
+#[verify_only]
+fun initialize_for_verification(gas_schedule: vector<u8>, chain_id: u8, initial_version: u64, consensus_config: vector<u8>, execution_config: vector<u8>, epoch_interval_microsecs: u64, minimum_stake: u64, maximum_stake: u64, recurring_lockup_duration_secs: u64, allow_validator_set_change: bool, rewards_rate: u64, rewards_rate_denominator: u64, voting_power_increase_limit: u64, aptos_framework: &signer, min_voting_threshold: u128, required_proposer_stake: u64, voting_duration_secs: u64, accounts: vector<genesis::AccountMap>, employee_vesting_start: u64, employee_vesting_period_duration: u64, employees: vector<genesis::EmployeeAccountMap>, validators: vector<genesis::ValidatorConfigurationWithCommission>)
diff --git a/aptos-framework/doc/multisig_account.md b/aptos-framework/doc/multisig_account.md
index fdfc38d0d..8d890f766 100644
--- a/aptos-framework/doc/multisig_account.md
+++ b/aptos-framework/doc/multisig_account.md
@@ -926,7 +926,8 @@ Transaction with specified id cannot be found.
Return the multisig account's metadata.
-public fun metadata(multisig_account: address): simple_map::SimpleMap<string::String, vector<u8>>
+#[view]
+public fun metadata(multisig_account: address): simple_map::SimpleMap<string::String, vector<u8>>
@@ -952,7 +953,8 @@ Return the number of signatures required to execute or execute-reject a transact
multisig account.
-public fun num_signatures_required(multisig_account: address): u64
+#[view]
+public fun num_signatures_required(multisig_account: address): u64
@@ -977,7 +979,8 @@ multisig account.
Return a vector of all of the provided multisig account's owners.
-public fun owners(multisig_account: address): vector<address>
+#[view]
+public fun owners(multisig_account: address): vector<address>
@@ -1002,7 +1005,8 @@ Return a vector of all of the provided multisig account's owners.
Return the transaction with the given transaction id.
-public fun get_transaction(multisig_account: address, sequence_number: u64): multisig_account::MultisigTransaction
+#[view]
+public fun get_transaction(multisig_account: address, sequence_number: u64): multisig_account::MultisigTransaction
@@ -1035,7 +1039,8 @@ Return the transaction with the given transaction id.
Return all pending transactions.
-public fun get_pending_transactions(multisig_account: address): vector<multisig_account::MultisigTransaction>
+#[view]
+public fun get_pending_transactions(multisig_account: address): vector<multisig_account::MultisigTransaction>
@@ -1068,7 +1073,8 @@ Return all pending transactions.
Return the payload for the next transaction in the queue.
-public fun get_next_transaction_payload(multisig_account: address, provided_payload: vector<u8>): vector<u8>
+#[view]
+public fun get_next_transaction_payload(multisig_account: address, provided_payload: vector<u8>): vector<u8>
@@ -1102,7 +1108,8 @@ Return the payload for the next transaction in the queue.
Return true if the transaction with given transaction id can be executed now.
-public fun can_be_executed(multisig_account: address, sequence_number: u64): bool
+#[view]
+public fun can_be_executed(multisig_account: address, sequence_number: u64): bool
@@ -1136,7 +1143,8 @@ Return true if the transaction with given transaction id can be executed now.
Return true if the transaction with given transaction id can be officially rejected.
-public fun can_be_rejected(multisig_account: address, sequence_number: u64): bool
+#[view]
+public fun can_be_rejected(multisig_account: address, sequence_number: u64): bool
@@ -1170,7 +1178,8 @@ Return true if the transaction with given transaction id can be officially rejec
Return the predicted address for the next multisig account if created from the given creator address.
-public fun get_next_multisig_account_address(creator: address): address
+#[view]
+public fun get_next_multisig_account_address(creator: address): address
@@ -1196,7 +1205,8 @@ Return the predicted address for the next multisig account if created from the g
Return the id of the last transaction that was executed (successful or failed) or removed.
-public fun last_resolved_sequence_number(multisig_account: address): u64
+#[view]
+public fun last_resolved_sequence_number(multisig_account: address): u64
@@ -1222,7 +1232,8 @@ Return the id of the last transaction that was executed (successful or failed) o
Return the id of the next transaction created.
-public fun next_sequence_number(multisig_account: address): u64
+#[view]
+public fun next_sequence_number(multisig_account: address): u64
@@ -1248,7 +1259,8 @@ Return the id of the next transaction created.
Return a bool tuple indicating whether an owner has voted and if so, whether they voted yes or no.
-public fun vote(multisig_account: address, sequence_number: u64, owner: address): (bool, bool)
+#[view]
+public fun vote(multisig_account: address, sequence_number: u64, owner: address): (bool, bool)
diff --git a/aptos-framework/doc/object.md b/aptos-framework/doc/object.md
index 520ed1c93..99ceda65c 100644
--- a/aptos-framework/doc/object.md
+++ b/aptos-framework/doc/object.md
@@ -99,7 +99,8 @@ make it so that a reference to a global object can be returned from a function.
The core of the object model that defines ownership, transferability, and events.
-struct ObjectCore has key
+#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
+struct ObjectCore has key
@@ -146,7 +147,8 @@ The core of the object model that defines ownership, transferability, and events
A shared resource group for storing object resources together in storage.
-struct ObjectGroup
+#[resource_group(#[scope = global])]
+struct ObjectGroup
diff --git a/aptos-framework/doc/primary_fungible_store.md b/aptos-framework/doc/primary_fungible_store.md
index d7b918098..b3666cc50 100644
--- a/aptos-framework/doc/primary_fungible_store.md
+++ b/aptos-framework/doc/primary_fungible_store.md
@@ -51,7 +51,8 @@ stores for users with deterministic addresses so that users can easily deposit/w
assets.
-struct DeriveRefPod has key
+#[resource_group_member(#[group = 0x1::object::ObjectGroup])]
+struct DeriveRefPod has key
@@ -195,7 +196,8 @@ Create a primary store object to hold fungible asset for the given address.
Get the address of the primary store for the given account.
-public fun primary_store_address<T: key>(owner: address, metadata: object::Object<T>): address
+#[view]
+public fun primary_store_address<T: key>(owner: address, metadata: object::Object<T>): address
@@ -221,7 +223,8 @@ Get the address of the primary store for the given account.
Get the primary store object for the given account.
-public fun primary_store<T: key>(owner: address, metadata: object::Object<T>): object::Object<fungible_asset::FungibleStore>
+#[view]
+public fun primary_store<T: key>(owner: address, metadata: object::Object<T>): object::Object<fungible_asset::FungibleStore>
@@ -247,7 +250,8 @@ Get the primary store object for the given account.
Return whether the given account's primary store exists.
-public fun primary_store_exists<T: key>(account: address, metadata: object::Object<T>): bool
+#[view]
+public fun primary_store_exists<T: key>(account: address, metadata: object::Object<T>): bool
@@ -272,7 +276,8 @@ Return whether the given account's primary store exists.
Get the balance of account
's primary store.
-public fun balance<T: key>(account: address, metadata: object::Object<T>): u64
+#[view]
+public fun balance<T: key>(account: address, metadata: object::Object<T>): u64
@@ -301,7 +306,8 @@ Get the balance of account
's p
Return whether the given account's primary store is frozen.
-public fun is_frozen<T: key>(account: address, metadata: object::Object<T>): bool
+#[view]
+public fun is_frozen<T: key>(account: address, metadata: object::Object<T>): bool
diff --git a/aptos-framework/doc/stake.md b/aptos-framework/doc/stake.md
index e838e2f4d..f829d2a58 100644
--- a/aptos-framework/doc/stake.md
+++ b/aptos-framework/doc/stake.md
@@ -1373,7 +1373,8 @@ Return the lockup expiration of the stake pool at pool_address
.
This will throw an error if there's no stake pool at pool_address
.
-public fun get_lockup_secs(pool_address: address): u64
+#[view]
+public fun get_lockup_secs(pool_address: address): u64
@@ -1400,7 +1401,8 @@ Return the remaining lockup of the stake pool at pool_address
.
This will throw an error if there's no stake pool at pool_address
.
-public fun get_remaining_lockup_secs(pool_address: address): u64
+#[view]
+public fun get_remaining_lockup_secs(pool_address: address): u64
@@ -1432,7 +1434,8 @@ Return the different stake amounts for pool_address
(whether the va
The returned amounts are for (active, inactive, pending_active, pending_inactive) stake respectively.
-public fun get_stake(pool_address: address): (u64, u64, u64, u64)
+#[view]
+public fun get_stake(pool_address: address): (u64, u64, u64, u64)
@@ -1464,7 +1467,8 @@ The returned amounts are for (active, inactive, pending_active, pending_inactive
Returns the validator's state.
-public fun get_validator_state(pool_address: address): u64
+#[view]
+public fun get_validator_state(pool_address: address): u64
@@ -1499,7 +1503,8 @@ Return the voting power of the validator in the current epoch.
This is the same as the validator's total active and pending_inactive stake.
-public fun get_current_epoch_voting_power(pool_address: address): u64
+#[view]
+public fun get_current_epoch_voting_power(pool_address: address): u64
@@ -1533,7 +1538,8 @@ This is the same as the validator's total active and pending_inactive stake.
Return the delegated voter of the validator at pool_address
.
-public fun get_delegated_voter(pool_address: address): address
+#[view]
+public fun get_delegated_voter(pool_address: address): address
@@ -1559,7 +1565,8 @@ Return the delegated voter of the validator at pool_address
.
Return the operator of the validator at pool_address
.
-public fun get_operator(pool_address: address): address
+#[view]
+public fun get_operator(pool_address: address): address
@@ -1610,7 +1617,8 @@ Return the pool address in owner_cap
.
Return the validator index for pool_address
.
-public fun get_validator_index(pool_address: address): u64
+#[view]
+public fun get_validator_index(pool_address: address): u64
@@ -1636,7 +1644,8 @@ Return the validator index for pool_address
.
Return the number of successful and failed proposals for the proposal at the given validator index.
-public fun get_current_epoch_proposal_counts(validator_index: u64): (u64, u64)
+#[view]
+public fun get_current_epoch_proposal_counts(validator_index: u64): (u64, u64)
@@ -1663,7 +1672,8 @@ Return the number of successful and failed proposals for the proposal at the giv
Return the validator's config.
-public fun get_validator_config(pool_address: address): (vector<u8>, vector<u8>, vector<u8>)
+#[view]
+public fun get_validator_config(pool_address: address): (vector<u8>, vector<u8>, vector<u8>)
@@ -1689,7 +1699,8 @@ Return the validator's config.
-public fun stake_pool_exists(addr: address): bool
+#[view]
+public fun stake_pool_exists(addr: address): bool
@@ -3695,7 +3706,8 @@ Returns validator's next epoch voting power, including pending_active, active, a
### Function `get_validator_state`
-public fun get_validator_state(pool_address: address): u64
+#[view]
+public fun get_validator_state(pool_address: address): u64
diff --git a/aptos-framework/doc/staking_contract.md b/aptos-framework/doc/staking_contract.md
index 3c64f4bf0..6b096895e 100644
--- a/aptos-framework/doc/staking_contract.md
+++ b/aptos-framework/doc/staking_contract.md
@@ -123,7 +123,8 @@ pool.
-struct StakingGroupContainer
+#[resource_group(#[scope = module_])]
+struct StakingGroupContainer
@@ -333,7 +334,8 @@ pool.
-struct StakingGroupUpdateCommissionEvent has key
+#[resource_group_member(#[group = 0x1::staking_contract::StakingGroupContainer])]
+struct StakingGroupUpdateCommissionEvent has key
@@ -849,7 +851,8 @@ operator.
This errors out the staking contract with the provided staker and operator doesn't exist.
-public fun stake_pool_address(staker: address, operator: address): address
+#[view]
+public fun stake_pool_address(staker: address, operator: address): address
@@ -879,7 +882,8 @@ for staking contract between the provided staker and operator.
This errors out the staking contract with the provided staker and operator doesn't exist.
-public fun last_recorded_principal(staker: address, operator: address): u64
+#[view]
+public fun last_recorded_principal(staker: address, operator: address): u64
@@ -909,7 +913,8 @@ between the provided staker and operator.
This errors out the staking contract with the provided staker and operator doesn't exist.
-public fun commission_percentage(staker: address, operator: address): u64
+#[view]
+public fun commission_percentage(staker: address, operator: address): u64
@@ -941,7 +946,8 @@ Return a tuple of three numbers:
This errors out the staking contract with the provided staker and operator doesn't exist.
-public fun staking_contract_amounts(staker: address, operator: address): (u64, u64, u64)
+#[view]
+public fun staking_contract_amounts(staker: address, operator: address): (u64, u64, u64)
@@ -971,7 +977,8 @@ Return the number of pending distributions (e.g. commission, withdrawals from st
This errors out the staking contract with the provided staker and operator doesn't exist.
-public fun pending_distribution_counts(staker: address, operator: address): u64
+#[view]
+public fun pending_distribution_counts(staker: address, operator: address): u64
@@ -998,7 +1005,8 @@ This errors out the staking contract with the provided staker and operator doesn
Return true if the staking contract between the provided staker and operator exists.
-public fun staking_contract_exists(staker: address, operator: address): bool
+#[view]
+public fun staking_contract_exists(staker: address, operator: address): bool
@@ -1944,7 +1952,8 @@ Create a new staking_contracts resource.
### Function `stake_pool_address`
-public fun stake_pool_address(staker: address, operator: address): address
+#[view]
+public fun stake_pool_address(staker: address, operator: address): address
@@ -1960,7 +1969,8 @@ Create a new staking_contracts resource.
### Function `last_recorded_principal`
-public fun last_recorded_principal(staker: address, operator: address): u64
+#[view]
+public fun last_recorded_principal(staker: address, operator: address): u64
@@ -1977,7 +1987,8 @@ Staking_contract exists the stacker/operator pair.
### Function `commission_percentage`
-public fun commission_percentage(staker: address, operator: address): u64
+#[view]
+public fun commission_percentage(staker: address, operator: address): u64
@@ -1994,7 +2005,8 @@ Staking_contract exists the stacker/operator pair.
### Function `staking_contract_amounts`
-public fun staking_contract_amounts(staker: address, operator: address): (u64, u64, u64)
+#[view]
+public fun staking_contract_amounts(staker: address, operator: address): (u64, u64, u64)
@@ -2015,7 +2027,8 @@ Staking_contract exists the stacker/operator pair.
### Function `pending_distribution_counts`
-public fun pending_distribution_counts(staker: address, operator: address): u64
+#[view]
+public fun pending_distribution_counts(staker: address, operator: address): u64
@@ -2032,7 +2045,8 @@ Staking_contract exists the stacker/operator pair.
### Function `staking_contract_exists`
-public fun staking_contract_exists(staker: address, operator: address): bool
+#[view]
+public fun staking_contract_exists(staker: address, operator: address): bool
diff --git a/aptos-framework/doc/timestamp.md b/aptos-framework/doc/timestamp.md
index c00827692..fe4b42000 100644
--- a/aptos-framework/doc/timestamp.md
+++ b/aptos-framework/doc/timestamp.md
@@ -163,7 +163,8 @@ Updates the wall clock time by consensus. Requires VM privilege and will be invo
Gets the current time in microseconds.
-public fun now_microseconds(): u64
+#[view]
+public fun now_microseconds(): u64
@@ -188,7 +189,8 @@ Gets the current time in microseconds.
Gets the current time in seconds.
-public fun now_seconds(): u64
+#[view]
+public fun now_seconds(): u64
diff --git a/aptos-framework/doc/vesting.md b/aptos-framework/doc/vesting.md
index 50f672f72..04eaa5b97 100644
--- a/aptos-framework/doc/vesting.md
+++ b/aptos-framework/doc/vesting.md
@@ -1148,7 +1148,8 @@ Return the address of the underlying stake pool (separate resource account) of t
This errors out if the vesting contract with the provided address doesn't exist.
-public fun stake_pool_address(vesting_contract_address: address): address
+#[view]
+public fun stake_pool_address(vesting_contract_address: address): address
@@ -1177,7 +1178,8 @@ Vesting will start at this time, and once a full period has passed, the first ve
This errors out if the vesting contract with the provided address doesn't exist.
-public fun vesting_start_secs(vesting_contract_address: address): u64
+#[view]
+public fun vesting_start_secs(vesting_contract_address: address): u64
@@ -1206,7 +1208,8 @@ Each vest is released after one full period has started, starting from the speci
This errors out if the vesting contract with the provided address doesn't exist.
-public fun period_duration_secs(vesting_contract_address: address): u64
+#[view]
+public fun period_duration_secs(vesting_contract_address: address): u64
@@ -1237,7 +1240,8 @@ according to the vesting schedule.
This errors out if the vesting contract with the provided address doesn't exist.
-public fun remaining_grant(vesting_contract_address: address): u64
+#[view]
+