Skip to content

Commit

Permalink
Merge branch 'master' into oleksii/dependent-transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
segfault-magnet authored Feb 12, 2024
2 parents 983ae91 + 9d5051c commit 43d22d3
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
FUEL_CORE_VERSION: 0.22.0
FUEL_CORE_PATCH_BRANCH:
RUST_VERSION: 1.74.0
FORC_VERSION: 0.49.2
FORC_VERSION: 0.50.0
FORC_PATCH_BRANCH: ""
FORC_PATCH_REVISION: ""

Expand Down
4 changes: 2 additions & 2 deletions examples/contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ mod tests {
.await?;
// ANCHOR_END: contract_call_cost_estimation

assert_eq!(transaction_cost.gas_used, 563);
assert_eq!(transaction_cost.gas_used, 841);

Ok(())
}
Expand Down Expand Up @@ -645,7 +645,7 @@ mod tests {
.await?;
// ANCHOR_END: multi_call_cost_estimation

assert_eq!(transaction_cost.gas_used, 785);
assert_eq!(transaction_cost.gas_used, 1251);

Ok(())
}
Expand Down
5 changes: 2 additions & 3 deletions packages/fuels-core/src/codec/abi_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ mod bounded_decoder;
#[cfg(experimental)]
mod experimental_bounded_decoder;

#[cfg(experimental)]
use crate::codec::abi_decoder::experimental_bounded_decoder::ExperimentalBoundedDecoder;
use crate::{
codec::abi_decoder::bounded_decoder::BoundedDecoder,
types::{errors::Result, param_types::ParamType, Token},
};

#[cfg(experimental)]
use crate::codec::abi_decoder::experimental_bounded_decoder::ExperimentalBoundedDecoder;

#[derive(Debug, Clone, Copy)]
pub struct DecoderConfig {
/// Entering a struct, array, tuple, enum or vector increases the depth. Decoding will fail if
Expand Down
5 changes: 2 additions & 3 deletions packages/fuels-core/src/codec/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ use std::{

use fuel_tx::{ContractId, Receipt};

#[cfg(not(experimental))]
use crate::types::param_types::ParamType;
use crate::{
codec::{ABIDecoder, DecoderConfig},
traits::{Parameterize, Tokenizable},
types::errors::{error, Error, Result},
};

#[cfg(not(experimental))]
use crate::types::param_types::ParamType;

#[derive(Clone)]
pub struct LogFormatter {
formatter: fn(DecoderConfig, &[u8]) -> Result<String>,
Expand Down
6 changes: 4 additions & 2 deletions packages/fuels-core/src/types/core/identity.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use crate::types::bech32::{Bech32Address, Bech32ContractId};
use fuel_tx::{Address, ContractId};
use fuels_macros::{Parameterize, Tokenizable, TryFrom};
use serde::{Deserialize, Serialize};

use crate::types::bech32::{Bech32Address, Bech32ContractId};

#[derive(
Debug, Clone, PartialEq, Eq, Hash, Parameterize, Tokenizable, TryFrom, Serialize, Deserialize,
)]
Expand Down Expand Up @@ -74,9 +75,10 @@ impl From<Bech32ContractId> for Identity {

#[cfg(test)]
mod test {
use super::*;
use std::str::FromStr;

use super::*;

#[test]
fn test_bech32() {
let b32_str = "fuel1dved7k25uxadatl7l5kql309jnw07dcn4t3a6x9hm9nxyjcpqqns50p7n2";
Expand Down
3 changes: 0 additions & 3 deletions packages/fuels/Forc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,3 @@ members = [
'tests/types/scripts/script_u256',
'tests/types/scripts/script_vectors',
]

[patch.'https://github.com/fuellabs/sway']
std = { git = "https://github.com/fuellabs/sway", branch = "hal3e/abiencoder-impls" }
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
library;

pub struct VeryCommonNameStruct {
field_a: u32,
pub field_a: u32,
}
4 changes: 2 additions & 2 deletions packages/fuels/tests/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ async fn test_contract_call_fee_estimation() -> Result<()> {
let gas_limit = 800;
let tolerance = 0.2;

let expected_min_gas_price = 0; // This is the default min_gas_price from the ConsensusParameters
let expected_gas_used = 675;
let expected_min_gas_price = 0; // This is the default `min_gas_price` from `ConsensusParameters`
let expected_gas_used = 960;
let expected_metered_bytes_size = 792;
let expected_total_fee = 898;

Expand Down
2 changes: 1 addition & 1 deletion packages/fuels/tests/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ async fn test_gas_forwarded_defaults_to_tx_limit() -> Result<()> {
);

// The gas used by the script to call a contract and forward remaining gas limit.
let gas_used_by_script = 210;
let gas_used_by_script = 398;
let gas_limit = 225_883;
let response = contract_instance
.methods()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
library;

pub struct SomeStruct<T> {
a: T,
pub a: T,
}

pub enum SomeEnum<T> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
library;

pub struct SomeStruct<T> {
a: T,
pub a: T,
}

pub enum SomeEnum<T> {
Expand Down

0 comments on commit 43d22d3

Please sign in to comment.