From 45c8a902ec7cdb7d5405fda8c2d0882b19dec14c Mon Sep 17 00:00:00 2001 From: Mad <46090742+DefiCake@users.noreply.github.com> Date: Fri, 17 May 2024 13:45:38 +0200 Subject: [PATCH] Bump forc to 0.56, rust sdk to 0.60, adapt predicate to new encoding (#180) This PR updates dependencies with the current target of testnet NOTICE: due to the enforced requirement to use the new v1 encoding, the predicate has been substantially modified, as the calldata that gets passed to the sway bridge now follows a different pattern. During this process and according to different audits that have signalled that ETH values on the payload could get potentially stuck on the sway bridge, I have decided to go beyond and completely remove any fund forwarding of the predicate to the bridge. If it is going to get stuck anyway, we may as well simplify its logic so that the funds do stay at the predicate, not at the bridge. This issue has been cataloged as informational / low risk because in order to happen, the solidity contracts need to be flawed themselves. --------- Co-authored-by: K1-R1 <77465250+K1-R1@users.noreply.github.com> --- .changeset/olive-tigers-hunt.md | 8 + Cargo.lock | 166 ++++++---- Cargo.toml | 8 +- Forc.lock | 22 +- fuel-toolchain.toml | 2 +- packages/esbuild-bin-loader/package.json | 2 +- .../bridge-fungible-token/Cargo.toml | 2 +- .../bridge-fungible-token/Forc.toml | 2 +- .../bridge-fungible-token/src/main.sw | 11 +- .../tests/functions/bridge/mod.rs | 23 +- .../tests/functions/message_receiver/mod.rs | 37 +-- packages/integration-tests/package.json | 2 +- packages/message-predicates/Forc.lock | 4 +- .../contract-message-predicate/Cargo.toml | 4 +- .../contract-message-predicate/script_asm.rs | 65 ++-- ...e__tests__snapshot_predicate_bytecode.snap | 2 +- ...cate__tests__snapshot_script_bytecode.snap | 2 +- .../tests/harness.rs | 33 +- .../tests/utils/builder.rs | 2 +- .../contracts/lib/CommonPredicates.sol | 2 +- .../solidity-contracts/protocol/constants.ts | 2 +- .../test/erc721Gateway.test.ts | 4 +- packages/test-utils/package.json | 2 +- packages/test-utils/src/utils/constants.ts | 9 +- .../fuels/getOrDeployFuelTokenContract.ts | 6 +- .../src/utils/fuels/relayCommonMessage.ts | 7 +- pnpm-lock.yaml | 311 +++++++++--------- 27 files changed, 368 insertions(+), 372 deletions(-) create mode 100644 .changeset/olive-tigers-hunt.md diff --git a/.changeset/olive-tigers-hunt.md b/.changeset/olive-tigers-hunt.md new file mode 100644 index 00000000..bba38b7d --- /dev/null +++ b/.changeset/olive-tigers-hunt.md @@ -0,0 +1,8 @@ +--- +'@fuel-bridge/message-predicates': minor +'@fuel-bridge/solidity-contracts': minor +'@fuel-bridge/fungible-token': minor +'@fuel-bridge/test-utils': minor +--- + +Bump all packages to adhere to fuel-core 0.26, forc 0.56, fuel-rs 0.60, fuel-ts 0.85 diff --git a/Cargo.lock b/Cargo.lock index e53d7213..a302b7dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -955,6 +955,7 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", + "unicode-width", "windows-sys 0.45.0", ] @@ -2161,9 +2162,9 @@ dependencies = [ [[package]] name = "fuel-asm" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20bc683784e35f3421aab3dc5a31a94c8ad80f1e9ec614ddddac930b4081cd92" +checksum = "42df651415e443094f86102473b7f9fa23633ab6c3c98dd3f713adde251acf0f" dependencies = [ "bitflags 2.4.0", "fuel-types", @@ -2187,9 +2188,9 @@ dependencies = [ [[package]] name = "fuel-core" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16acbaac42aceb26c704ed078314e7e7f9d1e20d6eaf147cada559e7e9f967ae" +checksum = "6b030e12851d70598e12722886b899e28884d168367fc20d9a809951dd599004" dependencies = [ "anyhow", "async-graphql", @@ -2215,6 +2216,7 @@ dependencies = [ "futures", "hex", "hyper", + "indicatif", "itertools 0.12.0", "rand", "serde", @@ -2223,7 +2225,6 @@ dependencies = [ "strum_macros 0.25.3", "thiserror", "tokio", - "tokio-rayon", "tokio-stream", "tokio-util", "tower-http", @@ -2233,12 +2234,13 @@ dependencies = [ [[package]] name = "fuel-core-chain-config" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23929afd8e279a463941ed18c8a23d9e29df4c3587ba19ad56c68f24c14484f5" +checksum = "d202fe1dfeb98882bdc5a0206a58e469d76fd09d952c4050bb979102bd690398" dependencies = [ "anyhow", "bech32 0.9.1", + "derivative", "fuel-core-storage", "fuel-core-types", "itertools 0.12.0", @@ -2252,9 +2254,9 @@ dependencies = [ [[package]] name = "fuel-core-client" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67d4a6c96cd1827d04361f8b76416273168efc9eb0951293b03bc18e52d409b6" +checksum = "bc636a8706e36c713606ee4226fdef5260e3650ba0e8a57f0fc06258d0078a34" dependencies = [ "anyhow", "cynic", @@ -2276,9 +2278,9 @@ dependencies = [ [[package]] name = "fuel-core-consensus-module" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1d8ec2205453a563f9ac620867febb711c4ec7a930f063899f8c8673921417" +checksum = "0f99179c08972efffe7628f0ff8d59028218b126347a6f9eba86f71e20966eeb" dependencies = [ "anyhow", "fuel-core-chain-config", @@ -2289,9 +2291,9 @@ dependencies = [ [[package]] name = "fuel-core-database" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a87cc2351d5a3205d4a6673904bb3b876203540595e1746a1f466d5900b3c3e" +checksum = "f5b1fd08a72609ebf0c8106359a37a4b205055be15e9f4fc30a4c0b5f0644c6b" dependencies = [ "anyhow", "derive_more", @@ -2301,12 +2303,11 @@ dependencies = [ [[package]] name = "fuel-core-executor" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e159969d168d4b7cbaa9a55efb842604f0abe116d1baa0b0486c73f2261f63a" +checksum = "1f98d89798007bc781d56e02681144683f5c645ee0725e7717e38694e8e5e31d" dependencies = [ "anyhow", - "fuel-core-chain-config", "fuel-core-storage", "fuel-core-types", "hex", @@ -2317,13 +2318,12 @@ dependencies = [ [[package]] name = "fuel-core-importer" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b858caa4d262891964f55c09f86d6f93d368f7d9a073e5828e02616db88e014" +checksum = "f51837a53f2d8b78a701aee61b99c7f1873f23e864f01f4b4d0644a06e1f7c41" dependencies = [ "anyhow", "derive_more", - "fuel-core-chain-config", "fuel-core-metrics", "fuel-core-storage", "fuel-core-types", @@ -2334,9 +2334,9 @@ dependencies = [ [[package]] name = "fuel-core-metrics" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003381d1f9f5def3685171b340c4bb56d3681897f3baa616aaf6cf7085013462" +checksum = "bacc62bc4fec2fe6a818a1a7145b892bd486d69266190ca8dd31a036a3a327b7" dependencies = [ "axum", "once_cell", @@ -2348,9 +2348,9 @@ dependencies = [ [[package]] name = "fuel-core-p2p" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c513afe591125230e3fd9f6cdf1add00a2aba3f11a19e9e77e020ec14b863b6e" +checksum = "d6496068f0f5736f9e51bba8f8bb04cb83f68df2f6142e410fe62854b47621b3" dependencies = [ "anyhow", "async-trait", @@ -2380,9 +2380,9 @@ dependencies = [ [[package]] name = "fuel-core-poa" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8608758b49855f33c3e6a78917dada96265233096aae04628d6c1ff9fe6d3dca" +checksum = "68d189ecd635688ddc896b44c8497b29c04bb4a3719a24eea0ca9691a6f76d5e" dependencies = [ "anyhow", "async-trait", @@ -2397,9 +2397,9 @@ dependencies = [ [[package]] name = "fuel-core-producer" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c662d29fafeeb686057f3ba1f2cd349e3c437c32d59ae4f6c61400cee26f27e7" +checksum = "4d2901a7ba2c0e724bbb88a3111fdb9844f5faf9f0bd4005944f61f093730b4d" dependencies = [ "anyhow", "async-trait", @@ -2413,9 +2413,9 @@ dependencies = [ [[package]] name = "fuel-core-services" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca69ccc3a055e0a645c7e76e0623feec6945d4cf95b4131a3a1bf1ffc076d1bb" +checksum = "cf2ab4d3931b8cafdb2e69fe8ca97918a168d74c73c070481ca0e552cc37bb93" dependencies = [ "anyhow", "async-trait", @@ -2428,9 +2428,9 @@ dependencies = [ [[package]] name = "fuel-core-storage" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb47f4fabcec096b78137c782895a52aeed134f931256656511b10083cbd967" +checksum = "e039c1c6ebef314c74c34728e1f2199dcf9ede041d6f5c6e11479517c8f4d320" dependencies = [ "anyhow", "derive_more", @@ -2452,18 +2452,18 @@ dependencies = [ [[package]] name = "fuel-core-txpool" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e62e3bf2e4ee38e248131293ad908d8ba82b7d02dff432f68bc49b252eda509" +checksum = "985684e2d67d5018e9227a4f9ed79cac02b23b207e457ee95833ab047769c2ac" dependencies = [ "anyhow", "async-trait", - "fuel-core-chain-config", "fuel-core-metrics", "fuel-core-services", "fuel-core-storage", "fuel-core-types", "futures", + "mockall", "parking_lot", "tokio", "tokio-rayon", @@ -2473,9 +2473,9 @@ dependencies = [ [[package]] name = "fuel-core-types" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "385b3c9e9d51ca11e129ec1c713ffd2f4f2f2ad89c16b1808a4c661887a88bfb" +checksum = "cf038dd8df8d3aa665a13295c9ef888ba8118600cccdf8fb4587410e0e102fdf" dependencies = [ "anyhow", "bs58 0.5.0", @@ -2492,9 +2492,9 @@ dependencies = [ [[package]] name = "fuel-core-upgradable-executor" -version = "0.24.3" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "123e31a87f925f6403cf960e04db1403c4093d0fbacb1a5a8333c2756b980a42" +checksum = "cc54c84a7dc13f76930761ebca391b167caa096dc2bdb2413b5a2400bf65f99d" dependencies = [ "fuel-core-executor", "fuel-core-storage", @@ -2503,9 +2503,9 @@ dependencies = [ [[package]] name = "fuel-crypto" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6112c726b5254cad831e61db36dcd0d83b28c50180ea22cb8815343fb162526" +checksum = "71cef93970fb8a26d3a683ae211833c6bbf391066887f501bd5859f29992b59a" dependencies = [ "coins-bip32", "coins-bip39", @@ -2524,9 +2524,9 @@ dependencies = [ [[package]] name = "fuel-derive" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5896603b839f04f27e8bddbae2990dc799fb119f5e62973d6666b2ea1a4b036b" +checksum = "2b85e8e508b26d088262075fcfe9921b7009c931fef1cc55fe1dafb116c99884" dependencies = [ "proc-macro2", "quote", @@ -2536,9 +2536,9 @@ dependencies = [ [[package]] name = "fuel-merkle" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8f75d97f6d43fbd15aa5ca0d594b33cc59ba5fd73ce42f4a10dfa9288a9a4a4" +checksum = "5198b4eab5a19b0034971da88199dae7dd61806ebd8df366d6af1f17cda2e151" dependencies = [ "derive_more", "digest 0.10.7", @@ -2551,15 +2551,15 @@ dependencies = [ [[package]] name = "fuel-storage" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6899452bbf8b09d536b0adf98d6a28d1081ce38c3490fa2d8cc1dd47ba153351" +checksum = "fa738e9c244f3f312af09faef108ec9a285f02afcefbc579c19c242cea742dd0" [[package]] name = "fuel-tx" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "305c12d87f47d139505cbbaee1effa7750ce171c9a4362d212f4f7a651902121" +checksum = "8e4b4ea79ffe711af7bbf363b25f383fc6e481e652cf55a5ef8b5a458fcf4ef9" dependencies = [ "bitflags 2.4.0", "derivative", @@ -2570,6 +2570,7 @@ dependencies = [ "fuel-types", "hashbrown 0.14.0", "itertools 0.10.5", + "postcard", "rand", "serde", "serde_json", @@ -2579,9 +2580,9 @@ dependencies = [ [[package]] name = "fuel-types" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d92d34c6625f0c3b88463f01027e836ba561125f6ccfb1402d12743fc7b2c96" +checksum = "455cf5275d96f6907e81ed1825c4e6a9dd79f7c1c37a4e15134562f83024c7e7" dependencies = [ "fuel-derive", "hex", @@ -2591,9 +2592,9 @@ dependencies = [ [[package]] name = "fuel-vm" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06f02e86ebf357689e34412af34faf7f0d35a9b8b6ccb2ec42fd369559d6914" +checksum = "8811f949db8ce61cc68dcf81644047df4ee23be55879efcfe9f1aa5adc378965" dependencies = [ "anyhow", "async-trait", @@ -2625,9 +2626,9 @@ dependencies = [ [[package]] name = "fuels" -version = "0.58.0" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765b5ed07397fa814e91a4a2dd76711403b931ae9dc87ddb8f39f5ba0061624f" +checksum = "13f6212d1e08a52222b7120d5a11f350720f5564f2dbf3b825619bd497fdf1bd" dependencies = [ "fuel-core", "fuel-core-client", @@ -2642,9 +2643,9 @@ dependencies = [ [[package]] name = "fuels-accounts" -version = "0.58.0" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f63be865265782b0b70405af3c2881d5ea91bfbc746af198689211e5b2b822" +checksum = "bf220a834d5425d3e54fe867035dafa5e5313358a505b04e48ecde460571bc0e" dependencies = [ "async-trait", "chrono", @@ -2661,15 +2662,14 @@ dependencies = [ "tai64", "thiserror", "tokio", - "tracing", "zeroize", ] [[package]] name = "fuels-code-gen" -version = "0.58.0" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54669c711d1c7d97a6944c13357aa5c2dda0c09d422af8a1cc99eb0752e69c15" +checksum = "b0df90f02675a65a015a5c7ed86865acb9376b34cc93b2c58208f21286badb02" dependencies = [ "Inflector", "fuel-abi-types", @@ -2683,9 +2683,9 @@ dependencies = [ [[package]] name = "fuels-core" -version = "0.58.0" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aa642e56e3c4adcdf57c8211a0ee210eab9c08b35b12ad0f39fc78a60f04a4d" +checksum = "be24620ea84d29b56537b21723c4db0853424d3e75599c0ff7f5eaa3ca96143b" dependencies = [ "async-trait", "bech32 0.9.1", @@ -2703,16 +2703,15 @@ dependencies = [ "itertools 0.12.0", "serde", "serde_json", - "sha2 0.10.8", "thiserror", "uint", ] [[package]] name = "fuels-macros" -version = "0.58.0" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826b05edc9b48e229df70661df98f14c85f598891412e3c942bc72f16bcf29a4" +checksum = "de5713fc740bf297647cdfbed4acc65796b2a3a6e7ab28b9498de3fc89d9b824" dependencies = [ "fuels-code-gen", "itertools 0.12.0", @@ -2724,9 +2723,9 @@ dependencies = [ [[package]] name = "fuels-programs" -version = "0.58.0" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1983fcead46f5c9069873ff53c10a114e0aef325f4032785aef38b19190087f8" +checksum = "fcafe1b5372ed2b97c2550db28262016df80d78286eeb47e999c6bd3fa3a353a" dependencies = [ "async-trait", "bytes", @@ -2744,9 +2743,9 @@ dependencies = [ [[package]] name = "fuels-test-helpers" -version = "0.58.0" +version = "0.60.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdcb48ed9d79d59bdae86a580a117578f0d76c97bfe8c514a66a2bd455a8ebce" +checksum = "5fb2c6749b65cb6a0e6cfd24f140ed4792df0745195c2bceb2033ad5fefc162b" dependencies = [ "fuel-core", "fuel-core-chain-config", @@ -3523,6 +3522,19 @@ dependencies = [ "serde", ] +[[package]] +name = "indicatif" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "inout" version = "0.1.3" @@ -4609,6 +4621,12 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "object" version = "0.31.1" @@ -4985,6 +5003,12 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + [[package]] name = "portpicker" version = "0.1.1" @@ -6830,6 +6854,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-width" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" + [[package]] name = "unicode-xid" version = "0.2.4" diff --git a/Cargo.toml b/Cargo.toml index f36b6b37..b48f5813 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,14 +18,14 @@ rust-version = "1.72.0" [workspace.dependencies] # Dependencies from fuel-vm repository: -fuel-asm = "0.48.0" -fuel-tx = "0.48.0" +fuel-asm = "0.49.0" +fuel-tx = "0.49.0" # Dependencies from fuel-core repository: -fuel-core-types = { version = "0.24.3", default-features = false } +fuel-core-types = { version = "0.26.0", default-features = false } # Dependencies from fuels-rs repository: -fuels = { version = "0.58.0", features = ["fuel-core-lib", "legacy_encoding"] } +fuels = { version = "0.60.0", features = ["fuel-core-lib"] } # Third-party dependencies tokio = { version = "1.32.0", features = ["rt", "macros"] } diff --git a/Forc.lock b/Forc.lock index 6f0a8cbf..452437ab 100644 --- a/Forc.lock +++ b/Forc.lock @@ -3,9 +3,9 @@ name = "bridge_fungible_token" source = "member" dependencies = [ "contract_message_receiver", - "reentrancy", "src_20", "std", + "sway_libs", ] [[package]] @@ -23,23 +23,31 @@ dependencies = [ [[package]] name = "core" -source = "path+from-root-0EE950A4219DB4B4" +source = "path+from-root-EE4FC085C06BAAEB" [[package]] -name = "reentrancy" -source = "git+https://github.com/FuelLabs/sway-libs?tag=v0.17.2#5d69f665207158517eba14c35c7d28cb1cb93aa9" +name = "src_20" +source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.2.2#6989cf8224b0d8aabea62f3d3c648fc754948705" dependencies = ["std"] [[package]] -name = "src_20" -source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.2.2#6989cf8224b0d8aabea62f3d3c648fc754948705" +name = "standards" +source = "git+https://github.com/FuelLabs/sway-standards?tag=v0.4.3#6f63eb7dff2458a7d976184e565b5cbf26f61da2" dependencies = ["std"] [[package]] name = "std" -source = "git+https://github.com/fuellabs/sway?tag=v0.54.0#d90cbc8419e47283519e39046c3ea5616e64df84" +source = "git+https://github.com/fuellabs/sway?tag=v0.56.1#4a63b41de136ab68bdf396c6720708fbf4dca83e" dependencies = ["core"] +[[package]] +name = "sway_libs" +source = "git+https://github.com/FuelLabs/sway-libs?tag=v0.21.0#6a227ed34c86fe1ebd334dbdfeccf66c43e3915b" +dependencies = [ + "standards", + "std", +] + [[package]] name = "test_deposit_recipient_contract" source = "member" diff --git a/fuel-toolchain.toml b/fuel-toolchain.toml index 9142df94..566ccbf0 100644 --- a/fuel-toolchain.toml +++ b/fuel-toolchain.toml @@ -3,4 +3,4 @@ channel = "latest-2023-11-30" [components] fuel-core = "0.26.0" -forc = "0.54.0" +forc = "0.56.1" diff --git a/packages/esbuild-bin-loader/package.json b/packages/esbuild-bin-loader/package.json index c49c825a..67f42e3b 100644 --- a/packages/esbuild-bin-loader/package.json +++ b/packages/esbuild-bin-loader/package.json @@ -10,6 +10,6 @@ "build": "tsup" }, "dependencies": { - "fuels": "0.84.0" + "fuels": "0.85.0" } } \ No newline at end of file diff --git a/packages/fungible-token/bridge-fungible-token/Cargo.toml b/packages/fungible-token/bridge-fungible-token/Cargo.toml index c9a1e5b8..3ba5bdeb 100644 --- a/packages/fungible-token/bridge-fungible-token/Cargo.toml +++ b/packages/fungible-token/bridge-fungible-token/Cargo.toml @@ -14,7 +14,7 @@ ethers = {version = "=2.0.14"} # Dependencies from fuel-core repository: fuel-core-types = { workspace = true } # Dependencies from fuels-rs repository: -fuels = { workspace = true, features = ["fuel-core-lib", "legacy_encoding"] } +fuels = { workspace = true, features = ["fuel-core-lib"] } hex = "0.4.3" primitive-types = "0.12.1" diff --git a/packages/fungible-token/bridge-fungible-token/Forc.toml b/packages/fungible-token/bridge-fungible-token/Forc.toml index cb922182..f4f669be 100644 --- a/packages/fungible-token/bridge-fungible-token/Forc.toml +++ b/packages/fungible-token/bridge-fungible-token/Forc.toml @@ -6,5 +6,5 @@ name = "bridge_fungible_token" [dependencies] contract_message_receiver = { path = "../../message-predicates/contract-message-receiver" } -reentrancy = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.17.2" } src_20 = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.2.2" } +sway_libs = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.21.0" } diff --git a/packages/fungible-token/bridge-fungible-token/src/main.sw b/packages/fungible-token/bridge-fungible-token/src/main.sw index 08abd29e..09b9da7d 100644 --- a/packages/fungible-token/bridge-fungible-token/src/main.sw +++ b/packages/fungible-token/bridge-fungible-token/src/main.sw @@ -32,17 +32,14 @@ use data_structures::{ }; use events::{ClaimRefundEvent, DepositEvent, MetadataEvent, RefundRegisteredEvent, WithdrawalEvent}; use interface::{bridge::Bridge, src7::{Metadata, SRC7}}; -use reentrancy::reentrancy_guard; +use sway_libs::reentrancy::reentrancy_guard; use std::{ asset::{ burn, mint, transfer, }, - call_frames::{ - contract_id, - msg_asset_id, - }, + call_frames::msg_asset_id, constants::ZERO_B256, context::msg_amount, flags::{ @@ -300,7 +297,7 @@ fn _process_deposit(message_data: DepositMessage, msg_idx: u64) { } }; let sub_id = _generate_sub_id_from_metadata(message_data.token_address, message_data.token_id); - let asset_id = AssetId::new(contract_id(), sub_id); + let asset_id = AssetId::new(ContractId::this(), sub_id); let _ = disable_panic_on_overflow(); @@ -376,7 +373,7 @@ fn _process_deposit(message_data: DepositMessage, msg_idx: u64) { #[storage(read, write)] fn _process_metadata(metadata: MetadataMessage) { let sub_id = _generate_sub_id_from_metadata(metadata.token_address, metadata.token_id); - let asset_id = AssetId::new(contract_id(), sub_id); + let asset_id = AssetId::new(ContractId::this(), sub_id); // Important to note: in order to register metadata for an asset, // it must have been deposited first diff --git a/packages/fungible-token/bridge-fungible-token/tests/functions/bridge/mod.rs b/packages/fungible-token/bridge-fungible-token/tests/functions/bridge/mod.rs index bd09d2ae..14e57296 100644 --- a/packages/fungible-token/bridge-fungible-token/tests/functions/bridge/mod.rs +++ b/packages/fungible-token/bridge-fungible-token/tests/functions/bridge/mod.rs @@ -1,13 +1,12 @@ use crate::utils::{ constants::{ - BRIDGED_TOKEN, BRIDGED_TOKEN_DECIMALS, BRIDGED_TOKEN_ID, FROM, MESSAGE_AMOUNT, - PROXY_TOKEN_DECIMALS, + BRIDGED_TOKEN, BRIDGED_TOKEN_DECIMALS, BRIDGED_TOKEN_ID, FROM, PROXY_TOKEN_DECIMALS, }, interface::bridge::withdraw, setup::{ - contract_balance, create_deposit_message, create_token, create_wallet, decode_hex, - encode_hex, parse_output_message_data, relay_message_to_contract, setup_environment, - wallet_balance, BridgeFungibleTokenContractConfigurables, BridgingConfig, + create_deposit_message, create_token, create_wallet, decode_hex, encode_hex, + parse_output_message_data, relay_message_to_contract, setup_environment, wallet_balance, + BridgeFungibleTokenContractConfigurables, BridgingConfig, }, }; use fuels::{prelude::AssetId, types::Bits256}; @@ -64,8 +63,6 @@ mod success { ) .await; - let provider = wallet.provider().expect("Needs provider"); - // Relay the test message to the bridge contract let tx_id = relay_message_to_contract( &wallet, @@ -87,14 +84,9 @@ mod success { .decode_logs_with_type::(&receipts) .unwrap(); - let asset_balance = - contract_balance(provider, bridge.contract_id(), AssetId::default()).await; let balance = wallet_balance(&wallet, &get_asset_id(bridge.contract_id(), &token_address)).await; - // Verify the message value was received by the bridge contract - assert_eq!(asset_balance, MESSAGE_AMOUNT); - // Verify that no tokens were minted for message.data.to assert_eq!(balance, 0); @@ -345,8 +337,6 @@ mod success { ) .await; - let provider = wallet.provider().expect("Needs provider"); - // Relay the test message to the bridge contract let tx_id = relay_message_to_contract( &wallet, @@ -371,14 +361,9 @@ mod success { } } - let asset_balance = - contract_balance(provider, bridge.contract_id(), AssetId::default()).await; let balance = wallet_balance(&wallet, &get_asset_id(bridge.contract_id(), BRIDGED_TOKEN)).await; - // Verify the message value was received by the bridge contract - assert_eq!(asset_balance, MESSAGE_AMOUNT); - // Check that wallet now has bridged coins assert_eq!(balance, amount); diff --git a/packages/fungible-token/bridge-fungible-token/tests/functions/message_receiver/mod.rs b/packages/fungible-token/bridge-fungible-token/tests/functions/message_receiver/mod.rs index 4a6ec707..0da5eb35 100644 --- a/packages/fungible-token/bridge-fungible-token/tests/functions/message_receiver/mod.rs +++ b/packages/fungible-token/bridge-fungible-token/tests/functions/message_receiver/mod.rs @@ -13,20 +13,16 @@ use std::str::FromStr; mod success { use super::*; use crate::utils::interface::src20::total_supply; - use crate::utils::{ - constants::MESSAGE_AMOUNT, - setup::{ - contract_balance, create_metadata_message, create_recipient_contract, encode_hex, - get_asset_id, precalculate_deposit_id, wallet_balance, MetadataEvent, - RefundRegisteredEvent, - }, + use crate::utils::setup::{ + contract_balance, create_metadata_message, create_recipient_contract, encode_hex, + get_asset_id, precalculate_deposit_id, wallet_balance, MetadataEvent, + RefundRegisteredEvent, }; use fuel_core_types::fuel_types::canonical::Deserialize; use fuels::types::bech32::{Bech32Address, FUEL_BECH32_HRP}; use fuels::types::{Bytes32, U256}; use fuels::{ - prelude::AssetId, programs::contract::SettableContract, types::{tx_status::TxStatus, Bits256}, }; @@ -88,17 +84,12 @@ mod success { let tx_status = wallet.provider().unwrap().tx_status(&_tx_id).await.unwrap(); assert!(matches!(tx_status, TxStatus::Success { .. })); - let eth_balance = - contract_balance(provider, bridge.contract_id(), AssetId::default()).await; let asset_id = get_asset_id(bridge.contract_id(), token_address); let asset_balance = provider .get_asset_balance(&recipient_bech32, asset_id) .await .unwrap(); - // Verify the message value was received by the bridge - assert_eq!(eth_balance, MESSAGE_AMOUNT); - // Check that wallet now has bridged coins assert_eq!(asset_balance, amount); @@ -160,8 +151,6 @@ mod success { ) .await; - let provider = wallet.provider().expect("Needs provider"); - let asset_id = get_asset_id(bridge.contract_id(), BRIDGED_TOKEN); // Get the balance for the deposit contract before @@ -179,13 +168,8 @@ mod success { ) .await; - let asset_balance = - contract_balance(provider, bridge.contract_id(), AssetId::default()).await; let balance = wallet_balance(&wallet, &asset_id).await; - // Verify the message value was received by the bridge - assert_eq!(asset_balance, MESSAGE_AMOUNT); - // Check that wallet now has bridged coins assert_eq!(balance, deposit_amount); @@ -268,8 +252,6 @@ mod success { ) .await; - let provider = wallet.provider().expect("Needs provider"); - let asset_id = get_asset_id(bridge.contract_id(), BRIDGED_TOKEN); // Get the balance for the deposit contract before @@ -287,13 +269,8 @@ mod success { ) .await; - let asset_balance = - contract_balance(provider, bridge.contract_id(), AssetId::default()).await; let balance = wallet_balance(&wallet, &asset_id).await; - // Verify the message value was received by the bridge - assert_eq!(asset_balance, MESSAGE_AMOUNT); - // Check that wallet now has bridged coins assert_eq!(balance, max_deposit_amount); @@ -885,8 +862,6 @@ mod success { ) .await; - let provider = wallet.provider().expect("Needs provider"); - // Relay the test message to the bridge contract let tx_id = relay_message_to_contract( &wallet, @@ -895,13 +870,9 @@ mod success { ) .await; - let eth_balance = - contract_balance(provider, bridge.contract_id(), AssetId::default()).await; let asset_id = get_asset_id(bridge.contract_id(), BRIDGED_TOKEN); let asset_balance = wallet_balance(&wallet, &asset_id).await; - // Verify the message value was received by the bridge - assert_eq!(eth_balance, MESSAGE_AMOUNT); assert_eq!(asset_balance, 0); let receipts = wallet diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index a6c51967..a276607c 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -24,7 +24,7 @@ "dotenv": "^16.0.3", "ethereum-waffle": "^4.0.2", "ethers": "6.11.0", - "fuels": "0.84.0", + "fuels": "0.85.0", "mocha": "^10.0.0", "ts-node": "^10.9.1", "typescript": "^5.1.6" diff --git a/packages/message-predicates/Forc.lock b/packages/message-predicates/Forc.lock index dbeb750e..934a5e96 100644 --- a/packages/message-predicates/Forc.lock +++ b/packages/message-predicates/Forc.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "core" -source = "path+from-root-C3992B43B72ADB8C" +source = "path+from-root-03A6E3005278C326" [[package]] name = "std" -source = "git+https://github.com/fuellabs/sway?tag=v0.49.1#2ac7030570f22510b0ac2a7b5ddf7baa20bdc0e1" +source = "git+https://github.com/fuellabs/sway?tag=v0.56.0#b495d0df6956524fd68dab7e062df04d2e581ac3" dependencies = ["core"] diff --git a/packages/message-predicates/contract-message-predicate/Cargo.toml b/packages/message-predicates/contract-message-predicate/Cargo.toml index 88a7954e..bb352287 100644 --- a/packages/message-predicates/contract-message-predicate/Cargo.toml +++ b/packages/message-predicates/contract-message-predicate/Cargo.toml @@ -10,6 +10,7 @@ rust-version = { workspace = true } description = "Script and predicate for relaying contract messages." [dependencies] +fuels = { workspace = true, features = ["fuel-core-lib"] } # Dependencies from the `fuel-vm` repository: fuel-asm = { workspace = true } fuel-tx = { workspace = true } @@ -18,13 +19,14 @@ sha2 = "0.10.6" [dev-dependencies] fuel-core-types = { workspace = true } -fuels = { workspace = true, features = ["fuel-core-lib", "legacy_encoding"] } hex = { workspace = true } insta = "1.28" tokio = { workspace = true } [build-dependencies] sha2 = "0.10.6" +fuels = { workspace = true, features = ["fuel-core-lib"] } +hex = { workspace = true } # Dependencies from the `fuel-vm` repository: fuel-asm = { workspace = true } diff --git a/packages/message-predicates/contract-message-predicate/script_asm.rs b/packages/message-predicates/contract-message-predicate/script_asm.rs index 24391f5c..51af58fb 100644 --- a/packages/message-predicates/contract-message-predicate/script_asm.rs +++ b/packages/message-predicates/contract-message-predicate/script_asm.rs @@ -1,65 +1,58 @@ use fuel_asm::{op, GTFArgs, RegId}; -use sha2::{Digest, Sha256}; -const PROCESS_MESSAGE_FUNCTION_SIGNATURE: &str = "process_message(u64)"; +const PROCESS_MESSAGE_FUNCTION_SIGNATURE: &str = "process_message"; const BYTES_PER_INSTR: u16 = 4; // Gets the bytecode for the message-to-contract script pub fn bytecode() -> Vec { - //calculate function selector - let mut fn_sel_hasher = Sha256::new(); - fn_sel_hasher.update(PROCESS_MESSAGE_FUNCTION_SIGNATURE); - let fn_sel_hash: [u8; 32] = fn_sel_hasher.finalize().into(); + let mut fn_selector_bytes = + fuels::core::codec::encode_fn_selector(PROCESS_MESSAGE_FUNCTION_SIGNATURE); + const FN_SEL_BYTES_LEN: u16 = 23; // new encoding: len of the function signature as u64 (8 bytes) + 15 bytes of function signature ("process_message" has 15 characters) + assert_eq!(fn_selector_bytes.len() as u16, FN_SEL_BYTES_LEN); //register names const REG_MEMORY_START_PTR: u8 = 0x10; - const REG_ASSET_PTR: u8 = REG_MEMORY_START_PTR; const REG_DATA_PTR: u8 = 0x11; - const REG_DATA_FN_SEL_PTR: u8 = 0x12; - const REG_CONTRACT_ADDR_PTR: u8 = 0x13; - const REG_FN_SELECTOR_PTR: u8 = 0x14; - const REG_MSG_AMOUNT: u8 = 0x15; + const REG_CONTRACT_ADDR_PTR: u8 = 0x12; + const REG_FN_SELECTOR_PTR: u8 = 0x13; + const REG_DATA_FN_SELECTOR_PTR: u8 = 0x14; + const REG_DATA_CALLDATA_PTR: u8 = 0x15; + const REG_CALLDATA_PTR: u8 = 0x16; //referenced data start pointer - const REF_DATA_START_PTR: u16 = 11 * BYTES_PER_INSTR; - - /* The following assembly code is intended to do the following: - * - Call the function `process_message` on the contract with ID that matches - * the first 32 bytes in the message data field, while forwarding the exact - * amount of base asset specified in the `InputMessage` `amount` field - * - * note: this code makes the assumption that all memory at VM initialization is set to 0 + const REF_DATA_START_PTR: u16 = 13 * BYTES_PER_INSTR; + + /* The following assembly code is intended to: + * Call the function `process_message` on the contract with ID that matches + * the first 32 bytes in the message data field. It won't forward the possible value + * stored in the message. L1 entities sending messages here MUST NOT attach + * a base asset amount, or it will be permanently lost. */ let mut script: Vec = vec![ - //extend stack for contract call data op::move_(REG_MEMORY_START_PTR, RegId::SP), //REG_MEMORY_START_PTR = stack pointer op::cfei(32 + 32 + 8 + 8), //extends current call frame stack by 32+32+8+8 bytes [base asset id, contract id, param1, param2] op::addi(REG_DATA_PTR, REG_MEMORY_START_PTR, 32), //REG_DATA_PTR = REG_MEMORY_START_PTR + 32bytes [memory start pointer + 32] - op::addi(REG_DATA_FN_SEL_PTR, REG_DATA_PTR, 32 + 4), //REG_DATA_FN_SEL_PTR = REG_DATA_PTR + 32bytes + 4bytes [call data start pointer + 32 + 4] - //prep call parameters - op::gtf( - REG_MSG_AMOUNT, - RegId::ZERO, - GTFArgs::InputMessageAmount.into(), - ), //REG_MSG_AMOUNT = amount value of message from input[0] op::gtf( REG_CONTRACT_ADDR_PTR, RegId::ZERO, GTFArgs::InputMessageData.into(), ), //REG_CONTRACT_ADDR_PTR = memory location of the message data from input[0] - op::addi(REG_FN_SELECTOR_PTR, RegId::IS, REF_DATA_START_PTR), //REG_FN_SELECTOR_PTR = function selector at end of program - op::mcpi(REG_DATA_PTR, REG_CONTRACT_ADDR_PTR, 32), //32 bytes at REG_DATA_PTR = the 32 bytes at REG_CONTRACT_ADDR_PTR - op::mcpi(REG_DATA_FN_SEL_PTR, REG_FN_SELECTOR_PTR, 4), //4 bytes at REG_DATA_FN_SEL_PTR = the 4 bytes at REG_FN_SELECTOR_PTR - //make contract call - op::call(REG_DATA_PTR, REG_MSG_AMOUNT, REG_ASSET_PTR, RegId::CGAS), + op::mcpi(REG_DATA_PTR, REG_CONTRACT_ADDR_PTR, 32), // REG_DATA[0..31] = REG_CONTRACT_ADDR_PTR[0..31] + op::addi(REG_FN_SELECTOR_PTR, RegId::IS, REF_DATA_START_PTR), + op::addi(REG_DATA_FN_SELECTOR_PTR, REG_DATA_PTR, 32), // REG_DATA_FN_SELECTOR_PTR = REG_DATA_PTR + 32 + op::sw(REG_DATA_FN_SELECTOR_PTR, REG_FN_SELECTOR_PTR, 0), // REG_DATA[32..39] = (End of IS)[0..7] = (len of "process_message") + op::addi(REG_CALLDATA_PTR, RegId::IS, REF_DATA_START_PTR + FN_SEL_BYTES_LEN), // REG_DATA_FN_SELECTOR_PTR = REG_DATA_PTR + 32 + 23 + op::addi(REG_DATA_CALLDATA_PTR, REG_DATA_PTR, 40), // REG_DATA_FN_SELECTOR_PTR = REG_DATA_PTR + 40 + op::sw(REG_DATA_CALLDATA_PTR, REG_CALLDATA_PTR, 0), // REG_DATA[40..47] = (End of IS)[23..30] = msg_idx = 0 + op::call(REG_DATA_PTR, RegId::ZERO, RegId::ZERO, RegId::CGAS), op::ret(RegId::ZERO), - //referenced data (function selector) - //00000000 ] .into_iter() .collect(); - //add referenced data (function selector) - script.append(&mut fn_sel_hash[0..4].to_vec()); + // At the tail of the script, after the return statement, embed: + script.append(&mut fn_selector_bytes); // 23 bytes for function selector + script.append(&mut 0u64.to_be_bytes().to_vec()); // 8 bytes of msg_idx + script } diff --git a/packages/message-predicates/contract-message-predicate/src/snapshots/fuel_contract_message_predicate__tests__snapshot_predicate_bytecode.snap b/packages/message-predicates/contract-message-predicate/src/snapshots/fuel_contract_message_predicate__tests__snapshot_predicate_bytecode.snap index 01a1a92b..35a2039d 100644 --- a/packages/message-predicates/contract-message-predicate/src/snapshots/fuel_contract_message_predicate__tests__snapshot_predicate_bytecode.snap +++ b/packages/message-predicates/contract-message-predicate/src/snapshots/fuel_contract_message_predicate__tests__snapshot_predicate_bytecode.snap @@ -3,4 +3,4 @@ source: packages/message-predicates/contract-message-predicate/src/lib.rs assertion_line: 52 expression: serialized --- -1a40500091000020614400096148000342411480504cc04c72580020295134165b501012615c000572680002595d7001616172005b61a010616572455b6400125b5c100b2404000024000000a77be53b9781aa004910c2a06a35b03b6b6909c64937c42a49d1e8185085c86f +1a40500091000020614400096148000342411480504cc04c72580020295134165b501012615c000572680002595d7001616172005b61a010616572455b6400125b5c100b24040000240000007cc480c6385fe2c31dc95cc830e4ffb75da5532558ef938b8368da930bf60722 diff --git a/packages/message-predicates/contract-message-predicate/src/snapshots/fuel_contract_message_predicate__tests__snapshot_script_bytecode.snap b/packages/message-predicates/contract-message-predicate/src/snapshots/fuel_contract_message_predicate__tests__snapshot_script_bytecode.snap index 40e3f219..879c6e6c 100644 --- a/packages/message-predicates/contract-message-predicate/src/snapshots/fuel_contract_message_predicate__tests__snapshot_script_bytecode.snap +++ b/packages/message-predicates/contract-message-predicate/src/snapshots/fuel_contract_message_predicate__tests__snapshot_script_bytecode.snap @@ -3,4 +3,4 @@ source: packages/message-predicates/contract-message-predicate/src/lib.rs assertion_line: 60 expression: serialized --- -1a40500091000050504500205049102461540242614c02485050c02c60453020604940042d45540a24000000b93e6a3d +1a40500091000050504500206148024860452020504cc034505110205f5130005058c04b505510285f5560002d44000a24000000000000000000000f70726f636573735f6d6573736167650000000000000000 diff --git a/packages/message-predicates/contract-message-predicate/tests/harness.rs b/packages/message-predicates/contract-message-predicate/tests/harness.rs index 594af128..a494e809 100644 --- a/packages/message-predicates/contract-message-predicate/tests/harness.rs +++ b/packages/message-predicates/contract-message-predicate/tests/harness.rs @@ -6,7 +6,7 @@ mod utils { // Test that input messages can be relayed to a contract // and that the contract can successfully parse the message data mod success { - use std::str::FromStr; + use std::{str::FromStr, u64}; use crate::utils::{builder, environment as env}; use fuel_tx::Bytes32; @@ -39,7 +39,12 @@ mod success { let (wallet, test_contract, contract_input, _, message_inputs) = env::setup_environment(vec![coin], vec![message]).await; - let _receipts = env::relay_message_to_contract( + let test_contract_id: ContractId = test_contract.contract_id().into(); + let methods = test_contract.methods(); + + let prev_counter = methods.test_counter().simulate().await.unwrap().value; + + let _tx_id = env::relay_message_to_contract( &wallet, message_inputs[0].clone(), vec![contract_input.clone()], @@ -48,8 +53,6 @@ mod success { .await; // Verify test contract received the message with the correct data - let test_contract_id: ContractId = test_contract.contract_id().into(); - let methods = test_contract.methods(); let test_contract_counter = methods.test_counter().call().await.unwrap().value; let test_contract_data1 = methods.test_data1().call().await.unwrap().value; let test_contract_data2 = methods.test_data2().call().await.unwrap().value; @@ -62,12 +65,8 @@ mod success { assert_eq!(test_contract_data4, data_address); // Verify the message value was received by the test contract - let provider = wallet.provider().unwrap(); - let test_contract_balance = provider - .get_contract_asset_balance(test_contract.contract_id(), AssetId::default()) - .await - .unwrap(); - assert_eq!(test_contract_balance, 100); + let counter = methods.test_counter().simulate().await.unwrap().value; + assert_eq!(counter, prev_counter + 1); } #[tokio::test] @@ -84,6 +83,11 @@ mod success { env::setup_environment(vec![coin], vec![message1, message2]).await; let provider = wallet.provider().unwrap(); + let test_contract_id: ContractId = test_contract.contract_id().into(); + let methods = test_contract.methods(); + + let prev_counter = methods.test_counter().simulate().await.unwrap().value; + let tx = builder::build_contract_message_tx( message_inputs[0].clone(), &[message_inputs[1].clone(), contract_input.clone()], @@ -98,8 +102,6 @@ mod success { .expect("Transaction failed"); // Verify test contract received the message with the correct data - let test_contract_id: ContractId = test_contract.contract_id().into(); - let methods = test_contract.methods(); let test_contract_counter = methods.test_counter().call().await.unwrap().value; let test_contract_data1 = methods.test_data1().call().await.unwrap().value; let test_contract_data2 = methods.test_data2().call().await.unwrap().value; @@ -112,11 +114,8 @@ mod success { assert_eq!(test_contract_data4, data_address); // Verify the message values were received by the test contract - let test_contract_balance = provider - .get_contract_asset_balance(test_contract.contract_id(), AssetId::default()) - .await - .unwrap(); - assert_eq!(test_contract_balance, 100); + let counter = methods.test_counter().simulate().await.unwrap().value; + assert_eq!(counter, prev_counter + 1); } } diff --git a/packages/message-predicates/contract-message-predicate/tests/utils/builder.rs b/packages/message-predicates/contract-message-predicate/tests/utils/builder.rs index 88f192f2..c0f81016 100644 --- a/packages/message-predicates/contract-message-predicate/tests/utils/builder.rs +++ b/packages/message-predicates/contract-message-predicate/tests/utils/builder.rs @@ -86,7 +86,7 @@ pub async fn build_contract_message_tx( asset_id: AssetId::default(), }); - let tx_policies = TxPolicies::new(Some(0), None, None, None, Some(30_000)); + let tx_policies = TxPolicies::new(Some(0), None, None, None, Some(300_000)); let mut builder = ScriptTransactionBuilder::default() .with_inputs(tx_inputs.clone()) diff --git a/packages/solidity-contracts/contracts/lib/CommonPredicates.sol b/packages/solidity-contracts/contracts/lib/CommonPredicates.sol index c6ff561d..af9e48fd 100644 --- a/packages/solidity-contracts/contracts/lib/CommonPredicates.sol +++ b/packages/solidity-contracts/contracts/lib/CommonPredicates.sol @@ -5,5 +5,5 @@ pragma solidity 0.8.9; /// @notice Common predicates for Fuel inputs library CommonPredicates { bytes32 public constant CONTRACT_MESSAGE_PREDICATE = - 0xb12658c759d8bae2cdc523ebd7aa8637912f32b1763d242ad3618448057b79cd; + 0xe821b978bcce9abbf40c3e50ea30143e68c65fa95b9da8907fef59c02d954cec; } diff --git a/packages/solidity-contracts/protocol/constants.ts b/packages/solidity-contracts/protocol/constants.ts index 76d1c421..3259ad57 100644 --- a/packages/solidity-contracts/protocol/constants.ts +++ b/packages/solidity-contracts/protocol/constants.ts @@ -5,7 +5,7 @@ export const ZERO = '0x0000000000000000000000000000000000000000000000000000000000000000'; export const CONTRACT_MESSAGE_PREDICATE = - '0xb12658c759d8bae2cdc523ebd7aa8637912f32b1763d242ad3618448057b79cd'; + '0xe821b978bcce9abbf40c3e50ea30143e68c65fa95b9da8907fef59c02d954cec'; // From application header: https://github.com/FuelLabs/fuel-specs/blob/master/src/protocol/block-header.md export const CONSENSUS_PARAMETERS_VERSION = 0n; diff --git a/packages/solidity-contracts/test/erc721Gateway.test.ts b/packages/solidity-contracts/test/erc721Gateway.test.ts index 0bb1ec4d..f3031a4d 100644 --- a/packages/solidity-contracts/test/erc721Gateway.test.ts +++ b/packages/solidity-contracts/test/erc721Gateway.test.ts @@ -11,6 +11,7 @@ import { computeBlockId, generateBlockHeaderLite, } from '../protocol/blockHeader'; +import { CONTRACT_MESSAGE_PREDICATE } from '../protocol/constants'; import type { HarnessObject } from '../protocol/harness'; import Message, { computeMessageId } from '../protocol/message'; import { @@ -28,9 +29,6 @@ import type { import { createBlock } from './utils/createBlock'; -const CONTRACT_MESSAGE_PREDICATE = - '0xb12658c759d8bae2cdc523ebd7aa8637912f32b1763d242ad3618448057b79cd'; - const { expect } = chai; // Merkle tree node structure diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index da830d74..2509bc55 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -16,7 +16,7 @@ "build:watch": "tsup --watch" }, "peerDependencies": { - "fuels": "0.84.0", + "fuels": "0.85.0", "ethers": "6.11.0" }, "devDependencies": { diff --git a/packages/test-utils/src/utils/constants.ts b/packages/test-utils/src/utils/constants.ts index b6ac07e1..55d1ec59 100644 --- a/packages/test-utils/src/utils/constants.ts +++ b/packages/test-utils/src/utils/constants.ts @@ -1,3 +1,4 @@ +import type { TxParams } from 'fuels'; import { bn } from 'fuels'; // Constants @@ -6,13 +7,13 @@ export const FUEL_ETH_DECIMALS = 9n; export const FUEL_MESSAGE_POLL_MS: number = 300; export const MAX_GAS_PER_TX = bn(100_000_000); export const FUEL_GAS_LIMIT = 500_000_000; -export const FUEL_GAS_PRICE = 1; -export const FUEL_TX_PARAMS = { +export const FUEL_MAX_FEE = 1; +export const FUEL_TX_PARAMS: TxParams = { gasLimit: process.env.FUEL_GAS_LIMIT || FUEL_GAS_LIMIT, - gasPrice: process.env.FUEL_GAS_PRICE || FUEL_GAS_PRICE, + maxFee: process.env.FUEL_MAX_FEE || FUEL_MAX_FEE, }; export const FUEL_CALL_TX_PARAMS = { gasLimit: bn(64_933), - gasPrice: FUEL_TX_PARAMS.gasPrice, + maxFee: FUEL_TX_PARAMS.maxFee, }; export const FUEL_MESSAGE_TIMEOUT_MS = 1_000_000; diff --git a/packages/test-utils/src/utils/fuels/getOrDeployFuelTokenContract.ts b/packages/test-utils/src/utils/fuels/getOrDeployFuelTokenContract.ts index d3882f71..8e2df52c 100644 --- a/packages/test-utils/src/utils/fuels/getOrDeployFuelTokenContract.ts +++ b/packages/test-utils/src/utils/fuels/getOrDeployFuelTokenContract.ts @@ -70,12 +70,12 @@ export async function getOrDeployFuelTokenContract( storageSlots: [], } ); - const { maxFee, requiredQuantities } = - await fuelAcct.provider.getTransactionCost(transactionRequest); + const { requiredQuantities } = await fuelAcct.provider.getTransactionCost( + transactionRequest + ); await fuelAcct.fund(transactionRequest, { requiredQuantities, - maxFee, estimatedPredicates: [], addedSignatures: 0, }); diff --git a/packages/test-utils/src/utils/fuels/relayCommonMessage.ts b/packages/test-utils/src/utils/fuels/relayCommonMessage.ts index dbe35c44..a1b4a1cb 100644 --- a/packages/test-utils/src/utils/fuels/relayCommonMessage.ts +++ b/packages/test-utils/src/utils/fuels/relayCommonMessage.ts @@ -102,7 +102,7 @@ function getCommonRelayableMessages(provider: Provider) { transaction.gasLimit = bn(1_000_000); - transaction.maxFee = bn(0); + transaction.maxFee = bn(1); debug( '-------------------------------------------------------------------' @@ -141,7 +141,10 @@ type CommonMessageDetails = { export async function relayCommonMessage( relayer: FuelWallet, message: Message, - txParams?: Pick + txParams?: Pick< + ScriptTransactionRequestLike, + 'gasLimit' | 'maturity' | 'maxFee' + > ): Promise { // find the relay details for the specified message let messageRelayDetails: CommonMessageDetails = null; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 24c65d9b..d589e77a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,8 +46,8 @@ importers: packages/esbuild-bin-loader: dependencies: fuels: - specifier: 0.84.0 - version: 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + specifier: 0.85.0 + version: 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) packages/fungible-token: devDependencies: @@ -91,8 +91,8 @@ importers: specifier: 6.11.0 version: 6.11.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) fuels: - specifier: 0.84.0 - version: 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + specifier: 0.85.0 + version: 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) mocha: specifier: ^10.0.0 version: 10.4.0 @@ -241,8 +241,8 @@ importers: specifier: 6.11.0 version: 6.11.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) fuels: - specifier: 0.84.0 - version: 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + specifier: 0.85.0 + version: 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) devDependencies: '@fuel-bridge/fungible-token': specifier: workspace:* @@ -817,60 +817,60 @@ packages: '@fuel-contracts/merkle-sol@0.1.4': resolution: {integrity: sha512-r2jLlVPb/n3vALQ1EissdiW96kPcAGg4Yu/hsGHe+ZEgu8kEYSLWqPAV0shU72q//Ofxfh7xznmUMf7lkzNLRQ==} - '@fuel-ts/abi-coder@0.84.0': - resolution: {integrity: sha512-j76kuHASFhN7ibPLSQC631f40+dIL7PkmR+EgfZIujOesfsj4emMc/jRdGhdGklikyiE6RvVvKCJNpcrvIKeYA==} + '@fuel-ts/abi-coder@0.85.0': + resolution: {integrity: sha512-BQsjtD2aGDQir4twaCqqPH7oIjg0/mX59FCf/hT5rXRhwBXTPi60vSXniNyQUGuMRYcmRMvr+6GAEmD6w9kFXw==} engines: {node: ^18.18.2 || ^20.0.0} - '@fuel-ts/abi-typegen@0.84.0': - resolution: {integrity: sha512-w95A1x8DaCc6O+AaTB/ifpZtDE3opGs0gBCZIVHSvFhhYR7Z5Up8t73Va0+sYiu1jyvCrsHQrCXKvK1zq3FwRQ==} + '@fuel-ts/abi-typegen@0.85.0': + resolution: {integrity: sha512-AL+suFj+sooNMNkIUNbEoLlw/fp51cVTojVQSB6QKPNB4FA4JtOyyZ/v2faPnoXgy2B39D3xwGjS94RibeFiRw==} engines: {node: ^18.18.2 || ^20.0.0} hasBin: true - '@fuel-ts/account@0.84.0': - resolution: {integrity: sha512-RvO6/j16M2Y1SymQz3S/Xmc9klXpHWnoHuZedYmNKArRSm4QDk6DhiKflfkG9U8NyjvtnDk2RYm8fpAODzhn4A==} + '@fuel-ts/account@0.85.0': + resolution: {integrity: sha512-EjtWMYitqmT54xyceDsU1162yT3jibHPAgbiAQd9YRQIYotiiLQB9QJDcVw24RaCs0jwi5OhdvCwKeYbd+qS6g==} engines: {node: ^18.18.2 || ^20.0.0} - '@fuel-ts/address@0.84.0': - resolution: {integrity: sha512-kryoGabW5Y+dRTdBt7dhO1RYa0sAf98LxUaQQBVyVz1Yjv6SFJY6cXvEQ+GYxAe+CJS//cRvrvaot7jt/vGMDw==} + '@fuel-ts/address@0.85.0': + resolution: {integrity: sha512-9+Ud5roDYwTbttTSgUec1HzxqOVNRmDEvxwUbaKR007VprfRkGUWfiiKmZlSI9uf7niKnoBvq/MMvKHpB4SMEQ==} engines: {node: ^18.18.2 || ^20.0.0} - '@fuel-ts/contract@0.84.0': - resolution: {integrity: sha512-zZjbJS9dSnJt3PKqYja2KJmk7rrQyrXrJ3haulXSTJfMNDH0XFfuaWMJjqu8z15uX+vPn9DgW6UFse+Oohhoqw==} + '@fuel-ts/contract@0.85.0': + resolution: {integrity: sha512-HYGE3hxil6q5/GD8qpUjer+QqqhDV/nshqCUd7vmYeD+JwZSIuSIjBYgt0ly100+xwwNk8bO1ihzqJ3SORt7WQ==} engines: {node: ^18.18.2 || ^20.0.0} - '@fuel-ts/crypto@0.84.0': - resolution: {integrity: sha512-UEB8tY25hLHgF+e884MVqR0/n9YG3qpJi+XZ+D/bSxyN9AyoiOtcaju6NaF0bXufLqrKI9sDCKVVuHKoj+dUjw==} + '@fuel-ts/crypto@0.85.0': + resolution: {integrity: sha512-wEJWl0jwtiTnokGU9fCUzpol/6vmFZZAZ3Oz3aCTIh9NLND7kAAvYRwvFma55mku/ScSPnlnl29I3nGuawCIoQ==} engines: {node: ^18.18.2 || ^20.0.0} - '@fuel-ts/errors@0.84.0': - resolution: {integrity: sha512-bK7dzyl4/u8Vk8WNq7M63pikuNoV6HL25DJudBxlAGwC0M/Ckg61kVp4fi6eAmvoqEn7tiXzvH6P3F9+IV5Jcw==} + '@fuel-ts/errors@0.85.0': + resolution: {integrity: sha512-U312G/5i9Gqm5tAYiCrutp693d8Jdqr+BtVsbfcUMYpU+YRkbGX/kVZrYh78SytHbR4zcPi6CEe3wbe2fFnpfg==} engines: {node: ^18.18.2 || ^20.0.0} '@fuel-ts/forc@0.73.0': resolution: {integrity: sha512-Dpli/ch7axvJ2nptzVnYgpQQHUM4NwuSXkIRrhEKdcSGy6q1kClngL5NaeenUHLzsQfZPrMJ69fExF6BpOHNhg==} hasBin: true - '@fuel-ts/forc@0.84.0': - resolution: {integrity: sha512-gl1/l4ix2WY8lavqWQ8eoNC+7x1ZHaHMqVSfMa7X8K9tPdiUf2fGhASpAPEbdbIGvSxoMsgCR9GaHrNYd07isg==} + '@fuel-ts/forc@0.85.0': + resolution: {integrity: sha512-3g6EmTBhZv6qjAAAICadbla48InXnKt3mhPx6AhTHUIvP32vzW02CrINUNuCJ+/zr9twbZ4PNMcjXk1Io2WCgA==} hasBin: true - '@fuel-ts/fuel-core@0.84.0': - resolution: {integrity: sha512-gHinTW8HTLVvJRY5PqyTjWhN7B2++9aXjsnfVrdHoISljdzMbMsUfPxywbHRwmMpcth1KPO9RCfCjdKy99wonQ==} + '@fuel-ts/fuel-core@0.85.0': + resolution: {integrity: sha512-NQiVTX+J2nNaqojbbi4sGpo08x+XWMMZuCgxYiirNOQrFkxs+rUWEhMEPrX+v+6Hrt6qBNoX2R5RRxNMsN3t5w==} hasBin: true - '@fuel-ts/hasher@0.84.0': - resolution: {integrity: sha512-9VKNQ8F4+vSUKhnz3/0MSS8vUDLZjqQK3jiHJZkBZvuVOrqENuHoVhVMbk3E3Nz+W83fFmKBCIKD+UXu4lCMiQ==} + '@fuel-ts/hasher@0.85.0': + resolution: {integrity: sha512-R1VNEl9amGHvaEWzt5Oja9R83IRJfDgajtbUI5Wj28Z8ONlxJ6Yy7Koe41COV4fojeN/u+pouqllXvVlWAJGyA==} engines: {node: ^18.18.2 || ^20.0.0} - '@fuel-ts/interfaces@0.84.0': - resolution: {integrity: sha512-xjEawF6uMotd+yvfPmOH4lbotlMR3Xfp5R6ioUV0dUby1OoD6NGB2U/3lDbYWETMCL9TwCG728acb9TYBTq75Q==} + '@fuel-ts/interfaces@0.85.0': + resolution: {integrity: sha512-hj5A8Lg2ts1L+/iQ8sDwlGdBLIl1wPPwTuWv5/Mf5OoFXeP2X6iZ3OSRqd8/bvLWI/8fsunuut/Y9aCFLlcc/w==} engines: {node: ^18.18.2 || ^20.0.0} '@fuel-ts/math@0.21.2': resolution: {integrity: sha512-5Nt7R2z4hoxAJc/xvMgTlZeB6QQO7uEX/8Ehx6C0xlMcb/jhwSoVbSweX67avXDtLkKkDenJfSwQGl/FeKcGwQ==} - '@fuel-ts/math@0.84.0': - resolution: {integrity: sha512-tqhKIX2MscKPMJ3GS+YmtAW53IPhN4WwYBTqOAxlsnDT7/lQLuYxHazJ/WFxUrcqx2+ziV5QCbLgwIg4WSx1QQ==} + '@fuel-ts/math@0.85.0': + resolution: {integrity: sha512-Hfx4MJoqid9d4GKtpXSvZeJ21DeOprUS3QwdBffbDt6DYmLAqCRZVvP29cc+4QHFH5I/zOknXmgXK0lqPKYp7g==} engines: {node: ^18.18.2 || ^20.0.0} '@fuel-ts/merkle-shared@0.21.2': @@ -879,28 +879,28 @@ packages: '@fuel-ts/merkle@0.21.2': resolution: {integrity: sha512-0S7JuZO13uStSEx4MHzbykMP4Tdv5m/HNQdngVJSfd+F2O6PRQwZSKYE4cGZBbYc1ABH9q+K0NUuyiLtsmGmxg==} - '@fuel-ts/merkle@0.84.0': - resolution: {integrity: sha512-TgiSg8ZsIrKYd1cPaynEMfeu/Qak5HjeNCJEiszDUSsaBbvfnNFNOp9bhPab5EtBYEFxGU1Gcbbecv2wtbgmng==} + '@fuel-ts/merkle@0.85.0': + resolution: {integrity: sha512-+xvIuZzQSjbm6g6qoCwFLZVBO9yfP7ipznEwwvT1EgfeC1IA4cHhEx6JKjVshkgs1oMKxvKcAkxgBA+r8YFHZQ==} engines: {node: ^18.18.2 || ^20.0.0} - '@fuel-ts/program@0.84.0': - resolution: {integrity: sha512-QOYu3Z34vDRx+FtSFl9bJtuR/xchVWcALcKwZkkAF/BJCPByUzuvJds2iajUu9TKn/S4WdYRczd6x28RdhKDqw==} + '@fuel-ts/program@0.85.0': + resolution: {integrity: sha512-cN4Y7nF0HnRikKTaetw0T55lLjY3cfISWwNLIHkbjMJ99UIegOzt3A9hOT1TZQz6F7FaFQL8FQrrzwBrJUgqUA==} engines: {node: ^18.18.2 || ^20.0.0} - '@fuel-ts/script@0.84.0': - resolution: {integrity: sha512-P2pMQtKriYuTelem8J5fEDUbN3VYQLHpL9wklpbpX+1aBjSe9LF6Ns++tNSveYN1yjobqZDh0gZ1AeoiwIT5oQ==} + '@fuel-ts/script@0.85.0': + resolution: {integrity: sha512-UriUDFh9ouN5u8teBsYJxSu4WHSjiADJEcq4WZes4HJ72S85aZthnrZvKUCgemPsSTDGHQ44w1QUkcObkzKV3A==} engines: {node: ^18.18.2 || ^20.0.0} - '@fuel-ts/transactions@0.84.0': - resolution: {integrity: sha512-hsCa0kpHuefkImcvE13eagG1U1XjkBmfv09SjVDB7auCOCmSO1m1QnBPZ+dRwsfrAY631YwTaba+3F23n50vtw==} + '@fuel-ts/transactions@0.85.0': + resolution: {integrity: sha512-Dgy3Z17idsgIGnrF79iYUH8cccmrI8GOQSoXAh/PzFVKAayN4hr6orgw03KlZCNI7Gao5jcFbywPzDPFw2VWMw==} engines: {node: ^18.18.2 || ^20.0.0} - '@fuel-ts/utils@0.84.0': - resolution: {integrity: sha512-Wsz+LOexqQ+dUKc1foeu4bui4EUPG+HILKd3V5xGEazR4qxIO4fYpT7AxvykGZJDJb8bC7bXeSCzxwJ6bABujA==} + '@fuel-ts/utils@0.85.0': + resolution: {integrity: sha512-Yd30zqKrhOdxmj0WeafdnHFYpSdEg64qBjMOEF3JtIknr9mx69u40hNTDm2KMrXkk1ao2wyWjv4+ckVm5ZZrcw==} engines: {node: ^18.18.2 || ^20.0.0} - '@fuel-ts/versions@0.84.0': - resolution: {integrity: sha512-rWxwKA7SEcE6qeAWlc/nj7oBsDK+9aW6sgkAEgVbethcKOQ8cRaGGc+H/Gd/ortw2kZ96isUVA9qfnVLnx5TEg==} + '@fuel-ts/versions@0.85.0': + resolution: {integrity: sha512-oMFkqsT7a8XTLpBXwtfmlX/3zkVgz3ReO6WBGMfiIP7WJiI5i2+9PFk6y+ywO4I7s35v8oHITTvawzFcr0k5Ew==} engines: {node: ^18.18.2 || ^20.0.0} hasBin: true @@ -2984,8 +2984,8 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] - fuels@0.84.0: - resolution: {integrity: sha512-aegKUzVxs410a/cH2NAfcEFY+4o+4/qstJCv4JDgOjzamjc7tsh28fANTmaA5bybuGRWXSEkey94rne/QF06Eg==} + fuels@0.85.0: + resolution: {integrity: sha512-awYjcHiE7SEVm8JuZXWTQPkRlrBjPmgdSJ4ypheTmyMh4CTtgNDIyAirOpXyzcfFKQOikMv/DSlbTEBYKiS+aw==} engines: {node: ^18.18.2 || ^20.0.0} hasBin: true @@ -6280,26 +6280,26 @@ snapshots: ganache-cli: 6.12.2 mocha: 10.4.0 - '@fuel-ts/abi-coder@0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': + '@fuel-ts/abi-coder@0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': dependencies: - '@fuel-ts/crypto': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/errors': 0.84.0 - '@fuel-ts/hasher': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/interfaces': 0.84.0 - '@fuel-ts/math': 0.84.0 - '@fuel-ts/utils': 0.84.0 + '@fuel-ts/crypto': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/errors': 0.85.0 + '@fuel-ts/hasher': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/interfaces': 0.85.0 + '@fuel-ts/math': 0.85.0 + '@fuel-ts/utils': 0.85.0 ethers: 6.11.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) type-fest: 3.13.1 transitivePeerDependencies: - bufferutil - utf-8-validate - '@fuel-ts/abi-typegen@0.84.0': + '@fuel-ts/abi-typegen@0.85.0': dependencies: - '@fuel-ts/errors': 0.84.0 - '@fuel-ts/interfaces': 0.84.0 - '@fuel-ts/utils': 0.84.0 - '@fuel-ts/versions': 0.84.0 + '@fuel-ts/errors': 0.85.0 + '@fuel-ts/interfaces': 0.85.0 + '@fuel-ts/utils': 0.85.0 + '@fuel-ts/versions': 0.85.0 commander: 9.5.0 glob: 10.3.12 handlebars: 4.7.8 @@ -6307,19 +6307,19 @@ snapshots: ramda: 0.29.1 rimraf: 3.0.2 - '@fuel-ts/account@0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': - dependencies: - '@fuel-ts/abi-coder': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/address': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/crypto': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/errors': 0.84.0 - '@fuel-ts/hasher': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/interfaces': 0.84.0 - '@fuel-ts/math': 0.84.0 - '@fuel-ts/merkle': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/transactions': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/utils': 0.84.0 - '@fuel-ts/versions': 0.84.0 + '@fuel-ts/account@0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': + dependencies: + '@fuel-ts/abi-coder': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/address': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/crypto': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/errors': 0.85.0 + '@fuel-ts/hasher': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/interfaces': 0.85.0 + '@fuel-ts/math': 0.85.0 + '@fuel-ts/merkle': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/transactions': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/utils': 0.85.0 + '@fuel-ts/versions': 0.85.0 '@fuels/vm-asm': 0.49.0 '@noble/curves': 1.4.0 ethers: 6.11.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) @@ -6337,49 +6337,49 @@ snapshots: - supports-color - utf-8-validate - '@fuel-ts/address@0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': + '@fuel-ts/address@0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': dependencies: - '@fuel-ts/crypto': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/errors': 0.84.0 - '@fuel-ts/interfaces': 0.84.0 - '@fuel-ts/utils': 0.84.0 + '@fuel-ts/crypto': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/errors': 0.85.0 + '@fuel-ts/interfaces': 0.85.0 + '@fuel-ts/utils': 0.85.0 '@noble/hashes': 1.4.0 bech32: 2.0.0 transitivePeerDependencies: - bufferutil - utf-8-validate - '@fuel-ts/contract@0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': - dependencies: - '@fuel-ts/abi-coder': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/account': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/crypto': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/errors': 0.84.0 - '@fuel-ts/hasher': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/interfaces': 0.84.0 - '@fuel-ts/merkle': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/program': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/transactions': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/utils': 0.84.0 + '@fuel-ts/contract@0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': + dependencies: + '@fuel-ts/abi-coder': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/account': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/crypto': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/errors': 0.85.0 + '@fuel-ts/hasher': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/interfaces': 0.85.0 + '@fuel-ts/merkle': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/program': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/transactions': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/utils': 0.85.0 transitivePeerDependencies: - bufferutil - encoding - supports-color - utf-8-validate - '@fuel-ts/crypto@0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': + '@fuel-ts/crypto@0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': dependencies: - '@fuel-ts/errors': 0.84.0 - '@fuel-ts/utils': 0.84.0 + '@fuel-ts/errors': 0.85.0 + '@fuel-ts/utils': 0.85.0 '@noble/hashes': 1.4.0 ethers: 6.11.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) transitivePeerDependencies: - bufferutil - utf-8-validate - '@fuel-ts/errors@0.84.0': + '@fuel-ts/errors@0.85.0': dependencies: - '@fuel-ts/versions': 0.84.0 + '@fuel-ts/versions': 0.85.0 '@fuel-ts/forc@0.73.0': dependencies: @@ -6387,38 +6387,38 @@ snapshots: transitivePeerDependencies: - encoding - '@fuel-ts/forc@0.84.0': + '@fuel-ts/forc@0.85.0': dependencies: node-fetch: 2.7.0 transitivePeerDependencies: - encoding - '@fuel-ts/fuel-core@0.84.0': + '@fuel-ts/fuel-core@0.85.0': dependencies: node-fetch: 2.7.0 transitivePeerDependencies: - encoding - '@fuel-ts/hasher@0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': + '@fuel-ts/hasher@0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': dependencies: - '@fuel-ts/crypto': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/interfaces': 0.84.0 - '@fuel-ts/utils': 0.84.0 + '@fuel-ts/crypto': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/interfaces': 0.85.0 + '@fuel-ts/utils': 0.85.0 '@noble/hashes': 1.4.0 transitivePeerDependencies: - bufferutil - utf-8-validate - '@fuel-ts/interfaces@0.84.0': {} + '@fuel-ts/interfaces@0.85.0': {} '@fuel-ts/math@0.21.2': dependencies: '@types/bn.js': 5.1.5 bn.js: 5.2.1 - '@fuel-ts/math@0.84.0': + '@fuel-ts/math@0.85.0': dependencies: - '@fuel-ts/errors': 0.84.0 + '@fuel-ts/errors': 0.85.0 '@types/bn.js': 5.1.5 bn.js: 5.2.1 @@ -6432,67 +6432,68 @@ snapshots: '@fuel-ts/math': 0.21.2 '@fuel-ts/merkle-shared': 0.21.2 - '@fuel-ts/merkle@0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': + '@fuel-ts/merkle@0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': dependencies: - '@fuel-ts/hasher': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/math': 0.84.0 + '@fuel-ts/hasher': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/math': 0.85.0 transitivePeerDependencies: - bufferutil - utf-8-validate - '@fuel-ts/program@0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': + '@fuel-ts/program@0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': dependencies: - '@fuel-ts/abi-coder': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/account': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/address': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/errors': 0.84.0 - '@fuel-ts/interfaces': 0.84.0 - '@fuel-ts/math': 0.84.0 - '@fuel-ts/transactions': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/utils': 0.84.0 + '@fuel-ts/abi-coder': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/account': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/address': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/errors': 0.85.0 + '@fuel-ts/interfaces': 0.85.0 + '@fuel-ts/math': 0.85.0 + '@fuel-ts/transactions': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/utils': 0.85.0 '@fuels/vm-asm': 0.49.0 + ramda: 0.29.1 transitivePeerDependencies: - bufferutil - encoding - supports-color - utf-8-validate - '@fuel-ts/script@0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': - dependencies: - '@fuel-ts/abi-coder': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/account': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/address': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/errors': 0.84.0 - '@fuel-ts/interfaces': 0.84.0 - '@fuel-ts/math': 0.84.0 - '@fuel-ts/program': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/transactions': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/utils': 0.84.0 + '@fuel-ts/script@0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': + dependencies: + '@fuel-ts/abi-coder': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/account': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/address': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/errors': 0.85.0 + '@fuel-ts/interfaces': 0.85.0 + '@fuel-ts/math': 0.85.0 + '@fuel-ts/program': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/transactions': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/utils': 0.85.0 transitivePeerDependencies: - bufferutil - encoding - supports-color - utf-8-validate - '@fuel-ts/transactions@0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': + '@fuel-ts/transactions@0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7)': dependencies: - '@fuel-ts/abi-coder': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/address': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/errors': 0.84.0 - '@fuel-ts/hasher': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/interfaces': 0.84.0 - '@fuel-ts/math': 0.84.0 - '@fuel-ts/utils': 0.84.0 + '@fuel-ts/abi-coder': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/address': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/errors': 0.85.0 + '@fuel-ts/hasher': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/interfaces': 0.85.0 + '@fuel-ts/math': 0.85.0 + '@fuel-ts/utils': 0.85.0 transitivePeerDependencies: - bufferutil - utf-8-validate - '@fuel-ts/utils@0.84.0': + '@fuel-ts/utils@0.85.0': dependencies: - '@fuel-ts/errors': 0.84.0 - '@fuel-ts/interfaces': 0.84.0 + '@fuel-ts/errors': 0.85.0 + '@fuel-ts/interfaces': 0.85.0 - '@fuel-ts/versions@0.84.0': + '@fuel-ts/versions@0.85.0': dependencies: chalk: 4.1.2 cli-table: 0.3.11 @@ -9193,26 +9194,26 @@ snapshots: fsevents@2.3.3: optional: true - fuels@0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7): - dependencies: - '@fuel-ts/abi-coder': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/abi-typegen': 0.84.0 - '@fuel-ts/account': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/address': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/contract': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/crypto': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/errors': 0.84.0 - '@fuel-ts/forc': 0.84.0 - '@fuel-ts/fuel-core': 0.84.0 - '@fuel-ts/hasher': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/interfaces': 0.84.0 - '@fuel-ts/math': 0.84.0 - '@fuel-ts/merkle': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/program': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/script': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/transactions': 0.84.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) - '@fuel-ts/utils': 0.84.0 - '@fuel-ts/versions': 0.84.0 + fuels@0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7): + dependencies: + '@fuel-ts/abi-coder': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/abi-typegen': 0.85.0 + '@fuel-ts/account': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/address': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/contract': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/crypto': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/errors': 0.85.0 + '@fuel-ts/forc': 0.85.0 + '@fuel-ts/fuel-core': 0.85.0 + '@fuel-ts/hasher': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/interfaces': 0.85.0 + '@fuel-ts/math': 0.85.0 + '@fuel-ts/merkle': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/program': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/script': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/transactions': 0.85.0(bufferutil@4.0.5)(utf-8-validate@5.0.7) + '@fuel-ts/utils': 0.85.0 + '@fuel-ts/versions': 0.85.0 bundle-require: 4.0.2(esbuild@0.19.12) chalk: 4.1.2 chokidar: 3.6.0