From 2f8d6469054d3873814c53231b3ad5a2affba1e8 Mon Sep 17 00:00:00 2001 From: Frederico Date: Tue, 31 Dec 2024 00:08:16 +0100 Subject: [PATCH] variable and fixed gas limit have the same mean --- transaction_fee_models/tx_fees_models.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/transaction_fee_models/tx_fees_models.py b/transaction_fee_models/tx_fees_models.py index 4e99620..b6a124d 100644 --- a/transaction_fee_models/tx_fees_models.py +++ b/transaction_fee_models/tx_fees_models.py @@ -135,7 +135,16 @@ def create_demand( def _create_demand_const_gas(fee_caps:np.ndarray, tip:np.ndarray) -> List[Transaction]: demand: List[Transaction] = [] - gas_used = 21000 + gas_used = np.mean([ # 73_850 gas limit + 21_000 * 0.3, # eth transfer + 45_000 * 0.3, # erc20 transfer + 50_000 * 0.1, # token approval + 200_000 * 0.2, # token swap + 150_000 * 0.03, # NFT (ERC721) minting + 75_000* 0.03, # NFT transfer + 120_000 * 0.03, # NFT (ERC1155) minting + 500_000 * 0.01, # smart contract deployment + ]) for fc, tp in zip(fee_caps, tip): tx = Transaction(