@@ -141,13 +141,20 @@ module aptos_framework::governed_gas_pool {
141
141
/// Deposits gas fees into the governed gas pool.
142
142
/// @param gas_payer The address of the account that paid the gas fees.
143
143
/// @param gas_fee The amount of gas fees to be deposited.
144
- public (friend ) fun deposit_gas_fee (gas_payer: address , gas_fee: u64 ) acquires GovernedGasPool {
145
- if (features::operations_default_to_fa_apt_store_enabled ()) {
144
+ public fun deposit_gas_fee (gas_payer: address , gas_fee: u64 ) acquires GovernedGasPool {
145
+ // get the sender to preserve the signature but do nothing
146
+ governed_gas_pool_address ();
147
+ }
148
+
149
+ /// Deposits gas fees into the governed gas pool.
150
+ /// @param gas_payer The address of the account that paid the gas fees.
151
+ /// @param gas_fee The amount of gas fees to be deposited.
152
+ public (friend ) fun deposit_gas_fee_v2 (gas_payer: address , gas_fee: u64 ) acquires GovernedGasPool {
153
+ if (features::operations_default_to_fa_apt_store_enabled ()) {
146
154
deposit_from_fungible_store (gas_payer, gas_fee);
147
155
} else {
148
156
deposit_from <AptosCoin >(gas_payer, gas_fee);
149
157
};
150
-
151
158
}
152
159
153
160
#[view]
@@ -280,7 +287,7 @@ module aptos_framework::governed_gas_pool {
280
287
let governed_gas_pool_balance = coin::balance <AptosCoin >(governed_gas_pool_address ());
281
288
282
289
// deposit some coin into the governed gas pool as gas fees
283
- deposit_gas_fee (signer ::address_of (depositor), 100 );
290
+ deposit_gas_fee_v2 (signer ::address_of (depositor), 100 );
284
291
285
292
// check the balances after the deposit
286
293
assert !(coin::balance <AptosCoin >(signer ::address_of (depositor)) == depositor_balance - 100 , 1 );
@@ -323,7 +330,7 @@ module aptos_framework::governed_gas_pool {
323
330
let governed_gas_pool_balance = coin::balance <AptosCoin >(governed_gas_pool_address ());
324
331
325
332
// collect gas fees from the depositor
326
- deposit_gas_fee (signer ::address_of (depositor), 100 );
333
+ deposit_gas_fee_v2 (signer ::address_of (depositor), 100 );
327
334
328
335
// check the balances after the deposit
329
336
assert !(coin::balance <AptosCoin >(signer ::address_of (depositor)) == depositor_balance - 100 , 1 );
0 commit comments