Skip to content
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

upgrade sdk-harness test to use fuels-rs v0.61 #5995

Merged
merged 1 commit into from
May 13, 2024
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
36 changes: 21 additions & 15 deletions test/src/sdk-harness/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions test/src/sdk-harness/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ fuel-core-client = { version = "0.26.0", default-features = false }
fuel-vm = { version = "0.49.0", features = ["random"] }

# Dependencies from the `fuels-rs` repository:
# Need to point to master until encoding v1 is default everywhere
fuels = { git = "https://github.com/FuelLabs/fuels-rs", tag = "v0.60.0", features = [
"fuel-core-lib",
] }
fuels = { version = "0.61.0", features = ["fuel-core-lib"] }

hex = "0.4.3"
paste = "1.0.14"
Expand Down
4 changes: 2 additions & 2 deletions test/src/sdk-harness/test_projects/low_level_call/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ use fuels::{
macro_rules! fn_selector {
( $fn_name: ident ( $($fn_arg: ty),* ) ) => {
encode_fn_selector(stringify!($fn_name)).to_vec()
}
};
}
macro_rules! calldata {
( $($arg: expr),* ) => {
ABIEncoder::new(EncoderConfig::default()).encode(&[$(::fuels::core::traits::Tokenizable::into_token($arg)),*]).unwrap().resolve(0)
ABIEncoder::new(EncoderConfig::default()).encode(&[$(::fuels::core::traits::Tokenizable::into_token($arg)),*]).unwrap()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ use fuels::{
accounts::wallet::{Wallet, WalletUnlocked},
core::codec::{ABIEncoder, EncoderConfig},
prelude::*,
types::{
input::Input, transaction_builders::ScriptTransactionBuilder,
unresolved_bytes::UnresolvedBytes, Token,
},
types::{input::Input, transaction_builders::ScriptTransactionBuilder, Token},
};
use std::str::FromStr;

Expand Down Expand Up @@ -63,7 +60,7 @@ async fn submit_to_predicate(
amount_to_predicate: u64,
asset_id: AssetId,
receiver_address: Address,
predicate_data: UnresolvedBytes,
predicate_data: Vec<u8>,
) -> Result<()> {
let filter = ResourceFilter {
from: predicate_address.into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ use fuels::{
accounts::wallet::{Wallet, WalletUnlocked},
core::codec::{ABIEncoder, EncoderConfig},
prelude::*,
types::{
input::Input, transaction_builders::ScriptTransactionBuilder,
unresolved_bytes::UnresolvedBytes, Token,
},
types::{input::Input, transaction_builders::ScriptTransactionBuilder, Token},
};
use std::str::FromStr;

Expand Down Expand Up @@ -61,7 +58,7 @@ async fn submit_to_predicate(
amount_to_predicate: u64,
asset_id: AssetId,
receiver_address: Address,
predicate_data: UnresolvedBytes,
predicate_data: Vec<u8>,
) {
let filter = ResourceFilter {
from: predicate_address.into(),
Expand Down Expand Up @@ -114,7 +111,7 @@ struct Validation {
total_complete: u64,
}

fn encode_struct(predicate_struct: Validation) -> UnresolvedBytes {
fn encode_struct(predicate_struct: Validation) -> Vec<u8> {
let has_account = Token::Bool(predicate_struct.has_account);
let total_complete = Token::U64(predicate_struct.total_complete);
let token_struct: Vec<Token> = vec![has_account, total_complete];
Expand Down
2 changes: 1 addition & 1 deletion test/src/sdk-harness/test_projects/tx_fields/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async fn generate_predicate_inputs(
.unwrap()
.with_provider(provider.clone());

let predicate_code = predicate.code().clone();
let predicate_code = predicate.code().to_vec();

let predicate_root = predicate.address();

Expand Down
Loading