diff --git a/aptos-move/framework/supra-framework/sources/pbo_delegation_pool.move b/aptos-move/framework/supra-framework/sources/pbo_delegation_pool.move index 0a94b098908d1..02ed43ad49862 100644 --- a/aptos-move/framework/supra-framework/sources/pbo_delegation_pool.move +++ b/aptos-move/framework/supra-framework/sources/pbo_delegation_pool.move @@ -123,7 +123,7 @@ module supra_framework::pbo_delegation_pool { use aptos_std::smart_table::{Self, SmartTable}; use aptos_std::fixed_point64::{Self, FixedPoint64}; - use supra_framework::coin::Coin; + use supra_framework::coin::{Coin, balance}; use supra_framework::account; use supra_framework::supra_account; use supra_framework::supra_coin::SupraCoin; @@ -249,6 +249,9 @@ module supra_framework::pbo_delegation_pool { const ENEW_IS_SAME_AS_OLD_DELEGATOR: u64 = 37; + /// Balance is not enough. + const EBALANCE_NOT_SUFFICIENT: u64 = 38; + const MAX_U64: u64 = 18446744073709551615; /// Maximum operator percentage fee(of double digit precision): 22.85% is represented as 2285 @@ -742,6 +745,41 @@ module supra_framework::pbo_delegation_pool { staking_config::get_recurring_lockup_duration(&config) / 4 } + /// Initialize a delegation pool without actual coin but withdraw from the owner's account. + public fun initialize_delegation_pool_no_coin( + owner: &signer, + multisig_admin: option::Option
, + amount: u64, + operator_commission_percentage: u64, + delegation_pool_creation_seed: vector