diff --git a/aptos-move/framework/supra-framework/sources/vesting_without_staking.move b/aptos-move/framework/supra-framework/sources/vesting_without_staking.move index 9c9d2f4132dac..5dc9fa3f9e10d 100644 --- a/aptos-move/framework/supra-framework/sources/vesting_without_staking.move +++ b/aptos-move/framework/supra-framework/sources/vesting_without_staking.move @@ -182,6 +182,18 @@ module supra_framework::vesting_without_staking { borrow_global(vesting_contract_address).vesting_schedule.period_duration } + #[view] + // Return the `withdrawal_address` of the contract + public fun get_withdrawal_addr(vesting_contract_addr: address): address acquires VestingContract { + borrow_global(vesting_contract_addr).withdrawal_address + } + + #[view] + // Return the `admin` address of the contract + public fun get_contract_admin(vesting_contract_addr: address): address acquires VestingContract { + borrow_global(vesting_contract_addr).admin + } + #[view] //Return the vesting record of the shareholder as a tuple `(init_amount, left_amount, last_vested_period)` public fun get_vesting_record( @@ -2331,6 +2343,8 @@ module supra_framework::vesting_without_staking { let vested_amount = 0; // Because the time is behind the start time, vest will do nothing. vest(contract_address); + assert!(get_withdrawal_addr(contract_address)==withdrawal_address,98); + assert!(get_contract_admin(contract_address)==admin_address,99); assert!(coin::balance(contract_address) == 1000, 0); assert!(coin::balance(shareholder_address) == vested_amount, 0); // Time is now at the start time, vest will unlock the first period, which is 2/10.