text
stringlengths
19
585k
label
stringclasses
2 values
category
stringclasses
2 values
language
stringclasses
14 values
repo
stringclasses
932 values
sha
stringlengths
40
40
@@ -74,6 +74,11 @@ _start: csrs mstatus, t0 fscsr x0 #endif +#ifdef __riscv_vector + // Enable VPU + li t0, (1 << 9) + csrs mstatus, t0
bad
review
FreeRTOS/FreeRTOS
4694a84ce1541975c57a441799dca68d10f53b26
diff --git a/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/start.S b/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/start.S index 61deae8d9f8..e415f1ef236 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/start.S +++ b/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/start.S @@ -74,6 +74,11 @@ _sta...
good
review_fixed
FreeRTOS/FreeRTOS
4694a84ce1541975c57a441799dca68d10f53b26
@@ -108,7 +108,11 @@ * constant is different depending on the compiler in use. */ #define mainMESSAGE_BUFFER_STACK_SIZE ( configMINIMAL_STACK_SIZE + ( configMINIMAL_STACK_SIZE >> 1 ) ) #define mainCHECK_TASK_STACK_SIZE ( configMINIMAL_STACK_SIZE + ( configMINIMAL_STACK_SIZE >> 1 ) ) +#ifdef __riscv_vector...
bad
review
c
FreeRTOS/FreeRTOS
4694a84ce1541975c57a441799dca68d10f53b26
diff --git a/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/main_full.c b/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/main_full.c index f66506328e9..90bdbb25e7b 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/main_full.c +++ b/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/main_full.c @@ -108,7 +108,11 @@ * constant is different ...
good
review_fixed
c
FreeRTOS/FreeRTOS
4694a84ce1541975c57a441799dca68d10f53b26
@@ -133,6 +133,44 @@ vRegTest1Implementation: li x15, 0x402C000000000000 // 14 fmv.d.x f30, x15 #endif +#if configENABLE_VPU == 1 + /* Set the vector length to maximum available */ + li x15, -1 + vsetvli x0, x15, e8, m1, ta, ma /* Use 64-bit elements, mask and tail agnostic */ + /* Initialize ea...
bad
review
FreeRTOS/FreeRTOS
4694a84ce1541975c57a441799dca68d10f53b26
diff --git a/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/RegTest.S b/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/RegTest.S index a740163b07c..5c22ca5afab 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/RegTest.S +++ b/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/RegTest.S @@ -69,7 +69,7 ...
good
review_fixed
FreeRTOS/FreeRTOS
4694a84ce1541975c57a441799dca68d10f53b26
@@ -319,6 +357,228 @@ reg1_loop: feq.d x15, f30, f31 beqz x15, reg1_error_loop #endif +#if configENABLE_VPU == 1 + /* Set the vector length to maximum available */
bad
review
FreeRTOS/FreeRTOS
4694a84ce1541975c57a441799dca68d10f53b26
diff --git a/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/RegTest.S b/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/RegTest.S index a740163b07c..5c22ca5afab 100644 --- a/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/RegTest.S +++ b/FreeRTOS/Demo/RISC-V_RV32_QEMU_VIRT_GCC/build/gcc/RegTest.S @@ -69,7 +69,7 ...
good
review_fixed
FreeRTOS/FreeRTOS
4694a84ce1541975c57a441799dca68d10f53b26
@@ -94,14 +94,14 @@ testcontainers = { version = "0.23", default-features = false } k256 = { version = "0.13", default-features = false } # Dependencies from the `fuel-core` repository: -fuel-core = { version = "0.47.1", default-features = false, features = [ +fuel-core = { git = "https://github.com/FuelLabs/fuel-c...
bad
review
FuelLabs/fuels-rs
7c7c74d5d1548a06e602cd21e3dbc1fa66aaf54d
diff --git a/Cargo.toml b/Cargo.toml index e3d4081a5..bafdc4e8c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,6 @@ fuel-abi-types = "0.15.3" futures = "0.3.29" hex = { version = "0.4.3", default-features = false } itertools = "0.12.0" -portpicker = "0.1.1" pretty_assertions = { version = "1.4", default-feat...
good
review_fixed
FuelLabs/fuels-rs
7c7c74d5d1548a06e602cd21e3dbc1fa66aaf54d
@@ -528,6 +528,35 @@ where self.get_response(tx_status) } + /// Call contract methods on the node, in a simulated manner, meaning the state of the + /// blockchain is *not* modified but simulated. + /// Returns a Vec of values where all calls must return the same type `T`. + pub async fn sim...
bad
review
rust
FuelLabs/fuels-rs
7c7c74d5d1548a06e602cd21e3dbc1fa66aaf54d
diff --git a/packages/fuels-programs/src/calls/call_handler.rs b/packages/fuels-programs/src/calls/call_handler.rs index 96f696587..109b79f75 100644 --- a/packages/fuels-programs/src/calls/call_handler.rs +++ b/packages/fuels-programs/src/calls/call_handler.rs @@ -528,6 +528,34 @@ where self.get_response(tx_st...
good
review_fixed
rust
FuelLabs/fuels-rs
7c7c74d5d1548a06e602cd21e3dbc1fa66aaf54d
@@ -100,7 +100,7 @@ impl RetryableClient { } pub(crate) fn url(&self) -> &str { - &self.url + &self.client.get_default_url().as_str()
bad
review
rust
FuelLabs/fuels-rs
7c7c74d5d1548a06e602cd21e3dbc1fa66aaf54d
diff --git a/packages/fuels-accounts/src/provider/retryable_client.rs b/packages/fuels-accounts/src/provider/retryable_client.rs index 55531b6fe..5a58d96a3 100644 --- a/packages/fuels-accounts/src/provider/retryable_client.rs +++ b/packages/fuels-accounts/src/provider/retryable_client.rs @@ -43,7 +43,6 @@ impl From<Req...
good
review_fixed
rust
FuelLabs/fuels-rs
7c7c74d5d1548a06e602cd21e3dbc1fa66aaf54d
@@ -528,6 +528,35 @@ where self.get_response(tx_status) } + /// Call contract methods on the node, in a simulated manner, meaning the state of the + /// blockchain is *not* modified but simulated. + /// Returns a Vec of values where all calls must return the same type `T`.
bad
review
rust
FuelLabs/fuels-rs
7c7c74d5d1548a06e602cd21e3dbc1fa66aaf54d
diff --git a/packages/fuels-programs/src/calls/call_handler.rs b/packages/fuels-programs/src/calls/call_handler.rs index 96f696587..109b79f75 100644 --- a/packages/fuels-programs/src/calls/call_handler.rs +++ b/packages/fuels-programs/src/calls/call_handler.rs @@ -528,6 +528,34 @@ where self.get_response(tx_st...
good
review_fixed
rust
FuelLabs/fuels-rs
7c7c74d5d1548a06e602cd21e3dbc1fa66aaf54d
@@ -562,6 +591,32 @@ where }) } + /// Create a [`CallResponse`] from `TxStatus` returning a Vec of values. + /// All calls must return the same type `T`.
bad
review
rust
FuelLabs/fuels-rs
7c7c74d5d1548a06e602cd21e3dbc1fa66aaf54d
diff --git a/packages/fuels-programs/src/calls/call_handler.rs b/packages/fuels-programs/src/calls/call_handler.rs index 96f696587..109b79f75 100644 --- a/packages/fuels-programs/src/calls/call_handler.rs +++ b/packages/fuels-programs/src/calls/call_handler.rs @@ -528,6 +528,34 @@ where self.get_response(tx_st...
good
review_fixed
rust
FuelLabs/fuels-rs
7c7c74d5d1548a06e602cd21e3dbc1fa66aaf54d
@@ -223,21 +204,71 @@ async fn run_node(extended_config: ExtendedConfig) -> FuelResult<JoinHandle<()>> ); } - let mut command = Command::new(path); - let running_node = command.args(args).kill_on_drop(true).env_clear().output(); + let mut child = Command::new(path) + .args(args) + ...
bad
review
rust
FuelLabs/fuels-rs
7c7c74d5d1548a06e602cd21e3dbc1fa66aaf54d
diff --git a/packages/fuels-test-helpers/src/fuel_bin_service.rs b/packages/fuels-test-helpers/src/fuel_bin_service.rs index cb6f1b109..8e9c5767b 100644 --- a/packages/fuels-test-helpers/src/fuel_bin_service.rs +++ b/packages/fuels-test-helpers/src/fuel_bin_service.rs @@ -1,17 +1,18 @@ -use std::{ - net::{IpAddr, So...
good
review_fixed
rust
FuelLabs/fuels-rs
7c7c74d5d1548a06e602cd21e3dbc1fa66aaf54d
@@ -206,16 +202,15 @@ jobs: components: clippy,rustfmt targets: wasm32-unknown-unknown - # selecting a toolchain either by action or manual `rustup` calls should happen - # before the cache plugin, as it uses the current rustc version as its cache key - - uses: buildjet/cache@...
bad
review
FuelLabs/fuels-rs
0291ec39e7f520ffe0b36bf022a5f04266d258ac
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b106edcc3..c5bae3995e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ env: CARGO_TERM_COLOR: always DASEL_VERSION: https://github.com/TomWright/dasel/releases/download/v2.3.6/dasel_linux_amd64 RUSTFLA...
good
review_fixed
FuelLabs/fuels-rs
0291ec39e7f520ffe0b36bf022a5f04266d258ac
@@ -120,4 +120,4 @@ members = [ ] [patch.'https://github.com/fuellabs/sway'] -std = { git = "https://github.com/fuellabs/sway", branch = "ironcev/error-codes-in-abi-json" } +std = { git = "https://github.com/fuellabs/sway" }
bad
review
FuelLabs/fuels-rs
8d312f99613fdcbc02bd5129d713f5da62c461ff
diff --git a/e2e/Forc.toml b/e2e/Forc.toml index 78548928f..a2e708056 100644 --- a/e2e/Forc.toml +++ b/e2e/Forc.toml @@ -120,4 +120,4 @@ members = [ ] [patch.'https://github.com/fuellabs/sway'] -std = { git = "https://github.com/fuellabs/sway", branch = "ironcev/error-codes-in-abi-json" } +std = { git = "https://gi...
good
review_fixed
FuelLabs/fuels-rs
8d312f99613fdcbc02bd5129d713f5da62c461ff
@@ -52,6 +52,12 @@ impl Configurables { } } +impl From<Configurables> for Vec<(u64, Vec<u8>)> {
bad
review
rust
FuelLabs/fuels-rs
182334eb4ab880f61b742640b61c6be0b991fb53
diff --git a/packages/fuels-core/src/lib.rs b/packages/fuels-core/src/lib.rs index 1723a91702..13d3414e46 100644 --- a/packages/fuels-core/src/lib.rs +++ b/packages/fuels-core/src/lib.rs @@ -7,13 +7,21 @@ pub use utils::*; use crate::types::errors::Result; +#[derive(Debug, Clone, Default, PartialEq)] +pub struct C...
good
review_fixed
rust
FuelLabs/fuels-rs
182334eb4ab880f61b742640b61c6be0b991fb53
@@ -2730,12 +2730,11 @@ async fn multicall_tx_input_output() -> Result<()> { )); let contract_binary = "sway/contracts/tx_input_output/out/release/tx_input_output.bin"; - let get_contract_instance = |owner: &Bech32Address| { + let get_contract_instance = |owner: Address| { let wallet_for_fees...
bad
review
rust
FuelLabs/fuels-rs
485dd73654bdf2eaf2a80f77ff66ae0e60830073
diff --git a/e2e/tests/contracts.rs b/e2e/tests/contracts.rs index 0a38d02516..e2129f1929 100644 --- a/e2e/tests/contracts.rs +++ b/e2e/tests/contracts.rs @@ -1,16 +1,18 @@ use std::time::Duration; -use fuel_tx::{ - ConsensusParameters, FeeParameters, Output, - consensus_parameters::{ConsensusParametersV1, Fee...
good
review_fixed
rust
FuelLabs/fuels-rs
485dd73654bdf2eaf2a80f77ff66ae0e60830073
@@ -120,8 +121,8 @@ mod tests { .await?; // ANCHOR_END: contract_call_cost_estimation - let expected_script_gas = 2498; - let expected_total_gas = 8750; + let expected_script_gas = 2488; + let expected_total_gas = 8740;
bad
review
rust
FuelLabs/fuels-rs
485dd73654bdf2eaf2a80f77ff66ae0e60830073
diff --git a/examples/contracts/src/lib.rs b/examples/contracts/src/lib.rs index 47211c9e65..7cc655fef0 100644 --- a/examples/contracts/src/lib.rs +++ b/examples/contracts/src/lib.rs @@ -8,8 +8,9 @@ mod tests { prelude::{LoadConfiguration, NodeConfig, StorageConfiguration}, programs::debug::ScriptType...
good
review_fixed
rust
FuelLabs/fuels-rs
485dd73654bdf2eaf2a80f77ff66ae0e60830073
@@ -0,0 +1,96 @@ +script;
bad
review
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
diff --git a/e2e/sway/logs/script_revert_logs/src/main.sw b/e2e/sway/logs/script_revert_logs/src/main.sw new file mode 100644 index 0000000000..5d38afcf6e --- /dev/null +++ b/e2e/sway/logs/script_revert_logs/src/main.sw @@ -0,0 +1,96 @@ +script; + +use std::logging::log; + +#[allow(dead_code)] +enum EnumWithGeneric<D> ...
good
review_fixed
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
@@ -425,22 +421,23 @@ async fn test_multi_call_contract_with_contract_logs() -> Result<()> { } fn assert_revert_containing_msg(msg: &str, error: Error) { - assert!(matches!(error, Error::Transaction(Reason::Failure { .. }))); - if let Error::Transaction(Reason::Failure { reason, .. }) = error { - asser...
bad
review
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
diff --git a/e2e/tests/logs.rs b/e2e/tests/logs.rs index 1dd729db87..aceba07ed9 100644 --- a/e2e/tests/logs.rs +++ b/e2e/tests/logs.rs @@ -5,7 +5,7 @@ use fuels::{ }; #[tokio::test] -async fn test_parse_logged_variables() -> Result<()> { +async fn parse_logged_variables() -> Result<()> { setup_program_test!( ...
good
review_fixed
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
@@ -28,6 +28,9 @@ pub(crate) fn contract_bindings( let log_formatters = log_formatters_instantiation_code(quote! {contract_id.clone().into()}, &abi.logged_types); + let error_codes = generate_id_error_codes_pairs(abi.error_codes); + let error_codes = quote! {vec![#(#error_codes),*].into_iter().col...
bad
review
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
diff --git a/packages/fuels-code-gen/src/program_bindings/abigen/bindings/contract.rs b/packages/fuels-code-gen/src/program_bindings/abigen/bindings/contract.rs index 37f5e0d6b4..17ecabd997 100644 --- a/packages/fuels-code-gen/src/program_bindings/abigen/bindings/contract.rs +++ b/packages/fuels-code-gen/src/program_bi...
good
review_fixed
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
@@ -53,6 +99,38 @@ impl Debug for LogFormatter { } } +#[derive(Clone)] +pub struct ErrorFormatter {
bad
review
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
diff --git a/packages/fuels-core/src/codec/logs.rs b/packages/fuels-core/src/codec/logs.rs index c8c533f07a..274a45a184 100644 --- a/packages/fuels-core/src/codec/logs.rs +++ b/packages/fuels-core/src/codec/logs.rs @@ -5,6 +5,36 @@ use std::{ iter::FilterMap, }; +#[derive(Debug, Clone)] +pub struct ErrorDetails...
good
review_fixed
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
@@ -62,6 +140,8 @@ pub struct LogId(ContractId, String); pub struct LogDecoder { /// A mapping of LogId and param-type log_formatters: HashMap<LogId, LogFormatter>, + //TODO: add error_formatters
bad
review
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
diff --git a/packages/fuels-core/src/codec/logs.rs b/packages/fuels-core/src/codec/logs.rs index c8c533f07a..274a45a184 100644 --- a/packages/fuels-core/src/codec/logs.rs +++ b/packages/fuels-core/src/codec/logs.rs @@ -5,6 +5,36 @@ use std::{ iter::FilterMap, }; +#[derive(Debug, Clone)] +pub struct ErrorDetails...
good
review_fixed
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
@@ -184,6 +272,8 @@ impl LogDecoder { pub fn merge(&mut self, log_decoder: LogDecoder) { self.log_formatters.extend(log_decoder.log_formatters); + self.error_codes.extend(log_decoder.error_codes); + //TODO: extend later with error_formatters
bad
review
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
diff --git a/packages/fuels-core/src/codec/logs.rs b/packages/fuels-core/src/codec/logs.rs index c8c533f07a..274a45a184 100644 --- a/packages/fuels-core/src/codec/logs.rs +++ b/packages/fuels-core/src/codec/logs.rs @@ -5,6 +5,36 @@ use std::{ iter::FilterMap, }; +#[derive(Debug, Clone)] +pub struct ErrorDetails...
good
review_fixed
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
@@ -118,6 +118,35 @@ impl TxStatus { revert_id: Option<u64>, log_decoder: Option<&LogDecoder>, ) -> Error { + if let (Some(revert_id), Some(log_decoder)) = (revert_id, log_decoder) { + if let Some(ref mut error_detail) = log_decoder.get_error_codes(&revert_id) {
bad
review
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
diff --git a/packages/fuels-core/src/types/tx_status.rs b/packages/fuels-core/src/types/tx_status.rs index f8db6fe0df..7f3b7caafc 100644 --- a/packages/fuels-core/src/types/tx_status.rs +++ b/packages/fuels-core/src/types/tx_status.rs @@ -118,6 +118,35 @@ impl TxStatus { revert_id: Option<u64>, log_de...
good
review_fixed
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
@@ -21,7 +21,7 @@ env: FUEL_CORE_PATCH_REVISION: "" RUST_VERSION: 1.85.0 FORC_VERSION: 0.68.0 - FORC_PATCH_BRANCH: "" + FORC_PATCH_BRANCH: "ironcev/error-codes-in-abi-json"
bad
review
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 729d1057fe..e871ab05af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ env: FUEL_CORE_PATCH_REVISION: "" RUST_VERSION: 1.85.0 FORC_VERSION: 0.68.0 - FORC_PATCH_BRANCH: "" + FORC_PATCH_BRANCH: "ironce...
good
review_fixed
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
@@ -118,3 +118,6 @@ members = [ 'sway/types/scripts/script_u256', 'sway/types/scripts/script_vectors', ] + +[patch.'https://github.com/fuellabs/sway'] +std = { git = "https://github.com/fuellabs/sway", branch = "ironcev/error-codes-in-abi-json" }
bad
review
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
diff --git a/e2e/Forc.toml b/e2e/Forc.toml index 357aad5f8c..78548928f9 100644 --- a/e2e/Forc.toml +++ b/e2e/Forc.toml @@ -24,7 +24,6 @@ members = [ 'sway/contracts/needs_custom_decoder', 'sway/contracts/payable_annotation', 'sway/contracts/proxy', - 'sway/contracts/revert_logs', 'sway/contracts/revert_tra...
good
review_fixed
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
@@ -51,3 +66,34 @@ fn generate_log_id_log_formatter_pairs(resolved_logs: &[ResolvedLog]) -> Vec<Tok }) .collect() } + +pub(crate) fn generate_id_error_codes_pairs( + error_codes: impl IntoIterator<Item = (u64, fuel_abi_types::abi::program::ErrorDetails)>, +) -> Vec<TokenStream> {
bad
review
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
diff --git a/packages/fuels-code-gen/src/program_bindings/abigen/logs.rs b/packages/fuels-code-gen/src/program_bindings/abigen/logs.rs index 744134b789..f2cd54b803 100644 --- a/packages/fuels-code-gen/src/program_bindings/abigen/logs.rs +++ b/packages/fuels-code-gen/src/program_bindings/abigen/logs.rs @@ -28,26 +28,68 ...
good
review_fixed
rust
FuelLabs/fuels-rs
5ef0025e6e14a982ae93d8bd36ba1adf1219ff4e
@@ -1011,6 +1012,90 @@ async fn test_build_with_provider() -> Result<()> { Ok(()) } +#[tokio::test] +async fn send_transaction_and_await_status() -> Result<()> { + let wallet = launch_provider_and_get_wallet().await?; + let provider = wallet.provider(); + + let consensus_parameters = provider.consensus...
bad
review
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
diff --git a/e2e/tests/providers.rs b/e2e/tests/providers.rs index 7cd66bc87a..d47f12c2de 100644 --- a/e2e/tests/providers.rs +++ b/e2e/tests/providers.rs @@ -19,6 +19,7 @@ use fuels::{ tx_status::{Success, TxStatus}, }, }; +use futures::StreamExt; use rand::thread_rng; #[tokio::test] @@ -1011,6 +101...
good
review_fixed
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
@@ -1011,6 +1012,90 @@ async fn test_build_with_provider() -> Result<()> { Ok(()) } +#[tokio::test] +async fn send_transaction_and_await_status() -> Result<()> { + let wallet = launch_provider_and_get_wallet().await?; + let provider = wallet.provider(); + + let consensus_parameters = provider.consensus...
bad
review
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
diff --git a/e2e/tests/providers.rs b/e2e/tests/providers.rs index 7cd66bc87a..d47f12c2de 100644 --- a/e2e/tests/providers.rs +++ b/e2e/tests/providers.rs @@ -19,6 +19,7 @@ use fuels::{ tx_status::{Success, TxStatus}, }, }; +use futures::StreamExt; use rand::thread_rng; #[tokio::test] @@ -1011,6 +101...
good
review_fixed
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
@@ -1011,6 +1012,90 @@ async fn test_build_with_provider() -> Result<()> { Ok(()) } +#[tokio::test] +async fn send_transaction_and_await_status() -> Result<()> { + let wallet = launch_provider_and_get_wallet().await?; + let provider = wallet.provider(); + + let consensus_parameters = provider.consensus...
bad
review
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
diff --git a/e2e/tests/providers.rs b/e2e/tests/providers.rs index 7cd66bc87a..d47f12c2de 100644 --- a/e2e/tests/providers.rs +++ b/e2e/tests/providers.rs @@ -19,6 +19,7 @@ use fuels::{ tx_status::{Success, TxStatus}, }, }; +use futures::StreamExt; use rand::thread_rng; #[tokio::test] @@ -1011,6 +101...
good
review_fixed
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
@@ -200,13 +203,73 @@ impl Provider { ) { self.coins_cache .lock() - .await + .map_err(|_| Error::Other("Failed to acquire lock on coins cache".to_string()))? .remove_items(tx.used_coins(&base_asset_id)) } Ok(tx_st...
bad
review
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
diff --git a/packages/fuels-accounts/src/provider.rs b/packages/fuels-accounts/src/provider.rs index 84bcf875a0..0d40ba5960 100644 --- a/packages/fuels-accounts/src/provider.rs +++ b/packages/fuels-accounts/src/provider.rs @@ -45,6 +45,7 @@ use fuels_core::{ tx_status::TxStatus, }, }; +use futures::Strea...
good
review_fixed
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
@@ -146,6 +147,30 @@ impl RetryableClient { self.wrap(|| self.client.submit_and_await_commit(tx)).await } + pub async fn submit_and_await_status<'a>( + &'a self, + tx: &'a Transaction, + include_preconfirmation: bool, + ) -> RequestResult<impl Stream<Item = io::Result<Transact...
bad
review
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
diff --git a/packages/fuels-accounts/src/provider/retryable_client.rs b/packages/fuels-accounts/src/provider/retryable_client.rs index 0ea568e884..056108bec0 100644 --- a/packages/fuels-accounts/src/provider/retryable_client.rs +++ b/packages/fuels-accounts/src/provider/retryable_client.rs @@ -18,6 +18,7 @@ use fuel_co...
good
review_fixed
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
@@ -170,6 +170,13 @@ impl TxStatus { _ => vec![], } } + + pub fn is_final(&self) -> bool { + matches!( + self, + TxStatus::Success(_) | TxStatus::Failure(_) | TxStatus::SqueezedOut(_) + ) + }
bad
review
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
diff --git a/packages/fuels-core/src/types/tx_status.rs b/packages/fuels-core/src/types/tx_status.rs index ee9e9037c7..f8db6fe0df 100644 --- a/packages/fuels-core/src/types/tx_status.rs +++ b/packages/fuels-core/src/types/tx_status.rs @@ -170,6 +170,13 @@ impl TxStatus { _ => vec![], } } + + ...
good
review_fixed
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
@@ -200,13 +203,73 @@ impl Provider { ) { self.coins_cache .lock() - .await + .map_err(|_| Error::Other("Failed to acquire lock on coins cache".to_string()))? .remove_items(tx.used_coins(&base_asset_id)) } Ok(tx_st...
bad
review
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
diff --git a/packages/fuels-accounts/src/provider.rs b/packages/fuels-accounts/src/provider.rs index 84bcf875a0..0d40ba5960 100644 --- a/packages/fuels-accounts/src/provider.rs +++ b/packages/fuels-accounts/src/provider.rs @@ -45,6 +45,7 @@ use fuels_core::{ tx_status::TxStatus, }, }; +use futures::Strea...
good
review_fixed
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
@@ -301,7 +366,10 @@ impl Provider { self.check_inputs_already_in_cache(&used_utxos).await?; let tx_id = self.uncached_client().submit(&tx.into()).await?; - self.coins_cache.lock().await.insert_multiple(used_utxos); + self.coins_cache + .lock()
bad
review
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
diff --git a/packages/fuels-accounts/src/provider.rs b/packages/fuels-accounts/src/provider.rs index 84bcf875a0..0d40ba5960 100644 --- a/packages/fuels-accounts/src/provider.rs +++ b/packages/fuels-accounts/src/provider.rs @@ -45,6 +45,7 @@ use fuels_core::{ tx_status::TxStatus, }, }; +use futures::Strea...
good
review_fixed
rust
FuelLabs/fuels-rs
24ceeb0d64fbec61e76fe8aa95a3e6404bad6e20
@@ -1 +1 @@ -* @digorithm @hal3e @MujkicA @segfault-magnet @Salka1988 @Br1ght0ne +* @hal3e @segfault-magnet @xgreenx @Dentosal @MitchTurner @netrome @AurelienFT @rymnc
bad
review
FuelLabs/fuels-rs
23c593e08c91a6f47ff9d274756318e7d5e4306a
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ccbfa9d788..27aa96e8d0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,1 +1,1 @@ -* @digorithm @hal3e @MujkicA @segfault-magnet @Salka1988 @Br1ght0ne +* @FuelLabs/client
good
review_fixed
FuelLabs/fuels-rs
23c593e08c91a6f47ff9d274756318e7d5e4306a
@@ -1270,77 +1268,75 @@ async fn low_level_call() -> Result<()> { random_salt = false, ), ); + {
bad
review
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
diff --git a/e2e/tests/contracts.rs b/e2e/tests/contracts.rs index 9e20d26605..3450ddcf26 100644 --- a/e2e/tests/contracts.rs +++ b/e2e/tests/contracts.rs @@ -10,7 +10,7 @@ use fuels::{ prelude::*, programs::DEFAULT_MAX_FEE_ESTIMATION_TOLERANCE, tx::ContractParameters, - types::{Bits256, Identity, err...
good
review_fixed
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
@@ -1993,27 +1999,77 @@ async fn simulations_can_be_made_without_coins() -> Result<()> { .contract_id; let provider = wallet.provider().clone(); - let no_funds_wallet = Wallet::random(&mut thread_rng(), provider.clone()); + let no_funds_wallet = Wallet::random(&mut thread_rng(), provider); let ...
bad
review
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
diff --git a/e2e/tests/contracts.rs b/e2e/tests/contracts.rs index 9e20d26605..3450ddcf26 100644 --- a/e2e/tests/contracts.rs +++ b/e2e/tests/contracts.rs @@ -10,7 +10,7 @@ use fuels::{ prelude::*, programs::DEFAULT_MAX_FEE_ESTIMATION_TOLERANCE, tx::ContractParameters, - types::{Bits256, Identity, err...
good
review_fixed
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
@@ -366,15 +366,17 @@ impl Provider { pub async fn dry_run_opt( &self, tx: impl Transaction, - utxo_validation: bool, + utxo_validation: Option<bool>,
bad
review
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
diff --git a/packages/fuels-accounts/src/provider.rs b/packages/fuels-accounts/src/provider.rs index 8646c6cb79..84bcf875a0 100644 --- a/packages/fuels-accounts/src/provider.rs +++ b/packages/fuels-accounts/src/provider.rs @@ -72,7 +72,7 @@ pub(crate) struct ResourceQueries { utxos: Vec<UtxoId>, messages: Vec...
good
review_fixed
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
@@ -177,20 +205,32 @@ impl From<ClientTransactionStatus> for TxStatus { total_fee, .. } => { - let revert_id = program_state - .and_then(|state| match state { - ProgramState::Revert(revert_id) => Some(revert_id), - ...
bad
review
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
diff --git a/packages/fuels-core/src/types/tx_status.rs b/packages/fuels-core/src/types/tx_status.rs index d2389e3072..ee9e9037c7 100644 --- a/packages/fuels-core/src/types/tx_status.rs +++ b/packages/fuels-core/src/types/tx_status.rs @@ -28,10 +28,10 @@ pub struct SqueezedOut { } #[derive(Debug, Clone)] -pub struc...
good
review_fixed
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
@@ -7,16 +7,45 @@ pub mod utils; pub use call_handler::*; pub use contract_call::*; +use fuel_types::BlockHeight; pub use script_call::*; /// Used to control simulations/dry-runs #[derive(Debug, Clone, Default)]
bad
review
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
diff --git a/packages/fuels-programs/src/calls.rs b/packages/fuels-programs/src/calls.rs index 88fe631e2e..538c7c28ec 100644 --- a/packages/fuels-programs/src/calls.rs +++ b/packages/fuels-programs/src/calls.rs @@ -7,16 +7,50 @@ pub mod utils; pub use call_handler::*; pub use contract_call::*; +use fuel_types::Bloc...
good
review_fixed
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
@@ -102,10 +103,14 @@ impl FuelService { max_queries_resolver_recursive_depth: 1, max_queries_directives: 10, max_concurrent_queries: 1024, + required_fuel_block_height_tolerance: 10,
bad
review
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
diff --git a/packages/fuels-test-helpers/src/service.rs b/packages/fuels-test-helpers/src/service.rs index 45c0fbf375..df6b5ac093 100644 --- a/packages/fuels-test-helpers/src/service.rs +++ b/packages/fuels-test-helpers/src/service.rs @@ -69,7 +69,7 @@ impl FuelService { use fuel_core::state::rocks_db::{Column...
good
review_fixed
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
@@ -1961,15 +1961,27 @@ async fn setup_node_with_high_price(historical_execution: bool) -> Result<Vec<Wa ..NodeConfig::default() }; + let mut chain_config = ChainConfig { + consensus_parameters, + ..ChainConfig::default() + }; + if historical_execution { - node_config.dat...
bad
review
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
diff --git a/e2e/tests/contracts.rs b/e2e/tests/contracts.rs index 9e20d26605..3450ddcf26 100644 --- a/e2e/tests/contracts.rs +++ b/e2e/tests/contracts.rs @@ -10,7 +10,7 @@ use fuels::{ prelude::*, programs::DEFAULT_MAX_FEE_ESTIMATION_TOLERANCE, tx::ContractParameters, - types::{Bits256, Identity, err...
good
review_fixed
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
@@ -1959,17 +1948,33 @@ async fn setup_node_with_high_price() -> Result<Vec<Wallet>> { fee_params: fee_parameters, ..Default::default() }); - let node_config = Some(NodeConfig { + + let mut node_config = NodeConfig { starting_gas_price: 1100, ..NodeConfig::default() - }...
bad
review
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
diff --git a/e2e/tests/contracts.rs b/e2e/tests/contracts.rs index 9e20d26605..3450ddcf26 100644 --- a/e2e/tests/contracts.rs +++ b/e2e/tests/contracts.rs @@ -10,7 +10,7 @@ use fuels::{ prelude::*, programs::DEFAULT_MAX_FEE_ESTIMATION_TOLERANCE, tx::ContractParameters, - types::{Bits256, Identity, err...
good
review_fixed
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
@@ -181,9 +180,9 @@ mod tests { // we don't transfer the full base asset so we can cover fees let output = if id == *consensus_parameters.base_asset_id() { - wallet_1.get_asset_outputs_for_amount(wallet_2.address(), id, amount / 2) + wallet_1.get_asset_outputs_f...
bad
review
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
diff --git a/examples/cookbook/src/lib.rs b/examples/cookbook/src/lib.rs index ff1fc56948..91296b479c 100644 --- a/examples/cookbook/src/lib.rs +++ b/examples/cookbook/src/lib.rs @@ -172,7 +172,6 @@ mod tests { let mut outputs = vec![]; for (id_string, amount) in balances { let id = Asset...
good
review_fixed
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
@@ -382,11 +409,25 @@ mod tests { // you don't need any funds to read state let balance = contract_methods .get_balance(contract_id, AssetId::zeroed()) - .simulate(Execution::StateReadOnly) + .simulate(Execution::state_read_only()) ...
bad
review
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
diff --git a/examples/contracts/src/lib.rs b/examples/contracts/src/lib.rs index c6b9a33b45..ead9b87546 100644 --- a/examples/contracts/src/lib.rs +++ b/examples/contracts/src/lib.rs @@ -349,6 +349,7 @@ mod tests { #[tokio::test] #[allow(unused_variables)] + #[cfg(any(not(feature = "fuel-core-lib"), feat...
good
review_fixed
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
@@ -65,50 +72,61 @@ impl TxStatus { Self::SqueezedOut(SqueezedOut { reason }) => { Err(Error::Transaction(Reason::SqueezedOut(reason.clone()))) } - Self::Revert(Revert { + Self::Failure(Failure { + receipts, + reason, + ...
bad
review
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
diff --git a/packages/fuels-core/src/types/tx_status.rs b/packages/fuels-core/src/types/tx_status.rs index d2389e3072..ee9e9037c7 100644 --- a/packages/fuels-core/src/types/tx_status.rs +++ b/packages/fuels-core/src/types/tx_status.rs @@ -28,10 +28,10 @@ pub struct SqueezedOut { } #[derive(Debug, Clone)] -pub struc...
good
review_fixed
rust
FuelLabs/fuels-rs
599c8b6e143e79627815170ea42e6d79a59b1ecf
@@ -51,4 +52,4 @@ std = [ "dep:cynic", ] test-helpers = [] -kms-signer = ["dep:aws-sdk-kms", "dep:aws-config"] +kms-signer = ["dep:aws-sdk-kms", "dep:aws-config", "dep:google-cloud-kms"]
bad
review
FuelLabs/fuels-rs
b792aef0d8eafebd88f31b041abeb92aba01bab6
diff --git a/packages/fuels-accounts/Cargo.toml b/packages/fuels-accounts/Cargo.toml index 9948e36dfd..e082268c4b 100644 --- a/packages/fuels-accounts/Cargo.toml +++ b/packages/fuels-accounts/Cargo.toml @@ -9,6 +9,9 @@ repository = { workspace = true } rust-version = { workspace = true } description = "Fuel Rust SDK ...
good
review_fixed
FuelLabs/fuels-rs
b792aef0d8eafebd88f31b041abeb92aba01bab6
@@ -51,4 +55,5 @@ std = [ "dep:cynic", ] test-helpers = [] -kms-signer = ["dep:aws-sdk-kms", "dep:aws-config"] +accounts-aws-kms-signer = ["dep:aws-sdk-kms", "dep:aws-config"] +accounts-google-kms-signer = ["dep:google-cloud-kms"]
bad
review
FuelLabs/fuels-rs
b792aef0d8eafebd88f31b041abeb92aba01bab6
diff --git a/packages/fuels-accounts/Cargo.toml b/packages/fuels-accounts/Cargo.toml index 9948e36dfd..e082268c4b 100644 --- a/packages/fuels-accounts/Cargo.toml +++ b/packages/fuels-accounts/Cargo.toml @@ -9,6 +9,9 @@ repository = { workspace = true } rust-version = { workspace = true } description = "Fuel Rust SDK ...
good
review_fixed
FuelLabs/fuels-rs
b792aef0d8eafebd88f31b041abeb92aba01bab6
@@ -41,4 +41,5 @@ std = [ ] fuel-core-lib = ["fuels-test-helpers?/fuel-core-lib"] rocksdb = ["fuels-test-helpers?/rocksdb"] -kms-signer = ["fuels-accounts/kms-signer"] +fuels-aws-kms-signer = ["fuels-accounts/accounts-aws-kms-signer"]
bad
review
FuelLabs/fuels-rs
b792aef0d8eafebd88f31b041abeb92aba01bab6
diff --git a/packages/fuels/Cargo.toml b/packages/fuels/Cargo.toml index 6c84c28442..4304844a5d 100644 --- a/packages/fuels/Cargo.toml +++ b/packages/fuels/Cargo.toml @@ -41,4 +41,5 @@ std = [ ] fuel-core-lib = ["fuels-test-helpers?/fuel-core-lib"] rocksdb = ["fuels-test-helpers?/rocksdb"] -kms-signer = ["fuels-acco...
good
review_fixed
FuelLabs/fuels-rs
b792aef0d8eafebd88f31b041abeb92aba01bab6
@@ -278,6 +278,8 @@ jobs: - name: Check for typos if: ${{ matrix.command == 'check_typos' }} uses: crate-ci/typos@v1.20.3
bad
review
FuelLabs/fuels-rs
a8c86ccbeff56a4a41cac703311ab6fb3baadf4f
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17e9512769..9b813ca61d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -277,7 +277,7 @@ jobs: - name: Check for typos if: ${{ matrix.command == 'check_typos' }} - uses: crate-ci/typos@v1.20.3 + ...
good
review_fixed
FuelLabs/fuels-rs
a8c86ccbeff56a4a41cac703311ab6fb3baadf4f
@@ -89,6 +89,11 @@ dotenv = { version = "0.15", default-features = false } toml = { version = "0.8", default-features = false } mockall = { version = "0.13", default-features = false } +aws-config = { version = "1.5.5", default-features = false } +aws-sdk-kms = { version = "1.36", default-features = false } +testco...
bad
review
FuelLabs/fuels-rs
a8c86ccbeff56a4a41cac703311ab6fb3baadf4f
diff --git a/Cargo.toml b/Cargo.toml index 8b7167616b..c5d5a2d359 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -88,6 +88,10 @@ octocrab = { version = "0.43", default-features = false } dotenv = { version = "0.15", default-features = false } toml = { version = "0.8", default-features = false } mockall = { version = "0...
good
review_fixed
FuelLabs/fuels-rs
a8c86ccbeff56a4a41cac703311ab6fb3baadf4f