diff --git a/frameworks/framework-release/released/17/0x1/package.rpd b/frameworks/framework-release/released/17/0x1/package.rpd new file mode 100644 index 0000000000..88adae99ef Binary files /dev/null and b/frameworks/framework-release/released/17/0x1/package.rpd differ diff --git a/frameworks/framework-release/released/17/0x2/package.rpd b/frameworks/framework-release/released/17/0x2/package.rpd new file mode 100644 index 0000000000..e4b09ae8eb Binary files /dev/null and b/frameworks/framework-release/released/17/0x2/package.rpd differ diff --git a/frameworks/framework-release/released/17/0x3/package.rpd b/frameworks/framework-release/released/17/0x3/package.rpd new file mode 100644 index 0000000000..a5799819aa Binary files /dev/null and b/frameworks/framework-release/released/17/0x3/package.rpd differ diff --git a/frameworks/framework-release/released/17/0x4/package.rpd b/frameworks/framework-release/released/17/0x4/package.rpd new file mode 100644 index 0000000000..c295720259 Binary files /dev/null and b/frameworks/framework-release/released/17/0x4/package.rpd differ diff --git a/frameworks/framework-release/released/17/README.md b/frameworks/framework-release/released/17/README.md new file mode 100644 index 0000000000..d231570545 --- /dev/null +++ b/frameworks/framework-release/released/17/README.md @@ -0,0 +1,4 @@ +# Rooch Move Framework v17 + +[rooch_framework] #2988 Init the Babylon cap3 global parameter and auto process Babylon protocol transaction. +[rooch_framework] Add entry function `withdraw_gas_revenue_entry` for `transaction_fee`. \ No newline at end of file diff --git a/frameworks/framework-release/released/17/stdlib b/frameworks/framework-release/released/17/stdlib new file mode 100644 index 0000000000..96d06f1398 Binary files /dev/null and b/frameworks/framework-release/released/17/stdlib differ diff --git a/frameworks/rooch-framework/doc/transaction_fee.md b/frameworks/rooch-framework/doc/transaction_fee.md index 247e53200a..7043292f84 100644 --- a/frameworks/rooch-framework/doc/transaction_fee.md +++ b/frameworks/rooch-framework/doc/transaction_fee.md @@ -24,12 +24,14 @@ Distribution of Transaction Gas Fees: - [Function `deposit_fee`](#0x3_transaction_fee_deposit_fee) - [Function `distribute_fee`](#0x3_transaction_fee_distribute_fee) - [Function `withdraw_gas_revenue`](#0x3_transaction_fee_withdraw_gas_revenue) +- [Function `withdraw_gas_revenue_entry`](#0x3_transaction_fee_withdraw_gas_revenue_entry) - [Function `gas_revenue_balance`](#0x3_transaction_fee_gas_revenue_balance)
use 0x2::core_addresses;
 use 0x2::object;
 use 0x2::signer;
+use 0x3::account_coin_store;
 use 0x3::coin;
 use 0x3::coin_store;
 use 0x3::gas_coin;
@@ -143,7 +145,7 @@ Returns the gas factor of gas.
 
 ## Function `withdraw_gas_revenue`
 
-Withdraw all the gas revenue for the sender
+Withdraw the gas revenue for the sender
 The contract address can use moveos_std::signer::module_signer to get the signer
 
 
@@ -152,6 +154,18 @@ The contract address can use moveos_std::signer::module_signer to g
 
 
 
+
+
+## Function `withdraw_gas_revenue_entry`
+
+The entry function to withdraw the gas revenue for the sender
+
+
+
public entry fun withdraw_gas_revenue_entry(sender: &signer, amount: u256)
+
+ + + ## Function `gas_revenue_balance` diff --git a/frameworks/rooch-framework/sources/transaction_fee.move b/frameworks/rooch-framework/sources/transaction_fee.move index 1edcbfbd08..4bfd9ecc43 100644 --- a/frameworks/rooch-framework/sources/transaction_fee.move +++ b/frameworks/rooch-framework/sources/transaction_fee.move @@ -21,6 +21,7 @@ module rooch_framework::transaction_fee { use rooch_framework::coin_store::{Self, CoinStore}; use rooch_framework::coin::{Self,Coin}; use rooch_framework::gas_coin::{RGas}; + use rooch_framework::account_coin_store; friend rooch_framework::genesis; friend rooch_framework::transaction_validator; @@ -104,7 +105,7 @@ module rooch_framework::transaction_fee { total_paid_gas_coin } - /// Withdraw all the gas revenue for the sender + /// Withdraw the gas revenue for the sender /// The contract address can use `moveos_std::signer::module_signer` to get the signer public fun withdraw_gas_revenue(sender: &signer, amount: u256): Coin { let addr = signer::address_of(sender); @@ -112,6 +113,12 @@ module rooch_framework::transaction_fee { coin_store::withdraw(gas_revenue_store, amount) } + /// The entry function to withdraw the gas revenue for the sender + public entry fun withdraw_gas_revenue_entry(sender: &signer, amount: u256){ + let coin = withdraw_gas_revenue(sender, amount); + account_coin_store::deposit(signer::address_of(sender), coin); + } + /// Get the gas revenue balance for the given address public fun gas_revenue_balance(addr: address): u256 { let fee_pool_id = object::named_object_id();