Skip to content

Commit

Permalink
Add gas price factor consensus parameter (#141)
Browse files Browse the repository at this point in the history
The gas price factor will be used to convert between gas units and the
base asset value of the transaction.

This will empower the users to execute cheap/micro transactions without
being punished with high gas overheads.

Related issue: FuelLabs/fuel-specs#342
  • Loading branch information
vlopes11 authored Jun 10, 2022
1 parent ef4b62e commit b3d5374
Show file tree
Hide file tree
Showing 5 changed files with 552 additions and 163 deletions.
4 changes: 2 additions & 2 deletions fuel-tx/src/transaction.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::consts::*;
use crate::ConsensusParameters;

use fuel_asm::Opcode;
use fuel_types::{AssetId, Bytes32, ContractId, Salt, Word};
Expand Down Expand Up @@ -80,8 +81,7 @@ impl Default for Transaction {

Transaction::script(
0,
// use default max gas per tx
consensus_parameters::default_parameters::MAX_GAS_PER_TX,
ConsensusParameters::DEFAULT.max_gas_per_tx,
0,
0,
script,
Expand Down
Loading

0 comments on commit b3d5374

Please sign in to comment.