diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67b20c55d91..3d7d7847f7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -240,7 +240,7 @@ jobs: runs-on: ubuntu-latest services: fuel-core: - image: ghcr.io/fuellabs/fuel-core:v0.18.2 + image: ghcr.io/fuellabs/fuel-core:v0.19.1 ports: - 4000:4000 steps: diff --git a/Cargo.lock b/Cargo.lock index 4662816f85d..6bd62e868a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -221,7 +221,7 @@ checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -427,15 +427,15 @@ dependencies = [ [[package]] name = "blake3" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729b71f35bd3fa1a4c86b85d32c8b9069ea7fe14f7a53cfabb65f62d4265b888" +checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" dependencies = [ "arrayref", "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq 0.2.6", + "constant_time_eq 0.3.0", "digest 0.10.7", ] @@ -500,7 +500,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", - "regex-automata 0.3.0", + "regex-automata 0.3.2", "serde", ] @@ -681,7 +681,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -735,7 +735,7 @@ dependencies = [ "getrandom 0.2.10", "hmac", "once_cell", - "pbkdf2 0.12.1", + "pbkdf2 0.12.2", "rand", "sha2 0.10.7", "thiserror", @@ -858,6 +858,12 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + [[package]] name = "convert_case" version = "0.4.0" @@ -871,7 +877,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", - "time 0.3.22", + "time 0.3.23", "version_check", ] @@ -888,7 +894,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "time 0.3.22", + "time 0.3.23", "url", ] @@ -1413,7 +1419,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -1505,6 +1511,12 @@ dependencies = [ "uint", ] +[[package]] +name = "ethnum" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0198b9d0078e0f30dedc7acbb21c974e838fc8fae3ee170128658a98cb2c1c04" + [[package]] name = "eventsource-client" version = "0.10.2" @@ -1528,7 +1540,7 @@ checksum = "dd65f1b59dd22d680c7a626cc4a000c1e03d241c51c3e034d2bc9f1e90734f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -1852,9 +1864,9 @@ dependencies = [ [[package]] name = "forc-wallet" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c665edcb55f5e6e4f839f1219b4aeab4ef9db354fc5f2eb499b9b93b5b93d84e" +checksum = "81c2e8aa94a9ab8b5f7f6b3aab53701d39b762b5add5b233e5f4241cdf86fad2" dependencies = [ "anyhow", "clap 4.3.11", @@ -1950,15 +1962,15 @@ dependencies = [ "regex", "serde", "serde_json", - "syn 2.0.23", + "syn 2.0.25", "thiserror", ] [[package]] name = "fuel-asm" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1331be83ba8ce8fa9217272b2709bbe29a01daff5fe7ef58ba1b64ec18fe40c0" +checksum = "938aaed0bfed319fab9c6f1196cecc11b55c734c0506613107e1319f98941d17" dependencies = [ "bitflags 1.3.2", "fuel-types", @@ -1968,9 +1980,9 @@ dependencies = [ [[package]] name = "fuel-core-chain-config" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e533fa1f86ae96579f4394205a7dfbad31715043f7119a82aa7a14effaed3a17" +checksum = "d5035cc52016a1d03946b15b776aded23a4dd57b20470ba7d32b0de7b5292319" dependencies = [ "anyhow", "bech32 0.9.1", @@ -1988,9 +2000,9 @@ dependencies = [ [[package]] name = "fuel-core-client" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38a6bf1c0a6e6acf848f4b994e0b91c96c4f443f71d26f437642d135d5d71d3d" +checksum = "730041e36f77a35d634e51f191497a2e182f10ef81721d26f0b2c49aac58469e" dependencies = [ "anyhow", "cynic", @@ -2011,9 +2023,9 @@ dependencies = [ [[package]] name = "fuel-core-storage" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ed1d03eb74feb0ea8538ab557e52c7bc4f1a1c3aaafba9076038da256d86920" +checksum = "b67a83eb8814625b3cfda2671b2bf81006b5164515a446b2274e68dbbdc3d093" dependencies = [ "anyhow", "fuel-core-types", @@ -2023,9 +2035,9 @@ dependencies = [ [[package]] name = "fuel-core-types" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "059da83a7e012a438c9962cbfe1e1b2d3e04f67a75d5be8899009b6456b04002" +checksum = "df7769e4edb5987d0f4cd53926a574ad8f1b5e3bc7c3462f4313799a8ac68f7b" dependencies = [ "anyhow", "derive_more", @@ -2039,9 +2051,9 @@ dependencies = [ [[package]] name = "fuel-crypto" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb3f73571a03523cb92826003753ff1bdd1882767e67801de223ce3ad6133349" +checksum = "aaa3e72ffbe936a643f2d83d91ac19ffd3c687a6f0b2015c6251c10bea60371f" dependencies = [ "borrown", "coins-bip32", @@ -2128,9 +2140,9 @@ dependencies = [ [[package]] name = "fuel-merkle" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d5646d95e02a63fd59da942fcf5d6217dbd8b6866c1ad3a0232be0913c4d077" +checksum = "abf2b9c4dc976a2e0fce4eda29673569fbe89ac86bf5255d3a928beb4c61b23b" dependencies = [ "digest 0.10.7", "fuel-storage", @@ -2142,15 +2154,15 @@ dependencies = [ [[package]] name = "fuel-storage" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b72444da90354b6d1d220b81c6803085689f5e7d53e1d4bd11cfa3d4c5a1b27" +checksum = "55e37ce148bbc07bd1398f717728976d9ad03f147bb500c70579cf317baacd32" [[package]] name = "fuel-tx" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04187579ecfbb04a380c60f9eecae1a288dbe463c111dc7dde66fa736445a638" +checksum = "960f7584fb62cd3af77d70deb015fad0ca1c52e3b0a8e29ff9b005e5b7157448" dependencies = [ "derivative", "fuel-asm", @@ -2168,9 +2180,9 @@ dependencies = [ [[package]] name = "fuel-types" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6543ca2f5124a19b1486507243188a57be64c9914d1908e154a1866eeffb69" +checksum = "d1f9f7bd0f0ae5f8dcebb2cec8d504f45a03fc0bca19c65bfd45b07ed5e9fb68" dependencies = [ "hex", "rand", @@ -2179,12 +2191,13 @@ dependencies = [ [[package]] name = "fuel-vm" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d42e99fe69e913bbde4900f96efb6ceae13b68d369bf22d4b435571d6ed7d65" +checksum = "d3a031708a34fcbee85bca5f4b9f0b61cd80bf8555972020ddee2420d7306a47" dependencies = [ "bitflags 1.3.2", "derivative", + "ethnum", "fuel-asm", "fuel-crypto", "fuel-merkle", @@ -2192,6 +2205,8 @@ dependencies = [ "fuel-tx", "fuel-types", "itertools", + "paste", + "primitive-types", "rand", "serde", "sha3", @@ -2201,9 +2216,9 @@ dependencies = [ [[package]] name = "fuels" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa81d69072a9d4ba6fac79d9b5b66348daf95089ecda85a9231e41e5dd45bc85" +checksum = "5280da1aababb8cae2c4f56d9ac43613e5aab328f62d146bc4598ed3a3e7d93b" dependencies = [ "fuel-core-client", "fuel-tx", @@ -2216,9 +2231,9 @@ dependencies = [ [[package]] name = "fuels-accounts" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a03259b1ece608c33541477fed7dea07bb3e78f25f85a8a3060f6501d6e982" +checksum = "58e79e6b022c45f8e13cbdbded36232cac380e6885eaac12e8b3234613ad2c3a" dependencies = [ "async-trait", "bytes", @@ -2243,9 +2258,9 @@ dependencies = [ [[package]] name = "fuels-code-gen" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e8ec25373ed1ae06cfe53afc4e3ecd6057aa4ff3a3329e40f42784afe21726b" +checksum = "051906531d2f79ac3a790f06590a5f8b3e63229482494ebdabcce3ca41d581d8" dependencies = [ "Inflector", "fuel-abi-types 0.3.0", @@ -2254,14 +2269,14 @@ dependencies = [ "quote", "regex", "serde_json", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] name = "fuels-core" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b133aff726340284937e3233b8c9dd8429812dd463e4e6f53373ca13e644c99" +checksum = "3ca6bc2b138bcbbd94bc5e00129f0062268135f085208e63c58c9c59a4efc9e5" dependencies = [ "bech32 0.9.1", "chrono", @@ -2283,13 +2298,14 @@ dependencies = [ "strum", "strum_macros 0.24.3", "thiserror", + "uint", ] [[package]] name = "fuels-macros" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef684e13ddc8b16f7828dc98ca309f69a6516068bb307c78b8e64aaf010b397" +checksum = "9dfcb6d4b7f354a55c061350f8013f739b0833758baa1b89e2e1b35791e6030e" dependencies = [ "Inflector", "fuel-abi-types 0.3.0", @@ -2300,14 +2316,14 @@ dependencies = [ "rand", "regex", "serde_json", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] name = "fuels-programs" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09e582cc270a794e02e40150f79d2a92830bf5adaaadf4147de02689ae17c287" +checksum = "32e4febb48ea24ef35489174dc76f449f7d12dadbe22b970ab70250d024405e2" dependencies = [ "async-trait", "bytes", @@ -2333,9 +2349,9 @@ dependencies = [ [[package]] name = "fuels-test-helpers" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b0f1475beb61ad66163dc57234170b7319aacf79d9147a28c7ff43cc6fd8f0" +checksum = "823d2016fbfe3efbc2e16f1f40f5bda85922e1207f00be50579036ed3a8639d9" dependencies = [ "fuel-core-chain-config", "fuel-core-client", @@ -2419,7 +2435,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -3151,9 +3167,9 @@ checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", "rustix 0.38.3", @@ -3906,7 +3922,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -4055,9 +4071,9 @@ dependencies = [ [[package]] name = "pbkdf2" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", "hmac", @@ -4126,7 +4142,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -4213,7 +4229,7 @@ checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -4246,16 +4262,16 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plist" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" +checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06" dependencies = [ "base64 0.21.2", "indexmap 1.9.3", "line-wrap", "quick-xml", "serde", - "time 0.3.22", + "time 0.3.23", ] [[package]] @@ -4390,9 +4406,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" dependencies = [ "unicode-ident", ] @@ -4426,9 +4442,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.28.2" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" +checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" dependencies = [ "memchr", ] @@ -4572,13 +4588,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89089e897c013b3deb627116ae56a6955a72b8bed395c9526af31c9fe528b484" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.0", + "regex-automata 0.3.2", "regex-syntax 0.7.3", ] @@ -4593,9 +4609,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa250384981ea14565685dea16a9ccc4d1c541a13f82b9c168572264d1df8c56" +checksum = "83d3daa6976cffb758ec878f108ba0e062a45b2d6ca3a2cca965338855476caf" dependencies = [ "aho-corasick", "memchr", @@ -5113,22 +5129,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.166" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.166" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -5159,7 +5175,7 @@ checksum = "1d89a8107374290037607734c0b73a85db7ed80cae314b3c5791f192a496e731" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -5333,9 +5349,9 @@ checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" [[package]] name = "snafu" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0656e7e3ffb70f6c39b3c2a86332bb74aa3c679da781642590f3c1118c5045" +checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" dependencies = [ "backtrace", "doc-comment", @@ -5344,9 +5360,9 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475b3bbe5245c26f2d8a6f62d67c1f30eb9fffeccee721c45d162c3ebbdf81b2" +checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -5708,9 +5724,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.23" +version = "2.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" +checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" dependencies = [ "proc-macro2", "quote", @@ -5960,22 +5976,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.41" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c16a64ba9387ef3fdae4f9c1a7f07a0997fce91985c0336f1ddc1822b3b37802" +checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.41" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14928354b01c4d6a4f0e549069adef399a284e7995c7ccca94e8a07a5346c59" +checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -6001,9 +6017,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" dependencies = [ "itoa", "serde", @@ -6019,9 +6035,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" dependencies = [ "time-core", ] @@ -6107,7 +6123,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -6267,7 +6283,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -6353,9 +6369,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uint" @@ -6596,7 +6612,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", "wasm-bindgen-shared", ] @@ -6630,7 +6646,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6884,9 +6900,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" +checksum = "81a2094c43cc94775293eaa0e499fbc30048a6d824ac82c0351a8c0bf9112529" dependencies = [ "memchr", ] @@ -7039,5 +7055,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] diff --git a/Cargo.toml b/Cargo.toml index ccb7d375eec..addc9919881 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,14 +31,14 @@ exclude = [ ] [workspace.dependencies] -fuel-asm = "0.31.1" -fuel-crypto = "0.31.1" -fuel-types = "0.31.1" -fuel-tx = "0.31.1" -fuel-core-client = { version = "0.18.2", default-features = false } -fuel-vm = "0.31.2" -fuels-core = "0.43" -fuels-accounts = "0.43" +fuel-asm = "0.34.1" +fuel-crypto = "0.34.1" +fuel-types = "0.34.1" +fuel-tx = "0.34.1" +fuel-core-client = { version = "0.19.1", default-features = false } +fuel-vm = "0.34.1" +fuels-core = "0.44" +fuels-accounts = "0.44" [workspace.package] edition = "2021" diff --git a/ci_checks.sh b/ci_checks.sh index adbb58dda43..ae689aa98ef 100755 --- a/ci_checks.sh +++ b/ci_checks.sh @@ -6,7 +6,7 @@ # - `cargo run --locked --release --bin test -- --locked` # # You can install `fuel-core` node by: -# `cargo install fuel-core-bin --git https://github.com/FuelLabs/fuel-core --tag v0.18.1 --locked` +# `cargo install fuel-core-bin --git https://github.com/FuelLabs/fuel-core --tag v0.19.1 --locked` # # And run it with: # `fuel-core run --db-type in-memory` diff --git a/forc-pkg/src/pkg.rs b/forc-pkg/src/pkg.rs index e8f40e41a12..b6c53d35bc4 100644 --- a/forc-pkg/src/pkg.rs +++ b/forc-pkg/src/pkg.rs @@ -25,7 +25,7 @@ use std::{ str::FromStr, sync::Arc, }; -use sway_core::fuel_prelude::fuel_tx::ConsensusParameters; +use sway_core::fuel_prelude::fuel_types::ChainId; pub use sway_core::Programs; use sway_core::{ abi_generation::{ @@ -500,10 +500,7 @@ impl BuiltPackage { // TODO: Pass the user specified `ChainId` into `predicate_owner` let root = format!( "0x{}", - fuel_tx::Input::predicate_owner( - &self.bytecode.bytes, - &ConsensusParameters::DEFAULT - ) + fuel_tx::Input::predicate_owner(&self.bytecode.bytes, &ChainId::default(),) ); let root_file_name = format!("{}{}", &pkg_name, SWAY_BIN_ROOT_SUFFIX); let root_path = output_dir.join(root_file_name); diff --git a/forc-plugins/forc-client/Cargo.toml b/forc-plugins/forc-client/Cargo.toml index 63ee2bdce89..bd0ae26629e 100644 --- a/forc-plugins/forc-client/Cargo.toml +++ b/forc-plugins/forc-client/Cargo.toml @@ -19,7 +19,7 @@ forc-pkg = { version = "0.42.1", path = "../../forc-pkg" } forc-tracing = { version = "0.42.1", path = "../../forc-tracing" } forc-tx = { version = "0.42.1", path = "../forc-tx" } forc-util = { version = "0.42.1", path = "../../forc-util" } -forc-wallet = "0.2.3" +forc-wallet = "0.2.4" fuel-abi-types = "0.3" fuel-core-client = { workspace = true } fuel-crypto = { workspace = true } diff --git a/forc-plugins/forc-client/src/util/tx.rs b/forc-plugins/forc-client/src/util/tx.rs index 2a081ea1ac3..d9846b92cd9 100644 --- a/forc-plugins/forc-client/src/util/tx.rs +++ b/forc-plugins/forc-client/src/util/tx.rs @@ -228,7 +228,7 @@ impl TransactionBuild None }; - let mut tx = self._finalize_without_signature(); + let mut tx = self.finalize_without_signature_inner(); if !unsigned { let signature = if let Some(signing_key) = signing_key { @@ -237,16 +237,16 @@ impl TransactionBuild // of a cryptographically secure hash. However, the bytes are // coming from `tx.id()`, which already uses `Hasher::hash()` // to hash it using a secure hash mechanism. - let message = Message::from_bytes(*tx.id(¶ms)); + let message = Message::from_bytes(*tx.id(¶ms.chain_id)); Signature::sign(&signing_key, &message) } else { - prompt_signature(tx.id(¶ms))? + prompt_signature(tx.id(¶ms.chain_id))? }; let witness = Witness::from(signature.as_ref()); tx.replace_witness(signature_witness_index, witness); } - tx.precompute(¶ms); + tx.precompute(¶ms.chain_id)?; Ok(tx) } diff --git a/forc-plugins/forc-tx/src/lib.rs b/forc-plugins/forc-tx/src/lib.rs index 91939744cda..a29772c51ff 100644 --- a/forc-plugins/forc-tx/src/lib.rs +++ b/forc-plugins/forc-tx/src/lib.rs @@ -153,6 +153,9 @@ pub struct InputCoin { /// UTXO being spent must have been created at least this many blocks ago. #[clap(long)] pub maturity: u32, + /// Gas used by predicates. + #[clap(long, default_value_t = 0)] + pub predicate_gas_used: u64, #[clap(flatten)] pub predicate: Predicate, } @@ -199,6 +202,9 @@ pub struct InputMessage { /// Index of witness that authorizes the message. #[clap(long)] pub witness_ix: Option, + /// Gas used by predicates. + #[clap(long, default_value_t = 0)] + pub predicate_gas_used: u64, #[clap(flatten)] pub predicate: Predicate, } @@ -700,6 +706,7 @@ impl TryFrom for fuel_tx::Input { asset_id, tx_ptr: tx_pointer, maturity, + predicate_gas_used, predicate, witness_ix, } = coin; @@ -721,6 +728,7 @@ impl TryFrom for fuel_tx::Input { asset_id, tx_pointer, maturity.into(), + predicate_gas_used, std::fs::read(&predicate).map_err(|err| { ConvertInputError::PredicateRead { path: predicate, @@ -755,6 +763,7 @@ impl TryFrom for fuel_tx::Input { nonce, msg_data, witness_ix, + predicate_gas_used, predicate, } = msg; let data = @@ -803,6 +812,7 @@ impl TryFrom for fuel_tx::Input { recipient, amount, nonce, + predicate_gas_used, predicate, predicate_data, ) @@ -812,6 +822,7 @@ impl TryFrom for fuel_tx::Input { recipient, amount, nonce, + predicate_gas_used, data, predicate, predicate_data, diff --git a/sway-core/src/asm_generation/fuel/fuel_asm_builder.rs b/sway-core/src/asm_generation/fuel/fuel_asm_builder.rs index b1c3a4ae0ac..e848a08f5b9 100644 --- a/sway-core/src/asm_generation/fuel/fuel_asm_builder.rs +++ b/sway-core/src/asm_generation/fuel/fuel_asm_builder.rs @@ -142,12 +142,15 @@ impl<'ir, 'eng> FuelAsmBuilder<'ir, 'eng> { func_is_entry: bool, ) -> CompileResult<()> { let Some(instruction) = instr_val.get_instruction(self.context) else { - return err(vec![], vec![CompileError::Internal( - "Value not an instruction.", - self.md_mgr - .val_to_span(self.context, *instr_val) - .unwrap_or_else(Span::dummy), - )]); + return err( + vec![], + vec![CompileError::Internal( + "Value not an instruction.", + self.md_mgr + .val_to_span(self.context, *instr_val) + .unwrap_or_else(Span::dummy), + )], + ); }; // The only instruction whose compilation returns a CompileResult itself is AsmBlock, which diff --git a/sway-core/src/asm_generation/fuel/register_allocator.rs b/sway-core/src/asm_generation/fuel/register_allocator.rs index 8677b6e64d2..6a00c00170b 100644 --- a/sway-core/src/asm_generation/fuel/register_allocator.rs +++ b/sway-core/src/asm_generation/fuel/register_allocator.rs @@ -825,9 +825,12 @@ fn spill(ops: &[Op], spills: &FxHashSet) -> Vec { let cfe_idx = cfe_idx_opt.expect("Function does not have CFEI instruction for locals"); - let Either::Left(VirtualOp::CFEI(VirtualImmediate24 { value: locals_size_bytes })) = ops[cfe_idx].opcode else { - panic!("Unexpected opcode"); - }; + let Either::Left(VirtualOp::CFEI(VirtualImmediate24 { + value: locals_size_bytes, + })) = ops[cfe_idx].opcode + else { + panic!("Unexpected opcode"); + }; // pad up the locals size in bytes to a word. let locals_size_bytes = size_bytes_round_up_to_word_alignment!(locals_size_bytes); diff --git a/sway-core/src/ir_generation/const_eval.rs b/sway-core/src/ir_generation/const_eval.rs index 66e908a02ad..85fec65b37a 100644 --- a/sway-core/src/ir_generation/const_eval.rs +++ b/sway-core/src/ir_generation/const_eval.rs @@ -739,7 +739,8 @@ fn const_eval_intrinsic( assert!( args.len() == 2 && ty.is_uint(lookup.context) && ty.eq(lookup.context, &args[1].ty) ); - let (ConstantValue::Uint(arg1), ConstantValue::Uint(ref arg2)) = (&args[0].value, &args[1].value) + let (ConstantValue::Uint(arg1), ConstantValue::Uint(ref arg2)) = + (&args[0].value, &args[1].value) else { panic!("Type checker allowed incorrect args to binary op"); }; @@ -775,7 +776,8 @@ fn const_eval_intrinsic( && args[1].ty.is_uint64(lookup.context) ); - let (ConstantValue::Uint(arg1), ConstantValue::Uint(ref arg2)) = (&args[0].value, &args[1].value) + let (ConstantValue::Uint(arg1), ConstantValue::Uint(ref arg2)) = + (&args[0].value, &args[1].value) else { panic!("Type checker allowed incorrect args to binary op"); }; @@ -854,20 +856,22 @@ fn const_eval_intrinsic( })) } sway_ast::Intrinsic::Gt => { - let (ConstantValue::Uint(val1), ConstantValue::Uint(val2)) = (&args[0].value, &args[1].value) - else { - unreachable!("Type checker allowed non integer value for GreaterThan") - }; + let (ConstantValue::Uint(val1), ConstantValue::Uint(val2)) = + (&args[0].value, &args[1].value) + else { + unreachable!("Type checker allowed non integer value for GreaterThan") + }; Ok(Some(Constant { ty: Type::get_bool(lookup.context), value: ConstantValue::Bool(val1 > val2), })) } sway_ast::Intrinsic::Lt => { - let (ConstantValue::Uint(val1), ConstantValue::Uint(val2)) = (&args[0].value, &args[1].value) - else { - unreachable!("Type checker allowed non integer value for LessThan") - }; + let (ConstantValue::Uint(val1), ConstantValue::Uint(val2)) = + (&args[0].value, &args[1].value) + else { + unreachable!("Type checker allowed non integer value for LessThan") + }; Ok(Some(Constant { ty: Type::get_bool(lookup.context), value: ConstantValue::Bool(val1 < val2), diff --git a/sway-ir/src/irtype.rs b/sway-ir/src/irtype.rs index 59f7f3f32eb..3289003fd3a 100644 --- a/sway-ir/src/irtype.rs +++ b/sway-ir/src/irtype.rs @@ -298,7 +298,10 @@ impl Type { let Some(Constant { value: ConstantValue::Uint(idx), ty: _, - }) = idx.get_constant(context) else { return None; }; + }) = idx.get_constant(context) + else { + return None; + }; ty.and_then(|(ty, accum_offset)| { if ty.is_struct(context) { // Sum up all sizes of all previous fields. diff --git a/sway-ir/src/optimize/constants.rs b/sway-ir/src/optimize/constants.rs index a3e2d2f1dbf..e371530df74 100644 --- a/sway-ir/src/optimize/constants.rs +++ b/sway-ir/src/optimize/constants.rs @@ -120,18 +120,20 @@ fn combine_cmp(context: &mut Context, function: &Function) -> bool { let val1 = val1.get_constant(context).unwrap(); let val2 = val2.get_constant(context).unwrap(); match pred { - Predicate::Equal => { - Some((inst_val, block, val1.eq(context, val2))) - } + Predicate::Equal => Some((inst_val, block, val1.eq(context, val2))), Predicate::GreaterThan => { - let (ConstantValue::Uint(val1), ConstantValue::Uint(val2)) = (&val1.value, &val2.value) + let (ConstantValue::Uint(val1), ConstantValue::Uint(val2)) = + (&val1.value, &val2.value) else { - unreachable!("Type checker allowed non integer value for GreaterThan") + unreachable!( + "Type checker allowed non integer value for GreaterThan" + ) }; Some((inst_val, block, val1 > val2)) } Predicate::LessThan => { - let (ConstantValue::Uint(val1), ConstantValue::Uint(val2)) = (&val1.value, &val2.value) + let (ConstantValue::Uint(val1), ConstantValue::Uint(val2)) = + (&val1.value, &val2.value) else { unreachable!("Type checker allowed non integer value for LessThan") }; diff --git a/sway-ir/src/optimize/memcpyopt.rs b/sway-ir/src/optimize/memcpyopt.rs index 159c5854136..c9bb95f34ec 100644 --- a/sway-ir/src/optimize/memcpyopt.rs +++ b/sway-ir/src/optimize/memcpyopt.rs @@ -264,7 +264,8 @@ fn local_copy_prop_prememcpy(context: &mut Context, function: Function) -> Resul for (value, replace_with) in replaces.into_iter() { match replace_with { ReplaceWith::InPlaceLocal(replacement_var) => { - let Some(Instruction::GetLocal(redundant_var)) = value.get_instruction(context) else { + let Some(Instruction::GetLocal(redundant_var)) = value.get_instruction(context) + else { panic!("earlier match now fails"); }; if redundant_var.is_mutable(context) { diff --git a/templates/sway-test-rs/template/Cargo.toml b/templates/sway-test-rs/template/Cargo.toml index 243a37f3208..0556e093861 100644 --- a/templates/sway-test-rs/template/Cargo.toml +++ b/templates/sway-test-rs/template/Cargo.toml @@ -7,7 +7,7 @@ authors = ["{{authors}}"] license = "Apache-2.0" [dev-dependencies] -fuels = { version = "0.42", features = ["fuel-core-lib"] } +fuels = { version = "0.44", features = ["fuel-core-lib"] } tokio = { version = "1.12", features = ["rt", "macros"] } [[test]] diff --git a/test/src/e2e_vm_tests/mod.rs b/test/src/e2e_vm_tests/mod.rs index ebe5514a7b6..80d5272934b 100644 --- a/test/src/e2e_vm_tests/mod.rs +++ b/test/src/e2e_vm_tests/mod.rs @@ -340,6 +340,7 @@ impl TestContext { .collect(); if !failed.is_empty() { + println!("FAILED!! output:\n{}", output); panic!( "For {name}\n{} tests failed:\n{}", failed.len(), diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/src/main.sw index d9da82249cc..3aa2af100f2 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/array_of_structs_caller/src/main.sw @@ -4,7 +4,7 @@ use array_of_structs_abi::{Id, TestContract, Wrapper}; use std::hash::sha256; fn main() -> u64 { - let addr = abi(TestContract, 0xb534f555ed15c5f99dc318f4260faeba317ecefa094aba85c5c5e7ad043480ad); + let addr = abi(TestContract, 0x8be98f018738eb6e554372cc3e57c24475662e6eeff9781be50b146c41e72d05); let input = [Wrapper { id: Id { diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/bal_opcode/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/bal_opcode/src/main.sw index 1fa72f097cb..6b92767b127 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/bal_opcode/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/bal_opcode/src/main.sw @@ -5,7 +5,7 @@ use balance_test_abi::BalanceTest; fn main() -> bool { // @todo switch to using ContractId when abi signature changes. - let balance_test_contract_id = 0xa49cbeebc26a586897a895092ee2bc138c982ee31404e7bc9d2c1d9bbec6e036; + let balance_test_contract_id = 0x4a00baa517980432b9274a0e2f03c88735bdb483730816679c6eb37b4046d060; let balance_test_contract = abi(BalanceTest, balance_test_contract_id); let number = balance_test_contract.get_42 { diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_abi_with_tuples/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_abi_with_tuples/src/main.sw index 5f56edd1b87..74d8e2428ff 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_abi_with_tuples/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_abi_with_tuples/src/main.sw @@ -3,7 +3,7 @@ script; use abi_with_tuples::*; fn main() -> bool { - let the_abi = abi(MyContract, 0x553558ff0c47820e5012953153ec30658bd2df11ef013139839551579dbff2f0); + let the_abi = abi(MyContract, 0x7376aa3e846e8cefcd6e8c2dfea32e15cc8fef3bbdc67ef115897e0f09391cfc); let param1 = ( Person { diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_basic_storage/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_basic_storage/src/main.sw index f24dfc51f20..7ffacffc4c0 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_basic_storage/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_basic_storage/src/main.sw @@ -2,7 +2,7 @@ script; use basic_storage_abi::{BasicStorage, Quad}; fn main() -> u64 { - let addr = abi(BasicStorage, 0xd32372eac35fc0d05d1cbefb6d5f6a51f14ea024e4cb452ed3faa99b4ddb165d); + let addr = abi(BasicStorage, 0xceb326912590088f7eb8659b2aaa9cf3519bfdb8e50a85a6e85650b143ab048a); let key = 0x0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; let value = 4242; diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_contract_with_type_aliases/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_contract_with_type_aliases/src/main.sw index 5106224cdfe..b532e7f1066 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_contract_with_type_aliases/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_contract_with_type_aliases/src/main.sw @@ -3,7 +3,7 @@ script; use contract_with_type_aliases_abi::*; fn main() { - let caller = abi(MyContract, 0x327fe8d236dd68c93d9e16e3a28fb3ab45404fa75b44e6ebf435e74984cd56fd); + let caller = abi(MyContract, 0xbd6247bd39fdb5659cfe97f377ab76bc408f79d916846e8f572067eae863686c); let x = AssetId::from(0x0101010101010101010101010101010101010101010101010101010101010101); diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_increment_contract/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_increment_contract/src/main.sw index 030066e8aee..56ba9f13a2b 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_increment_contract/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/call_increment_contract/src/main.sw @@ -3,7 +3,7 @@ script; use increment_abi::Incrementor; fn main() -> bool { - let the_abi = abi(Incrementor, 0x0f18501abf5e6bb3117f73578dacbde5a51b0ba75d32d402e2e955e0c06a8112); + let the_abi = abi(Incrementor, 0x8d7fecc21740f83bf8fa26f53c8f389681e728bd2917a978716d7b8a34f9f826); the_abi.increment(5); the_abi.increment(5); let result = the_abi.get(); diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/src/main.sw index 10673282487..63fab0c292d 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/src/main.sw @@ -4,7 +4,7 @@ use auth_testing_abi::AuthTesting; // should be false in the case of a script fn main() -> bool { - let caller = abi(AuthTesting, 0x98c8c9232f0a2b2558889628ffb36cfc1a7224c9afc104522bfdb1b49a882489); + let caller = abi(AuthTesting, 0x10f04ba40bd185d6e2e326a9f8be6d1c1f96b7a021faecea1bd46fc4b5cce885); let result = caller.returns_gm_one(); assert(result); result diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_context_test/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_context_test/src/main.sw index 4ce7c2fdfc3..441dcbd37ea 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_context_test/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/caller_context_test/src/main.sw @@ -7,7 +7,7 @@ fn main() -> bool { let zero = b256::min(); let gas: u64 = u64::max(); let amount: u64 = 11; - let other_contract_id = ContractId::from(0x8049358afbe3e0c919d595aab87074ad6e192ae6e13058fb0f15fc5ca09da66d); + let other_contract_id = ContractId::from(0x419a6e9cbe1fc4122755f7aea3403331216b34a5fbd85a2388055bcc5cceb936); let base_asset_id = BASE_ASSET_ID; let test_contract = abi(ContextTesting, other_contract_id.into()); diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/nested_struct_args_caller/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/nested_struct_args_caller/src/main.sw index 33ac2857e19..3b01b13ea91 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/nested_struct_args_caller/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/nested_struct_args_caller/src/main.sw @@ -3,7 +3,7 @@ script; use nested_struct_args_abi::*; fn main() -> bool { - let contract_id = 0x33639d15e9187676324cf8a42f6e15349660dc04d4cd52a9919bb9b3f15f732e; + let contract_id = 0xfa4bb608c7de0db473862926816eb23d17469ec2ef08685aab3c4ddd1892f9a8; let caller = abi(NestedStructArgs, contract_id); let param_one = StructOne { diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/storage_access_caller/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/storage_access_caller/src/main.sw index a836cf6a0e7..b3aa4824b29 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/storage_access_caller/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/storage_access_caller/src/main.sw @@ -4,7 +4,7 @@ use storage_access_abi::*; use std::hash::sha256; fn main() -> bool { - let contract_id = 0x1838d1e56392f46b1da5620c81cbb0d371520365dee7300b56112e74dd6fc24d; + let contract_id = 0x21519bb45315d4918b4ffb9c579626d64bdbd0948e257dd192dc082af9087055; let caller = abi(StorageAccess, contract_id); // Test initializers diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/token_ops_test/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/token_ops_test/src/main.sw index 80df85cdcef..ba9d9e97caa 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/token_ops_test/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/require_contract_deployment/token_ops_test/src/main.sw @@ -14,10 +14,10 @@ fn main() -> bool { let default_gas = 1_000_000_000_000; // the deployed fuel_coin Contract_Id: - let fuelcoin_id = ContractId::from(0x1965bb988d9f2d052ee947f5ec33a5cba8f140cee7cf1ef084215c12915709e2); + let fuelcoin_id = ContractId::from(0x65a04f8f865d98dd97ea638d7c1ea7b807670226a5091ccd38bae3f2eeead286); // contract ID for sway/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/balance_test_contract/ - let balance_test_id = ContractId::from(0xa49cbeebc26a586897a895092ee2bc138c982ee31404e7bc9d2c1d9bbec6e036); + let balance_test_id = ContractId::from(0x4a00baa517980432b9274a0e2f03c88735bdb483730816679c6eb37b4046d060); // todo: use correct type ContractId let fuel_coin = abi(TestFuelCoin, fuelcoin_id.into()); diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/unit_tests/workspace_test/contract_multi_test/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_pass/unit_tests/workspace_test/contract_multi_test/src/main.sw index bc931e1df58..2ae433b872a 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/unit_tests/workspace_test/contract_multi_test/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_pass/unit_tests/workspace_test/contract_multi_test/src/main.sw @@ -17,7 +17,7 @@ fn test_foo() { #[test(should_revert)] fn test_fail() { - let contract_id = 0x6c7fdd957919f63b4fd62074a2641425d20e077fe057cb2e48f1e35a8b6ef3f4; + let contract_id = 0x3fa23a7eb36576f090f6895a41a32189ce2e2a8406948cdf71a88b8ce023d5a5; let caller = abi(MyContract, contract_id); let result = caller.test_function {}(); assert(result == false) @@ -25,7 +25,7 @@ fn test_fail() { #[test] fn test_success() { - let contract_id = 0x6c7fdd957919f63b4fd62074a2641425d20e077fe057cb2e48f1e35a8b6ef3f4; + let contract_id = 0x3fa23a7eb36576f090f6895a41a32189ce2e2a8406948cdf71a88b8ce023d5a5; let caller = abi(MyContract, contract_id); let result = caller.test_function {}(); assert(result == true) diff --git a/test/src/sdk-harness/Cargo.lock b/test/src/sdk-harness/Cargo.lock index bc3d9fbc2ef..a8d95c17191 100644 --- a/test/src/sdk-harness/Cargo.lock +++ b/test/src/sdk-harness/Cargo.lock @@ -238,7 +238,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -249,7 +249,7 @@ checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -537,7 +537,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -582,7 +582,7 @@ dependencies = [ "getrandom", "hmac", "once_cell", - "pbkdf2 0.12.1", + "pbkdf2 0.12.2", "rand", "sha2 0.10.7", "thiserror", @@ -646,7 +646,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "percent-encoding", - "time 0.3.22", + "time 0.3.23", "version_check", ] @@ -663,7 +663,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "time 0.3.22", + "time 0.3.23", "url", ] @@ -1032,7 +1032,7 @@ checksum = "eecf8589574ce9b895052fa12d69af7a233f99e6107f5cb8dd1044f2a17bfdcb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -1084,6 +1084,12 @@ dependencies = [ "uuid", ] +[[package]] +name = "ethnum" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0198b9d0078e0f30dedc7acbb21c974e838fc8fae3ee170128658a98cb2c1c04" + [[package]] name = "eventsource-client" version = "0.10.2" @@ -1158,15 +1164,15 @@ dependencies = [ "regex", "serde", "serde_json", - "syn 2.0.23", + "syn 2.0.25", "thiserror", ] [[package]] name = "fuel-asm" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1331be83ba8ce8fa9217272b2709bbe29a01daff5fe7ef58ba1b64ec18fe40c0" +checksum = "938aaed0bfed319fab9c6f1196cecc11b55c734c0506613107e1319f98941d17" dependencies = [ "bitflags 1.3.2", "fuel-types", @@ -1176,9 +1182,9 @@ dependencies = [ [[package]] name = "fuel-core" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c978d128cd4cc73675a5424a67c5c0dbb70fbb52bb6e5d1bf38664f966e369d" +checksum = "ef273accbd9652e90044b4ab0a1c6dc75a2a3ce83c5598d0869f58524e2eb13f" dependencies = [ "anyhow", "async-graphql", @@ -1218,9 +1224,9 @@ dependencies = [ [[package]] name = "fuel-core-chain-config" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e533fa1f86ae96579f4394205a7dfbad31715043f7119a82aa7a14effaed3a17" +checksum = "d5035cc52016a1d03946b15b776aded23a4dd57b20470ba7d32b0de7b5292319" dependencies = [ "anyhow", "bech32 0.9.1", @@ -1238,9 +1244,9 @@ dependencies = [ [[package]] name = "fuel-core-client" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38a6bf1c0a6e6acf848f4b994e0b91c96c4f443f71d26f437642d135d5d71d3d" +checksum = "730041e36f77a35d634e51f191497a2e182f10ef81721d26f0b2c49aac58469e" dependencies = [ "anyhow", "cynic", @@ -1261,9 +1267,9 @@ dependencies = [ [[package]] name = "fuel-core-consensus-module" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10dfa90f07cd210da9e16c61f5405a9d5c71a701848e6f9e01a1568b3b8c0f91" +checksum = "6ad1435a0838e3707bb2450bbfa590b681244dd22246209d1718b6c8657b829b" dependencies = [ "anyhow", "fuel-core-chain-config", @@ -1274,9 +1280,9 @@ dependencies = [ [[package]] name = "fuel-core-database" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5b8f8f12e8b7dfa5e68ee32cbecfba2e8aa2a06b930fd181f0b4ae71652484" +checksum = "656f02a737146f2eec78fc97c57aa583b685dd51863617c028a930525e14cef4" dependencies = [ "anyhow", "fuel-core-storage", @@ -1286,9 +1292,9 @@ dependencies = [ [[package]] name = "fuel-core-executor" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0dc752bfd46dee5ab51fd46f13858b9aa85865ba76d180c9c8e3cc0b25949b" +checksum = "42c1e532902b60a5272a9006e698c9bcc2797173515f8811b5087998ecde6835" dependencies = [ "anyhow", "fuel-core-chain-config", @@ -1298,9 +1304,9 @@ dependencies = [ [[package]] name = "fuel-core-importer" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0989eb91e18f3541b7a690ed3bca92521939e80f507a08ce0fd6d8bf34cf1eb" +checksum = "dc48cc7f2fda4d3d468cddd9259d2c5ddd7ca0eda09ab553557a358c2ed8680c" dependencies = [ "anyhow", "fuel-core-storage", @@ -1312,9 +1318,9 @@ dependencies = [ [[package]] name = "fuel-core-metrics" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "401e1a1187a91f1df5808c8416137623f119f058f6c6e2710d43c58744e9fa14" +checksum = "bee942c4d08547cc5242609ed8d21d64a2eeea3996c030c067e96706b89fedcd" dependencies = [ "axum", "lazy_static", @@ -1325,9 +1331,9 @@ dependencies = [ [[package]] name = "fuel-core-poa" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e15616957477d7c37f5845d58abcb13f8ab9a7f526a499a795bb7b8618c6e238" +checksum = "ae4df2341d6b178fd15bda16a41919268f38e48acb2018136b56ae700d2f15b5" dependencies = [ "anyhow", "async-trait", @@ -1342,9 +1348,9 @@ dependencies = [ [[package]] name = "fuel-core-producer" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df203c0e56c1827831a363e895aea7c9c642c18f1a57adbdd8ac6c4e115231dc" +checksum = "b5104778a7f964fa3a5f2386ade44b78461670bfd1d8a0ad3aa5e06e90efbe3d" dependencies = [ "anyhow", "async-trait", @@ -1358,9 +1364,9 @@ dependencies = [ [[package]] name = "fuel-core-services" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecc615cb429744e1783db0d5b30dd01ec0d73c675f47964e62edc1f01b40ac2" +checksum = "c263bb70c6a5d06618ff7fb96d9b9974da47f61b13e902e1dd492c0485e3f601" dependencies = [ "anyhow", "async-trait", @@ -1372,9 +1378,9 @@ dependencies = [ [[package]] name = "fuel-core-storage" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ed1d03eb74feb0ea8538ab557e52c7bc4f1a1c3aaafba9076038da256d86920" +checksum = "b67a83eb8814625b3cfda2671b2bf81006b5164515a446b2274e68dbbdc3d093" dependencies = [ "anyhow", "fuel-core-types", @@ -1384,9 +1390,9 @@ dependencies = [ [[package]] name = "fuel-core-txpool" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d563ceae0ed89ed34f78a7835d15a40ef9d35c9b260b622049335e6c8deb884f" +checksum = "942792c1a6a4d244fdd3922d63b1308c6f67bcc5a7a72289fa6c063c44cd9331" dependencies = [ "anyhow", "async-trait", @@ -1403,9 +1409,9 @@ dependencies = [ [[package]] name = "fuel-core-types" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "059da83a7e012a438c9962cbfe1e1b2d3e04f67a75d5be8899009b6456b04002" +checksum = "df7769e4edb5987d0f4cd53926a574ad8f1b5e3bc7c3462f4313799a8ac68f7b" dependencies = [ "anyhow", "derive_more", @@ -1419,9 +1425,9 @@ dependencies = [ [[package]] name = "fuel-crypto" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb3f73571a03523cb92826003753ff1bdd1882767e67801de223ce3ad6133349" +checksum = "aaa3e72ffbe936a643f2d83d91ac19ffd3c687a6f0b2015c6251c10bea60371f" dependencies = [ "borrown", "coins-bip32", @@ -1437,9 +1443,9 @@ dependencies = [ [[package]] name = "fuel-merkle" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d5646d95e02a63fd59da942fcf5d6217dbd8b6866c1ad3a0232be0913c4d077" +checksum = "abf2b9c4dc976a2e0fce4eda29673569fbe89ac86bf5255d3a928beb4c61b23b" dependencies = [ "digest 0.10.7", "fuel-storage", @@ -1451,15 +1457,15 @@ dependencies = [ [[package]] name = "fuel-storage" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b72444da90354b6d1d220b81c6803085689f5e7d53e1d4bd11cfa3d4c5a1b27" +checksum = "55e37ce148bbc07bd1398f717728976d9ad03f147bb500c70579cf317baacd32" [[package]] name = "fuel-tx" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04187579ecfbb04a380c60f9eecae1a288dbe463c111dc7dde66fa736445a638" +checksum = "960f7584fb62cd3af77d70deb015fad0ca1c52e3b0a8e29ff9b005e5b7157448" dependencies = [ "derivative", "fuel-asm", @@ -1477,9 +1483,9 @@ dependencies = [ [[package]] name = "fuel-types" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6543ca2f5124a19b1486507243188a57be64c9914d1908e154a1866eeffb69" +checksum = "d1f9f7bd0f0ae5f8dcebb2cec8d504f45a03fc0bca19c65bfd45b07ed5e9fb68" dependencies = [ "hex", "rand", @@ -1488,12 +1494,13 @@ dependencies = [ [[package]] name = "fuel-vm" -version = "0.31.2" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d42e99fe69e913bbde4900f96efb6ceae13b68d369bf22d4b435571d6ed7d65" +checksum = "d3a031708a34fcbee85bca5f4b9f0b61cd80bf8555972020ddee2420d7306a47" dependencies = [ "bitflags 1.3.2", "derivative", + "ethnum", "fuel-asm", "fuel-crypto", "fuel-merkle", @@ -1501,6 +1508,8 @@ dependencies = [ "fuel-tx", "fuel-types", "itertools", + "paste", + "primitive-types", "rand", "serde", "sha3", @@ -1510,9 +1519,9 @@ dependencies = [ [[package]] name = "fuels" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa81d69072a9d4ba6fac79d9b5b66348daf95089ecda85a9231e41e5dd45bc85" +checksum = "5280da1aababb8cae2c4f56d9ac43613e5aab328f62d146bc4598ed3a3e7d93b" dependencies = [ "fuel-core", "fuel-core-client", @@ -1526,9 +1535,9 @@ dependencies = [ [[package]] name = "fuels-accounts" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a03259b1ece608c33541477fed7dea07bb3e78f25f85a8a3060f6501d6e982" +checksum = "58e79e6b022c45f8e13cbdbded36232cac380e6885eaac12e8b3234613ad2c3a" dependencies = [ "async-trait", "bytes", @@ -1553,9 +1562,9 @@ dependencies = [ [[package]] name = "fuels-code-gen" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e8ec25373ed1ae06cfe53afc4e3ecd6057aa4ff3a3329e40f42784afe21726b" +checksum = "051906531d2f79ac3a790f06590a5f8b3e63229482494ebdabcce3ca41d581d8" dependencies = [ "Inflector", "fuel-abi-types", @@ -1564,14 +1573,14 @@ dependencies = [ "quote", "regex", "serde_json", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] name = "fuels-core" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b133aff726340284937e3233b8c9dd8429812dd463e4e6f53373ca13e644c99" +checksum = "3ca6bc2b138bcbbd94bc5e00129f0062268135f085208e63c58c9c59a4efc9e5" dependencies = [ "bech32 0.9.1", "chrono", @@ -1593,13 +1602,14 @@ dependencies = [ "strum", "strum_macros", "thiserror", + "uint", ] [[package]] name = "fuels-macros" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef684e13ddc8b16f7828dc98ca309f69a6516068bb307c78b8e64aaf010b397" +checksum = "9dfcb6d4b7f354a55c061350f8013f739b0833758baa1b89e2e1b35791e6030e" dependencies = [ "Inflector", "fuel-abi-types", @@ -1610,14 +1620,14 @@ dependencies = [ "rand", "regex", "serde_json", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] name = "fuels-programs" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09e582cc270a794e02e40150f79d2a92830bf5adaaadf4147de02689ae17c287" +checksum = "32e4febb48ea24ef35489174dc76f449f7d12dadbe22b970ab70250d024405e2" dependencies = [ "async-trait", "bytes", @@ -1643,9 +1653,9 @@ dependencies = [ [[package]] name = "fuels-test-helpers" -version = "0.43.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b0f1475beb61ad66163dc57234170b7319aacf79d9147a28c7ff43cc6fd8f0" +checksum = "823d2016fbfe3efbc2e16f1f40f5bda85922e1207f00be50579036ed3a8639d9" dependencies = [ "fuel-core", "fuel-core-chain-config", @@ -1730,7 +1740,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -2427,6 +2437,12 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "paste" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" + [[package]] name = "pbkdf2" version = "0.11.0" @@ -2438,9 +2454,9 @@ dependencies = [ [[package]] name = "pbkdf2" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" dependencies = [ "digest 0.10.7", "hmac", @@ -2479,7 +2495,7 @@ checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -2553,9 +2569,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" dependencies = [ "unicode-ident", ] @@ -2706,9 +2722,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89089e897c013b3deb627116ae56a6955a72b8bed395c9526af31c9fe528b484" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" dependencies = [ "aho-corasick", "memchr", @@ -2718,9 +2734,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa250384981ea14565685dea16a9ccc4d1c541a13f82b9c168572264d1df8c56" +checksum = "83d3daa6976cffb758ec878f108ba0e062a45b2d6ca3a2cca965338855476caf" dependencies = [ "aho-corasick", "memchr", @@ -3075,22 +3091,22 @@ checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.166" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.166" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -3309,9 +3325,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.23" +version = "2.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" +checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" dependencies = [ "proc-macro2", "quote", @@ -3372,22 +3388,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.41" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c16a64ba9387ef3fdae4f9c1a7f07a0997fce91985c0336f1ddc1822b3b37802" +checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.41" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14928354b01c4d6a4f0e549069adef399a284e7995c7ccca94e8a07a5346c59" +checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -3403,9 +3419,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" dependencies = [ "itoa", "serde", @@ -3421,9 +3437,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" dependencies = [ "time-core", ] @@ -3481,7 +3497,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -3627,7 +3643,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] [[package]] @@ -3665,9 +3681,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uint" @@ -3798,7 +3814,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", "wasm-bindgen-shared", ] @@ -3832,7 +3848,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4001,9 +4017,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9482fe6ceabdf32f3966bfdd350ba69256a97c30253dc616fe0005af24f164e" +checksum = "81a2094c43cc94775293eaa0e499fbc30048a6d824ac82c0351a8c0bf9112529" dependencies = [ "memchr", ] @@ -4043,5 +4059,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.25", ] diff --git a/test/src/sdk-harness/Cargo.toml b/test/src/sdk-harness/Cargo.toml index cc925cc2f9d..7446dde6397 100644 --- a/test/src/sdk-harness/Cargo.toml +++ b/test/src/sdk-harness/Cargo.toml @@ -8,10 +8,10 @@ publish = false [dependencies] assert_matches = "1.5.0" -fuel-core = { version = "0.18.2", default-features = false } -fuel-core-client = { version = "0.18.2", default-features = false } -fuel-vm = "0.31.2" -fuels = { version = "0.43", features = ["fuel-core-lib"] } +fuel-core = { version = "0.19.1", default-features = false } +fuel-core-client = { version = "0.19.1", default-features = false } +fuel-vm = "0.34.1" +fuels = { version = "0.44", features = ["fuel-core-lib"] } hex = "0.4.3" rand = "0.8" sha2 = "0.10" diff --git a/test/src/sdk-harness/test_projects/predicate_data_simple/mod.rs b/test/src/sdk-harness/test_projects/predicate_data_simple/mod.rs index 5e36411862d..60ff33a6b81 100644 --- a/test/src/sdk-harness/test_projects/predicate_data_simple/mod.rs +++ b/test/src/sdk-harness/test_projects/predicate_data_simple/mod.rs @@ -24,7 +24,7 @@ async fn setup() -> (Vec, Address, WalletUnlocked, u64, AssetId) { ..Config::local_node() }; let predicate_address = - fuel_tx::Input::predicate_owner(&predicate_code, &config.chain_conf.transaction_parameters); + fuel_tx::Input::predicate_owner(&predicate_code, &config.chain_conf.transaction_parameters.chain_id); let wallets = launch_custom_provider_and_get_wallets(WalletsConfig::default(), Some(config), None).await; @@ -84,7 +84,7 @@ async fn submit_to_predicate( asset_id: AssetId, receiver_address: Address, predicate_data: UnresolvedBytes, -) { +) -> Result<()> { let filter = ResourceFilter { from: predicate_address.into(), asset_id, @@ -111,20 +111,23 @@ async fn submit_to_predicate( total_amount_in_predicate += coin.amount(); } - let output_coin = Output::coin(receiver_address, total_amount_in_predicate, asset_id); + let output_coin = Output::coin(receiver_address, total_amount_in_predicate - 1, asset_id); let output_change = Output::change(predicate_address, 0, asset_id); let params = wallet.provider().unwrap().consensus_parameters(); - let new_tx = ScriptTransactionBuilder::prepare_transfer( + + + let mut new_tx = ScriptTransactionBuilder::prepare_transfer( inputs, vec![output_coin, output_change], - TxParameters::default().set_gas_limit(1_000_000), + TxParameters::default().set_gas_price(1).set_gas_limit(1_000_000), ) .set_consensus_parameters(params) .build() .unwrap(); + new_tx.estimate_predicates(¶ms).unwrap(); - let _call_result = wallet.provider().unwrap().send_transaction(&new_tx).await; + wallet.provider().unwrap().send_transaction(&new_tx).await.map(|_| ()) } async fn get_balance(wallet: &Wallet, address: Address, asset_id: AssetId) -> u64 { @@ -161,11 +164,12 @@ async fn valid_predicate_data_simple() { receiver_address, predicate_data, ) - .await; + .await + .expect("Failed to submit to predicate"); let receiver_balance_after = get_balance(&wallet, receiver_address, asset_id).await; assert_eq!( - receiver_balance_before + amount_to_predicate, + receiver_balance_before + amount_to_predicate - 1, receiver_balance_after ); @@ -198,7 +202,8 @@ async fn invalid_predicate_data_simple() { receiver_address, predicate_data, ) - .await; + .await + .expect_err("Submitting to predicate should have failed"); let receiver_balance_after = get_balance(&wallet, receiver_address, asset_id).await; assert_eq!(receiver_balance_before, receiver_balance_after); diff --git a/test/src/sdk-harness/test_projects/predicate_data_struct/mod.rs b/test/src/sdk-harness/test_projects/predicate_data_struct/mod.rs index 59fd889447f..486eed80530 100644 --- a/test/src/sdk-harness/test_projects/predicate_data_struct/mod.rs +++ b/test/src/sdk-harness/test_projects/predicate_data_struct/mod.rs @@ -24,7 +24,7 @@ async fn setup() -> (Vec, Address, WalletUnlocked, u64, AssetId) { ..Config::local_node() }; let predicate_address = - fuel_tx::Input::predicate_owner(&predicate_code, &config.chain_conf.transaction_parameters); + fuel_tx::Input::predicate_owner(&predicate_code, &config.chain_conf.transaction_parameters.chain_id); let wallets = launch_custom_provider_and_get_wallets(WalletsConfig::default(), Some(config), None).await; @@ -114,7 +114,7 @@ async fn submit_to_predicate( let output_change = Output::change(predicate_address, 0, asset_id); let params = wallet.provider().unwrap().consensus_parameters(); - let new_tx = ScriptTransactionBuilder::prepare_transfer( + let mut new_tx = ScriptTransactionBuilder::prepare_transfer( inputs, vec![output_coin, output_change], TxParameters::default().set_gas_limit(1_000_000), @@ -122,6 +122,7 @@ async fn submit_to_predicate( .set_consensus_parameters(params) .build() .unwrap(); + new_tx.estimate_predicates(¶ms).unwrap(); let _call_result = wallet.provider().unwrap().send_transaction(&new_tx).await; } diff --git a/test/src/sdk-harness/test_projects/script_data/mod.rs b/test/src/sdk-harness/test_projects/script_data/mod.rs index c04adbb6aca..54e37cb3714 100644 --- a/test/src/sdk-harness/test_projects/script_data/mod.rs +++ b/test/src/sdk-harness/test_projects/script_data/mod.rs @@ -8,8 +8,17 @@ use fuels::{ async fn call_script(script_data: Vec) -> Result> { let wallet = launch_provider_and_get_wallet().await; + let wallet_coins = wallet + .get_asset_inputs_for_amount( + AssetId::default(), + wallet.get_asset_balance(&AssetId::default()).await.unwrap(), + None, + ) + .await + .unwrap(); + let mut tx = - ScriptTransactionBuilder::prepare_transfer(vec![], vec![], TxParameters::default()) + ScriptTransactionBuilder::prepare_transfer(wallet_coins, vec![], TxParameters::default()) .set_script(std::fs::read( "test_projects/script_data/out/debug/script_data.bin", )?) diff --git a/test/src/sdk-harness/test_projects/tx_fields/mod.rs b/test/src/sdk-harness/test_projects/tx_fields/mod.rs index 95aa29b6f2b..acd603b4455 100644 --- a/test/src/sdk-harness/test_projects/tx_fields/mod.rs +++ b/test/src/sdk-harness/test_projects/tx_fields/mod.rs @@ -5,8 +5,12 @@ use fuel_vm::fuel_tx::{ use fuels::{ accounts::{predicate::Predicate, wallet::WalletUnlocked, Account}, prelude::*, - types::Bits256, + types::{ + Bits256, + }, }; +use fuel_core_client::client::types::primitives::ChainId; + use std::str::FromStr; const MESSAGE_DATA: [u8; 3] = [1u8, 2u8, 3u8]; @@ -114,17 +118,20 @@ async fn generate_predicate_inputs( AssetId::from(predicate_coin.asset_id.clone()), TxPointer::default(), 0u32.into(), + 0, predicate_code.clone(), vec![], ); - let predicate_address: Address = predicate.address().into(); + let message = &wallet.get_messages().await.unwrap()[0]; + let predicate_address: Address = predicate.address().into(); let predicate_message = TxInput::message_coin_predicate( message.sender.clone().into(), predicate_address.clone().into(), message.amount, message.nonce.clone(), + 0, predicate_code.clone(), vec![], ); @@ -298,6 +305,7 @@ mod tx { let mut tx = handler.build_tx().await.unwrap(); add_message_input(&mut tx, wallet.clone()).await; + tx.precompute(*ChainId::default()).unwrap(); let inputs = tx.inputs(); @@ -358,7 +366,7 @@ mod tx { .await .unwrap(); - assert_eq!(receipts[1].val().unwrap(), 11032); + assert_eq!(receipts[1].val().unwrap(), 11040); } #[tokio::test] @@ -459,7 +467,7 @@ mod tx { let tx = handler.build_tx().await.unwrap(); let params = wallet.provider().unwrap().consensus_parameters(); - let tx_id = tx.id(¶ms); + let tx_id = tx.id(*params.chain_id); let receipts = wallet .provider() @@ -577,6 +585,8 @@ mod inputs { let mut tx = handler.build_tx().await.unwrap(); tx.tx.inputs_mut().push(predicate_coin); + tx.precompute(*ChainId::default()).unwrap(); + tx.estimate_predicates(&wallet.provider().unwrap().consensus_parameters()).unwrap(); let receipts = wallet .provider() @@ -597,6 +607,7 @@ mod inputs { let handler = contract_instance.methods().get_input_message_sender(2); let mut tx = handler.build_tx().await.unwrap(); add_message_input(&mut tx, wallet.clone()).await; // let result = contract_instance + tx.precompute(*ChainId::default())?; let messages = wallet.get_messages().await?; let receipts = wallet @@ -616,6 +627,7 @@ mod inputs { let handler = contract_instance.methods().get_input_message_recipient(2); let mut tx = handler.build_tx().await.unwrap(); add_message_input(&mut tx, wallet.clone()).await; + tx.precompute(*ChainId::default())?; let messages = wallet.get_messages().await?; let receipts = wallet @@ -634,6 +646,7 @@ mod inputs { let handler = contract_instance.methods().get_input_message_nonce(2); let mut tx = handler.build_tx().await.unwrap(); add_message_input(&mut tx, wallet.clone()).await; + tx.precompute(*ChainId::default())?; let messages = wallet.get_messages().await?; let receipts = wallet @@ -667,6 +680,7 @@ mod inputs { let handler = contract_instance.methods().get_input_message_data_length(2); let mut tx = handler.build_tx().await.unwrap(); add_message_input(&mut tx, wallet.clone()).await; + tx.precompute(*ChainId::default()).unwrap(); let receipts = wallet .provider() @@ -686,6 +700,8 @@ mod inputs { let handler = contract_instance.methods().get_input_predicate_length(2); let mut tx = handler.build_tx().await.unwrap(); tx.tx.inputs_mut().push(predicate_message); + tx.precompute(*ChainId::default()).unwrap(); + tx.estimate_predicates(&wallet.provider().unwrap().consensus_parameters()).unwrap(); let receipts = wallet .provider() @@ -706,6 +722,8 @@ mod inputs { .get_input_predicate_data_length(1); let mut tx = handler.build_tx().await.unwrap(); tx.tx.inputs_mut().push(predicate_message); + tx.precompute(*ChainId::default()).unwrap(); + tx.estimate_predicates(&wallet.provider().unwrap().consensus_parameters()).unwrap(); let receipts = wallet .provider() @@ -726,6 +744,7 @@ mod inputs { .get_input_message_data(2, 0, MESSAGE_DATA); let mut tx = handler.build_tx().await.unwrap(); add_message_input(&mut tx, wallet.clone()).await; + tx.precompute(*ChainId::default()).unwrap(); let receipts = wallet .provider() @@ -748,7 +767,9 @@ mod inputs { .get_input_predicate(2, predicate_bytes.clone()); let mut tx = handler.build_tx().await.unwrap(); - tx.tx.inputs_mut().push(predicate_message); + tx.tx.inputs_mut().push(predicate_message); + tx.precompute(*ChainId::default()).unwrap(); + tx.estimate_predicates(&wallet.provider().unwrap().consensus_parameters()).unwrap(); let receipts = wallet .provider()