From 6118f7e5ac4c06dfa1c73795ce217d34d67b03e2 Mon Sep 17 00:00:00 2001
From: Phidel Musungu
Date: Mon, 16 Dec 2024 14:32:57 +0300
Subject: [PATCH 01/11] initialization of poel & i_asset: decriptions for types
---
.../supra-framework/sources/i_asset.move | 37 +++++
.../supra-framework/sources/poel.move | 128 ++++++++++++++++++
2 files changed, 165 insertions(+)
create mode 100644 aptos-move/framework/supra-framework/sources/i_asset.move
create mode 100644 aptos-move/framework/supra-framework/sources/poel.move
diff --git a/aptos-move/framework/supra-framework/sources/i_asset.move b/aptos-move/framework/supra-framework/sources/i_asset.move
new file mode 100644
index 0000000000000..f5de8c137620b
--- /dev/null
+++ b/aptos-move/framework/supra-framework/sources/i_asset.move
@@ -0,0 +1,37 @@
+///
+/// This is the iAsset module used as the iAsset standard given to users who deposited assets
+/// via the intralayer vault. Holders of iAsset get an amount of $supra delegated to staking pools depending on the
+/// amount of assets deposited and the price of the asset. ie If the price of the asset if
+/// up compared with $Supra the system lends more to the user delegating more $supra
+/// to the delegation pools and correspondingly if the price drops the system lends less, withdrawing some assets
+/// from the delegation pools. Holders of iAsset get $supra rewards from the staking pools while enabling them to utilize
+/// the iAsset as an underlying asset of their deposited asset for other defi utilities. Transfer of iAsset to a different address
+/// transfers the acrual of rewards to the receiving address for the period beging after the transfer.
+///
+/// Errors:
+///
+///
+/// Structs:
+/// This struct holds individual iAsset parameters for each user's holdings
+/// struct AssetEntry has store, copy {
+/// ///iAssetBalance: Amount of iAsset held by the user.
+/// iAsset_balance: u64,
+/// ///UserRewardIndex: Track RewardIndex specific to the user for each asset.
+/// user_reward_index: u64,
+/// ///Preminted_iAssets: Tracks number of iAssets that are preminted.
+/// preminted_iAssets: u64,
+/// ///Redeem_Requested_iAssets: Number of iAssets for which redemption has been requested.
+/// redeem_requested_iAssets: u64,
+/// ///Preminiting_OLC_Index: Records the index of the last cycle during which a preminting request was submitted for an asset.
+/// preminiting_OLC_index: u64
+/// }
+///
+/// This structs holds a user's Liquidity information with a table mapping to all assets
+/// struct LiquidityProvider has key {
+/// ///iAsset_table: Utilizes aptos_std::table to map asset IDs to multiple attributes in AssetEntry
+/// iAsset_table: table::Table,
+/// ///allocated_Rewards: Tracks the total rewards that are allocable to the user.
+/// allocated_rewards: u64,
+/// ///unlock_OLC_Index: Registers the index of the lockup cycle when the user last submitted an unlock request.
+/// unlock_olc_index: u64
+/// }
\ No newline at end of file
diff --git a/aptos-move/framework/supra-framework/sources/poel.move b/aptos-move/framework/supra-framework/sources/poel.move
new file mode 100644
index 0000000000000..d99996961b6e1
--- /dev/null
+++ b/aptos-move/framework/supra-framework/sources/poel.move
@@ -0,0 +1,128 @@
+///
+/// This is the Proof of Efficiency Liquidity module used to delagate $supra to staking pools for users
+/// who hold iEth by making deposits of ETH to the intralayer vault. It handles the creation of the iETH and distribution to the
+/// corresponding addresses on supra
+///
+/// Flow:
+/// 1. Users submit WETH to the Intralayer Vault on the Ethereum blockchain.
+/// 2. The Supra cross-chain communication protocol transfers the deposit information to the PoEL (Proof of Efficient Liquidity) contract on the Supra chain.
+/// 3. This process creates a new token, iETH (InterLayer ETH), which is distributed to the user's address on Supra.
+/// 4. In the background, utilizing the PoEL protocol, assets deposited into the Intralayer Vault serve as collateral to
+/// borrow $Supra and stake it in the Supra PoS system. The PoEL contract periodically lends $Supra tokens to users who have submitted WETH to the Intralayer
+/// Vault and evenly distributes these tokens among various delegation pools participating in the system.
+/// In this setup, the PoEL contract itself acts as the delegator of the $Supra tokens in the delegation pool on behalf of the users.
+/// Note:
+/// The total lended amount through the PoEL contract depends on the Oracle price submitted to the PoEL contract.
+/// If the price of the asset goes up compared with $Supra the system lends more delegating more assets
+/// to the delegation pools and correspondingly if the price drops the system lends less, withdrawing some assets
+/// from the delegation pools. Therefore, the PoEL contract acting as the delegation agent for the users ensures the
+/// total delegated amount from the PoEL contract is equable with the total nominal value submitted to the IntraLayer vaults.
+/// When a user wants to retrieve the original ETH that was used as collateral, they can burn the iETH, which then enables
+/// them to receive the original ETH on the Ethereum blockchain.
+///
+/// Errors:
+/// //thrown when the allowed signer is not the caller (owner)
+/// const ERR_NOT_OWNER: u64 = 0;
+///
+/// //thrown when the wrong asset weight gets calculated
+/// const ERR_WRONG_WEIGHT: u64 = 1;
+///
+/// //thrown when the length of the supplied collaterixation weight argument vector does not match table entries
+/// const ERR_WRONG_CWV_LENGTH: u64 = 2;
+///
+/// //thrown when the length of the desirability score argument vector does not match table entries
+/// const ERR_WRONG_DESIRABILITY_SCORE_LEN: u64 = 3;
+///
+/// //thrown when the asset id supiled is not present in the TotalLiquidityTable
+/// const ERR_ASSET_NOT_PRESENT: u64 = 4;
+///
+/// //thrown If coefficient_X < coefficient_b
+/// const ERR_COEFA_LT_COEFB: u64 = 5;
+///
+/// Structs:
+///
+/// This struct contains contains the field attributes for each asset in the liquidity table
+/// struct LiquidityTableItems {
+/// ///Asset_name
+/// asset_name: vector,
+/// ///asset_supply: Total amount of the asset that has been bridged to create the iAsset.
+/// asset_supply: u64,
+/// ///iAsset_supply: Total supply of iAssets generated through the scheme.
+/// iAsset_supply: u64,
+/// ///collaterisation_rate: Specific rate indicating the collateral security of the iAsset.
+/// collateralisation_rate: u64,
+/// ///desired_weights: Weights reflecting the asset's strategic importance.
+/// desired_weight: u64,
+/// ///desirability_score: Attractiveness score of the asset.
+/// desirability_score: u64,
+/// ///asset_price: Current market price of the asset.
+/// asset_price: u64,
+/// }
+///
+/// //This struct aggregates comprehensive liquidity metrics and operational indices for assets managed within the system.
+/// struct TotalLiquidity {
+/// //TotalLiquidityTable: Maps each AssetID to a LiquidityTableItems struct
+/// TotalLiquidityTable: SmartTable,
+/// //Index of the last observable lockup cycle (OLC), crucial for the minting of preminted tokens and the withdrawal of unlocked tokens.
+/// current_olc_index: u64,
+/// //Represents the nominal value of all assets submitted to the system, indicating the total economic stake.
+/// total_nominal_value: u64
+/// }
+///
+/// /// This struct is applied for the dynamic adjustment of the system's operational parameters.
+/// /// It allows for flexible management of financial metrics, adapting to market conditions or strategic shifts in policy.
+/// struct MutableParameters {
+/// coefficient_b: u64,
+/// coefficient_X: u64,
+/// coefficient_rho: u64,
+/// min_collateralisation: u64
+/// }
+///
+///
+/// struct StakingPoolMap {
+/// //Address of the staking pool.
+/// pool_address: address,
+/// //The amount of Supra delegated to the validator at this pool.
+/// delagated_amount: u64,
+/// //Amount of tokens that are pending deactivation but are currently inactive.
+/// pending_inactive_balance: u64
+/// }
+///
+/// /// Description: This struct serves as a central repository for tracking delegated assets in various staking pools,
+/// /// providing essential data for managing staking operations and calculating borrowing limits based on active and
+/// /// inactive balances within the system.
+/// struct DelegatedAmount {
+/// // Maps StakingPoolID to tuple StakingPoolMap
+/// staking_pool_mapping: table::Table,
+/// // Cumulative amount of Supra delegated across all staking pools
+/// total_delegated_amount: u64,
+/// // Total amount of Supra pending deactivation
+/// pending_inactive_balance: u64,
+/// // Total amount of Supra that could be borrowed from the PoEL contract
+/// total_borrowable_amount: u64,
+/// // Index of the lockup cycle when the PoEL last withdrew Supra tokens
+/// withdrawal_OLC_index: u64
+/// }
+///
+///
+/// struct AdminManagement {
+/// // Total amount of Supra tokens requested for withdrawal
+/// withdraw_requested_assets: u64,
+/// // Index of the last withdrawal request submitted by the admin
+/// withdraw_OLC_index: u64
+/// }
+///
+/// ///This struct holds the field items (total_borrow_requests & total_withdraw_requests) mapped to requests
+/// /// table (AssetId => BorrowWithdrawRequestTableItems) in the BorrowWithdrawRequest
+/// struct BorrowWithdrawRequestTableItems {
+/// total_borrow_requests: u64,
+/// total_withdraw_requests: u64,
+/// }
+/// ///Maps each AssetID to a tuple containing the total amounts of withdraw requests submitted to the PoEL contract.
+/// ///Borrow requests are initiated by users to borrow Supra and mint iAssets after depositing their assets in intralayer vaults.
+/// ///Withdraw requests are made by users aiming to retrieve their assets from intralayer vaults in the subsequent cycle.
+/// ///Both types of requests are processed in the next cycle.
+/// struct BorrowWithdrawRequest {
+/// // Maps each AssetID to a BorrowWithdrawRequestTableItems
+/// requests: table::Table,
+/// }
\ No newline at end of file
From 30e96c0130149e862878c03eced8d3bb069bd785 Mon Sep 17 00:00:00 2001
From: Phidel Musungu
Date: Wed, 18 Dec 2024 14:03:54 +0300
Subject: [PATCH 02/11] added reward_distribution & barebone function
signatures
---
.../supra-framework/sources/i_asset.move | 37 -
.../supra-framework/sources/poel.move | 128 --
.../supra-framework/sources/poel/i_asset.move | 157 +++
.../supra-framework/sources/poel/poel.move | 308 +++++
.../sources/poel/reward_distributor.move | 57 +
.../framework/supra-framework/supra_history | 1195 +++++++++++++++++
.../supra-framework/supra_node_logs/supra.log | 40 +
7 files changed, 1757 insertions(+), 165 deletions(-)
delete mode 100644 aptos-move/framework/supra-framework/sources/i_asset.move
delete mode 100644 aptos-move/framework/supra-framework/sources/poel.move
create mode 100644 aptos-move/framework/supra-framework/sources/poel/i_asset.move
create mode 100644 aptos-move/framework/supra-framework/sources/poel/poel.move
create mode 100644 aptos-move/framework/supra-framework/sources/poel/reward_distributor.move
create mode 100644 aptos-move/framework/supra-framework/supra_history
create mode 100644 aptos-move/framework/supra-framework/supra_node_logs/supra.log
diff --git a/aptos-move/framework/supra-framework/sources/i_asset.move b/aptos-move/framework/supra-framework/sources/i_asset.move
deleted file mode 100644
index f5de8c137620b..0000000000000
--- a/aptos-move/framework/supra-framework/sources/i_asset.move
+++ /dev/null
@@ -1,37 +0,0 @@
-///
-/// This is the iAsset module used as the iAsset standard given to users who deposited assets
-/// via the intralayer vault. Holders of iAsset get an amount of $supra delegated to staking pools depending on the
-/// amount of assets deposited and the price of the asset. ie If the price of the asset if
-/// up compared with $Supra the system lends more to the user delegating more $supra
-/// to the delegation pools and correspondingly if the price drops the system lends less, withdrawing some assets
-/// from the delegation pools. Holders of iAsset get $supra rewards from the staking pools while enabling them to utilize
-/// the iAsset as an underlying asset of their deposited asset for other defi utilities. Transfer of iAsset to a different address
-/// transfers the acrual of rewards to the receiving address for the period beging after the transfer.
-///
-/// Errors:
-///
-///
-/// Structs:
-/// This struct holds individual iAsset parameters for each user's holdings
-/// struct AssetEntry has store, copy {
-/// ///iAssetBalance: Amount of iAsset held by the user.
-/// iAsset_balance: u64,
-/// ///UserRewardIndex: Track RewardIndex specific to the user for each asset.
-/// user_reward_index: u64,
-/// ///Preminted_iAssets: Tracks number of iAssets that are preminted.
-/// preminted_iAssets: u64,
-/// ///Redeem_Requested_iAssets: Number of iAssets for which redemption has been requested.
-/// redeem_requested_iAssets: u64,
-/// ///Preminiting_OLC_Index: Records the index of the last cycle during which a preminting request was submitted for an asset.
-/// preminiting_OLC_index: u64
-/// }
-///
-/// This structs holds a user's Liquidity information with a table mapping to all assets
-/// struct LiquidityProvider has key {
-/// ///iAsset_table: Utilizes aptos_std::table to map asset IDs to multiple attributes in AssetEntry
-/// iAsset_table: table::Table,
-/// ///allocated_Rewards: Tracks the total rewards that are allocable to the user.
-/// allocated_rewards: u64,
-/// ///unlock_OLC_Index: Registers the index of the lockup cycle when the user last submitted an unlock request.
-/// unlock_olc_index: u64
-/// }
\ No newline at end of file
diff --git a/aptos-move/framework/supra-framework/sources/poel.move b/aptos-move/framework/supra-framework/sources/poel.move
deleted file mode 100644
index d99996961b6e1..0000000000000
--- a/aptos-move/framework/supra-framework/sources/poel.move
+++ /dev/null
@@ -1,128 +0,0 @@
-///
-/// This is the Proof of Efficiency Liquidity module used to delagate $supra to staking pools for users
-/// who hold iEth by making deposits of ETH to the intralayer vault. It handles the creation of the iETH and distribution to the
-/// corresponding addresses on supra
-///
-/// Flow:
-/// 1. Users submit WETH to the Intralayer Vault on the Ethereum blockchain.
-/// 2. The Supra cross-chain communication protocol transfers the deposit information to the PoEL (Proof of Efficient Liquidity) contract on the Supra chain.
-/// 3. This process creates a new token, iETH (InterLayer ETH), which is distributed to the user's address on Supra.
-/// 4. In the background, utilizing the PoEL protocol, assets deposited into the Intralayer Vault serve as collateral to
-/// borrow $Supra and stake it in the Supra PoS system. The PoEL contract periodically lends $Supra tokens to users who have submitted WETH to the Intralayer
-/// Vault and evenly distributes these tokens among various delegation pools participating in the system.
-/// In this setup, the PoEL contract itself acts as the delegator of the $Supra tokens in the delegation pool on behalf of the users.
-/// Note:
-/// The total lended amount through the PoEL contract depends on the Oracle price submitted to the PoEL contract.
-/// If the price of the asset goes up compared with $Supra the system lends more delegating more assets
-/// to the delegation pools and correspondingly if the price drops the system lends less, withdrawing some assets
-/// from the delegation pools. Therefore, the PoEL contract acting as the delegation agent for the users ensures the
-/// total delegated amount from the PoEL contract is equable with the total nominal value submitted to the IntraLayer vaults.
-/// When a user wants to retrieve the original ETH that was used as collateral, they can burn the iETH, which then enables
-/// them to receive the original ETH on the Ethereum blockchain.
-///
-/// Errors:
-/// //thrown when the allowed signer is not the caller (owner)
-/// const ERR_NOT_OWNER: u64 = 0;
-///
-/// //thrown when the wrong asset weight gets calculated
-/// const ERR_WRONG_WEIGHT: u64 = 1;
-///
-/// //thrown when the length of the supplied collaterixation weight argument vector does not match table entries
-/// const ERR_WRONG_CWV_LENGTH: u64 = 2;
-///
-/// //thrown when the length of the desirability score argument vector does not match table entries
-/// const ERR_WRONG_DESIRABILITY_SCORE_LEN: u64 = 3;
-///
-/// //thrown when the asset id supiled is not present in the TotalLiquidityTable
-/// const ERR_ASSET_NOT_PRESENT: u64 = 4;
-///
-/// //thrown If coefficient_X < coefficient_b
-/// const ERR_COEFA_LT_COEFB: u64 = 5;
-///
-/// Structs:
-///
-/// This struct contains contains the field attributes for each asset in the liquidity table
-/// struct LiquidityTableItems {
-/// ///Asset_name
-/// asset_name: vector,
-/// ///asset_supply: Total amount of the asset that has been bridged to create the iAsset.
-/// asset_supply: u64,
-/// ///iAsset_supply: Total supply of iAssets generated through the scheme.
-/// iAsset_supply: u64,
-/// ///collaterisation_rate: Specific rate indicating the collateral security of the iAsset.
-/// collateralisation_rate: u64,
-/// ///desired_weights: Weights reflecting the asset's strategic importance.
-/// desired_weight: u64,
-/// ///desirability_score: Attractiveness score of the asset.
-/// desirability_score: u64,
-/// ///asset_price: Current market price of the asset.
-/// asset_price: u64,
-/// }
-///
-/// //This struct aggregates comprehensive liquidity metrics and operational indices for assets managed within the system.
-/// struct TotalLiquidity {
-/// //TotalLiquidityTable: Maps each AssetID to a LiquidityTableItems struct
-/// TotalLiquidityTable: SmartTable,
-/// //Index of the last observable lockup cycle (OLC), crucial for the minting of preminted tokens and the withdrawal of unlocked tokens.
-/// current_olc_index: u64,
-/// //Represents the nominal value of all assets submitted to the system, indicating the total economic stake.
-/// total_nominal_value: u64
-/// }
-///
-/// /// This struct is applied for the dynamic adjustment of the system's operational parameters.
-/// /// It allows for flexible management of financial metrics, adapting to market conditions or strategic shifts in policy.
-/// struct MutableParameters {
-/// coefficient_b: u64,
-/// coefficient_X: u64,
-/// coefficient_rho: u64,
-/// min_collateralisation: u64
-/// }
-///
-///
-/// struct StakingPoolMap {
-/// //Address of the staking pool.
-/// pool_address: address,
-/// //The amount of Supra delegated to the validator at this pool.
-/// delagated_amount: u64,
-/// //Amount of tokens that are pending deactivation but are currently inactive.
-/// pending_inactive_balance: u64
-/// }
-///
-/// /// Description: This struct serves as a central repository for tracking delegated assets in various staking pools,
-/// /// providing essential data for managing staking operations and calculating borrowing limits based on active and
-/// /// inactive balances within the system.
-/// struct DelegatedAmount {
-/// // Maps StakingPoolID to tuple StakingPoolMap
-/// staking_pool_mapping: table::Table,
-/// // Cumulative amount of Supra delegated across all staking pools
-/// total_delegated_amount: u64,
-/// // Total amount of Supra pending deactivation
-/// pending_inactive_balance: u64,
-/// // Total amount of Supra that could be borrowed from the PoEL contract
-/// total_borrowable_amount: u64,
-/// // Index of the lockup cycle when the PoEL last withdrew Supra tokens
-/// withdrawal_OLC_index: u64
-/// }
-///
-///
-/// struct AdminManagement {
-/// // Total amount of Supra tokens requested for withdrawal
-/// withdraw_requested_assets: u64,
-/// // Index of the last withdrawal request submitted by the admin
-/// withdraw_OLC_index: u64
-/// }
-///
-/// ///This struct holds the field items (total_borrow_requests & total_withdraw_requests) mapped to requests
-/// /// table (AssetId => BorrowWithdrawRequestTableItems) in the BorrowWithdrawRequest
-/// struct BorrowWithdrawRequestTableItems {
-/// total_borrow_requests: u64,
-/// total_withdraw_requests: u64,
-/// }
-/// ///Maps each AssetID to a tuple containing the total amounts of withdraw requests submitted to the PoEL contract.
-/// ///Borrow requests are initiated by users to borrow Supra and mint iAssets after depositing their assets in intralayer vaults.
-/// ///Withdraw requests are made by users aiming to retrieve their assets from intralayer vaults in the subsequent cycle.
-/// ///Both types of requests are processed in the next cycle.
-/// struct BorrowWithdrawRequest {
-/// // Maps each AssetID to a BorrowWithdrawRequestTableItems
-/// requests: table::Table,
-/// }
\ No newline at end of file
diff --git a/aptos-move/framework/supra-framework/sources/poel/i_asset.move b/aptos-move/framework/supra-framework/sources/poel/i_asset.move
new file mode 100644
index 0000000000000..9027379ccd1bc
--- /dev/null
+++ b/aptos-move/framework/supra-framework/sources/poel/i_asset.move
@@ -0,0 +1,157 @@
+///
+/// This is the iAsset module used as the iAsset standard given to users who deposited assets
+/// via the intralayer vault. Holders of iAsset get an amount of $supra delegated to staking pools depending on the
+/// amount of assets deposited and the price of the asset. ie If the price of the asset if
+/// up compared with $Supra the system lends more to the user delegating more $supra
+/// to the delegation pools and correspondingly if the price drops the system lends less, withdrawing some assets
+/// from the delegation pools. Holders of iAsset get $supra rewards from the staking pools while enabling them to utilize
+/// the iAsset as an underlying asset of their deposited asset for other defi utilities. Transfer of iAsset to a different address
+/// transfers the acrual of rewards to the receiving address for the period beging after the transfer.
+///
+
+module supra_framework::i_asset {
+
+ use supra_framework::table;
+ use supra_framework::string::String;
+/// Errors:
+
+ /// Thrown when the calling address is not the poel module address
+ const ERR_NOT_POEL_ADDRESS: u64 = 0;
+///
+/// Structs:
+ ///This struct holds individual iAsset parameters for each user's holdings
+ struct AssetEntry has store, copy {
+ ///iAssetBalance: Amount of iAsset held by the user.
+ iAsset_balance: u64,
+ ///UserRewardIndex: Track RewardIndex specific to the user for each asset.
+ user_reward_index: u64,
+ ///Preminted_iAssets: Tracks number of iAssets that are preminted.
+ preminted_iAssets: u64,
+ ///Redeem_Requested_iAssets: Number of iAssets for which redemption has been requested.
+ redeem_requested_iAssets: u64,
+ ///Preminiting_OLC_Index: Records the index of the last cycle during which a preminting request was submitted for an asset.
+ preminiting_OLC_index: u64
+ }
+
+ ///This structs holds a user's Liquidity information with a table mapping to all assets
+ struct LiquidityProvider has key {
+ ///iAsset_table: Utilizes aptos_std::table to map asset IDs to multiple attributes in AssetEntry
+ iAsset_table: table::Table,
+ ///allocated_Rewards: Tracks the total rewards that are allocable to the user.
+ allocated_rewards: u64,
+ ///unlock_OLC_Index: Registers the index of the lockup cycle when the user last submitted an unlock request.
+ unlock_olc_index: u64
+ }
+
+ //Functions:
+
+ //helper function to update the liquidity provider table
+ public fun update_iAsset_entry(
+ _provider: &mut LiquidityProvider,
+ _asset_id: u64,
+ _iAssetBalance: u64,
+ _user_reward_index: u64,
+ _preminted_iAssets: u64,
+ _redeem_requested_iAssets: u64,
+ _preminiting_OLC_index: u64
+ ) {}
+
+ ///Function to set up initial LiquidityProvider structures for asset management.
+ public fun initialize_LiquidityProvider(_account: &signer) {}
+
+ ///Verifies if an assetID exists in the user's LiquidityProvider struct and updates it if absent.
+ /// @param: user_address - The user address receiving the assets
+ /// @param: asset_id - asset id in the iAsset_table of LiquidityProvider struct
+ fun add_asset_LiquidityProvider(
+ _user_address: address,
+ _asset_id: u64
+ ) {}
+
+ /// is applied to mint iAssets as soon as some amount of the original asset has been submitted to the interalayer vaults.
+ /// premint function can be called only by PoEL contract
+ /// @param: account - Poel signer account
+ /// @param: asset_amount: amount of assets supplied
+ /// @param: asset_id: asset id in the iAsset_table of LiquidityProvider struct
+ /// @param: receiver - The address receiving the assets
+ public fun premint_iAsset(
+ _account: &signer,
+ _asset_amount: u64,
+ _asset_id: u64,
+ _receiver: address,
+ ) {}
+
+ /// Function: mint_iAsset(user_address, assetID)
+ /// Purpose: Intended to mint the pre-minted tokens of iAssets.
+ /// The function can be called by anyone, not necessarily by the user themselves.
+ /// @param: user_address - The user address receiving the assets
+ /// @param: asset_id - asset id in the iAsset_table of LiquidityProvider struct
+ public fun mint_iAsset(_user_address: address, _asset_id: u64) {}
+
+
+ /// previewMint(asset_amount, assetID):
+ /// Purpose: Calculates the total amount of iAsset that needs to be minted based on the submitted original assets.
+ /// @param: provider_ref - Liquidity provider object geting previewd
+ /// @param: asset_amount: amount of assets supplied
+ /// @param: asset_id - asset id in the iAsset_table of LiquidityProvider struct
+ /// @notice: return the amount of iAssets to get minted
+ public fun previewMint(_provider_ref: &mut LiquidityProvider, _asset_amount: u64, _asset_id: u64): u64 {
+ 0
+ }
+
+ /// previewRedeem(iAsset_amount, assetID)
+ /// previews the amount of assets to receive by specifying the amount of iAssets to redeem
+ /// @param: iAsset_amount: amount of iAssets to be redeemed
+ /// @param: asset_id - asset id in the iAsset_table of LiquidityProvider struct
+ /// @notice: returns returns the amount converted assets
+ public fun previewRedeem(_iAsset_amount: u64, _asset_id: u64): u64 {
+ 0
+ }
+
+ /// previewWithdraw(asset_amount, assetID): preview the amount of iAsset to burn by specifying
+ /// the amount of assets that would be withdrawn
+ /// @param: asset_amount: amount of assets to be redeemed
+ /// @param: asset_id - asset id in the iAsset_table of LiquidityProvider struct
+ /// @notice: returns returns the amount of assets to get withdrawn
+ public fun previewWithdraw(_asset_amount: u64, _asset_id: u64): u64 {
+ 0
+ }
+
+ public fun redeem_request(
+ _account: &signer,
+ _iAsset_amount: u64,
+ _asset_id: u64,
+ _receiver_address: address
+ ) {}
+
+ public fun redeem_iAsset(
+ _account: &signer,
+ _asset_id: u64,
+ _receiver_address: address
+ ) {}
+
+ /// This function is applied to transfer iAssets from a user to another
+ public fun transfer_iAsset(
+ _iAsset_amount: u64,
+ _asset_id: u64,
+ _receiver_address: address,
+ _owner_address: address
+ ) {}
+
+ public fun transfer_asset(
+ _asset_amount: u64,
+ _asset_id: u64,
+ _receiver_address: address,
+ _owner_address: address
+ ) {}
+
+ public fun convertToAssets(_shares: u64, _asset_id: u64): u64 {
+ 0
+ }
+
+ /// Adds a new asset to the TotalLiquidityTable within the TotalLiquidity struct, initializing its financial metrics to default values.
+ public fun add_new_iAsset(
+ _account: &signer,
+ _asset_name: String,
+ _desirability_score: u64
+ ) {}
+}
\ No newline at end of file
diff --git a/aptos-move/framework/supra-framework/sources/poel/poel.move b/aptos-move/framework/supra-framework/sources/poel/poel.move
new file mode 100644
index 0000000000000..8d60766055cd5
--- /dev/null
+++ b/aptos-move/framework/supra-framework/sources/poel/poel.move
@@ -0,0 +1,308 @@
+///
+/// This is the Proof of Efficiency Liquidity module used to delagate $supra to staking pools for users
+/// who hold iEth by making deposits of ETH to the intralayer vault. It handles the creation of the iETH and distribution to the
+/// corresponding addresses on supra
+///
+/// Flow:
+/// 1. Users submit WETH to the Intralayer Vault on the Ethereum blockchain.
+/// 2. The Supra cross-chain communication protocol transfers the deposit information to the PoEL (Proof of Efficient Liquidity) contract on the Supra chain.
+/// 3. This process creates a new token, iETH (InterLayer ETH), which is distributed to the user's address on Supra.
+/// 4. In the background, utilizing the PoEL protocol, assets deposited into the Intralayer Vault serve as collateral to
+/// borrow $Supra and stake it in the Supra PoS system. The PoEL contract periodically lends $Supra tokens to users who have submitted WETH to the Intralayer
+/// Vault and evenly distributes these tokens among various delegation pools participating in the system.
+/// In this setup, the PoEL contract itself acts as the delegator of the $Supra tokens in the delegation pool on behalf of the users.
+/// Note:
+/// The total lended amount through the PoEL contract depends on the Oracle price submitted to the PoEL contract.
+/// If the price of the asset goes up compared with $Supra the system lends more delegating more assets
+/// to the delegation pools and correspondingly if the price drops the system lends less, withdrawing some assets
+/// from the delegation pools. Therefore, the PoEL contract acting as the delegation agent for the users ensures the
+/// total delegated amount from the PoEL contract is equable with the total nominal value submitted to the IntraLayer vaults.
+/// When a user wants to retrieve the original ETH that was used as collateral, they can burn the iETH, which then enables
+/// them to receive the original ETH on the Ethereum blockchain.
+
+module supra_framework::poel {
+ use supra_framework::table;
+ use supra_framework::smart_table::SmartTable;
+ //Errors:
+
+ /// thrown when the allowed signer is not the caller (owner)
+ const ERR_NOT_OWNER: u64 = 0;
+
+ /// thrown when the wrong asset weight gets calculated
+ const ERR_WRONG_WEIGHT: u64 = 1;
+
+ /// thrown when the length of the supplied collaterixation weight argument vector does not match table entries
+ const ERR_WRONG_CWV_LENGTH: u64 = 2;
+
+ /// thrown when the length of the desirability score argument vector does not match table entries
+ const ERR_WRONG_DESIRABILITY_SCORE_LEN: u64 = 3;
+
+ /// thrown when the asset id supiled is not present in the TotalLiquidityTable
+ const ERR_ASSET_NOT_PRESENT: u64 = 4;
+
+ /// thrown If coefficient_X < coefficient_b
+ const ERR_COEFA_LT_COEFB: u64 = 5;
+
+ // Structs:
+
+ /// This struct contains contains the field attributes for each asset in the liquidity table
+ struct LiquidityTableItems {
+ ///Asset_name
+ asset_name: vector,
+ ///asset_supply: Total amount of the asset that has been bridged to create the iAsset.
+ asset_supply: u64,
+ ///iAsset_supply: Total supply of iAssets generated through the scheme.
+ iAsset_supply: u64,
+ ///collaterisation_rate: Specific rate indicating the collateral security of the iAsset.
+ collateralisation_rate: u64,
+ ///desired_weights: Weights reflecting the asset's strategic importance.
+ desired_weight: u64,
+ ///desirability_score: Attractiveness score of the asset.
+ desirability_score: u64,
+ ///asset_price: Current market price of the asset.
+ asset_price: u64,
+ }
+
+ /// This struct aggregates comprehensive liquidity metrics and operational indices for assets managed within the system.
+ struct TotalLiquidity {
+ //TotalLiquidityTable: Maps each AssetID to a LiquidityTableItems struct
+ TotalLiquidityTable: SmartTable,
+ //Index of the last observable lockup cycle (OLC), crucial for the minting of preminted tokens and the withdrawal of unlocked tokens.
+ current_olc_index: u64,
+ //Represents the nominal value of all assets submitted to the system, indicating the total economic stake.
+ total_nominal_value: u64
+ }
+
+ /// This struct is applied for the dynamic adjustment of the system's operational parameters.
+ /// It allows for flexible management of financial metrics, adapting to market conditions or strategic shifts in policy.
+ struct MutableParameters {
+ coefficient_b: u64,
+ coefficient_X: u64,
+ coefficient_rho: u64,
+ min_collateralisation: u64
+ }
+
+
+ struct StakingPoolMap {
+ //Address of the staking pool.
+ pool_address: address,
+ //The amount of Supra delegated to the validator at this pool.
+ delagated_amount: u64,
+ //Amount of tokens that are pending deactivation but are currently inactive.
+ pending_inactive_balance: u64
+ }
+
+ /// Description: This struct serves as a central repository for tracking delegated assets in various staking pools,
+ /// providing essential data for managing staking operations and calculating borrowing limits based on active and
+ /// inactive balances within the system.
+ struct DelegatedAmount {
+ // Maps StakingPoolID to tuple StakingPoolMap
+ staking_pool_mapping: table::Table,
+ // Cumulative amount of Supra delegated across all staking pools
+ total_delegated_amount: u64,
+ // Total amount of Supra pending deactivation
+ pending_inactive_balance: u64,
+ // Total amount of Supra that could be borrowed from the PoEL contract
+ total_borrowable_amount: u64,
+ // Index of the lockup cycle when the PoEL last withdrew Supra tokens
+ withdrawal_OLC_index: u64
+ }
+
+
+ struct AdminManagement {
+ // Total amount of Supra tokens requested for withdrawal
+ withdraw_requested_assets: u64,
+ // Index of the last withdrawal request submitted by the admin
+ withdraw_OLC_index: u64
+ }
+
+ /// This struct holds the field items (total_borrow_requests & total_withdraw_requests) mapped to requests
+ /// table (AssetId => BorrowWithdrawRequestTableItems) in the BorrowWithdrawRequest
+ struct BorrowWithdrawRequestTableItems {
+ total_borrow_requests: u64,
+ total_withdraw_requests: u64,
+ }
+
+
+ /// Maps each AssetID to a tuple containing the total amounts of withdraw requests submitted to the PoEL contract.
+ /// Borrow requests are initiated by users to borrow Supra and mint iAssets after depositing their assets in intralayer vaults.
+ /// Withdraw requests are made by users aiming to retrieve their assets from intralayer vaults in the subsequent cycle.
+ /// Both types of requests are processed in the next cycle.
+ struct BorrowWithdrawRequest {
+ // Maps each AssetID to a BorrowWithdrawRequestTableItems
+ requests: table::Table,
+ }
+
+ //Functions:
+
+ #[view]
+ public fun get_total_liquidity_current_cycle_index(): u64 {
+ 0
+ }
+
+ #[view]
+ public fun get_total_liquidity(): address {
+ @supra_framework
+ }
+
+
+ /// adds an asset with its coresponding information to the System
+ public fun add_asset(
+ _total_liquidity: &mut TotalLiquidity,
+ _asset_id: u64,
+ _asset_name: vector,
+ _asset_supply: u64,
+ _iAsset_supply: u64,
+ _collateralisation_rate: u64,
+ _desired_weights: u64,
+ _desirability_score: u64,
+ _asset_price: u64
+ ) {
+ }
+
+ /// Adds a staking pool to the existing pools for delegation os $supra
+ public fun add_staking_pool(
+ _delegated_amount: &mut DelegatedAmount,
+ _pool_id: u64,
+ _pool_address: address,
+ _delegated_amount_value: u64,
+ _pending_inactive_balance: u64
+ ) {
+ }
+
+
+ public fun submit_borrow_request(
+ _request_table: &mut BorrowWithdrawRequest,
+ _asset_id: u64,
+ _borrow_amount: u64
+ ) {
+
+ }
+
+
+ public fun submit_withdraw_request(
+ _request_table: &mut BorrowWithdrawRequest,
+ _asset_id: u64,
+ _withdraw_amount: u64
+ ) {
+
+ }
+
+ /// should return a &BorrowRequestTableItems
+ public fun get_requests(
+ _request_table: &BorrowWithdrawRequest,
+ _asset_id: u64
+ ) {
+ }
+
+
+ // Updates asset weights in the TotalLiquidity struct to align with current strategic objectives.
+ public fun update_desired_weight(
+ _collaterisation_rate_vector: vector,
+ _account: &signer
+ ) {
+
+ }
+
+ /// Updates desirability scores for all assets in the TotalLiquidity struct.
+ public fun batch_update_desirability_score(
+ _desirability_score_vector: vector,
+ _account: &signer
+ ) {
+
+ }
+
+ /// Updates the desirability score of a specified asset within the TotalLiquidity struct of the Supra_framework.
+ public fun update_desirability_score(
+ _account: &signer,
+ _desirability_score: u64,
+ _asset_id: u64
+ ){
+ }
+
+
+ /// Calculates and updates the collateralization rate for a specified asset based on dynamic market weights
+ /// and predefined coefficients.
+ public fun calculate_collaterisation_rate(
+ _asset_nominal_value: u64,
+ _total_nominal_value: u64,
+ _asset_id: u64
+ ) {
+
+ }
+
+
+ fun sign(_value: u64): u64 {
+ 0
+ }
+
+
+ public fun set_parameters(
+ _account: &signer,
+ _coefficient_b: u64,
+ _coefficient_X: u64,
+ _coefficient_rho: u64,
+ _min_collateralisation: u64
+ ) {
+
+ }
+
+ /// Unlocks token from the all delegation pools involved in the system
+ public fun unlock_tokens(_supra_amount: u64) {}
+
+ /// Delegates token to the all delegation pools involved in the system
+ public fun delegate_tokens(_supra_amount: u64) {}
+
+ /// Facilitates the withdrawal of unlocked tokens from the inactive delegation pools.
+ public fun withdraw_tokens() {}
+
+ /// This function facilitates the replacement of an existing staking pool with a new pool address.
+ /// It performs several checks and updates to ensure the integrity and security of the staking \
+ /// process within the blockchain network.
+ public fun allocate_rewards() {}
+
+
+ /// This function is designed to manage the transition of assets between staking pools.
+ /// It ensures that the transition adheres to the required permissions
+ /// and conditions set within the system before proceeding with asset reallocation.
+ public fun replace_staking_pool (
+ _account: signer,
+ _replaced_pool_address: address,
+ _replacing_pool_address: address
+ ) {}
+
+ /// pdates asset prices and calculates new supply metrics for collateral management in the system.
+ public fun update_asset_price_supply() {}
+
+ /// This function recalculates and updates(delegates or unlocks) the total amount of
+ /// Supra that is borrowed based on the current asset prices, supplies, and collateralization rates.
+ public fun update_rented_amount() {}
+
+ /// Enables increasing the rentable Supra amount by transferring funds to the PoEL contract.
+ public fun increase_rentable_amount(_account: &signer, _amount: u64) {}
+
+ /// Decreases the amount of rentable tokens available in the PoEL contract.
+ public fun decrease_rentable_amount(_acccount: &signer, _amount: u64) {}
+
+ /// Facilitates the creation of borrow requests following the deposition of the original asset into
+ /// an intermediary vault. One of the main reasons why the borrow_request function has been suggested
+ /// in the flow to borrow is because the pending_active coins do not earn rewards.
+ public fun borrow_request(
+ _account: &signer,
+ _asset_id: u64,
+ _asset_amount: u64,
+ _receiver_address: address
+ ) {}
+
+ /// Facilitates borrowing of assets, calculates new collateralization rates and manages distribution across staking pools.
+ public fun borrow(
+ _asset_id: u64,
+ _asset_amount: u64,
+ _receiver_address: address
+ ) {}
+
+ //add_stake()
+ //unlock_stake()
+ //unlock_rewards(),
+
+}
\ No newline at end of file
diff --git a/aptos-move/framework/supra-framework/sources/poel/reward_distributor.move b/aptos-move/framework/supra-framework/sources/poel/reward_distributor.move
new file mode 100644
index 0000000000000..e05193cb1e12c
--- /dev/null
+++ b/aptos-move/framework/supra-framework/sources/poel/reward_distributor.move
@@ -0,0 +1,57 @@
+/// This is the reward distribution module
+/// it manages the reward metrics of the Proof of Efficiency Liquidity module and iAssets module
+/// Its main purposes include: updating reward indexes, calculating user rewards, and updating user rewards
+
+
+module supra_framework::reward_distributor {
+ use supra_framework::table;
+
+ //Errors:
+
+ const NO_AVAILABLE_DESIRABLE_LIQUIDITY: u64 = 1;
+
+ // Structs:
+
+ ///houses the reward_index_asset and the available_rewards_for_asset
+ struct TotalLiquidityProvidedItems has store, copy {
+ ///reward_index_asset: Index tracking the reward distribution of the asset (u64).
+ reward_index_asset: u64,
+ ///available_rewards_for_asset: tracks the available rewards that are distributable for each asset
+ available_rewards_for_asset: u64
+ }
+
+ ///Manages reward distribution metrics for assets based on provided liquidity.
+ struct DistributableRewards {
+ // Maps AssetID to TotalLiquidityProvidedItems
+ total_liquidity_provided: table::Table,
+ }
+
+ /// Updates the reward index for an asset based on newly distributed rewards.
+ public fun update_reward_index(
+ _asset_id: u64,
+ _rewards: u64,
+ _asset_supply: u64,
+ _desirability_score: u64
+ ) {
+
+ }
+
+
+ ///Computes the rewards for a user based on their held assets and accrued reward indices.
+ public fun calculate_rewards(
+ _iAsset_balance: u64,
+ _user_reward_index: u64,
+ _reward_index_asset: u64
+ ): u64 {
+ 0
+ }
+
+ ///Updates and distributes rewards for a specific asset to an account.
+ public fun update_rewards(
+ _asset_id: u64,
+ _iAsset_balance: u64,
+ _user_reward_index: u64,
+ ): u64 {
+ 0
+ }
+}
diff --git a/aptos-move/framework/supra-framework/supra_history b/aptos-move/framework/supra-framework/supra_history
new file mode 100644
index 0000000000000..537c9f541b2cf
--- /dev/null
+++ b/aptos-move/framework/supra-framework/supra_history
@@ -0,0 +1,1195 @@
+Local: (2024-12-18 12:49:34.354147670 +03:00) Utc: (2024-12-18 09:49:34.354350147 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 12:52:21.247567984 +03:00) Utc: (2024-12-18 09:52:21.247755947 UTC)
+
+CMD:
+Compile
+Output:
+General: {
+ "Error": "Move compilation failed: Compilation error"
+}
+Local: (2024-12-18 12:52:50.691570578 +03:00) Utc: (2024-12-18 09:52:50.691797422 UTC)
+
+CMD:
+Compile
+Output:
+General: {
+ "Error": "Move compilation failed: Compilation error"
+}
+Local: (2024-12-18 12:53:16.199736892 +03:00) Utc: (2024-12-18 09:53:16.199875602 UTC)
+
+CMD:
+Compile
+Output:
+General: {
+ "Error": "Move compilation failed: Compilation error"
+}
+Local: (2024-12-18 12:53:58.275119635 +03:00) Utc: (2024-12-18 09:53:58.275239713 UTC)
+
+CMD:
+Compile
+Output:
+General: {
+ "Error": "Move compilation failed: Compilation error"
+}
+Local: (2024-12-18 12:54:34.810001690 +03:00) Utc: (2024-12-18 09:54:34.810199042 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 12:55:32.968936429 +03:00) Utc: (2024-12-18 09:55:32.969049815 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 12:55:48.086058160 +03:00) Utc: (2024-12-18 09:55:48.086196041 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 12:59:28.876746838 +03:00) Utc: (2024-12-18 09:59:28.876933302 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 12:59:42.186287823 +03:00) Utc: (2024-12-18 09:59:42.186448140 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 13:08:12.028916406 +03:00) Utc: (2024-12-18 10:08:12.029031830 UTC)
+
+CMD:
+Compile
+Output:
+General: {
+ "Error": "Move compilation failed: Compilation error"
+}
+Local: (2024-12-18 13:08:30.045471798 +03:00) Utc: (2024-12-18 10:08:30.045560168 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 13:11:48.483267341 +03:00) Utc: (2024-12-18 10:11:48.483380861 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 13:30:47.090153910 +03:00) Utc: (2024-12-18 10:30:47.090236037 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 13:31:11.841636053 +03:00) Utc: (2024-12-18 10:31:11.841740329 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 13:37:58.792158366 +03:00) Utc: (2024-12-18 10:37:58.792211559 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 13:55:01.145353628 +03:00) Utc: (2024-12-18 10:55:01.145431822 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 13:55:11.213057725 +03:00) Utc: (2024-12-18 10:55:11.213158010 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 13:58:10.638544736 +03:00) Utc: (2024-12-18 10:58:10.638652951 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
+Local: (2024-12-18 14:02:39.253969394 +03:00) Utc: (2024-12-18 11:02:39.254024986 UTC)
+
+CMD:
+Compile
+Output:
+{
+ "Result": [
+ "0000000000000000000000000000000000000000000000000000000000000001::system_addresses",
+ "0000000000000000000000000000000000000000000000000000000000000001::guid",
+ "0000000000000000000000000000000000000000000000000000000000000001::event",
+ "0000000000000000000000000000000000000000000000000000000000000001::create_signer",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_id",
+ "0000000000000000000000000000000000000000000000000000000000000001::account",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_factory",
+ "0000000000000000000000000000000000000000000000000000000000000001::aggregator_v2",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_context",
+ "0000000000000000000000000000000000000000000000000000000000000001::object",
+ "0000000000000000000000000000000000000000000000000000000000000001::optional_aggregator",
+ "0000000000000000000000000000000000000000000000000000000000000001::function_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::dispatchable_fungible_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::primary_fungible_store",
+ "0000000000000000000000000000000000000000000000000000000000000001::coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::validator_consensus_info",
+ "0000000000000000000000000000000000000000000000000000000000000001::chain_status",
+ "0000000000000000000000000000000000000000000000000000000000000001::timestamp",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_state",
+ "0000000000000000000000000000000000000000000000000000000000000001::stake",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_fee",
+ "0000000000000000000000000000000000000000000000000000000000000001::state_storage",
+ "0000000000000000000000000000000000000000000000000000000000000001::storage_gas",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration",
+ "0000000000000000000000000000000000000000000000000000000000000001::config_buffer",
+ "0000000000000000000000000000000000000000000000000000000000000001::version",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config_seqnum",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness_api_v0_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::keyless_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwks",
+ "0000000000000000000000000000000000000000000000000000000000000001::jwk_consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::util",
+ "0000000000000000000000000000000000000000000000000000000000000001::gas_schedule",
+ "0000000000000000000000000000000000000000000000000000000000000001::execution_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::consensus_config",
+ "0000000000000000000000000000000000000000000000000000000000000001::reconfiguration_with_dkg",
+ "0000000000000000000000000000000000000000000000000000000000000001::randomness",
+ "0000000000000000000000000000000000000000000000000000000000000001::block",
+ "0000000000000000000000000000000000000000000000000000000000000001::code",
+ "0000000000000000000000000000000000000000000000000000000000000001::committee_map",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting_without_staking",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_contract",
+ "0000000000000000000000000000000000000000000000000000000000000001::vesting",
+ "0000000000000000000000000000000000000000000000000000000000000001::transaction_validation",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_voting",
+ "0000000000000000000000000000000000000000000000000000000000000001::governance_proposal",
+ "0000000000000000000000000000000000000000000000000000000000000001::supra_governance",
+ "0000000000000000000000000000000000000000000000000000000000000001::multisig_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::pbo_delegation_pool",
+ "0000000000000000000000000000000000000000000000000000000000000001::genesis",
+ "0000000000000000000000000000000000000000000000000000000000000001::i_asset",
+ "0000000000000000000000000000000000000000000000000000000000000001::managed_coin",
+ "0000000000000000000000000000000000000000000000000000000000000001::object_code_deployment",
+ "0000000000000000000000000000000000000000000000000000000000000001::poel",
+ "0000000000000000000000000000000000000000000000000000000000000001::resource_account",
+ "0000000000000000000000000000000000000000000000000000000000000001::reward_distributor",
+ "0000000000000000000000000000000000000000000000000000000000000001::staking_proxy",
+ "0000000000000000000000000000000000000000000000000000000000000001::voting"
+ ]
+}
+
+
diff --git a/aptos-move/framework/supra-framework/supra_node_logs/supra.log b/aptos-move/framework/supra-framework/supra_node_logs/supra.log
new file mode 100644
index 0000000000000..a4ec1d2dcd3a2
--- /dev/null
+++ b/aptos-move/framework/supra-framework/supra_node_logs/supra.log
@@ -0,0 +1,40 @@
+[2024-12-18T09:49:26.799487Z+00:00] INFO supra_logger: Starting logger runtime at localhost:34095. Use `nc localhost 34095` to change log level.
+[2024-12-18T09:49:26.800120Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T09:52:19.162456Z+00:00] INFO supra_logger: Starting logger runtime at localhost:41053. Use `nc localhost 41053` to change log level.
+[2024-12-18T09:52:19.162585Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T09:52:48.221712Z+00:00] INFO supra_logger: Starting logger runtime at localhost:45623. Use `nc localhost 45623` to change log level.
+[2024-12-18T09:52:48.221825Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T09:53:13.602181Z+00:00] INFO supra_logger: Starting logger runtime at localhost:45339. Use `nc localhost 45339` to change log level.
+[2024-12-18T09:53:13.602356Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T09:53:55.637805Z+00:00] INFO supra_logger: Starting logger runtime at localhost:39881. Use `nc localhost 39881` to change log level.
+[2024-12-18T09:53:55.637927Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T09:54:28.011481Z+00:00] INFO supra_logger: Starting logger runtime at localhost:44483. Use `nc localhost 44483` to change log level.
+[2024-12-18T09:54:28.011603Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T09:55:25.777848Z+00:00] INFO supra_logger: Starting logger runtime at localhost:40843. Use `nc localhost 40843` to change log level.
+[2024-12-18T09:55:25.777978Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T09:55:41.756258Z+00:00] INFO supra_logger: Starting logger runtime at localhost:41077. Use `nc localhost 41077` to change log level.
+[2024-12-18T09:55:41.756399Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T09:59:20.690468Z+00:00] INFO supra_logger: Starting logger runtime at localhost:46811. Use `nc localhost 46811` to change log level.
+[2024-12-18T09:59:20.690575Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T09:59:35.293414Z+00:00] INFO supra_logger: Starting logger runtime at localhost:41023. Use `nc localhost 41023` to change log level.
+[2024-12-18T09:59:35.293627Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T10:08:09.101316Z+00:00] INFO supra_logger: Starting logger runtime at localhost:41425. Use `nc localhost 41425` to change log level.
+[2024-12-18T10:08:09.101442Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T10:08:22.714161Z+00:00] INFO supra_logger: Starting logger runtime at localhost:44075. Use `nc localhost 44075` to change log level.
+[2024-12-18T10:08:22.714270Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T10:11:39.647764Z+00:00] INFO supra_logger: Starting logger runtime at localhost:40519. Use `nc localhost 40519` to change log level.
+[2024-12-18T10:11:39.647902Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T10:30:43.429459Z+00:00] INFO supra_logger: Starting logger runtime at localhost:37675. Use `nc localhost 37675` to change log level.
+[2024-12-18T10:30:43.429597Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T10:31:08.056186Z+00:00] INFO supra_logger: Starting logger runtime at localhost:38921. Use `nc localhost 38921` to change log level.
+[2024-12-18T10:31:08.056248Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T10:37:54.923279Z+00:00] INFO supra_logger: Starting logger runtime at localhost:43029. Use `nc localhost 43029` to change log level.
+[2024-12-18T10:37:54.923325Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T10:54:57.704453Z+00:00] INFO supra_logger: Starting logger runtime at localhost:45997. Use `nc localhost 45997` to change log level.
+[2024-12-18T10:54:57.704501Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T10:55:07.552936Z+00:00] INFO supra_logger: Starting logger runtime at localhost:34587. Use `nc localhost 34587` to change log level.
+[2024-12-18T10:55:07.552987Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T10:58:07.042543Z+00:00] INFO supra_logger: Starting logger runtime at localhost:39505. Use `nc localhost 39505` to change log level.
+[2024-12-18T10:58:07.042623Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
+[2024-12-18T11:02:35.900400Z+00:00] INFO supra_logger: Starting logger runtime at localhost:44845. Use `nc localhost 44845` to change log level.
+[2024-12-18T11:02:35.900523Z+00:00] INFO supra::common::verbose: Log level INFO enabled.
From d0a696293b9a0426e3936ba0c78cd8635300a118 Mon Sep 17 00:00:00 2001
From: Phidel Musungu
Date: Thu, 23 Jan 2025 08:17:02 +0300
Subject: [PATCH 03/11] poel implementations
---
.../sources/configs/poel_config.move | 1 +
.../supra-framework/sources/poel/iAsset.move | 954 +++++++++++++
.../sources/poel/iAsset.spe.move | 0
.../supra-framework/sources/poel/i_asset.move | 157 ---
.../supra-framework/sources/poel/poel.move | 803 ++++++++---
.../sources/poel/poel.spec.move | 0
.../sources/poel/reward_distribution.move | 133 ++
.../poel/reward_distribution.spec.move | 0
.../sources/poel/reward_distributor.move | 57 -
.../framework/supra-framework/supra_history | 1195 -----------------
.../supra-framework/supra_node_logs/supra.log | 40 -
11 files changed, 1691 insertions(+), 1649 deletions(-)
create mode 100644 aptos-move/framework/supra-framework/sources/configs/poel_config.move
create mode 100644 aptos-move/framework/supra-framework/sources/poel/iAsset.move
create mode 100644 aptos-move/framework/supra-framework/sources/poel/iAsset.spe.move
delete mode 100644 aptos-move/framework/supra-framework/sources/poel/i_asset.move
create mode 100644 aptos-move/framework/supra-framework/sources/poel/poel.spec.move
create mode 100644 aptos-move/framework/supra-framework/sources/poel/reward_distribution.move
create mode 100644 aptos-move/framework/supra-framework/sources/poel/reward_distribution.spec.move
delete mode 100644 aptos-move/framework/supra-framework/sources/poel/reward_distributor.move
delete mode 100644 aptos-move/framework/supra-framework/supra_history
delete mode 100644 aptos-move/framework/supra-framework/supra_node_logs/supra.log
diff --git a/aptos-move/framework/supra-framework/sources/configs/poel_config.move b/aptos-move/framework/supra-framework/sources/configs/poel_config.move
new file mode 100644
index 0000000000000..bd978cd1a3b54
--- /dev/null
+++ b/aptos-move/framework/supra-framework/sources/configs/poel_config.move
@@ -0,0 +1 @@
+/// configs for poel
\ No newline at end of file
diff --git a/aptos-move/framework/supra-framework/sources/poel/iAsset.move b/aptos-move/framework/supra-framework/sources/poel/iAsset.move
new file mode 100644
index 0000000000000..3ab2197d985d3
--- /dev/null
+++ b/aptos-move/framework/supra-framework/sources/poel/iAsset.move
@@ -0,0 +1,954 @@
+///
+/// This is the iAsset module used as the iAsset standard given to users who deposited assets
+/// via the intralayer vault. Holders of iAsset get an amount of $supra delegated to staking pools depending on the
+/// amount of assets deposited and the price of the asset. ie If the price of the asset if
+/// up compared with $Supra the system lends more to the user delegating more $supra
+/// to the delegation pools and correspondingly if the price drops the system lends less, withdrawing some assets
+/// from the delegation pools. Holders of iAsset get $supra rewards from the staking pools while enabling them to utilize
+/// the iAsset as an underlying asset of their deposited asset for other defi utilities. Transfer of iAsset to a different address
+/// transfers the acrual of rewards to the receiving address for the period beging after the transfer.
+///
+module supra_framework::iAsset {
+ use aptos_std::simple_map::{Self, SimpleMap};
+ use aptos_std::vector;
+ use aptos_std::smart_table::{Self, SmartTable};
+ use std::signer;
+ use std::string;
+ use aptos_std::error;
+ use aptos_std::object::{Self, Object, ExtendRef, ObjectCore};
+ use aptos_std::math64;
+ use std::option;
+ use aptos_std::primary_fungible_store::Self;
+ use aptos_std::fungible_asset::{Self, MintRef, TransferRef, BurnRef, Metadata};
+ use supra_framework::reward_distribution;//::update_rewards;
+
+ friend supra_framework::poel;
+
+ /// The storage object name from object::create_named_object(address, OBJECT_NAME)
+ const IASSET_GLOBAL: vector = b"IASSET_GLOBAL";
+
+ /// thrown when the calling address is not poel as expected
+ const ENOT_POEL_ADDRESS: u64 = 1;
+
+ /// thrown when the the asset getting deployed is already deployed
+ const EIASSET_ALREADY_DELOYED: u64 = 2;
+
+ /// thrown when the preminiting_OLC_index > current total liquidity cycle index
+ const EPREMINTING_OLC_EXCESS: u64 = 3;
+
+ /// thrown when the asset balance is not enogh to perform an operation
+ const EBALANCE_NOT_ENOUGH: u64 = 4;
+
+ /// thrown when the unlock_olc index is > current_cycle_index
+ const EUNLOCK_OLC_INDEX: u64 = 5;
+
+ /// thrown when the redeem amount is lessthatn 0
+ const EREDEEM_AMOUNT: u64 = 6;
+
+ ///thrown when the wrong asset weight gets calculated
+ const EWRONG_WEIGHT: u64 = 7;
+
+ ///thrown when the length of the collaterixation weight vector does not match table entries
+ const EWRONG_CWV_LENGTH: u64 = 8;
+
+ ///thrown when the allowed signer is not the caller (owner)
+ const ENOT_OWNER: u64 = 9;
+
+ ///thrown when the length of the desirability_score_vector does not match table entries
+ const EWRONG_DESIRABILITY_SCORE_LEN: u64 = 10;
+
+ ///thrown when the asset id is not present in the TotalLiquidityTable
+ const EASSET_NOT_PRESENT: u64 = 11;
+
+ /// thrown when the assets' iterations don't match their number
+ const EWRONG_ASSET_COUNT: u64 = 12;
+
+
+ #[resource_group_member(group = supra_framework::object::ObjectGroup)]
+ /// AssetEntry struct that holds the iAsset's user's metrics
+ struct AssetEntry has key, store, copy {
+ ///UserRewardIndex: Track RewardIndex specific to the user for each asset.
+ user_reward_index: u64,
+ ///Preminted_iAssets: Tracks number of iAssets that are preminted.
+ preminted_iAssets: u64,
+ ///Redeem_Requested_iAssets: Number of iAssets for which redemption has been requested.
+ redeem_requested_iAssets: u64,
+ ///Preminiting_OLC_Index: Records the index of the last cycle during which a preminting request was submitted for an asset.
+ preminiting_OLC_index: u64
+ }
+
+ #[resource_group_member(group = supra_framework::object::ObjectGroup)]
+ /// tracks the liquidity of every asset.
+ struct LiquidityTableItems has key, store {
+ ///asset_supply: Total amount of the asset that has been bridged to create the iAsset.
+ asset_supply: u64,
+ ///desired_weights: Weights reflecting the asset's strategic importance.
+ desired_weight: u64,
+ ///desirability_score: Attractiveness score of the asset.
+ desirability_score: u64,
+ }
+
+ #[resource_group_member(group = supra_framework::object::ObjectGroup)]
+ /// Liquidity provider struct that holds the overal info on the user's iAssets
+ struct LiquidityProvider has key {
+ ///allocated_Rewards: Tracks the total rewards that are allocable to the user.
+ allocated_rewards: u64,//not updated at any point??
+ ///unlock_OLC_Index: Registers the index of the lockup cycle when the user last submitted an unlock request.
+ unlock_olc_index: u64//not updated at any point??
+ }
+
+ #[resource_group_member(group = supra_framework::object::ObjectGroup)]
+ ///This struct aggregates comprehensive liquidity metrics and operational indices for assets managed within the system.
+ struct TotalLiquidity has key {
+ ///Index of the last observable lockup cycle (OLC), crucial for the minting of preminted tokens and the withdrawal of unlocked tokens.
+ current_olc_index: u64, //not update at any point??
+ ///Represents the nominal value of all assets submitted to the system, indicating the total economic stake.
+ total_nominal_value: u64
+ }
+
+ #[resource_group_member(group = aptos_std::object::ObjectGroup)]
+ /// This struct holds the refences for managing the iAsset fungible assets
+ struct ManagingRefs has key {
+ /// enables minting
+ mint_ref: MintRef,
+ /// enables transfers
+ transfer_ref: TransferRef,
+ /// enables burning
+ burn_ref: BurnRef,
+ }
+
+ #[resource_group_member(group = aptos_std::object::ObjectGroup)]
+ /// this object tracks all iAssets created in this module
+ /// it stores assets in a table mapping their symbols to a bool
+ /// it can change to an asset id or an address depending on which is convenient
+ struct AssetTracker has key {
+ liquidity_provider_objects: SimpleMap,
+ assets: SmartTable, bool>,//maps asset symbol to a bool
+ }
+
+ fun init_module(account: &signer) {
+ let constructor_ref = object::create_named_object(account, IASSET_GLOBAL);
+
+ let global_signer = &object::generate_signer(&constructor_ref);
+
+ move_to(
+ global_signer,
+ AssetTracker {
+ liquidity_provider_objects: simple_map::create(),
+ assets: smart_table::new()
+ }
+ );
+
+ move_to(global_signer, TotalLiquidity {
+ current_olc_index: 0,
+ total_nominal_value: 0,
+ });
+ }
+
+ /// Function create_new_iAsset
+ /// Description creates a new iAsset as a fungible asset and tracks it in the AssetTracker
+ /// @param iAsset_name: the name of the iAsset
+ /// @param iAsset_symbol: its corresponding symbol
+ public fun create_new_iAsset(account: &signer, iAsset_name: vector, iAsset_symbol: vector) acquires AssetTracker {
+ assert!(signer::address_of(account) == @supra_framework, error::permission_denied(ENOT_POEL_ADDRESS));
+ let tracker_address = object::create_object_address(&@supra_framework, IASSET_GLOBAL);
+
+ //assert that the iAsset has not been deployed yet
+ assert!(!
+ *smart_table::borrow(&borrow_global(tracker_address).assets, iAsset_symbol),
+ error::already_exists(EIASSET_ALREADY_DELOYED)
+ );
+
+ //Create the asste Metadata constructor_reference
+ let metadata_constructor_ref = &object::create_named_object(
+ account, iAsset_symbol
+ );
+
+ // Create a store enabled fungible asset
+ primary_fungible_store::create_primary_store_enabled_fungible_asset(
+ metadata_constructor_ref,
+ option::none(),
+ string::utf8(iAsset_name),
+ string::utf8(iAsset_symbol),
+ 6,
+ string::utf8(b""),
+ string::utf8(b""),
+ );
+
+
+ // generate the mint, burn and transfer refs then store
+ let mint_ref = fungible_asset::generate_mint_ref(metadata_constructor_ref);
+ let transfer_ref = fungible_asset::generate_transfer_ref(metadata_constructor_ref);
+ let burn_ref = fungible_asset::generate_burn_ref(metadata_constructor_ref);
+ let metadata_object_signer = &object::generate_signer(metadata_constructor_ref);
+ move_to(
+ metadata_object_signer,
+ ManagingRefs { mint_ref, transfer_ref, burn_ref }
+ );
+
+ move_to(metadata_object_signer, LiquidityTableItems {
+ asset_supply: 0,
+ desired_weight: 0,
+ desirability_score: 0,
+ });
+
+ // track the deployed asset in the AssetTracker assets table
+ smart_table::add(
+ &mut borrow_global_mut(tracker_address).assets,
+ iAsset_symbol,
+ true
+ );
+ }
+
+ #[view]
+ /// Function asset_addess
+ /// Description returns the address of the assets's metadata derived from the creator and its symbol
+ /// @param: symbol: the symbol used during the creation of the asset's object
+ public fun asset_address(symbol: vector): address {
+ object::create_object_address(&@supra_framework, symbol)
+ }
+
+
+ #[view]
+ /// Function asset_metadata
+ /// Description returns the assets's metadata derived from its address
+ /// @param symbol: the symbol used during the creation of the asset's object
+ public fun asset_metadata(symbol: vector): Object {
+ object::address_to_object(asset_address(symbol))
+ }
+
+ #[view]
+ /// Get the address of the global storage object
+ public fun get_storage_address(): address {
+ object::create_object_address(&@supra_framework, IASSET_GLOBAL)
+ }
+
+ #[view]
+ /// Function get_liquidity_table_items(symbol)
+ /// Desctiption: Retrives the data in the liquidity table struct
+ /// @param: symbol - vector
+ /// returns: (asset_supply, iAsset_supply, desired_weight, desirability_score)
+ public fun get_liquidity_table_items(symbol: vector): (u64, u64, u64,) acquires LiquidityTableItems {
+ let items = borrow_global(asset_address(symbol));
+
+ (items.asset_supply, items.desired_weight, items.desirability_score)
+ }
+
+ #[view]
+ /// Function get_total_liquidity
+ /// Desctiption: Retrives the data in the total_liquidity
+ /// returns: (current_olc_index, total_nominal_value)
+ public fun get_total_liquidity(): (u64, u64) acquires TotalLiquidity {
+ let obj_address = object::create_object_address(&@supra_framework, IASSET_GLOBAL);
+
+ let total_obj = borrow_global(obj_address);
+
+ (total_obj.current_olc_index, total_obj.total_nominal_value)
+ }
+
+ #[view]
+ /// Function: get_asset_price(asset_symbol)
+ /// Description: Gets an asset's prce from the price oracle
+ /// @param: asset_symbol - vector
+ public fun get_asset_price(asset_symbol: vector): u64 {
+ 0
+ }
+
+ #[view]
+ /// Function: get_iAsset_supply(asset: Object)
+ /// Description: Gets an asset's prce from the price oracle
+ /// @param: asset - Object
+ /// returns: u64
+ public fun get_iAsset_supply(asset: Object): u64 {
+ (option::extract(&mut fungible_asset::supply(asset)) as u64)
+
+ }
+
+ #[view]
+ /// Function: get_assets
+ /// Description: Gets all asset names from AssetTracker
+ /// returns: vector
+ public fun get_assets(): vector> acquires AssetTracker {
+ let tracked_assets = borrow_global(get_storage_address());
+
+ let return_value: vector> = vector::empty();
+
+ smart_table::for_each_ref, bool>(
+ &tracked_assets.assets,
+ | key, _value|
+ {
+ //let is_there: &bool = value;
+ let symbol = *key;
+ vector::push_back>(&mut return_value, symbol);
+
+ });
+ return_value
+ }
+
+ #[view]
+ /// Function: get_provider_address(account)
+ /// Description: Gets Liquidity provider object address for the account
+ /// @param: account - address of the user
+ /// returns: address
+ fun get_provider_address(account: address): address acquires AssetTracker {
+ let tracked_assets = borrow_global(get_storage_address());
+
+ *simple_map::borrow(&tracked_assets.liquidity_provider_objects, &account)
+ }
+
+
+ /// Function: create_iAsset_entry(account, asset)
+ /// Description: This function created an AssetEntry record on an address's FungibleStore's address
+ /// @param: account - address of the user
+ /// @param: asset - the target asset
+ public fun create_iAsset_entry(account: address, asset: Object) acquires AssetTracker {
+ initialize_LiquidityProvider(account);
+ let primary_store = primary_fungible_store::ensure_primary_store_exists(account, asset);
+ let store_address = object::object_address(&primary_store);
+ if (!object::object_exists(store_address)) {
+ // create and object
+ let constructor_ref = &object::create_object(store_address);
+
+ let object_signer = &object::generate_signer(constructor_ref);
+
+ move_to(
+ object_signer,
+ AssetEntry {
+ user_reward_index: 0,
+ preminted_iAssets: 0,
+ redeem_requested_iAssets: 0,
+ preminiting_OLC_index: 0
+ }
+ )
+ }
+ }
+
+ ///Function to set up initial LiquidityProvider structures for asset management.
+ /// Desctription: Create an liquidityProvider for an addres if its not created
+ /// @param: user_address - address of the user
+ public fun initialize_LiquidityProvider(user_address: address) acquires AssetTracker {
+
+ // check if the object was created and tracked
+ let liquidity_provider_address = get_provider_address(user_address);
+ if (!object::object_exists(liquidity_provider_address)) {
+ let constructor_ref = object::create_object(user_address);
+ let account = &object::generate_signer(&constructor_ref);
+ let liquidity_provider = LiquidityProvider {
+ allocated_rewards: 0u64,
+ unlock_olc_index: 0u64
+ };
+ move_to(account, liquidity_provider);
+ }
+ }
+
+
+ #[view]
+ /// Function: get_asset_entry
+ /// returns the iAsset entry values as a tuple
+ /// @param: user_address - the user address geting checked
+ /// @param: asset - the asset metadata
+ /// @return (u64, u64, u64, u64) - (user_reward_index, preminted_iAssets, redeem_requested_iAssets, preminiting_OLC_index)
+ public fun get_asset_entry(user_address: address, asset: Object): (u64, u64, u64, u64) acquires AssetEntry {
+ let store_address = primary_fungible_store::primary_store_address(user_address, asset);
+
+ if (fungible_asset::store_exists(store_address)) {
+ let item = borrow_global_mut(store_address);
+ (item.user_reward_index, item.preminted_iAssets, item.redeem_requested_iAssets, item.preminiting_OLC_index)
+
+ } else {
+ (0, 0, 0, 0)
+ }
+ }
+
+
+ /// Function: premint_iAsset
+ /// Description: is applied to mint iAssets as soon as some amount of the original asset has been submitted to the interalayer vaults.
+ /// @notice: premint function can be called only by PoEL contract
+ /// @param: account has to be the poel contract
+ /// @param: asset_amount asssets to be minted
+ /// @param: asset: the asset getting minted
+ /// @param: receiver the receiving address
+ public(friend) fun premint_iAsset(
+ account: &signer,
+ asset_amount: u64,
+ asset_symbol: vector,
+ receiver: address,
+ asset_supply: u64,
+ ) acquires AssetEntry, ManagingRefs, TotalLiquidity, AssetTracker {
+ // confirm the caller is the right address
+ assert!(signer::address_of(account) == @supra_framework, error::permission_denied(ENOT_POEL_ADDRESS));
+
+ //let table_obj = borrow_global_mut(asset_address(asset_symbol));
+
+ //ensure the reciver has a fungible store of the iAsset
+ let primary_store = primary_fungible_store::ensure_primary_store_exists(receiver, asset_metadata(asset_symbol));
+ // check whether the AssetEntry struct is in the store address
+ create_iAsset_entry(receiver, asset_metadata(asset_symbol));
+
+ mint_iAsset(receiver, asset_symbol);
+
+ let total_liquidity_ref = borrow_global(get_storage_address());
+
+ let asset_entry = borrow_global_mut(object::object_address(&primary_store));
+ let iAsset_amount = previewMint(asset_supply, asset_amount, asset_metadata(asset_symbol));
+
+ asset_entry.preminted_iAssets = (asset_entry.preminted_iAssets + iAsset_amount);
+ asset_entry.preminiting_OLC_index = total_liquidity_ref.current_olc_index;
+ }
+
+
+ /// Function: mint_iAsset
+ /// Purpose: Intended to mint the pre-minted tokens of iAssets.
+ /// The function can be called by anyone, not necessarily by the user themselves.
+ /// @param: user_address - the user address geting checked
+ /// @param: asset - the asset metadata
+ public fun mint_iAsset(
+ user_address: address,
+ asset_symbol: vector,
+ ) acquires ManagingRefs, AssetEntry, TotalLiquidity, AssetTracker {
+
+ let mint_ref = &borrow_global(
+ asset_address(asset_symbol)
+ ).mint_ref;
+
+ let total_liquidity_ref = borrow_global(get_storage_address());
+
+ let primary_store = primary_fungible_store::ensure_primary_store_exists(user_address, asset_metadata(asset_symbol));
+
+ //assert!(exists(object::object_address(&primary_store)));
+ create_iAsset_entry(user_address, asset_metadata(asset_symbol));
+
+ let asset_entry = borrow_global_mut(object::object_address(&primary_store));
+
+ //Assert that Preminiting_OLC_Index < current_cycle_index.
+ assert!(
+ asset_entry.preminiting_OLC_index < total_liquidity_ref.current_olc_index,
+ error::invalid_state(EPREMINTING_OLC_EXCESS)
+ );
+ //Check PremintedAssetBalance (fetched from iAsset_table using assetID) . If PremintedAssetBalance > 0:
+ if (asset_entry.preminted_iAssets > 0) {
+
+ //mint into primary store
+ primary_fungible_store::mint(mint_ref, user_address, asset_entry.preminted_iAssets);
+ //Set PremintedAssetBalance = 0.
+ asset_entry.preminted_iAssets = 0;
+ //Call update_rewards(owner address, asset).
+ reward_distribution::update_rewards(user_address, asset_entry.user_reward_index, asset_metadata(asset_symbol));
+ }
+ }
+
+
+ /// previewMint(asset_amount, assetID):
+ /// Purpose: Calculates the total amount of iAsset that needs to be minted based on the submitted original assets.
+ /// @param: amount - the amount to mint
+ /// @param: asset - the asset metadata
+ public fun previewMint(asset_supply: u64, asset_amount: u64, asset: Object): u64 {
+
+ // get the iAsset total supply
+ //let i_asset = fungible_asset::supply(asset);
+ ////@phydy: confirm the best to use
+ //let _x = (option::extract(&mut i_asset) as u64);
+ //Retrieve Asset_supply from the iAsset_table using assetID.
+ let iAsset_supply = get_iAsset_supply(asset);
+
+ //let (_, asset_supply, iAsset_supply, _, _) = get_liquidity_table_items(asset);
+
+ //Calculate asset_needed based on the current iAsset_supply:
+ let asset_needed: u64;
+
+ //If iAsset_supply equals 0, set asset_needed to asset_amount.
+ if (iAsset_supply == 0) {
+ asset_needed = asset_amount;
+ }
+ // If iAsset_supply is greater than 0, calculate asset_needed as the rounded up result of
+ // (asset_amount * asset_supply / iAsset_supply) to account for division truncation.
+ else {
+
+ // rounding up when division truncation occurs
+ asset_needed = (asset_amount * iAsset_supply + asset_supply - 1) / asset_supply + 1;
+ };
+ //Return asset_needed
+ asset_needed
+ }
+
+ /// Function: previewRedeem(iAsset_amount, asset): preview the amount of assets to receive by specifying the amount of iAssets to redeem
+ /// @param: iAsset_amount - the iAsset amount getting previewed
+ /// @param: asset - the asset metadata
+ /// return u64 - from convertToAssets(iAsset_amount, asset)
+ public fun previewRedeem(asset_supply: u64, iAsset_amount: u64, asset: Object): u64 {
+ let asset_amount = convertToAssets(asset_supply, iAsset_amount, asset);
+ asset_amount
+ }
+
+ /// previewWithdraw(asset_amount, asset): preview the amount of iAsset to burn by specifying the amount of assets that would be withdrawn
+ /// @param: iAsset_amount - the iAsset amount getting previewed
+ /// @param: asset - the asset metadata
+ /// return: u64 - calculated iAsset_to_burn
+ public fun previewWithdraw(asset_supply: u64, asset_amount: u64, asset: Object): u64 {
+ //let (_, asset_supply, iAsset_supply, _, _) = get_liquidity_table_items(asset);
+
+ let iAsset_supply = get_iAsset_supply(asset);
+
+ let iAsset_to_burn: u64;
+
+ if (iAsset_supply == 0) {
+ iAsset_to_burn = asset_amount;
+ } else {
+ //@phydy: to change
+ let totalAssets = asset_supply;//getTotalAssets(asset_id); // Assume this function fetches total assets
+ iAsset_to_burn = (asset_amount * iAsset_supply + totalAssets - 1) / totalAssets + 1;
+ };
+
+ // Return the calculated iAsset_to_burn
+ iAsset_to_burn
+ }
+
+ /// Function: redeem_request(account, iAsset_amount, asset, receiver_address)
+ /// Description: A request to redeem iAssets
+ /// @param: account - the account submiting the redeem request
+ /// @param: iAsset_amount - amount of iAssets getting redeemed
+ /// @param: asset - iAsset getting redeemed
+ /// @param: receiver_address - address receiving the assets on the intra laver vault
+ public fun redeem_request(
+ account: &signer,
+ iAsset_amount: u64,
+ asset_symbol: vector,
+ receiver_address: address,
+ current_cycle_index: u64
+ ) acquires AssetEntry, ManagingRefs, LiquidityTableItems, AssetTracker, LiquidityProvider {
+ let asset = asset_metadata(asset_symbol);
+ let account_address = signer::address_of(account);
+ let iAssetBalance = primary_fungible_store::balance(account_address, asset);
+
+ assert!(iAssetBalance >= iAsset_amount, error::invalid_state(EBALANCE_NOT_ENOUGH));
+
+ let primary_store = primary_fungible_store::ensure_primary_store_exists(account_address, asset);
+
+ create_iAsset_entry(account_address, asset);
+
+ redeem_iAsset(account, asset, receiver_address, current_cycle_index, iAsset_amount);
+
+ let asset_entry = borrow_global_mut(object::object_address(&primary_store));
+
+ //burn the assets
+ let burn_ref = &borrow_global(object::object_address(&asset)).burn_ref;
+
+ primary_fungible_store::burn(burn_ref, account_address, iAsset_amount);
+
+ reduce_asset_supply(asset_symbol, iAsset_amount);
+
+ asset_entry.redeem_requested_iAssets + iAsset_amount;
+
+ reward_distribution::update_rewards(account_address, asset_entry.user_reward_index, asset);
+
+ let current_cycle_index = current_cycle_index;
+
+ let provider_ref = borrow_global_mut(get_provider_address(account_address));
+
+ provider_ref.unlock_olc_index = current_cycle_index;
+ //preminting_olc_index = current_cycle_index;
+ asset_entry.preminiting_OLC_index = current_cycle_index;
+ }
+
+ /// Function: redeem_iAsset(account, asset, receiver_address)
+ /// Description: called to to redeem iAssets ie withdraw
+ /// @param: account - the account submiting the redeem request
+ /// @param: asset - iAsset getting redeemed
+ /// @param: receiver_address - address receiving the assets on the intra laver vault
+ fun redeem_iAsset(
+ account: &signer,
+ asset: Object,
+ _receiver_address: address,
+ current_cycle_index: u64,
+ asset_supply: u64
+ ) acquires LiquidityProvider, AssetEntry, AssetTracker {
+ let account_address = signer::address_of(account);
+
+ let primary_store = primary_fungible_store::ensure_primary_store_exists(account_address, asset);
+
+ //assert!(exists(object::object_address(&primary_store)));
+ create_iAsset_entry(account_address, asset);
+ let provider_ref = borrow_global_mut(get_provider_address(account_address));
+
+
+ let asset_entry = borrow_global_mut(object::object_address(&primary_store));
+
+ // Ensure that the unlock_olc_index is less than the current cycle index
+ assert!(provider_ref.unlock_olc_index < current_cycle_index, error::invalid_state(EUNLOCK_OLC_INDEX));
+
+ // Ensure that redeem_requested_iAssets is greater than or equal to 0
+ assert!(asset_entry.redeem_requested_iAssets >= 0, error::invalid_state(EREDEEM_AMOUNT));
+
+ let _asset_to_withdraw = previewWithdraw(asset_supply, asset_entry.redeem_requested_iAssets, asset);
+
+ // Verify that the receiver address is valid (assuming a helper function verify_receiver_address exists)
+ //assert!(verify_receiver_address(receiver_address), 2);
+
+ asset_entry.redeem_requested_iAssets = 0;
+
+
+
+ //Bridge::trigger_sendToUser(asset_id, asset_to_withdraw, receiver_address);
+//
+ //IntraLayerVault::sendToUser(asset_id, asset_to_withdraw, receiver_address);
+ }
+
+ /// Function: transfer_iAsset(account, asset, receiver_address)
+ /// Description: called to transfer iAssets to another address
+ /// @param: account - the account submiting the redeem request
+ /// @param: asset - iAsset getting redeemed
+ /// @param: receiver_address - address receiving the assets
+ public fun transfer_iAsset(
+ account: &signer,
+ iAsset_amount: u64,
+ asset: Object,
+ receiver_address: address,
+ ) acquires AssetEntry, AssetTracker {
+ let owner_address = signer::address_of(account);
+ let owner_primary_store = primary_fungible_store::ensure_primary_store_exists(owner_address, asset);
+ //let receiver_primary_store = primary_fungible_store::ensure_primary_store_exists(receiver_address, asset);
+
+ let owner_asset_entry = borrow_global_mut(object::object_address(&owner_primary_store));
+
+ // Ensure the asset is initialized in the owner's LiquidityProvider struct
+ create_iAsset_entry(owner_address, asset);
+
+ // Ensure the asset is initialized in the receiver's LiquidityProvider struct
+ create_iAsset_entry(receiver_address, asset);
+
+ let owner_iAsset_balance = fungible_asset::balance(owner_primary_store);
+
+ assert!(
+ owner_iAsset_balance - owner_asset_entry.redeem_requested_iAssets >= iAsset_amount,
+ error::invalid_argument(EBALANCE_NOT_ENOUGH)
+ ); // to confirm on pending_withdraw_balance_iAsset
+
+ //invoke transfer
+ //*owner_iAsset_balance -= iAsset_amount;
+ primary_fungible_store::transfer(account, asset, receiver_address, iAsset_amount);
+
+ //let (receiver_iAsset_balance, _, _, _, _) = table::borrow_mut(&mut receiver_provider_ref.iAsset_table, asset_id);
+ //*receiver_iAsset_balance += iAsset_amount;
+
+ reward_distribution::update_rewards(owner_address, owner_asset_entry.user_reward_index, asset);
+ }
+//
+// public fun transfer_asset(
+// asset_amount: u64,
+// asset_id: u64,
+// receiver_address: address,
+// owner_address: address
+// ) {
+// let iAsset_amount = convertToiAssets(asset_amount, asset_id);
+//
+// let owner_provider_ref = borrow_global_mut(owner_address);
+// let (owner_iAsset_balance, _, _, _, _) = table::borrow_mut(&mut owner_provider_ref.iAsset_table, asset_id);
+// assert!(*owner_iAsset_balance >= iAsset_amount, 0);
+//
+// *owner_iAsset_balance -= iAsset_amount;
+//
+// if (!exists(receiver_address)) {
+// initialize_LiquidityProvider(receiver_address);
+// }
+// add_asset_LiquidityProvider(asset_id, receiver_address);
+//
+// let receiver_provider_ref = borrow_global_mut(receiver_address);
+// let (receiver_iAsset_balance, _, _, _, _) = table::borrow_mut(&mut receiver_provider_ref.iAsset_table, asset_id);
+// *receiver_iAsset_balance += iAsset_amount;
+//
+// update_rewards(owner_address, asset_id);
+// }
+//
+ ///Function convertToAssets(shares, asset)
+ /// Description: Converts the asiAssets to assets before redemption
+ /// @param: shares - the iAsset amount getting previewed
+ /// @param: asset - the asset metadata
+ /// return u64
+ public fun convertToAssets(asset_supply: u64, shares: u64, asset: Object): u64 {
+ //let (_, asset_supply, iAsset_supply, _, _) = get_liquidity_table_items(asset);
+
+ let iAsset_supply = get_iAsset_supply(asset);
+
+ let asset_amount: u64;
+
+ if (iAsset_supply == 0) {
+ asset_amount = shares;
+ } else {
+ asset_amount = (shares * asset_supply) / iAsset_supply;
+ };
+
+ asset_amount
+ }
+
+// /// Adds a new asset to the TotalLiquidityTable within the TotalLiquidity struct, initializing its financial metrics to default values.
+// public fun add_new_iAsset(
+// signer: &signer,
+// asset_name: String,
+// desirability_score: u64
+// ) {
+// // Ensure the function is called by an authorized signer (admin)
+// assert!(signer::address_of(signer) == ADMIN_ADDRESS, 0);
+//
+// // Borrow a mutable reference to the TotalLiquidity struct
+// let total_liquidity_ref = borrow_global_mut(TOTAL_LIQUIDITY_ADDRESS);
+//
+// let new_asset_id = total_liquidity_ref.last_asset_id + 1;
+// total_liquidity_ref.last_asset_id = new_asset_id;
+//
+// let initial_metrics = (0, 0, 0, 0); // (collaterisation_rate, asset_price, iAsset_supply, asset_supply)
+//
+// table::add(
+// &mut total_liquidity_ref.TotalLiquidityTable,
+// new_asset_id,
+// initial_metrics
+// );
+//
+// total_liquidity_ref.asset_metadata.insert(new_asset_id, (asset_name, desirability_score));
+//
+// total_liquidity_ref.desirable_weights.insert(new_asset_id, 0);
+//
+// // Inform the admin that they must call updateDesiredWeights to allocate the desired weight
+// // This could be done through an event or a log, depending on your system design
+// }
+
+ fun reduce_asset_supply(asset: vector, amount: u64) acquires LiquidityTableItems {
+ let obj_address = asset_address(asset);
+
+ let liquidity_ref = borrow_global_mut(obj_address);
+
+ liquidity_ref.asset_supply = liquidity_ref.asset_supply - amount;
+ }
+
+ /// Function: update_desired_weight(desired_weight_vector, signer)
+ /// Purpose: Updates asset weights in the TotalLiquidity struct to align with current strategic objectives.
+ /// Description:
+ /// Ensure the sum of desired weights in the vector equals 1; if not, throw an error.
+ /// Update desired_weights for all assets in TotalLiquidity based on the vector.
+
+ public fun update_desired_weight(
+ desired_weight_vector: vector,
+ account: &signer
+ ) acquires AssetTracker, LiquidityTableItems {
+ //Verify admin authority and existence of TotalLiquidity in Supra_framework.
+ assert!(signer::address_of(account) == @supra_framework, error::permission_denied(ENOT_OWNER));
+
+ let obj_address = get_storage_address();
+
+ let tracked_assets = borrow_global(obj_address);
+
+ let num_assets = smart_table::length(&tracked_assets.assets);
+ //Check that desired_weight_vector length matches the number of assets in TotalLiquidity.
+
+ assert!(
+ vector::length(&desired_weight_vector) == num_assets, error::invalid_argument(EWRONG_CWV_LENGTH)
+ );
+
+ let total_weight: u64 = 0;
+
+
+ vector::for_each(desired_weight_vector, | weight| {total_weight = total_weight + weight});
+
+ //Ensure the sum of desired weights in the vector equals 1; if not, throw an error.
+ assert!(total_weight == 1, error::invalid_argument(EWRONG_WEIGHT));
+
+ //Update desired_weights for all assets in TotalLiquidity based on the vector.
+ let index = 0;
+ smart_table::for_each_ref, bool>(
+ &tracked_assets.assets,
+ | key, _value|
+ {
+ let symbol = *key;
+ let table_obj = borrow_global_mut(asset_address(symbol));
+ let new_desired_weight = vector::borrow(&desired_weight_vector, index);
+ table_obj.desired_weight = *new_desired_weight;
+ index = index + 1;
+ });
+
+ assert!(index == num_assets, error::invalid_state(EWRONG_ASSET_COUNT));
+ }
+
+ /// batch_update_desirability_score(desirability_score_vector, signer)
+ /// Purpose: Updates desirability scores for all assets in the TotalLiquidity struct.
+ public fun batch_update_desirability_score(
+ desirability_score_vector: vector,
+ signer: &signer
+ ) acquires AssetTracker, LiquidityTableItems {
+ //Verifies that the function caller is an authorized admin.
+ assert!(signer::address_of(signer) == @supra_framework, error::permission_denied(ENOT_OWNER));
+
+ let obj_address = get_storage_address();
+
+ let tracked_assets = borrow_global(obj_address);
+
+ //Asserts that the length of desirability_score_vector matches the number of assets in TotalLiquidity.
+ let num_assets = smart_table::length(&tracked_assets.assets);
+
+ assert!(
+ vector::length(&desirability_score_vector) == num_assets, error::invalid_argument(EWRONG_DESIRABILITY_SCORE_LEN)
+ );
+
+ //Adjusts the desirability_score for each asset in TotalLiquidity based on the new scores provided.
+ let index = 0;
+ smart_table::for_each_ref, bool>(
+ &tracked_assets.assets,
+ | key, _value|
+ {
+ let symbol = *key;
+ let table_obj = borrow_global_mut(asset_address(symbol));
+ let new_desirability_score = vector::borrow(&desirability_score_vector, index);
+ table_obj.desirability_score = *new_desirability_score;
+ index = index + 1;
+ });
+ }
+
+ /// update_desirability_score(signer,desirability_score, assetID)
+ /// Purpose: Updates the desirability score of a specified asset within the TotalLiquidity struct of the Supra_framework.
+ public fun update_desirability_score(
+ signer: &signer,
+ desirability_score: u64,
+ asset_symbol: vector,
+ ) acquires AssetTracker, LiquidityTableItems {
+ //Verifies that the function caller is an authorized admin.
+ assert!(signer::address_of(signer) == @supra_framework, error::permission_denied(ENOT_OWNER));
+
+ let obj_address = get_storage_address();
+
+ let tracked_assets = borrow_global(obj_address);
+ //Confirms that the assetID corresponds to an asset within TotalLiquidity.
+ assert!(
+ smart_table::contains(&tracked_assets.assets, asset_symbol),
+ error::not_found(EASSET_NOT_PRESENT)
+ );
+
+ //Adjusts the desirability score for the asset based on the provided score and assetID.
+ let table_obj = borrow_global_mut(asset_address(asset_symbol));
+
+ table_obj.desirability_score = desirability_score;
+ }
+
+ /// updates asset prices and calculates new supply metrics for collateral management in the system.
+ public(friend) fun update_asset_price_supply() acquires TotalLiquidity, AssetTracker, LiquidityTableItems {
+ let total_nominal_liquidity: u64 = 0;
+ let total_liquidity_ref = borrow_global_mut(get_storage_address());
+ let tracked_assets = borrow_global(get_storage_address());
+
+
+ smart_table::for_each_ref, bool>(
+ &tracked_assets.assets,
+ | key, _value|
+ {
+ //let is_there: &bool = value;
+ let symbol = *key;
+ let table_obj = borrow_global_mut(asset_address(symbol));
+ let new_asset_price = 0; //get_asset_price_from_oracle(asset_id); // Assuming a function to get the asset price
+
+ // Fetch asset details and calculate new supply
+ let borrow_request = 0;// get_borrow_request(asset_id); // Assuming a function to get borrow requests
+ let withdraw_request = 0;// get_withdraw_request(asset_id); // Assuming a function to get withdraw requests
+ let new_supply = table_obj.asset_supply + borrow_request - withdraw_request;
+
+ let nominal_liquidity_of_asset = new_supply * new_asset_price;
+
+ table_obj.asset_supply = new_supply;
+ //table_obj.collateralisation_rate = nominal_liquidity_of_asset;
+
+ total_nominal_liquidity = total_nominal_liquidity + nominal_liquidity_of_asset;
+
+ total_liquidity_ref.total_nominal_value = total_nominal_liquidity;
+
+ });
+ }
+
+
+ public(friend) fun update_single_asset_supply(symbol: vector, new_supply: u64): u64 acquires LiquidityTableItems {
+ let table_obj = borrow_global_mut(asset_address(symbol));
+ table_obj.asset_supply = table_obj.asset_supply + new_supply;
+ table_obj.asset_supply
+
+ }
+
+ public fun calculate_total_rentable(
+ coefficient_k: u64,
+ coefficient_m: u64,
+ //coefficient_rho: u64,
+ min_collateralisation: u64,
+ max_collateralisation_first: u64
+
+ ): u64 acquires AssetTracker, LiquidityTableItems, TotalLiquidity {
+ let tracked_assets = borrow_global(get_storage_address());
+
+ let asset_price = 1;//get_asset_price();
+ let total_rentable_amount: u64 = 0;
+
+ smart_table::for_each_ref, bool>(
+ &tracked_assets.assets,
+ | key, _value|
+ {
+ //let is_there: &bool = value;
+ let symbol = *key;
+ let collateralisation_rate = calculate_collaterisation_rate(
+ symbol,
+ coefficient_k,
+ coefficient_m,
+ //coefficient_rho,
+ min_collateralisation,
+ max_collateralisation_first
+
+ );
+ let table_obj = borrow_global_mut(asset_address(symbol));
+
+ total_rentable_amount = total_rentable_amount + (table_obj.asset_supply / collateralisation_rate) * asset_price;
+ });
+ total_rentable_amount
+
+ }
+
+
+ //5. calculate_collaterisation_rate(asset_nominal_value, total_nominal_value, assetID)
+ //Purpose: Calculates and updates the collateralization rate for a specified asset based on dynamic market weights and predefined coefficients.
+ public fun calculate_collaterisation_rate(
+ symbol: vector,
+ coefficient_k: u64,
+ coefficient_m: u64,
+ //coefficient_rho: u64,
+ min_collaterisation: u64,
+ max_collateralisation_first: u64
+ ): u64 acquires TotalLiquidity, LiquidityTableItems {
+
+ let total_liquidity_ref = borrow_global_mut(get_storage_address());
+
+ let (asset_supply, desired_weight, _) = get_liquidity_table_items(symbol);
+
+ let collaterisation_rate_for_asset = 0;
+
+ let asset_weight = asset_supply / total_liquidity_ref.total_nominal_value; //to convert to f64
+
+ if (asset_weight <= desired_weight) {
+ let numerator = desired_weight - asset_weight;
+ let denominator = desired_weight;
+ let ratio = numerator / denominator;
+ let ratio_exp = math64::pow(ratio, coefficient_k);
+
+ collaterisation_rate_for_asset = min_collaterisation + (
+ max_collateralisation_first - min_collaterisation) * ratio_exp;
+ } else {
+ let numerator = asset_weight - desired_weight;
+ let denominator = 100 - desired_weight;
+ let ratio = numerator / denominator;
+ let ratio_exp = math64::pow(ratio, coefficient_m);
+
+ collaterisation_rate_for_asset =
+ min_collaterisation +
+ (max_collateralisation_first - min_collaterisation) * ratio_exp;
+ };
+ collaterisation_rate_for_asset
+ }
+
+ public(friend) fun poel_update_olc_index() acquires TotalLiquidity {
+ let total_liquidity_ref = borrow_global_mut(get_storage_address());
+
+ total_liquidity_ref.current_olc_index = total_liquidity_ref.current_olc_index + 1;
+
+ }
+
+}
\ No newline at end of file
diff --git a/aptos-move/framework/supra-framework/sources/poel/iAsset.spe.move b/aptos-move/framework/supra-framework/sources/poel/iAsset.spe.move
new file mode 100644
index 0000000000000..e69de29bb2d1d
diff --git a/aptos-move/framework/supra-framework/sources/poel/i_asset.move b/aptos-move/framework/supra-framework/sources/poel/i_asset.move
deleted file mode 100644
index 9027379ccd1bc..0000000000000
--- a/aptos-move/framework/supra-framework/sources/poel/i_asset.move
+++ /dev/null
@@ -1,157 +0,0 @@
-///
-/// This is the iAsset module used as the iAsset standard given to users who deposited assets
-/// via the intralayer vault. Holders of iAsset get an amount of $supra delegated to staking pools depending on the
-/// amount of assets deposited and the price of the asset. ie If the price of the asset if
-/// up compared with $Supra the system lends more to the user delegating more $supra
-/// to the delegation pools and correspondingly if the price drops the system lends less, withdrawing some assets
-/// from the delegation pools. Holders of iAsset get $supra rewards from the staking pools while enabling them to utilize
-/// the iAsset as an underlying asset of their deposited asset for other defi utilities. Transfer of iAsset to a different address
-/// transfers the acrual of rewards to the receiving address for the period beging after the transfer.
-///
-
-module supra_framework::i_asset {
-
- use supra_framework::table;
- use supra_framework::string::String;
-/// Errors:
-
- /// Thrown when the calling address is not the poel module address
- const ERR_NOT_POEL_ADDRESS: u64 = 0;
-///
-/// Structs:
- ///This struct holds individual iAsset parameters for each user's holdings
- struct AssetEntry has store, copy {
- ///iAssetBalance: Amount of iAsset held by the user.
- iAsset_balance: u64,
- ///UserRewardIndex: Track RewardIndex specific to the user for each asset.
- user_reward_index: u64,
- ///Preminted_iAssets: Tracks number of iAssets that are preminted.
- preminted_iAssets: u64,
- ///Redeem_Requested_iAssets: Number of iAssets for which redemption has been requested.
- redeem_requested_iAssets: u64,
- ///Preminiting_OLC_Index: Records the index of the last cycle during which a preminting request was submitted for an asset.
- preminiting_OLC_index: u64
- }
-
- ///This structs holds a user's Liquidity information with a table mapping to all assets
- struct LiquidityProvider has key {
- ///iAsset_table: Utilizes aptos_std::table to map asset IDs to multiple attributes in AssetEntry
- iAsset_table: table::Table,
- ///allocated_Rewards: Tracks the total rewards that are allocable to the user.
- allocated_rewards: u64,
- ///unlock_OLC_Index: Registers the index of the lockup cycle when the user last submitted an unlock request.
- unlock_olc_index: u64
- }
-
- //Functions:
-
- //helper function to update the liquidity provider table
- public fun update_iAsset_entry(
- _provider: &mut LiquidityProvider,
- _asset_id: u64,
- _iAssetBalance: u64,
- _user_reward_index: u64,
- _preminted_iAssets: u64,
- _redeem_requested_iAssets: u64,
- _preminiting_OLC_index: u64
- ) {}
-
- ///Function to set up initial LiquidityProvider structures for asset management.
- public fun initialize_LiquidityProvider(_account: &signer) {}
-
- ///Verifies if an assetID exists in the user's LiquidityProvider struct and updates it if absent.
- /// @param: user_address - The user address receiving the assets
- /// @param: asset_id - asset id in the iAsset_table of LiquidityProvider struct
- fun add_asset_LiquidityProvider(
- _user_address: address,
- _asset_id: u64
- ) {}
-
- /// is applied to mint iAssets as soon as some amount of the original asset has been submitted to the interalayer vaults.
- /// premint function can be called only by PoEL contract
- /// @param: account - Poel signer account
- /// @param: asset_amount: amount of assets supplied
- /// @param: asset_id: asset id in the iAsset_table of LiquidityProvider struct
- /// @param: receiver - The address receiving the assets
- public fun premint_iAsset(
- _account: &signer,
- _asset_amount: u64,
- _asset_id: u64,
- _receiver: address,
- ) {}
-
- /// Function: mint_iAsset(user_address, assetID)
- /// Purpose: Intended to mint the pre-minted tokens of iAssets.
- /// The function can be called by anyone, not necessarily by the user themselves.
- /// @param: user_address - The user address receiving the assets
- /// @param: asset_id - asset id in the iAsset_table of LiquidityProvider struct
- public fun mint_iAsset(_user_address: address, _asset_id: u64) {}
-
-
- /// previewMint(asset_amount, assetID):
- /// Purpose: Calculates the total amount of iAsset that needs to be minted based on the submitted original assets.
- /// @param: provider_ref - Liquidity provider object geting previewd
- /// @param: asset_amount: amount of assets supplied
- /// @param: asset_id - asset id in the iAsset_table of LiquidityProvider struct
- /// @notice: return the amount of iAssets to get minted
- public fun previewMint(_provider_ref: &mut LiquidityProvider, _asset_amount: u64, _asset_id: u64): u64 {
- 0
- }
-
- /// previewRedeem(iAsset_amount, assetID)
- /// previews the amount of assets to receive by specifying the amount of iAssets to redeem
- /// @param: iAsset_amount: amount of iAssets to be redeemed
- /// @param: asset_id - asset id in the iAsset_table of LiquidityProvider struct
- /// @notice: returns returns the amount converted assets
- public fun previewRedeem(_iAsset_amount: u64, _asset_id: u64): u64 {
- 0
- }
-
- /// previewWithdraw(asset_amount, assetID): preview the amount of iAsset to burn by specifying
- /// the amount of assets that would be withdrawn
- /// @param: asset_amount: amount of assets to be redeemed
- /// @param: asset_id - asset id in the iAsset_table of LiquidityProvider struct
- /// @notice: returns returns the amount of assets to get withdrawn
- public fun previewWithdraw(_asset_amount: u64, _asset_id: u64): u64 {
- 0
- }
-
- public fun redeem_request(
- _account: &signer,
- _iAsset_amount: u64,
- _asset_id: u64,
- _receiver_address: address
- ) {}
-
- public fun redeem_iAsset(
- _account: &signer,
- _asset_id: u64,
- _receiver_address: address
- ) {}
-
- /// This function is applied to transfer iAssets from a user to another
- public fun transfer_iAsset(
- _iAsset_amount: u64,
- _asset_id: u64,
- _receiver_address: address,
- _owner_address: address
- ) {}
-
- public fun transfer_asset(
- _asset_amount: u64,
- _asset_id: u64,
- _receiver_address: address,
- _owner_address: address
- ) {}
-
- public fun convertToAssets(_shares: u64, _asset_id: u64): u64 {
- 0
- }
-
- /// Adds a new asset to the TotalLiquidityTable within the TotalLiquidity struct, initializing its financial metrics to default values.
- public fun add_new_iAsset(
- _account: &signer,
- _asset_name: String,
- _desirability_score: u64
- ) {}
-}
\ No newline at end of file
diff --git a/aptos-move/framework/supra-framework/sources/poel/poel.move b/aptos-move/framework/supra-framework/sources/poel/poel.move
index 8d60766055cd5..2c0b3060afb18 100644
--- a/aptos-move/framework/supra-framework/sources/poel/poel.move
+++ b/aptos-move/framework/supra-framework/sources/poel/poel.move
@@ -21,288 +21,691 @@
/// them to receive the original ETH on the Ethereum blockchain.
module supra_framework::poel {
- use supra_framework::table;
- use supra_framework::smart_table::SmartTable;
- //Errors:
+ use aptos_std::table;
+ use aptos_std::object::{Self, Object, ExtendRef};
+ use aptos_std::vector;
+ use aptos_std::signer;
+ use aptos_std::smart_table::{Self, SmartTable};
+ use aptos_std::error;
+ use aptos_std::fungible_asset::Metadata;
+ use supra_framework::iAsset;
+ //::{
+ // mint_iAsset, premint_iAsset, update_asset_price_supply,
+ // update_single_asset_supply, get_liquidity_table_items, asset_metadata,
+ // calculate_collaterisation_rate, calculate_total_rentable, get_assets, get_total_liquidity,
+ // get_asset_price, poel_update_olc_index
+ //};
+ use supra_framework::reward_distribution;
+ use supra_framework::pbo_delegation_pool::{unlock, add_stake, withdraw};
+ use supra_framework::coin;
+ use supra_framework::supra_coin::SupraCoin;
+
+ use supra_framework::stake::get_stake;
+ use supra_framework::timestamp;
+
+
+
+ //use supra_oracle::supra_oracle_storage;
+
/// thrown when the allowed signer is not the caller (owner)
- const ERR_NOT_OWNER: u64 = 0;
+ const ENOT_OWNER: u64 = 1;
/// thrown when the wrong asset weight gets calculated
- const ERR_WRONG_WEIGHT: u64 = 1;
-
- /// thrown when the length of the supplied collaterixation weight argument vector does not match table entries
- const ERR_WRONG_CWV_LENGTH: u64 = 2;
-
- /// thrown when the length of the desirability score argument vector does not match table entries
- const ERR_WRONG_DESIRABILITY_SCORE_LEN: u64 = 3;
-
- /// thrown when the asset id supiled is not present in the TotalLiquidityTable
- const ERR_ASSET_NOT_PRESENT: u64 = 4;
-
- /// thrown If coefficient_X < coefficient_b
- const ERR_COEFA_LT_COEFB: u64 = 5;
-
- // Structs:
-
- /// This struct contains contains the field attributes for each asset in the liquidity table
- struct LiquidityTableItems {
- ///Asset_name
- asset_name: vector,
- ///asset_supply: Total amount of the asset that has been bridged to create the iAsset.
- asset_supply: u64,
- ///iAsset_supply: Total supply of iAssets generated through the scheme.
- iAsset_supply: u64,
- ///collaterisation_rate: Specific rate indicating the collateral security of the iAsset.
- collateralisation_rate: u64,
- ///desired_weights: Weights reflecting the asset's strategic importance.
- desired_weight: u64,
- ///desirability_score: Attractiveness score of the asset.
- desirability_score: u64,
- ///asset_price: Current market price of the asset.
- asset_price: u64,
- }
-
- /// This struct aggregates comprehensive liquidity metrics and operational indices for assets managed within the system.
- struct TotalLiquidity {
- //TotalLiquidityTable: Maps each AssetID to a LiquidityTableItems struct
- TotalLiquidityTable: SmartTable,
- //Index of the last observable lockup cycle (OLC), crucial for the minting of preminted tokens and the withdrawal of unlocked tokens.
- current_olc_index: u64,
- //Represents the nominal value of all assets submitted to the system, indicating the total economic stake.
- total_nominal_value: u64
- }
-
- /// This struct is applied for the dynamic adjustment of the system's operational parameters.
- /// It allows for flexible management of financial metrics, adapting to market conditions or strategic shifts in policy.
- struct MutableParameters {
- coefficient_b: u64,
- coefficient_X: u64,
+ const EWRONG_WEIGHT: u64 = 2;
+
+ /// thrown when the length of the collaterixation weight vector does not match table entries
+ const EWRONG_CWV_LENGTH: u64 = 3;
+
+ /// thrown when the length of the desirability_score_vector does not match table entries
+ const EWRONG_DESIRABILITY_SCORE_LEN: u64 = 4;
+
+ /// thrown If coefficient_m < coefficient_k
+ const ECOEFM_LT_COEFK: u64 = 5;
+
+ /// thrown when insificient balance
+ const EINSUFICIENT_CALLER_BALANCE: u64 = 6;
+
+ /// thrown when the reward balance is wrong
+ const EWRONG_REWARD_BALANCE: u64 = 7;
+
+ /// thrown when the caller s not the bridge address
+ const EBRIDGE_NOT_PRESENT: u64 = 8;
+
+ /// seed for the total liquidity object for easy access
+ const POEL_STORAGE_ADDRESS: vector = b"PoELStorageGlobal";
+
+
+ //Is applied for the dynamic adjustment of the system's operational parameters. It allows for flexible management of financial metrics, adapting to market conditions or strategic shifts in policy.
+ #[resource_group_member(group = supra_framework::object::ObjectGroup)]
+ struct MutableParameters has key {
+ coefficient_k: u64,
+ coefficient_m: u64,
coefficient_rho: u64,
- min_collateralisation: u64
+ min_collateralisation: u64,
+ number_of_Epochs_for_extra_Reward_Allocation: u64,
+ length_of_lockup_cycle: u64,
+ max_collateralisation_first: u64,
+ max_collateralisation_second: u64,
+ reward_reduction_rate: u64,
+ reward_distribution_address: u64,
}
- struct StakingPoolMap {
- //Address of the staking pool.
- pool_address: address,
+ struct StakingPoolMap has store{
//The amount of Supra delegated to the validator at this pool.
- delagated_amount: u64,
+ delegated_amount: u64,
//Amount of tokens that are pending deactivation but are currently inactive.
pending_inactive_balance: u64
}
- /// Description: This struct serves as a central repository for tracking delegated assets in various staking pools,
- /// providing essential data for managing staking operations and calculating borrowing limits based on active and
- /// inactive balances within the system.
- struct DelegatedAmount {
- // Maps StakingPoolID to tuple StakingPoolMap
- staking_pool_mapping: table::Table,
- // Cumulative amount of Supra delegated across all staking pools
+ //Description: This struct serves as a central repository for tracking delegated assets in various staking pools, providing essential data for managing staking operations and calculating borrowing limits based on active and inactive balances within the system.
+ #[resource_group_member(group = supra_framework::object::ObjectGroup)]
+ struct DelegatedAmount has key {
+ /// Maps StakingPoolID to tuple StakingPoolMap
+ staking_pool_mapping: SmartTable,
+ /// Cumulative amount of Supra delegated across all staking pools
total_delegated_amount: u64,
- // Total amount of Supra pending deactivation
+ /// Total amount of Supra pending deactivation
pending_inactive_balance: u64,
- // Total amount of Supra that could be borrowed from the PoEL contract
+ /// Total amount of Supra that could be borrowed from the PoEL contract
total_borrowable_amount: u64,
- // Index of the lockup cycle when the PoEL last withdrew Supra tokens
- withdrawal_OLC_index: u64
- }
+ /// Index of the lockup cycle when the PoEL last withdrew Supra tokens
+ withdrawal_OLC_index: u64,
+ withdrawable_rewards: u64,
+ }
- struct AdminManagement {
- // Total amount of Supra tokens requested for withdrawal
+ #[resource_group_member(group = supra_framework::object::ObjectGroup)]
+ struct AdminManagement has key {
+ /// Total amount of Supra tokens requested for withdrawal
withdraw_requested_assets: u64,
- // Index of the last withdrawal request submitted by the admin
- withdraw_OLC_index: u64
+ /// Index of the last withdrawal request submitted by the admin
+ withdraw_OLC_index: u64,
+ /// Records the address of the delegation pool that is being replaced.
+ replaced_delegation_pool: address,
+ /// Records the index of the last pool replacement request submitted by admin
+ change_Delegation_pool_OLC_index: u64,
+ admin_address: address,
+ withdrawal_address: address,
}
-
- /// This struct holds the field items (total_borrow_requests & total_withdraw_requests) mapped to requests
- /// table (AssetId => BorrowWithdrawRequestTableItems) in the BorrowWithdrawRequest
- struct BorrowWithdrawRequestTableItems {
+
+ struct BorrowRequestTableItems has store {
total_borrow_requests: u64,
total_withdraw_requests: u64,
}
-
- /// Maps each AssetID to a tuple containing the total amounts of withdraw requests submitted to the PoEL contract.
- /// Borrow requests are initiated by users to borrow Supra and mint iAssets after depositing their assets in intralayer vaults.
- /// Withdraw requests are made by users aiming to retrieve their assets from intralayer vaults in the subsequent cycle.
- /// Both types of requests are processed in the next cycle.
- struct BorrowWithdrawRequest {
- // Maps each AssetID to a BorrowWithdrawRequestTableItems
- requests: table::Table,
+ #[resource_group_member(group = supra_framework::object::ObjectGroup)]
+ struct BorrowWithdrawRequest has key {
+ /// Maps each AssetID to a BorrowRequestTableItems
+ requests: table::Table