From 70c5beee0afee58afbc8bbbfede5f136750ead22 Mon Sep 17 00:00:00 2001 From: ra0x3 Date: Fri, 26 Jan 2024 13:44:11 -0500 Subject: [PATCH] update tests --- Cargo.lock | 555 +++--------------- examples/greetings/greetings-data/Cargo.toml | 2 +- examples/greetings/greetings-data/src/main.rs | 6 +- packages/fuel-indexer-tests/Cargo.toml | 2 +- packages/fuel-indexer-tests/src/fixtures.rs | 105 ++-- plugins/forc-index/src/defaults.rs | 2 +- 6 files changed, 149 insertions(+), 523 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 58e63e13e..60713d4e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2633,7 +2633,7 @@ dependencies = [ "fuel-indexer-database-types", "fuel-indexer-lib", "fuel-tx 0.43.1", - "fuels 0.53.0", + "fuels", "hex", "humantime", "hyper-rustls 0.23.2", @@ -2793,50 +2793,6 @@ dependencies = [ "strum", ] -[[package]] -name = "fuel-core" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a03c9323a24f2886bd1cbeed09a6d0e3ad663d173d99b2b343eab01a69f6fc14" -dependencies = [ - "anyhow", - "async-graphql 4.0.16", - "async-trait", - "axum 0.5.17", - "clap 4.4.11", - "derive_more", - "enum-iterator 1.4.1", - "fuel-core-chain-config 0.20.8", - "fuel-core-consensus-module 0.20.8", - "fuel-core-database 0.20.8", - "fuel-core-executor 0.20.8", - "fuel-core-importer 0.20.8", - "fuel-core-metrics 0.20.8", - "fuel-core-poa 0.20.8", - "fuel-core-producer 0.20.8", - "fuel-core-services 0.20.8", - "fuel-core-storage 0.20.8", - "fuel-core-txpool 0.20.8", - "fuel-core-types 0.20.8", - "futures", - "hex", - "hyper", - "itertools 0.10.5", - "parking_lot 0.12.1", - "postcard", - "primitive-types", - "rand", - "serde", - "serde_json", - "strum", - "strum_macros 0.24.3", - "thiserror", - "tokio", - "tokio-stream", - "tower-http", - "tracing", -] - [[package]] name = "fuel-core" version = "0.21.0" @@ -2850,18 +2806,18 @@ dependencies = [ "clap 4.4.11", "derive_more", "enum-iterator 1.4.1", - "fuel-core-chain-config 0.21.0", - "fuel-core-consensus-module 0.21.0", - "fuel-core-database 0.21.0", - "fuel-core-executor 0.21.0", - "fuel-core-importer 0.21.0", - "fuel-core-metrics 0.21.0", - "fuel-core-poa 0.21.0", - "fuel-core-producer 0.21.0", - "fuel-core-services 0.21.0", - "fuel-core-storage 0.21.0", - "fuel-core-txpool 0.21.0", - "fuel-core-types 0.21.0", + "fuel-core-chain-config", + "fuel-core-consensus-module", + "fuel-core-database", + "fuel-core-executor", + "fuel-core-importer", + "fuel-core-metrics", + "fuel-core-poa", + "fuel-core-producer", + "fuel-core-services", + "fuel-core-storage", + "fuel-core-txpool", + "fuel-core-types", "futures", "hex", "hyper", @@ -2884,26 +2840,6 @@ dependencies = [ "uuid 1.6.1", ] -[[package]] -name = "fuel-core-chain-config" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86e8f361f44dafc02207c26b0c1929f39525dd1603418aad607dec6ca900053d" -dependencies = [ - "anyhow", - "bech32", - "fuel-core-storage 0.20.8", - "fuel-core-types 0.20.8", - "hex", - "itertools 0.10.5", - "postcard", - "rand", - "serde", - "serde_json", - "serde_with 1.14.0", - "tracing", -] - [[package]] name = "fuel-core-chain-config" version = "0.21.0" @@ -2912,8 +2848,8 @@ checksum = "84319b8e7a3b422b0f38c6ad4abd29f48b923797b7555c3bb53151322779f9bf" dependencies = [ "anyhow", "bech32", - "fuel-core-storage 0.21.0", - "fuel-core-types 0.21.0", + "fuel-core-storage", + "fuel-core-types", "hex", "itertools 0.10.5", "postcard", @@ -2923,29 +2859,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "fuel-core-client" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f39aab47a2b77b830884a9abfdba11d165281ba855f07e109177e56c8a962962" -dependencies = [ - "anyhow", - "cynic", - "derive_more", - "eventsource-client", - "fuel-core-types 0.20.8", - "futures", - "hex", - "hyper-rustls 0.24.2", - "itertools 0.10.5", - "reqwest", - "serde", - "serde_json", - "tai64", - "thiserror", - "tracing", -] - [[package]] name = "fuel-core-client" version = "0.21.0" @@ -2956,7 +2869,7 @@ dependencies = [ "cynic", "derive_more", "eventsource-client", - "fuel-core-types 0.21.0", + "fuel-core-types", "futures", "hex", "hyper-rustls 0.24.2", @@ -2970,19 +2883,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "fuel-core-consensus-module" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1599312ab0cf81aa2ce7be03e21c012f522d67cfddfe04603523ae64a219aac9" -dependencies = [ - "anyhow", - "fuel-core-chain-config 0.20.8", - "fuel-core-poa 0.20.8", - "fuel-core-types 0.20.8", - "tokio", -] - [[package]] name = "fuel-core-consensus-module" version = "0.21.0" @@ -2990,24 +2890,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50fd6d90df194b5970bf16681bfad9f917ff3f837e00c6538a8b95d2e0a6fdf9" dependencies = [ "anyhow", - "fuel-core-chain-config 0.21.0", - "fuel-core-poa 0.21.0", - "fuel-core-types 0.21.0", + "fuel-core-chain-config", + "fuel-core-poa", + "fuel-core-types", "tokio", ] -[[package]] -name = "fuel-core-database" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42469b8398400964639c7b021833080d41264ceb861e990215a9114d60b41439" -dependencies = [ - "anyhow", - "fuel-core-storage 0.20.8", - "fuel-core-types 0.20.8", - "thiserror", -] - [[package]] name = "fuel-core-database" version = "0.21.0" @@ -3016,20 +2904,8 @@ checksum = "fb7b7cd46a2de1df8c71b4541bf19e09870965cb6ac72ee564170f9bcc8df909" dependencies = [ "anyhow", "derive_more", - "fuel-core-storage 0.21.0", - "fuel-core-types 0.21.0", -] - -[[package]] -name = "fuel-core-executor" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "454a5774982e93521f49a8da4c67b8c3d9c1b822b295ca6f88b5db1db2130739" -dependencies = [ - "anyhow", - "fuel-core-chain-config 0.20.8", - "fuel-core-storage 0.20.8", - "fuel-core-types 0.20.8", + "fuel-core-storage", + "fuel-core-types", ] [[package]] @@ -3039,24 +2915,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4a5ed529258ded68048806b150e190ab03dc399bdd5547096525c3419cca188" dependencies = [ "anyhow", - "fuel-core-chain-config 0.21.0", - "fuel-core-storage 0.21.0", - "fuel-core-types 0.21.0", -] - -[[package]] -name = "fuel-core-importer" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77099398f453ca5e8b6b6986ef5302058a42a2b3708876f83106df57786fe175" -dependencies = [ - "anyhow", - "fuel-core-metrics 0.20.8", - "fuel-core-storage 0.20.8", - "fuel-core-types 0.20.8", - "thiserror", - "tokio", - "tracing", + "fuel-core-chain-config", + "fuel-core-storage", + "fuel-core-types", ] [[package]] @@ -3067,28 +2928,13 @@ checksum = "acd700b679be3cda7561f46778aa136ba4af1048570e116d8eb1d3e0f0a316a9" dependencies = [ "anyhow", "derive_more", - "fuel-core-metrics 0.21.0", - "fuel-core-storage 0.21.0", - "fuel-core-types 0.21.0", + "fuel-core-metrics", + "fuel-core-storage", + "fuel-core-types", "tokio", "tracing", ] -[[package]] -name = "fuel-core-metrics" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1098234b4e1db6ba9d7abddd72bb8f3148018991dae3050422bd407f126889" -dependencies = [ - "axum 0.5.17", - "once_cell", - "pin-project-lite", - "prometheus-client 0.18.1", - "prometheus-client 0.20.0", - "regex", - "tracing", -] - [[package]] name = "fuel-core-metrics" version = "0.21.0" @@ -3104,23 +2950,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "fuel-core-poa" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e60448e02f22fe1de577b0056ca43e25caa02762f75c2d1be38559e671e89899" -dependencies = [ - "anyhow", - "async-trait", - "fuel-core-chain-config 0.20.8", - "fuel-core-services 0.20.8", - "fuel-core-storage 0.20.8", - "fuel-core-types 0.20.8", - "tokio", - "tokio-stream", - "tracing", -] - [[package]] name = "fuel-core-poa" version = "0.21.0" @@ -3129,31 +2958,15 @@ checksum = "93ef8dd121e59450d695435af4dea14d60acb41195cdd2dc64d3980aef42fbd9" dependencies = [ "anyhow", "async-trait", - "fuel-core-chain-config 0.21.0", - "fuel-core-services 0.21.0", - "fuel-core-storage 0.21.0", - "fuel-core-types 0.21.0", + "fuel-core-chain-config", + "fuel-core-services", + "fuel-core-storage", + "fuel-core-types", "tokio", "tokio-stream", "tracing", ] -[[package]] -name = "fuel-core-producer" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5495d4af93e4e8586cbc821ecc3fcfc51c028f1fc2259f1f9a3a3968847a9d" -dependencies = [ - "anyhow", - "async-trait", - "fuel-core-storage 0.20.8", - "fuel-core-types 0.20.8", - "thiserror", - "tokio", - "tokio-rayon", - "tracing", -] - [[package]] name = "fuel-core-producer" version = "0.21.0" @@ -3163,28 +2976,13 @@ dependencies = [ "anyhow", "async-trait", "derive_more", - "fuel-core-storage 0.21.0", - "fuel-core-types 0.21.0", + "fuel-core-storage", + "fuel-core-types", "tokio", "tokio-rayon", "tracing", ] -[[package]] -name = "fuel-core-services" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37fed9fd24eb93aef5f4fb4b66a5f47c04501c62a8a95e738aeb61c47f7553a7" -dependencies = [ - "anyhow", - "async-trait", - "fuel-core-metrics 0.20.8", - "futures", - "parking_lot 0.12.1", - "tokio", - "tracing", -] - [[package]] name = "fuel-core-services" version = "0.21.0" @@ -3193,25 +2991,13 @@ checksum = "f2a3a0ed906c332d13802209ab5839d81e464abd14307b75f58550cf0de30430" dependencies = [ "anyhow", "async-trait", - "fuel-core-metrics 0.21.0", + "fuel-core-metrics", "futures", "parking_lot 0.12.1", "tokio", "tracing", ] -[[package]] -name = "fuel-core-storage" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1548a301f2b7f4777242468348d7306030bfae50e7d5a56ac7e6615c4f145b09" -dependencies = [ - "anyhow", - "fuel-core-types 0.20.8", - "fuel-vm 0.35.4", - "thiserror", -] - [[package]] name = "fuel-core-storage" version = "0.21.0" @@ -3220,31 +3006,10 @@ checksum = "33b84df7585c184d79c342833321db43c610d38bccf913acdf526e64fd292ab2" dependencies = [ "anyhow", "derive_more", - "fuel-core-types 0.21.0", + "fuel-core-types", "fuel-vm 0.43.1", ] -[[package]] -name = "fuel-core-txpool" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe6a5d7ff157b2ea8e0b45226ec76f9a6fc8b64c0a45db353c322b9804f6d45" -dependencies = [ - "anyhow", - "async-trait", - "fuel-core-chain-config 0.20.8", - "fuel-core-metrics 0.20.8", - "fuel-core-services 0.20.8", - "fuel-core-storage 0.20.8", - "fuel-core-types 0.20.8", - "futures", - "parking_lot 0.12.1", - "tokio", - "tokio-rayon", - "tokio-stream", - "tracing", -] - [[package]] name = "fuel-core-txpool" version = "0.21.0" @@ -3253,11 +3018,11 @@ checksum = "943dec1ff13cd4fcd3c0f9ae826be09de1520bab5565916ec91cb31429c59f9a" dependencies = [ "anyhow", "async-trait", - "fuel-core-chain-config 0.21.0", - "fuel-core-metrics 0.21.0", - "fuel-core-services 0.21.0", - "fuel-core-storage 0.21.0", - "fuel-core-types 0.21.0", + "fuel-core-chain-config", + "fuel-core-metrics", + "fuel-core-services", + "fuel-core-storage", + "fuel-core-types", "futures", "parking_lot 0.12.1", "tokio", @@ -3266,22 +3031,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "fuel-core-types" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e837844e4f034658ff229517f9eb81aafa62cb316fd3465268ee6f822d1647e2" -dependencies = [ - "anyhow", - "derive_more", - "fuel-vm 0.35.4", - "secrecy", - "serde", - "tai64", - "thiserror", - "zeroize", -] - [[package]] name = "fuel-core-types" version = "0.21.0" @@ -3434,8 +3183,8 @@ dependencies = [ "clap 3.2.25", "cynic", "forc-postgres", - "fuel-core 0.21.0", - "fuel-core-client 0.21.0", + "fuel-core", + "fuel-core-client", "fuel-crypto 0.43.1", "fuel-indexer-api-server", "fuel-indexer-database", @@ -3499,7 +3248,7 @@ dependencies = [ "clap 3.2.25", "criterion", "duct", - "fuel-core-client 0.21.0", + "fuel-core-client", "fuel-indexer", "fuel-indexer-database", "fuel-indexer-graphql", @@ -3605,7 +3354,7 @@ dependencies = [ "fuel-indexer-lib", "fuel-indexer-schema", "fuel-indexer-types", - "fuels 0.53.0", + "fuels", "fuels-code-gen 0.53.0", "lazy_static", "proc-macro-error", @@ -3680,7 +3429,7 @@ name = "fuel-indexer-test" version = "0.0.0" dependencies = [ "fuel-indexer-utils", - "fuels 0.53.0", + "fuels", "getrandom", "serde", ] @@ -3709,7 +3458,7 @@ dependencies = [ "fuel-indexer-utils", "fuel-tx 0.43.1", "fuel-types 0.43.1", - "fuels 0.50.1", + "fuels", "fuels-macros 0.46.0", "futures", "hex", @@ -3744,7 +3493,7 @@ dependencies = [ "fuel-crypto 0.43.1", "fuel-tx 0.43.1", "fuel-types 0.43.1", - "fuels 0.53.0", + "fuels", "serde", "serde_json", "sha2 0.9.9", @@ -3795,7 +3544,7 @@ dependencies = [ "clap 3.2.25", "fuel-indexer-tests", "fuel-types 0.43.1", - "fuels 0.53.0", + "fuels", "tokio", ] @@ -3860,7 +3609,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d467a3b9deae49d7b4272b4a191b0e4b87c6ed9030a846c2d0d2c6394772832" dependencies = [ "hex", - "rand", "serde", ] @@ -3895,7 +3643,6 @@ dependencies = [ "itertools 0.10.5", "paste", "primitive-types", - "rand", "serde", "sha3", "tai64", @@ -3938,65 +3685,24 @@ name = "fuel_explorer" version = "0.0.0" dependencies = [ "fuel-indexer-utils", - "fuels 0.53.0", + "fuels", "serde", ] -[[package]] -name = "fuels" -version = "0.50.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e44490a7d415295059f37a92c6f02f060d13b0293d4dd6c27b2f24d73321a0f" -dependencies = [ - "fuel-core 0.20.8", - "fuel-core-client 0.20.8", - "fuel-tx 0.35.4", - "fuels-accounts 0.50.1", - "fuels-core 0.50.1", - "fuels-macros 0.50.1", - "fuels-programs 0.50.1", - "fuels-test-helpers 0.50.1", -] - [[package]] name = "fuels" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8ad2e6a398d3ea13edd540c29d9e6452bc3e690ab763f5373ba960f17cdae4d" dependencies = [ - "fuel-core-client 0.21.0", + "fuel-core", + "fuel-core-client", "fuel-tx 0.43.1", - "fuels-accounts 0.53.0", - "fuels-core 0.53.0", + "fuels-accounts", + "fuels-core", "fuels-macros 0.53.0", - "fuels-programs 0.53.0", - "fuels-test-helpers 0.53.0", -] - -[[package]] -name = "fuels-accounts" -version = "0.50.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "905e1b22d5c7b6ab01f05285ea61cb7e15cdcce762263db2019c192213b03c53" -dependencies = [ - "async-trait", - "chrono", - "elliptic-curve", - "eth-keystore", - "fuel-core-client 0.20.8", - "fuel-crypto 0.35.4", - "fuel-tx 0.35.4", - "fuel-types 0.35.4", - "fuel-vm 0.35.4", - "fuels-core 0.50.1", - "hex", - "rand", - "semver", - "tai64", - "thiserror", - "tokio", - "tracing", - "zeroize", + "fuels-programs", + "fuels-test-helpers", ] [[package]] @@ -4009,12 +3715,12 @@ dependencies = [ "chrono", "elliptic-curve", "eth-keystore", - "fuel-core-client 0.21.0", + "fuel-core-client", "fuel-crypto 0.43.1", "fuel-tx 0.43.1", "fuel-types 0.43.1", "fuel-vm 0.43.1", - "fuels-core 0.53.0", + "fuels-core", "hex", "rand", "semver", @@ -4041,22 +3747,6 @@ dependencies = [ "syn 2.0.40", ] -[[package]] -name = "fuels-code-gen" -version = "0.50.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ee789e15eaff668fa41efbcd1b6e52daa1ae195c204e1c55b64dcbfc007823" -dependencies = [ - "Inflector", - "fuel-abi-types 0.3.0", - "itertools 0.11.0", - "proc-macro2", - "quote", - "regex", - "serde_json", - "syn 2.0.40", -] - [[package]] name = "fuels-code-gen" version = "0.53.0" @@ -4073,33 +3763,6 @@ dependencies = [ "syn 2.0.40", ] -[[package]] -name = "fuels-core" -version = "0.50.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8528f854c0e914445cefc3e5eefa7a494dd550f28b83ed965b8f9d94b5df8beb" -dependencies = [ - "bech32", - "chrono", - "fuel-abi-types 0.3.0", - "fuel-asm 0.35.4", - "fuel-core-chain-config 0.20.8", - "fuel-core-client 0.20.8", - "fuel-crypto 0.35.4", - "fuel-tx 0.35.4", - "fuel-types 0.35.4", - "fuel-vm 0.35.4", - "fuels-macros 0.50.1", - "hex", - "itertools 0.11.0", - "serde", - "serde_json", - "sha2 0.10.8", - "thiserror", - "uint", - "zeroize", -] - [[package]] name = "fuels-core" version = "0.53.0" @@ -4111,8 +3774,8 @@ dependencies = [ "chrono", "fuel-abi-types 0.3.0", "fuel-asm 0.43.1", - "fuel-core-chain-config 0.21.0", - "fuel-core-client 0.21.0", + "fuel-core-chain-config", + "fuel-core-client", "fuel-crypto 0.43.1", "fuel-tx 0.43.1", "fuel-types 0.43.1", @@ -4146,20 +3809,6 @@ dependencies = [ "syn 2.0.40", ] -[[package]] -name = "fuels-macros" -version = "0.50.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "708b35dbbbc6167f7f9821e3eaad803af1327ca987f1190dc9e87b5c4872c571" -dependencies = [ - "fuels-code-gen 0.50.1", - "itertools 0.11.0", - "proc-macro2", - "quote", - "rand", - "syn 2.0.40", -] - [[package]] name = "fuels-macros" version = "0.53.0" @@ -4174,26 +3823,6 @@ dependencies = [ "syn 2.0.40", ] -[[package]] -name = "fuels-programs" -version = "0.50.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "612d79594053a247146b2fabb8a32a4c32a22e4d8fd9f57671d3ed5c3bfdd952" -dependencies = [ - "async-trait", - "bytes", - "fuel-abi-types 0.3.0", - "fuel-asm 0.35.4", - "fuel-tx 0.35.4", - "fuel-types 0.35.4", - "fuels-accounts 0.50.1", - "fuels-core 0.50.1", - "itertools 0.11.0", - "rand", - "serde_json", - "tokio", -] - [[package]] name = "fuels-programs" version = "0.53.0" @@ -4206,55 +3835,29 @@ dependencies = [ "fuel-asm 0.43.1", "fuel-tx 0.43.1", "fuel-types 0.43.1", - "fuels-accounts 0.53.0", - "fuels-core 0.53.0", + "fuels-accounts", + "fuels-core", "itertools 0.12.0", "rand", "serde_json", "tokio", ] -[[package]] -name = "fuels-test-helpers" -version = "0.50.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff7c621bafd44735cdd5c1b3f73b7e1a153743ffcf035471fe30a63d23ddea2" -dependencies = [ - "fuel-core 0.20.8", - "fuel-core-chain-config 0.20.8", - "fuel-core-client 0.20.8", - "fuel-core-poa 0.20.8", - "fuel-core-services 0.20.8", - "fuel-tx 0.35.4", - "fuel-types 0.35.4", - "fuels-accounts 0.50.1", - "fuels-core 0.50.1", - "futures", - "hex", - "portpicker", - "rand", - "serde", - "serde_json", - "serde_with 3.4.0", - "tempfile", - "tokio", - "which 4.4.2", -] - [[package]] name = "fuels-test-helpers" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5742db9887960bbd58bf0b7cb3b0adaa5e29ce4bd667d1063bbe12491c52852" dependencies = [ - "fuel-core-chain-config 0.21.0", - "fuel-core-client 0.21.0", - "fuel-core-poa 0.21.0", - "fuel-core-services 0.21.0", + "fuel-core", + "fuel-core-chain-config", + "fuel-core-client", + "fuel-core-poa", + "fuel-core-services", "fuel-tx 0.43.1", "fuel-types 0.43.1", - "fuels-accounts 0.53.0", - "fuels-core 0.53.0", + "fuels-accounts", + "fuels-core", "futures", "hex", "portpicker", @@ -4264,7 +3867,7 @@ dependencies = [ "serde_with 3.4.0", "tempfile", "tokio", - "which 5.0.0", + "which", ] [[package]] @@ -4497,7 +4100,7 @@ dependencies = [ "fuel-indexer-tests", "fuel-tx 0.43.1", "fuel-types 0.43.1", - "fuels 0.50.1", + "fuels", "rand", "thiserror", "tokio", @@ -4517,7 +4120,7 @@ name = "greetings_indexer" version = "0.0.0" dependencies = [ "fuel-indexer-utils", - "fuels 0.53.0", + "fuels", "serde", ] @@ -4679,7 +4282,7 @@ name = "hello_world" version = "0.0.0" dependencies = [ "fuel-indexer-utils", - "fuels 0.53.0", + "fuels", "serde", ] @@ -7270,7 +6873,7 @@ version = "0.0.0" dependencies = [ "fuel-indexer-utils", "fuel-tx 0.43.1", - "fuels 0.53.0", + "fuels", "serde", "sha2 0.10.8", ] @@ -8968,18 +8571,6 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.28", -] - [[package]] name = "which" version = "5.0.0" diff --git a/examples/greetings/greetings-data/Cargo.toml b/examples/greetings/greetings-data/Cargo.toml index d489ee5ff..02bafd73d 100644 --- a/examples/greetings/greetings-data/Cargo.toml +++ b/examples/greetings/greetings-data/Cargo.toml @@ -10,7 +10,7 @@ fuel-indexer-lib = { workspace = true } fuel-indexer-tests = { version = "0.0.0", path = "./../../../packages/fuel-indexer-tests" } fuel-tx = { workspace = true } fuel-types = { workspace = true } -fuels = { version = "0.50" } +fuels = { version = "0.53" } rand = "0.8" thiserror = { workspace = true } tokio = { features = ["macros", "rt-multi-thread"], workspace = true } diff --git a/examples/greetings/greetings-data/src/main.rs b/examples/greetings/greetings-data/src/main.rs index 644d05c57..b4ff5e0ad 100644 --- a/examples/greetings/greetings-data/src/main.rs +++ b/examples/greetings/greetings-data/src/main.rs @@ -1,5 +1,5 @@ use clap::Parser; -use fuel_indexer_tests::{defaults, fixtures::tx_params}; +use fuel_indexer_tests::{defaults, fixtures::call_params}; use fuels::accounts::wallet::WalletUnlocked; use fuels::macros::abigen; use fuels::{ @@ -115,7 +115,9 @@ async fn main() -> Result<(), Box> { let _ = contract .methods() .new_greeting(id, greeting, name) - .tx_params(tx_params()) + .call_params(tx_params()) + .unwrap() + .unwrap() .call() .await .unwrap(); diff --git a/packages/fuel-indexer-tests/Cargo.toml b/packages/fuel-indexer-tests/Cargo.toml index 84585abac..b04115e6d 100644 --- a/packages/fuel-indexer-tests/Cargo.toml +++ b/packages/fuel-indexer-tests/Cargo.toml @@ -41,7 +41,7 @@ fuel-indexer-types = { workspace = true } fuel-indexer-utils = { workspace = true } fuel-tx = { workspace = true } fuel-types = { workspace = true } -fuels = { features = ["fuel-core-lib", "std"], version = "0.50" } +fuels = { features = ["fuel-core-lib", "std"], version = "0.53" } fuels-macros = { version = "0.46", default-features = false } futures = "0.3" hex = "0.4" diff --git a/packages/fuel-indexer-tests/src/fixtures.rs b/packages/fuel-indexer-tests/src/fixtures.rs index 686d74861..3f2ca8983 100644 --- a/packages/fuel-indexer-tests/src/fixtures.rs +++ b/packages/fuel-indexer-tests/src/fixtures.rs @@ -18,7 +18,7 @@ use fuels::{ macros::abigen, prelude::{ setup_single_asset_coins, setup_test_provider, AssetId, Bech32ContractId, - Contract, LoadConfiguration, Provider, TxParameters, WalletUnlocked, + Contract, LoadConfiguration, Provider, TxPolicies, WalletUnlocked, DEFAULT_COIN_AMOUNT, }, test_helpers::Config, @@ -267,13 +267,6 @@ impl Drop for TestPostgresDb { } } -pub fn tx_params() -> TxParameters { - let gas_price = 0; - let gas_limit = 1_000_000; - let byte_price = 0; - TxParameters::new(Some(gas_price), Some(gas_limit), byte_price) -} - pub async fn setup_test_fuel_node( wallet_path: PathBuf, contract_bin_path: Option, @@ -315,7 +308,7 @@ pub async fn setup_test_fuel_node( let config = Config { utxo_validation: false, addr, - ..Config::local_node() + ..Config::default() }; let provider = setup_test_provider(coins, vec![], Some(config), None) @@ -331,8 +324,23 @@ pub async fn setup_test_fuel_node( ) .expect("Failed to load contract"); + let gas_price = 0; + let gas_limit = 1_000_000; + let witness_limit = 1_000_000; + let maturity = 0; + let max_fee = 1; + let contract_id = loaded_contract - .deploy(&wallet, TxParameters::default()) + .deploy( + &wallet, + TxPolicies::new( + Some(gas_price), + Some(witness_limit), + Some(maturity), + Some(max_fee), + Some(gas_limit), + ), + ) .await .unwrap(); @@ -462,14 +470,15 @@ pub mod test_web { use fuels::types::bech32::Bech32ContractId; use std::path::Path; - use super::{tx_params, FuelIndexerTest}; + use super::FuelIndexerTest; async fn fuel_indexer_test_blocks(state: web::Data>) -> impl Responder { let _ = state .contract .methods() .trigger_ping() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -482,7 +491,8 @@ pub mod test_web { .contract .methods() .trigger_ping() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -500,7 +510,8 @@ pub mod test_web { .contract .methods() .trigger_transfer() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call_params(call_params) .expect("Could not set call parameters for contract method") .call() @@ -515,7 +526,8 @@ pub mod test_web { .contract .methods() .trigger_log() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -530,7 +542,8 @@ pub mod test_web { .contract .methods() .trigger_logdata() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -545,7 +558,8 @@ pub mod test_web { .contract .methods() .trigger_scriptresult() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -564,7 +578,8 @@ pub mod test_web { .methods() .trigger_transferout() .append_variable_outputs(1) - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call_params(call_params) .expect("Could not set call parameters for contract method") .call() @@ -585,7 +600,8 @@ pub mod test_web { .trigger_messageout() .call_params(call_params) .expect("Could not set call parameters for contract method") - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -600,7 +616,8 @@ pub mod test_web { .contract .methods() .trigger_callreturn() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -615,7 +632,8 @@ pub mod test_web { .contract .methods() .trigger_multiargs() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -630,7 +648,8 @@ pub mod test_web { .contract .methods() .trigger_ping_for_optional() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -645,7 +664,8 @@ pub mod test_web { .contract .methods() .trigger_deeply_nested() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -660,7 +680,8 @@ pub mod test_web { .contract .methods() .trigger_explicit() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -679,7 +700,8 @@ pub mod test_web { .contract .methods() .trigger_tuple() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -693,7 +715,8 @@ pub mod test_web { .contract .methods() .trigger_vec_pong_calldata(vec![1, 2, 3, 4, 5, 6, 7, 8]) - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -705,7 +728,8 @@ pub mod test_web { .contract .methods() .trigger_vec_pong_logdata() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -719,7 +743,8 @@ pub mod test_web { .contract .methods() .trigger_pure_function() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -734,7 +759,8 @@ pub mod test_web { .contract .methods() .trigger_panic() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await; @@ -747,7 +773,8 @@ pub mod test_web { .contract .methods() .trigger_revert() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await; @@ -761,7 +788,8 @@ pub mod test_web { .contract .methods() .trigger_enum_error(69) - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await; @@ -775,7 +803,8 @@ pub mod test_web { .contract .methods() .trigger_enum() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -790,7 +819,8 @@ pub mod test_web { .contract .methods() .trigger_mint() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -807,7 +837,8 @@ pub mod test_web { .contract .methods() .trigger_burn() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call_params(call_params) .unwrap() .call() @@ -824,7 +855,8 @@ pub mod test_web { .contract .methods() .trigger_generics() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); @@ -839,7 +871,8 @@ pub mod test_web { .contract .methods() .trigger_find() - .tx_params(tx_params()) + .call_params(CallParameters::default()) + .unwrap() .call() .await .unwrap(); diff --git a/plugins/forc-index/src/defaults.rs b/plugins/forc-index/src/defaults.rs index 63466bcbb..fa741a5cb 100644 --- a/plugins/forc-index/src/defaults.rs +++ b/plugins/forc-index/src/defaults.rs @@ -29,7 +29,7 @@ crate-type = ['cdylib'] [dependencies] fuel-indexer-utils = {{ version = "0.24" }} -fuels = {{ version = "0.50", default-features = false }} +fuels = {{ version = "0.53", default-features = false }} getrandom = {{ version = "0.2", features = ["js"] }} serde = {{ version = "1.0", default-features = false, features = ["derive"] }} "#