Skip to content

Update to latest fuel-core and fuel-vm #1670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ env:
CARGO_TERM_COLOR: always
DASEL_VERSION: https://github.com/TomWright/dasel/releases/download/v2.3.6/dasel_linux_amd64
RUSTFLAGS: "-D warnings"
FUEL_CORE_VERSION: 0.43.2
FUEL_CORE_VERSION: 0.44.0
FUEL_CORE_PATCH_BRANCH: ""
FUEL_CORE_PATCH_REVISION: ""
RUST_VERSION: 1.85.0
FORC_VERSION: 0.68.0
FORC_VERSION: 0.68.7
FORC_PATCH_BRANCH: "ironcev/error-codes-in-abi-json"
FORC_PATCH_REVISION: ""
NEXTEST_HIDE_PROGRESS_BAR: "true"
Expand Down
26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,23 @@ testcontainers = { version = "0.23", default-features = false }
k256 = { version = "0.13", default-features = false }

# Dependencies from the `fuel-core` repository:
fuel-core = { version = "0.43.2", default-features = false, features = [
fuel-core = { version = "0.44.0", default-features = false, features = [
"wasm-executor",
] }
fuel-core-chain-config = { version = "0.43.2", default-features = false }
fuel-core-client = { version = "0.43.2", default-features = false }
fuel-core-poa = { version = "0.43.2", default-features = false }
fuel-core-services = { version = "0.43.2", default-features = false }
fuel-core-types = { version = "0.43.2", default-features = false }
fuel-core-chain-config = { version = "0.44.0", default-features = false }
fuel-core-client = { version = "0.44.0", default-features = false }
fuel-core-poa = { version = "0.44.0", default-features = false }
fuel-core-services = { version = "0.44.0", default-features = false }
fuel-core-types = { version = "0.44.0", default-features = false }

# Dependencies from the `fuel-vm` repository:
fuel-asm = { version = "0.60.2" }
fuel-crypto = { version = "0.60.2" }
fuel-merkle = { version = "0.60.2" }
fuel-storage = { version = "0.60.2" }
fuel-tx = { version = "0.60.2" }
fuel-types = { version = "0.60.2" }
fuel-vm = { version = "0.60.2" }
fuel-asm = { version = "0.62.0" }
fuel-crypto = { version = "0.62.0" }
fuel-merkle = { version = "0.62.0" }
fuel-storage = { version = "0.62.0" }
fuel-tx = { version = "0.62.0" }
fuel-types = { version = "0.62.0" }
fuel-vm = { version = "0.62.0" }

# Workspace projects
fuels = { version = "0.73.0", path = "./packages/fuels", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/aws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ mod tests {
// ANCHOR_END: use_kms_wallet

let total_base_balance = wallet.get_asset_balance(&AssetId::zeroed()).await?;
assert_eq!(total_base_balance, amount);
assert_eq!(total_base_balance, amount as u128);
Ok(())
}

Expand Down
21 changes: 11 additions & 10 deletions e2e/tests/contracts.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::time::Duration;

use fuel_tx::SubAssetId;
use fuels::{
accounts::signers::private_key::PrivateKeySigner,
core::codec::{DecoderConfig, EncoderConfig, calldata, encode_fn_selector},
Expand All @@ -10,7 +11,7 @@ use fuels::{
consensus_parameters::{ConsensusParametersV1, FeeParametersV1},
},
types::{
Bits256, Bytes32, Identity, SizedAsciiString, errors::transaction::Reason, input::Input,
Bits256, Identity, SizedAsciiString, errors::transaction::Reason, input::Input,
output::Output,
},
};
Expand Down Expand Up @@ -681,7 +682,7 @@ async fn test_connect_wallet() -> Result<()> {

// confirm that funds have been deducted
let wallet_balance = wallet.get_asset_balance(&Default::default()).await?;
assert!(DEFAULT_COIN_AMOUNT > wallet_balance);
assert!(DEFAULT_COIN_AMOUNT as u128 > wallet_balance);

// pay for call with wallet_2
contract_instance
Expand All @@ -696,7 +697,7 @@ async fn test_connect_wallet() -> Result<()> {
let wallet_balance_second_call = wallet.get_asset_balance(&Default::default()).await?;
let wallet_2_balance = wallet_2.get_asset_balance(&Default::default()).await?;
assert_eq!(wallet_balance_second_call, wallet_balance);
assert!(DEFAULT_COIN_AMOUNT > wallet_2_balance);
assert!(DEFAULT_COIN_AMOUNT as u128 > wallet_2_balance);

Ok(())
}
Expand All @@ -714,7 +715,7 @@ async fn setup_output_variable_estimation_test()
.await?
.contract_id;

let mint_asset_id = contract_id.asset_id(&Bytes32::zeroed());
let mint_asset_id = contract_id.asset_id(&SubAssetId::zeroed());
let addresses = wallets
.iter()
.map(|wallet| wallet.address().into())
Expand Down Expand Up @@ -762,7 +763,7 @@ async fn test_output_variable_estimation() -> Result<()> {

for wallet in wallets.iter() {
let balance = wallet.get_asset_balance(&mint_asset_id).await?;
assert_eq!(balance, amount);
assert_eq!(balance, amount as u128);
}
}

Expand Down Expand Up @@ -812,7 +813,7 @@ async fn test_output_variable_estimation_multicall() -> Result<()> {

for wallet in wallets.iter() {
let balance = wallet.get_asset_balance(&mint_asset_id).await?;
assert_eq!(balance, 3 * amount);
assert_eq!(balance, 3 * amount as u128);
}

Ok(())
Expand Down Expand Up @@ -1133,13 +1134,13 @@ async fn test_add_custom_assets() -> Result<()> {

let balance_asset_1 = wallet_1.get_asset_balance(&asset_id_1).await?;
let balance_asset_2 = wallet_1.get_asset_balance(&asset_id_2).await?;
assert_eq!(balance_asset_1, initial_amount - amount_1);
assert_eq!(balance_asset_2, initial_amount - amount_2);
assert_eq!(balance_asset_1, (initial_amount - amount_1) as u128);
assert_eq!(balance_asset_2, (initial_amount - amount_2) as u128);

let balance_asset_1 = wallet_2.get_asset_balance(&asset_id_1).await?;
let balance_asset_2 = wallet_2.get_asset_balance(&asset_id_2).await?;
assert_eq!(balance_asset_1, initial_amount + amount_1);
assert_eq!(balance_asset_2, initial_amount + amount_2);
assert_eq!(balance_asset_1, (initial_amount + amount_1) as u128);
assert_eq!(balance_asset_2, (initial_amount + amount_2) as u128);

Ok(())
}
Expand Down
5 changes: 3 additions & 2 deletions e2e/tests/logs.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use fuel_tx::SubAssetId;
use fuels::{
core::codec::DecoderConfig,
prelude::*,
tx::ContractIdExt,
types::{AsciiString, Bits256, Bytes32, SizedAsciiString, errors::transaction::Reason},
types::{AsciiString, Bits256, SizedAsciiString, errors::transaction::Reason},
};

#[tokio::test]
Expand Down Expand Up @@ -1526,7 +1527,7 @@ async fn contract_token_ops_error_messages() -> Result<()> {

{
let contract_id = contract_instance.contract_id();
let asset_id = contract_id.asset_id(&Bytes32::zeroed());
let asset_id = contract_id.asset_id(&SubAssetId::zeroed());
let address = wallet.address();

let error = contract_methods
Expand Down
20 changes: 11 additions & 9 deletions e2e/tests/predicates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async fn assert_address_balance(
.get_asset_balance(address, asset_id)
.await
.expect("Could not retrieve balance");
assert_eq!(balance, amount);
assert_eq!(balance, amount as u128);
}

fn get_test_coins_and_messages(
Expand Down Expand Up @@ -246,7 +246,7 @@ async fn pay_with_predicate() -> Result<()> {
predicate
.get_asset_balance(consensus_parameters.base_asset_id())
.await?,
predicate_balance - deploy_fee
(predicate_balance - deploy_fee) as u128
);

let response = contract_methods
Expand All @@ -259,7 +259,7 @@ async fn pay_with_predicate() -> Result<()> {
predicate
.get_asset_balance(consensus_parameters.base_asset_id())
.await?,
predicate_balance - deploy_fee - response.tx_status.total_fee
(predicate_balance - deploy_fee - response.tx_status.total_fee) as u128
);

Ok(())
Expand Down Expand Up @@ -310,7 +310,7 @@ async fn pay_with_predicate_vector_data() -> Result<()> {
predicate
.get_asset_balance(consensus_parameters.base_asset_id())
.await?,
predicate_balance - deploy_fee
(predicate_balance - deploy_fee) as u128
);

let response = contract_methods.initialize_counter(42).call().await?;
Expand All @@ -320,7 +320,7 @@ async fn pay_with_predicate_vector_data() -> Result<()> {
predicate
.get_asset_balance(consensus_parameters.base_asset_id())
.await?,
predicate_balance - deploy_fee - response.tx_status.total_fee
(predicate_balance - deploy_fee - response.tx_status.total_fee) as u128
);

Ok(())
Expand Down Expand Up @@ -568,7 +568,7 @@ async fn contract_tx_and_call_params_with_predicate() -> Result<()> {
let call_fee = call_response.tx_status.total_fee;
assert_eq!(
predicate.get_asset_balance(&AssetId::zeroed()).await?,
predicate_balance - deploy_fee - call_params_amount - call_fee
(predicate_balance - deploy_fee - call_params_amount - call_fee) as u128
);
}
{
Expand Down Expand Up @@ -868,7 +868,7 @@ async fn predicate_transfer_non_base_asset() -> Result<()> {

let wallet_balance = wallet.get_asset_balance(&non_base_asset_id).await?;

assert_eq!(wallet_balance, amount);
assert_eq!(wallet_balance, amount as u128);

Ok(())
}
Expand Down Expand Up @@ -1060,7 +1060,7 @@ async fn predicate_transfers_non_base_asset() -> Result<()> {

assert_eq!(
receiver.get_asset_balance(&other_asset_id).await?,
send_amount,
send_amount as u128,
);

Ok(())
Expand Down Expand Up @@ -1098,7 +1098,9 @@ async fn predicate_with_invalid_data_fails() -> Result<()> {
.unwrap_err()
.to_string();

assert!(error_string.contains("PredicateVerificationFailed(Panic(PredicateReturnedNonOne))"));
assert!(error_string.contains(
"PredicateVerificationFailed(Panic { index: 0, reason: PredicateReturnedNonOne })"
));
assert_eq!(receiver.get_asset_balance(&other_asset_id).await?, 0);

Ok(())
Expand Down
13 changes: 8 additions & 5 deletions e2e/tests/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use std::{ops::Add, path::Path};

use chrono::{DateTime, Duration, TimeZone, Utc};
use fuel_asm::RegId;
use fuel_tx::SubAssetId;
use fuels::{
accounts::{
Account,
Expand All @@ -11,7 +12,6 @@ use fuels::{
prelude::*,
tx::{ContractIdExt, Receipt, Witness},
types::{
Bytes32,
coin_type::CoinType,
message::Message,
transaction_builders::{BuildableTransaction, ScriptTransactionBuilder},
Expand Down Expand Up @@ -195,7 +195,10 @@ async fn test_input_message_pays_fee() -> Result<()> {
let balance = wallet.get_asset_balance(base_asset_id).await?;
let deploy_fee = deploy_response.tx_status.unwrap().total_fee;
let call_fee = call_response.tx_status.total_fee;
assert_eq!(balance, DEFAULT_COIN_AMOUNT - deploy_fee - call_fee);
assert_eq!(
balance,
(DEFAULT_COIN_AMOUNT - deploy_fee - call_fee) as u128
);

Ok(())
}
Expand Down Expand Up @@ -352,7 +355,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 = 243;
let gas_used_by_script = 203;
let gas_limit = 225_883;
let response = contract_instance
.methods()
Expand Down Expand Up @@ -392,7 +395,7 @@ async fn test_amount_and_asset_forwarding() -> Result<()> {
);
let contract_id = contract_instance.contract_id();
let contract_methods = contract_instance.methods();
let asset_id = contract_id.asset_id(&Bytes32::zeroed());
let asset_id = contract_id.asset_id(&SubAssetId::zeroed());

let mut balance_response = contract_methods
.get_balance(contract_id, asset_id)
Expand Down Expand Up @@ -865,7 +868,7 @@ async fn coin_caching() -> Result<()> {
// Verify the transfers were successful
assert_eq!(
wallet_2.get_asset_balance(&AssetId::zeroed()).await?,
num_iterations * amount_to_send
(num_iterations * amount_to_send) as u128
);

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/scripts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async fn test_output_variable_estimation() -> Result<()> {
.await?;

let receiver_balance = receiver.get_asset_balance(&asset_id).await?;
assert_eq!(receiver_balance, amount);
assert_eq!(receiver_balance, amount as u128);

Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/types_predicates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async fn assert_address_balance(
.get_asset_balance(address, asset_id)
.await
.expect("Could not retrieve balance");
assert_eq!(balance, amount);
assert_eq!(balance, amount as u128);
}

fn get_test_coins_and_messages(
Expand Down
25 changes: 14 additions & 11 deletions e2e/tests/wallets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async fn assert_address_balance(
address: &Address,
provider: &Provider,
asset_id: &AssetId,
amount: u64,
amount: u128,
) {
let balance = provider
.get_asset_balance(address, asset_id)
Expand Down Expand Up @@ -37,8 +37,8 @@ async fn test_wallet_balance_api_multi_asset() -> Result<()> {
assert_eq!(balances.len() as u64, number_of_assets);

for asset_id in asset_ids {
let balance = wallet.get_asset_balance(&asset_id).await;
assert_eq!(balance?, coins_per_asset * amount_per_coin);
let balance = wallet.get_asset_balance(&asset_id).await?;
assert_eq!(balance, (coins_per_asset * amount_per_coin) as u128);

let expected_key = asset_id.to_string();
assert!(balances.contains_key(&expected_key));
Expand Down Expand Up @@ -66,8 +66,8 @@ async fn test_wallet_balance_api_single_asset() -> Result<()> {
let wallet = Wallet::new(signer, provider.clone());

for coin in coins {
let balance = wallet.get_asset_balance(&coin.asset_id).await;
assert_eq!(balance?, number_of_coins * amount_per_coin);
let balance = wallet.get_asset_balance(&coin.asset_id).await?;
assert_eq!(balance, (number_of_coins * amount_per_coin) as u128);
}

let balances = wallet.get_balances().await?;
Expand Down Expand Up @@ -179,7 +179,10 @@ async fn adjust_for_fee_with_message_data_input() -> Result<()> {
.await
.unwrap();

assert_eq!(receiver.get_asset_balance(&asset_id).await?, amount_to_send);
assert_eq!(
receiver.get_asset_balance(&asset_id).await?,
amount_to_send as u128
);
}

Ok(())
Expand Down Expand Up @@ -248,7 +251,7 @@ async fn test_transfer() -> Result<()> {
let wallet_2_coins = wallet_2.get_coins(base_asset_id).await.unwrap();
let wallet_2_balance = wallet_2.get_asset_balance(&base_asset_id).await?;
assert_eq!(wallet_2_coins.len(), 2);
assert_eq!(wallet_2_balance, amount + amount / 2);
assert_eq!(wallet_2_balance, (amount + amount / 2) as u128);

Ok(())
}
Expand Down Expand Up @@ -436,7 +439,7 @@ async fn transfer_coins_of_non_base_asset() -> Result<()> {
.await?;

let wallet_1_balance = wallet_1.get_asset_balance(&asset_id).await?;
assert_eq!(wallet_1_balance, AMOUNT - SEND_AMOUNT);
assert_eq!(wallet_1_balance, (AMOUNT - SEND_AMOUNT) as u128);

let wallet_2_final_coins = wallet_2.get_coins(asset_id).await?;
assert_eq!(wallet_2_final_coins.len(), 1);
Expand Down Expand Up @@ -493,7 +496,7 @@ async fn test_transfer_with_multiple_signatures() -> Result<()> {
receiver
.get_asset_balance(consensus_parameters.base_asset_id())
.await?,
amount_to_receive,
amount_to_receive as u128,
);

Ok(())
Expand Down Expand Up @@ -547,12 +550,12 @@ async fn wallet_transfer_respects_maturity_and_expiration() -> Result<()> {
&wallet.address(),
provider,
&asset_id,
wallet_balance - amount_to_send - transaction_fee,
wallet_balance - amount_to_send as u128 - transaction_fee as u128,
)
.await;

// Funds were transferred
assert_address_balance(&receiver, provider, &asset_id, amount_to_send).await;
assert_address_balance(&receiver, provider, &asset_id, amount_to_send as u128).await;

Ok(())
}
Loading
Loading