From 83ae6bc1668a0022e688d6b955c0b27cfa3cefed Mon Sep 17 00:00:00 2001 From: Fusee Date: Thu, 16 May 2024 18:22:09 +0200 Subject: [PATCH 01/25] wip: started to rewrite macros to use the unified syntax --- Cargo.lock | 956 ++++++++++++++-------- abi-build/src/generator/impl_abi_mod.rs | 7 + abi-build/src/generator/impl_abi_types.rs | 4 +- abi-build/src/generator/impl_contract.rs | 66 +- core/Cargo.toml | 12 +- data/Cargo.toml | 8 +- executor/Cargo.toml | 8 +- executor/src/base/transaction.rs | 32 +- executor/src/dummy/transaction.rs | 18 +- executor/src/mocking/executor.rs | 18 +- executor/src/network/simulate.rs | 24 +- executor/src/network/transaction.rs | 27 +- executor/src/network/utils/address.rs | 6 +- executor/src/network/utils/network.rs | 6 +- mocking/Cargo.toml | 6 +- mocking/src/lib.rs | 1 - request/Cargo.toml | 3 +- request/src/error/client.rs | 13 + request/src/error/mod.rs | 2 + request/src/error/request.rs | 7 + request/src/gateway/client.rs | 7 +- request/src/gateway/reqwest.rs | 41 +- request/src/lib.rs | 3 +- tester/contract/Cargo.toml | 4 +- tester/contract/meta/Cargo.toml | 2 +- tester/contract/wasm/Cargo.toml | 2 +- tester/core/Cargo.toml | 2 +- tester/core/tests/network_simulate.rs | 42 +- token/Cargo.toml | 9 +- token/src/account/balance.rs | 5 +- token/src/mock/request.rs | 37 +- token/src/properties/fetch.rs | 6 +- 32 files changed, 912 insertions(+), 472 deletions(-) create mode 100644 request/src/error/client.rs create mode 100644 request/src/error/mod.rs create mode 100644 request/src/error/request.rs diff --git a/Cargo.lock b/Cargo.lock index 448aa9d..6da1cab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,58 +27,71 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -86,9 +99,18 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] [[package]] name = "arrayvec" @@ -98,9 +120,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", @@ -109,15 +131,15 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -134,6 +156,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "bech32" version = "0.9.1" @@ -167,9 +195,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "block-buffer" @@ -191,9 +219,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", "serde", @@ -201,9 +229,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" @@ -213,18 +241,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" [[package]] name = "cfg-if" @@ -234,9 +259,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.4.18" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", "clap_derive", @@ -244,9 +269,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ "anstream", "anstyle", @@ -256,9 +281,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ "heck", "proc-macro2", @@ -268,15 +293,15 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "colored" @@ -339,9 +364,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" dependencies = [ "cfg-if", ] @@ -394,6 +419,17 @@ dependencies = [ "zeroize", ] +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "digest" version = "0.9.0" @@ -414,6 +450,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "ed25519" version = "1.5.3" @@ -439,15 +486,15 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -470,9 +517,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.1" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e7cf40684ae96ade6232ed84582f40ce0a66efcd43a5117aef610534f8e0b8" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" dependencies = [ "anstream", "anstyle", @@ -489,9 +536,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -499,15 +546,15 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "miniz_oxide", @@ -655,9 +702,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -685,16 +732,35 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.12", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 1.1.0", "indexmap", "slab", "tokio", @@ -704,21 +770,24 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -743,9 +812,20 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -759,18 +839,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", "pin-project-lite", ] [[package]] name = "http-body" -version = "1.0.0-rc.2" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951dfc2e32ac02d67c90c0d65bd27009a635dc9b381a2cc7d284ab01e3a0150d" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" dependencies = [ "bytes", - "http", + "futures-core", + "http 1.1.0", + "http-body 1.0.0", + "pin-project-lite", ] [[package]] @@ -801,8 +894,8 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", - "http", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.6", "httparse", "httpdate", @@ -817,21 +910,20 @@ dependencies = [ [[package]] name = "hyper" -version = "1.0.0-rc.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d280a71f348bcc670fc55b02b63c53a04ac0bf2daff2980795aeaf53edae10e6" +checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" dependencies = [ "bytes", "futures-channel", "futures-util", - "http", - "http-body 1.0.0-rc.2", + "h2 0.4.4", + "http 1.1.0", + "http-body 1.0.0", "httparse", - "httpdate", "itoa", "pin-project-lite", "tokio", - "tracing", "want", ] @@ -848,6 +940,42 @@ dependencies = [ "tokio-native-tls", ] +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.1.0", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.1.0", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", +] + [[package]] name = "idna" version = "0.5.0" @@ -876,9 +1004,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.2" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", @@ -890,6 +1018,12 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + [[package]] name = "itertools" version = "0.12.1" @@ -901,15 +1035,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -931,9 +1065,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "linux-raw-sys" @@ -943,9 +1077,9 @@ checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -953,15 +1087,15 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "mime" @@ -980,9 +1114,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -992,8 +1126,6 @@ dependencies = [ [[package]] name = "multiversx-chain-scenario-format" version = "0.22.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9190bdd56300e801e7793fc4ee7dc0c76c1149aac019da8c71cc58254966fe" dependencies = [ "bech32", "hex", @@ -1006,11 +1138,9 @@ dependencies = [ [[package]] name = "multiversx-chain-vm" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a363734a77774f4095fad6f49c6772b82edd833ed47a7c1ca87db18f68ccfffd" +version = "0.8.4" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "colored", "ed25519-dalek", "hex", @@ -1033,33 +1163,41 @@ checksum = "b59072fa0624b55ae5ae3fa6bfa91515bbeb4ac440214bc4a509e2c8806d6e9f" [[package]] name = "multiversx-sc" -version = "0.48.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f5fa49bfb4505465784dc6b8b1d5e52ffcdafedfc2c6f5e9ba54b4bcf5cee8" +version = "0.50.1" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f7711088da6b140257f35a25d90dc4f78bc4e2be324d1096f7f5842dd397cda" +version = "0.19.0" dependencies = [ "arrayvec", - "multiversx-sc-codec-derive", + "multiversx-sc-codec-derive 0.19.0", "num-bigint", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.7" +version = "0.19.0" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "multiversx-sc-codec-derive" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc92c79e975de4b4f956d54d2c31aaca5e18310e1c36d37593fe856a07b8130" +checksum = "cf72a8042da0bc19da0b8f0d4f61b4c66ae853560fefc69cd8fea87bf1aa8c14" dependencies = [ "hex", "proc-macro2", @@ -1069,9 +1207,7 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.48.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f114e0cd72950ae1f0dc1bca2da7d2a02f6ce51bcbee7721980340436bfe63a" +version = "0.50.1" dependencies = [ "hex", "proc-macro2", @@ -1082,9 +1218,7 @@ dependencies = [ [[package]] name = "multiversx-sc-meta" -version = "0.48.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ce1f4557894ea3b556d3376d4a12c0494b8085a69c7f02def42bed0702ade58" +version = "0.50.1" dependencies = [ "clap", "colored", @@ -1095,7 +1229,7 @@ dependencies = [ "lazy_static", "multiversx-sc", "pathdiff", - "reqwest", + "reqwest 0.12.4", "ruplacer", "rustc_version", "semver", @@ -1109,11 +1243,9 @@ dependencies = [ [[package]] name = "multiversx-sc-scenario" -version = "0.48.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa109d85d90599c232c2c4ac19a0f6c12a558ad72aa04f4b40ff9e23365b1897" +version = "0.50.1" dependencies = [ - "base64", + "base64 0.22.1", "bech32", "clap", "colored", @@ -1133,32 +1265,30 @@ dependencies = [ "serde_json", "sha2 0.10.8", "tokio", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-snippets" -version = "0.48.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6373fe0040e72d633e0ccc6d2e231d2f2ce9f4fdaaf7ad0b937d8c6bda4a53a" +version = "0.50.1" dependencies = [ - "base64", + "base64 0.22.1", "env_logger", "futures", "hex", "log", "multiversx-sc-scenario", "multiversx-sdk", + "rand 0.8.5", "tokio", ] [[package]] name = "multiversx-sdk" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46d709ddf46c50a407ce4b90ff487e854926d47f80de6abfe4a4adca3eaa7964" +version = "0.4.1" dependencies = [ "anyhow", - "base64", + "base64 0.22.1", "bech32", "bip39", "hex", @@ -1167,7 +1297,7 @@ dependencies = [ "pbkdf2", "pem", "rand 0.8.5", - "reqwest", + "reqwest 0.12.4", "serde", "serde_json", "serde_repr", @@ -1212,7 +1342,7 @@ dependencies = [ "hex", "multiversx-sc", "multiversx-sc-codec", - "multiversx-sc-codec-derive", + "multiversx-sc-codec-derive 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "multiversx-sc-scenario", "multiversx-sc-snippets", "multiversx-sdk", @@ -1220,7 +1350,7 @@ dependencies = [ "novax-data", "novax-executor", "num-bigint", - "reqwest", + "reqwest 0.11.20", "serde", "serde_json", "tokio", @@ -1256,7 +1386,7 @@ dependencies = [ name = "novax-data" version = "0.1.6" dependencies = [ - "base64", + "base64 0.21.7", "multiversx-sc", "multiversx-sc-codec", "multiversx-sc-scenario", @@ -1270,7 +1400,7 @@ name = "novax-executor" version = "0.1.6" dependencies = [ "async-trait", - "base64", + "base64 0.21.7", "hex", "multiversx-sc", "multiversx-sc-scenario", @@ -1289,7 +1419,7 @@ name = "novax-mocking" version = "0.1.6" dependencies = [ "async-trait", - "base64", + "base64 0.21.7", "futures", "hex", "multiversx-sc", @@ -1299,7 +1429,7 @@ dependencies = [ "novax-executor", "novax-token", "num-bigint", - "reqwest", + "reqwest 0.11.20", "serde", "serde_json", "tokio", @@ -1310,7 +1440,8 @@ name = "novax-request" version = "0.1.6" dependencies = [ "async-trait", - "reqwest", + "http 1.1.0", + "reqwest 0.12.4", "serde", ] @@ -1319,9 +1450,10 @@ name = "novax-token" version = "0.1.6" dependencies = [ "async-trait", - "base64", + "base64 0.21.7", "hex", - "hyper 1.0.0-rc.4", + "http 1.1.0", + "hyper 1.1.0", "multiversx-sc", "multiversx-sc-codec", "multiversx-sc-scenario", @@ -1329,7 +1461,7 @@ dependencies = [ "novax-data", "novax-request", "num-bigint", - "reqwest", + "reqwest 0.11.20", "serde", "serde_json", "tokio", @@ -1337,11 +1469,10 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ - "autocfg", "num-integer", "num-traits", "serde", @@ -1349,19 +1480,18 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -1399,11 +1529,11 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.63" +version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "cfg-if", "foreign-types", "libc", @@ -1431,9 +1561,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.99" +version = "0.9.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", @@ -1443,9 +1573,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" dependencies = [ "lock_api", "parking_lot_core", @@ -1453,22 +1583,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.5", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" @@ -1487,11 +1617,11 @@ dependencies = [ [[package]] name = "pem" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ - "base64", + "base64 0.22.1", "serde", ] @@ -1501,11 +1631,31 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1515,9 +1665,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "ppv-lite86" @@ -1527,9 +1677,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", "syn", @@ -1537,18 +1687,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -1622,7 +1772,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", ] [[package]] @@ -1645,18 +1795,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", ] [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", @@ -1666,9 +1816,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -1677,9 +1827,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "reqwest" @@ -1687,16 +1837,16 @@ version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ - "base64", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2", - "http", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.6", "hyper 0.14.28", - "hyper-tls", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", @@ -1715,14 +1865,57 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg", + "winreg 0.50.0", +] + +[[package]] +name = "reqwest" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.4.4", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.1.0", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg 0.52.0", ] [[package]] name = "rmp" -version = "0.8.12" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9860a6cc38ed1da53456442089b4dfa35e7cedaa326df63017af88385e6b20" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" dependencies = [ "byteorder", "num-traits", @@ -1731,9 +1924,9 @@ dependencies = [ [[package]] name = "rmp-serde" -version = "1.1.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffea85eea980d8a74453e5d02a8d93028f3c34725de143085a844ebe953258a" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" dependencies = [ "byteorder", "rmp", @@ -1756,9 +1949,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" @@ -1771,22 +1964,38 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", "windows-sys 0.52.0", ] +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -1814,11 +2023,11 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "core-foundation", "core-foundation-sys", "libc", @@ -1827,9 +2036,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" dependencies = [ "core-foundation-sys", "libc", @@ -1837,24 +2046,24 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" dependencies = [ "proc-macro2", "quote", @@ -1863,9 +2072,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "indexmap", "itoa", @@ -1875,9 +2084,9 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", @@ -1886,9 +2095,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -1941,9 +2150,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -1965,25 +2174,25 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" @@ -1993,20 +2202,47 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tempfile" -version = "3.10.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", @@ -2019,14 +2255,14 @@ name = "tester" version = "0.0.1" dependencies = [ "async-trait", - "base64", + "base64 0.21.7", "hex", - "hyper 1.0.0-rc.4", + "hyper 1.1.0", "novax", "novax-mocking", "novax-request", "num-bigint", - "reqwest", + "reqwest 0.11.20", "serde", "serde_json", "tester-contract", @@ -2049,11 +2285,31 @@ dependencies = [ "tester-contract", ] +[[package]] +name = "thiserror" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -2076,9 +2332,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", @@ -2116,23 +2372,22 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] name = "toml" -version = "0.8.10" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" +checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" dependencies = [ "indexmap", "serde", @@ -2143,18 +2398,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.4" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9ffdf896f8daaabf9b66ba8e77ea1ed5ed0f72821b398aba62352e95062951" +checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" dependencies = [ "indexmap", "serde", @@ -2163,6 +2418,28 @@ dependencies = [ "winnow", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -2175,6 +2452,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ + "log", "pin-project-lite", "tracing-core", ] @@ -2223,9 +2501,15 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" [[package]] name = "url" @@ -2258,9 +2542,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -2289,9 +2573,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2299,9 +2583,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", @@ -2314,9 +2598,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.40" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -2326,9 +2610,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2336,9 +2620,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", @@ -2349,26 +2633,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.90" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasmparser" -version = "0.121.0" +version = "0.207.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953cf6a7606ab31382cb1caa5ae403e77ba70c7f8e12eeda167e7040d42bfda8" +checksum = "e19bb9f8ab07616da582ef8adb24c54f1424c7ec876720b7da9db8ec0626c92c" dependencies = [ - "bitflags 2.4.2", + "ahash", + "bitflags 2.5.0", + "hashbrown", "indexmap", "semver", ] [[package]] name = "wasmprinter" -version = "0.2.78" +version = "0.207.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e32c13c59fdc64d3f6998a1d52eb1d362b6904a88b754190ccb85661ad577a" +checksum = "9c2d8a7b4dabb460208e6b4334d9db5766e84505038b2529e69c3d07ac619115" dependencies = [ "anyhow", "wasmparser", @@ -2376,45 +2662,23 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys 0.52.0", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-sys" version = "0.48.0" @@ -2430,7 +2694,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.5", ] [[package]] @@ -2450,17 +2714,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -2471,9 +2736,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -2483,9 +2748,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -2495,9 +2760,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -2507,9 +2778,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -2519,9 +2790,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -2531,9 +2802,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" @@ -2543,15 +2814,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.5.37" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cad8365489051ae9f054164e459304af2e7e9bb407c958076c8bf4aef52da5" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" dependencies = [ "memchr", ] @@ -2566,6 +2837,36 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zeroize" version = "1.7.0" @@ -2588,12 +2889,15 @@ dependencies = [ [[package]] name = "zip" -version = "0.6.6" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +checksum = "c700ea425e148de30c29c580c1f9508b93ca57ad31c9f4e96b83c194c37a7a8f" dependencies = [ - "byteorder", + "arbitrary", "crc32fast", "crossbeam-utils", + "displaydoc", "flate2", + "indexmap", + "thiserror", ] diff --git a/abi-build/src/generator/impl_abi_mod.rs b/abi-build/src/generator/impl_abi_mod.rs index 096fb78..ffb5504 100644 --- a/abi-build/src/generator/impl_abi_mod.rs +++ b/abi-build/src/generator/impl_abi_mod.rs @@ -13,6 +13,11 @@ pub fn generate_from_abi(abi: &Abi) -> Result { let content = if let Ok(content_file) = syn::parse_file(&content) { prettyplease::unparse(&content_file) } else { + match syn::parse_file(&content) { + Err(error) => println!("hey!!! {}", error.to_string()), + _ => todo!() + } + println!("{content}"); return Err(crate::generator::generator_error::GeneratorError::UnableToFormatRustCode.into()) }; @@ -119,5 +124,7 @@ fn get_mod_imports() -> TokenStream { use std::ops::Deref; use multiversx_sc_scenario::scenario_model::AddressValue; use novax_data::Address; + use multiversx_sc_scenario::imports::Bech32Address; + use core::marker::PhantomData; } } \ No newline at end of file diff --git a/abi-build/src/generator/impl_abi_types.rs b/abi-build/src/generator/impl_abi_types.rs index 3d37931..b238bd6 100644 --- a/abi-build/src/generator/impl_abi_types.rs +++ b/abi-build/src/generator/impl_abi_types.rs @@ -132,7 +132,7 @@ fn impl_abi_enum_to_discriminant(name: &String, abi_type: &AbiType) -> TokenStre fn impl_abi_enum_managed_derives(variants: &AbiTypeVariants) -> TokenStream { let mut derive_idents: Vec = vec![]; - for derive in ["TopEncode", "TopDecode", "NestedEncode", "NestedDecode", "Clone", "Debug"] { + for derive in ["TopEncode", "TopDecode", "NestedEncode", "NestedDecode", "TypeAbi", "Clone", "Debug"] { let ident = format_ident!("{}", derive); derive_idents.push(ident); } @@ -406,7 +406,7 @@ fn impl_abi_struct_type(name: &str, abi_type: &AbiType, all_abi_types: &AbiTypes fn impl_abi_struct_derive(abi_fields: &AbiTypeFields, abi_types: &AbiTypes) -> TokenStream { let mut derive_idents: Vec = vec![]; - for derive in ["TopEncode", "TopDecode", "NestedEncode", "NestedDecode", "Clone", "Debug"] { + for derive in ["TopEncode", "TopDecode", "NestedEncode", "NestedDecode", "TypeAbi", "Clone", "Debug"] { let ident = format_ident!("{}", derive); derive_idents.push(ident); } diff --git a/abi-build/src/generator/impl_contract.rs b/abi-build/src/generator/impl_contract.rs index 18a3041..548e0fc 100644 --- a/abi-build/src/generator/impl_contract.rs +++ b/abi-build/src/generator/impl_contract.rs @@ -16,12 +16,18 @@ pub(crate) fn impl_contract(mod_name: &str, abi: &Abi) -> Result Resu } // (TokenStream, TokenStream) = (calls, queries) -fn impl_abi_endpoints(contract_info_name: &str, abi_endpoints: &AbiEndpoints, abi_types: &AbiTypes) -> Result<(TokenStream, TokenStream), BuildError> { +fn impl_abi_endpoints( + contract_info_name: &str, + proxy_mod_name: &str, + abi_endpoints: &AbiEndpoints, + abi_types: &AbiTypes +) -> Result<(TokenStream, TokenStream), BuildError> { let mut calls_impls: Vec = vec![]; let mut queries_impls: Vec = vec![]; for endpoint in abi_endpoints { - let endpoint_impls = impl_abi_endpoint_call_query(contract_info_name, endpoint, abi_types)?; + let endpoint_impls = impl_abi_endpoint_call_query( + contract_info_name, + proxy_mod_name, + endpoint, + abi_types + )?; calls_impls.push(endpoint_impls.0); queries_impls.push(endpoint_impls.1); @@ -356,8 +372,14 @@ fn impl_abi_endpoints(contract_info_name: &str, abi_endpoints: &AbiEndpoints, ab ) } -fn impl_abi_endpoint_call_query(contract_info_name: &str, abi_endpoint: &AbiEndpoint, abi_types: &AbiTypes) -> Result<(TokenStream, TokenStream), BuildError> { +fn impl_abi_endpoint_call_query( + contract_info_name: &str, + proxy_mod_name: &str, + abi_endpoint: &AbiEndpoint, + abi_types: &AbiTypes +) -> Result<(TokenStream, TokenStream), BuildError> { let debug_api = get_api_generic_ident(); + let proxy_mod_ident = format_ident!("{proxy_mod_name}"); let contract_info_ident = format_ident!("{}", contract_info_name); let function_name = format_ident!("{}", abi_endpoint.name.to_case(Case::Snake)); let function_inputs = impl_endpoint_inputs(true, &abi_endpoint.inputs, abi_types)?; @@ -382,20 +404,19 @@ fn impl_abi_endpoint_call_query(contract_info_name: &str, abi_endpoint: &AbiEndp #endpoint_args_let_statements - let _novax_contract_call = _novax_contract - .#function_name(#endpoint_args_inputs); + let _novax_payment = if self.egld_value > num_bigint::BigUint::from(0u8) { + EgldOrMultiEsdtPayment::Egld(BigUint::<#debug_api>::from(self.egld_value.clone())) + } else { + EgldOrMultiEsdtPayment::Egld(BigUint::<#debug_api>::from(0u8)) + }; - let mut _novax_tx: TypedScCall<#function_managed_outputs> = ScCallStep::new() - .call(_novax_contract_call) - .into(); + let interactor: Interactor = todo!(); + let mut _novax_tx = interactor + .tx() + .to(Bech32Address::from_bech32_string(Address::from(&self.contract_address).to_bech32_string().unwrap())) + .egld_or_multi_esdt(_novax_payment); - if self.egld_value > num_bigint::BigUint::from(0u8) { - _novax_tx = _novax_tx - .egld_value(self.egld_value.clone()); - } - - _novax_tx = _novax_tx - .expect(TxExpect::ok()); + #(_novax_tx.argument(#endpoint_args_inputs)); *; }; let call_token = quote! { @@ -470,7 +491,7 @@ fn impl_abi_endpoint_call_query(contract_info_name: &str, abi_endpoint: &AbiEndp self.caching.get_or_set_cache( _novax_key, async { - let result = self.executor.execute::<#function_managed_outputs>(&_novax_tx.sc_call_step).await; + let result = self.executor.execute::<#function_managed_outputs>(&_novax_tx).await; if let Result::Ok(result) = result { Result::Ok::<_, NovaXError>(result) @@ -530,7 +551,7 @@ fn impl_abi_constructor(contract_info_name: &str, abi_constructor: &AbiConstruct let _novax_code_bytes = _novax_deploy_data.code.into_bytes_value().await?; let mut _novax_deploy_step = ScDeployStep::new() - .call(_novax_contract.init(#endpoint_args_inputs)) + .call(_novax_contract.init(#(#endpoint_args_inputs), *)) .gas_limit(gas_limit) .code(_novax_code_bytes) .code_metadata(_novax_deploy_data.metadata); @@ -629,7 +650,7 @@ fn impl_endpoint_key_for_query(endpoint_name: &str, abi_inputs: &AbiInputs) -> T } // (TokenStream, TokenStream) = (let statements, function params) -fn impl_endpoint_args_for_call(abi_inputs: &AbiInputs, all_abi_types: &AbiTypes) -> Result<(TokenStream, TokenStream), BuildError> { +fn impl_endpoint_args_for_call(abi_inputs: &AbiInputs, all_abi_types: &AbiTypes) -> Result<(TokenStream, Vec), BuildError> { let static_api = get_api_generic_ident(); let mut inputs_let_idents: Vec = vec![]; let mut inputs_function_arg_idents: Vec = vec![]; @@ -645,13 +666,10 @@ fn impl_endpoint_args_for_call(abi_inputs: &AbiInputs, all_abi_types: &AbiTypes) let let_statements_result = quote! { #(#inputs_let_idents)* }; - let function_inputs_result = quote! { - #(#inputs_function_arg_idents), * - }; Ok(( let_statements_result, - function_inputs_result + inputs_function_arg_idents )) } diff --git a/core/Cargo.toml b/core/Cargo.toml index 0c31b74..9b4ed02 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -22,12 +22,12 @@ async-trait = "0.1.72" serde = "1.0.177" serde_json = "1.0.104" tokio = "1.29.1" -multiversx-sc = "=0.48.1" -multiversx-sc-snippets = "=0.48.1" -multiversx-sdk = "=0.3.2" -multiversx-sc-scenario = "=0.48.1" -multiversx-sc-codec = "=0.18.7" -multiversx-sc-codec-derive = "=0.18.7" +multiversx-sc = { path = "../../mx-sdk-rs/framework/base" } +multiversx-sc-snippets = { path = "../../mx-sdk-rs/framework/snippets" } +multiversx-sdk = { path = "../../mx-sdk-rs/sdk/core" } +multiversx-sc-scenario = { path = "../../mx-sdk-rs/framework/scenario" } +multiversx-sc-codec = { path = "../../mx-sdk-rs/data/codec" } +multiversx-sc-codec-derive = "=0.19.0" reqwest = "0.11.18" hex = "0.4.3" diff --git a/data/Cargo.toml b/data/Cargo.toml index 0ecced5..502e9da 100644 --- a/data/Cargo.toml +++ b/data/Cargo.toml @@ -10,9 +10,9 @@ repository = "https://github.com/gfusee/novax" [dependencies] num-bigint = "0.4.3" -multiversx-sc = "=0.48.1" -multiversx-sc-scenario = "=0.48.1" -multiversx-sc-codec = "=0.18.7" -multiversx-sdk = "=0.3.2" +multiversx-sc = { path = "../../mx-sdk-rs/framework/base" } +multiversx-sc-scenario = { path = "../../mx-sdk-rs/framework/scenario" } +multiversx-sc-codec = { path = "../../mx-sdk-rs/data/codec" } +multiversx-sdk = { path = "../../mx-sdk-rs/sdk/core" } serde = "1.0.183" base64 = "0.21.3" diff --git a/executor/Cargo.toml b/executor/Cargo.toml index 57c52bb..1dc6d31 100644 --- a/executor/Cargo.toml +++ b/executor/Cargo.toml @@ -18,10 +18,10 @@ hex = "0.4.3" base64 = "0.21.3" novax-data = { path = "../data", version = "0.1.6" } novax-request = { path = "../request", version = "0.1.6" } -multiversx-sc = "=0.48.1" -multiversx-sc-scenario = "=0.48.1" -multiversx-sdk = "=0.3.2" -multiversx-sc-snippets = "=0.48.1" +multiversx-sc = { path = "../../mx-sdk-rs/framework/base" } +multiversx-sc-scenario = { path = "../../mx-sdk-rs/framework/scenario" } +multiversx-sdk = { path = "../../mx-sdk-rs/sdk/core" } +multiversx-sc-snippets = { path = "../../mx-sdk-rs/framework/snippets" } [dev-dependencies] serde_json = "1.0.105" diff --git a/executor/src/base/transaction.rs b/executor/src/base/transaction.rs index 76d8d3c..bd9aa10 100644 --- a/executor/src/base/transaction.rs +++ b/executor/src/base/transaction.rs @@ -1,6 +1,10 @@ use std::sync::Arc; use async_trait::async_trait; +use multiversx_sc::api::{HandleTypeInfo, VMApi}; +use multiversx_sc::imports::{FunctionCall, TxEnv, TxFrom, TxGas, TxPayment, TxTo}; +use multiversx_sc::types::TxTypedCall; use multiversx_sc_scenario::scenario_model::TypedScCall; +use multiversx_sc_snippets::Interactor; use tokio::sync::Mutex; use crate::error::executor::ExecutorError; @@ -19,7 +23,16 @@ pub trait TransactionExecutor: Send + Sync { /// /// # Returns /// - A `Result` with an empty `Ok(())` value if the call is successful, or an `Err(ExecutorError)` if the call fails. - async fn sc_call(&mut self, sc_call_step: &mut TypedScCall) -> Result<(), ExecutorError>; + async fn sc_call(&mut self, typed_call: TxTypedCall) -> Result<(), ExecutorError> + where + Env: TxEnv + Send + Sync, + Env::Api: VMApi + Send + Sync, + ::ManagedBufferHandle: Send + Sync, + From: TxFrom + Send + Sync, + To: TxTo + Send + Sync, + Payment: TxPayment + Send + Sync, + Gas: TxGas + Send + Sync, + ResultType: Send + Sync; /// Determines whether deserialization should be skipped during the smart contract call execution. /// @@ -30,6 +43,10 @@ pub trait TransactionExecutor: Send + Sync { /// # Returns /// - A `bool` indicating whether deserialization should be skipped. async fn should_skip_deserialization(&self) -> bool; + + async fn get_interactor(&self) -> Interactor { + todo!() + } } /// An implementation of `TransactionExecutor` trait for types wrapped in `Arc>`. @@ -38,11 +55,20 @@ pub trait TransactionExecutor: Send + Sync { #[async_trait] impl TransactionExecutor for Arc> { /// Executes a smart contract call using the underlying `TransactionExecutor` implementation. - async fn sc_call(&mut self, sc_call_step: &mut TypedScCall) -> Result<(), ExecutorError> { + async fn sc_call(&mut self, typed_call: TxTypedCall) -> Result<(), ExecutorError> + where + Env: TxEnv + Send + Sync, + Env::Api: VMApi + Send + Sync, + ::ManagedBufferHandle: Send + Sync, + From: TxFrom + Send + Sync, + To: TxTo + Send + Sync, + Payment: TxPayment + Send + Sync, + Gas: TxGas + Send + Sync, + ResultType: Send + Sync { { // Acquire a lock to ensure exclusive access to the executor during the call execution. let mut executor = self.lock().await; - executor.sc_call(sc_call_step).await + executor.sc_call(typed_call).await } } diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index 928306f..4bd2b97 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -1,6 +1,8 @@ use std::mem; use async_trait::async_trait; +use multiversx_sc::api::{HandleTypeInfo, VMApi}; use multiversx_sc::codec::TopEncodeMulti; +use multiversx_sc::imports::{TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, TypedScCall, TypedScDeploy}; use novax_data::Address; use crate::base::deploy::DeployExecutor; @@ -47,7 +49,17 @@ impl DummyExecutor { #[async_trait] impl TransactionExecutor for DummyExecutor { /// Captures the smart contract call details. - async fn sc_call(&mut self, sc_call_step: &mut TypedScCall) -> Result<(), ExecutorError> { + async fn sc_call(&mut self, typed_call: TxTypedCall) -> Result<(), ExecutorError> + where + Env: TxEnv + Send + Sync, + Env::Api: VMApi + Send + Sync, + ::ManagedBufferHandle: Send + Sync, + From: TxFrom + Send + Sync, + To: TxTo + Send + Sync, + Payment: TxPayment + Send + Sync, + Gas: TxGas + Send + Sync, + ResultType: Send + Sync { + /* let mut owned_sc_call_step = mem::replace(sc_call_step, ScCallStep::new().into()); if let Some(caller) = &self.caller { @@ -57,6 +69,10 @@ impl TransactionExecutor for DummyExecutor { self.tx = owned_sc_call_step.sc_call_step; Ok(()) + + */ + + todo!() } /// Indicates that deserialization should be skipped as there is no actual execution. diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index 64723c0..a3c3e33 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -2,7 +2,9 @@ use std::mem; use std::ops::Deref; use std::sync::Arc; use async_trait::async_trait; +use multiversx_sc::api::{HandleTypeInfo, VMApi}; use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; +use multiversx_sc::imports::{TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; use crate::{ScCallStep, ScDeployStep, ScQueryStep, TxQuery, TypedScCall, TypedScDeploy, TypedScQuery}; use crate::ScenarioWorld; use tokio::sync::{Mutex, MutexGuard}; @@ -74,7 +76,17 @@ impl TransactionExecutor for MockExecutor /// # Returns /// - A `Result` object with an empty `Ok(())` value if the call is successful, /// or an `Err(ExecutorError)` if the call fails for any reason. - async fn sc_call(&mut self, sc_call_step: &mut TypedScCall) -> Result<(), ExecutorError> { + async fn sc_call(&mut self, typed_call: TxTypedCall) -> Result<(), ExecutorError> + where + Env: TxEnv + Send + Sync, + Env::Api: VMApi + Send + Sync, + ::ManagedBufferHandle: Send + Sync, + From: TxFrom + Send + Sync, + To: TxTo + Send + Sync, + Payment: TxPayment + Send + Sync, + Gas: TxGas + Send + Sync, + ResultType: Send + Sync { + /* let caller: Address = if let Some(caller) = self.opt_caller.as_deref() { caller.into() } else { @@ -90,6 +102,10 @@ impl TransactionExecutor for MockExecutor } Ok(()) + + */ + + todo!() } /// Specifies whether deserialization should be skipped during the smart contract call execution. diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index b07b7eb..3496552 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -1,6 +1,8 @@ use std::fmt::{Debug, Formatter}; use async_trait::async_trait; use base64::Engine; +use multiversx_sc::api::{HandleTypeInfo, VMApi}; +use multiversx_sc::imports::{TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; use multiversx_sc_scenario::scenario_model::{TxResponse, TypedScCall}; use multiversx_sdk::data::transaction::ApiSmartContractResult; use multiversx_sdk::data::vm::CallType; @@ -76,11 +78,7 @@ impl BaseSimulationNetworkExecutor { version: network_config.erd_min_transaction_version, }; - let Ok(response) = self.client.with_appended_url("/transaction/cost").post(&body).await else { - return Err(GatewayError::CannotSimulateTransaction.into()) - }; - - let Ok(text) = response.text().await else { + let Ok((_, Some(text))) = self.client.with_appended_url("/transaction/cost").post(&body).await else { return Err(GatewayError::CannotSimulateTransaction.into()) }; @@ -130,7 +128,17 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto /// /// # Returns /// A `Result` indicating the success or failure of the smart contract call execution. - async fn sc_call(&mut self, sc_call_step: &mut TypedScCall) -> Result<(), ExecutorError> { + async fn sc_call(&mut self, typed_call: TxTypedCall) -> Result<(), ExecutorError> + where + Env: TxEnv + Send + Sync, + Env::Api: VMApi + Send + Sync, + ::ManagedBufferHandle: Send + Sync, + From: TxFrom + Send + Sync, + To: TxTo + Send + Sync, + Payment: TxPayment + Send + Sync, + Gas: TxGas + Send + Sync, + ResultType: Send + Sync { + /* let sendable_transaction = sc_call_step.to_sendable_transaction(); let simulation_data = SimulationGatewayRequest { @@ -189,6 +197,10 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto sc_call_step.sc_call_step.save_response(tx_response); Ok(()) + + */ + + todo!() } /// Indicates whether deserialization should be skipped during execution. diff --git a/executor/src/network/transaction.rs b/executor/src/network/transaction.rs index e790c5e..6193102 100644 --- a/executor/src/network/transaction.rs +++ b/executor/src/network/transaction.rs @@ -2,7 +2,9 @@ use std::fmt::{Debug, Formatter}; use std::marker::PhantomData; use std::mem; use async_trait::async_trait; +use multiversx_sc::api::{HandleTypeInfo, VMApi}; use multiversx_sc::codec::TopEncodeMulti; +use multiversx_sc::imports::{TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, TypedScCall, TypedScDeploy}; use multiversx_sc_snippets::Interactor; use multiversx_sdk::wallet::Wallet; @@ -96,15 +98,32 @@ impl TransactionExecutor for BaseTransactionNe /// /// # Returns /// - A `Result` with an empty `Ok(())` value if the call is successful, or an `Err(ExecutorError)` if the call fails. - async fn sc_call(&mut self, sc_call_step: &mut TypedScCall) -> Result<(), ExecutorError> { - let owned_sc_call_step = mem::replace(sc_call_step, ScCallStep::new().into()); + async fn sc_call(&mut self, typed_call: TxTypedCall) -> Result<(), ExecutorError> + where + Env: TxEnv + Send + Sync, + Env::Api: VMApi + Send + Sync, + ::ManagedBufferHandle: Send + Sync, + From: TxFrom + Send + Sync, + To: TxTo + Send + Sync, + Payment: TxPayment + Send + Sync, + Gas: TxGas + Send + Sync, + ResultType: Send + Sync { + /* let mut interactor = Interactor::new(&self.gateway_url).await; let sender_address = interactor.register_wallet(self.wallet); - *sc_call_step = owned_sc_call_step.from(&multiversx_sc::types::Address::from(sender_address.to_bytes())); - interactor.sc_call(sc_call_step).await; + typed_call.from = sender_address; + + typed_call + .prepare_async() + .run() + .await; Ok(()) + + */ + + todo!() } /// Indicates whether deserialization should be skipped during smart contract call execution. diff --git a/executor/src/network/utils/address.rs b/executor/src/network/utils/address.rs index b90dae8..8780707 100644 --- a/executor/src/network/utils/address.rs +++ b/executor/src/network/utils/address.rs @@ -7,11 +7,7 @@ use crate::network::models::address::info::{AddressGatewayInfo, AddressGatewayRe pub async fn get_address_info(client: &Client, address: Address) -> Result { let address_bech32 = address.to_bech32_string()?; - let Ok(response) = client.with_appended_url(&format!("/address/{address_bech32}")).get().await else { - return Err(GatewayError::CannotFetchAddressInfo { address: address_bech32 }.into()) - }; - - let Ok(text) = response.text().await else { + let Ok((_, Some(text))) = client.with_appended_url(&format!("/address/{address_bech32}")).get().await else { return Err(GatewayError::CannotFetchAddressInfo { address: address_bech32 }.into()) }; diff --git a/executor/src/network/utils/network.rs b/executor/src/network/utils/network.rs index 5338528..ad249d8 100644 --- a/executor/src/network/utils/network.rs +++ b/executor/src/network/utils/network.rs @@ -4,11 +4,7 @@ use crate::ExecutorError; use crate::network::models::network::config::{NetworkGatewayConfig, NetworkGatewayConfigResponse}; pub async fn get_network_config(client: &Client) -> Result { - let Ok(response) = client.with_appended_url("/network/config").get().await else { - return Err(GatewayError::CannotFetchNetworkConfig.into()) - }; - - let Ok(text) = response.text().await else { + let Ok((_, Some(text)))= client.with_appended_url("/network/config").get().await else { return Err(GatewayError::CannotFetchNetworkConfig.into()) }; diff --git a/mocking/Cargo.toml b/mocking/Cargo.toml index e1d2650..a8cd9b3 100644 --- a/mocking/Cargo.toml +++ b/mocking/Cargo.toml @@ -15,9 +15,9 @@ tokio = "1.30.0" novax = { path = "../core", version = "0.1.6" } novax-token = { path = "../token", version = "0.1.6" } novax-executor = { path = "../executor", version = "0.1.6" } -multiversx-sc = "=0.48.1" -multiversx-sc-snippets = "=0.48.1" -multiversx-sdk = "=0.3.2" +multiversx-sc = { path = "../../mx-sdk-rs/framework/base" } +multiversx-sc-snippets = { path = "../../mx-sdk-rs/framework/snippets" } +multiversx-sdk = { path = "../../mx-sdk-rs/sdk/core" } reqwest = "0.11.18" serde = "1.0.180" serde_json = "1.0.104" diff --git a/mocking/src/lib.rs b/mocking/src/lib.rs index bc16c4d..98c1c1c 100644 --- a/mocking/src/lib.rs +++ b/mocking/src/lib.rs @@ -6,7 +6,6 @@ pub mod gateway; pub mod errors; pub use multiversx_sc::codec::TopEncodeMulti; -pub use multiversx_sc::codec::CodecFrom; pub use novax_executor::TypedResponse; pub use novax_executor::ScenarioWorld; pub use novax_executor::TypedScDeploy; diff --git a/request/Cargo.toml b/request/Cargo.toml index 6708c81..d6a4ee8 100644 --- a/request/Cargo.toml +++ b/request/Cargo.toml @@ -10,6 +10,7 @@ repository = "https://github.com/gfusee/novax" [dependencies] serde = "1.0.188" -reqwest = { version = "0.11.20", features = ["json"] } +reqwest = { version = "0.12.4", features = ["json"] } +http = "1.1.0" async-trait = "0.1.73" diff --git a/request/src/error/client.rs b/request/src/error/client.rs new file mode 100644 index 0000000..57710aa --- /dev/null +++ b/request/src/error/client.rs @@ -0,0 +1,13 @@ +use serde::{Deserialize, Serialize}; +use crate::error::request::RequestError; + +#[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] +pub enum ClientError { + UnknownError +} + +impl From for RequestError { + fn from(value: ClientError) -> Self { + RequestError::Client(value) + } +} \ No newline at end of file diff --git a/request/src/error/mod.rs b/request/src/error/mod.rs new file mode 100644 index 0000000..416d2cc --- /dev/null +++ b/request/src/error/mod.rs @@ -0,0 +1,2 @@ +pub mod request; +pub mod client; \ No newline at end of file diff --git a/request/src/error/request.rs b/request/src/error/request.rs new file mode 100644 index 0000000..5cccd9b --- /dev/null +++ b/request/src/error/request.rs @@ -0,0 +1,7 @@ +use serde::{Deserialize, Serialize}; +use crate::error::client::ClientError; + +#[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] +pub enum RequestError { + Client(ClientError) +} \ No newline at end of file diff --git a/request/src/gateway/client.rs b/request/src/gateway/client.rs index 0736215..a24be77 100644 --- a/request/src/gateway/client.rs +++ b/request/src/gateway/client.rs @@ -1,6 +1,7 @@ use async_trait::async_trait; -use reqwest::{Error, Response}; +use http::StatusCode; use serde::Serialize; +use crate::error::request::RequestError; #[async_trait] pub trait GatewayClient: Send + Sync { @@ -10,9 +11,9 @@ pub trait GatewayClient: Send + Sync { fn with_appended_url(&self, url: &str) -> Self::Owned; - async fn get(&self) -> Result; + async fn get(&self) -> Result<(StatusCode, Option), RequestError>; - async fn post(&self, body: &Body) -> Result + async fn post(&self, body: &Body) -> Result<(StatusCode, Option), RequestError> where Body: Serialize + Send + Sync; } \ No newline at end of file diff --git a/request/src/gateway/reqwest.rs b/request/src/gateway/reqwest.rs index e8b2305..bcd58c7 100644 --- a/request/src/gateway/reqwest.rs +++ b/request/src/gateway/reqwest.rs @@ -1,7 +1,12 @@ use std::borrow::Borrow; + use async_trait::async_trait; -use reqwest::{Client, Error, Response}; +use http::StatusCode; +use reqwest::Client; use serde::Serialize; +use crate::error::client::ClientError; + +use crate::error::request::RequestError; use crate::gateway::client::GatewayClient; #[async_trait] @@ -19,18 +24,44 @@ where format!("{}{url}", self.borrow()) } - async fn get(&self) -> Result { - Client::new() + async fn get(&self) -> Result<(StatusCode, Option), RequestError> { + let response = Client::new() .get(self.borrow()) .send() .await + .map_err(|_| ClientError::UnknownError)?; + + let status = response.status(); + + let text = if status.is_success() { + let text = response.text().await.unwrap(); // TODO + + Some(text) + } else { + None + }; + + Ok((status, text)) } - async fn post(&self, body: &Body) -> Result where Body: Serialize + Send + Sync { - Client::new() + async fn post(&self, body: &Body) -> Result<(StatusCode, Option), RequestError> where Body: Serialize + Send + Sync { + let response = Client::new() .post(self.borrow()) .json(body) .send() .await + .map_err(|_| ClientError::UnknownError)?; + + let status = response.status(); + + let text = if status.is_success() { + let text = response.text().await.unwrap(); // TODO + + Some(text) + } else { + None + }; + + Ok((status, text)) } } \ No newline at end of file diff --git a/request/src/lib.rs b/request/src/lib.rs index 9603851..612c761 100644 --- a/request/src/lib.rs +++ b/request/src/lib.rs @@ -1 +1,2 @@ -pub mod gateway; \ No newline at end of file +pub mod gateway; +pub mod error; \ No newline at end of file diff --git a/tester/contract/Cargo.toml b/tester/contract/Cargo.toml index 715d5be..9411e97 100644 --- a/tester/contract/Cargo.toml +++ b/tester/contract/Cargo.toml @@ -10,10 +10,10 @@ license = "GPL-3.0-only" path = "src/lib.rs" [dependencies] -multiversx-sc = "=0.48.1" +multiversx-sc = { path = "../../../mx-sdk-rs/framework/base" } [dev-dependencies] -multiversx-sc-scenario = "=0.48.1" +multiversx-sc-scenario = { path = "../../../mx-sdk-rs/framework/scenario" } [package.metadata.release] release = false diff --git a/tester/contract/meta/Cargo.toml b/tester/contract/meta/Cargo.toml index fc26f1c..11814ee 100644 --- a/tester/contract/meta/Cargo.toml +++ b/tester/contract/meta/Cargo.toml @@ -8,7 +8,7 @@ authors = [ "you",] [dev-dependencies] [dependencies] -multiversx-sc-meta = "=0.48.1" +multiversx-sc-meta = { path = "../../../../mx-sdk-rs/framework/meta" } tester-contract = { path = ".." } [package.metadata.release] diff --git a/tester/contract/wasm/Cargo.toml b/tester/contract/wasm/Cargo.toml index c3dae32..d06c2bb 100644 --- a/tester/contract/wasm/Cargo.toml +++ b/tester/contract/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" [dependencies] tester-contract = { path = ".." } -multiversx-sc-wasm-adapter = "=0.48.1" \ No newline at end of file +multiversx-sc-wasm-adapter = "=0.50.1" \ No newline at end of file diff --git a/tester/core/Cargo.toml b/tester/core/Cargo.toml index 1562198..8226899 100644 --- a/tester/core/Cargo.toml +++ b/tester/core/Cargo.toml @@ -10,7 +10,7 @@ license = "GPL-3.0-only" [dev-dependencies] tokio = "1.30.0" -hyper = "=1.0.0-rc.4" +hyper = "=1.1.0" reqwest = "=0.11.20" serde = "1.0.193" serde_json = "1.0.108" diff --git a/tester/core/tests/network_simulate.rs b/tester/core/tests/network_simulate.rs index 5cf66c3..3d75394 100644 --- a/tester/core/tests/network_simulate.rs +++ b/tester/core/tests/network_simulate.rs @@ -2,55 +2,47 @@ mod utils; use std::sync::Arc; use async_trait::async_trait; -use hyper::StatusCode; +use hyper::{http, StatusCode}; use tokio::sync::Mutex; use novax::Address; use novax::errors::NovaXError; use num_bigint::BigUint; -use reqwest::{Error, Response}; +use reqwest::{Body, Response}; use serde::Serialize; use novax::tester::tester::TesterContract; use novax::executor::{BaseSimulationNetworkExecutor, SimulationNetworkExecutor}; +use novax_request::error::request::RequestError; use novax_request::gateway::client::GatewayClient; const CALLER: &str = "erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g"; const TESTER_CONTRACT_ADDRESS: &str = "erd1qqqqqqqqqqqqqpgq7x53hfeg9558dmzjg9lqyfar77z8wrxf5u7qrawwh0"; -fn get_response_from_data(status: StatusCode, data: String) -> Response { - let hyper_response = hyper::Response::builder() - .status(status) - .body(data) - .unwrap(); - - Response::from(hyper_response) -} - -fn get_caller_infos() -> Response { +fn get_caller_infos() -> (StatusCode, String) { let status = StatusCode::OK; let data = r#"{"data":{"account":{"address":"erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g","nonce":5,"balance":"49893375980000000000","username":"","code":"","codeHash":null,"rootHash":null,"codeMetadata":null,"developerReward":"0","ownerAddress":""},"blockInfo":{"nonce":1514622,"hash":"119621492bad699ac2a60ad276720d1735c1d0eebfe70a82498d8a613a22063a","rootHash":"6ba976a765877a1d9183ca270fc0897ff6b23f30411125243394ed39b309a0b1"}},"error":"","code":"successful"}"#.to_string(); - get_response_from_data(status, data) + (status, data) } -fn get_network_config() -> Response { +fn get_network_config() -> (StatusCode, String) { let status = StatusCode::OK; let data = r#"{"data":{"config":{"erd_adaptivity":"false","erd_chain_id":"D","erd_denomination":18,"erd_extra_gas_limit_guarded_tx":50000,"erd_gas_per_data_byte":1500,"erd_gas_price_modifier":"0.01","erd_hysteresis":"0.200000","erd_latest_tag_software_version":"D1.6.6.1","erd_max_gas_per_transaction":600000000,"erd_meta_consensus_group_size":58,"erd_min_gas_limit":50000,"erd_min_gas_price":1000000000,"erd_min_transaction_version":1,"erd_num_metachain_nodes":58,"erd_num_nodes_in_shard":58,"erd_num_shards_without_meta":3,"erd_rewards_top_up_gradient_point":"2000000000000000000000000","erd_round_duration":6000,"erd_rounds_per_epoch":2400,"erd_shard_consensus_group_size":21,"erd_start_time":1694000000,"erd_top_up_factor":"0.500000"}},"error":"","code":"successful"}"#.to_string(); - get_response_from_data(status, data) + (status, data) } -fn get_return_caller_simulation_data() -> Response { +fn get_return_caller_simulation_data() -> (StatusCode, String) { let status = StatusCode::OK; let data = r#"{"data":{"txGasUnits":2384920,"returnMessage":"","smartContractResults":{"4b34385c5a43aa4e2f8b66f63f0e1786aef3e2acff288bd4c2669e71f9078deb":{"nonce":6,"value":26150800000000,"receiver":"erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g","sender":"erd1qqqqqqqqqqqqqpgq7x53hfeg9558dmzjg9lqyfar77z8wrxf5u7qrawwh0","data":"@6f6b@e5f5ec2bf6b925565fd1ed99e958858250ce40fd73b12d5792e68bbda679a73c","prevTxHash":"0e888497084b1d6581698537b0a1f1c6f50841fbb5188b5e9b8ebc338662a49f","originalTxHash":"0e888497084b1d6581698537b0a1f1c6f50841fbb5188b5e9b8ebc338662a49f","gasLimit":0,"gasPrice":1000000000,"callType":0,"operation":"transfer","isRefund":true}}},"error":"","code":"successful"}"#.to_string(); - get_response_from_data(status, data) + (status, data) } -fn get_return_biguint_argument_simulation_data() -> Response { +fn get_return_biguint_argument_simulation_data() -> (StatusCode, String) { let status = StatusCode::OK; let data = r#"{"data":{"txGasUnits":2442787,"returnMessage":"","smartContractResults":{}},"error":"","code":"successful"}"#.to_string(); - get_response_from_data(status, data) + (status, data) } struct MockClient { @@ -79,10 +71,10 @@ impl GatewayClient for MockClient { } } - async fn get(&self) -> Result { + async fn get(&self) -> Result<(StatusCode, Option), RequestError> { let url = self.get_gateway_url(); - let response = if url == format!("/address/{CALLER}") { + let result = if url == format!("/address/{CALLER}") { get_caller_infos() } else if url == "/network/config" { get_network_config() @@ -90,13 +82,13 @@ impl GatewayClient for MockClient { todo!() }; - Ok(response) + Ok((result.0, Some(result.1))) } - async fn post(&self, body: &Body) -> Result where Body: Serialize + Send + Sync { + async fn post(&self, body: &Body) -> Result<(StatusCode, Option), RequestError> where Body: Serialize + Send + Sync { let data = serde_json::to_string(body).unwrap(); - let response = if data == r#"{"nonce":5,"value":"0","receiver":"erd1qqqqqqqqqqqqqpgq7x53hfeg9558dmzjg9lqyfar77z8wrxf5u7qrawwh0","sender":"erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g","gasPrice":1000000000,"gasLimit":600000000,"data":"cmV0dXJuQ2FsbGVy","chainId":"D","version":1}"# { + let result = if data == r#"{"nonce":5,"value":"0","receiver":"erd1qqqqqqqqqqqqqpgq7x53hfeg9558dmzjg9lqyfar77z8wrxf5u7qrawwh0","sender":"erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g","gasPrice":1000000000,"gasLimit":600000000,"data":"cmV0dXJuQ2FsbGVy","chainId":"D","version":1}"# { get_return_caller_simulation_data() } else if data == r#"{"nonce":5,"value":"0","receiver":"erd1qqqqqqqqqqqqqpgq7x53hfeg9558dmzjg9lqyfar77z8wrxf5u7qrawwh0","sender":"erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g","gasPrice":1000000000,"gasLimit":600000000,"data":"YWRkQDBh","chainId":"D","version":1}"# { get_return_biguint_argument_simulation_data() @@ -104,7 +96,7 @@ impl GatewayClient for MockClient { todo!() }; - Ok(response) + Ok((result.0, Some(result.1))) } } diff --git a/token/Cargo.toml b/token/Cargo.toml index ebe34d0..687f7b0 100644 --- a/token/Cargo.toml +++ b/token/Cargo.toml @@ -17,14 +17,15 @@ novax-data = { path = "../data", version = "0.1.6" } novax-request = { path = "../request", version = "0.1.6" } num-bigint = "0.4.4" async-trait = "0.1.73" -multiversx-sc = "=0.48.1" -multiversx-sc-scenario = "=0.48.1" -multiversx-sc-codec = "=0.18.7" +multiversx-sc = { path = "../../mx-sdk-rs/framework/base" } +multiversx-sc-scenario = { path = "../../mx-sdk-rs/framework/scenario" } +multiversx-sc-codec = { path = "../../mx-sdk-rs/data/codec" } base64 = "0.21.5" [dev-dependencies] tokio = "1.32.0" async-trait = "0.1.73" reqwest = "0.11.20" -hyper = "1.0.0-rc.4" +hyper = "1.1.0" +http = "1.1.0" diff --git a/token/src/account/balance.rs b/token/src/account/balance.rs index 7df8541..47a12d9 100644 --- a/token/src/account/balance.rs +++ b/token/src/account/balance.rs @@ -75,9 +75,8 @@ async fn fetch_all_tokens_for_address(gateway_client: &Client, caching.get_or_set_cache( hasher.finish(), async { - let Ok(response) = client.get().await else { return Err(TokenError::UnknownErrorWhileGettingEsdtInfosOfAddress { address: address.to_string() }) }; - let Ok(response) = response.text().await else { return Err(TokenError::UnknownErrorWhileGettingEsdtInfosOfAddress { address: address.to_string() }) }; - let Ok(decoded) = serde_json::from_str::(&response) else { + let Ok((_, Some(text))) = client.get().await else { return Err(TokenError::UnknownErrorWhileGettingEsdtInfosOfAddress { address: address.to_string() }) }; + let Ok(decoded) = serde_json::from_str::(&text) else { return Err(TokenError::CannotParseEsdtBalances { address: address.to_string() }) }; diff --git a/token/src/mock/request.rs b/token/src/mock/request.rs index 6875614..c6158cf 100644 --- a/token/src/mock/request.rs +++ b/token/src/mock/request.rs @@ -1,7 +1,10 @@ use async_trait::async_trait; -use reqwest::{Error, Response, ResponseBuilderExt}; +use http::StatusCode; +use reqwest::ResponseBuilderExt; use serde::Serialize; use serde_json::Value; + +use novax_request::error::request::RequestError; use novax_request::gateway::client::GatewayClient; const MOCK_BASE_URL: &str = "https://test.test"; @@ -32,23 +35,15 @@ impl GatewayClient for MockClient { } } - async fn get(&self) -> Result { - let (status, data) = if let Some((status, data)) = account::get_account_response(&self.url) { - (status, data) + async fn get(&self) -> Result<(StatusCode, Option), RequestError> { + if let Some((status, data)) = account::get_account_response(&self.url) { + Ok((status, Some(data))) } else { panic!("Unknown url: {}", self.url) - }; - - let hyper_response = hyper::Response::builder() - .url(self.url.parse().unwrap()) - .status(status) - .body(data) - .unwrap(); - - Ok(Response::from(hyper_response)) + } } - async fn post(&self, body: &Body) -> Result + async fn post(&self, body: &Body) -> Result<(StatusCode, Option), RequestError> where Body: Serialize + Send + Sync { @@ -59,19 +54,11 @@ impl GatewayClient for MockClient { let serialized = serde_json::to_string(body).unwrap(); let decoded = serde_json::from_str::(&serialized).unwrap(); - let (status, data) = if let Some((status, data)) = token::get_token_properties_vm_query_response(&decoded) { - (status, data) + if let Some((status, data)) = token::get_token_properties_vm_query_response(&decoded) { + Ok((status, Some(data))) } else { todo!() - }; - - let hyper_response = hyper::Response::builder() - .url(self.url.parse().unwrap()) - .status(status) - .body(data) - .unwrap(); - - Ok(Response::from(hyper_response)) + } } } diff --git a/token/src/properties/fetch.rs b/token/src/properties/fetch.rs index c8af70c..6526895 100644 --- a/token/src/properties/fetch.rs +++ b/token/src/properties/fetch.rs @@ -82,11 +82,7 @@ async fn fetch_token_properties(gateway_client: &Client, token_identifie ) .await; - let Ok(response) = response else { - return Err(TokenError::UnknownErrorForToken { token_identifier: token_identifier.to_string() }) - }; - - let Ok(text) = response.text().await else { + let Ok((_, Some(text))) = response else { return Err(TokenError::UnknownErrorForToken { token_identifier: token_identifier.to_string() }) }; From 377cd1bd6702f13d48cf046d02c2ce2707a80f48 Mon Sep 17 00:00:00 2001 From: Fusee Date: Fri, 17 May 2024 14:08:13 +0200 Subject: [PATCH 02/25] =?UTF-8?q?added=20todo!()=20everywhere=20so=20it=20?= =?UTF-8?q?compiles=20=F0=9F=91=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- abi-build/src/generator/impl_abi_mod.rs | 4 +- abi-build/src/generator/impl_contract.rs | 70 ++++++------------- core/src/lib.rs | 3 - core/src/transaction/mod.rs | 5 -- executor/src/base/query.rs | 54 ++++++++++++-- executor/src/base/transaction.rs | 59 +++++++++------- executor/src/dummy/transaction.rs | 27 ++++--- executor/src/lib.rs | 2 + executor/src/mocking/executor.rs | 37 +++++++--- executor/src/network/query.rs | 51 ++++++++++++-- executor/src/network/simulate.rs | 26 ++++--- executor/src/network/transaction.rs | 26 ++++--- executor/src/utils/mod.rs | 1 + .../src/utils}/transaction/call_result.rs | 0 executor/src/utils/transaction/mod.rs | 4 +- .../src/utils}/transaction/token_transfer.rs | 0 tester/core/tests/network_deploy.rs | 2 +- 17 files changed, 235 insertions(+), 136 deletions(-) delete mode 100644 core/src/transaction/mod.rs rename {core/src => executor/src/utils}/transaction/call_result.rs (100%) rename {core/src => executor/src/utils}/transaction/token_transfer.rs (100%) diff --git a/abi-build/src/generator/impl_abi_mod.rs b/abi-build/src/generator/impl_abi_mod.rs index ffb5504..bf083db 100644 --- a/abi-build/src/generator/impl_abi_mod.rs +++ b/abi-build/src/generator/impl_abi_mod.rs @@ -102,20 +102,20 @@ fn get_mod_imports() -> TokenStream { use multiversx_sc_codec::Empty; use multiversx_sc_scenario::ContractInfo; use multiversx_sc_snippets::Interactor; - use crate::transaction::TokenTransfer; use multiversx_sc_scenario::scenario_model::ScCallStep; use multiversx_sc_scenario::scenario_model::TypedScCall; use multiversx_sc_scenario::scenario_model::TxExpect; use multiversx_sc_scenario::scenario_model::AddressKey; use multiversx_sc::api::VMApi; use multiversx_sc_scenario::DebugApi; - use crate::transaction::CallResult; use std::sync::Arc; use tokio::sync::Mutex; use multiversx_sc_scenario::scenario_model::TxResponse; use multiversx_sc_scenario::scenario_model::ScQueryStep; use novax_executor::TransactionExecutor; use novax_executor::QueryExecutor; + use novax_executor::TokenTransfer; + use novax_executor::call_result::CallResult; use novax_data::ManagedConvertible; use multiversx_sc_scenario::scenario_model::ScDeployStep; use crate::code::AsBytesValue; diff --git a/abi-build/src/generator/impl_contract.rs b/abi-build/src/generator/impl_contract.rs index 548e0fc..24dc523 100644 --- a/abi-build/src/generator/impl_contract.rs +++ b/abi-build/src/generator/impl_contract.rs @@ -399,8 +399,9 @@ fn impl_abi_endpoint_call_query( let common_token = quote! { let _novax_request_arc = crate::utils::static_request_arc::get_static_request_arc_clone(); - let _novax_contract_address_value: AddressValue = (&Address::from(&self.contract_address)).into(); - let mut _novax_contract = #contract_info_ident::new(&_novax_contract_address_value); // unnecessary clone when calling + let _novax_contract_address = Address::from(&self.contract_address); + let _novax_contract_address_value: AddressValue = (&_novax_contract_address).into(); + let mut _novax_contract = #contract_info_ident::new(&_novax_contract_address_value); #endpoint_args_let_statements @@ -409,14 +410,6 @@ fn impl_abi_endpoint_call_query( } else { EgldOrMultiEsdtPayment::Egld(BigUint::<#debug_api>::from(0u8)) }; - - let interactor: Interactor = todo!(); - let mut _novax_tx = interactor - .tx() - .to(Bech32Address::from_bech32_string(Address::from(&self.contract_address).to_bech32_string().unwrap())) - .egld_or_multi_esdt(_novax_payment); - - #(_novax_tx.argument(#endpoint_args_inputs)); *; }; let call_token = quote! { @@ -433,44 +426,16 @@ fn impl_abi_endpoint_call_query( pub async fn #function_name(#function_inputs) -> Result, NovaXError> { #common_token - _novax_tx = _novax_tx - .gas_limit(self.gas_limit); - - for _novax_transfer in &self.token_transfers { - _novax_tx = _novax_tx - .esdt_transfer( - format!("str:{}", _novax_transfer.identifier.clone()), - _novax_transfer.nonce.clone(), - _novax_transfer.amount.clone() - ); - } - - let _novax_should_skip_deserialization = async { - self.executor.sc_call(&mut _novax_tx).await?; - - Result::Ok::(self.executor.should_skip_deserialization().await) - }.await?; - - let (_novax_result, _novax_response) = { - let mut result = None; - let mut opt_response = None; - if !_novax_should_skip_deserialization { - if let Result::Ok(_novax_parsed_result) = _novax_tx.result::<#function_managed_outputs>() { - result = Some(_novax_parsed_result); - opt_response = Some(_novax_tx.response().clone()); - } - } - - (result, opt_response.unwrap_or_else(|| TxResponse::default())) - }; - - - let mut _novax_call_result = CallResult { - response: _novax_response, - result: _novax_result.to_native() - }; + let result = self.executor.sc_call::<#function_managed_outputs>( + &_novax_contract_address, + "todo", + &vec![], // TODO + 0, // TODO + &num_bigint::BigUint::from(0u8), // TODO + &vec![], // TODO + ).await?; - Result::Ok(_novax_call_result) + Result::Ok(result) } }; @@ -491,7 +456,14 @@ fn impl_abi_endpoint_call_query( self.caching.get_or_set_cache( _novax_key, async { - let result = self.executor.execute::<#function_managed_outputs>(&_novax_tx).await; + let result = self.executor + .execute::<#function_managed_outputs>( + &_novax_contract_address, + "todo", + &vec![], // TODO + &num_bigint::BigUint::from(0u8), // TODO + &vec![], // TODO + ).await; if let Result::Ok(result) = result { Result::Ok::<_, NovaXError>(result) @@ -656,7 +628,7 @@ fn impl_endpoint_args_for_call(abi_inputs: &AbiInputs, all_abi_types: &AbiTypes) let mut inputs_function_arg_idents: Vec = vec![]; for input in abi_inputs { let input_name_ident = format_ident!("r#{}", input.name); - let input_managed_name_ident = format_ident!("_novax_{}", input.name); + let input_managed_name_ident = format_ident!("_novax_argument_{}", input.name); let input_managed_type = get_managed_type_for_abi_type(&input.r#type, all_abi_types, &static_api)?; inputs_let_idents.push(quote! { let #input_managed_name_ident: #input_managed_type = #input_name_ident.to_managed(); diff --git a/core/src/lib.rs b/core/src/lib.rs index 59662d2..2f01553 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -51,9 +51,6 @@ pub mod caching; /// The `errors` module centralizes various error types encountered within the `novax` crate's operations. pub mod errors; -/// The `transaction` module contains essential structs and types for handling blockchain transactions. -pub mod transaction; - /// The `code` module facilitates reading and handling of smart contract code. pub mod code; diff --git a/core/src/transaction/mod.rs b/core/src/transaction/mod.rs deleted file mode 100644 index 39ad80e..0000000 --- a/core/src/transaction/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -mod token_transfer; -mod call_result; - -pub use token_transfer::TokenTransfer; -pub use call_result::CallResult; \ No newline at end of file diff --git a/executor/src/base/query.rs b/executor/src/base/query.rs index 9dfef92..a63407e 100644 --- a/executor/src/base/query.rs +++ b/executor/src/base/query.rs @@ -2,9 +2,11 @@ use std::sync::Arc; use async_trait::async_trait; use multiversx_sc_scenario::multiversx_sc::codec::TopDecodeMulti; use multiversx_sc_scenario::scenario_model::ScCallStep; +use num_bigint::BigUint; use tokio::sync::Mutex; -use novax_data::NativeConvertible; +use novax_data::{Address, NativeConvertible}; use crate::error::executor::ExecutorError; +use crate::TokenTransfer; /// A trait representing the execution of smart contract queries. /// @@ -29,7 +31,14 @@ pub trait QueryExecutor: Clone + Send + Sync { /// /// A [`Result`] containing the native representation of the query result, /// or an [`ExecutorError`] if the query execution fails. - async fn execute(&self, request: &ScCallStep) -> Result + async fn execute( + &self, + to: &Address, + function: &str, + arguments: &[&[u8]], + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; } @@ -39,8 +48,25 @@ pub trait QueryExecutor: Clone + Send + Sync { /// This implementation allows shared access to an executor instance. #[async_trait] impl QueryExecutor for Arc { - async fn execute(&self, request: &ScCallStep) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - T::execute::(self, request).await + async fn execute( + &self, + to: &Address, + function: &str, + arguments: &[&[u8]], + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result + where + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { + T::execute::( + self, + to, + function, + arguments, + egld_value, + esdt_transfers + ).await } } @@ -49,10 +75,26 @@ impl QueryExecutor for Arc { /// This implementation allows exclusive access to an executor instance, ensuring safe mutable access. #[async_trait] impl QueryExecutor for Arc> { - async fn execute(&self, request: &ScCallStep) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { + async fn execute( + &self, + to: &Address, + function: &str, + arguments: &[&[u8]], + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result + where + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { { let executor = self.lock().await; - executor.execute::(request).await + executor.execute::( + to, + function, + arguments, + egld_value, + esdt_transfers + ).await } } } \ No newline at end of file diff --git a/executor/src/base/transaction.rs b/executor/src/base/transaction.rs index bd9aa10..4738b58 100644 --- a/executor/src/base/transaction.rs +++ b/executor/src/base/transaction.rs @@ -1,12 +1,17 @@ use std::sync::Arc; use async_trait::async_trait; use multiversx_sc::api::{HandleTypeInfo, VMApi}; +use multiversx_sc::codec::TopDecodeMulti; use multiversx_sc::imports::{FunctionCall, TxEnv, TxFrom, TxGas, TxPayment, TxTo}; use multiversx_sc::types::TxTypedCall; use multiversx_sc_scenario::scenario_model::TypedScCall; use multiversx_sc_snippets::Interactor; +use num_bigint::BigUint; use tokio::sync::Mutex; +use novax_data::{Address, NativeConvertible}; +use crate::call_result::CallResult; use crate::error::executor::ExecutorError; +use crate::utils::transaction::token_transfer::TokenTransfer; /// A trait defining the necessary operations for executing smart contract transactions. /// @@ -23,16 +28,17 @@ pub trait TransactionExecutor: Send + Sync { /// /// # Returns /// - A `Result` with an empty `Ok(())` value if the call is successful, or an `Err(ExecutorError)` if the call fails. - async fn sc_call(&mut self, typed_call: TxTypedCall) -> Result<(), ExecutorError> - where - Env: TxEnv + Send + Sync, - Env::Api: VMApi + Send + Sync, - ::ManagedBufferHandle: Send + Sync, - From: TxFrom + Send + Sync, - To: TxTo + Send + Sync, - Payment: TxPayment + Send + Sync, - Gas: TxGas + Send + Sync, - ResultType: Send + Sync; + async fn sc_call( + &mut self, + to: &Address, + function: &str, + arguments: &[&[u8]], + gas_limit: u64, + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result, ExecutorError> + where + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; /// Determines whether deserialization should be skipped during the smart contract call execution. /// @@ -43,10 +49,6 @@ pub trait TransactionExecutor: Send + Sync { /// # Returns /// - A `bool` indicating whether deserialization should be skipped. async fn should_skip_deserialization(&self) -> bool; - - async fn get_interactor(&self) -> Interactor { - todo!() - } } /// An implementation of `TransactionExecutor` trait for types wrapped in `Arc>`. @@ -55,20 +57,29 @@ pub trait TransactionExecutor: Send + Sync { #[async_trait] impl TransactionExecutor for Arc> { /// Executes a smart contract call using the underlying `TransactionExecutor` implementation. - async fn sc_call(&mut self, typed_call: TxTypedCall) -> Result<(), ExecutorError> + async fn sc_call( + &mut self, + to: &Address, + function: &str, + arguments: &[&[u8]], + gas_limit: u64, + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result, ExecutorError> where - Env: TxEnv + Send + Sync, - Env::Api: VMApi + Send + Sync, - ::ManagedBufferHandle: Send + Sync, - From: TxFrom + Send + Sync, - To: TxTo + Send + Sync, - Payment: TxPayment + Send + Sync, - Gas: TxGas + Send + Sync, - ResultType: Send + Sync { + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { { // Acquire a lock to ensure exclusive access to the executor during the call execution. let mut executor = self.lock().await; - executor.sc_call(typed_call).await + executor.sc_call::( + to, + function, + arguments, + gas_limit, + egld_value, + esdt_transfers + ).await } } diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index 4bd2b97..cb3929e 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -1,14 +1,17 @@ use std::mem; use async_trait::async_trait; use multiversx_sc::api::{HandleTypeInfo, VMApi}; -use multiversx_sc::codec::TopEncodeMulti; +use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; use multiversx_sc::imports::{TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, TypedScCall, TypedScDeploy}; -use novax_data::Address; +use num_bigint::BigUint; +use novax_data::{Address, NativeConvertible}; use crate::base::deploy::DeployExecutor; use crate::base::transaction::TransactionExecutor; +use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::utils::transaction::data::{SendableTransaction, SendableTransactionConvertible}; +use crate::utils::transaction::token_transfer::TokenTransfer; /// A type alias for `DummyExecutor` handling `ScCallStep`. pub type DummyTransactionExecutor = DummyExecutor; @@ -49,16 +52,18 @@ impl DummyExecutor { #[async_trait] impl TransactionExecutor for DummyExecutor { /// Captures the smart contract call details. - async fn sc_call(&mut self, typed_call: TxTypedCall) -> Result<(), ExecutorError> + async fn sc_call( + &mut self, + to: &Address, + function: &str, + arguments: &[&[u8]], + gas_limit: u64, + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result, ExecutorError> where - Env: TxEnv + Send + Sync, - Env::Api: VMApi + Send + Sync, - ::ManagedBufferHandle: Send + Sync, - From: TxFrom + Send + Sync, - To: TxTo + Send + Sync, - Payment: TxPayment + Send + Sync, - Gas: TxGas + Send + Sync, - ResultType: Send + Sync { + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { /* let mut owned_sc_call_step = mem::replace(sc_call_step, ScCallStep::new().into()); diff --git a/executor/src/lib.rs b/executor/src/lib.rs index a3bc571..ac32255 100644 --- a/executor/src/lib.rs +++ b/executor/src/lib.rs @@ -81,6 +81,8 @@ pub use dummy::transaction::DummyDeployExecutor; pub use utils::transaction::data::SendableTransaction; pub use utils::transaction::data::SendableTransactionConvertible; +pub use utils::transaction::token_transfer::TokenTransfer; +pub use utils::transaction::call_result; pub use multiversx_sc_scenario::ScenarioWorld; pub use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, ScQueryStep, SetStateStep, Account, TxQuery, TxResponse, TypedScCall, TypedScDeploy, TypedScQuery, TypedResponse}; \ No newline at end of file diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index a3c3e33..8228f58 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -5,6 +5,7 @@ use async_trait::async_trait; use multiversx_sc::api::{HandleTypeInfo, VMApi}; use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; use multiversx_sc::imports::{TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; +use num_bigint::BigUint; use crate::{ScCallStep, ScDeployStep, ScQueryStep, TxQuery, TypedScCall, TypedScDeploy, TypedScQuery}; use crate::ScenarioWorld; use tokio::sync::{Mutex, MutexGuard}; @@ -14,8 +15,10 @@ use novax_data::parse_query_return_bytes_data; use crate::base::deploy::DeployExecutor; use crate::base::query::QueryExecutor; use crate::base::transaction::TransactionExecutor; +use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::error::mock_deploy::MockDeployError; +use crate::utils::transaction::token_transfer::TokenTransfer; /// A convenient type alias for `MockExecutor` with `String` as the generic type. pub type StandardMockExecutor = MockExecutor; @@ -76,16 +79,18 @@ impl TransactionExecutor for MockExecutor /// # Returns /// - A `Result` object with an empty `Ok(())` value if the call is successful, /// or an `Err(ExecutorError)` if the call fails for any reason. - async fn sc_call(&mut self, typed_call: TxTypedCall) -> Result<(), ExecutorError> + async fn sc_call( + &mut self, + to: &Address, + function: &str, + arguments: &[&[u8]], + gas_limit: u64, + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result, ExecutorError> where - Env: TxEnv + Send + Sync, - Env::Api: VMApi + Send + Sync, - ::ManagedBufferHandle: Send + Sync, - From: TxFrom + Send + Sync, - To: TxTo + Send + Sync, - Payment: TxPayment + Send + Sync, - Gas: TxGas + Send + Sync, - ResultType: Send + Sync { + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { /* let caller: Address = if let Some(caller) = self.opt_caller.as_deref() { caller.into() @@ -216,10 +221,18 @@ impl QueryExecutor for MockExecutor /// /// * `Result`: On successful execution, returns a `Result` containing the native converted query output. /// On failure, returns a `Result` containing an `ExecutorError`. - async fn execute(&self, request: &ScCallStep) -> Result + async fn execute( + &self, + to: &Address, + function: &str, + arguments: &[&[u8]], + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { + /* // Convert the smart contract query step to a call step. let query = convert_sc_query_step_to_call_step(request); // Create a TypedScQuery from the query. @@ -239,6 +252,10 @@ impl QueryExecutor for MockExecutor let parsed = parse_query_return_bytes_data::(&mut out)?; // Convert the parsed data to its native type and return it. Ok(parsed.to_native()) + + */ + + todo!() } } diff --git a/executor/src/network/query.rs b/executor/src/network/query.rs index 2c47c2e..cbb4644 100644 --- a/executor/src/network/query.rs +++ b/executor/src/network/query.rs @@ -5,11 +5,13 @@ use multiversx_sc_scenario::scenario_model::ScCallStep; use multiversx_sdk::blockchain::CommunicationProxy; use multiversx_sdk::data::address::Address; use multiversx_sdk::data::vm::VmValueRequest; +use num_bigint::BigUint; use novax_data::{NativeConvertible, parse_query_return_string_data}; use crate::base::query::QueryExecutor; use crate::error::executor::ExecutorError; use crate::error::network::NetworkQueryError; use crate::network::proxy::BlockchainProxy; +use crate::TokenTransfer; use crate::utils::transaction::data::SendableTransactionConvertible; /// A convenient type alias for `QueryNetworkExecutor` with `CommunicationProxy` as the generic type. @@ -49,10 +51,18 @@ impl QueryExecutor for QueryNetworkExecutor { /// /// This method constructs a VM request from the provided `ScCallStep`, sends it to the blockchain network /// via the blockchain proxy, and processes the result to return it in a native format. - async fn execute(&self, request: &ScCallStep) -> Result + async fn execute( + &self, + to: &novax_data::Address, + function: &str, + arguments: &[&[u8]], + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result where - OutputManaged: TopDecodeMulti + NativeConvertible + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { + /* let sendable_tx = request.to_sendable_transaction(); let receiver = Address::from_bech32_string(&sendable_tx.receiver).unwrap(); let mut arguments: Vec = sendable_tx.data.split('@').map(|e| e.to_string()).collect(); @@ -75,6 +85,10 @@ impl QueryExecutor for QueryNetworkExecutor { let data: Vec<&str> = result.data.return_data.iter().map(AsRef::as_ref).collect(); Ok(parse_query_return_string_data::(data.as_slice())?.to_native()) + + */ + + todo!() } } @@ -84,8 +98,22 @@ impl QueryExecutor for &str { /// /// This implementation creates a new `ProxyQueryExecutor` instance using the string as the gateway URL, /// and delegates the query execution to it. - async fn execute(&self, request: &ScCallStep) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { + async fn execute( + &self, + to: &novax_data::Address, + function: &str, + arguments: &[&[u8]], + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result + where + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { + /* ProxyQueryExecutor::new(self).execute::(request).await + + */ + todo!() } } @@ -95,7 +123,22 @@ impl QueryExecutor for String { /// /// This implementation creates a new `ProxyQueryExecutor` instance using the string as the gateway URL, /// and delegates the query execution to it. - async fn execute(&self, request: &ScCallStep) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { + async fn execute( + &self, + to: &novax_data::Address, + function: &str, + arguments: &[&[u8]], + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result + where + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { + /* self.as_str().execute::(request).await + + */ + + todo!() } } \ No newline at end of file diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index 3496552..2cfaab8 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -2,17 +2,21 @@ use std::fmt::{Debug, Formatter}; use async_trait::async_trait; use base64::Engine; use multiversx_sc::api::{HandleTypeInfo, VMApi}; +use multiversx_sc::codec::TopDecodeMulti; use multiversx_sc::imports::{TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; use multiversx_sc_scenario::scenario_model::{TxResponse, TypedScCall}; use multiversx_sdk::data::transaction::ApiSmartContractResult; use multiversx_sdk::data::vm::CallType; +use num_bigint::BigUint; use tokio::join; -use novax_data::Address; +use novax_data::{Address, NativeConvertible}; use novax_request::gateway::client::GatewayClient; use crate::{ExecutorError, GatewayError, SendableTransactionConvertible, SimulationError, SimulationGatewayRequest, SimulationGatewayResponse, TransactionExecutor}; +use crate::call_result::CallResult; use crate::network::models::simulate::request::SimulationGatewayRequestBody; use crate::network::utils::address::get_address_info; use crate::network::utils::network::get_network_config; +use crate::utils::transaction::token_transfer::TokenTransfer; /// Type alias for `BaseSimulationNetworkExecutor` with the `String` type as the generic `Client`. pub type SimulationNetworkExecutor = BaseSimulationNetworkExecutor; @@ -128,16 +132,18 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto /// /// # Returns /// A `Result` indicating the success or failure of the smart contract call execution. - async fn sc_call(&mut self, typed_call: TxTypedCall) -> Result<(), ExecutorError> + async fn sc_call( + &mut self, + to: &Address, + function: &str, + arguments: &[&[u8]], + gas_limit: u64, + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result, ExecutorError> where - Env: TxEnv + Send + Sync, - Env::Api: VMApi + Send + Sync, - ::ManagedBufferHandle: Send + Sync, - From: TxFrom + Send + Sync, - To: TxTo + Send + Sync, - Payment: TxPayment + Send + Sync, - Gas: TxGas + Send + Sync, - ResultType: Send + Sync { + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { /* let sendable_transaction = sc_call_step.to_sendable_transaction(); diff --git a/executor/src/network/transaction.rs b/executor/src/network/transaction.rs index 6193102..71aa002 100644 --- a/executor/src/network/transaction.rs +++ b/executor/src/network/transaction.rs @@ -3,15 +3,19 @@ use std::marker::PhantomData; use std::mem; use async_trait::async_trait; use multiversx_sc::api::{HandleTypeInfo, VMApi}; -use multiversx_sc::codec::TopEncodeMulti; +use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; use multiversx_sc::imports::{TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, TypedScCall, TypedScDeploy}; use multiversx_sc_snippets::Interactor; use multiversx_sdk::wallet::Wallet; +use num_bigint::BigUint; +use novax_data::{Address, NativeConvertible}; use crate::base::deploy::DeployExecutor; use crate::base::transaction::TransactionExecutor; +use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::network::interactor::BlockchainInteractor; +use crate::utils::transaction::token_transfer::TokenTransfer; /// Alias for the `BaseTransactionNetworkExecutor` struct, parameterized with the `Interactor` type. pub type NetworkExecutor = BaseTransactionNetworkExecutor; @@ -98,16 +102,18 @@ impl TransactionExecutor for BaseTransactionNe /// /// # Returns /// - A `Result` with an empty `Ok(())` value if the call is successful, or an `Err(ExecutorError)` if the call fails. - async fn sc_call(&mut self, typed_call: TxTypedCall) -> Result<(), ExecutorError> + async fn sc_call( + &mut self, + to: &Address, + function: &str, + arguments: &[&[u8]], + gas_limit: u64, + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result, ExecutorError> where - Env: TxEnv + Send + Sync, - Env::Api: VMApi + Send + Sync, - ::ManagedBufferHandle: Send + Sync, - From: TxFrom + Send + Sync, - To: TxTo + Send + Sync, - Payment: TxPayment + Send + Sync, - Gas: TxGas + Send + Sync, - ResultType: Send + Sync { + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { /* let mut interactor = Interactor::new(&self.gateway_url).await; let sender_address = interactor.register_wallet(self.wallet); diff --git a/executor/src/utils/mod.rs b/executor/src/utils/mod.rs index be9dda0..833c37f 100644 --- a/executor/src/utils/mod.rs +++ b/executor/src/utils/mod.rs @@ -1 +1,2 @@ +/// The `transaction` module contains essential structs and types for handling blockchain transactions. pub mod transaction; \ No newline at end of file diff --git a/core/src/transaction/call_result.rs b/executor/src/utils/transaction/call_result.rs similarity index 100% rename from core/src/transaction/call_result.rs rename to executor/src/utils/transaction/call_result.rs diff --git a/executor/src/utils/transaction/mod.rs b/executor/src/utils/transaction/mod.rs index 12e35bb..00f0ef3 100644 --- a/executor/src/utils/transaction/mod.rs +++ b/executor/src/utils/transaction/mod.rs @@ -1 +1,3 @@ -pub mod data; \ No newline at end of file +pub mod data; +pub mod call_result; +pub mod token_transfer; \ No newline at end of file diff --git a/core/src/transaction/token_transfer.rs b/executor/src/utils/transaction/token_transfer.rs similarity index 100% rename from core/src/transaction/token_transfer.rs rename to executor/src/utils/transaction/token_transfer.rs diff --git a/tester/core/tests/network_deploy.rs b/tester/core/tests/network_deploy.rs index d5e2b32..785a18a 100644 --- a/tester/core/tests/network_deploy.rs +++ b/tester/core/tests/network_deploy.rs @@ -5,9 +5,9 @@ use novax::{Address, CodeMetadata, Wallet}; use novax::errors::NovaXError; use novax::tester::tester::TesterContract; use novax::testerwithreturningdeploy::testerwithreturningdeploy::TesterWithReturningDeployContract; -use novax::transaction::CallResult; use novax::executor::BlockchainInteractor; use novax::executor::BaseTransactionNetworkExecutor; +use novax::executor::call_result::CallResult; use novax_mocking::{ScCallStep, ScDeployStep, TxResponse}; use crate::utils::decode_scr_data::decode_scr_data_or_panic; From 85144942d1d0d76be037b169fb0f480096b09c75 Mon Sep 17 00:00:00 2001 From: Fusee Date: Tue, 21 May 2024 18:11:52 +0200 Subject: [PATCH 03/25] dummy executor is working again --- Cargo.lock | 1 - abi-build/src/generator/impl_abi_mod.rs | 1 + abi-build/src/generator/impl_contract.rs | 40 ++++-- executor/src/base/query.rs | 6 +- executor/src/base/transaction.rs | 4 +- executor/src/dummy/transaction.rs | 62 ++++++-- executor/src/error/dummy.rs | 14 ++ executor/src/error/executor.rs | 6 + executor/src/error/mod.rs | 4 +- executor/src/error/transaction.rs | 14 ++ executor/src/lib.rs | 3 +- executor/src/mocking/executor.rs | 4 +- executor/src/network/interactor.rs | 48 ++++++- executor/src/network/query.rs | 6 +- executor/src/network/simulate.rs | 2 +- executor/src/network/transaction.rs | 39 ++--- executor/src/utils/transaction/data.rs | 38 ++++- executor/src/utils/transaction/mod.rs | 3 +- executor/src/utils/transaction/transfers.rs | 34 +++++ tester/core/tests/dummy_call.rs | 151 +++++++++++++++++--- tester/core/tests/network_call.rs | 17 ++- 21 files changed, 413 insertions(+), 84 deletions(-) create mode 100644 executor/src/error/dummy.rs create mode 100644 executor/src/error/transaction.rs create mode 100644 executor/src/utils/transaction/transfers.rs diff --git a/Cargo.lock b/Cargo.lock index 6da1cab..eedf9af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1279,7 +1279,6 @@ dependencies = [ "log", "multiversx-sc-scenario", "multiversx-sdk", - "rand 0.8.5", "tokio", ] diff --git a/abi-build/src/generator/impl_abi_mod.rs b/abi-build/src/generator/impl_abi_mod.rs index bf083db..2275f99 100644 --- a/abi-build/src/generator/impl_abi_mod.rs +++ b/abi-build/src/generator/impl_abi_mod.rs @@ -126,5 +126,6 @@ fn get_mod_imports() -> TokenStream { use novax_data::Address; use multiversx_sc_scenario::imports::Bech32Address; use core::marker::PhantomData; + use multiversx_sc_codec::TopEncodeMulti; } } \ No newline at end of file diff --git a/abi-build/src/generator/impl_contract.rs b/abi-build/src/generator/impl_contract.rs index 24dc523..bd0ea72 100644 --- a/abi-build/src/generator/impl_contract.rs +++ b/abi-build/src/generator/impl_contract.rs @@ -379,9 +379,9 @@ fn impl_abi_endpoint_call_query( abi_types: &AbiTypes ) -> Result<(TokenStream, TokenStream), BuildError> { let debug_api = get_api_generic_ident(); - let proxy_mod_ident = format_ident!("{proxy_mod_name}"); let contract_info_ident = format_ident!("{}", contract_info_name); - let function_name = format_ident!("{}", abi_endpoint.name.to_case(Case::Snake)); + let endpoint_name = abi_endpoint.name.as_str(); + let function_name_ident = format_ident!("{}", abi_endpoint.name.to_case(Case::Snake)); let function_inputs = impl_endpoint_inputs(true, &abi_endpoint.inputs, abi_types)?; let mut managed_outputs_idents: Vec = vec![]; let mut native_outputs_idents: Vec = vec![]; @@ -410,6 +410,9 @@ fn impl_abi_endpoint_call_query( } else { EgldOrMultiEsdtPayment::Egld(BigUint::<#debug_api>::from(0u8)) }; + + let mut _novax_bytes_args: std::vec::Vec> = vec![]; + #(#endpoint_args_inputs) * }; let call_token = quote! { @@ -423,16 +426,16 @@ fn impl_abi_endpoint_call_query( /// /// # Returns /// A `Result` containing a `CallResult` with the `#function_native_outputs` or a `NovaXError` if the call fails. - pub async fn #function_name(#function_inputs) -> Result, NovaXError> { + pub async fn #function_name_ident(#function_inputs) -> Result, NovaXError> { #common_token let result = self.executor.sc_call::<#function_managed_outputs>( &_novax_contract_address, - "todo", - &vec![], // TODO - 0, // TODO - &num_bigint::BigUint::from(0u8), // TODO - &vec![], // TODO + #endpoint_name, + &_novax_bytes_args, + self.gas_limit, + &self.egld_value, + &self.token_transfers, ).await?; Result::Ok(result) @@ -450,7 +453,7 @@ fn impl_abi_endpoint_call_query( /// /// # Returns /// A `Result` containing the `#function_native_outputs` or a `NovaXError` if the query fails. - pub async fn #function_name(#function_inputs) -> Result<#function_native_outputs, NovaXError> { + pub async fn #function_name_ident(#function_inputs) -> Result<#function_native_outputs, NovaXError> { #common_token #endpoint_query_key self.caching.get_or_set_cache( @@ -459,7 +462,7 @@ fn impl_abi_endpoint_call_query( let result = self.executor .execute::<#function_managed_outputs>( &_novax_contract_address, - "todo", + #endpoint_name, &vec![], // TODO &num_bigint::BigUint::from(0u8), // TODO &vec![], // TODO @@ -522,6 +525,9 @@ fn impl_abi_constructor(contract_info_name: &str, abi_constructor: &AbiConstruct let _novax_code_bytes = _novax_deploy_data.code.into_bytes_value().await?; + todo!(); + + /* let mut _novax_deploy_step = ScDeployStep::new() .call(_novax_contract.init(#(#endpoint_args_inputs), *)) .gas_limit(gas_limit) @@ -557,6 +563,8 @@ fn impl_abi_constructor(contract_info_name: &str, abi_constructor: &AbiConstruct }; Result::Ok((_novax_new_address, _novax_call_result)) + + */ } }; @@ -633,7 +641,17 @@ fn impl_endpoint_args_for_call(abi_inputs: &AbiInputs, all_abi_types: &AbiTypes) inputs_let_idents.push(quote! { let #input_managed_name_ident: #input_managed_type = #input_name_ident.to_managed(); }); - inputs_function_arg_idents.push(input_managed_name_ident.into_token_stream()); + inputs_function_arg_idents.push(quote! { + { + let mut _novax_top_encoded_args = ManagedVec::<#static_api, ManagedBuffer<#static_api>>::new(); + #input_managed_name_ident.multi_encode(&mut _novax_top_encoded_args); + + for _novax_top_encoded_arg in _novax_top_encoded_args.into_iter() { + _novax_bytes_args.push(_novax_top_encoded_arg.to_boxed_bytes().into_vec()); + } + } + + }); } let let_statements_result = quote! { #(#inputs_let_idents)* diff --git a/executor/src/base/query.rs b/executor/src/base/query.rs index a63407e..4986288 100644 --- a/executor/src/base/query.rs +++ b/executor/src/base/query.rs @@ -35,7 +35,7 @@ pub trait QueryExecutor: Clone + Send + Sync { &self, to: &Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], egld_value: &BigUint, esdt_transfers: &[TokenTransfer] ) -> Result @@ -52,7 +52,7 @@ impl QueryExecutor for Arc { &self, to: &Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], egld_value: &BigUint, esdt_transfers: &[TokenTransfer] ) -> Result @@ -79,7 +79,7 @@ impl QueryExecutor for Arc> { &self, to: &Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], egld_value: &BigUint, esdt_transfers: &[TokenTransfer] ) -> Result diff --git a/executor/src/base/transaction.rs b/executor/src/base/transaction.rs index 4738b58..84434a6 100644 --- a/executor/src/base/transaction.rs +++ b/executor/src/base/transaction.rs @@ -32,7 +32,7 @@ pub trait TransactionExecutor: Send + Sync { &mut self, to: &Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], gas_limit: u64, egld_value: &BigUint, esdt_transfers: &[TokenTransfer] @@ -61,7 +61,7 @@ impl TransactionExecutor for Arc> { &mut self, to: &Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], gas_limit: u64, egld_value: &BigUint, esdt_transfers: &[TokenTransfer] diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index cb3929e..73145ff 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -2,40 +2,47 @@ use std::mem; use async_trait::async_trait; use multiversx_sc::api::{HandleTypeInfo, VMApi}; use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; -use multiversx_sc::imports::{TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; +use multiversx_sc::imports::{EgldOrMultiEsdtPayment, ExplicitGas, FunctionCall, Tx, TxDataFunctionCall, TxEnv, TxFrom, TxGas, TxPayment, TxResultHandler, TxScEnv, TxTo, TxTypedCall}; +use multiversx_sc_scenario::imports::{AddressValue, Bech32Address, StaticApi}; use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, TypedScCall, TypedScDeploy}; use num_bigint::BigUint; use novax_data::{Address, NativeConvertible}; use crate::base::deploy::DeployExecutor; use crate::base::transaction::TransactionExecutor; use crate::call_result::CallResult; +use crate::error::dummy::DummyExecutorError; use crate::error::executor::ExecutorError; use crate::utils::transaction::data::{SendableTransaction, SendableTransactionConvertible}; use crate::utils::transaction::token_transfer::TokenTransfer; +use crate::utils::transaction::transfers::get_egld_or_esdt_transfers; /// A type alias for `DummyExecutor` handling `ScCallStep`. -pub type DummyTransactionExecutor = DummyExecutor; +pub type DummyTransactionExecutor = DummyExecutor; /// A type alias for `DummyExecutor` handling `ScDeployStep`. -pub type DummyDeployExecutor = DummyExecutor; +pub type DummyDeployExecutor = DummyExecutor; /// A structure for capturing transaction details without performing actual blockchain transactions. /// It is designed for testing scenarios, especially to fetch `SendableTransaction` details from interactions. pub struct DummyExecutor { /// Holds the transaction details. - pub tx: Tx, + pub tx: Option, /// Optionally holds the caller address. pub caller: Option
} impl DummyExecutor { /// Retrieves the transaction details encapsulated into a `SendableTransaction`. - pub fn get_transaction_details(&self) -> SendableTransaction { - self.tx.to_sendable_transaction() + pub fn get_transaction_details(&self) -> Result { + if let Some(tx) = &self.tx { + Ok(tx.to_sendable_transaction()) + } else { + Err(DummyExecutorError::NoTransactionSent.into()) + } } } -impl DummyExecutor { +impl DummyExecutor { /// Constructs a new `DummyExecutor` instance. /// /// # Arguments @@ -43,20 +50,20 @@ impl DummyExecutor { /// * `caller` - An optional reference to the caller address. pub fn new(caller: &Option
) -> DummyExecutor { DummyExecutor { - tx: Tx::default(), + tx: None, caller: caller.clone() } } } #[async_trait] -impl TransactionExecutor for DummyExecutor { +impl TransactionExecutor for DummyExecutor { /// Captures the smart contract call details. async fn sc_call( &mut self, to: &Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], gas_limit: u64, egld_value: &BigUint, esdt_transfers: &[TokenTransfer] @@ -64,6 +71,32 @@ impl TransactionExecutor for DummyExecutor { where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { + let from = if let Some(caller) = &self.caller { + AddressValue::from(caller) + } else { + AddressValue::from(Bech32Address::from_bech32_string(to.to_bech32_string()?)) + }; + + let payments = get_egld_or_esdt_transfers( + egld_value, + esdt_transfers + )?; + + let mut tx = Tx::new_with_env(TxScEnv::default()) + .from(from) + .to(Bech32Address::from_bech32_string(to.to_bech32_string()?)) + .gas(gas_limit) + .egld_or_multi_esdt(payments) + .raw_call(function); + + for argument in arguments { + tx = tx.argument(argument); + } + + let tx = tx.normalize(); + + self.tx = Some(tx.to_sendable_transaction()); + /* let mut owned_sc_call_step = mem::replace(sc_call_step, ScCallStep::new().into()); @@ -77,7 +110,12 @@ impl TransactionExecutor for DummyExecutor { */ - todo!() + let dummy_result = CallResult { + response: Default::default(), + result: None, + }; + + Ok(dummy_result) } /// Indicates that deserialization should be skipped as there is no actual execution. @@ -99,7 +137,7 @@ impl DeployExecutor for DummyExecutor { owned_sc_deploy_step = owned_sc_deploy_step.from(&multiversx_sc::types::Address::from(caller.to_bytes())); } - self.tx = owned_sc_deploy_step.sc_deploy_step; + self.tx = Some(owned_sc_deploy_step.sc_deploy_step); Ok(()) } diff --git a/executor/src/error/dummy.rs b/executor/src/error/dummy.rs new file mode 100644 index 0000000..ae233e6 --- /dev/null +++ b/executor/src/error/dummy.rs @@ -0,0 +1,14 @@ +use serde::{Deserialize, Serialize}; + +use crate::ExecutorError; + +#[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] +pub enum DummyExecutorError { + NoTransactionSent +} + +impl From for ExecutorError { + fn from(value: DummyExecutorError) -> Self { + ExecutorError::Dummy(value) + } +} \ No newline at end of file diff --git a/executor/src/error/executor.rs b/executor/src/error/executor.rs index 4fad52f..5147099 100644 --- a/executor/src/error/executor.rs +++ b/executor/src/error/executor.rs @@ -1,8 +1,10 @@ use crate::error::network::NetworkQueryError; use serde::{Deserialize, Serialize}; use novax_data::DataError; +use crate::error::dummy::DummyExecutorError; use crate::error::gateway::GatewayError; use crate::error::mock_deploy::MockDeployError; +use crate::error::transaction::TransactionError; use crate::SimulationError; /// An enumeration representing the various types of errors that can be encountered within the executor context. @@ -13,6 +15,8 @@ pub enum ExecutorError { /// the nature of the network-related error that occurred. NetworkQuery(NetworkQueryError), + Dummy(DummyExecutorError), + /// Represents errors specifically related to interactions with the MultiversX gateway. This can include /// HTTP request issues, response parsing errors, and other anomalies encountered while communicating /// with the gateway. The contained `GatewayError` elaborates on the specifics of the encountered issue, @@ -34,6 +38,8 @@ pub enum ExecutorError { /// `MockExecutor` for testing or simulation purposes. The wrapped `MockDeployError` provides more detailed /// information about the nature of the mock deployment-related error that occurred. MockDeploy(MockDeployError), + + Transaction(TransactionError), } /// An implementation of the `From` trait to allow for easy conversions from `DataError` to `ExecutorError`. diff --git a/executor/src/error/mod.rs b/executor/src/error/mod.rs index 28aff0d..9506633 100644 --- a/executor/src/error/mod.rs +++ b/executor/src/error/mod.rs @@ -2,4 +2,6 @@ pub mod executor; pub mod network; pub mod mock_deploy; pub mod gateway; -pub mod simulation; \ No newline at end of file +pub mod simulation; +pub mod transaction; +pub mod dummy; \ No newline at end of file diff --git a/executor/src/error/transaction.rs b/executor/src/error/transaction.rs new file mode 100644 index 0000000..e4d6f06 --- /dev/null +++ b/executor/src/error/transaction.rs @@ -0,0 +1,14 @@ +use serde::{Deserialize, Serialize}; + +use crate::ExecutorError; + +#[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] +pub enum TransactionError { + EgldAndEsdtPaymentsDetected +} + +impl From for ExecutorError { + fn from(value: TransactionError) -> Self { + ExecutorError::Transaction(value) + } +} \ No newline at end of file diff --git a/executor/src/lib.rs b/executor/src/lib.rs index ac32255..d05f7c7 100644 --- a/executor/src/lib.rs +++ b/executor/src/lib.rs @@ -85,4 +85,5 @@ pub use utils::transaction::token_transfer::TokenTransfer; pub use utils::transaction::call_result; pub use multiversx_sc_scenario::ScenarioWorld; -pub use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, ScQueryStep, SetStateStep, Account, TxQuery, TxResponse, TypedScCall, TypedScDeploy, TypedScQuery, TypedResponse}; \ No newline at end of file +pub use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, ScQueryStep, SetStateStep, Account, TxQuery, TxResponse, TypedScCall, TypedScDeploy, TypedScQuery, TypedResponse}; +pub use multiversx_sc::codec::TopDecodeMulti; \ No newline at end of file diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index 8228f58..302fdc3 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -83,7 +83,7 @@ impl TransactionExecutor for MockExecutor &mut self, to: &Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], gas_limit: u64, egld_value: &BigUint, esdt_transfers: &[TokenTransfer] @@ -225,7 +225,7 @@ impl QueryExecutor for MockExecutor &self, to: &Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], egld_value: &BigUint, esdt_transfers: &[TokenTransfer] ) -> Result diff --git a/executor/src/network/interactor.rs b/executor/src/network/interactor.rs index 1b47c3a..500e200 100644 --- a/executor/src/network/interactor.rs +++ b/executor/src/network/interactor.rs @@ -1,8 +1,15 @@ use async_trait::async_trait; +use multiversx_sc::codec::TopDecodeMulti; +use multiversx_sc::imports::EgldOrMultiEsdtPayment; +use multiversx_sc_scenario::api::StaticApi; +use multiversx_sc_scenario::imports::{AddressValue, Bech32Address}; use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep}; use multiversx_sc_snippets::Interactor; use multiversx_sdk::wallet::Wallet; -use novax_data::Address; +use num_bigint::BigUint; +use novax_data::{Address, NativeConvertible}; +use crate::call_result::CallResult; +use crate::{ExecutorError, TokenTransfer}; /// A trait defining the interaction interface with the blockchain. /// This trait abstracts the blockchain interaction, enabling developers to either use the provided `Interactor` struct from the `multiversx-sdk` crate or mock it for testing purposes. @@ -40,9 +47,17 @@ pub trait BlockchainInteractor: Send + Sync { /// # Parameters /// /// * `sc_call_step`: An instance of `S` representing the smart contract call step. - async fn sc_call(&mut self, sc_call_step: S) + async fn sc_call( + &mut self, + from: &Address, + to: &Address, + function: &str, + arguments: &[Vec], + gas_limit: u64, + payment: EgldOrMultiEsdtPayment + ) -> Result, ExecutorError> where - S: AsMut + Send; + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; /// Deploys a smart contract on the blockchain. /// @@ -108,8 +123,31 @@ impl BlockchainInteractor for Interactor { /// # Parameters /// /// * `sc_call_step`: An instance of `S` representing the smart contract call step. - async fn sc_call(&mut self, sc_call_step: S) where S: AsMut + Send { - self.sc_call(sc_call_step).await; + async fn sc_call( + &mut self, + from: &Address, + to: &Address, + function: &str, + arguments: &[Vec], + gas_limit: u64, + payment: EgldOrMultiEsdtPayment + ) -> Result, ExecutorError> + where + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { + let mut tx = self + .tx() + .from(AddressValue::from(from)) + .to(Bech32Address::from_bech32_string(to.to_bech32_string()?)) + .gas(gas_limit) + .egld_or_multi_esdt(payment) + .raw_call(function); + + for argument in arguments { + tx = tx.argument(argument) + } + + todo!() } /// Implements the `sc_deploy` method from the [`BlockchainInteractor`] trait. diff --git a/executor/src/network/query.rs b/executor/src/network/query.rs index cbb4644..85591dd 100644 --- a/executor/src/network/query.rs +++ b/executor/src/network/query.rs @@ -55,7 +55,7 @@ impl QueryExecutor for QueryNetworkExecutor { &self, to: &novax_data::Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], egld_value: &BigUint, esdt_transfers: &[TokenTransfer] ) -> Result @@ -102,7 +102,7 @@ impl QueryExecutor for &str { &self, to: &novax_data::Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], egld_value: &BigUint, esdt_transfers: &[TokenTransfer] ) -> Result @@ -127,7 +127,7 @@ impl QueryExecutor for String { &self, to: &novax_data::Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], egld_value: &BigUint, esdt_transfers: &[TokenTransfer] ) -> Result diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index 2cfaab8..d4bf9cd 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -136,7 +136,7 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto &mut self, to: &Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], gas_limit: u64, egld_value: &BigUint, esdt_transfers: &[TokenTransfer] diff --git a/executor/src/network/transaction.rs b/executor/src/network/transaction.rs index 71aa002..a8e085f 100644 --- a/executor/src/network/transaction.rs +++ b/executor/src/network/transaction.rs @@ -4,7 +4,9 @@ use std::mem; use async_trait::async_trait; use multiversx_sc::api::{HandleTypeInfo, VMApi}; use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; -use multiversx_sc::imports::{TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; +use multiversx_sc::imports::{EgldOrMultiEsdtPayment, EsdtTokenPayment, TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; +use multiversx_sc::types::{ManagedVec, TokenIdentifier}; +use multiversx_sc_scenario::api::StaticApi; use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, TypedScCall, TypedScDeploy}; use multiversx_sc_snippets::Interactor; use multiversx_sdk::wallet::Wallet; @@ -14,8 +16,10 @@ use crate::base::deploy::DeployExecutor; use crate::base::transaction::TransactionExecutor; use crate::call_result::CallResult; use crate::error::executor::ExecutorError; +use crate::error::transaction::TransactionError; use crate::network::interactor::BlockchainInteractor; use crate::utils::transaction::token_transfer::TokenTransfer; +use crate::utils::transaction::transfers::get_egld_or_esdt_transfers; /// Alias for the `BaseTransactionNetworkExecutor` struct, parameterized with the `Interactor` type. pub type NetworkExecutor = BaseTransactionNetworkExecutor; @@ -106,7 +110,7 @@ impl TransactionExecutor for BaseTransactionNe &mut self, to: &Address, function: &str, - arguments: &[&[u8]], + arguments: &[Vec], gas_limit: u64, egld_value: &BigUint, esdt_transfers: &[TokenTransfer] @@ -114,22 +118,23 @@ impl TransactionExecutor for BaseTransactionNe where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - /* let mut interactor = Interactor::new(&self.gateway_url).await; - let sender_address = interactor.register_wallet(self.wallet); - - typed_call.from = sender_address; - - typed_call - .prepare_async() - .run() - .await; - - Ok(()) - - */ - - todo!() + let from = interactor.register_wallet(self.wallet); + + let payment = get_egld_or_esdt_transfers( + egld_value, + esdt_transfers + )?; + + interactor.sc_call::( + &from, + to, + function, + arguments, + gas_limit, + payment + ) + .await } /// Indicates whether deserialization should be skipped during smart contract call execution. diff --git a/executor/src/utils/transaction/data.rs b/executor/src/utils/transaction/data.rs index 56eef09..07d3cf9 100644 --- a/executor/src/utils/transaction/data.rs +++ b/executor/src/utils/transaction/data.rs @@ -1,6 +1,10 @@ +use std::convert::From; use std::str::FromStr; use multiversx_sc::api::CallTypeApi; -use multiversx_sc::types::ContractCallWithEgld; +use multiversx_sc::imports::{Tx, TxData, TxDataFunctionCall, TxEnv, TxFrom, TxGas, TxPayment, TxResultHandler, TxTo}; +use multiversx_sc::types::{ContractCallWithEgld, ManagedAddress}; +use multiversx_sc_scenario::api::StaticApi; +use multiversx_sc_scenario::imports::Bech32Address; use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, TxCall, TxDeploy, TypedScCall, TypedScDeploy}; use multiversx_sdk::data::address::Address; use num_bigint::BigUint; @@ -35,6 +39,12 @@ pub trait SendableTransactionConvertible { // Implementations of `SendableTransactionConvertible` for various types, enabling them to be converted into `SendableTransaction`s. +impl SendableTransactionConvertible for SendableTransaction { + fn to_sendable_transaction(&self) -> SendableTransaction { + self.clone() // TODO: evil clone + } +} + impl SendableTransactionConvertible for ContractCallWithEgld where SA: CallTypeApi + 'static @@ -98,6 +108,32 @@ impl SendableTransactionConvertible for TypedScDeploy { } } +impl SendableTransactionConvertible for Tx, Payment, Gas, Data, RH> + where + Env: TxEnv, + From: TxFrom, + Payment: TxPayment + Clone, // TODO: evil clone + Gas: TxGas, + Data: TxDataFunctionCall, + RH: TxResultHandler, +{ + fn to_sendable_transaction(&self) -> SendableTransaction { + let receiver = Address::from_bytes(self.to.to_byte_array()).to_bech32_string().unwrap(); + let egld_value = self.payment + .clone() // TODO: evil clone + .into_full_payment_data(&self.env).egld + .map(|v| BigUint::from_bytes_be(v.value.to_bytes_be().as_slice())) + .unwrap_or_default(); + + SendableTransaction { + receiver, + egld_value, + gas_limit: self.gas.gas_value(&self.env), + data: self.to_call_data_string().to_string(), + } + } +} + /// Converts a `ContractCallWithEgld` instance into a transaction data string. /// /// This function is almost a duplicate of a private function from `mx-sdk-rs`. diff --git a/executor/src/utils/transaction/mod.rs b/executor/src/utils/transaction/mod.rs index 00f0ef3..f890c40 100644 --- a/executor/src/utils/transaction/mod.rs +++ b/executor/src/utils/transaction/mod.rs @@ -1,3 +1,4 @@ pub mod data; pub mod call_result; -pub mod token_transfer; \ No newline at end of file +pub mod token_transfer; +pub mod transfers; \ No newline at end of file diff --git a/executor/src/utils/transaction/transfers.rs b/executor/src/utils/transaction/transfers.rs new file mode 100644 index 0000000..09243c6 --- /dev/null +++ b/executor/src/utils/transaction/transfers.rs @@ -0,0 +1,34 @@ +use multiversx_sc::imports::{EgldOrMultiEsdtPayment, EsdtTokenPayment, ManagedVec, TokenIdentifier}; +use multiversx_sc_scenario::api::StaticApi; +use num_bigint::BigUint; +use crate::error::transaction::TransactionError; +use crate::{ExecutorError, TokenTransfer}; + +pub fn get_egld_or_esdt_transfers( + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] +) -> Result, ExecutorError> { + let result = if esdt_transfers.is_empty() { + EgldOrMultiEsdtPayment::Egld(multiversx_sc::types::BigUint::::from(egld_value)) + } else { + if egld_value > &BigUint::from(0u8) { + return Err(TransactionError::EgldAndEsdtPaymentsDetected.into()) + } + + let mut payments = ManagedVec::new(); + + for esdt_transfer in esdt_transfers { + payments.push( + EsdtTokenPayment::new( + TokenIdentifier::from(&esdt_transfer.identifier), + esdt_transfer.nonce, + multiversx_sc::types::BigUint::from(&esdt_transfer.amount) + ) + ) + } + + EgldOrMultiEsdtPayment::MultiEsdt(payments) + }; + + Ok(result) +} \ No newline at end of file diff --git a/tester/core/tests/dummy_call.rs b/tester/core/tests/dummy_call.rs index ff7119d..0d6cf9c 100644 --- a/tester/core/tests/dummy_call.rs +++ b/tester/core/tests/dummy_call.rs @@ -4,7 +4,7 @@ use tokio::sync::Mutex; use novax::Address; use novax::errors::NovaXError; use novax::tester::tester::{CustomEnum, CustomEnumWithFields, CustomEnumWithValues, CustomStruct, CustomStructWithStructAndVec, TesterContract}; -use novax::executor::{DummyExecutor, DummyTransactionExecutor, SendableTransaction}; +use novax::executor::{DummyExecutor, DummyTransactionExecutor, SendableTransaction, TokenTransfer}; const CALLER: &str = "erd1h4uhy73dev6qrfj7wxsguapzs8632mfwqjswjpsj6kzm2jfrnslqsuduqu"; const TESTER_CONTRACT_ADDRESS: &str = "erd1qqqqqqqqqqqqqpgq9wmk04e90fkhcuzns0pgwm33sdtxze346vpsq0ka9p"; @@ -37,7 +37,7 @@ async fn test_call_with_biguint_result() -> Result<(), NovaXError> { data: "getSum".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -62,7 +62,7 @@ async fn test_call_with_another_gas_limit() -> Result<(), NovaXError> { data: "getSum".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -87,11 +87,120 @@ async fn test_call_with_biguint_argument() -> Result<(), NovaXError> { data: "add@0a".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } +#[tokio::test] +async fn test_call_with_biguint_argument_and_single_fungible_transfer() -> Result<(), NovaXError> { + let executor = get_executor(); + + TesterContract::new( + TESTER_CONTRACT_ADDRESS + ) + .call(executor.clone(), 600000000) + .with_esdt_transfers( + &vec![ + TokenTransfer { + identifier: "WEGLD-abcdef".to_string(), + nonce: 0, + amount: BigUint::from(100u8), + } + ] + ) + .add(&BigUint::from(10u8)) + .await?; + + let tx = executor.lock().await.get_transaction_details(); + + let expected = SendableTransaction { + receiver: TESTER_CONTRACT_ADDRESS.to_string(), + egld_value: 0u8.into(), + gas_limit: 600000000u64, + data: "ESDTTransfer@5745474c442d616263646566@64@616464@0a".to_string(), + }; + + assert_eq!(tx, Ok(expected)); + + Ok(()) +} + + +#[tokio::test] +async fn test_call_with_biguint_argument_and_single_sft_transfer() -> Result<(), NovaXError> { + let executor = get_executor(); + + TesterContract::new( + TESTER_CONTRACT_ADDRESS + ) + .call(executor.clone(), 600000000) + .with_esdt_transfers( + &vec![ + TokenTransfer { + identifier: "SFT-abcdef".to_string(), + nonce: 1, + amount: BigUint::from(100u8), + } + ] + ) + .add(&BigUint::from(10u8)) + .await?; + + let tx = executor.lock().await.get_transaction_details(); + + let expected = SendableTransaction { + receiver: CALLER.to_string(), + egld_value: 0u8.into(), + gas_limit: 600000000u64, + data: "ESDTNFTTransfer@5346542d616263646566@01@64@000000000000000005002bb767d7257a6d7c705383c2876e318356616635d303@616464@0a".to_string(), + }; + + assert_eq!(tx, Ok(expected)); + + Ok(()) +} + +#[tokio::test] +async fn test_call_with_biguint_argument_and_multi_fungible_sft_transfer() -> Result<(), NovaXError> { + let executor = get_executor(); + + TesterContract::new( + TESTER_CONTRACT_ADDRESS + ) + .call(executor.clone(), 600000000) + .with_esdt_transfers( + &vec![ + TokenTransfer { + identifier: "WEGLD-abcdef".to_string(), + nonce: 0, + amount: BigUint::from(100u8), + }, + TokenTransfer { + identifier: "SFT-abcdef".to_string(), + nonce: 1, + amount: BigUint::from(100u8), + } + ] + ) + .add(&BigUint::from(10u8)) + .await?; + + let tx = executor.lock().await.get_transaction_details(); + + let expected = SendableTransaction { + receiver: CALLER.to_string(), + egld_value: 0u8.into(), + gas_limit: 600000000u64, + data: "MultiESDTNFTTransfer@000000000000000005002bb767d7257a6d7c705383c2876e318356616635d303@02@5745474c442d616263646566@@64@5346542d616263646566@01@64@616464@0a".to_string(), + }; + + assert_eq!(tx, Ok(expected)); + + Ok(()) +} + + #[tokio::test] async fn test_call_double_of_u64_arg_result() -> Result<(), NovaXError> { let executor = get_executor(); @@ -112,7 +221,7 @@ async fn test_call_double_of_u64_arg_result() -> Result<(), NovaXError> { data: "returnDoubleOfU64Arg@0218711a00".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -137,7 +246,7 @@ async fn test_call_double_of_biguint_arg_result() -> Result<(), NovaXError> { data: "returnDoubleOfBiguintArg@0de0b6b3a7640000".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -165,7 +274,7 @@ async fn test_call_sum_of_two_biguint_args_result() -> Result<(), NovaXError> { data: "returnSumTwoBiguintArgs@0de0b6b3a7640000@1bc16d674ec80000".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -194,7 +303,7 @@ async fn test_call_concat_multi_buffer_args_result() -> Result<(), NovaXError> { data: "returnConcatMultiBufferArgs@7465737431@7465737432".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -223,7 +332,7 @@ async fn test_call_sum_multi_u64_args_result() -> Result<(), NovaXError> { data: "returnSumMultiU64Args@0a@0218711a00".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -248,7 +357,7 @@ async fn test_return_optional_value_bool_arg_some_true() -> Result<(), NovaXErro data: "returnOptionalValueBoolArg@01".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -273,7 +382,7 @@ async fn test_return_optional_value_bool_arg_some_false() -> Result<(), NovaXErr data: "returnOptionalValueBoolArg@".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -298,7 +407,7 @@ async fn test_return_optional_value_bool_arg_none() -> Result<(), NovaXError> { data: "returnOptionalValueBoolArg".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -327,7 +436,7 @@ async fn test_call_sum_multi_biguint_args_result() -> Result<(), NovaXError> { data: "returnSumMultiBiguintArgs@0de0b6b3a7640000@1bc16d674ec80000".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -358,7 +467,7 @@ async fn test_call_custom_struct_arg_result() -> Result<(), NovaXError> { data: "returnCustomStructArg@00000004746573740000000218711a00000000080de0b6b3a7640000".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -397,7 +506,7 @@ async fn test_call_custom_struct_with_struct_and_vec_arg_result() -> Result<(), data: "returnCustomStructWithStructAndVecArg@00000002000000000000000a0000000218711a000000000200000005746573743100000005746573743200000004746573740000000218711a00000000080de0b6b3a7640000".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -424,7 +533,7 @@ async fn test_call_custom_enum_arg_result() -> Result<(), NovaXError> { data: "returnCustomEnumArg@02".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -463,7 +572,7 @@ async fn test_call_first_custom_enum_with_values_arg_result() -> Result<(), Nova data: "returnCustomEnumWithValuesArg@0100000002000000000000000a0000000218711a000000000200000005746573743100000005746573743200000004746573740000000218711a00000000080de0b6b3a7640000".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -494,7 +603,7 @@ async fn test_call_second_custom_enum_with_values_arg_result() -> Result<(), Nov data: "returnCustomEnumWithValuesArg@0000000004746573740000000218711a00000000080de0b6b3a7640000".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -525,7 +634,7 @@ async fn test_call_first_custom_enum_with_fields_arg_result() -> Result<(), Nova data: "returnCustomEnumWithFieldsArg@0000000004746573740000000218711a00000000080de0b6b3a7640000".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -564,7 +673,7 @@ async fn test_call_second_custom_enum_with_fields_arg_result() -> Result<(), Nov data: "returnCustomEnumWithFieldsArg@0100000002000000000000000a0000000218711a000000000200000005746573743100000005746573743200000004746573740000000218711a00000000080de0b6b3a7640000".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -589,7 +698,7 @@ async fn test_call_with_bigint_arg_result() -> Result<(), NovaXError> { data: "returnBigIntArg@2c".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } \ No newline at end of file diff --git a/tester/core/tests/network_call.rs b/tester/core/tests/network_call.rs index 741ff9c..f9ad173 100644 --- a/tester/core/tests/network_call.rs +++ b/tester/core/tests/network_call.rs @@ -6,8 +6,10 @@ use tokio::sync::Mutex; use novax::{Address, Wallet}; use novax::errors::NovaXError; use num_bigint::{BigInt, BigUint}; +use novax::data::NativeConvertible; use novax::tester::tester::{CustomEnum, CustomEnumWithFields, CustomEnumWithValues, CustomStruct, CustomStructWithStructAndVec, TesterContract}; -use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, NetworkExecutor, SendableTransactionConvertible}; +use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, ExecutorError, NetworkExecutor, SendableTransactionConvertible, TokenTransfer, TopDecodeMulti}; +use novax::executor::call_result::CallResult; use novax_mocking::{ScCallStep, ScDeployStep, TxResponse}; use crate::utils::decode_scr_data::decode_scr_data_or_panic; @@ -27,7 +29,18 @@ impl BlockchainInteractor for MockInteractor { Address::from_bech32_string(CALLER).unwrap() } - async fn sc_call(&mut self, mut sc_call_step: S) where S: AsMut + Send { + async fn sc_call( + &mut self, + to: &Address, + function: &str, + arguments: &[Vec], + gas_limit: u64, + egld_value: &BigUint, + esdt_transfers: &[TokenTransfer] + ) -> Result, ExecutorError> + where + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { let mut return_data: Option = None; let call_step = sc_call_step.as_mut(); let sendable_transaction = call_step.tx.to_sendable_transaction(); From 9ddbd2e10f6c8848507490aa789bffb8abf1ede3 Mon Sep 17 00:00:00 2001 From: Fusee Date: Tue, 21 May 2024 18:30:54 +0200 Subject: [PATCH 04/25] transaction network executor is working again --- core/src/lib.rs | 3 ++ tester/core/tests/network_call.rs | 55 ++++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 9 deletions(-) diff --git a/core/src/lib.rs b/core/src/lib.rs index 2f01553..d23f156 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -72,6 +72,9 @@ pub use multiversx_sdk::data::vm::VMOutputApi; pub use multiversx_sdk::wallet::Wallet; pub use novax_data::Address; pub use multiversx_sc::types::CodeMetadata; +use multiversx_sc_scenario::imports::StaticApi; + +pub type EgldOrMultiEsdtPayment = multiversx_sc::types::EgldOrMultiEsdtPayment; /// The `executor` module provides re-exports of functionalities from the `novax_executor` crate. /// diff --git a/tester/core/tests/network_call.rs b/tester/core/tests/network_call.rs index f9ad173..4cc9d97 100644 --- a/tester/core/tests/network_call.rs +++ b/tester/core/tests/network_call.rs @@ -3,12 +3,12 @@ mod utils; use std::sync::Arc; use async_trait::async_trait; use tokio::sync::Mutex; -use novax::{Address, Wallet}; +use novax::{Address, EgldOrMultiEsdtPayment, Wallet}; use novax::errors::NovaXError; use num_bigint::{BigInt, BigUint}; use novax::data::NativeConvertible; use novax::tester::tester::{CustomEnum, CustomEnumWithFields, CustomEnumWithValues, CustomStruct, CustomStructWithStructAndVec, TesterContract}; -use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, ExecutorError, NetworkExecutor, SendableTransactionConvertible, TokenTransfer, TopDecodeMulti}; +use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, DummyTransactionExecutor, ExecutorError, NetworkExecutor, SendableTransactionConvertible, TokenTransfer, TopDecodeMulti, TransactionExecutor}; use novax::executor::call_result::CallResult; use novax_mocking::{ScCallStep, ScDeployStep, TxResponse}; use crate::utils::decode_scr_data::decode_scr_data_or_panic; @@ -31,20 +31,51 @@ impl BlockchainInteractor for MockInteractor { async fn sc_call( &mut self, + from: &Address, to: &Address, function: &str, arguments: &[Vec], gas_limit: u64, - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] + payment: EgldOrMultiEsdtPayment ) -> Result, ExecutorError> where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { + let (egld_value, esdt_transfers) = match payment { + EgldOrMultiEsdtPayment::Egld(value) => (value.to_alloc(), vec![]), + EgldOrMultiEsdtPayment::MultiEsdt(transfers) => { + let payments: Vec = transfers + .into_iter() + .map(|transfer| { + TokenTransfer { + identifier: transfer.token_identifier.to_string(), + nonce: transfer.token_nonce, + amount: transfer.amount.to_alloc(), + } + }) + .collect(); + + (BigUint::from(0u8), payments) + } + }; + let mut dummy_executor = DummyTransactionExecutor::new(&None); + _ = dummy_executor.sc_call::( + to, + function, + arguments, + gas_limit, + &egld_value, + &esdt_transfers + ) + .await + .unwrap(); + + let data = dummy_executor + .get_transaction_details() + .unwrap() + .data; let mut return_data: Option = None; - let call_step = sc_call_step.as_mut(); - let sendable_transaction = call_step.tx.to_sendable_transaction(); - let data = sendable_transaction.data; + if data == "returnCaller" { return_data = Some("@6f6b@5393e5fe16508e5a31db9b6f9eda760c79d077c6e00f5f4f9bb3bfbc309a7b8c".to_string()); } else if data == "getSum" { @@ -128,9 +159,15 @@ impl BlockchainInteractor for MockInteractor { panic!("Unknown data for : \"{data}\""); }; - let response = TxResponse::from_raw_results(decode_scr_data_or_panic(&return_data)); + let mut return_data_bytes= decode_scr_data_or_panic(&return_data); + + let response = TxResponse::from_raw_results(return_data_bytes.clone()); + let decoded = OutputManaged::multi_decode(&mut return_data_bytes).unwrap(); - call_step.response = Some(response); + return Ok(CallResult { + response, + result: Some(decoded.to_native()), + }) } async fn sc_deploy(&mut self, _sc_deploy_step: S) where S: AsMut + Send { From 988bb372f8cf59405b538cd7e743c5a88aef7ae5 Mon Sep 17 00:00:00 2001 From: Fusee Date: Tue, 21 May 2024 19:40:00 +0200 Subject: [PATCH 05/25] not working anymore (more refacto needed than expected) --- abi-build/src/generator/impl_contract.rs | 4 +- executor/src/base/transaction.rs | 8 +- executor/src/dummy/transaction.rs | 4 +- executor/src/mocking/executor.rs | 4 +- executor/src/network/interactor.rs | 113 +++++--------------- executor/src/network/simulate.rs | 4 +- executor/src/network/transaction.rs | 14 +-- executor/src/utils/transaction/transfers.rs | 60 +++++++---- 8 files changed, 88 insertions(+), 123 deletions(-) diff --git a/abi-build/src/generator/impl_contract.rs b/abi-build/src/generator/impl_contract.rs index bd0ea72..fe67b10 100644 --- a/abi-build/src/generator/impl_contract.rs +++ b/abi-build/src/generator/impl_contract.rs @@ -434,8 +434,8 @@ fn impl_abi_endpoint_call_query( #endpoint_name, &_novax_bytes_args, self.gas_limit, - &self.egld_value, - &self.token_transfers, + self.egld_value.clone(), + self.token_transfers.clone(), ).await?; Result::Ok(result) diff --git a/executor/src/base/transaction.rs b/executor/src/base/transaction.rs index 84434a6..67ff71f 100644 --- a/executor/src/base/transaction.rs +++ b/executor/src/base/transaction.rs @@ -34,8 +34,8 @@ pub trait TransactionExecutor: Send + Sync { function: &str, arguments: &[Vec], gas_limit: u64, - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] + egld_value: BigUint, + esdt_transfers: Vec ) -> Result, ExecutorError> where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; @@ -63,8 +63,8 @@ impl TransactionExecutor for Arc> { function: &str, arguments: &[Vec], gas_limit: u64, - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] + egld_value: BigUint, + esdt_transfers: Vec ) -> Result, ExecutorError> where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index 73145ff..350ff26 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -65,8 +65,8 @@ impl TransactionExecutor for DummyExecutor { function: &str, arguments: &[Vec], gas_limit: u64, - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] + egld_value: BigUint, + esdt_transfers: Vec ) -> Result, ExecutorError> where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index 302fdc3..46ba115 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -85,8 +85,8 @@ impl TransactionExecutor for MockExecutor function: &str, arguments: &[Vec], gas_limit: u64, - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] + egld_value: BigUint, + esdt_transfers: Vec ) -> Result, ExecutorError> where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync diff --git a/executor/src/network/interactor.rs b/executor/src/network/interactor.rs index 500e200..ec7cfc9 100644 --- a/executor/src/network/interactor.rs +++ b/executor/src/network/interactor.rs @@ -1,15 +1,14 @@ use async_trait::async_trait; -use multiversx_sc::codec::TopDecodeMulti; use multiversx_sc::imports::EgldOrMultiEsdtPayment; use multiversx_sc_scenario::api::StaticApi; -use multiversx_sc_scenario::imports::{AddressValue, Bech32Address}; -use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep}; -use multiversx_sc_snippets::Interactor; +use multiversx_sc_scenario::scenario_model::ScDeployStep; use multiversx_sdk::wallet::Wallet; -use num_bigint::BigUint; -use novax_data::{Address, NativeConvertible}; + +use novax_data::Address; + use crate::call_result::CallResult; -use crate::{ExecutorError, TokenTransfer}; +use crate::ExecutorError; +use crate::utils::transaction::transfers::EgldOrMultiEsdtTransfers; /// A trait defining the interaction interface with the blockchain. /// This trait abstracts the blockchain interaction, enabling developers to either use the provided `Interactor` struct from the `multiversx-sdk` crate or mock it for testing purposes. @@ -20,12 +19,12 @@ pub trait BlockchainInteractor: Send + Sync { /// /// # Parameters /// - /// * `gateway_url`: A string slice representing the URL of the blockchain gateway. + /// * `gateway_url`: A string representing the URL of the blockchain gateway. /// /// # Returns /// /// * `Self`: A new instance of a type implementing `BlockchainInteractor`. - async fn new(gateway_url: &str) -> Self; + async fn new(gateway_url: String) -> Self; /// Registers a wallet with the blockchain interactor, returning the associated blockchain address. /// @@ -47,17 +46,15 @@ pub trait BlockchainInteractor: Send + Sync { /// # Parameters /// /// * `sc_call_step`: An instance of `S` representing the smart contract call step. - async fn sc_call( + async fn sc_call( &mut self, from: &Address, to: &Address, function: &str, arguments: &[Vec], gas_limit: u64, - payment: EgldOrMultiEsdtPayment - ) -> Result, ExecutorError> - where - OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; + payment: EgldOrMultiEsdtTransfers + ) -> Result>, ExecutorError>; /// Deploys a smart contract on the blockchain. /// @@ -83,92 +80,40 @@ pub trait BlockchainInteractor: Send + Sync { S: AsMut + Send; } -/// Implementation of the `BlockchainInteractor` trait for the `Interactor` struct from the `multiversx-sdk` crate. -/// This implementation allows for direct interaction with the blockchain via the provided methods. +pub struct Interactor { + pub gateway_url: String, + pub wallet: Option +} + #[async_trait] impl BlockchainInteractor for Interactor { - - /// Asynchronously creates a new `Interactor` instance with the specified gateway URL. - /// - /// # Parameters - /// - /// * `gateway_url`: A string slice representing the URL of the blockchain gateway. - /// - /// # Returns - /// - /// * `Self`: A new `Interactor` instance. - async fn new(gateway_url: &str) -> Self { - Interactor::new(gateway_url).await + async fn new(gateway_url: String) -> Self { + Self { + gateway_url, + wallet: None, + } } - /// Registers a wallet with the `Interactor`, returning the associated blockchain address. - /// - /// # Parameters - /// - /// * `wallet`: A `Wallet` instance to be registered. - /// - /// # Returns - /// - /// * `Address`: The blockchain address associated with the registered wallet. fn register_wallet(&mut self, wallet: Wallet) -> Address { - self.register_wallet(wallet).into() + let address = Address::from(wallet.address()); + self.wallet = Some(wallet); + + address } - /// Asynchronously executes a smart contract call on the blockchain. - /// - /// # Type Parameters - /// - /// * `S`: A type that implements `AsMut` and `Send`, representing the smart contract call step. - /// - /// # Parameters - /// - /// * `sc_call_step`: An instance of `S` representing the smart contract call step. - async fn sc_call( + async fn sc_call( &mut self, from: &Address, to: &Address, function: &str, arguments: &[Vec], gas_limit: u64, - payment: EgldOrMultiEsdtPayment - ) -> Result, ExecutorError> - where - OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync - { - let mut tx = self - .tx() - .from(AddressValue::from(from)) - .to(Bech32Address::from_bech32_string(to.to_bech32_string()?)) - .gas(gas_limit) - .egld_or_multi_esdt(payment) - .raw_call(function); - - for argument in arguments { - tx = tx.argument(argument) - } - + payment: EgldOrMultiEsdtTransfers + ) -> Result>, ExecutorError> { todo!() } - /// Implements the `sc_deploy` method from the [`BlockchainInteractor`] trait. - /// - /// The `sc_deploy` method of this implementation delegates the smart contract deployment - /// process to the `sc_deploy` method of the current `Interactor` instance. - /// - /// # Type Parameters - /// - `S`: A type that implements [`AsMut`] trait, allowing for a mutable reference to an [`ScDeployStep`] instance to be obtained. - /// - /// # Parameters - /// - `&mut self`: A mutable reference to the current [`Interactor`] instance. - /// - `sc_deploy_step`: The smart contract deployment step encapsulating the necessary information for deployment. - /// - /// # Returns - /// The method returns a [`Result`] indicating the success or failure of the operation. Successful operations - /// will return `Ok(())` while failures will return `Err(BlockchainInteractorError)`. - /// - /// # Errors - /// Any errors that occur during the execution of this method will be encapsulated in a [`BlockchainInteractorError`] and returned. async fn sc_deploy(&mut self, sc_deploy_step: S) where S: AsMut + Send { - self.sc_deploy(sc_deploy_step).await + todo!() } } \ No newline at end of file diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index d4bf9cd..faf7e73 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -138,8 +138,8 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto function: &str, arguments: &[Vec], gas_limit: u64, - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] + egld_value: BigUint, + esdt_transfers: Vec ) -> Result, ExecutorError> where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync diff --git a/executor/src/network/transaction.rs b/executor/src/network/transaction.rs index a8e085f..499918d 100644 --- a/executor/src/network/transaction.rs +++ b/executor/src/network/transaction.rs @@ -112,13 +112,13 @@ impl TransactionExecutor for BaseTransactionNe function: &str, arguments: &[Vec], gas_limit: u64, - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] + egld_value: BigUint, + esdt_transfers: Vec ) -> Result, ExecutorError> where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - let mut interactor = Interactor::new(&self.gateway_url).await; + let mut interactor = Interactor::new(self.gateway_url.clone()).await; let from = interactor.register_wallet(self.wallet); let payment = get_egld_or_esdt_transfers( @@ -126,7 +126,7 @@ impl TransactionExecutor for BaseTransactionNe esdt_transfers )?; - interactor.sc_call::( + let result = interactor.sc_call( &from, to, function, @@ -134,7 +134,9 @@ impl TransactionExecutor for BaseTransactionNe gas_limit, payment ) - .await + .await; + + todo!() } /// Indicates whether deserialization should be skipped during smart contract call execution. @@ -177,7 +179,7 @@ impl DeployExecutor for BaseTransactionNetwork { let sc_deploy_step = sc_deploy_step.as_mut(); let owned_sc_deploy_step = mem::replace(sc_deploy_step, ScDeployStep::new()); - let mut interactor = Interactor::new(&self.gateway_url).await; + let mut interactor = Interactor::new(self.gateway_url.clone()).await; let sender_address = interactor.register_wallet(self.wallet); *sc_deploy_step = owned_sc_deploy_step.from(&multiversx_sc::types::Address::from(sender_address.to_bytes())); diff --git a/executor/src/utils/transaction/transfers.rs b/executor/src/utils/transaction/transfers.rs index 09243c6..363d60f 100644 --- a/executor/src/utils/transaction/transfers.rs +++ b/executor/src/utils/transaction/transfers.rs @@ -1,33 +1,51 @@ -use multiversx_sc::imports::{EgldOrMultiEsdtPayment, EsdtTokenPayment, ManagedVec, TokenIdentifier}; -use multiversx_sc_scenario::api::StaticApi; +use multiversx_sc::imports::{EgldOrMultiEsdtPayment, EsdtTokenPayment, ManagedVec}; +use multiversx_sc::types::TokenIdentifier; +use multiversx_sc_scenario::imports::StaticApi; use num_bigint::BigUint; -use crate::error::transaction::TransactionError; + use crate::{ExecutorError, TokenTransfer}; +use crate::error::transaction::TransactionError; + +pub enum EgldOrMultiEsdtTransfers { + Egld(BigUint), + MultiEsdt(Vec) +} + +impl From for EgldOrMultiEsdtPayment { + fn from(value: EgldOrMultiEsdtTransfers) -> Self { + match value { + EgldOrMultiEsdtTransfers::Egld(value) => Self::Egld(multiversx_sc::types::BigUint::from(value)), + EgldOrMultiEsdtTransfers::MultiEsdt(transfers) => { + let mut managed_transfers = ManagedVec::new(); + + for transfer in transfers { + managed_transfers.push( + EsdtTokenPayment::new( + transfer.identifier.as_str().into(), + transfer.nonce, + transfer.amount.into() + ) + ) + } + + Self::MultiEsdt(managed_transfers) + } + } + } +} pub fn get_egld_or_esdt_transfers( - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] -) -> Result, ExecutorError> { + egld_value: BigUint, + esdt_transfers: Vec +) -> Result { let result = if esdt_transfers.is_empty() { - EgldOrMultiEsdtPayment::Egld(multiversx_sc::types::BigUint::::from(egld_value)) + EgldOrMultiEsdtTransfers::Egld(egld_value) } else { - if egld_value > &BigUint::from(0u8) { + if egld_value > BigUint::from(0u8) { return Err(TransactionError::EgldAndEsdtPaymentsDetected.into()) } - let mut payments = ManagedVec::new(); - - for esdt_transfer in esdt_transfers { - payments.push( - EsdtTokenPayment::new( - TokenIdentifier::from(&esdt_transfer.identifier), - esdt_transfer.nonce, - multiversx_sc::types::BigUint::from(&esdt_transfer.amount) - ) - ) - } - - EgldOrMultiEsdtPayment::MultiEsdt(payments) + EgldOrMultiEsdtTransfers::MultiEsdt(esdt_transfers) }; Ok(result) From 0f3b3d926a7d104e45807ba4ed20d8b4c9a4c846 Mon Sep 17 00:00:00 2001 From: Fusee Date: Wed, 22 May 2024 12:58:27 +0200 Subject: [PATCH 06/25] QueryNetworkExecutor is working --- Cargo.lock | 1 + abi-build/src/generator/impl_abi_mod.rs | 1 - abi-build/src/generator/impl_contract.rs | 10 +- core/src/lib.rs | 2 - executor/Cargo.toml | 1 + executor/src/base/query.rs | 21 +- executor/src/base/transaction.rs | 12 +- executor/src/dummy/transaction.rs | 12 +- executor/src/error/network.rs | 2 + executor/src/lib.rs | 9 +- executor/src/mocking/executor.rs | 20 +- executor/src/network/interactor.rs | 7 +- executor/src/network/mod.rs | 5 +- executor/src/network/proxy.rs | 76 ------- executor/src/network/query.rs | 144 ------------- executor/src/network/query/executor.rs | 199 ++++++++++++++++++ executor/src/network/query/mod.rs | 3 + executor/src/network/query/models/mod.rs | 2 + executor/src/network/query/models/request.rs | 11 + executor/src/network/query/models/response.rs | 20 ++ executor/src/network/query/proxy.rs | 52 +++++ executor/src/network/simulate.rs | 13 +- executor/src/network/transaction.rs | 12 +- executor/src/utils/transaction/data.rs | 4 +- tester/core/tests/network_call.rs | 2 +- tester/core/tests/network_query.rs | 29 +-- 26 files changed, 361 insertions(+), 309 deletions(-) delete mode 100644 executor/src/network/proxy.rs delete mode 100644 executor/src/network/query.rs create mode 100644 executor/src/network/query/executor.rs create mode 100644 executor/src/network/query/mod.rs create mode 100644 executor/src/network/query/models/mod.rs create mode 100644 executor/src/network/query/models/request.rs create mode 100644 executor/src/network/query/models/response.rs create mode 100644 executor/src/network/query/proxy.rs diff --git a/Cargo.lock b/Cargo.lock index eedf9af..295dde9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1408,6 +1408,7 @@ dependencies = [ "novax-data", "novax-request", "num-bigint", + "reqwest 0.12.4", "serde", "serde_json", "tokio", diff --git a/abi-build/src/generator/impl_abi_mod.rs b/abi-build/src/generator/impl_abi_mod.rs index 2275f99..b6b1791 100644 --- a/abi-build/src/generator/impl_abi_mod.rs +++ b/abi-build/src/generator/impl_abi_mod.rs @@ -89,7 +89,6 @@ fn get_mod_imports() -> TokenStream { multiversx_sc::derive_imports!(); use novax_data::NativeConvertible; use multiversx_sc_scenario::api::StaticApi; - use multiversx_sdk::data::vm::VmValueRequest; use serde::{Deserialize, Serialize}; use crate::errors::NovaXError; use crate::errors::CodingError; diff --git a/abi-build/src/generator/impl_contract.rs b/abi-build/src/generator/impl_contract.rs index fe67b10..ed486b3 100644 --- a/abi-build/src/generator/impl_contract.rs +++ b/abi-build/src/generator/impl_contract.rs @@ -431,7 +431,7 @@ fn impl_abi_endpoint_call_query( let result = self.executor.sc_call::<#function_managed_outputs>( &_novax_contract_address, - #endpoint_name, + #endpoint_name.to_string(), &_novax_bytes_args, self.gas_limit, self.egld_value.clone(), @@ -462,10 +462,10 @@ fn impl_abi_endpoint_call_query( let result = self.executor .execute::<#function_managed_outputs>( &_novax_contract_address, - #endpoint_name, - &vec![], // TODO - &num_bigint::BigUint::from(0u8), // TODO - &vec![], // TODO + #endpoint_name.to_string(), + &_novax_bytes_args, + num_bigint::BigUint::from(0u8), // TODO + vec![], // TODO ).await; if let Result::Ok(result) = result { diff --git a/core/src/lib.rs b/core/src/lib.rs index d23f156..51afa58 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -66,8 +66,6 @@ pub mod utils; include!(concat!(env!("OUT_DIR"), "/generated_lib.rs")); pub use multiversx_sdk::data::address::Address as SDKAddress; -pub use multiversx_sdk::data::vm::VmValueRequest; -pub use multiversx_sdk::data::vm::VmValuesResponseData; pub use multiversx_sdk::data::vm::VMOutputApi; pub use multiversx_sdk::wallet::Wallet; pub use novax_data::Address; diff --git a/executor/Cargo.toml b/executor/Cargo.toml index 1dc6d31..db8527d 100644 --- a/executor/Cargo.toml +++ b/executor/Cargo.toml @@ -10,6 +10,7 @@ repository = "https://github.com/gfusee/novax" [dependencies] tokio = "1.29.1" +reqwest = "0.12.4" async-trait = "0.1.73" num-bigint = "0.4.3" serde = "1.0.183" diff --git a/executor/src/base/query.rs b/executor/src/base/query.rs index 4986288..80018c0 100644 --- a/executor/src/base/query.rs +++ b/executor/src/base/query.rs @@ -1,7 +1,6 @@ use std::sync::Arc; use async_trait::async_trait; use multiversx_sc_scenario::multiversx_sc::codec::TopDecodeMulti; -use multiversx_sc_scenario::scenario_model::ScCallStep; use num_bigint::BigUint; use tokio::sync::Mutex; use novax_data::{Address, NativeConvertible}; @@ -15,7 +14,7 @@ use crate::TokenTransfer; /// sending a query request, executing the query on the blockchain or mocked environment, /// and returning the result of the query. #[async_trait] -pub trait QueryExecutor: Clone + Send + Sync { +pub trait QueryExecutor: Send + Sync { /// Executes a smart contract query and returns the result. /// /// # Parameters @@ -34,10 +33,10 @@ pub trait QueryExecutor: Clone + Send + Sync { async fn execute( &self, to: &Address, - function: &str, + function: String, arguments: &[Vec], - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] + egld_value: BigUint, + esdt_transfers: Vec ) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; @@ -51,10 +50,10 @@ impl QueryExecutor for Arc { async fn execute( &self, to: &Address, - function: &str, + function: String, arguments: &[Vec], - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] + egld_value: BigUint, + esdt_transfers: Vec ) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync @@ -78,10 +77,10 @@ impl QueryExecutor for Arc> { async fn execute( &self, to: &Address, - function: &str, + function: String, arguments: &[Vec], - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] + egld_value: BigUint, + esdt_transfers: Vec ) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync diff --git a/executor/src/base/transaction.rs b/executor/src/base/transaction.rs index 67ff71f..27d11c9 100644 --- a/executor/src/base/transaction.rs +++ b/executor/src/base/transaction.rs @@ -1,14 +1,12 @@ use std::sync::Arc; + use async_trait::async_trait; -use multiversx_sc::api::{HandleTypeInfo, VMApi}; use multiversx_sc::codec::TopDecodeMulti; -use multiversx_sc::imports::{FunctionCall, TxEnv, TxFrom, TxGas, TxPayment, TxTo}; -use multiversx_sc::types::TxTypedCall; -use multiversx_sc_scenario::scenario_model::TypedScCall; -use multiversx_sc_snippets::Interactor; use num_bigint::BigUint; use tokio::sync::Mutex; + use novax_data::{Address, NativeConvertible}; + use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::utils::transaction::token_transfer::TokenTransfer; @@ -31,7 +29,7 @@ pub trait TransactionExecutor: Send + Sync { async fn sc_call( &mut self, to: &Address, - function: &str, + function: String, arguments: &[Vec], gas_limit: u64, egld_value: BigUint, @@ -60,7 +58,7 @@ impl TransactionExecutor for Arc> { async fn sc_call( &mut self, to: &Address, - function: &str, + function: String, arguments: &[Vec], gas_limit: u64, egld_value: BigUint, diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index 350ff26..aaffce2 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -1,12 +1,14 @@ use std::mem; + use async_trait::async_trait; -use multiversx_sc::api::{HandleTypeInfo, VMApi}; use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; -use multiversx_sc::imports::{EgldOrMultiEsdtPayment, ExplicitGas, FunctionCall, Tx, TxDataFunctionCall, TxEnv, TxFrom, TxGas, TxPayment, TxResultHandler, TxScEnv, TxTo, TxTypedCall}; -use multiversx_sc_scenario::imports::{AddressValue, Bech32Address, StaticApi}; -use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, TypedScCall, TypedScDeploy}; +use multiversx_sc::imports::{Tx, TxScEnv}; +use multiversx_sc_scenario::imports::{AddressValue, Bech32Address}; +use multiversx_sc_scenario::scenario_model::{ScDeployStep, TypedScDeploy}; use num_bigint::BigUint; + use novax_data::{Address, NativeConvertible}; + use crate::base::deploy::DeployExecutor; use crate::base::transaction::TransactionExecutor; use crate::call_result::CallResult; @@ -62,7 +64,7 @@ impl TransactionExecutor for DummyExecutor { async fn sc_call( &mut self, to: &Address, - function: &str, + function: String, arguments: &[Vec], gas_limit: u64, egld_value: BigUint, diff --git a/executor/src/error/network.rs b/executor/src/error/network.rs index 78576e1..8900d7b 100644 --- a/executor/src/error/network.rs +++ b/executor/src/error/network.rs @@ -12,6 +12,8 @@ pub enum NetworkQueryError { /// This error variant is triggered when the argument provided for the network query is empty, /// which is not acceptable for the network query operation to proceed. EmptyArgs, + CannotSerializeVmValuesRequestBody, + CannotDeserializeVmValuesResponse, /// This error variant is triggered when there is an error while sending a request to the network. /// The exact error message is encapsulated in the `message` field. ErrorWhileSendingRequest { diff --git a/executor/src/lib.rs b/executor/src/lib.rs index d05f7c7..b78c369 100644 --- a/executor/src/lib.rs +++ b/executor/src/lib.rs @@ -61,16 +61,19 @@ pub use base::query::QueryExecutor; pub use base::transaction::TransactionExecutor; pub use base::deploy::DeployExecutor; -pub use network::query::ProxyQueryExecutor; -pub use network::query::QueryNetworkExecutor; +pub use network::query::executor::ProxyQueryExecutor; +pub use network::query::executor::QueryNetworkExecutor; pub use network::transaction::NetworkExecutor; pub use network::transaction::BaseTransactionNetworkExecutor; pub use network::interactor::BlockchainInteractor; -pub use network::proxy::BlockchainProxy; +pub use network::query::proxy::BlockchainProxy; pub use network::simulate::SimulationNetworkExecutor; pub use network::simulate::BaseSimulationNetworkExecutor; pub use network::models::simulate::request::SimulationGatewayRequest; pub use network::models::simulate::response::SimulationGatewayResponse; +pub use network::query::models::request::VmValuesQueryRequest; +pub use network::query::models::response::VmValuesQueryResponseData; +pub use network::query::models::response::VmValuesQueryResponseDataData; pub use mocking::executor::StandardMockExecutor; pub use mocking::executor::MockExecutor; diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index 46ba115..d8e3953 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -1,23 +1,23 @@ use std::mem; use std::ops::Deref; use std::sync::Arc; + use async_trait::async_trait; -use multiversx_sc::api::{HandleTypeInfo, VMApi}; use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; -use multiversx_sc::imports::{TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; use num_bigint::BigUint; -use crate::{ScCallStep, ScDeployStep, ScQueryStep, TxQuery, TypedScCall, TypedScDeploy, TypedScQuery}; -use crate::ScenarioWorld; -use tokio::sync::{Mutex, MutexGuard}; +use tokio::sync::Mutex; + use novax_data::Address; use novax_data::NativeConvertible; -use novax_data::parse_query_return_bytes_data; + +use crate::{ScCallStep, ScDeployStep, ScQueryStep, TxQuery, TypedScDeploy}; use crate::base::deploy::DeployExecutor; use crate::base::query::QueryExecutor; use crate::base::transaction::TransactionExecutor; use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::error::mock_deploy::MockDeployError; +use crate::ScenarioWorld; use crate::utils::transaction::token_transfer::TokenTransfer; /// A convenient type alias for `MockExecutor` with `String` as the generic type. @@ -82,7 +82,7 @@ impl TransactionExecutor for MockExecutor async fn sc_call( &mut self, to: &Address, - function: &str, + function: String, arguments: &[Vec], gas_limit: u64, egld_value: BigUint, @@ -224,10 +224,10 @@ impl QueryExecutor for MockExecutor async fn execute( &self, to: &Address, - function: &str, + function: String, arguments: &[Vec], - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] + egld_value: BigUint, + esdt_transfers: Vec ) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync diff --git a/executor/src/network/interactor.rs b/executor/src/network/interactor.rs index ec7cfc9..cf944c7 100644 --- a/executor/src/network/interactor.rs +++ b/executor/src/network/interactor.rs @@ -1,12 +1,9 @@ use async_trait::async_trait; -use multiversx_sc::imports::EgldOrMultiEsdtPayment; -use multiversx_sc_scenario::api::StaticApi; use multiversx_sc_scenario::scenario_model::ScDeployStep; use multiversx_sdk::wallet::Wallet; use novax_data::Address; -use crate::call_result::CallResult; use crate::ExecutorError; use crate::utils::transaction::transfers::EgldOrMultiEsdtTransfers; @@ -50,7 +47,7 @@ pub trait BlockchainInteractor: Send + Sync { &mut self, from: &Address, to: &Address, - function: &str, + function: String, arguments: &[Vec], gas_limit: u64, payment: EgldOrMultiEsdtTransfers @@ -105,7 +102,7 @@ impl BlockchainInteractor for Interactor { &mut self, from: &Address, to: &Address, - function: &str, + function: String, arguments: &[Vec], gas_limit: u64, payment: EgldOrMultiEsdtTransfers diff --git a/executor/src/network/mod.rs b/executor/src/network/mod.rs index b331768..045cda7 100644 --- a/executor/src/network/mod.rs +++ b/executor/src/network/mod.rs @@ -1,7 +1,6 @@ -pub mod query; pub mod transaction; -pub mod proxy; pub mod interactor; pub mod simulate; pub mod models; -pub mod utils; \ No newline at end of file +pub mod utils; +pub mod query; \ No newline at end of file diff --git a/executor/src/network/proxy.rs b/executor/src/network/proxy.rs deleted file mode 100644 index f4113f2..0000000 --- a/executor/src/network/proxy.rs +++ /dev/null @@ -1,76 +0,0 @@ -use async_trait::async_trait; -use multiversx_sdk::blockchain::CommunicationProxy; -use multiversx_sdk::data::vm::{VmValueRequest, VmValuesResponseData}; -use crate::error::executor::ExecutorError; -use crate::error::network::NetworkQueryError; - -/// The `BlockchainProxy` trait provides an abstraction over the `CommunicationProxy` struct from the `multiversx-sdk` crate. -/// The main goal of this abstraction is to allow developers to mock the `CommunicationProxy` struct for testing purposes, -/// by providing a set of common behaviors required for interacting with the blockchain gateway. -#[async_trait] -pub trait BlockchainProxy: Clone + Send + Sync { - /// Creates a new instance of a type implementing `BlockchainProxy`, initialized with the provided gateway URL. - /// - /// # Parameters - /// - /// * `gateway_url`: A string slice representing the URL of the blockchain gateway. - /// - /// # Returns - /// - /// * `Self`: A new instance of the implementing type. - fn new(gateway_url: &str) -> Self; - - /// Asynchronously executes a virtual machine (VM) query on the blockchain, using the provided VM request. - /// - /// # Parameters - /// - /// * `vm_request`: A reference to a `VmValueRequest` object containing the details of the VM query. - /// - /// # Returns - /// - /// * `Result`: A result containing the VM query response data, - /// or an `ExecutorError` if the query fails. - async fn execute_vmquery( - &self, - vm_request: &VmValueRequest, - ) -> Result; -} - -/// Implementation of the `BlockchainProxy` trait for the `CommunicationProxy` struct from the `multiversx-sdk` crate. -/// This implementation provides concrete methods to communicate with the blockchain gateway. -#[async_trait] -impl BlockchainProxy for CommunicationProxy { - /// Creates a new `CommunicationProxy` instance using the specified blockchain gateway URL. - /// - /// # Parameters - /// - /// * `gateway_url`: A string slice representing the URL of the blockchain gateway. - /// - /// # Returns - /// - /// * `Self`: A new `CommunicationProxy` instance. - fn new(gateway_url: &str) -> Self { - CommunicationProxy::new(gateway_url.to_string()) - } - - /// Asynchronously executes a VM query on the blockchain using the provided VM request, and returns the response data. - /// - /// # Parameters - /// - /// * `vm_request`: A reference to a `VmValueRequest` object containing the details of the VM query. - /// - /// # Returns - /// - /// * `Result`: A result containing the VM query response data, - /// or an `ExecutorError` if the query fails. - async fn execute_vmquery(&self, vm_request: &VmValueRequest) -> Result { - let result = self.execute_vmquery(vm_request).await; - - if let Err(error) = result { - let message = error.to_string(); - return Err(NetworkQueryError::ErrorWhileSendingRequest { message }.into()) - } - - Ok(result.unwrap()) - } -} diff --git a/executor/src/network/query.rs b/executor/src/network/query.rs deleted file mode 100644 index 85591dd..0000000 --- a/executor/src/network/query.rs +++ /dev/null @@ -1,144 +0,0 @@ -use std::marker::PhantomData; -use async_trait::async_trait; -use multiversx_sc_scenario::multiversx_sc::codec::TopDecodeMulti; -use multiversx_sc_scenario::scenario_model::ScCallStep; -use multiversx_sdk::blockchain::CommunicationProxy; -use multiversx_sdk::data::address::Address; -use multiversx_sdk::data::vm::VmValueRequest; -use num_bigint::BigUint; -use novax_data::{NativeConvertible, parse_query_return_string_data}; -use crate::base::query::QueryExecutor; -use crate::error::executor::ExecutorError; -use crate::error::network::NetworkQueryError; -use crate::network::proxy::BlockchainProxy; -use crate::TokenTransfer; -use crate::utils::transaction::data::SendableTransactionConvertible; - -/// A convenient type alias for `QueryNetworkExecutor` with `CommunicationProxy` as the generic type. -pub type ProxyQueryExecutor = QueryNetworkExecutor; - -/// A structure to execute smart contract queries on a real blockchain environment via a specified gateway. -/// -/// This executor utilizes a blockchain proxy to communicate with the blockchain network and -/// execute the queries. -#[derive(Clone, Debug)] -pub struct QueryNetworkExecutor { - /// The URL of the gateway to the blockchain network. - pub gateway_url: String, - /// A phantom data field to keep the generic `Proxy` type. - _data: PhantomData -} - -impl QueryNetworkExecutor { - /// Constructs a new `QueryNetworkExecutor` with the specified gateway URL. - /// - /// # Parameters - /// - `gateway_url`: The URL of the gateway to the blockchain network. - /// - /// # Returns - /// A new instance of `QueryNetworkExecutor`. - pub fn new(gateway_url: &str) -> Self { - QueryNetworkExecutor { - gateway_url: gateway_url.to_string(), - _data: PhantomData - } - } -} - -#[async_trait] -impl QueryExecutor for QueryNetworkExecutor { - /// Executes a smart contract query on the real blockchain environment. - /// - /// This method constructs a VM request from the provided `ScCallStep`, sends it to the blockchain network - /// via the blockchain proxy, and processes the result to return it in a native format. - async fn execute( - &self, - to: &novax_data::Address, - function: &str, - arguments: &[Vec], - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] - ) -> Result - where - OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync - { - /* - let sendable_tx = request.to_sendable_transaction(); - let receiver = Address::from_bech32_string(&sendable_tx.receiver).unwrap(); - let mut arguments: Vec = sendable_tx.data.split('@').map(|e| e.to_string()).collect(); - - if arguments.is_empty() { - return Err(NetworkQueryError::EmptyArgs.into()) - } - - let function = arguments.remove(0); - let vm_request = VmValueRequest { - sc_address: receiver.clone(), - func_name: function, - caller: receiver, - value: sendable_tx.egld_value.to_string(), - args: arguments, - }; - - let blockchain = Proxy::new(&self.gateway_url); - let result = blockchain.execute_vmquery(&vm_request).await?; - - let data: Vec<&str> = result.data.return_data.iter().map(AsRef::as_ref).collect(); - Ok(parse_query_return_string_data::(data.as_slice())?.to_native()) - - */ - - todo!() - } -} - -#[async_trait] -impl QueryExecutor for &str { - /// Allows using a string representing the gateway URL to execute a query on the real blockchain environment. - /// - /// This implementation creates a new `ProxyQueryExecutor` instance using the string as the gateway URL, - /// and delegates the query execution to it. - async fn execute( - &self, - to: &novax_data::Address, - function: &str, - arguments: &[Vec], - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] - ) -> Result - where - OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync - { - /* - ProxyQueryExecutor::new(self).execute::(request).await - - */ - todo!() - } -} - -#[async_trait] -impl QueryExecutor for String { - /// Allows using a string representing the gateway URL to execute a query on the real blockchain environment. - /// - /// This implementation creates a new `ProxyQueryExecutor` instance using the string as the gateway URL, - /// and delegates the query execution to it. - async fn execute( - &self, - to: &novax_data::Address, - function: &str, - arguments: &[Vec], - egld_value: &BigUint, - esdt_transfers: &[TokenTransfer] - ) -> Result - where - OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync - { - /* - self.as_str().execute::(request).await - - */ - - todo!() - } -} \ No newline at end of file diff --git a/executor/src/network/query/executor.rs b/executor/src/network/query/executor.rs new file mode 100644 index 0000000..eb0875d --- /dev/null +++ b/executor/src/network/query/executor.rs @@ -0,0 +1,199 @@ +use std::marker::PhantomData; + +use async_trait::async_trait; +use multiversx_sc::codec::TopDecodeMulti; +use num_bigint::BigUint; + +use novax_data::{NativeConvertible, parse_query_return_string_data}; + +use crate::{BlockchainProxy, ExecutorError, QueryExecutor, TokenTransfer, VmValuesQueryRequest}; +use crate::network::query::proxy::NetworkBlockchainProxy; + +/// A convenient type alias for `QueryNetworkExecutor` with `NetworkBlockchainProxy` as the generic type. +pub type ProxyQueryExecutor = QueryNetworkExecutor; + +/// A structure to execute smart contract queries on a real blockchain environment via a specified gateway. +/// +/// This executor utilizes a blockchain proxy to communicate with the blockchain network and +/// execute the queries. +#[derive(Clone, Debug)] +pub struct QueryNetworkExecutor { + /// The URL of the gateway to the blockchain network. + pub gateway_url: String, + /// A phantom data field to keep the generic `Proxy` type. + _data: PhantomData +} + +impl QueryNetworkExecutor { + /// Constructs a new `QueryNetworkExecutor` with the specified gateway URL. + /// + /// # Parameters + /// - `gateway_url`: The URL of the gateway to the blockchain network. + /// + /// # Returns + /// A new instance of `QueryNetworkExecutor`. + pub fn new(gateway_url: String) -> Self { + QueryNetworkExecutor { + gateway_url, + _data: PhantomData + } + } +} + +#[async_trait] +impl QueryExecutor for QueryNetworkExecutor { + /// Executes a smart contract query on the real blockchain environment. + /// + /// This method constructs a VM request from the provided `ScCallStep`, sends it to the blockchain network + /// via the blockchain proxy, and processes the result to return it in a native format. + async fn execute( + &self, + to: &novax_data::Address, + function: String, + arguments: &[Vec], + egld_value: BigUint, + esdt_transfers: Vec + ) -> Result + where + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { + let sc_address = to.to_bech32_string()?; + let arguments = encode_arguments(arguments); + + let vm_request = VmValuesQueryRequest { // TODO: put this in a separate function so normalization can be tested + sc_address: sc_address.clone(), + func_name: function, + caller: None, // TODO + value: None, // TODO: normalize + args: arguments, + }; + + let blockchain = Proxy::new(self.gateway_url.clone()); + let result = blockchain.execute_vmquery(&vm_request).await?; + + let data: Vec<&str> = result.data.return_data.iter().map(AsRef::as_ref).collect(); + + Ok(parse_query_return_string_data::(data.as_slice())?.to_native()) + } +} + +#[async_trait] +impl QueryExecutor for &str { + /// Allows using a string representing the gateway URL to execute a query on the real blockchain environment. + /// + /// This implementation creates a new `ProxyQueryExecutor` instance using the string as the gateway URL, + /// and delegates the query execution to it. + async fn execute( + &self, + to: &novax_data::Address, + function: String, + arguments: &[Vec], + egld_value: BigUint, + esdt_transfers: Vec + ) -> Result + where + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { + self.to_string() + .execute::( + to, + function, + arguments, + egld_value, + esdt_transfers + ) + .await + } +} + +#[async_trait] +impl QueryExecutor for String { + /// Allows using a string representing the gateway URL to execute a query on the real blockchain environment. + /// + /// This implementation creates a new `ProxyQueryExecutor` instance using the string as the gateway URL, + /// and delegates the query execution to it. + async fn execute( + &self, + to: &novax_data::Address, + function: String, + arguments: &[Vec], + egld_value: BigUint, + esdt_transfers: Vec + ) -> Result + where + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + { + ProxyQueryExecutor::new(self.to_string()) + .execute::( + to, + function, + arguments, + egld_value, + esdt_transfers + ) + .await + } +} + +fn encode_arguments(arguments: &[Vec]) -> Vec { + arguments.iter() + .map(|arg| hex::encode(arg)) + .collect() +} + +#[cfg(test)] +mod tests { + use multiversx_sc::codec::TopEncode; + use multiversx_sc::imports::ManagedVec; + use multiversx_sc::types::ManagedBuffer; + use multiversx_sc_scenario::imports::StaticApi; + + use crate::network::query::executor::encode_arguments; + + #[test] + fn test_encode_arguments_empty() { + let result = encode_arguments(&vec![]); + let expected: Vec = vec![]; + + assert_eq!(result, expected); + } + + #[test] + fn test_encode_one_type() { + let vec: ManagedVec> = ManagedVec::from_single_item(ManagedBuffer::from("Hey!")); + + let mut arguments: Vec> = vec![]; + for item in vec.into_iter() { + let mut encoded_buffer: ManagedBuffer = ManagedBuffer::new(); + _ = item.top_encode(&mut encoded_buffer); + + arguments.push(encoded_buffer.to_boxed_bytes().into_vec()); + } + + let result = encode_arguments(&arguments); + let expected = vec!["48657921".to_string()]; + + assert_eq!(result, expected) + } + + #[test] + fn test_encode_two_type() { + let mut vec: ManagedVec> = ManagedVec::new(); + vec.push(ManagedBuffer::from("Hey!")); + vec.push(ManagedBuffer::from("Hi!")); + + let mut arguments: Vec> = vec![]; + for item in vec.into_iter() { + let mut encoded_buffer: ManagedBuffer = ManagedBuffer::new(); + _ = item.top_encode(&mut encoded_buffer); + + arguments.push(encoded_buffer.to_boxed_bytes().into_vec()); + } + + let result = encode_arguments(&arguments); + let expected = vec!["48657921".to_string(), "486921".to_string()]; + + assert_eq!(result, expected) + } + +} \ No newline at end of file diff --git a/executor/src/network/query/mod.rs b/executor/src/network/query/mod.rs new file mode 100644 index 0000000..a8dcd99 --- /dev/null +++ b/executor/src/network/query/mod.rs @@ -0,0 +1,3 @@ +pub mod executor; +pub mod models; +pub mod proxy; \ No newline at end of file diff --git a/executor/src/network/query/models/mod.rs b/executor/src/network/query/models/mod.rs new file mode 100644 index 0000000..4015ff8 --- /dev/null +++ b/executor/src/network/query/models/mod.rs @@ -0,0 +1,2 @@ +pub mod request; +pub mod response; \ No newline at end of file diff --git a/executor/src/network/query/models/request.rs b/executor/src/network/query/models/request.rs new file mode 100644 index 0000000..5bf4189 --- /dev/null +++ b/executor/src/network/query/models/request.rs @@ -0,0 +1,11 @@ +use serde::{Serialize}; + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +pub struct VmValuesQueryRequest { + pub sc_address: String, + pub func_name: String, + pub args: Vec, + pub caller: Option, + pub value: Option +} \ No newline at end of file diff --git a/executor/src/network/query/models/response.rs b/executor/src/network/query/models/response.rs new file mode 100644 index 0000000..ca3c914 --- /dev/null +++ b/executor/src/network/query/models/response.rs @@ -0,0 +1,20 @@ +use multiversx_sdk::data::vm::VmValuesResponseData; +use serde::Deserialize; + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct VmValuesQueryResponse { + pub data: Option +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct VmValuesQueryResponseData { + pub data: VmValuesQueryResponseDataData +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct VmValuesQueryResponseDataData { + pub return_data: Vec +} \ No newline at end of file diff --git a/executor/src/network/query/proxy.rs b/executor/src/network/query/proxy.rs new file mode 100644 index 0000000..88810a3 --- /dev/null +++ b/executor/src/network/query/proxy.rs @@ -0,0 +1,52 @@ +use async_trait::async_trait; +use reqwest::Client; + +use crate::error::executor::ExecutorError; +use crate::network::query::models::request::VmValuesQueryRequest; +use crate::network::query::models::response::VmValuesQueryResponseData; +use crate::NetworkQueryError; + +#[async_trait] +pub trait BlockchainProxy: Send + Sync { + fn new(gateway_url: String) -> Self; + + async fn execute_vmquery( + &self, + vm_request: &VmValuesQueryRequest, + ) -> Result; +} + +pub struct NetworkBlockchainProxy { + pub gateway_url: String +} + +#[async_trait] +impl BlockchainProxy for NetworkBlockchainProxy { + fn new(gateway_url: String) -> Self { + Self { + gateway_url, + } + } + + async fn execute_vmquery(&self, vm_request: &VmValuesQueryRequest) -> Result { + let url = format!("{}/vm-values/query", self.gateway_url); + + let json = serde_json::to_string(vm_request) + .map_err(|_| NetworkQueryError::CannotSerializeVmValuesRequestBody)?; + + let result = Client::new() + .post(url) + .body(json) + .send() + .await + .map_err(|error| NetworkQueryError::ErrorWhileSendingRequest { message: error.to_string() })?; + + let text = result + .text() + .await + .map_err(|error| NetworkQueryError::ErrorWhileSendingRequest { message: error.to_string() })?; + + serde_json::from_str(&text) + .map_err(|_| NetworkQueryError::CannotDeserializeVmValuesResponse.into()) + } +} \ No newline at end of file diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index faf7e73..94f5061 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -1,17 +1,16 @@ use std::fmt::{Debug, Formatter}; + use async_trait::async_trait; use base64::Engine; -use multiversx_sc::api::{HandleTypeInfo, VMApi}; use multiversx_sc::codec::TopDecodeMulti; -use multiversx_sc::imports::{TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; -use multiversx_sc_scenario::scenario_model::{TxResponse, TypedScCall}; -use multiversx_sdk::data::transaction::ApiSmartContractResult; -use multiversx_sdk::data::vm::CallType; +use multiversx_sc_scenario::scenario_model::TxResponse; use num_bigint::BigUint; use tokio::join; + use novax_data::{Address, NativeConvertible}; use novax_request::gateway::client::GatewayClient; -use crate::{ExecutorError, GatewayError, SendableTransactionConvertible, SimulationError, SimulationGatewayRequest, SimulationGatewayResponse, TransactionExecutor}; + +use crate::{ExecutorError, GatewayError, SimulationGatewayRequest, SimulationGatewayResponse, TransactionExecutor}; use crate::call_result::CallResult; use crate::network::models::simulate::request::SimulationGatewayRequestBody; use crate::network::utils::address::get_address_info; @@ -135,7 +134,7 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto async fn sc_call( &mut self, to: &Address, - function: &str, + function: String, arguments: &[Vec], gas_limit: u64, egld_value: BigUint, diff --git a/executor/src/network/transaction.rs b/executor/src/network/transaction.rs index 499918d..3ec8c95 100644 --- a/executor/src/network/transaction.rs +++ b/executor/src/network/transaction.rs @@ -1,22 +1,20 @@ use std::fmt::{Debug, Formatter}; use std::marker::PhantomData; use std::mem; + use async_trait::async_trait; -use multiversx_sc::api::{HandleTypeInfo, VMApi}; use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; -use multiversx_sc::imports::{EgldOrMultiEsdtPayment, EsdtTokenPayment, TxEnv, TxFrom, TxGas, TxPayment, TxTo, TxTypedCall}; -use multiversx_sc::types::{ManagedVec, TokenIdentifier}; -use multiversx_sc_scenario::api::StaticApi; -use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, TypedScCall, TypedScDeploy}; +use multiversx_sc_scenario::scenario_model::{ScDeployStep, TypedScDeploy}; use multiversx_sc_snippets::Interactor; use multiversx_sdk::wallet::Wallet; use num_bigint::BigUint; + use novax_data::{Address, NativeConvertible}; + use crate::base::deploy::DeployExecutor; use crate::base::transaction::TransactionExecutor; use crate::call_result::CallResult; use crate::error::executor::ExecutorError; -use crate::error::transaction::TransactionError; use crate::network::interactor::BlockchainInteractor; use crate::utils::transaction::token_transfer::TokenTransfer; use crate::utils::transaction::transfers::get_egld_or_esdt_transfers; @@ -109,7 +107,7 @@ impl TransactionExecutor for BaseTransactionNe async fn sc_call( &mut self, to: &Address, - function: &str, + function: String, arguments: &[Vec], gas_limit: u64, egld_value: BigUint, diff --git a/executor/src/utils/transaction/data.rs b/executor/src/utils/transaction/data.rs index 07d3cf9..d8fc2be 100644 --- a/executor/src/utils/transaction/data.rs +++ b/executor/src/utils/transaction/data.rs @@ -1,10 +1,9 @@ use std::convert::From; use std::str::FromStr; + use multiversx_sc::api::CallTypeApi; use multiversx_sc::imports::{Tx, TxData, TxDataFunctionCall, TxEnv, TxFrom, TxGas, TxPayment, TxResultHandler, TxTo}; use multiversx_sc::types::{ContractCallWithEgld, ManagedAddress}; -use multiversx_sc_scenario::api::StaticApi; -use multiversx_sc_scenario::imports::Bech32Address; use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, TxCall, TxDeploy, TypedScCall, TypedScDeploy}; use multiversx_sdk::data::address::Address; use num_bigint::BigUint; @@ -181,6 +180,7 @@ where #[cfg(test)] mod tests { use num_bigint::BigUint; + use crate::SendableTransaction; #[test] diff --git a/tester/core/tests/network_call.rs b/tester/core/tests/network_call.rs index 4cc9d97..60a6651 100644 --- a/tester/core/tests/network_call.rs +++ b/tester/core/tests/network_call.rs @@ -33,7 +33,7 @@ impl BlockchainInteractor for MockInteractor { &mut self, from: &Address, to: &Address, - function: &str, + function: String, arguments: &[Vec], gas_limit: u64, payment: EgldOrMultiEsdtPayment diff --git a/tester/core/tests/network_query.rs b/tester/core/tests/network_query.rs index 2f259b6..4ad2e09 100644 --- a/tester/core/tests/network_query.rs +++ b/tester/core/tests/network_query.rs @@ -2,9 +2,8 @@ use std::sync::Arc; use async_trait::async_trait; use novax::errors::NovaXError; use num_bigint::{BigInt, BigUint}; -use novax::{VMOutputApi, VmValueRequest, VmValuesResponseData}; use novax::tester::tester::{CustomEnum, CustomEnumWithFields, CustomEnumWithValues, CustomStruct, CustomStructWithStructAndVec, TesterContract}; -use novax::executor::{BlockchainProxy, ExecutorError, QueryNetworkExecutor}; +use novax::executor::{BlockchainProxy, ExecutorError, QueryNetworkExecutor, VmValuesQueryRequest, VmValuesQueryResponseData, VmValuesQueryResponseDataData}; const TESTER_CONTRACT_ADDRESS: &str = "erd1qqqqqqqqqqqqqpgq9wmk04e90fkhcuzns0pgwm33sdtxze346vpsq0ka9p"; @@ -13,11 +12,11 @@ struct MockProxy; #[async_trait] impl BlockchainProxy for MockProxy { - fn new(_gateway_url: &str) -> Self { + fn new(_gateway_url: String) -> Self { MockProxy } - async fn execute_vmquery(&self, vm_request: &VmValueRequest) -> Result { + async fn execute_vmquery(&self, vm_request: &VmValuesQueryRequest) -> Result { let mut return_data: Option> = None; if vm_request.func_name == "getSum" { return_data = Some(vec!["BQ==".to_string()]); @@ -126,26 +125,16 @@ impl BlockchainProxy for MockProxy { } } -fn get_success_vm_response_data(return_data: Vec) -> VmValuesResponseData { - let output = VMOutputApi { - return_data, - return_code: "0".to_string(), - return_message: "".to_string(), - gas_remaining: 0, - gas_refund: 0, - output_accounts: Default::default(), - deleted_accounts: None, - touched_accounts: None, - logs: None, - }; - - VmValuesResponseData { - data: output, +fn get_success_vm_response_data(return_data: Vec) -> VmValuesQueryResponseData { + VmValuesQueryResponseData { + data: VmValuesQueryResponseDataData { + return_data, + } } } fn get_executor() -> Arc> { - let executor = QueryNetworkExecutor::new(""); + let executor = QueryNetworkExecutor::new("".to_string()); Arc::new(executor) } From 729d928b16c531afe4669d1cbd3c933f08a5e75a Mon Sep 17 00:00:00 2001 From: Fusee Date: Wed, 22 May 2024 18:26:53 +0200 Subject: [PATCH 07/25] wip: interactor --- Cargo.lock | 1 + core/src/lib.rs | 1 - executor/Cargo.toml | 1 + executor/src/base/transaction.rs | 21 --- executor/src/dummy/transaction.rs | 5 - executor/src/error/executor.rs | 2 + executor/src/error/mod.rs | 3 +- executor/src/error/transaction.rs | 9 +- executor/src/error/wallet.rs | 14 ++ executor/src/lib.rs | 11 +- executor/src/mocking/executor.rs | 11 -- executor/src/network/interactor.rs | 116 ------------ executor/src/network/mod.rs | 1 - executor/src/network/simulate.rs | 6 - .../executor.rs} | 102 ++++++----- .../src/network/transaction/interactor.rs | 171 ++++++++++++++++++ executor/src/network/transaction/mod.rs | 3 + .../src/network/transaction/models/mod.rs | 3 + .../transaction/models/send_request.rs | 14 ++ .../transaction/models/send_response.rs | 14 ++ .../models/transaction_on_network.rs | 36 ++++ executor/src/network/utils/mod.rs | 4 +- executor/src/network/utils/transaction.rs | 43 +++++ executor/src/network/utils/wallet.rs | 78 ++++++++ executor/src/utils/transaction/call_result.rs | 4 +- tester/core/tests/network_call.rs | 83 +++------ 26 files changed, 479 insertions(+), 278 deletions(-) create mode 100644 executor/src/error/wallet.rs delete mode 100644 executor/src/network/interactor.rs rename executor/src/network/{transaction.rs => transaction/executor.rs} (74%) create mode 100644 executor/src/network/transaction/interactor.rs create mode 100644 executor/src/network/transaction/mod.rs create mode 100644 executor/src/network/transaction/models/mod.rs create mode 100644 executor/src/network/transaction/models/send_request.rs create mode 100644 executor/src/network/transaction/models/send_response.rs create mode 100644 executor/src/network/transaction/models/transaction_on_network.rs create mode 100644 executor/src/network/utils/transaction.rs create mode 100644 executor/src/network/utils/wallet.rs diff --git a/Cargo.lock b/Cargo.lock index 295dde9..a3667e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1411,6 +1411,7 @@ dependencies = [ "reqwest 0.12.4", "serde", "serde_json", + "sha3", "tokio", ] diff --git a/core/src/lib.rs b/core/src/lib.rs index 51afa58..62e3b95 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -67,7 +67,6 @@ include!(concat!(env!("OUT_DIR"), "/generated_lib.rs")); pub use multiversx_sdk::data::address::Address as SDKAddress; pub use multiversx_sdk::data::vm::VMOutputApi; -pub use multiversx_sdk::wallet::Wallet; pub use novax_data::Address; pub use multiversx_sc::types::CodeMetadata; use multiversx_sc_scenario::imports::StaticApi; diff --git a/executor/Cargo.toml b/executor/Cargo.toml index db8527d..02f4d33 100644 --- a/executor/Cargo.toml +++ b/executor/Cargo.toml @@ -17,6 +17,7 @@ serde = "1.0.183" serde_json = "1.0.108" hex = "0.4.3" base64 = "0.21.3" +sha3 = "0.10.8" novax-data = { path = "../data", version = "0.1.6" } novax-request = { path = "../request", version = "0.1.6" } multiversx-sc = { path = "../../mx-sdk-rs/framework/base" } diff --git a/executor/src/base/transaction.rs b/executor/src/base/transaction.rs index 27d11c9..58dced1 100644 --- a/executor/src/base/transaction.rs +++ b/executor/src/base/transaction.rs @@ -37,16 +37,6 @@ pub trait TransactionExecutor: Send + Sync { ) -> Result, ExecutorError> where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; - - /// Determines whether deserialization should be skipped during the smart contract call execution. - /// - /// This method is particularly useful for implementations like `DummyExecutor` which do not perform - /// any actual calls, thus deserializing a non-existent result would lead to an error. In such cases, - /// this method should return `true` to skip deserialization, preventing potential errors. - /// - /// # Returns - /// - A `bool` indicating whether deserialization should be skipped. - async fn should_skip_deserialization(&self) -> bool; } /// An implementation of `TransactionExecutor` trait for types wrapped in `Arc>`. @@ -80,15 +70,4 @@ impl TransactionExecutor for Arc> { ).await } } - - /// Determines whether deserialization should be skipped during the smart contract call execution. - async fn should_skip_deserialization(&self) -> bool { - { - // Acquire a lock to access the underlying executor. - // Note: The lock here could lead to some performance penalty. A potential solution could be using - // another type of locking mechanism like `RwLock`. - let executor = self.lock().await; - executor.should_skip_deserialization().await - } - } } diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index aaffce2..7d74acd 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -119,11 +119,6 @@ impl TransactionExecutor for DummyExecutor { Ok(dummy_result) } - - /// Indicates that deserialization should be skipped as there is no actual execution. - async fn should_skip_deserialization(&self) -> bool { - true - } } #[async_trait] diff --git a/executor/src/error/executor.rs b/executor/src/error/executor.rs index 5147099..9bb60c7 100644 --- a/executor/src/error/executor.rs +++ b/executor/src/error/executor.rs @@ -5,6 +5,7 @@ use crate::error::dummy::DummyExecutorError; use crate::error::gateway::GatewayError; use crate::error::mock_deploy::MockDeployError; use crate::error::transaction::TransactionError; +use crate::error::wallet::WalletError; use crate::SimulationError; /// An enumeration representing the various types of errors that can be encountered within the executor context. @@ -40,6 +41,7 @@ pub enum ExecutorError { MockDeploy(MockDeployError), Transaction(TransactionError), + Wallet(WalletError), } /// An implementation of the `From` trait to allow for easy conversions from `DataError` to `ExecutorError`. diff --git a/executor/src/error/mod.rs b/executor/src/error/mod.rs index 9506633..d96455b 100644 --- a/executor/src/error/mod.rs +++ b/executor/src/error/mod.rs @@ -4,4 +4,5 @@ pub mod mock_deploy; pub mod gateway; pub mod simulation; pub mod transaction; -pub mod dummy; \ No newline at end of file +pub mod dummy; +pub mod wallet; \ No newline at end of file diff --git a/executor/src/error/transaction.rs b/executor/src/error/transaction.rs index e4d6f06..a634091 100644 --- a/executor/src/error/transaction.rs +++ b/executor/src/error/transaction.rs @@ -4,7 +4,14 @@ use crate::ExecutorError; #[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] pub enum TransactionError { - EgldAndEsdtPaymentsDetected + EgldAndEsdtPaymentsDetected, + CannotDeserializeTransactionSendingResponse { response: String }, + ErrorWhileSendingTheTransaction, + ErrorWhileGettingTransactionOnNetwork { tx_hash: String }, + CannotDeserializeTransactionOnNetworkResponse { response: String }, + FailedToSendTheTransaction { message: String }, + NoSmartContractResult, + CannotDecodeSmartContractResult } impl From for ExecutorError { diff --git a/executor/src/error/wallet.rs b/executor/src/error/wallet.rs new file mode 100644 index 0000000..b35c575 --- /dev/null +++ b/executor/src/error/wallet.rs @@ -0,0 +1,14 @@ +use serde::{Deserialize, Serialize}; + +use crate::ExecutorError; + +#[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] +pub enum WalletError { + InvalidPrivateKey +} + +impl From for ExecutorError { + fn from(value: WalletError) -> Self { + ExecutorError::Wallet(value) + } +} \ No newline at end of file diff --git a/executor/src/lib.rs b/executor/src/lib.rs index b78c369..5e19b4b 100644 --- a/executor/src/lib.rs +++ b/executor/src/lib.rs @@ -63,9 +63,10 @@ pub use base::deploy::DeployExecutor; pub use network::query::executor::ProxyQueryExecutor; pub use network::query::executor::QueryNetworkExecutor; -pub use network::transaction::NetworkExecutor; -pub use network::transaction::BaseTransactionNetworkExecutor; -pub use network::interactor::BlockchainInteractor; +pub use network::utils::wallet::Wallet; +pub use network::transaction::executor::NetworkExecutor; +pub use network::transaction::executor::BaseTransactionNetworkExecutor; +pub use network::transaction::interactor::BlockchainInteractor; pub use network::query::proxy::BlockchainProxy; pub use network::simulate::SimulationNetworkExecutor; pub use network::simulate::BaseSimulationNetworkExecutor; @@ -74,6 +75,10 @@ pub use network::models::simulate::response::SimulationGatewayResponse; pub use network::query::models::request::VmValuesQueryRequest; pub use network::query::models::response::VmValuesQueryResponseData; pub use network::query::models::response::VmValuesQueryResponseDataData; +pub use network::transaction::models::transaction_on_network::TransactionOnNetworkResponse; +pub use network::transaction::models::transaction_on_network::TransactionOnNetwork; +pub use network::transaction::models::transaction_on_network::TransactionOnNetworkTransaction; +pub use network::transaction::models::transaction_on_network::TransactionOnNetworkTransactionSmartContractResult; pub use mocking::executor::StandardMockExecutor; pub use mocking::executor::MockExecutor; diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index d8e3953..48e3d8c 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -112,17 +112,6 @@ impl TransactionExecutor for MockExecutor todo!() } - - /// Specifies whether deserialization should be skipped during the smart contract call execution. - /// - /// In the context of the mocked environment, deserialization is not skipped, - /// hence this method returns `false`. - /// - /// # Returns - /// - A boolean value `false`, indicating that deserialization should not be skipped. - async fn should_skip_deserialization(&self) -> bool { - false - } } /// Mock implementation of the `DeployExecutor` trait for testing and development purposes. diff --git a/executor/src/network/interactor.rs b/executor/src/network/interactor.rs deleted file mode 100644 index cf944c7..0000000 --- a/executor/src/network/interactor.rs +++ /dev/null @@ -1,116 +0,0 @@ -use async_trait::async_trait; -use multiversx_sc_scenario::scenario_model::ScDeployStep; -use multiversx_sdk::wallet::Wallet; - -use novax_data::Address; - -use crate::ExecutorError; -use crate::utils::transaction::transfers::EgldOrMultiEsdtTransfers; - -/// A trait defining the interaction interface with the blockchain. -/// This trait abstracts the blockchain interaction, enabling developers to either use the provided `Interactor` struct from the `multiversx-sdk` crate or mock it for testing purposes. -#[async_trait] -pub trait BlockchainInteractor: Send + Sync { - - /// Creates a new instance of a type implementing `BlockchainInteractor`, usually an `Interactor`. - /// - /// # Parameters - /// - /// * `gateway_url`: A string representing the URL of the blockchain gateway. - /// - /// # Returns - /// - /// * `Self`: A new instance of a type implementing `BlockchainInteractor`. - async fn new(gateway_url: String) -> Self; - - /// Registers a wallet with the blockchain interactor, returning the associated blockchain address. - /// - /// # Parameters - /// - /// * `wallet`: A `Wallet` instance to be registered. - /// - /// # Returns - /// - /// * `Address`: The blockchain address associated with the registered wallet. - fn register_wallet(&mut self, wallet: Wallet) -> Address; - - /// Executes a smart contract call on the blockchain. - /// - /// # Type Parameters - /// - /// * `S`: A type that implements `AsMut` and `Send`, representing the smart contract call step. - /// - /// # Parameters - /// - /// * `sc_call_step`: An instance of `S` representing the smart contract call step. - async fn sc_call( - &mut self, - from: &Address, - to: &Address, - function: String, - arguments: &[Vec], - gas_limit: u64, - payment: EgldOrMultiEsdtTransfers - ) -> Result>, ExecutorError>; - - /// Deploys a smart contract on the blockchain. - /// - /// The `sc_deploy` method takes a `sc_deploy_step` parameter that encapsulates the information required - /// for deploying a smart contract. The method is asynchronous and requires the [`tokio`] runtime, ensuring non-blocking - /// operation and concurrency where needed. - /// - /// # Type Parameters - /// - `S`: A type that implements [`AsMut`] trait, allowing for a mutable reference to an [`ScDeployStep`] instance to be obtained. - /// - /// # Parameters - /// - `&mut self`: A mutable reference to the current [`BlockchainInteractor`] instance. - /// - `sc_deploy_step`: The smart contract deployment step encapsulating the necessary information for deployment. - /// - /// # Returns - /// The method returns a [`Result`] indicating the success or failure of the operation. Successful operations - /// will return `Ok(())` while failures will return `Err(BlockchainInteractorError)`. - /// - /// # Errors - /// Any errors that occur during the execution of this method will be encapsulated in a [`BlockchainInteractorError`] and returned. - async fn sc_deploy(&mut self, sc_deploy_step: S) - where - S: AsMut + Send; -} - -pub struct Interactor { - pub gateway_url: String, - pub wallet: Option -} - -#[async_trait] -impl BlockchainInteractor for Interactor { - async fn new(gateway_url: String) -> Self { - Self { - gateway_url, - wallet: None, - } - } - - fn register_wallet(&mut self, wallet: Wallet) -> Address { - let address = Address::from(wallet.address()); - self.wallet = Some(wallet); - - address - } - - async fn sc_call( - &mut self, - from: &Address, - to: &Address, - function: String, - arguments: &[Vec], - gas_limit: u64, - payment: EgldOrMultiEsdtTransfers - ) -> Result>, ExecutorError> { - todo!() - } - - async fn sc_deploy(&mut self, sc_deploy_step: S) where S: AsMut + Send { - todo!() - } -} \ No newline at end of file diff --git a/executor/src/network/mod.rs b/executor/src/network/mod.rs index 045cda7..fc4732a 100644 --- a/executor/src/network/mod.rs +++ b/executor/src/network/mod.rs @@ -1,5 +1,4 @@ pub mod transaction; -pub mod interactor; pub mod simulate; pub mod models; pub mod utils; diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index 94f5061..0be897a 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -207,12 +207,6 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto todo!() } - - /// Indicates whether deserialization should be skipped during execution. - /// Always returns `false` for this implementation. - async fn should_skip_deserialization(&self) -> bool { - false - } } /// Processes the output of a transaction response. diff --git a/executor/src/network/transaction.rs b/executor/src/network/transaction/executor.rs similarity index 74% rename from executor/src/network/transaction.rs rename to executor/src/network/transaction/executor.rs index 3ec8c95..7564f14 100644 --- a/executor/src/network/transaction.rs +++ b/executor/src/network/transaction/executor.rs @@ -1,12 +1,9 @@ use std::fmt::{Debug, Formatter}; use std::marker::PhantomData; -use std::mem; use async_trait::async_trait; use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; -use multiversx_sc_scenario::scenario_model::{ScDeployStep, TypedScDeploy}; -use multiversx_sc_snippets::Interactor; -use multiversx_sdk::wallet::Wallet; +use multiversx_sc_scenario::scenario_model::TypedScDeploy; use num_bigint::BigUint; use novax_data::{Address, NativeConvertible}; @@ -15,9 +12,11 @@ use crate::base::deploy::DeployExecutor; use crate::base::transaction::TransactionExecutor; use crate::call_result::CallResult; use crate::error::executor::ExecutorError; -use crate::network::interactor::BlockchainInteractor; +use crate::error::transaction::TransactionError; +use crate::network::transaction::interactor::{BlockchainInteractor, Interactor}; +use crate::network::utils::wallet::Wallet; +use crate::{TransactionOnNetwork, TransactionOnNetworkTransactionSmartContractResult}; use crate::utils::transaction::token_transfer::TokenTransfer; -use crate::utils::transaction::transfers::get_egld_or_esdt_transfers; /// Alias for the `BaseTransactionNetworkExecutor` struct, parameterized with the `Interactor` type. pub type NetworkExecutor = BaseTransactionNetworkExecutor; @@ -43,8 +42,8 @@ pub struct BaseTransactionNetworkExecutor { /// affect the state of `BaseTransactionNetworkExecutor`), we can safely implement `Clone` /// without the `Interactor` needing to be `Clone`. impl Clone for BaseTransactionNetworkExecutor -where - Interactor: BlockchainInteractor + where + Interactor: BlockchainInteractor { fn clone(&self) -> Self { Self { @@ -94,16 +93,6 @@ impl BaseTransactionNetworkExecutor TransactionExecutor for BaseTransactionNetworkExecutor { - /// Executes a smart contract call on the blockchain. - /// - /// # Parameters - /// - `sc_call_step`: A mutable reference to the smart contract call step. - /// - /// # Type Parameters - /// - `OriginalResult`: The type of the result expected from the smart contract call. Must implement the `Send` trait. - /// - /// # Returns - /// - A `Result` with an empty `Ok(())` value if the call is successful, or an `Err(ExecutorError)` if the call fails. async fn sc_call( &mut self, to: &Address, @@ -116,36 +105,37 @@ impl TransactionExecutor for BaseTransactionNe where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - let mut interactor = Interactor::new(self.gateway_url.clone()).await; - let from = interactor.register_wallet(self.wallet); + let mut interactor = Interactor::new( + self.gateway_url.clone(), + self.wallet + ) + .await?; - let payment = get_egld_or_esdt_transfers( - egld_value, - esdt_transfers - )?; + let data = "".to_string(); // TODO let result = interactor.sc_call( - &from, - to, - function, - arguments, + to.to_bech32_string()?, + egld_value, // TODO: normalize + data, gas_limit, - payment ) - .await; + .await?; - todo!() - } + let Some(mut sc_result) = find_smart_contract_result(&result.transaction.smart_contract_results) else { + return Err(TransactionError::NoSmartContractResult.into()) + }; - /// Indicates whether deserialization should be skipped during smart contract call execution. - /// - /// In the context of a real blockchain environment, deserialization is not skipped, - /// hence this method returns `false`. - /// - /// # Returns - /// - A boolean value `false`, indicating that deserialization should not be skipped. - async fn should_skip_deserialization(&self) -> bool { - false + let managed_result = OutputManaged::multi_decode(&mut sc_result) + .map_err(|_| TransactionError::CannotDecodeSmartContractResult)?; + + let native_result = managed_result.to_native(); + + let call_result = CallResult { + response: result, + result: Some(native_result), + }; + + Ok(call_result) } } @@ -175,15 +165,7 @@ impl DeployExecutor for BaseTransactionNetwork where OriginalResult: TopEncodeMulti + Send + Sync, { - let sc_deploy_step = sc_deploy_step.as_mut(); - let owned_sc_deploy_step = mem::replace(sc_deploy_step, ScDeployStep::new()); - let mut interactor = Interactor::new(self.gateway_url.clone()).await; - let sender_address = interactor.register_wallet(self.wallet); - *sc_deploy_step = owned_sc_deploy_step.from(&multiversx_sc::types::Address::from(sender_address.to_bytes())); - - interactor.sc_deploy(sc_deploy_step).await; - - Ok(()) + todo!() } /// Specifies whether deserialization should be skipped during the deployment execution. @@ -196,3 +178,23 @@ impl DeployExecutor for BaseTransactionNetwork false } } + +fn find_smart_contract_result(opt_sc_results: &Option>) -> Option>> { + let Some(sc_results) = opt_sc_results else { + return None + }; + + sc_results.iter() + .find(|sc_result| sc_result.nonce != 0 && sc_result.data.starts_with('@')) + .cloned() + .map(|sc_result| { + let mut split = sc_result.data.split('@'); + let _ = split.next().expect("SCR data should start with '@'"); // TODO: no expect and assert_eq! + let result_code = split.next().expect("missing result code"); + assert_eq!(result_code, "6f6b", "result code is not 'ok'"); + + split + .map(|encoded_arg| hex::decode(encoded_arg).expect("error hex-decoding result")) + .collect() + }) +} \ No newline at end of file diff --git a/executor/src/network/transaction/interactor.rs b/executor/src/network/transaction/interactor.rs new file mode 100644 index 0000000..974abfd --- /dev/null +++ b/executor/src/network/transaction/interactor.rs @@ -0,0 +1,171 @@ +use std::time::Duration; +use async_trait::async_trait; +use multiversx_sc_scenario::scenario_model::ScDeployStep; +use num_bigint::BigUint; +use reqwest::Client; + +use novax_data::Address; +use crate::error::transaction::TransactionError; + +use crate::ExecutorError; +use crate::network::models::address::info::AddressGatewayInfoAccount; +use crate::network::models::network::config::NetworkGatewayConfig; +use crate::network::transaction::models::send_request::TransactionSendRequest; +use crate::network::transaction::models::send_response::TransactionSendResponse; +use crate::network::transaction::models::transaction_on_network::TransactionOnNetwork; +use crate::network::utils::address::get_address_info; +use crate::network::utils::network::get_network_config; +use crate::network::utils::transaction::{get_transaction_on_network, send_transaction}; +use crate::network::utils::wallet::{SignableTransaction, Wallet}; + +#[async_trait] +pub trait BlockchainInteractor: Sized + Send + Sync { + async fn new(gateway_url: String, wallet: Wallet) -> Result; + + async fn sc_call( + &mut self, + to: String, + value: BigUint, + data: String, + gas_limit: u64 + ) -> Result; + + /// Deploys a smart contract on the blockchain. + /// + /// The `sc_deploy` method takes a `sc_deploy_step` parameter that encapsulates the information required + /// for deploying a smart contract. The method is asynchronous and requires the [`tokio`] runtime, ensuring non-blocking + /// operation and concurrency where needed. + /// + /// # Type Parameters + /// - `S`: A type that implements [`AsMut`] trait, allowing for a mutable reference to an [`ScDeployStep`] instance to be obtained. + /// + /// # Parameters + /// - `&mut self`: A mutable reference to the current [`BlockchainInteractor`] instance. + /// - `sc_deploy_step`: The smart contract deployment step encapsulating the necessary information for deployment. + /// + /// # Returns + /// The method returns a [`Result`] indicating the success or failure of the operation. Successful operations + /// will return `Ok(())` while failures will return `Err(BlockchainInteractorError)`. + /// + /// # Errors + /// Any errors that occur during the execution of this method will be encapsulated in a [`BlockchainInteractorError`] and returned. + async fn sc_deploy(&mut self, sc_deploy_step: S) + where + S: AsMut + Send; +} + +pub struct Interactor { + pub gateway_url: String, + pub wallet: Wallet, + pub network_config: NetworkGatewayConfig +} + +impl Interactor { + async fn get_account_info(&self) -> Result { + let address = Address::from(self.wallet.get_address()); + + Ok(get_address_info(&self.gateway_url, address).await?.account) + } + + async fn wait_for_execution(&self, tx_hash: &str) -> Result { + loop { + let transaction_on_network = get_transaction_on_network( + &self.gateway_url, + tx_hash + ).await?; + + if transaction_on_network.transaction.status == "executed" { + return Ok(transaction_on_network) + } + + tokio::time::sleep(Duration::from_secs(1)).await; // TODO + } + + // TODO: add timeout + } + + fn get_sendable_transaction( + &self, + nonce: u64, + value: String, + receiver: String, + sender: String, + gas_price: u64, + gas_limit: u64, + data: String, + chain_id: String, + version: u64, + options: u64 + ) -> TransactionSendRequest { + let tx_to_sign = SignableTransaction { + nonce, + value: value.clone(), + receiver: receiver.clone(), + sender: sender.clone(), + gas_price, + gas_limit, + data: data.clone(), + chain_id: chain_id.clone(), + version, + options, + }; + + tx_to_sign.into_sendable_transaction(&self.wallet) + } +} + +#[async_trait] +impl BlockchainInteractor for Interactor { + async fn new( + gateway_url: String, + wallet: Wallet + ) -> Result { + let network_config = get_network_config(&gateway_url).await?; + + Ok( + Self { + gateway_url, + wallet, + network_config + } + ) + } + + async fn sc_call( + &mut self, + to: String, + value: BigUint, + data: String, + gas_limit: u64 + ) -> Result { + let receiver_info = self.get_account_info().await?; + let receiver_address = receiver_info.address; + let nonce = receiver_info.nonce; // TODO: +1? + + let transaction_request = self.get_sendable_transaction( + nonce, + value.to_string(), + receiver_address, + to, + self.network_config.config.erd_min_gas_price, + gas_limit, + data, + self.network_config.config.erd_chain_id.clone(), + 1, // TODO: what's this? + 0 // TODO: what's this? + ); + + let tx_hash = send_transaction( + &self.gateway_url, + &transaction_request + ) + .await?; + + + self.wait_for_execution(&tx_hash).await + } + + async fn sc_deploy(&mut self, sc_deploy_step: S) where S: AsMut + Send { + todo!() + } +} \ No newline at end of file diff --git a/executor/src/network/transaction/mod.rs b/executor/src/network/transaction/mod.rs new file mode 100644 index 0000000..baacba6 --- /dev/null +++ b/executor/src/network/transaction/mod.rs @@ -0,0 +1,3 @@ +pub mod executor; +pub mod interactor; +pub mod models; \ No newline at end of file diff --git a/executor/src/network/transaction/models/mod.rs b/executor/src/network/transaction/models/mod.rs new file mode 100644 index 0000000..8cdf81b --- /dev/null +++ b/executor/src/network/transaction/models/mod.rs @@ -0,0 +1,3 @@ +pub mod transaction_on_network; +pub mod send_request; +pub mod send_response; \ No newline at end of file diff --git a/executor/src/network/transaction/models/send_request.rs b/executor/src/network/transaction/models/send_request.rs new file mode 100644 index 0000000..243616b --- /dev/null +++ b/executor/src/network/transaction/models/send_request.rs @@ -0,0 +1,14 @@ +use serde::Serialize; + +#[derive(Serialize)] +pub struct TransactionSendRequest { + pub nonce: u64, + pub value: String, + pub receiver: String, + pub gas_price: u64, + pub gas_limit: u64, + pub data: String, + pub chain_id: String, + pub version: u64, + pub signature: String +} \ No newline at end of file diff --git a/executor/src/network/transaction/models/send_response.rs b/executor/src/network/transaction/models/send_response.rs new file mode 100644 index 0000000..6098df2 --- /dev/null +++ b/executor/src/network/transaction/models/send_response.rs @@ -0,0 +1,14 @@ +use serde::Deserialize; + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct TransactionSendResponse { + pub data: Option, + pub error: String +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct TransactionSendResponseData { + pub tx_hash: String +} \ No newline at end of file diff --git a/executor/src/network/transaction/models/transaction_on_network.rs b/executor/src/network/transaction/models/transaction_on_network.rs new file mode 100644 index 0000000..59b79fc --- /dev/null +++ b/executor/src/network/transaction/models/transaction_on_network.rs @@ -0,0 +1,36 @@ +use serde::Deserialize; + +#[derive(Deserialize, Clone, Default)] +#[serde(rename_all = "camelCase")] +pub struct TransactionOnNetworkResponse { + pub data: Option, + pub error: String +} + +#[derive(Deserialize, Clone, Default)] +#[serde(rename_all = "camelCase")] +pub struct TransactionOnNetwork { + pub transaction: TransactionOnNetworkTransaction +} + +#[derive(Deserialize, Clone, Default)] +#[serde(rename_all = "camelCase")] +pub struct TransactionOnNetworkTransaction { + pub gas_used: u64, + pub smart_contract_results: Option>, + pub status: String, +} + +#[derive(Deserialize, Clone, Default)] +#[serde(rename_all = "camelCase")] +pub struct TransactionOnNetworkTransactionSmartContractResult { + pub hash: String, + pub nonce: u64, + pub data: String, +} + +impl TransactionOnNetwork { + pub fn is_success(&self) -> bool { + true // TODO + } +} \ No newline at end of file diff --git a/executor/src/network/utils/mod.rs b/executor/src/network/utils/mod.rs index d363450..a0360d0 100644 --- a/executor/src/network/utils/mod.rs +++ b/executor/src/network/utils/mod.rs @@ -1,2 +1,4 @@ pub mod address; -pub mod network; \ No newline at end of file +pub mod network; +pub mod wallet; +pub mod transaction; \ No newline at end of file diff --git a/executor/src/network/utils/transaction.rs b/executor/src/network/utils/transaction.rs new file mode 100644 index 0000000..38743f4 --- /dev/null +++ b/executor/src/network/utils/transaction.rs @@ -0,0 +1,43 @@ +use novax_request::gateway::client::GatewayClient; +use crate::error::transaction::TransactionError; +use crate::ExecutorError; +use crate::network::transaction::models::send_request::TransactionSendRequest; +use crate::network::transaction::models::send_response::TransactionSendResponse; +use crate::network::transaction::models::transaction_on_network::{TransactionOnNetworkResponse, TransactionOnNetwork}; + +pub async fn send_transaction(client: &Client, transaction_request: &TransactionSendRequest) -> Result { + let Ok((_, Some(text))) = client + .with_appended_url("/transaction/send") + .post(transaction_request) + .await else { + return Err(TransactionError::ErrorWhileSendingTheTransaction.into()) + }; + + let sent_transaction_response: TransactionSendResponse = serde_json::from_str(&text) + .map_err(|error| TransactionError::CannotDeserializeTransactionSendingResponse { response: text })?; + + let Some(sent_transaction_data) = sent_transaction_response.data else { + return Err(TransactionError::FailedToSendTheTransaction { message: sent_transaction_response.error }.into()) + }; + + Ok(sent_transaction_data.tx_hash) +} + +pub async fn get_transaction_on_network(client: &Client, tx_hash: &str) -> Result { + let url_to_append = format!("transaction/{tx_hash}?withResults=true"); + let Ok((_, Some(text))) = client + .with_appended_url(&url_to_append) + .get() + .await else { + return Err(TransactionError::ErrorWhileGettingTransactionOnNetwork { tx_hash: tx_hash.to_string() }.into()) + }; + + let transaction_on_network_response: TransactionOnNetworkResponse = serde_json::from_str(&text) + .map_err(|error| TransactionError::CannotDeserializeTransactionOnNetworkResponse { response: text })?; + + let Some(transaction_on_network_data) = transaction_on_network_response.data else { + return Err(TransactionError::FailedToSendTheTransaction { message: transaction_on_network_response.error }.into()) + }; + + Ok(transaction_on_network_data) +} \ No newline at end of file diff --git a/executor/src/network/utils/wallet.rs b/executor/src/network/utils/wallet.rs new file mode 100644 index 0000000..08f851c --- /dev/null +++ b/executor/src/network/utils/wallet.rs @@ -0,0 +1,78 @@ +use std::fmt::{Debug, Formatter}; +use multiversx_sdk::crypto::private_key::PrivateKey; +use multiversx_sdk::crypto::public_key::PublicKey; +use serde::Serialize; +use serde_json::json; +use sha3::{Digest, Keccak256}; +use novax_data::Address; +use crate::error::wallet::WalletError; +use crate::ExecutorError; +use crate::network::transaction::models::send_request::TransactionSendRequest; + +#[derive(Serialize)] +pub struct SignableTransaction { + pub nonce: u64, + pub value: String, + pub receiver: String, + pub sender: String, + pub gas_price: u64, + pub gas_limit: u64, + pub data: String, + pub chain_id: String, + pub version: u64, + pub options: u64 +} + +impl SignableTransaction { + pub fn into_sendable_transaction(self, wallet: &Wallet) -> TransactionSendRequest { + let signature = wallet.sign_transaction(&self); + + TransactionSendRequest { + nonce: self.nonce, + value: self.value, + receiver: self.receiver, + gas_price: self.gas_price, + gas_limit: self.gas_limit, + data: self.data, + chain_id: self.chain_id, + version: self.version, + signature, + } + } +} + +#[derive(Clone, Copy)] +pub struct Wallet(PrivateKey); + +impl Wallet { + pub fn from_private_key(private_key: &str) -> Result { + let private_key = PrivateKey::from_hex_str(private_key) + .map_err(|_| WalletError::InvalidPrivateKey)?; + + Ok(Wallet(private_key)) + } + + pub fn get_address(&self) -> Address { + let public_key = PublicKey::from(&self.0); + Address::from(multiversx_sdk::data::address::Address::from(&public_key)) + } + + pub fn sign_transaction(&self, transaction: &SignableTransaction) -> String { + let mut tx_bytes = json!(transaction).to_string().as_bytes().to_vec(); + + let should_sign_on_tx_hash = transaction.version >= 2 && transaction.options & 1 > 0; + if should_sign_on_tx_hash { + let mut h = Keccak256::new(); + h.update(tx_bytes); + tx_bytes = h.finalize().as_slice().to_vec(); + } + + hex::encode(self.0.sign(tx_bytes)) + } +} + +impl Debug for Wallet { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.get_address().to_bech32_string().unwrap()) + } +} \ No newline at end of file diff --git a/executor/src/utils/transaction/call_result.rs b/executor/src/utils/transaction/call_result.rs index 234af30..8bc404d 100644 --- a/executor/src/utils/transaction/call_result.rs +++ b/executor/src/utils/transaction/call_result.rs @@ -1,4 +1,4 @@ -use multiversx_sc_scenario::scenario_model::TxResponse; +use crate::TransactionOnNetwork; /// A structure encapsulating the result of a contract call. /// @@ -11,7 +11,7 @@ pub struct CallResult { /// This field holds all the general transaction-related information returned after a contract call, /// such as the transaction status, error messages (if any), and other relevant data pertaining to /// the transaction execution. - pub response: TxResponse, + pub response: TransactionOnNetwork, /// The result data returned by the contract call, if any. /// diff --git a/tester/core/tests/network_call.rs b/tester/core/tests/network_call.rs index 60a6651..bf6f7b8 100644 --- a/tester/core/tests/network_call.rs +++ b/tester/core/tests/network_call.rs @@ -3,12 +3,12 @@ mod utils; use std::sync::Arc; use async_trait::async_trait; use tokio::sync::Mutex; -use novax::{Address, EgldOrMultiEsdtPayment, Wallet}; +use novax::{Address, EgldOrMultiEsdtPayment}; use novax::errors::NovaXError; use num_bigint::{BigInt, BigUint}; use novax::data::NativeConvertible; use novax::tester::tester::{CustomEnum, CustomEnumWithFields, CustomEnumWithValues, CustomStruct, CustomStructWithStructAndVec, TesterContract}; -use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, DummyTransactionExecutor, ExecutorError, NetworkExecutor, SendableTransactionConvertible, TokenTransfer, TopDecodeMulti, TransactionExecutor}; +use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, DummyTransactionExecutor, ExecutorError, NetworkExecutor, SendableTransactionConvertible, TokenTransfer, TopDecodeMulti, TransactionExecutor, TransactionOnNetwork, TransactionOnNetworkTransaction, TransactionOnNetworkTransactionSmartContractResult, Wallet}; use novax::executor::call_result::CallResult; use novax_mocking::{ScCallStep, ScDeployStep, TxResponse}; use crate::utils::decode_scr_data::decode_scr_data_or_panic; @@ -21,59 +21,18 @@ struct MockInteractor; #[async_trait] impl BlockchainInteractor for MockInteractor { - async fn new(_gateway_url: &str) -> Self { - MockInteractor + async fn new(gateway_url: String, wallet: Wallet) -> Result { + Ok(MockInteractor) } - fn register_wallet(&mut self, _wallet: Wallet) -> Address { - Address::from_bech32_string(CALLER).unwrap() - } - - async fn sc_call( + async fn sc_call( &mut self, - from: &Address, - to: &Address, - function: String, - arguments: &[Vec], - gas_limit: u64, - payment: EgldOrMultiEsdtPayment - ) -> Result, ExecutorError> - where - OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync + to: String, + value: BigUint, + data: String, + gas_limit: u64 + ) -> Result { - let (egld_value, esdt_transfers) = match payment { - EgldOrMultiEsdtPayment::Egld(value) => (value.to_alloc(), vec![]), - EgldOrMultiEsdtPayment::MultiEsdt(transfers) => { - let payments: Vec = transfers - .into_iter() - .map(|transfer| { - TokenTransfer { - identifier: transfer.token_identifier.to_string(), - nonce: transfer.token_nonce, - amount: transfer.amount.to_alloc(), - } - }) - .collect(); - - (BigUint::from(0u8), payments) - } - }; - let mut dummy_executor = DummyTransactionExecutor::new(&None); - _ = dummy_executor.sc_call::( - to, - function, - arguments, - gas_limit, - &egld_value, - &esdt_transfers - ) - .await - .unwrap(); - - let data = dummy_executor - .get_transaction_details() - .unwrap() - .data; let mut return_data: Option = None; if data == "returnCaller" { @@ -159,15 +118,21 @@ impl BlockchainInteractor for MockInteractor { panic!("Unknown data for : \"{data}\""); }; - let mut return_data_bytes= decode_scr_data_or_panic(&return_data); - - let response = TxResponse::from_raw_results(return_data_bytes.clone()); - let decoded = OutputManaged::multi_decode(&mut return_data_bytes).unwrap(); + let response = TransactionOnNetwork { + transaction: TransactionOnNetworkTransaction { + gas_used: 0, + smart_contract_results: Some(vec![ + TransactionOnNetworkTransactionSmartContractResult { + hash: "".to_string(), + nonce: 1, + data, + } + ]), + status: "executed".to_string(), + }, + }; - return Ok(CallResult { - response, - result: Some(decoded.to_native()), - }) + return Ok(response) } async fn sc_deploy(&mut self, _sc_deploy_step: S) where S: AsMut + Send { From b9d3242e5fe3f933fb96c59bc9b4b2d9fffc5203 Mon Sep 17 00:00:00 2001 From: Fusee Date: Thu, 23 May 2024 16:59:45 +0200 Subject: [PATCH 08/25] added normalization and associated tests --- abi-build/src/generator/impl_contract.rs | 4 +- executor/src/base/query.rs | 6 +- executor/src/base/transaction.rs | 4 +- executor/src/dummy/transaction.rs | 4 +- executor/src/error/transaction.rs | 6 +- executor/src/mocking/executor.rs | 4 +- executor/src/network/query/executor.rs | 8 +- executor/src/network/simulate.rs | 2 +- executor/src/network/transaction/executor.rs | 22 +- executor/src/utils/transaction/mod.rs | 3 +- .../src/utils/transaction/normalization.rs | 499 ++++++++++++++++++ tester/core/tests/network_call.rs | 124 ++++- 12 files changed, 653 insertions(+), 33 deletions(-) create mode 100644 executor/src/utils/transaction/normalization.rs diff --git a/abi-build/src/generator/impl_contract.rs b/abi-build/src/generator/impl_contract.rs index ed486b3..c2a8251 100644 --- a/abi-build/src/generator/impl_contract.rs +++ b/abi-build/src/generator/impl_contract.rs @@ -432,7 +432,7 @@ fn impl_abi_endpoint_call_query( let result = self.executor.sc_call::<#function_managed_outputs>( &_novax_contract_address, #endpoint_name.to_string(), - &_novax_bytes_args, + _novax_bytes_args, self.gas_limit, self.egld_value.clone(), self.token_transfers.clone(), @@ -463,7 +463,7 @@ fn impl_abi_endpoint_call_query( .execute::<#function_managed_outputs>( &_novax_contract_address, #endpoint_name.to_string(), - &_novax_bytes_args, + _novax_bytes_args, num_bigint::BigUint::from(0u8), // TODO vec![], // TODO ).await; diff --git a/executor/src/base/query.rs b/executor/src/base/query.rs index 80018c0..1655a23 100644 --- a/executor/src/base/query.rs +++ b/executor/src/base/query.rs @@ -34,7 +34,7 @@ pub trait QueryExecutor: Send + Sync { &self, to: &Address, function: String, - arguments: &[Vec], + arguments: Vec>, egld_value: BigUint, esdt_transfers: Vec ) -> Result @@ -51,7 +51,7 @@ impl QueryExecutor for Arc { &self, to: &Address, function: String, - arguments: &[Vec], + arguments: Vec>, egld_value: BigUint, esdt_transfers: Vec ) -> Result @@ -78,7 +78,7 @@ impl QueryExecutor for Arc> { &self, to: &Address, function: String, - arguments: &[Vec], + arguments: Vec>, egld_value: BigUint, esdt_transfers: Vec ) -> Result diff --git a/executor/src/base/transaction.rs b/executor/src/base/transaction.rs index 58dced1..129ca99 100644 --- a/executor/src/base/transaction.rs +++ b/executor/src/base/transaction.rs @@ -30,7 +30,7 @@ pub trait TransactionExecutor: Send + Sync { &mut self, to: &Address, function: String, - arguments: &[Vec], + arguments: Vec>, gas_limit: u64, egld_value: BigUint, esdt_transfers: Vec @@ -49,7 +49,7 @@ impl TransactionExecutor for Arc> { &mut self, to: &Address, function: String, - arguments: &[Vec], + arguments: Vec>, gas_limit: u64, egld_value: BigUint, esdt_transfers: Vec diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index 7d74acd..6e5cb7a 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -65,7 +65,7 @@ impl TransactionExecutor for DummyExecutor { &mut self, to: &Address, function: String, - arguments: &[Vec], + arguments: Vec>, gas_limit: u64, egld_value: BigUint, esdt_transfers: Vec @@ -92,7 +92,7 @@ impl TransactionExecutor for DummyExecutor { .raw_call(function); for argument in arguments { - tx = tx.argument(argument); + tx = tx.argument(&argument); } let tx = tx.normalize(); diff --git a/executor/src/error/transaction.rs b/executor/src/error/transaction.rs index a634091..b982368 100644 --- a/executor/src/error/transaction.rs +++ b/executor/src/error/transaction.rs @@ -11,7 +11,11 @@ pub enum TransactionError { CannotDeserializeTransactionOnNetworkResponse { response: String }, FailedToSendTheTransaction { message: String }, NoSmartContractResult, - CannotDecodeSmartContractResult + CannotDecodeSmartContractResult, + CannotEncodeString { string: String }, + CannotEncodeU64 { value: u64 }, + CannotEncodeTransfer, + CannotSerializeTransactionData } impl From for ExecutorError { diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index 48e3d8c..633b2a7 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -83,7 +83,7 @@ impl TransactionExecutor for MockExecutor &mut self, to: &Address, function: String, - arguments: &[Vec], + arguments: Vec>, gas_limit: u64, egld_value: BigUint, esdt_transfers: Vec @@ -214,7 +214,7 @@ impl QueryExecutor for MockExecutor &self, to: &Address, function: String, - arguments: &[Vec], + arguments: Vec>, egld_value: BigUint, esdt_transfers: Vec ) -> Result diff --git a/executor/src/network/query/executor.rs b/executor/src/network/query/executor.rs index eb0875d..274a8cd 100644 --- a/executor/src/network/query/executor.rs +++ b/executor/src/network/query/executor.rs @@ -50,7 +50,7 @@ impl QueryExecutor for QueryNetworkExecutor { &self, to: &novax_data::Address, function: String, - arguments: &[Vec], + arguments: Vec>, egld_value: BigUint, esdt_transfers: Vec ) -> Result @@ -58,7 +58,7 @@ impl QueryExecutor for QueryNetworkExecutor { OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { let sc_address = to.to_bech32_string()?; - let arguments = encode_arguments(arguments); + let arguments = encode_arguments(&arguments); let vm_request = VmValuesQueryRequest { // TODO: put this in a separate function so normalization can be tested sc_address: sc_address.clone(), @@ -87,7 +87,7 @@ impl QueryExecutor for &str { &self, to: &novax_data::Address, function: String, - arguments: &[Vec], + arguments: Vec>, egld_value: BigUint, esdt_transfers: Vec ) -> Result @@ -116,7 +116,7 @@ impl QueryExecutor for String { &self, to: &novax_data::Address, function: String, - arguments: &[Vec], + arguments: Vec>, egld_value: BigUint, esdt_transfers: Vec ) -> Result diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index 0be897a..2c6af6b 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -135,7 +135,7 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto &mut self, to: &Address, function: String, - arguments: &[Vec], + arguments: Vec>, gas_limit: u64, egld_value: BigUint, esdt_transfers: Vec diff --git a/executor/src/network/transaction/executor.rs b/executor/src/network/transaction/executor.rs index 7564f14..a1399bf 100644 --- a/executor/src/network/transaction/executor.rs +++ b/executor/src/network/transaction/executor.rs @@ -16,6 +16,7 @@ use crate::error::transaction::TransactionError; use crate::network::transaction::interactor::{BlockchainInteractor, Interactor}; use crate::network::utils::wallet::Wallet; use crate::{TransactionOnNetwork, TransactionOnNetworkTransactionSmartContractResult}; +use crate::utils::transaction::normalization::NormalizationInOut; use crate::utils::transaction::token_transfer::TokenTransfer; /// Alias for the `BaseTransactionNetworkExecutor` struct, parameterized with the `Interactor` type. @@ -97,7 +98,7 @@ impl TransactionExecutor for BaseTransactionNe &mut self, to: &Address, function: String, - arguments: &[Vec], + arguments: Vec>, gas_limit: u64, egld_value: BigUint, esdt_transfers: Vec @@ -111,12 +112,23 @@ impl TransactionExecutor for BaseTransactionNe ) .await?; - let data = "".to_string(); // TODO + let normalized = NormalizationInOut { + sender: self.wallet.get_address().to_bech32_string()?, + receiver: to.to_bech32_string()?, + function_name: function, + arguments, + egld_value, + esdt_transfers, + }.normalize()?; + + let receiver = normalized.receiver.clone(); + let egld_value = normalized.egld_value.clone(); + let transaction_data = normalized.get_transaction_data(); let result = interactor.sc_call( - to.to_bech32_string()?, - egld_value, // TODO: normalize - data, + receiver, + egld_value, + transaction_data, gas_limit, ) .await?; diff --git a/executor/src/utils/transaction/mod.rs b/executor/src/utils/transaction/mod.rs index f890c40..457937f 100644 --- a/executor/src/utils/transaction/mod.rs +++ b/executor/src/utils/transaction/mod.rs @@ -1,4 +1,5 @@ pub mod data; pub mod call_result; pub mod token_transfer; -pub mod transfers; \ No newline at end of file +pub mod transfers; +pub mod normalization; \ No newline at end of file diff --git a/executor/src/utils/transaction/normalization.rs b/executor/src/utils/transaction/normalization.rs new file mode 100644 index 0000000..594d1fc --- /dev/null +++ b/executor/src/utils/transaction/normalization.rs @@ -0,0 +1,499 @@ +use num_bigint::BigUint; +use novax_data::Address; +use crate::{ExecutorError, TokenTransfer}; +use crate::error::transaction::TransactionError; + +#[derive(Clone, PartialEq, Debug)] +pub struct NormalizationInOut { + pub sender: String, + pub receiver: String, + pub function_name: String, + pub arguments: Vec>, + pub egld_value: BigUint, + pub esdt_transfers: Vec +} + +impl NormalizationInOut { + pub fn normalize(mut self) -> Result { + let esdt_transfers_len = self.esdt_transfers.len(); + + if esdt_transfers_len > 0 && self.egld_value > BigUint::from(0u8) { + return Err(TransactionError::EgldAndEsdtPaymentsDetected.into()); + } + + let result = if esdt_transfers_len == 0 { + self + } else if esdt_transfers_len == 1 { + let transfer = self.esdt_transfers.remove(0); + let is_fungible = transfer.nonce == 0; + let (encoded_identifier, encoded_nonce, encoded_amount) = encode_transfer(transfer)?; + + let encoded_function_name = encode_string(&self.function_name)?; + + let (receiver, function_name, built_in_args) = if is_fungible { + let function_name = "ESDTTransfer".to_string(); + let built_in_args = vec![ + encoded_identifier, + encoded_amount, + encoded_function_name + ]; + + (self.receiver, function_name, built_in_args) + } else { + let function_name = "ESDTNFTTransfer".to_string(); + let built_in_args = vec![ + encoded_identifier, + encoded_nonce, + encoded_amount, + Address::from_bech32_string(&self.receiver)?.to_bytes().to_vec(), + encoded_function_name + ]; + + (self.sender.clone(), function_name, built_in_args) + }; + + let mut args = built_in_args; + + args.append(&mut self.arguments); + + NormalizationInOut { + sender: self.sender, + receiver, + function_name, + arguments: args, + egld_value: BigUint::from(0u8), + esdt_transfers: vec![], + } + } else { + let mut built_in_args: Vec> = vec![ + Address::from_bech32_string(&self.receiver)?.to_bytes().to_vec(), + encode_u64(esdt_transfers_len as u64) + ]; + + for transfer in self.esdt_transfers { + let (encoded_identifier, encoded_nonce, encoded_amount) = encode_transfer(transfer)?; + + built_in_args.push(encoded_identifier); + built_in_args.push(encoded_nonce); + built_in_args.push(encoded_amount); + } + + built_in_args.push(encode_string(&self.function_name)?); + + let mut args = built_in_args; + args.append(&mut self.arguments); + + NormalizationInOut { + sender: self.sender.clone(), + receiver: self.sender, + function_name: "MultiESDTNFTTransfer".to_string(), + arguments: args, + egld_value: BigUint::from(0u8), + esdt_transfers: vec![], + } + }; + + Ok(result) + } + + pub fn get_transaction_data(self) -> String { + let mut args_string = vec![self.function_name]; + + for arg in self.arguments { + args_string.push(hex::encode(arg)); + } + + args_string.join("@") + } +} + +fn encode_string(string: &str) -> Result, ExecutorError> { + hex::decode(hex::encode(string)) + .map_err(|_| TransactionError::CannotEncodeString { string: string.to_string() }.into()) +} + +fn encode_u64(value: u64) -> Vec { + let mut bytes = value.to_be_bytes().to_vec(); + + while bytes.first() == Some(&0u8) { + bytes = bytes[1..].to_vec(); + } + + bytes +} + +fn encode_transfer(token_transfer: TokenTransfer) -> Result<(Vec, Vec, Vec), ExecutorError> { + let encoded_identifier = encode_string(&token_transfer.identifier) + .map_err(|_| TransactionError::CannotEncodeTransfer)?; + + let encoded_nonce = encode_u64(token_transfer.nonce); + + let encoded_amount = hex::decode(hex::encode(token_transfer.amount.to_bytes_be())) + .map_err(|_| TransactionError::CannotEncodeTransfer)?; + + Ok((encoded_identifier, encoded_nonce, encoded_amount)) +} + +#[cfg(test)] +mod tests { + use num_bigint::BigUint; + use crate::error::transaction::TransactionError; + use crate::{ExecutorError, TokenTransfer}; + use crate::utils::transaction::normalization::NormalizationInOut; + + const SENDER: &str = "erd1h4uhy73dev6qrfj7wxsguapzs8632mfwqjswjpsj6kzm2jfrnslqsuduqu"; + + const RECEIVER: &str = "erd1qqqqqqqqqqqqqpgq9wmk04e90fkhcuzns0pgwm33sdtxze346vpsq0ka9p"; + const RECEIVER_HEX: &str = "000000000000000005002bb767d7257a6d7c705383c2876e318356616635d303"; + + const ENDPOINT_NAME: &str = "myEndpoint"; + const ENDPOINT_NAME_HEX: &str = "6d79456e64706f696e74"; + + const FUNGIBLE_NAME: &str = "WEGLD-abcdef"; + const FUNGIBLE_NAME_HEX: &str = "5745474c442d616263646566"; + + const NON_FUNGIBLE_NAME: &str = "SFT-abcdef"; + const NON_FUNGIBLE_NAME_HEX: &str = "5346542d616263646566"; + + #[test] + fn test_normalize_no_payment() { + let value = NormalizationInOut { + sender: SENDER.to_string(), + receiver: RECEIVER.to_string(), + function_name: ENDPOINT_NAME.to_string(), + arguments: vec![ + vec![1, 2], + vec![3, 4] + ], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![], + }; + + let result = value.clone().normalize().unwrap(); + let result_data = result.clone().get_transaction_data(); + + let expected = value; + let expected_data = "myEndpoint@0102@0304"; + + assert_eq!(result, expected); + assert_eq!(result_data, expected_data); + } + + #[test] + fn test_normalize_egld_payment() { + let value = NormalizationInOut { + sender: SENDER.to_string(), + receiver: RECEIVER.to_string(), + function_name: ENDPOINT_NAME.to_string(), + arguments: vec![ + vec![1, 2], + vec![3, 4] + ], + egld_value: BigUint::from(10u8), + esdt_transfers: vec![], + }; + + let result = value.clone().normalize().unwrap(); + let result_data = result.clone().get_transaction_data(); + + let expected = value; + let expected_data = "myEndpoint@0102@0304"; + + assert_eq!(result, expected); + assert_eq!(result_data, expected_data) + } + + #[test] + fn test_normalize_single_fungible_payment_no_arg() { + let value = NormalizationInOut { + sender: SENDER.to_string(), + receiver: RECEIVER.to_string(), + function_name: ENDPOINT_NAME.to_string(), + arguments: vec![], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![ + TokenTransfer { + identifier: FUNGIBLE_NAME.to_string(), + nonce: 0, + amount: BigUint::from(100u8), + } + ] + }; + + let result = value.normalize().unwrap(); + let result_data = result.clone().get_transaction_data(); + + let expected = NormalizationInOut { + sender: SENDER.to_string(), + receiver: RECEIVER.to_string(), + function_name: "ESDTTransfer".to_string(), + arguments: vec![ + hex::decode(FUNGIBLE_NAME_HEX).unwrap(), + vec![100], + hex::decode(ENDPOINT_NAME_HEX).unwrap() + ], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![] + }; + + let expected_data = format!("ESDTTransfer@{FUNGIBLE_NAME_HEX}@64@{ENDPOINT_NAME_HEX}"); + + assert_eq!(result, expected); + assert_eq!(result_data, expected_data) + } + + #[test] + fn test_normalize_single_fungible_payment_with_args() { + let value = NormalizationInOut { + sender: SENDER.to_string(), + receiver: RECEIVER.to_string(), + function_name: ENDPOINT_NAME.to_string(), + arguments: vec![ + vec![1, 2], + vec![3, 4] + ], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![ + TokenTransfer { + identifier: FUNGIBLE_NAME.to_string(), + nonce: 0, + amount: BigUint::from(100u8), + } + ] + }; + + let result = value.normalize().unwrap(); + let result_data = result.clone().get_transaction_data(); + + let expected = NormalizationInOut { + sender: SENDER.to_string(), + receiver: RECEIVER.to_string(), + function_name: "ESDTTransfer".to_string(), + arguments: vec![ + hex::decode(FUNGIBLE_NAME_HEX).unwrap(), + vec![100], + hex::decode(ENDPOINT_NAME_HEX).unwrap(), + vec![1, 2], + vec![3, 4] + ], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![] + }; + + let expected_data = format!("ESDTTransfer@{FUNGIBLE_NAME_HEX}@64@{ENDPOINT_NAME_HEX}@0102@0304"); + + assert_eq!(result, expected); + assert_eq!(result_data, expected_data) + } + + #[test] + fn test_normalize_single_non_fungible_payment_no_arg() { + let value = NormalizationInOut { + sender: SENDER.to_string(), + receiver: RECEIVER.to_string(), + function_name: ENDPOINT_NAME.to_string(), + arguments: vec![], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![ + TokenTransfer { + identifier: NON_FUNGIBLE_NAME.to_string(), + nonce: 1, + amount: BigUint::from(100u8), + } + ] + }; + + let result = value.normalize().unwrap(); + let result_data = result.clone().get_transaction_data(); + + let expected = NormalizationInOut { + sender: SENDER.to_string(), + receiver: SENDER.to_string(), + function_name: "ESDTNFTTransfer".to_string(), + arguments: vec![ + hex::decode(NON_FUNGIBLE_NAME_HEX).unwrap(), + vec![1], + vec![100], + hex::decode(RECEIVER_HEX).unwrap(), + hex::decode(ENDPOINT_NAME_HEX).unwrap() + ], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![] + }; + let expected_data = format!("ESDTNFTTransfer@{NON_FUNGIBLE_NAME_HEX}@01@64@{RECEIVER_HEX}@{ENDPOINT_NAME_HEX}"); + + assert_eq!(result, expected); + assert_eq!(result_data, expected_data) + } + + #[test] + fn test_normalize_single_non_fungible_payment_with_args() { + let value = NormalizationInOut { + sender: SENDER.to_string(), + receiver: RECEIVER.to_string(), + function_name: ENDPOINT_NAME.to_string(), + arguments: vec![ + vec![1, 2], + vec![3, 4] + ], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![ + TokenTransfer { + identifier: NON_FUNGIBLE_NAME.to_string(), + nonce: 1, + amount: BigUint::from(100u8), + } + ] + }; + + let result = value.normalize().unwrap(); + let result_data = result.clone().get_transaction_data(); + + let expected = NormalizationInOut { + sender: SENDER.to_string(), + receiver: SENDER.to_string(), + function_name: "ESDTNFTTransfer".to_string(), + arguments: vec![ + hex::decode(NON_FUNGIBLE_NAME_HEX).unwrap(), + vec![1], + vec![100], + hex::decode(RECEIVER_HEX).unwrap(), + hex::decode(ENDPOINT_NAME_HEX).unwrap(), + vec![1, 2], + vec![3, 4] + ], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![] + }; + + let expected_data = format!("ESDTNFTTransfer@{NON_FUNGIBLE_NAME_HEX}@01@64@{RECEIVER_HEX}@{ENDPOINT_NAME_HEX}@0102@0304"); + + assert_eq!(result, expected); + assert_eq!(result_data, expected_data) + } + + #[test] + fn test_normalize_single_multi_payments_no_arg() { + let value = NormalizationInOut { + sender: SENDER.to_string(), + receiver: RECEIVER.to_string(), + function_name: ENDPOINT_NAME.to_string(), + arguments: vec![], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![ + TokenTransfer { + identifier: FUNGIBLE_NAME.to_string(), + nonce: 0, + amount: BigUint::from(10u16), + }, + TokenTransfer { + identifier: NON_FUNGIBLE_NAME.to_string(), + nonce: 1, + amount: BigUint::from(100u8), + } + ] + }; + + let result = value.normalize().unwrap(); + + let expected = NormalizationInOut { + sender: SENDER.to_string(), + receiver: SENDER.to_string(), + function_name: "MultiESDTNFTTransfer".to_string(), + arguments: vec![ + hex::decode(RECEIVER_HEX).unwrap(), + vec![2], + hex::decode(FUNGIBLE_NAME_HEX).unwrap(), + vec![], + vec![10], + hex::decode(NON_FUNGIBLE_NAME_HEX).unwrap(), + vec![1], + vec![100], + hex::decode(ENDPOINT_NAME_HEX).unwrap() + ], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![] + }; + + let expected_data = format!("MultiESDTNFTTransfer@{RECEIVER_HEX}@{FUNGIBLE_NAME_HEX}@@0a@{NON_FUNGIBLE_NAME_HEX}@01@64@@{ENDPOINT_NAME_HEX}"); + + assert_eq!(result, expected); + } + + #[test] + fn test_normalize_single_multi_payments_with_args() { + let value = NormalizationInOut { + sender: SENDER.to_string(), + receiver: RECEIVER.to_string(), + function_name: ENDPOINT_NAME.to_string(), + arguments: vec![ + vec![1, 2], + vec![3, 4] + ], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![ + TokenTransfer { + identifier: FUNGIBLE_NAME.to_string(), + nonce: 0, + amount: BigUint::from(10u16), + }, + TokenTransfer { + identifier: NON_FUNGIBLE_NAME.to_string(), + nonce: 1, + amount: BigUint::from(100u8), + } + ] + }; + + let result = value.normalize().unwrap(); + let result_data = result.clone().get_transaction_data(); + + let expected = NormalizationInOut { + sender: SENDER.to_string(), + receiver: SENDER.to_string(), + function_name: "MultiESDTNFTTransfer".to_string(), + arguments: vec![ + hex::decode(RECEIVER_HEX).unwrap(), + vec![2], + hex::decode(FUNGIBLE_NAME_HEX).unwrap(), + vec![], + vec![10], + hex::decode(NON_FUNGIBLE_NAME_HEX).unwrap(), + vec![1], + vec![100], + hex::decode(ENDPOINT_NAME_HEX).unwrap(), + vec![1, 2], + vec![3, 4] + ], + egld_value: BigUint::from(0u8), + esdt_transfers: vec![] + }; + + let expected_data = format!("MultiESDTNFTTransfer@{RECEIVER_HEX}@{FUNGIBLE_NAME_HEX}@@0a@{NON_FUNGIBLE_NAME_HEX}@01@64@@{ENDPOINT_NAME_HEX}@0102@0304"); + + assert_eq!(result, expected); } + + #[test] + fn test_normalize_esdt_and_egld_payment() { + let value = NormalizationInOut { + sender: SENDER.to_string(), + receiver: RECEIVER.to_string(), + function_name: ENDPOINT_NAME.to_string(), + arguments: vec![], + egld_value: BigUint::from(1u8), + esdt_transfers: vec![ + TokenTransfer { + identifier: FUNGIBLE_NAME.to_string(), + nonce: 0, + amount: BigUint::from(100u8), + } + ] + }; + + let result = value.normalize(); + + let expected: Result = Err(TransactionError::EgldAndEsdtPaymentsDetected.into()); + + assert_eq!(result, expected) + } +} \ No newline at end of file diff --git a/tester/core/tests/network_call.rs b/tester/core/tests/network_call.rs index bf6f7b8..d8a7e42 100644 --- a/tester/core/tests/network_call.rs +++ b/tester/core/tests/network_call.rs @@ -1,17 +1,17 @@ -mod utils; - use std::sync::Arc; + use async_trait::async_trait; -use tokio::sync::Mutex; -use novax::{Address, EgldOrMultiEsdtPayment}; -use novax::errors::NovaXError; use num_bigint::{BigInt, BigUint}; +use tokio::sync::Mutex; + +use novax::Address; use novax::data::NativeConvertible; +use novax::errors::NovaXError; +use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, ExecutorError, NetworkExecutor, SendableTransactionConvertible, TokenTransfer, TopDecodeMulti, TransactionExecutor, TransactionOnNetwork, TransactionOnNetworkTransaction, TransactionOnNetworkTransactionSmartContractResult, Wallet}; use novax::tester::tester::{CustomEnum, CustomEnumWithFields, CustomEnumWithValues, CustomStruct, CustomStructWithStructAndVec, TesterContract}; -use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, DummyTransactionExecutor, ExecutorError, NetworkExecutor, SendableTransactionConvertible, TokenTransfer, TopDecodeMulti, TransactionExecutor, TransactionOnNetwork, TransactionOnNetworkTransaction, TransactionOnNetworkTransactionSmartContractResult, Wallet}; -use novax::executor::call_result::CallResult; -use novax_mocking::{ScCallStep, ScDeployStep, TxResponse}; -use crate::utils::decode_scr_data::decode_scr_data_or_panic; +use novax_mocking::ScDeployStep; + +mod utils; const CALLER_PRIVATE_KEY: &str = "69417ce717e43d0d3a598f68b5e562d7d2a532a5a3ac1e8b3342515e0b2d950f"; // to anyone reading : this has been generated only for the tests below const CALLER: &str = "erd12wf7tlsk2z895vwmndheaknkp3uaqa7xuq847numkwlmcvy60wxql2ndlk"; @@ -81,6 +81,12 @@ impl BlockchainInteractor for MockInteractor { return_data = Some("@6f6b@746573742174657374".to_string()) } else if data == "returnConcatMultiBufferArgs@7465737431@7465737432" { return_data = Some("@6f6b@74657374317465737432".to_string()) + } else if data == "ESDTTransfer@5745474c442d616263646566@2386f26fc10000@72657475726e436f6e6361744d756c746942756666657241726773@68656c6c6f@776f726c64" { + return_data = Some("@6f6b@68656c6c6f776f726c64".to_string()) + } else if data == "ESDTNFTTransfer@5346542d616263646566@01@2386f26fc10000@000000000000000005002bb767d7257a6d7c705383c2876e318356616635d303@72657475726e436f6e6361744d756c746942756666657241726773@68656c6c6f@736674" { + return_data = Some("@6f6b@68656c6c6f736674".to_string()) + } else if data == "MultiESDTNFTTransfer@000000000000000005002bb767d7257a6d7c705383c2876e318356616635d303@02@5745474c442d616263646566@@0de0b6b3a7640000@5346542d616263646566@01@2386f26fc10000@72657475726e436f6e6361744d756c746942756666657241726773@68656c6c6f@6d756c7469" { + return_data = Some("@6f6b@68656c6c6f6d756c7469".to_string()) } else if data == "returnCustomEnumArg@02" { return_data = Some("@6f6b@02".to_string()) } else if data == "returnCustomStructArg@00000004746573740000000218711a00000000080de0b6b3a7640000" { @@ -125,7 +131,7 @@ impl BlockchainInteractor for MockInteractor { TransactionOnNetworkTransactionSmartContractResult { hash: "".to_string(), nonce: 1, - data, + data: return_data, } ]), status: "executed".to_string(), @@ -568,6 +574,104 @@ async fn test_call_concat_multi_buffer_args_result() -> Result<(), NovaXError> { Ok(()) } +#[tokio::test] +async fn test_call_concat_multi_buffer_args_one_fungible_transfer_result() -> Result<(), NovaXError> { + let executor = get_executor(); + + let first_arg = "hello".to_string(); + let second_arg = "world".to_string(); + let args = vec![first_arg.clone(), second_arg.clone()]; + + let result = TesterContract::new( + TESTER_CONTRACT_ADDRESS + ) + .call(executor, 600000000) + .with_esdt_transfers( + &vec![ + TokenTransfer { + identifier: "WEGLD-abcdef".to_string(), + nonce: 0, + amount: BigUint::from(10u8).pow(16), + } + ] + ) + .return_concat_multi_buffer_args(&args) + .await?; + + let expected = format!("{first_arg}{second_arg}"); + + assert_eq!(result.result.unwrap(), expected); + + Ok(()) +} + +#[tokio::test] +async fn test_call_concat_multi_buffer_args_one_non_fungible_transfer_result() -> Result<(), NovaXError> { + let executor = get_executor(); + + let first_arg = "hello".to_string(); + let second_arg = "sft".to_string(); + let args = vec![first_arg.clone(), second_arg.clone()]; + + let result = TesterContract::new( + TESTER_CONTRACT_ADDRESS + ) + .call(executor, 600000000) + .with_esdt_transfers( + &vec![ + TokenTransfer { + identifier: "SFT-abcdef".to_string(), + nonce: 1, + amount: BigUint::from(10u8).pow(16), + } + ] + ) + .return_concat_multi_buffer_args(&args) + .await?; + + let expected = format!("{first_arg}{second_arg}"); + + assert_eq!(result.result.unwrap(), expected); + + Ok(()) +} + +#[tokio::test] +async fn test_call_concat_multi_buffer_args_multi_transfers_result() -> Result<(), NovaXError> { + let executor = get_executor(); + + let first_arg = "hello".to_string(); + let second_arg = "multi".to_string(); + let args = vec![first_arg.clone(), second_arg.clone()]; + + let result = TesterContract::new( + TESTER_CONTRACT_ADDRESS + ) + .call(executor, 600000000) + .with_esdt_transfers( + &vec![ + TokenTransfer { + identifier: "WEGLD-abcdef".to_string(), + nonce: 0, + amount: BigUint::from(10u8).pow(18), + }, + TokenTransfer { + identifier: "SFT-abcdef".to_string(), + nonce: 1, + amount: BigUint::from(10u8).pow(16), + } + ] + ) + .return_concat_multi_buffer_args(&args) + .await?; + + let expected = format!("{first_arg}{second_arg}"); + + assert_eq!(result.result.unwrap(), expected); + + Ok(()) +} + #[tokio::test] async fn test_call_sum_multi_u64_args_result() -> Result<(), NovaXError> { let executor = get_executor(); From a663427b528712d79f8802b8b48fb7731ea137f8 Mon Sep 17 00:00:00 2001 From: Fusee Date: Fri, 24 May 2024 18:51:44 +0200 Subject: [PATCH 09/25] progresses on deploy executor --- .novax/tester-contract.wasm | Bin 12555 -> 12835 bytes abi-build/src/generator/impl_contract.rs | 54 ++++---------- core/src/code/bytes.rs | 2 +- core/src/code/file.rs | 9 ++- executor/src/base/deploy.rs | 35 ++++++++-- executor/src/dummy/transaction.rs | 22 ++++-- executor/src/error/transaction.rs | 1 + executor/src/lib.rs | 2 + executor/src/mocking/executor.rs | 19 ++++- executor/src/network/transaction/executor.rs | 66 ++++++++++++++++-- .../src/network/transaction/interactor.rs | 42 +++-------- .../models/transaction_on_network.rs | 17 +++++ .../src/utils/transaction/normalization.rs | 35 ++++++---- tester/core/tests/dummy_deploy.rs | 4 +- tester/core/tests/network_call.rs | 4 -- tester/core/tests/network_deploy.rs | 65 +++++++++++------ 16 files changed, 240 insertions(+), 137 deletions(-) diff --git a/.novax/tester-contract.wasm b/.novax/tester-contract.wasm index 3c314fe548fbedcd0015ce5049571b4e5be218f2..991a56cce07824f71f4c275017d18189be84ec9b 100755 GIT binary patch literal 12835 zcmcIqTaX;rSw81<&+P2>UXJCJv|7u!XY7PkB3YJXuWb3YJ@RVhNM6ahIF6k}8tt}L zvzM9G%&ac9vnxkJF@eMm7#u<_1VR)7j!j4)l?p|uRsozv&?pa1&(|2f^N(wx&uDgCk@IH}Z0v$Uj6>LtB|Kk|f@!ar|m ziJkmWCw=@)f6!@`7G=%iNsUI1gBX<+i}JXLN4Wo|JAX@i)-hCW_7AonH_C3>J6pY(|f8q^=PeiG;ZPV@ZGA5on3R~h0~|w#&~>Q z<=D}abVT#>acxrh?S1>IwQBQ>GVHT+m0D#go;WJOi(8`?T5$s$ zlq<89+C=PlunBdHAB<~Lt%O+La(DS+D{i`NH!ssV`pB`>^!m76r<+3VEuS|gTycM_ zIaZ&EYmZb~6?GFw(`}#vw@seC>y|f<8dD2%ajoU{PY0YTR;);5Z&R^Ie@k<&GCK?P zV*lecS|FaxXa>SyCezWCqhg{>+2}h~%lJ)GaVw>_LVxHVUzkgWn$DCPQf{2xQj)5h zjP$P@blkY1n-hf`ZPgnvF@IvGk%49P9%@vlsxa@d3;QeZ2@yZB#$yY!s)KtZ&u|d; zyeT2PuTh^Xi!)|CiJxsu#*fw48cnDjuAg_*`jgpv>+=_BoTIZo8 z_fDLNCuYX$hbtGw&Pr6_w7yD9B2iBw@LrfTZa68|wNFp5hg|SNWV0^lz){*cn z$?DMy@x($aK2&=oZnpN;YpwV~OWn*FeG{{BrFJB4Ei{~;3PY&@;6Wzy=`GAy`x~lWg-O+_P^(pOD;4Uxdn;W8(@zbrtjrx4tXjK6Vzp6K8 z-J`XIxwfHC>swb0?W@MKlg+jXzoyr_3HugmQ`J+maSBYot_PBp_1fyO&*=5FI>Kta zeni+Atxe9?s{n}4>Tb6v@r)N!h97g#;80b)lx|9^H!2gY6f8fdd)#_>`T`05hAy~{ z0RQcjhvU0;J`qo-SF-2fyZQWi-Iwek5YMjP(RRhQ z?E6Bx?AZDGaghDpbPk@K7)|v>U2^LV)neC&1|~?^5B9m>X&jy#8cFCBtokQcWLMw;rY`WCkn^g2;#0dZQ@Y++OVeyVn? zlrhIhQ~iP75Az8sN};t6B%xKT(-oh|Bf*tooK7boAdb#D%Y=e2emB6%43e&m2;~ zpELhd-!=gli)!`OnYfWg$q@;*#2>${@2sS7cY}H3b%x@p%EXNNGkxECSwVHVovO8| zZ1H#W1MhY5cs+sc_VwS@1xi#VBY%DaLy1Yk2#d)kbckx*|_KJ3EPe)Q7cs_1)fQmZ9z=0Fdo zh93U+r%T#?0(@d0jPZ|erw2JT)KGo55%I}*y<4MgFH#-y9AG=q#CaIU=^^2_eDBpz zmBH)f^3c^QY+m|#$K~>X^j^C3-+h_B^fZOmi;5ZYLd*1a!WxpIYy zrF4a9DD-r?Zx`8soOV|*tWBGhX#u-iEDCEwz1viGq|feAbVfJ_dK~AoE0!s<6#d}M z!ZxK!W)yyacBJFCe#d5pbgH!3Ctl32ulhqWxA&hz|sBofuM)#*jiGyXAlvy3p-%9 z4k`e`MqGtf_q0<0IB`J&bwDdZJ?Q0(pTO@!`w-mpsmu>Oh7K)Y=ZZdkuRVNnp^xzK z((n;Ox!|dRPxLc*{4hrdz*=#cjMvTNRiaz4z}~{>?q;-8k{kvPf(siJJ-byz`Ni9B zzumD9e(l-4(U0M##^yuQ2f%@>;LYxZ4FCFO!4?KN%qBJ`>z$zi0$~*07!6+4x+8HK z%7-cCd|BD9k^$2A_?N@KJpOgyAEFy01++RX!=M8W0>i#>iOT98gq)GOU-yPSBFT$- zrz2xWAsYQ>GsG9CQ(@<@8NgFv*z{AM!^YyL!+}=b*(2v5)7z$cBQ>^1-I}Vb&zXQ= z^~)Fu?u3$}pJM-wcC19l*0y&L`(J_mJZUnjK@TR>HQAoBpn{m5H1;+gl;tl8_TObmPGg{3 z=jg)0b*FB(~OFNi)5cUi{--;a?{qcT|8Y2o<@Uvz#GGdFSOrj$aY;B**qE{72m z44`fMVZz`xdZ@Nf2?_{MN?3{KbG(y`cSPn~AbDXu=B^K3*AC%BN&g1?LsA#I0NG)v zgt>t+iWU$I@reM2p{617$2i-E(j-e;G$czCa_(_%Ycm@C84XJsptg#}$DJXJJ%NS= z3frBMS_jC%W_vFdge)uGzsj9}+kLcL)HfaJ<=pq0HhR%-gD=YNAu-vQYAEL5y#Qv| zzLb9yc5}F!3%#^TaWIZ_Iz1SATf71S3t1cCn`UiBa+0+rsI#nX+OoE3%i1Q(+91WO z4QB2R^F^P55^; zf?y*EMsMr0kr5Yl1?7eSwcm=WAhoy8WUB>@1aqYnqoxu|!>`hM43-wZ5H}GcN%}he zUI|;6RS47k{j@sFPus6Wby4TqiWsQKmOOvNPC`j2W-@-!LS-lQ3^FUI!lg^ObfcK4 zALigG3LYpM(y^TY_t}j|RaCxnZM38Y?zTfJxCKH<=r@Wqsj_3BuR~ zsZd#yu|gGr*xftGxKyZ~+PavV#cD@TNzl25Ot{Zy;xeN>iYU*D51E8NIhGbk+tWqD z0DeH0=MdAQu~Wc0W~S(YWDc2XH29)+HoFTmSgS`v(QHvJ6&Tl5+|gJgLD+RCZbsJBN83QgX01jVq=WcVanO2qH@F(QfWU2zn?SsS$ggO67c6 z=_AgRL==w?1tb(_(rLtj^O6TwDvKh01Lt=z2?JEckBguyUft$n#;x9|%m_)!^#K=M z_X2@br964v=se1R&|{ox9EEpg9^a(vc;THa6l{q3XNm>{|(t>d{ zN?vN!A(b2*5?&sMEV32pMRE#tCQA>b(Pwa4k$N`z7LEwrc8sL#0e8p)DdHsvBjJ{p zcr*2EW*7tkAk6h_Y69zJMA^Rg5V5N6CYuIgAPu#@$n3{KmHSV;w zV?)?JF*x!8&IJtoTExwkfGaL0s&sZLPL<@xM>gWY9PpGSm0%;Jvtgv|6FBS~DJpw~mU}Mf zQ|MLp2|U|pZ85l=R}m}cf!wnt#GO4W>^&F!wRX2ABY>GZlJ(Kwz#&ji6+sq^*$BHo zf+mUuEFCiacAI?w68r>Z7p`6~&DaO2n<2B6e}-I9a_=;PeeK&Ih1wPdLvXXUMGFFp zgUE(pau?zPmx~;L1LDksVpc^XGjt8NZ=ye#{;LM(Pf`853Smb0KdC|nY|{Z-Bywr{ zK%|R0nPKcFHB0nfW3)|nhMD25KN@k)pfTzcM|68o`Sp^RmH47`6qpS4HXXVZCI_Jg*8?YfhW zvWFvmPx|mPKJ}(gKm0;B9@C}eOW*nNkBaEvtw9pR2T<^I;f4fv3Yd#u?p0hdUhcwW z3$CkWFU$hC4Lsr_5hsq``|cd$K=lCud+6fMQ-;P=ZW*l{Q^uPIga;#h?8M6 z1V#{}cQ9IUh(n$4jYvD>aTk*j>il849+byb{##Tz!e3C5+05^bmL5zEnH zFyWvd@0!FC_DTC;j6-{vW*>8auIw>hE<)+XeuNemK!%wQQP))Q&)`c1BswGokLOu1 zMX{+%oasK^mKN9C1tj1*_84~1YwVEH{}m*e=ZZ$?8@oOwUwMxrG~b&D58Jbe1jTfR z(X8yr+%?rQX*y?>YRQ?A=Vyo_g_EtMRKB8(pOpuW5NwQU!QJ%1g9ZQgK+D@vJsZ3t zz*9wGd}kRtMX-cK3gZO?&2%GG z;uJ-Gr4|Rj0$ywBP=j~R@t)y6uX0bwg@F@*hhsB>((GoGLkh1Qpg!|dj}G-U#4K+D zy+b{`7~;DG_c}K-Qu6Fl9!g<%Tev^#36Ml*Zq#9k=LQawWi+5zaC6!mGGe-yHb z=3n}M@BrX1&F)l9%cIrKkvm@`j78uN<2K{y6@0q2WLQ(XC~?YM!wnP*{1A{&Q2=m{ zyDE;JuuX-%M&kl!wH`57LTM-(PhNWL=S3oTHclP#4$Ld-CxPYOH5_+(sDMOOKL@a{<9ibb3a#i|aR(W|GKfW| zH{codhA$=ff*o3fzo7bL_P{%V!>mBIK*3@kxH_&E?Rq2&AMpq#sM%mcd&*?BcN1Lh z_TaOWW915RA3b%qo;e?E?G$^pkMOJOONB$`wsYmyz=$P5p9egfFCYz z;aKk*wC@)NN-(7}vumXdnFg^-=ZtL0}(c;SI_ zF}CBe2a&+@pN_sGHwX_QK+^VHk*@wel=tc(~+KZVSiG*(X$`1PjX1cpR~tu%EN`1eHy{@e@7End!$LveM`xu zh*RbA$v1iflH5W`8madJDRB>+boe~5$*(3e z&YEZH4ScZ=M%=derY+<*^kJpdYE)0*`{m}I@Kj|I1RIr$;jDbVU#o}w*zHthVkSJj zP@CXqg5i05R~NRY;amGA3hVZudNZHlVuGbyzbTz|rS zV%Wqld0l&qUk-v-Hzm=#Tj#zX1mCS4{IipP#`hiDRyj2>8J|8jdNgf9n<;B25(?;Q vo~tydy{6Mq9TtQ-8Lz(xm^0nPg40wIaPU-KKzjn zmz8sF&kPn2NGVkgS=jCA*S+`LN8j5!s?wa(N-6!C9yp`a8MC;k&gezGh!1%}OX1I3 zTx2J|)EOV2=@&Z9;)1MMIFsW5Mr5{oT)?AVz^q_#aY2SJ6pY(|fi$b+Fbt5x4L;@}TNsXV+YLesVHy9EmTf z96NfFj_CaPxHh5u_P+hqTD5sj8TQ$^O06;#Pn_5rO-wZ6W>b0W9&khs#I3Q*t+)XW z%9YtlZ9H~7*kpH%ABt;Jtz@&lrS9^TR@`)CH!baTV&BP?`}LAsr<+3V`}n**;fnOJ z=45>)uI;O|D#~&+B?AZ?nGW`@St1@arsn73TFcQ-2OJd3RwS~wK`hd5Y|d3?X8|wh zpQ=#<@kF*~Kw=v*ncg=pO1fhzZlx=hA%y-T^KpdOx|Re5fdJVVd!c|)@C{ziSSEH;%97IRsj zjGwHpHk#~qtbWPu)}PGYTR(q=7@wG}!dg1pHIqnis9s47vUmJkJU(-zeynmu)TKDP z-$A6{CFkeoMWeI{@2>`8jn> zdleYOb-lJBcpRB*9c$Fj$BkAM{`+~oKIZ&b!xX;k}??s4m3%k$ju%evq?PVH8|tvi$UjuG{0_VBT3caNBd}jdTcxL0%jc zj5O6B>y3^Qa2>C-5K~&!Y++Mo)4clARbW(7rbl&ZC1xi#VBX8XXT!El@dvKFEw*c3TI&iyApPoPxaT*Dcr-Rd{&&8GVr_WZJ zv1hve``|13K4nHj9h$@bXlO$JaF4dXt^)pr3LSc8#Q13G(3>7HDhO0`^?D)dwMqqR zwO+KtB^|1p<@fY8t3w@ZKwtDKX5eqgs7TM06xM|*=;Lg|+14Ax%wdDXb0O4rYY}AZ zwxUNe_P!C*P0AytfG=;Cr-G-nzj(Kb>`X~-!A^FX3!=hwsD?NRWJ+FW?72|mInoFG z(deJA6(TSCr{@b%pWO>lFe1A;DX`j3Z&AT^VPR=&T~@n1lI89t6&38Eke`d`f&$5J zwT}dMp+Vx>ZV%P4N5*%sryGr(!CN@-5{?ZxHdvG|dC@>C^rEZ3^e#k&Rs+q#MR`JN z;9{dexuJ)sdph#%Su<)zL%mJ;PzzW4(W^gE(Kp{As3mXau^vnfJ^c5lOWIxmo1lX+ ze)x8BkW)hq!u@Q{9oiut(7rVH;GDa6Y?inKFyfx8EsjQ>tXfUz$!N0KzD`F&f;|I-eK~<-?S6M_Jjfl0l&H@t4D2 z2mbQ-gL7k~fL5oa8{}aiQ0&`R30C(Yp#jFmekDQB`-Zs@6sRMh|T`6RJP6dorTQCyb2auxw0{!)NUx|jT zZSNrHUx)rYY0}4~Vf$2Yhr?9d0Sp6+?o_9bSu4BQ14ZotKKOU^U5OP(L`sP9E+V3D zAGHTzs3wBF}VdJVj2_={trQBGUi~i$Z^!`Q<99jZYDu6!oH z2;B*ov=|8X5)^cYkfW(+=N7>ZtWNw2s)Uj+ta1=x4uh|e!}MOt%JWP^MB_nje^E}0 zZT39))iXs%ouknQx174w9$Yb%Rw2H32UJ?5jUl?gCGt^-qY)D7=%p75kre?qAYZ`Vb}g_CHWN^7 zpOh#dff7I@=>^9-$#_087lTvFqPn&Z08buR) zWA9JmJA$wM80JXGdP^I<;I{<~Qu8i?r3wibb8sDmLT=b`5JYknD${e5dnM&` zCGy}vw>wv}qy?R8OICn|EqRDjXFwH6OJ<;G!DuCK!3hfcqy}>-tqP-im;>huh=}}5 zU?tZ9=Tb_D#-+lfvKoMD#|><4!#)3ZdUT z5{eiEF_m)Cw-^poh|@oGnnY+&yOhEMtl7^VVB@*;AvD9Dlk6s!al625#u%B`K^VxsuLOo&MxvOJ>}Vs#(hR6LVmcuv^%DuX2z*0A zJT~$MU9Q1R*W;984lEP~f&n0bL{UeL@*1nbmWmp7BNCQg87L{Fap(*#XNb9yMKcuZ zrBIA!8j9ImDp_<}DAsMESZARaTcsrn6(l9gQbO~WOT`^@C3y|ZvcS+uQ%24S6QQ4= zMoWqjG+2(oLR40gh?2t&R3bU3nwk|oi!CwdECdmy_oy^i_F+F{heX6SsRquMl|GzI zi94}IDBuip%AAA~I1~B!a|0();EbK)30G{xr048s~`}B zoxv{8T_|7$;^}3V4jp*4t$OdhwRDW^`ORYucM)Mhb+D{Mp%7> zYKOwMyz5B}wy3&Qz{?B7?C2M~WwZN&bH?B*&lQV;4+XH#6`|@Rb(R~f&Z9JAh_+O& z;RZ|MD=r{nnmS=qCHeAk6tMtDgh~&pU_C^$zZPkG0yWLiqOw=PqP-mSDfB9P0?+o6 z-5lJ_8;9ldu-l~)oX*Y(bC-jE(C%_%6oF<-vOfApNQ88Xl7lb%2@sFaM6Mv&NWZ<; zJ_G@NhO7%WESP5O9wIYjw(?`ho8WZM&2k9qfKL~h(4{~e=<%@sZGfPa1vtz5T^_h9Dv?tI z*!@)K-2k!eFsSflww3_|y0<{+-;${Gf%rHuKu-X&4*@IfkdT92EFe|8C>`Q0$x1$N zBkL`c4s)lKNj=3<3Ktd2Uurau@DLa3?K`(c+A+CG{-w z`^=r~0odvf!Ep{!@S5cBvNpnsT;b8n6Wfzw7b=nCjhB4zk`XfmM&O}a=(VWekmP%# z(hgZ+V=^3_Up%P?rY(wWBrJHw2CjNlF2nzur2arL-_D1 z@w(Bm#&SDf^uUI8=d1Uavr(|QiO~a`Y~qgyjGjYg6LX^5-rQk6%JrQ{ad^ol+*@+r zkJ?+g`+_y8{<;#>pAELK2$iUtLY%@|)KCb}gI0#$KS`vNDXI1`b#rhBDY(FH%lbvw z#NdixPh_C$SxgSwhjznYQd30^7tWP^oR_Hp-Pk9naS6vz^HE|=h<^@SD%j_6B6zH2!4st>l&I%E-F70bN(4K= zbnN3GpjRP~ZvQ+^nCFT{_BR$b;I=>WAtk7PCnNd-r*M&4$ zg0q5X9TuF96j7#N19W`UjMAV00_;=(fB(W*ohacc~T)vuWog4$M`|Kryoq5%4Jr!rLL2!O;@7sj$~*T->b0 z5p%`mwu%95E8>SYx*JsNMm#Ys&mNIpa_!0PVvGzy!q!zD$Ofr{@TN7`=g`BX5sM&_X~*PxrL_td(eujY?j5@o`)y7lE|= zX6lhN5yTfl3vNZBw$h-zTPT$PseJ+{y^X3Qu+L)}=x0y%Sv<3T2$I`{EEitE%p;fw zjjQO9j2XI1n-8gBv(>#I0Um~&-JVuKD-|wV0{2#^L8ahG@HD+ zfZuWbXciYbfX>(nF_x66wBu29(1S@9I7gf8cv|E{fFQcdj^oDib&QNy{DimUWwTiG zQ$^ua^q*?l{sy<7rArK%WAuTiT$nf`j^x=V>?sZ*yBac2+2be)bGY$*7JmM#+tau` z>2&WZcpa)_L42u7j^2hO8!1Wf1>aNhvgqMz?P6uNIuYV?K5oS0)$>)nJ00S+P`(cy z;;pl=8Mmsn^Yg8+Rj-G$_1aW3Zd9@8GjSuFzzc5^aTxOr^*tbsU-5%Cy-M;5_Ojt{ zXn2ooF&SS9(;0a6uO8x^-78Byml_}u;sv|2*uOrxG_bdPdhem5Cr%w7nl`G+_yt-bihkO_9Y-M~V zoSd(Xx2pA8cnPn)g{^ayR#>adLAcA+W~&)iYaw3lllMyH^*33Va1mA=RP~v3x6@pI z+PxLn#5Z|eeT*;mfmb&r!QHKMulIrP)((E`(_novax_deploy_data: DeployData, _novax_executor: &mut Executor, gas_limit: u64, #function_inputs) -> Result<(Address, CallResult<#function_native_outputs>), NovaXError> { + pub async fn #function_name(_novax_deploy_data: DeployData, _novax_executor: &mut Executor, _novax_gas_limit: u64, #function_inputs) -> Result<(Address, CallResult<#function_native_outputs>), NovaXError> { let mut _novax_contract = #contract_info_ident::new(&multiversx_sc::types::Address::from(<[u8;32]>::default())); #endpoint_args_let_statements - let _novax_code_bytes = _novax_deploy_data.code.into_bytes_value().await?; - - todo!(); - - /* - let mut _novax_deploy_step = ScDeployStep::new() - .call(_novax_contract.init(#(#endpoint_args_inputs), *)) - .gas_limit(gas_limit) - .code(_novax_code_bytes) - .code_metadata(_novax_deploy_data.metadata); - - let _novax_should_skip_deserialization = async { - _novax_executor.sc_deploy(&mut _novax_deploy_step).await?; - - Result::Ok::(_novax_executor.should_skip_deserialization().await) - }.await?; - - let (_novax_new_address, _novax_result, _novax_response) = { - let mut result = None; - let mut opt_response = None; - let mut new_address = multiversx_sc::types::Address::from(<[u8;32]>::default()); - if !_novax_should_skip_deserialization { - if let Result::Ok(_novax_parsed_result) = _novax_deploy_step.result::<#function_managed_outputs>() { - let _novax_response = _novax_deploy_step.response().clone(); - new_address = _novax_response.new_deployed_address.clone().unwrap(); - result = Some(_novax_parsed_result); - opt_response = Some(_novax_response); - } - } + let mut _novax_bytes_args: std::vec::Vec> = vec![]; + #(#endpoint_args_inputs) * - (Address::from(new_address), result, opt_response.unwrap_or_else(|| TxResponse::default())) - }; - - - let mut _novax_call_result = CallResult { - response: _novax_response, - result: _novax_result.to_native() - }; - - Result::Ok((_novax_new_address, _novax_call_result)) + let _novax_code_bytes = _novax_deploy_data.code.into_bytes_value().await?; - */ + _novax_executor.sc_deploy::<#function_managed_outputs>( + _novax_code_bytes, + _novax_deploy_data.metadata, + num_bigint::BigUint::from(0u8), // TODO + _novax_bytes_args, + _novax_gas_limit + ) + .await + .map_err(NovaXError::from) } }; diff --git a/core/src/code/bytes.rs b/core/src/code/bytes.rs index 9e5f8a9..a22f455 100644 --- a/core/src/code/bytes.rs +++ b/core/src/code/bytes.rs @@ -16,5 +16,5 @@ pub trait AsBytesValue { /// /// A `Result` wrapping a `BytesValue` if the conversion is successful, or an `Err` wrapping /// a `NovaXError` if the conversion fails. - async fn into_bytes_value(self) -> Result; + async fn into_bytes_value(self) -> Result, NovaXError>; } diff --git a/core/src/code/file.rs b/core/src/code/file.rs index f1d2e2e..c4b39c3 100644 --- a/core/src/code/file.rs +++ b/core/src/code/file.rs @@ -16,10 +16,9 @@ impl AsBytesValue for &FileCode { /// # Errors /// /// Returns a `CodeError` wrapped in a `NovaXError` if the file cannot be read. - async fn into_bytes_value(self) -> Result { - let Ok(bytes) = read(&self.0) else { return Err(CodeError::UnableToReadCodeFromFile.into()) }; - - Ok(BytesValue::from(bytes)) + async fn into_bytes_value(self) -> Result, NovaXError> { + read(&self.0) + .map_err(|_| CodeError::UnableToReadCodeFromFile.into()) } } @@ -34,7 +33,7 @@ impl AsBytesValue for &str { /// # Errors /// /// Returns a `CodeError` wrapped in a `NovaXError` if the file cannot be read. - async fn into_bytes_value(self) -> Result { + async fn into_bytes_value(self) -> Result, NovaXError> { FileCode(Path::new(self).to_path_buf()).into_bytes_value().await } } \ No newline at end of file diff --git a/executor/src/base/deploy.rs b/executor/src/base/deploy.rs index b685ac2..b144e8a 100644 --- a/executor/src/base/deploy.rs +++ b/executor/src/base/deploy.rs @@ -1,9 +1,14 @@ use std::sync::Arc; use async_trait::async_trait; use multiversx_sc::codec::TopEncodeMulti; +use multiversx_sc::types::CodeMetadata; use multiversx_sc_scenario::scenario_model::TypedScDeploy; +use num_bigint::BigUint; use tokio::sync::Mutex; +use novax_data::{Address, NativeConvertible}; +use crate::call_result::CallResult; use crate::error::executor::ExecutorError; +use crate::TopDecodeMulti; /// A trait defining the contract for executing smart contract deployment operations asynchronously. #[async_trait] @@ -24,9 +29,18 @@ pub trait DeployExecutor: Send + Sync { /// # Returns /// /// A `Result` with an empty `Ok(())` value for success, or `Err(ExecutorError)` for failure. - async fn sc_deploy(&mut self, sc_deploy_step: &mut TypedScDeploy) -> Result<(), ExecutorError> + async fn sc_deploy< + OutputManaged + >( + &mut self, + bytes: Vec, + code_metadata: CodeMetadata, + egld_value: BigUint, + arguments: Vec>, + gas_limit: u64 + ) -> Result<(Address, CallResult), ExecutorError> where - OriginalResult: TopEncodeMulti + Send + Sync; + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; /// Indicates whether to skip deserialization during the deployment execution. /// @@ -36,7 +50,7 @@ pub trait DeployExecutor: Send + Sync { /// # Returns /// /// A `bool` indicating whether deserialization should be skipped. - async fn should_skip_deserialization(&self) -> bool; + async fn should_skip_deserialization(&self) -> bool; // TODO: remove } /// An implementation of `DeployExecutor` for `Arc>` where `T: DeployExecutor`. @@ -44,13 +58,22 @@ pub trait DeployExecutor: Send + Sync { #[async_trait] impl DeployExecutor for Arc> { /// Executes a smart contract deployment step asynchronously, delegating to the inner `DeployExecutor`. - async fn sc_deploy(&mut self, sc_deploy_step: &mut TypedScDeploy) -> Result<(), ExecutorError> + async fn sc_deploy< + OutputManaged + >( + &mut self, + bytes: Vec, + code_metadata: CodeMetadata, + egld_value: BigUint, + arguments: Vec>, + gas_limit: u64 + ) -> Result<(Address, CallResult), ExecutorError> where - OriginalResult: TopEncodeMulti + Send + Sync, + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { { let mut locked = self.lock().await; - locked.sc_deploy(sc_deploy_step).await + locked.sc_deploy::(bytes, code_metadata, egld_value, arguments, gas_limit).await } } diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index 6e5cb7a..fcc2050 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -2,7 +2,7 @@ use std::mem; use async_trait::async_trait; use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; -use multiversx_sc::imports::{Tx, TxScEnv}; +use multiversx_sc::imports::{CodeMetadata, Tx, TxScEnv}; use multiversx_sc_scenario::imports::{AddressValue, Bech32Address}; use multiversx_sc_scenario::scenario_model::{ScDeployStep, TypedScDeploy}; use num_bigint::BigUint; @@ -122,12 +122,22 @@ impl TransactionExecutor for DummyExecutor { } #[async_trait] -impl DeployExecutor for DummyExecutor { +impl DeployExecutor for DummyExecutor { /// Captures the smart contract deployment details. - async fn sc_deploy(&mut self, sc_deploy_step: &mut TypedScDeploy) -> Result<(), ExecutorError> + async fn sc_deploy< + OutputManaged + >( + &mut self, + bytes: Vec, + code_metadata: CodeMetadata, + egld_value: BigUint, + arguments: Vec>, + gas_limit: u64 + ) -> Result<(Address, CallResult), ExecutorError> where - OriginalResult: TopEncodeMulti + Send + Sync, + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { + /* let mut owned_sc_deploy_step = mem::replace(sc_deploy_step, ScDeployStep::new().into()); if let Some(caller) = &self.caller { @@ -137,6 +147,10 @@ impl DeployExecutor for DummyExecutor { self.tx = Some(owned_sc_deploy_step.sc_deploy_step); Ok(()) + + */ + + todo!() } /// Indicates that deserialization should be skipped as there is no actual execution. diff --git a/executor/src/error/transaction.rs b/executor/src/error/transaction.rs index b982368..27e719c 100644 --- a/executor/src/error/transaction.rs +++ b/executor/src/error/transaction.rs @@ -12,6 +12,7 @@ pub enum TransactionError { FailedToSendTheTransaction { message: String }, NoSmartContractResult, CannotDecodeSmartContractResult, + NoSCDeployLogInTheResponse, CannotEncodeString { string: String }, CannotEncodeU64 { value: u64 }, CannotEncodeTransfer, diff --git a/executor/src/lib.rs b/executor/src/lib.rs index 5e19b4b..5b9e806 100644 --- a/executor/src/lib.rs +++ b/executor/src/lib.rs @@ -79,6 +79,8 @@ pub use network::transaction::models::transaction_on_network::TransactionOnNetwo pub use network::transaction::models::transaction_on_network::TransactionOnNetwork; pub use network::transaction::models::transaction_on_network::TransactionOnNetworkTransaction; pub use network::transaction::models::transaction_on_network::TransactionOnNetworkTransactionSmartContractResult; +pub use network::transaction::models::transaction_on_network::TransactionOnNetworkTransactionLogs; +pub use network::transaction::models::transaction_on_network::TransactionOnNetworkTransactionLogsEvents; pub use mocking::executor::StandardMockExecutor; pub use mocking::executor::MockExecutor; diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index 633b2a7..87fcff6 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -4,6 +4,7 @@ use std::sync::Arc; use async_trait::async_trait; use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; +use multiversx_sc::imports::CodeMetadata; use num_bigint::BigUint; use tokio::sync::Mutex; @@ -148,10 +149,20 @@ impl DeployExecutor for MockExecutor /// /// A `Result` with an empty `Ok(())` value indicating success, or an `Err(ExecutorError)` indicating failure, /// specifically a `MockDeployError::WalletAddressNotPresent` error if the wallet address is not present. - async fn sc_deploy(&mut self, sc_deploy_step: &mut TypedScDeploy) -> Result<(), ExecutorError> + async fn sc_deploy< + OutputManaged + >( + &mut self, + bytes: Vec, + code_metadata: CodeMetadata, + egld_value: BigUint, + arguments: Vec>, + gas_limit: u64 + ) -> Result<(Address, CallResult), ExecutorError> where - OriginalResult: TopEncodeMulti + Send + Sync, + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { + /* let caller: Address = { let Some(caller) = self.opt_caller.as_deref() else { return Err(ExecutorError::MockDeploy(MockDeployError::WalletAddressNotPresent)) @@ -171,6 +182,10 @@ impl DeployExecutor for MockExecutor } Ok(()) + + */ + + todo!() } /// Specifies whether deserialization should be skipped during the deployment execution. diff --git a/executor/src/network/transaction/executor.rs b/executor/src/network/transaction/executor.rs index a1399bf..c582cb9 100644 --- a/executor/src/network/transaction/executor.rs +++ b/executor/src/network/transaction/executor.rs @@ -2,8 +2,10 @@ use std::fmt::{Debug, Formatter}; use std::marker::PhantomData; use async_trait::async_trait; -use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; -use multiversx_sc_scenario::scenario_model::TypedScDeploy; +use multiversx_sc::codec::{TopDecodeMulti, TopEncode}; +use multiversx_sc::imports::{CodeMetadata, ManagedBuffer}; +use multiversx_sc_scenario::api::StaticApi; +use multiversx_sc_scenario::multiversx_chain_vm::crypto_functions::keccak256; use num_bigint::BigUint; use novax_data::{Address, NativeConvertible}; @@ -14,8 +16,9 @@ use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::error::transaction::TransactionError; use crate::network::transaction::interactor::{BlockchainInteractor, Interactor}; +use crate::network::transaction::models::transaction_on_network::{TransactionOnNetworkTransactionLogs, TransactionOnNetworkTransactionLogsEvents}; use crate::network::utils::wallet::Wallet; -use crate::{TransactionOnNetwork, TransactionOnNetworkTransactionSmartContractResult}; +use crate::TransactionOnNetworkTransactionSmartContractResult; use crate::utils::transaction::normalization::NormalizationInOut; use crate::utils::transaction::token_transfer::TokenTransfer; @@ -112,10 +115,16 @@ impl TransactionExecutor for BaseTransactionNe ) .await?; + let function_name = if function.is_empty() { + None + } else { + Some(function) + }; + let normalized = NormalizationInOut { sender: self.wallet.get_address().to_bech32_string()?, receiver: to.to_bech32_string()?, - function_name: function, + function_name, arguments, egld_value, esdt_transfers, @@ -173,11 +182,48 @@ impl DeployExecutor for BaseTransactionNetwork /// # Returns /// /// A `Result` with an empty `Ok(())` value indicating success, or an `Err(ExecutorError)` indicating failure. - async fn sc_deploy(&mut self, sc_deploy_step: &mut TypedScDeploy) -> Result<(), ExecutorError> + async fn sc_deploy< + OutputManaged + >( + &mut self, + bytes: Vec, + code_metadata: CodeMetadata, + egld_value: BigUint, + mut arguments: Vec>, + gas_limit: u64 + ) -> Result<(Address, CallResult), ExecutorError> where - OriginalResult: TopEncodeMulti + Send + Sync, + OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - todo!() + let mut encoded_metadata: ManagedBuffer = ManagedBuffer::new(); + _ = code_metadata.top_encode(&mut encoded_metadata).unwrap(); + + let built_in_arguments: Vec> = vec![ + bytes, + vec![5, 0], // VM type: WASM + encoded_metadata.to_boxed_bytes().into_vec() + ]; + + let mut all_arguments = built_in_arguments; + all_arguments.append(&mut arguments); + + let deploy_result = self.sc_call::( + &Address::from_bytes([0u8; 32]), + "".to_string(), + all_arguments, + gas_limit, + egld_value, + vec![] + ) + .await?; + + let Some(sc_deploy_event) = find_sc_deploy_event(&deploy_result.response.transaction.logs.events) else { + return Err(TransactionError::NoSCDeployLogInTheResponse.into()) + }; + + let deployed_address = Address::from_bech32_string(&sc_deploy_event.address)?; + + Ok((deployed_address, deploy_result)) } /// Specifies whether deserialization should be skipped during the deployment execution. @@ -191,6 +237,12 @@ impl DeployExecutor for BaseTransactionNetwork } } +fn find_sc_deploy_event(logs: &[TransactionOnNetworkTransactionLogsEvents]) -> Option { + logs.iter() + .find(|event| event.identifier == "SCDeploy") + .cloned() +} + fn find_smart_contract_result(opt_sc_results: &Option>) -> Option>> { let Some(sc_results) = opt_sc_results else { return None diff --git a/executor/src/network/transaction/interactor.rs b/executor/src/network/transaction/interactor.rs index 974abfd..6157675 100644 --- a/executor/src/network/transaction/interactor.rs +++ b/executor/src/network/transaction/interactor.rs @@ -4,10 +4,11 @@ use multiversx_sc_scenario::scenario_model::ScDeployStep; use num_bigint::BigUint; use reqwest::Client; -use novax_data::Address; +use novax_data::{Address, NativeConvertible}; +use crate::call_result::CallResult; use crate::error::transaction::TransactionError; -use crate::ExecutorError; +use crate::{ExecutorError, TopDecodeMulti}; use crate::network::models::address::info::AddressGatewayInfoAccount; use crate::network::models::network::config::NetworkGatewayConfig; use crate::network::transaction::models::send_request::TransactionSendRequest; @@ -29,29 +30,6 @@ pub trait BlockchainInteractor: Sized + Send + Sync { data: String, gas_limit: u64 ) -> Result; - - /// Deploys a smart contract on the blockchain. - /// - /// The `sc_deploy` method takes a `sc_deploy_step` parameter that encapsulates the information required - /// for deploying a smart contract. The method is asynchronous and requires the [`tokio`] runtime, ensuring non-blocking - /// operation and concurrency where needed. - /// - /// # Type Parameters - /// - `S`: A type that implements [`AsMut`] trait, allowing for a mutable reference to an [`ScDeployStep`] instance to be obtained. - /// - /// # Parameters - /// - `&mut self`: A mutable reference to the current [`BlockchainInteractor`] instance. - /// - `sc_deploy_step`: The smart contract deployment step encapsulating the necessary information for deployment. - /// - /// # Returns - /// The method returns a [`Result`] indicating the success or failure of the operation. Successful operations - /// will return `Ok(())` while failures will return `Err(BlockchainInteractorError)`. - /// - /// # Errors - /// Any errors that occur during the execution of this method will be encapsulated in a [`BlockchainInteractorError`] and returned. - async fn sc_deploy(&mut self, sc_deploy_step: S) - where - S: AsMut + Send; } pub struct Interactor { @@ -138,15 +116,15 @@ impl BlockchainInteractor for Interactor { data: String, gas_limit: u64 ) -> Result { - let receiver_info = self.get_account_info().await?; - let receiver_address = receiver_info.address; - let nonce = receiver_info.nonce; // TODO: +1? + let sender_info = self.get_account_info().await?; + let sender_address = sender_info.address; + let nonce = sender_info.nonce; // TODO: +1? let transaction_request = self.get_sendable_transaction( nonce, value.to_string(), - receiver_address, to, + sender_address, self.network_config.config.erd_min_gas_price, gas_limit, data, @@ -164,8 +142,8 @@ impl BlockchainInteractor for Interactor { self.wait_for_execution(&tx_hash).await } +} - async fn sc_deploy(&mut self, sc_deploy_step: S) where S: AsMut + Send { - todo!() - } +fn encode_code_bytes(bytes: &[u8]) -> String { + hex::encode(bytes) } \ No newline at end of file diff --git a/executor/src/network/transaction/models/transaction_on_network.rs b/executor/src/network/transaction/models/transaction_on_network.rs index 59b79fc..09e76d4 100644 --- a/executor/src/network/transaction/models/transaction_on_network.rs +++ b/executor/src/network/transaction/models/transaction_on_network.rs @@ -19,6 +19,7 @@ pub struct TransactionOnNetworkTransaction { pub gas_used: u64, pub smart_contract_results: Option>, pub status: String, + pub logs: TransactionOnNetworkTransactionLogs } #[derive(Deserialize, Clone, Default)] @@ -29,6 +30,22 @@ pub struct TransactionOnNetworkTransactionSmartContractResult { pub data: String, } +#[derive(Deserialize, Clone, Default)] +#[serde(rename_all = "camelCase")] +pub struct TransactionOnNetworkTransactionLogs { + pub address: String, + pub events: Vec +} + +#[derive(Deserialize, Clone, Default)] +#[serde(rename_all = "camelCase")] +pub struct TransactionOnNetworkTransactionLogsEvents { + pub address: String, + pub identifier: String, + pub topics: Vec, + pub data: String +} + impl TransactionOnNetwork { pub fn is_success(&self) -> bool { true // TODO diff --git a/executor/src/utils/transaction/normalization.rs b/executor/src/utils/transaction/normalization.rs index 594d1fc..c2ac976 100644 --- a/executor/src/utils/transaction/normalization.rs +++ b/executor/src/utils/transaction/normalization.rs @@ -7,7 +7,7 @@ use crate::error::transaction::TransactionError; pub struct NormalizationInOut { pub sender: String, pub receiver: String, - pub function_name: String, + pub function_name: Option, pub arguments: Vec>, pub egld_value: BigUint, pub esdt_transfers: Vec @@ -28,17 +28,15 @@ impl NormalizationInOut { let is_fungible = transfer.nonce == 0; let (encoded_identifier, encoded_nonce, encoded_amount) = encode_transfer(transfer)?; - let encoded_function_name = encode_string(&self.function_name)?; - let (receiver, function_name, built_in_args) = if is_fungible { + let (receiver, function_name, mut built_in_args) = if is_fungible { let function_name = "ESDTTransfer".to_string(); let built_in_args = vec![ encoded_identifier, - encoded_amount, - encoded_function_name + encoded_amount ]; - (self.receiver, function_name, built_in_args) + (self.receiver, Some(function_name), built_in_args) } else { let function_name = "ESDTNFTTransfer".to_string(); let built_in_args = vec![ @@ -46,12 +44,17 @@ impl NormalizationInOut { encoded_nonce, encoded_amount, Address::from_bech32_string(&self.receiver)?.to_bytes().to_vec(), - encoded_function_name ]; - (self.sender.clone(), function_name, built_in_args) + (self.sender.clone(), Some(function_name), built_in_args) }; + if let Some(function_name) = self.function_name { + let encoded_function_name = encode_string(&function_name)?; + + built_in_args.push(encoded_function_name); + } + let mut args = built_in_args; args.append(&mut self.arguments); @@ -77,8 +80,12 @@ impl NormalizationInOut { built_in_args.push(encoded_nonce); built_in_args.push(encoded_amount); } - - built_in_args.push(encode_string(&self.function_name)?); + + if let Some(function_name) = self.function_name { + let encoded_function_name = encode_string(&function_name)?; + + built_in_args.push(encoded_function_name); + } let mut args = built_in_args; args.append(&mut self.arguments); @@ -86,7 +93,7 @@ impl NormalizationInOut { NormalizationInOut { sender: self.sender.clone(), receiver: self.sender, - function_name: "MultiESDTNFTTransfer".to_string(), + function_name: Some("MultiESDTNFTTransfer".to_string()), arguments: args, egld_value: BigUint::from(0u8), esdt_transfers: vec![], @@ -97,7 +104,11 @@ impl NormalizationInOut { } pub fn get_transaction_data(self) -> String { - let mut args_string = vec![self.function_name]; + let mut args_string = vec![]; + + if let Some(function_name) = self.function_name { + args_string.push(function_name) + } for arg in self.arguments { args_string.push(hex::encode(arg)); diff --git a/tester/core/tests/dummy_deploy.rs b/tester/core/tests/dummy_deploy.rs index a3555b0..cf292ab 100644 --- a/tester/core/tests/dummy_deploy.rs +++ b/tester/core/tests/dummy_deploy.rs @@ -41,7 +41,7 @@ async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { data: "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f0060017e006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e029c072603656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564001103656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c0008038c018a010c0002050201020b02010114010303010403020102060202051503070908040d0205060101060702020204030103000001020301010301160303050107060108090608080201040102050a0901070803020201070101060c0217050d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005030100030616037f01418080080b7f0041f0d2080b7f0041f0d2080b07a10a34066d656d6f7279020004696e69740082010667657453756d008301036164640084011372657475726e4e667450726f706572746965730085011772657475726e4e6674456e756d50726f706572746965730086011d72657475726e4e6674456e756d4669656c647350726f706572746965730087011572657475726e46756e6769626c6542616c616e63650088011872657475726e4e6f6e46756e6769626c6542616c616e6365008901156e6f4172674e6f52657475726e456e64706f696e74008a010c72657475726e43616c6c6572008b011372657475726e4d616e61676564427566666572008c011572657475726e436f6e747261637441646472657373008d010d72657475726e42696775696e74008e010872657475726e5538008f010972657475726e5531360090010972657475726e5533320091010972657475726e5536340092010c72657475726e5533325665630093010c72657475726e5536345665630094010f72657475726e4275666665725665630095011072657475726e42696775696e745665630096010c72657475726e54776f5536340097011072657475726e54776f427566666572730098012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740099011472657475726e446f75626c654f66553634417267009a011872657475726e446f75626c654f6642696775696e74417267009b011772657475726e417070656e646564427566666572417267009c011772657475726e53756d54776f42696775696e7441726773009d011b72657475726e436f6e6361744d756c746942756666657241726773009e011572657475726e53756d4d756c746955363441726773009f011972657475726e53756d4d756c746942696775696e744172677300a0011272657475726e437573746f6d53747275637400a1011572657475726e437573746f6d53747275637441726700a2012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a3012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a4011072657475726e437573746f6d456e756d00a5011372657475726e437573746f6d456e756d41726700a6011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a7012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a8011d72657475726e437573746f6d456e756d576974684669656c647341726700a9011372657475726e4d756c746956616c756554776f00aa011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400ab012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00ac01396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00ad013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ae010863616c6c4261636b00af011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a7012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a8011d72657475726e437573746f6d456e756d5769746856616c75657341726700a9010a5f5f646174615f656e6403010b5f5f686561705f6261736503020aee498a012e000240200120024d0440200220044d0d011027000b1027000b2000200220016b3602042000200120036a3602000b0b0041808408410e1000000b1301017f102922012000ad42ff0183100120010b1901017f419084084190840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102c21022001102d210320002001102e36020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1043000b200128020c2000200220036a360200200141106a24000b3002017f017e230041106b22012400200142003703082000200141086a22004108104c20004108107f200141106a24000b08002000102c103c0b1d00200028020820011030200029030020011031200028020c200110320baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410620240024020012d000404402000100722044190ce0041a4d20828020022036b4b0d0120022003200320046a22011079200041002002280200200228020410661a41a4d20820013602000c020b20012802002000106b0c010b2001107520012802002000106b0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081062200241106a24000b0a002000103d200110300b3601027f230041106b22012400200141086a103420012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41a8d2082d0000220245044041a8d20841013a000041a4d2084100360200200141086a410010722001280208200128020c418084084100107410470c010b41808408410010440b360200200020024101733a0004200141106a24000b0b0020002001103610041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1075200228020820022d000c044041a4d208410036020041a8d20841003a00000b200241106a24000b0a0020004100103810390b0d00200010292200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103b103c0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0d00200010292200101a1a20000b0f01017f10292201200010191a20010b0c01017f10292200100520000b4c01037f103e210310292102200041feffffff074604402003104041b0d2082002100620020f0b20001007210420031040200041d0d20810081a41b0d20841d0d208200420012002100920020b0b00200041b0d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210421a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210244100470b2e01017f41ed800841171044220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f1029220220002001100c1a20020b0c00200020012002104b10100b2e01017f104721010340200028020041acd2082802004e4504402001200041f083084104104810490c010b0b20010b1301017f10292200418084084100100c1a20000b0c00200020012002104b10380b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bb80102027e027f027f0240200141a183084106104b101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041acd2082802004e04401047210441010c010b200141a1830841061048210441010b0c020b41a18308410641a68008410e1043000b200141a183084106104522024280808080708321032002a72104200141a1830841061045210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b2f01017f2000280200220341acd2082802004e0440200120024187810841111043000b2000200341016a36020020030b3100200041086a2000280200200120021071044041dd8308410341d88108410f1043000b2000200028020020026a3602000b2a01027f2000106a210110472102037f2001047f20022000102d1070200141016b21010c010520020b0b0b2a01027f2000106a210110472102037f2001047f20022000102c1049200141016b21010c010520020b0b0b0c00200010292200101120000b2101017f41001038220210074120470440200020014187820841101043000b20020b1900200041acd2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101320004604400f0b41aa810841191000000b190041acd20828020041004e04400f0b4187810841111000000b0b0041acd20810133602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010074102760b5501027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280210200141086a22021059200041146a2002105a20002002102f200128020820012d000c1035200141106a24000baf0102017e047f230041106b22032400200010074103762001106120001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810661a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011031200621040c010b0b0b5b01027f230041206b220224002000280200220310572001106120022003100736021820024100360214200220003602100340200241086a200241106a107a20022802080440200228020c200110300c0105200241206a24000b0b0bb00101027f230041206b2201240002402000280200450440200141086a1033200120012d000c3a001c200120012802083602184100200141186a2202105c2000280204200210302000290310200210312000280208200210320c010b200141106a1033200120012d00143a001c200120012802103602184101200141186a2202105c200028020420021059200041086a2002105a200041106a2002102f0b200128021820012d001c1035200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011062200241106a24000b0a0020001014200110140b5801027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280208200141086a22021030200029030020021031200028020c20021032200128020820012d000c1035200141106a24000b7e01057f230041106b2201240020002802102203044010602001103420012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210612002200320051062200041186a2002105a200128020820012d000c103610151a0b200028020020002802042000280208200028020c1025000b1b01027f10292200101641c38108410a10442201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041062200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041a4d20828020022046b2002490d01200341086a2004200220046a220010792003280208200328020c20012002107441a4d20820003602000c020b200028020020012002100e1a0c010b20001075200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061065200141002002280208200228020c10661a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021026200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310420b3502017f017e230041106b220324002003410036020c20002003410c6a2200410420012002107d20004104107f200341106a2400a70b1f0020012002200310022201101c21022000200136020420002002453602000b1600200020011044220020022003100e1a2000100f000b3102017f017e230041106b220124002001410036020c20002001410c6a22004104104c20004104107f200141106a2400a70b09002000200110031a0b0c00200020002001101720000b0a0020002000200110180b1801017f10292101417242121001200120004172101b20010b0e01017f102922004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141a8d2082d00000d0141a4d208200636020041a8d20841013a0000200441086a20061072200541002004280208200428020c10661a200041013a00080b4101200120036a220041a4d2082802004b0d011a20042001200010732002200320042802002004280204107441000c010b200041003a0008200520012002200310660b200441106a24000b3d01017f230041106b22022400200241086a419484084190ce0020011065200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d011027000b1027000b2000200220016b36020420002001419484086a3602000bb50201067f2001200346044020012203410f4b04402000410020006b41037122046a210520040440200221010340200020012d00003a0000200141016a2101200041016a22002005490d000b0b2005200320046b2203417c7122066a21000240200220046a22044103710440200641004c0d012004410374220141187121072004417c71220841046a2102410020016b4118712109200828020021010340200520012007762002280200220120097472360200200241046a2102200541046a22052000490d000b0c010b200641004c0d0020042102034020052002280200360200200241046a2102200541046a22052000490d000b0b20034103712103200420066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b1027000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041a4d208280200107320002802002001280208200128020c100e1a41a4d208410036020041a8d20841003a00000b200141106a24000b0d00200010292200101d1a20000b080020001076103c0b0b0020002001103d10151a0b3f01017f230041106b22032400200341086a20012002419484084190ce001026200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410661a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c10442101200010473602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041066450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102a200341106a24000f0b200120024187810841111043000b2f00200041086a200028020020012002107104402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107d20012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a0041fc8308410310440b6802027f017e230041106b22032400200020012002107c21002003420037030820001007220441094f04402001200241a68008410e1043000b2003200341086a41082004106520004100200328020022002003280204220110421a20002001107f200341106a24000b1701017f101e410110534100104f2100108001200010780b0f00101e410010531080011077101f0b2301037f101e410110534100104f21001080012201107722022000106d2001200210780bc10101037f230041406a22002400101e4100105341c88308410a10442101200041086a103e20011041200041286a22022000280214102a1039200241e781084120103b21012002103a2102200028022c2000280228460440200041386a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602082001200041086a22011030200220011032200028020820002d000c1035200041406b24000f0b41e78108412041a68008410e1069000ba00202037f017e230041406a22002400101e4100105341c88308410a10442101200041086a103e200110410240024002402000280214102a220110070440200041286a220220011039410121010240024002402002107e41ff01710e020201000b41e78108412041808008410d1069000b200041286a220141e781084120103bad2001103aad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041a4d208410036020041a8d20841003a00000b2001450d010b420010140c010b20001033200020002d00043a000c200020002802003602084101200041086a2201105c2003a7200110302003422088a720011032200028020820002d000c10350b200041406b24000f0b41e78108412041a68008410e1069000be50101047f230041406a22002400101e4100105341c88308410a10442101200041086a103e20011041200041286a22012000280214102a103902402001107e41ff0171450440200041286a220241e781084120103b2002103a2103200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602084100200041086a2202105c20021030200320021032200028020820002d000c1035200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b1600101e4100105341d28308410b10444200103f101f0b1600101e4100105341c88308410a10444206103f101f0b0800101e410010530b1501017f101e41001053102922001020200010041a0b1300101e4100105341c483084104104410041a0b1300101e4101105341e083084110105010041a0b1000101e41001053410a1028106e101f0b0c00101e41001053420310140b0d00101e4100105342f40310140b0e00101e4100105342c09a0c10140b1000101e410010534280b4c4c32110140b1f01017f101e4100105310472200410a1049200041c09a0c1049200010041a0b2101017f101e4100105310472200420a107020004280b4c4c3211070200010041a0b9e0101027f230041306b22002400101e410010531047220141ba8308410510441049200141bf830841051044104920002001360214200041086a1033200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107a200028020004402000280204200041186a10300c010b0b200028021820002d001c1035200041306a24000bbc0101057f230041206b22002400101e4100105310472202410a1028106e10492002410a1028106e41021028106c1049200041086a1033200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410421a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1032200421010c010b0b200028021020002d00141035200041206a24000b1200101e41001053420a4280b4c4c321105d0b2401027f101e4100105341ba83084105104441bf830841051044210110041a200110041a0b2901027f101e4100105341ba830841051044410a1028106e210110041a4280b4c4c32110142001101f0b1100101e410110534100101042018610140b1a01017f101e410110534100104f2100410210282000106c101f0b2001017f101e4101105341001038220041c483084104104410031a200010041a0b1c01017f101e410210534100104f220020004101104f10182000101f0b6201037f230041106b22002400101e105510542000410036020020001046210220002802001051104721012000200210560340200028020820002802044f4504402001200041f483084108107c102a10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400101e1055105420004100360200200010462101200028020010512000200110560340200028020820002802044f450440200041f48308410810810120027c21020c010b0b20021014200041106a24000b6001037f230041106b22002400101e105510542000410036020020001046210220002802001051106f21012000200210560340200028020820002802044f4504402001200041f483084108107c103c106d0c010b0b2001101f200041106a24000b4501027f230041106b22002400101e4100105341c483084104104421012000410a1028106e36020c20004280b4c4c321370300200020013602082000105e200041106a24000b9f0102047f017e230041106b22002400101e41011053230041206b22012400200141086a220210372002102c21032002102d21042002102e21020240200128020c2001280208460440200141186a2d0000044041a4d208410036020041a8d20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1043000b2000105e200041106a24000b860101057f230041206b22002400101e4100105341c48308410410442103410a1028106e210410472201420a107020014280b4c4c32110701047220241ba8308410510441049200241bf83084105104410492000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1058200041206a24000bba0101067f230041206b22032400101e41011053200341086a2101230041306b22002400200041086a220210372002104d21042002104e2105200041206a2002102b0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1043000b20011058200341206a24000b0c00101e41001053420110140b5f02017f017e101e41011053027f024002404100101204404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1043000b41dd8308410341808008410d1043000bad42ff018310140b5001037f230041206b22002400101e4100105341c48308410410442101410a1028106e210220004280b4c4c3213703102000200136020420002002360208200041003602002000105b200041206a24000b900101057f230041206b22002400101e4100105341c48308410410442103410a1028106e210410472201420a107020014280b4c4c32110701047220241ba8308410510441049200241bf83084105104410492000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105b200041206a24000b970202057f027e230041206b22012400101e41011053230041306b22002400200041086a22021037200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1043000b200041086a2202102c21042002102d21062002102e21020c010b200041086a2203104d21042003104e2102200041206a2003102b2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1043000b2001105b200141206a24000baf0102037f047e230041306b22002400101e105510542000410036022c200041086a21012000412c6a220228020041acd2082802004e047e420105200241dd8308410310452103200241dd8308410310452104200241dd830841031045210542000b210620012005370318200120043703102001200337030820012006370300200028022c10512000290308500440200029031820002903202104200029031010141014200410140b200041306a24000b8e0102037f017e230041406a22002400101e41011053200041a783084107105036020c200041106a2000410c6a107b106f210120002903102203427f510440102121030b10292102200320002802182001200028021c2000280220200210221a1023200041306a220120021056200141cd8108410b108101200041306a41cd8108410b108101105d200041406b24000b5701027f230041406a22002400101e41011053200041a783084107105036023c200041206a2000413c6a107b106f210120004100360210200020013602042000200029022c370308200020002802283602002000105f000b7402037f017e230041206b22002400101e41011053200041a783084107105036021c20002000411c6a107b106f210120002802082102200029020c2103200041186a1047360200200041146a411c360200200041e882083602102000200337030820002001360204200020023602002000105f000b7402037f017e230041206b22002400101e41011053200041a783084107105036021c20002000411c6a107b106f210120002802082102200029020c2103200041186a1047360200200041146a411d3602002000418483083602102000200337030820002001360204200020023602002000105f000bbd0302057f027e230041f0006b2200240002400240024010602204107622031007450d00200041286a22012003102a1039200141b480084119103b2102200141b48008411910672101104721030340200104402003200041286a41b480084119103b1049200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b416c418084084100100c1a2004416c10151a2000200210642000280220450d00200041286a200210642000280248450d000240200041286a41e88208411c1063450440200041286a41848308411d10630d014197820841361000000b105510542000410036026c200041d0006a2201200041ec006a104a200028026c10512000280250200029035821052000290360210620012003105610552000280254200028025810520d0320052006105d0c010b105510542000410036026c200041d0006a2201200041ec006a104a200028026c10512000280250200029035821052000290360210620012003105610552000280254200028025810520d0220052006105d0b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b0b89040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080ba103617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f6164647265737361726773766172206172677373756d0070616e6963206f6363757272656400419084080b049cffffff@0500@0000@05".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } @@ -73,7 +73,7 @@ async fn test_deploy_with_metadatas() -> Result<(), NovaXError> { data: "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f0060017e006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e029c072603656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564001103656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c0008038c018a010c0002050201020b02010114010303010403020102060202051503070908040d0205060101060702020204030103000001020301010301160303050107060108090608080201040102050a0901070803020201070101060c0217050d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005030100030616037f01418080080b7f0041f0d2080b7f0041f0d2080b07a10a34066d656d6f7279020004696e69740082010667657453756d008301036164640084011372657475726e4e667450726f706572746965730085011772657475726e4e6674456e756d50726f706572746965730086011d72657475726e4e6674456e756d4669656c647350726f706572746965730087011572657475726e46756e6769626c6542616c616e63650088011872657475726e4e6f6e46756e6769626c6542616c616e6365008901156e6f4172674e6f52657475726e456e64706f696e74008a010c72657475726e43616c6c6572008b011372657475726e4d616e61676564427566666572008c011572657475726e436f6e747261637441646472657373008d010d72657475726e42696775696e74008e010872657475726e5538008f010972657475726e5531360090010972657475726e5533320091010972657475726e5536340092010c72657475726e5533325665630093010c72657475726e5536345665630094010f72657475726e4275666665725665630095011072657475726e42696775696e745665630096010c72657475726e54776f5536340097011072657475726e54776f427566666572730098012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740099011472657475726e446f75626c654f66553634417267009a011872657475726e446f75626c654f6642696775696e74417267009b011772657475726e417070656e646564427566666572417267009c011772657475726e53756d54776f42696775696e7441726773009d011b72657475726e436f6e6361744d756c746942756666657241726773009e011572657475726e53756d4d756c746955363441726773009f011972657475726e53756d4d756c746942696775696e744172677300a0011272657475726e437573746f6d53747275637400a1011572657475726e437573746f6d53747275637441726700a2012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a3012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a4011072657475726e437573746f6d456e756d00a5011372657475726e437573746f6d456e756d41726700a6011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a7012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a8011d72657475726e437573746f6d456e756d576974684669656c647341726700a9011372657475726e4d756c746956616c756554776f00aa011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400ab012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00ac01396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00ad013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ae010863616c6c4261636b00af011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a7012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a8011d72657475726e437573746f6d456e756d5769746856616c75657341726700a9010a5f5f646174615f656e6403010b5f5f686561705f6261736503020aee498a012e000240200120024d0440200220044d0d011027000b1027000b2000200220016b3602042000200120036a3602000b0b0041808408410e1000000b1301017f102922012000ad42ff0183100120010b1901017f419084084190840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102c21022001102d210320002001102e36020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1043000b200128020c2000200220036a360200200141106a24000b3002017f017e230041106b22012400200142003703082000200141086a22004108104c20004108107f200141106a24000b08002000102c103c0b1d00200028020820011030200029030020011031200028020c200110320baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410620240024020012d000404402000100722044190ce0041a4d20828020022036b4b0d0120022003200320046a22011079200041002002280200200228020410661a41a4d20820013602000c020b20012802002000106b0c010b2001107520012802002000106b0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081062200241106a24000b0a002000103d200110300b3601027f230041106b22012400200141086a103420012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41a8d2082d0000220245044041a8d20841013a000041a4d2084100360200200141086a410010722001280208200128020c418084084100107410470c010b41808408410010440b360200200020024101733a0004200141106a24000b0b0020002001103610041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1075200228020820022d000c044041a4d208410036020041a8d20841003a00000b200241106a24000b0a0020004100103810390b0d00200010292200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103b103c0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0d00200010292200101a1a20000b0f01017f10292201200010191a20010b0c01017f10292200100520000b4c01037f103e210310292102200041feffffff074604402003104041b0d2082002100620020f0b20001007210420031040200041d0d20810081a41b0d20841d0d208200420012002100920020b0b00200041b0d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210421a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210244100470b2e01017f41ed800841171044220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f1029220220002001100c1a20020b0c00200020012002104b10100b2e01017f104721010340200028020041acd2082802004e4504402001200041f083084104104810490c010b0b20010b1301017f10292200418084084100100c1a20000b0c00200020012002104b10380b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bb80102027e027f027f0240200141a183084106104b101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041acd2082802004e04401047210441010c010b200141a1830841061048210441010b0c020b41a18308410641a68008410e1043000b200141a183084106104522024280808080708321032002a72104200141a1830841061045210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b2f01017f2000280200220341acd2082802004e0440200120024187810841111043000b2000200341016a36020020030b3100200041086a2000280200200120021071044041dd8308410341d88108410f1043000b2000200028020020026a3602000b2a01027f2000106a210110472102037f2001047f20022000102d1070200141016b21010c010520020b0b0b2a01027f2000106a210110472102037f2001047f20022000102c1049200141016b21010c010520020b0b0b0c00200010292200101120000b2101017f41001038220210074120470440200020014187820841101043000b20020b1900200041acd2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101320004604400f0b41aa810841191000000b190041acd20828020041004e04400f0b4187810841111000000b0b0041acd20810133602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010074102760b5501027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280210200141086a22021059200041146a2002105a20002002102f200128020820012d000c1035200141106a24000baf0102017e047f230041106b22032400200010074103762001106120001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810661a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011031200621040c010b0b0b5b01027f230041206b220224002000280200220310572001106120022003100736021820024100360214200220003602100340200241086a200241106a107a20022802080440200228020c200110300c0105200241206a24000b0b0bb00101027f230041206b2201240002402000280200450440200141086a1033200120012d000c3a001c200120012802083602184100200141186a2202105c2000280204200210302000290310200210312000280208200210320c010b200141106a1033200120012d00143a001c200120012802103602184101200141186a2202105c200028020420021059200041086a2002105a200041106a2002102f0b200128021820012d001c1035200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011062200241106a24000b0a0020001014200110140b5801027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280208200141086a22021030200029030020021031200028020c20021032200128020820012d000c1035200141106a24000b7e01057f230041106b2201240020002802102203044010602001103420012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210612002200320051062200041186a2002105a200128020820012d000c103610151a0b200028020020002802042000280208200028020c1025000b1b01027f10292200101641c38108410a10442201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041062200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041a4d20828020022046b2002490d01200341086a2004200220046a220010792003280208200328020c20012002107441a4d20820003602000c020b200028020020012002100e1a0c010b20001075200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061065200141002002280208200228020c10661a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021026200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310420b3502017f017e230041106b220324002003410036020c20002003410c6a2200410420012002107d20004104107f200341106a2400a70b1f0020012002200310022201101c21022000200136020420002002453602000b1600200020011044220020022003100e1a2000100f000b3102017f017e230041106b220124002001410036020c20002001410c6a22004104104c20004104107f200141106a2400a70b09002000200110031a0b0c00200020002001101720000b0a0020002000200110180b1801017f10292101417242121001200120004172101b20010b0e01017f102922004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141a8d2082d00000d0141a4d208200636020041a8d20841013a0000200441086a20061072200541002004280208200428020c10661a200041013a00080b4101200120036a220041a4d2082802004b0d011a20042001200010732002200320042802002004280204107441000c010b200041003a0008200520012002200310660b200441106a24000b3d01017f230041106b22022400200241086a419484084190ce0020011065200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d011027000b1027000b2000200220016b36020420002001419484086a3602000bb50201067f2001200346044020012203410f4b04402000410020006b41037122046a210520040440200221010340200020012d00003a0000200141016a2101200041016a22002005490d000b0b2005200320046b2203417c7122066a21000240200220046a22044103710440200641004c0d012004410374220141187121072004417c71220841046a2102410020016b4118712109200828020021010340200520012007762002280200220120097472360200200241046a2102200541046a22052000490d000b0c010b200641004c0d0020042102034020052002280200360200200241046a2102200541046a22052000490d000b0b20034103712103200420066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b1027000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041a4d208280200107320002802002001280208200128020c100e1a41a4d208410036020041a8d20841003a00000b200141106a24000b0d00200010292200101d1a20000b080020001076103c0b0b0020002001103d10151a0b3f01017f230041106b22032400200341086a20012002419484084190ce001026200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410661a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c10442101200010473602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041066450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102a200341106a24000f0b200120024187810841111043000b2f00200041086a200028020020012002107104402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107d20012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a0041fc8308410310440b6802027f017e230041106b22032400200020012002107c21002003420037030820001007220441094f04402001200241a68008410e1043000b2003200341086a41082004106520004100200328020022002003280204220110421a20002001107f200341106a24000b1701017f101e410110534100104f2100108001200010780b0f00101e410010531080011077101f0b2301037f101e410110534100104f21001080012201107722022000106d2001200210780bc10101037f230041406a22002400101e4100105341c88308410a10442101200041086a103e20011041200041286a22022000280214102a1039200241e781084120103b21012002103a2102200028022c2000280228460440200041386a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602082001200041086a22011030200220011032200028020820002d000c1035200041406b24000f0b41e78108412041a68008410e1069000ba00202037f017e230041406a22002400101e4100105341c88308410a10442101200041086a103e200110410240024002402000280214102a220110070440200041286a220220011039410121010240024002402002107e41ff01710e020201000b41e78108412041808008410d1069000b200041286a220141e781084120103bad2001103aad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041a4d208410036020041a8d20841003a00000b2001450d010b420010140c010b20001033200020002d00043a000c200020002802003602084101200041086a2201105c2003a7200110302003422088a720011032200028020820002d000c10350b200041406b24000f0b41e78108412041a68008410e1069000be50101047f230041406a22002400101e4100105341c88308410a10442101200041086a103e20011041200041286a22012000280214102a103902402001107e41ff0171450440200041286a220241e781084120103b2002103a2103200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602084100200041086a2202105c20021030200320021032200028020820002d000c1035200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b1600101e4100105341d28308410b10444200103f101f0b1600101e4100105341c88308410a10444206103f101f0b0800101e410010530b1501017f101e41001053102922001020200010041a0b1300101e4100105341c483084104104410041a0b1300101e4101105341e083084110105010041a0b1000101e41001053410a1028106e101f0b0c00101e41001053420310140b0d00101e4100105342f40310140b0e00101e4100105342c09a0c10140b1000101e410010534280b4c4c32110140b1f01017f101e4100105310472200410a1049200041c09a0c1049200010041a0b2101017f101e4100105310472200420a107020004280b4c4c3211070200010041a0b9e0101027f230041306b22002400101e410010531047220141ba8308410510441049200141bf830841051044104920002001360214200041086a1033200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107a200028020004402000280204200041186a10300c010b0b200028021820002d001c1035200041306a24000bbc0101057f230041206b22002400101e4100105310472202410a1028106e10492002410a1028106e41021028106c1049200041086a1033200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410421a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1032200421010c010b0b200028021020002d00141035200041206a24000b1200101e41001053420a4280b4c4c321105d0b2401027f101e4100105341ba83084105104441bf830841051044210110041a200110041a0b2901027f101e4100105341ba830841051044410a1028106e210110041a4280b4c4c32110142001101f0b1100101e410110534100101042018610140b1a01017f101e410110534100104f2100410210282000106c101f0b2001017f101e4101105341001038220041c483084104104410031a200010041a0b1c01017f101e410210534100104f220020004101104f10182000101f0b6201037f230041106b22002400101e105510542000410036020020001046210220002802001051104721012000200210560340200028020820002802044f4504402001200041f483084108107c102a10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400101e1055105420004100360200200010462101200028020010512000200110560340200028020820002802044f450440200041f48308410810810120027c21020c010b0b20021014200041106a24000b6001037f230041106b22002400101e105510542000410036020020001046210220002802001051106f21012000200210560340200028020820002802044f4504402001200041f483084108107c103c106d0c010b0b2001101f200041106a24000b4501027f230041106b22002400101e4100105341c483084104104421012000410a1028106e36020c20004280b4c4c321370300200020013602082000105e200041106a24000b9f0102047f017e230041106b22002400101e41011053230041206b22012400200141086a220210372002102c21032002102d21042002102e21020240200128020c2001280208460440200141186a2d0000044041a4d208410036020041a8d20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1043000b2000105e200041106a24000b860101057f230041206b22002400101e4100105341c48308410410442103410a1028106e210410472201420a107020014280b4c4c32110701047220241ba8308410510441049200241bf83084105104410492000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1058200041206a24000bba0101067f230041206b22032400101e41011053200341086a2101230041306b22002400200041086a220210372002104d21042002104e2105200041206a2002102b0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1043000b20011058200341206a24000b0c00101e41001053420110140b5f02017f017e101e41011053027f024002404100101204404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1043000b41dd8308410341808008410d1043000bad42ff018310140b5001037f230041206b22002400101e4100105341c48308410410442101410a1028106e210220004280b4c4c3213703102000200136020420002002360208200041003602002000105b200041206a24000b900101057f230041206b22002400101e4100105341c48308410410442103410a1028106e210410472201420a107020014280b4c4c32110701047220241ba8308410510441049200241bf83084105104410492000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105b200041206a24000b970202057f027e230041206b22012400101e41011053230041306b22002400200041086a22021037200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1043000b200041086a2202102c21042002102d21062002102e21020c010b200041086a2203104d21042003104e2102200041206a2003102b2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1043000b2001105b200141206a24000baf0102037f047e230041306b22002400101e105510542000410036022c200041086a21012000412c6a220228020041acd2082802004e047e420105200241dd8308410310452103200241dd8308410310452104200241dd830841031045210542000b210620012005370318200120043703102001200337030820012006370300200028022c10512000290308500440200029031820002903202104200029031010141014200410140b200041306a24000b8e0102037f017e230041406a22002400101e41011053200041a783084107105036020c200041106a2000410c6a107b106f210120002903102203427f510440102121030b10292102200320002802182001200028021c2000280220200210221a1023200041306a220120021056200141cd8108410b108101200041306a41cd8108410b108101105d200041406b24000b5701027f230041406a22002400101e41011053200041a783084107105036023c200041206a2000413c6a107b106f210120004100360210200020013602042000200029022c370308200020002802283602002000105f000b7402037f017e230041206b22002400101e41011053200041a783084107105036021c20002000411c6a107b106f210120002802082102200029020c2103200041186a1047360200200041146a411c360200200041e882083602102000200337030820002001360204200020023602002000105f000b7402037f017e230041206b22002400101e41011053200041a783084107105036021c20002000411c6a107b106f210120002802082102200029020c2103200041186a1047360200200041146a411d3602002000418483083602102000200337030820002001360204200020023602002000105f000bbd0302057f027e230041f0006b2200240002400240024010602204107622031007450d00200041286a22012003102a1039200141b480084119103b2102200141b48008411910672101104721030340200104402003200041286a41b480084119103b1049200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b416c418084084100100c1a2004416c10151a2000200210642000280220450d00200041286a200210642000280248450d000240200041286a41e88208411c1063450440200041286a41848308411d10630d014197820841361000000b105510542000410036026c200041d0006a2201200041ec006a104a200028026c10512000280250200029035821052000290360210620012003105610552000280254200028025810520d0320052006105d0c010b105510542000410036026c200041d0006a2201200041ec006a104a200028026c10512000280250200029035821052000290360210620012003105610552000280254200028025810520d0220052006105d0b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b0b89040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080ba103617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f6164647265737361726773766172206172677373756d0070616e6963206f6363757272656400419084080b049cffffff@0500@0500@05".to_string(), }; - assert_eq!(tx, expected); + assert_eq!(tx, Ok(expected)); Ok(()) } \ No newline at end of file diff --git a/tester/core/tests/network_call.rs b/tester/core/tests/network_call.rs index d8a7e42..1afd54d 100644 --- a/tester/core/tests/network_call.rs +++ b/tester/core/tests/network_call.rs @@ -140,10 +140,6 @@ impl BlockchainInteractor for MockInteractor { return Ok(response) } - - async fn sc_deploy(&mut self, _sc_deploy_step: S) where S: AsMut + Send { - todo!() - } } fn get_executor() -> Arc>> { diff --git a/tester/core/tests/network_deploy.rs b/tester/core/tests/network_deploy.rs index 785a18a..010a899 100644 --- a/tester/core/tests/network_deploy.rs +++ b/tester/core/tests/network_deploy.rs @@ -1,11 +1,11 @@ use async_trait::async_trait; use num_bigint::BigUint; use novax::code::DeployData; -use novax::{Address, CodeMetadata, Wallet}; +use novax::{Address, CodeMetadata}; use novax::errors::NovaXError; use novax::tester::tester::TesterContract; use novax::testerwithreturningdeploy::testerwithreturningdeploy::TesterWithReturningDeployContract; -use novax::executor::BlockchainInteractor; +use novax::executor::{BlockchainInteractor, ExecutorError, TransactionOnNetwork, TransactionOnNetworkTransaction, TransactionOnNetworkTransactionLogs, TransactionOnNetworkTransactionLogsEvents, TransactionOnNetworkTransactionSmartContractResult, Wallet}; use novax::executor::BaseTransactionNetworkExecutor; use novax::executor::call_result::CallResult; use novax_mocking::{ScCallStep, ScDeployStep, TxResponse}; @@ -24,32 +24,55 @@ struct MockInteractor { #[async_trait] impl BlockchainInteractor for MockInteractor { - async fn new(_gateway_url: &str) -> Self { + async fn new(_gateway_url: String, wallet: Wallet) -> Result { let is_deploy_returning = _gateway_url == RETURNING_MOCK_URL; - MockInteractor { - is_deploy_returning, - } + Ok( + MockInteractor { + is_deploy_returning, + } + ) } - fn register_wallet(&mut self, _wallet: Wallet) -> Address { - Address::from_bech32_string(CALLER).unwrap() - } + async fn sc_call(&mut self, to: String, value: BigUint, data: String, gas_limit: u64) -> Result { + let mut return_data: Option = None; - async fn sc_call(&mut self, mut _sc_call_step: S) where S: AsMut + Send { - todo!() - } + let deploy_with_biguint_arg_metadata_nothing_data = "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@05"; - async fn sc_deploy(&mut self, mut sc_deploy_step: S) where S: AsMut + Send { - let mut response = if self.is_deploy_returning { - TxResponse::from_raw_results(decode_scr_data_or_panic("@6f6b@05")) - } else { - TxResponse::from_raw_results(decode_scr_data_or_panic("@6f6b")) + if data == deploy_with_biguint_arg_metadata_nothing_data { + return_data = Some("@6f6b@5393e5fe16508e5a31db9b6f9eda760c79d077c6e00f5f4f9bb3bfbc309a7b8c".to_string()); + } + + let Some(return_data) = return_data else { + panic!("Unknown data for : \"{data}\""); + }; + + let response = TransactionOnNetwork { + transaction: TransactionOnNetworkTransaction { + gas_used: 0, + smart_contract_results: Some(vec![ // TODO: use writeLog result + TransactionOnNetworkTransactionSmartContractResult { + hash: "".to_string(), + nonce: 1, + data: return_data, + } + ]), + logs: TransactionOnNetworkTransactionLogs { + address: CALLER.to_string(), + events: vec![ + TransactionOnNetworkTransactionLogsEvents { + address: NEW_CONTRACT.to_string(), + identifier: "SCDeploy".to_string(), + topics: vec![], + data, + } + ], + }, + status: "executed".to_string(), + }, }; - response.new_deployed_address = Some(Address::from_bech32_string(NEW_CONTRACT).unwrap().into()); - let step = sc_deploy_step.as_mut(); - step.response = Some(response); + return Ok(response) } } @@ -75,7 +98,7 @@ async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { let deploy_data = DeployData { code: "../../.novax/tester-contract.wasm", - metadata: Default::default(), + metadata: CodeMetadata::default(), }; let deploy_result: (Address, CallResult<()>) = TesterContract::deploy( From 24f7ffa191f8375a5c79b48051e80cda986144dc Mon Sep 17 00:00:00 2001 From: Fusee Date: Mon, 27 May 2024 16:12:37 +0200 Subject: [PATCH 10/25] mock and dummy executor are working --- executor/src/dummy/transaction.rs | 68 ++++----- executor/src/error/executor.rs | 2 + executor/src/error/mock_deploy.rs | 8 +- executor/src/error/mock_transaction.rs | 29 ++++ executor/src/error/mod.rs | 3 +- executor/src/lib.rs | 1 + executor/src/mocking/executor.rs | 137 +++++++++++------- executor/src/network/transaction/executor.rs | 31 ++-- executor/src/utils/transaction/deploy.rs | 44 ++++++ executor/src/utils/transaction/mod.rs | 3 +- .../src/utils/transaction/normalization.rs | 41 ++++-- tester/core/tests/dummy_deploy.rs | 8 +- tester/core/tests/mock_call.rs | 12 +- tester/core/tests/network_call.rs | 6 +- tester/core/tests/network_deploy.rs | 18 ++- 15 files changed, 273 insertions(+), 138 deletions(-) create mode 100644 executor/src/error/mock_transaction.rs create mode 100644 executor/src/utils/transaction/deploy.rs diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index fcc2050..672b744 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -15,6 +15,8 @@ use crate::call_result::CallResult; use crate::error::dummy::DummyExecutorError; use crate::error::executor::ExecutorError; use crate::utils::transaction::data::{SendableTransaction, SendableTransactionConvertible}; +use crate::utils::transaction::deploy::get_deploy_call_input; +use crate::utils::transaction::normalization::NormalizationInOut; use crate::utils::transaction::token_transfer::TokenTransfer; use crate::utils::transaction::transfers::get_egld_or_esdt_transfers; @@ -73,31 +75,24 @@ impl TransactionExecutor for DummyExecutor { where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - let from = if let Some(caller) = &self.caller { - AddressValue::from(caller) + let function_name = if function.is_empty() { + None } else { - AddressValue::from(Bech32Address::from_bech32_string(to.to_bech32_string()?)) + Some(function) }; - let payments = get_egld_or_esdt_transfers( - egld_value, - esdt_transfers - )?; - - let mut tx = Tx::new_with_env(TxScEnv::default()) - .from(from) - .to(Bech32Address::from_bech32_string(to.to_bech32_string()?)) - .gas(gas_limit) - .egld_or_multi_esdt(payments) - .raw_call(function); - - for argument in arguments { - tx = tx.argument(&argument); - } + let to = to.to_bech32_string()?; - let tx = tx.normalize(); + let normalized = NormalizationInOut { + sender: self.caller.clone().map(|address| address.to_bech32_string()).unwrap_or_else(|| Ok(to.clone()))?, + receiver: to, + function_name, + arguments, + egld_value, + esdt_transfers, + }.normalize()?; - self.tx = Some(tx.to_sendable_transaction()); + self.tx = Some(normalized.to_sendable_transaction(gas_limit)); /* let mut owned_sc_call_step = mem::replace(sc_call_step, ScCallStep::new().into()); @@ -137,20 +132,25 @@ impl DeployExecutor for DummyExecutor { where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - /* - let mut owned_sc_deploy_step = mem::replace(sc_deploy_step, ScDeployStep::new().into()); - - if let Some(caller) = &self.caller { - owned_sc_deploy_step = owned_sc_deploy_step.from(&multiversx_sc::types::Address::from(caller.to_bytes())); - } - - self.tx = Some(owned_sc_deploy_step.sc_deploy_step); - - Ok(()) - - */ - - todo!() + let deploy_call_input = get_deploy_call_input( + bytes, + code_metadata, + egld_value, + arguments, + gas_limit + ); + + let deploy_result = self.sc_call::( + &deploy_call_input.to, + deploy_call_input.function, + deploy_call_input.arguments, + deploy_call_input.gas_limit, + deploy_call_input.egld_value, + deploy_call_input.esdt_transfers + ) + .await?; + + Ok((Address::default(), deploy_result)) } /// Indicates that deserialization should be skipped as there is no actual execution. diff --git a/executor/src/error/executor.rs b/executor/src/error/executor.rs index 9bb60c7..be88cfa 100644 --- a/executor/src/error/executor.rs +++ b/executor/src/error/executor.rs @@ -4,6 +4,7 @@ use novax_data::DataError; use crate::error::dummy::DummyExecutorError; use crate::error::gateway::GatewayError; use crate::error::mock_deploy::MockDeployError; +use crate::error::mock_transaction::MockTransactionError; use crate::error::transaction::TransactionError; use crate::error::wallet::WalletError; use crate::SimulationError; @@ -39,6 +40,7 @@ pub enum ExecutorError { /// `MockExecutor` for testing or simulation purposes. The wrapped `MockDeployError` provides more detailed /// information about the nature of the mock deployment-related error that occurred. MockDeploy(MockDeployError), + MockTransaction(MockTransactionError), Transaction(TransactionError), Wallet(WalletError), diff --git a/executor/src/error/mock_deploy.rs b/executor/src/error/mock_deploy.rs index c68f91f..f77506b 100644 --- a/executor/src/error/mock_deploy.rs +++ b/executor/src/error/mock_deploy.rs @@ -4,13 +4,13 @@ use serde::{Deserialize, Serialize}; /// An enumeration representing the various errors that can occur when deploying through the `MockExecutor`. /// /// Currently, it includes the following variant: -/// * `WalletAddressNotPresent` - Indicates that a wallet address is not present but is required for the deployment operation. +/// * `CallerAddressNotPresent` - Indicates that a caller address is not present but is required for the deployment operation. #[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] pub enum MockDeployError { - /// This error variant is triggered when there is an attempt to deploy, but no wallet address is present. - /// In the context of a `MockExecutor`, a caller's wallet address is essential for deployment, and if the + /// This error variant is triggered when there is an attempt to deploy, but no caller address is present. + /// In the context of a `MockExecutor`, a caller's address is essential for deployment, and if the /// `opt_caller` field is `None`, this error will be thrown. - WalletAddressNotPresent, + CallerAddressNotPresent, } /// An implementation of the `From` trait to allow for easy conversions from `MockDeployError` to `ExecutorError`. diff --git a/executor/src/error/mock_transaction.rs b/executor/src/error/mock_transaction.rs new file mode 100644 index 0000000..101ff3f --- /dev/null +++ b/executor/src/error/mock_transaction.rs @@ -0,0 +1,29 @@ +use crate::error::executor::ExecutorError; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] +pub enum MockTransactionError { + /// This error variant is triggered when there is an attempt to deploy, but no caller address is present. + /// In the context of a `MockExecutor`, a caller's wallet address is essential for calling a contract, and if the + /// `opt_caller` field is `None`, this error will be thrown. + CallerAddressNotPresent, +} + +/// An implementation of the `From` trait to allow for easy conversions from `MockTransactionError` to `ExecutorError`. +/// +/// This implementation facilitates the propagation of `MockTransactionError`s through the code, +/// by allowing them to be converted into the more general `ExecutorError` type. +impl From for ExecutorError { + /// Performs the conversion from a `MockTransactionError` to an `ExecutorError`. + /// + /// # Parameters + /// + /// * `value`: The `MockTransactionError` value to be converted. + /// + /// # Returns + /// + /// * `ExecutorError`: An `ExecutorError` instance containing the provided `MockTransactionError` value. + fn from(value: MockTransactionError) -> Self { + ExecutorError::MockTransaction(value) + } +} \ No newline at end of file diff --git a/executor/src/error/mod.rs b/executor/src/error/mod.rs index d96455b..5beb117 100644 --- a/executor/src/error/mod.rs +++ b/executor/src/error/mod.rs @@ -5,4 +5,5 @@ pub mod gateway; pub mod simulation; pub mod transaction; pub mod dummy; -pub mod wallet; \ No newline at end of file +pub mod wallet; +pub mod mock_transaction; \ No newline at end of file diff --git a/executor/src/lib.rs b/executor/src/lib.rs index 5b9e806..d7f0b55 100644 --- a/executor/src/lib.rs +++ b/executor/src/lib.rs @@ -54,6 +54,7 @@ mod utils; pub use error::executor::ExecutorError; pub use error::network::NetworkQueryError; pub use error::mock_deploy::MockDeployError; +pub use error::mock_transaction::MockTransactionError; pub use error::gateway::GatewayError; pub use error::simulation::SimulationError; diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index 87fcff6..eaf5558 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -4,7 +4,10 @@ use std::sync::Arc; use async_trait::async_trait; use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; -use multiversx_sc::imports::CodeMetadata; +use multiversx_sc::imports::{CodeMetadata, ReturnsNewAddress}; +use multiversx_sc::types::{MultiValueEncoded, ReturnsRawResult}; +use multiversx_sc_scenario::imports::{Bech32Address, BytesValue}; +use multiversx_sc_scenario::ScenarioTxRun; use num_bigint::BigUint; use tokio::sync::Mutex; @@ -18,8 +21,12 @@ use crate::base::transaction::TransactionExecutor; use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::error::mock_deploy::MockDeployError; +use crate::error::mock_transaction::MockTransactionError; +use crate::error::transaction::TransactionError; use crate::ScenarioWorld; +use crate::utils::transaction::deploy::get_deploy_call_input; use crate::utils::transaction::token_transfer::TokenTransfer; +use crate::utils::transaction::transfers::get_egld_or_esdt_transfers; /// A convenient type alias for `MockExecutor` with `String` as the generic type. pub type StandardMockExecutor = MockExecutor; @@ -92,26 +99,44 @@ impl TransactionExecutor for MockExecutor where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - /* - let caller: Address = if let Some(caller) = self.opt_caller.as_deref() { - caller.into() - } else { - (&sc_call_step.sc_call_step.tx.to.value).into() + let mut world = self.world.lock().await; + + let transfers = get_egld_or_esdt_transfers( + egld_value, + esdt_transfers + )?; + + let Some(caller) = self.opt_caller.as_ref() else { + return Err(MockTransactionError::CallerAddressNotPresent.into()) }; - let owned_sc_call_step = mem::replace(sc_call_step, ScCallStep::new().into()); - *sc_call_step = owned_sc_call_step.from(&caller); + let mut tx = world.tx() + .from(Bech32Address::from_bech32_string(Address::from(caller).to_bech32_string()?)) + .to(Bech32Address::from_bech32_string(to.to_bech32_string()?)) + .raw_call(function) + .with_gas_limit(gas_limit) + .egld_or_multi_esdt(transfers) + .returns(ReturnsRawResult); - { - let mut world = self.world.lock().await; - world.sc_call(sc_call_step); + for argument in arguments { + tx = tx.argument(&argument); } - Ok(()) + let raw_result_managed = tx.run(); + let mut raw_result: Vec> = raw_result_managed + .into_vec() + .iter() + .map(|buffer| buffer.to_boxed_bytes().into_vec()) + .collect(); - */ + let output_managed = OutputManaged::multi_decode(&mut raw_result).unwrap(); // TODO: no unwrap - todo!() + let call_result = CallResult { + response: Default::default(), + result: Some(output_managed.to_native()), + }; + + Ok(call_result) } } @@ -162,30 +187,41 @@ impl DeployExecutor for MockExecutor where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - /* - let caller: Address = { - let Some(caller) = self.opt_caller.as_deref() else { - return Err(ExecutorError::MockDeploy(MockDeployError::WalletAddressNotPresent)) - }; + let mut world = self.world.lock().await; - caller.into() + let Some(caller) = self.opt_caller.as_ref() else { + return Err(MockDeployError::CallerAddressNotPresent.into()) }; - let sc_deploy_step = sc_deploy_step.as_mut(); - - let owned_sc_deploy_step = mem::replace(sc_deploy_step, ScDeployStep::new()); - *sc_deploy_step = owned_sc_deploy_step.from(&caller); + let mut tx = world.tx() + .from(Bech32Address::from_bech32_string(Address::from(caller).to_bech32_string()?)) + .raw_deploy() + .code_metadata(code_metadata) + .code(BytesValue::from(bytes)) + .with_gas_limit(gas_limit) + .egld(multiversx_sc::types::BigUint::from(egld_value)) + .returns(ReturnsNewAddress) + .returns(ReturnsRawResult); - { - let mut world = self.world.lock().await; - world.sc_deploy(sc_deploy_step); + for argument in arguments { + tx = tx.argument(&argument); } - Ok(()) + let (new_address, raw_result_managed) = tx.run(); + let mut raw_result: Vec> = raw_result_managed + .into_vec() + .iter() + .map(|buffer| buffer.to_boxed_bytes().into_vec()) + .collect(); - */ + let output_managed = OutputManaged::multi_decode(&mut raw_result).unwrap(); // TODO: no unwrap - todo!() + let call_result = CallResult { + response: Default::default(), + result: Some(output_managed.to_native()), + }; + + Ok((Address::from_bytes(*new_address.as_array()), call_result)) } /// Specifies whether deserialization should be skipped during the deployment execution. @@ -236,30 +272,31 @@ impl QueryExecutor for MockExecutor where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - /* - // Convert the smart contract query step to a call step. - let query = convert_sc_query_step_to_call_step(request); - // Create a TypedScQuery from the query. - let mut typed = TypedScQuery::::from(query); - { - // Lock the mock world state for exclusive access. - let mut world: MutexGuard = self.world.lock().await; - // Execute the smart contract query in the mock world. - world.sc_query(&mut typed); + let mut world = self.world.lock().await; + + // TODO: use from when run() becomes available with it in the MvX Rust SDK + // TODO: use payments when run() becomes available with them in the MvX Rust SDK + // let from = self.opt_caller.as_ref().map(|a| Address::from(a)).unwrap_or_else(|| to.clone()); + + let mut tx = world.query() + .to(Bech32Address::from_bech32_string(to.to_bech32_string()?)) + .raw_call(function) + .returns(ReturnsRawResult); + + for argument in arguments { + tx = tx.argument(&argument); } - // Retrieve the response from the typed query. - let response = typed.response(); - // Clone the output from the response. - let mut out = response.out.clone(); - // Parse the query return bytes data. - let parsed = parse_query_return_bytes_data::(&mut out)?; - // Convert the parsed data to its native type and return it. - Ok(parsed.to_native()) + let raw_result_managed = tx.run(); + let mut raw_result: Vec> = raw_result_managed + .into_vec() + .iter() + .map(|buffer| buffer.to_boxed_bytes().into_vec()) + .collect(); - */ + let output_managed = OutputManaged::multi_decode(&mut raw_result).unwrap(); // TODO: no unwrap - todo!() + Ok(output_managed.to_native()) } } diff --git a/executor/src/network/transaction/executor.rs b/executor/src/network/transaction/executor.rs index c582cb9..ab76f16 100644 --- a/executor/src/network/transaction/executor.rs +++ b/executor/src/network/transaction/executor.rs @@ -19,6 +19,7 @@ use crate::network::transaction::interactor::{BlockchainInteractor, Interactor}; use crate::network::transaction::models::transaction_on_network::{TransactionOnNetworkTransactionLogs, TransactionOnNetworkTransactionLogsEvents}; use crate::network::utils::wallet::Wallet; use crate::TransactionOnNetworkTransactionSmartContractResult; +use crate::utils::transaction::deploy::get_deploy_call_input; use crate::utils::transaction::normalization::NormalizationInOut; use crate::utils::transaction::token_transfer::TokenTransfer; @@ -189,31 +190,27 @@ impl DeployExecutor for BaseTransactionNetwork bytes: Vec, code_metadata: CodeMetadata, egld_value: BigUint, - mut arguments: Vec>, + arguments: Vec>, gas_limit: u64 ) -> Result<(Address, CallResult), ExecutorError> where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - let mut encoded_metadata: ManagedBuffer = ManagedBuffer::new(); - _ = code_metadata.top_encode(&mut encoded_metadata).unwrap(); - - let built_in_arguments: Vec> = vec![ + let deploy_call_input = get_deploy_call_input( bytes, - vec![5, 0], // VM type: WASM - encoded_metadata.to_boxed_bytes().into_vec() - ]; - - let mut all_arguments = built_in_arguments; - all_arguments.append(&mut arguments); + code_metadata, + egld_value, + arguments, + gas_limit + ); let deploy_result = self.sc_call::( - &Address::from_bytes([0u8; 32]), - "".to_string(), - all_arguments, - gas_limit, - egld_value, - vec![] + &deploy_call_input.to, + deploy_call_input.function, + deploy_call_input.arguments, + deploy_call_input.gas_limit, + deploy_call_input.egld_value, + deploy_call_input.esdt_transfers ) .await?; diff --git a/executor/src/utils/transaction/deploy.rs b/executor/src/utils/transaction/deploy.rs new file mode 100644 index 0000000..576194d --- /dev/null +++ b/executor/src/utils/transaction/deploy.rs @@ -0,0 +1,44 @@ +use multiversx_sc::codec::TopEncode; +use multiversx_sc::imports::{CodeMetadata, ManagedBuffer}; +use multiversx_sc_scenario::api::StaticApi; +use num_bigint::BigUint; +use novax_data::Address; +use crate::TokenTransfer; + +pub struct DeployCallInput { + pub to: Address, + pub function: String, + pub arguments: Vec>, + pub gas_limit: u64, + pub egld_value: BigUint, + pub esdt_transfers: Vec +} + +pub fn get_deploy_call_input( + bytes: Vec, + code_metadata: CodeMetadata, + egld_value: BigUint, + mut arguments: Vec>, + gas_limit: u64 +) -> DeployCallInput { + let mut encoded_metadata: ManagedBuffer = ManagedBuffer::new(); + _ = code_metadata.top_encode(&mut encoded_metadata).unwrap(); + + let built_in_arguments: Vec> = vec![ + bytes, + vec![5, 0], // VM type: WASM + encoded_metadata.to_boxed_bytes().into_vec() + ]; + + let mut all_arguments = built_in_arguments; + all_arguments.append(&mut arguments); + + DeployCallInput { + to: Address::from_bytes([0u8; 32]), + function: "".to_string(), + arguments: all_arguments, + gas_limit, + egld_value, + esdt_transfers: vec![], + } +} \ No newline at end of file diff --git a/executor/src/utils/transaction/mod.rs b/executor/src/utils/transaction/mod.rs index 457937f..2611bb9 100644 --- a/executor/src/utils/transaction/mod.rs +++ b/executor/src/utils/transaction/mod.rs @@ -2,4 +2,5 @@ pub mod data; pub mod call_result; pub mod token_transfer; pub mod transfers; -pub mod normalization; \ No newline at end of file +pub mod normalization; +pub mod deploy; \ No newline at end of file diff --git a/executor/src/utils/transaction/normalization.rs b/executor/src/utils/transaction/normalization.rs index c2ac976..b254378 100644 --- a/executor/src/utils/transaction/normalization.rs +++ b/executor/src/utils/transaction/normalization.rs @@ -1,6 +1,6 @@ use num_bigint::BigUint; use novax_data::Address; -use crate::{ExecutorError, TokenTransfer}; +use crate::{ExecutorError, SendableTransaction, TokenTransfer}; use crate::error::transaction::TransactionError; #[derive(Clone, PartialEq, Debug)] @@ -116,6 +116,15 @@ impl NormalizationInOut { args_string.join("@") } + + pub fn to_sendable_transaction(self, gas_limit: u64) -> SendableTransaction { + SendableTransaction { + receiver: self.receiver.clone(), + egld_value: self.egld_value.clone(), + gas_limit, + data: self.get_transaction_data(), + } + } } fn encode_string(string: &str) -> Result, ExecutorError> { @@ -171,7 +180,7 @@ mod tests { let value = NormalizationInOut { sender: SENDER.to_string(), receiver: RECEIVER.to_string(), - function_name: ENDPOINT_NAME.to_string(), + function_name: Some(ENDPOINT_NAME.to_string()), arguments: vec![ vec![1, 2], vec![3, 4] @@ -195,7 +204,7 @@ mod tests { let value = NormalizationInOut { sender: SENDER.to_string(), receiver: RECEIVER.to_string(), - function_name: ENDPOINT_NAME.to_string(), + function_name: Some(ENDPOINT_NAME.to_string()), arguments: vec![ vec![1, 2], vec![3, 4] @@ -219,7 +228,7 @@ mod tests { let value = NormalizationInOut { sender: SENDER.to_string(), receiver: RECEIVER.to_string(), - function_name: ENDPOINT_NAME.to_string(), + function_name: Some(ENDPOINT_NAME.to_string()), arguments: vec![], egld_value: BigUint::from(0u8), esdt_transfers: vec![ @@ -237,7 +246,7 @@ mod tests { let expected = NormalizationInOut { sender: SENDER.to_string(), receiver: RECEIVER.to_string(), - function_name: "ESDTTransfer".to_string(), + function_name: Some("ESDTTransfer".to_string()), arguments: vec![ hex::decode(FUNGIBLE_NAME_HEX).unwrap(), vec![100], @@ -258,7 +267,7 @@ mod tests { let value = NormalizationInOut { sender: SENDER.to_string(), receiver: RECEIVER.to_string(), - function_name: ENDPOINT_NAME.to_string(), + function_name: Some(ENDPOINT_NAME.to_string()), arguments: vec![ vec![1, 2], vec![3, 4] @@ -279,7 +288,7 @@ mod tests { let expected = NormalizationInOut { sender: SENDER.to_string(), receiver: RECEIVER.to_string(), - function_name: "ESDTTransfer".to_string(), + function_name: Some("ESDTTransfer".to_string()), arguments: vec![ hex::decode(FUNGIBLE_NAME_HEX).unwrap(), vec![100], @@ -302,7 +311,7 @@ mod tests { let value = NormalizationInOut { sender: SENDER.to_string(), receiver: RECEIVER.to_string(), - function_name: ENDPOINT_NAME.to_string(), + function_name: Some(ENDPOINT_NAME.to_string()), arguments: vec![], egld_value: BigUint::from(0u8), esdt_transfers: vec![ @@ -320,7 +329,7 @@ mod tests { let expected = NormalizationInOut { sender: SENDER.to_string(), receiver: SENDER.to_string(), - function_name: "ESDTNFTTransfer".to_string(), + function_name: Some("ESDTNFTTransfer".to_string()), arguments: vec![ hex::decode(NON_FUNGIBLE_NAME_HEX).unwrap(), vec![1], @@ -342,7 +351,7 @@ mod tests { let value = NormalizationInOut { sender: SENDER.to_string(), receiver: RECEIVER.to_string(), - function_name: ENDPOINT_NAME.to_string(), + function_name: Some(ENDPOINT_NAME.to_string()), arguments: vec![ vec![1, 2], vec![3, 4] @@ -363,7 +372,7 @@ mod tests { let expected = NormalizationInOut { sender: SENDER.to_string(), receiver: SENDER.to_string(), - function_name: "ESDTNFTTransfer".to_string(), + function_name: Some("ESDTNFTTransfer".to_string()), arguments: vec![ hex::decode(NON_FUNGIBLE_NAME_HEX).unwrap(), vec![1], @@ -388,7 +397,7 @@ mod tests { let value = NormalizationInOut { sender: SENDER.to_string(), receiver: RECEIVER.to_string(), - function_name: ENDPOINT_NAME.to_string(), + function_name: Some(ENDPOINT_NAME.to_string()), arguments: vec![], egld_value: BigUint::from(0u8), esdt_transfers: vec![ @@ -410,7 +419,7 @@ mod tests { let expected = NormalizationInOut { sender: SENDER.to_string(), receiver: SENDER.to_string(), - function_name: "MultiESDTNFTTransfer".to_string(), + function_name: Some("MultiESDTNFTTransfer".to_string()), arguments: vec![ hex::decode(RECEIVER_HEX).unwrap(), vec![2], @@ -436,7 +445,7 @@ mod tests { let value = NormalizationInOut { sender: SENDER.to_string(), receiver: RECEIVER.to_string(), - function_name: ENDPOINT_NAME.to_string(), + function_name: Some(ENDPOINT_NAME.to_string()), arguments: vec![ vec![1, 2], vec![3, 4] @@ -462,7 +471,7 @@ mod tests { let expected = NormalizationInOut { sender: SENDER.to_string(), receiver: SENDER.to_string(), - function_name: "MultiESDTNFTTransfer".to_string(), + function_name: Some("MultiESDTNFTTransfer".to_string()), arguments: vec![ hex::decode(RECEIVER_HEX).unwrap(), vec![2], @@ -489,7 +498,7 @@ mod tests { let value = NormalizationInOut { sender: SENDER.to_string(), receiver: RECEIVER.to_string(), - function_name: ENDPOINT_NAME.to_string(), + function_name: Some(ENDPOINT_NAME.to_string()), arguments: vec![], egld_value: BigUint::from(1u8), esdt_transfers: vec![ diff --git a/tester/core/tests/dummy_deploy.rs b/tester/core/tests/dummy_deploy.rs index cf292ab..a4178a3 100644 --- a/tester/core/tests/dummy_deploy.rs +++ b/tester/core/tests/dummy_deploy.rs @@ -28,7 +28,7 @@ async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { &mut executor, 600000000u64, &BigUint::from(5u8) - ) + ) .await .unwrap(); @@ -38,7 +38,7 @@ async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { receiver: SYSTEM_SC_DEPLOY_ADDRESS.to_string(), egld_value: 0u8.into(), gas_limit: 600000000u64, - data: "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f0060017e006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e029c072603656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564001103656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c0008038c018a010c0002050201020b02010114010303010403020102060202051503070908040d0205060101060702020204030103000001020301010301160303050107060108090608080201040102050a0901070803020201070101060c0217050d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005030100030616037f01418080080b7f0041f0d2080b7f0041f0d2080b07a10a34066d656d6f7279020004696e69740082010667657453756d008301036164640084011372657475726e4e667450726f706572746965730085011772657475726e4e6674456e756d50726f706572746965730086011d72657475726e4e6674456e756d4669656c647350726f706572746965730087011572657475726e46756e6769626c6542616c616e63650088011872657475726e4e6f6e46756e6769626c6542616c616e6365008901156e6f4172674e6f52657475726e456e64706f696e74008a010c72657475726e43616c6c6572008b011372657475726e4d616e61676564427566666572008c011572657475726e436f6e747261637441646472657373008d010d72657475726e42696775696e74008e010872657475726e5538008f010972657475726e5531360090010972657475726e5533320091010972657475726e5536340092010c72657475726e5533325665630093010c72657475726e5536345665630094010f72657475726e4275666665725665630095011072657475726e42696775696e745665630096010c72657475726e54776f5536340097011072657475726e54776f427566666572730098012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740099011472657475726e446f75626c654f66553634417267009a011872657475726e446f75626c654f6642696775696e74417267009b011772657475726e417070656e646564427566666572417267009c011772657475726e53756d54776f42696775696e7441726773009d011b72657475726e436f6e6361744d756c746942756666657241726773009e011572657475726e53756d4d756c746955363441726773009f011972657475726e53756d4d756c746942696775696e744172677300a0011272657475726e437573746f6d53747275637400a1011572657475726e437573746f6d53747275637441726700a2012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a3012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a4011072657475726e437573746f6d456e756d00a5011372657475726e437573746f6d456e756d41726700a6011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a7012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a8011d72657475726e437573746f6d456e756d576974684669656c647341726700a9011372657475726e4d756c746956616c756554776f00aa011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400ab012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00ac01396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00ad013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ae010863616c6c4261636b00af011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a7012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a8011d72657475726e437573746f6d456e756d5769746856616c75657341726700a9010a5f5f646174615f656e6403010b5f5f686561705f6261736503020aee498a012e000240200120024d0440200220044d0d011027000b1027000b2000200220016b3602042000200120036a3602000b0b0041808408410e1000000b1301017f102922012000ad42ff0183100120010b1901017f419084084190840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102c21022001102d210320002001102e36020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1043000b200128020c2000200220036a360200200141106a24000b3002017f017e230041106b22012400200142003703082000200141086a22004108104c20004108107f200141106a24000b08002000102c103c0b1d00200028020820011030200029030020011031200028020c200110320baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410620240024020012d000404402000100722044190ce0041a4d20828020022036b4b0d0120022003200320046a22011079200041002002280200200228020410661a41a4d20820013602000c020b20012802002000106b0c010b2001107520012802002000106b0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081062200241106a24000b0a002000103d200110300b3601027f230041106b22012400200141086a103420012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41a8d2082d0000220245044041a8d20841013a000041a4d2084100360200200141086a410010722001280208200128020c418084084100107410470c010b41808408410010440b360200200020024101733a0004200141106a24000b0b0020002001103610041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1075200228020820022d000c044041a4d208410036020041a8d20841003a00000b200241106a24000b0a0020004100103810390b0d00200010292200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103b103c0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0d00200010292200101a1a20000b0f01017f10292201200010191a20010b0c01017f10292200100520000b4c01037f103e210310292102200041feffffff074604402003104041b0d2082002100620020f0b20001007210420031040200041d0d20810081a41b0d20841d0d208200420012002100920020b0b00200041b0d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210421a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210244100470b2e01017f41ed800841171044220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f1029220220002001100c1a20020b0c00200020012002104b10100b2e01017f104721010340200028020041acd2082802004e4504402001200041f083084104104810490c010b0b20010b1301017f10292200418084084100100c1a20000b0c00200020012002104b10380b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bb80102027e027f027f0240200141a183084106104b101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041acd2082802004e04401047210441010c010b200141a1830841061048210441010b0c020b41a18308410641a68008410e1043000b200141a183084106104522024280808080708321032002a72104200141a1830841061045210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b2f01017f2000280200220341acd2082802004e0440200120024187810841111043000b2000200341016a36020020030b3100200041086a2000280200200120021071044041dd8308410341d88108410f1043000b2000200028020020026a3602000b2a01027f2000106a210110472102037f2001047f20022000102d1070200141016b21010c010520020b0b0b2a01027f2000106a210110472102037f2001047f20022000102c1049200141016b21010c010520020b0b0b0c00200010292200101120000b2101017f41001038220210074120470440200020014187820841101043000b20020b1900200041acd2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101320004604400f0b41aa810841191000000b190041acd20828020041004e04400f0b4187810841111000000b0b0041acd20810133602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010074102760b5501027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280210200141086a22021059200041146a2002105a20002002102f200128020820012d000c1035200141106a24000baf0102017e047f230041106b22032400200010074103762001106120001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810661a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011031200621040c010b0b0b5b01027f230041206b220224002000280200220310572001106120022003100736021820024100360214200220003602100340200241086a200241106a107a20022802080440200228020c200110300c0105200241206a24000b0b0bb00101027f230041206b2201240002402000280200450440200141086a1033200120012d000c3a001c200120012802083602184100200141186a2202105c2000280204200210302000290310200210312000280208200210320c010b200141106a1033200120012d00143a001c200120012802103602184101200141186a2202105c200028020420021059200041086a2002105a200041106a2002102f0b200128021820012d001c1035200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011062200241106a24000b0a0020001014200110140b5801027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280208200141086a22021030200029030020021031200028020c20021032200128020820012d000c1035200141106a24000b7e01057f230041106b2201240020002802102203044010602001103420012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210612002200320051062200041186a2002105a200128020820012d000c103610151a0b200028020020002802042000280208200028020c1025000b1b01027f10292200101641c38108410a10442201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041062200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041a4d20828020022046b2002490d01200341086a2004200220046a220010792003280208200328020c20012002107441a4d20820003602000c020b200028020020012002100e1a0c010b20001075200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061065200141002002280208200228020c10661a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021026200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310420b3502017f017e230041106b220324002003410036020c20002003410c6a2200410420012002107d20004104107f200341106a2400a70b1f0020012002200310022201101c21022000200136020420002002453602000b1600200020011044220020022003100e1a2000100f000b3102017f017e230041106b220124002001410036020c20002001410c6a22004104104c20004104107f200141106a2400a70b09002000200110031a0b0c00200020002001101720000b0a0020002000200110180b1801017f10292101417242121001200120004172101b20010b0e01017f102922004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141a8d2082d00000d0141a4d208200636020041a8d20841013a0000200441086a20061072200541002004280208200428020c10661a200041013a00080b4101200120036a220041a4d2082802004b0d011a20042001200010732002200320042802002004280204107441000c010b200041003a0008200520012002200310660b200441106a24000b3d01017f230041106b22022400200241086a419484084190ce0020011065200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d011027000b1027000b2000200220016b36020420002001419484086a3602000bb50201067f2001200346044020012203410f4b04402000410020006b41037122046a210520040440200221010340200020012d00003a0000200141016a2101200041016a22002005490d000b0b2005200320046b2203417c7122066a21000240200220046a22044103710440200641004c0d012004410374220141187121072004417c71220841046a2102410020016b4118712109200828020021010340200520012007762002280200220120097472360200200241046a2102200541046a22052000490d000b0c010b200641004c0d0020042102034020052002280200360200200241046a2102200541046a22052000490d000b0b20034103712103200420066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b1027000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041a4d208280200107320002802002001280208200128020c100e1a41a4d208410036020041a8d20841003a00000b200141106a24000b0d00200010292200101d1a20000b080020001076103c0b0b0020002001103d10151a0b3f01017f230041106b22032400200341086a20012002419484084190ce001026200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410661a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c10442101200010473602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041066450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102a200341106a24000f0b200120024187810841111043000b2f00200041086a200028020020012002107104402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107d20012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a0041fc8308410310440b6802027f017e230041106b22032400200020012002107c21002003420037030820001007220441094f04402001200241a68008410e1043000b2003200341086a41082004106520004100200328020022002003280204220110421a20002001107f200341106a24000b1701017f101e410110534100104f2100108001200010780b0f00101e410010531080011077101f0b2301037f101e410110534100104f21001080012201107722022000106d2001200210780bc10101037f230041406a22002400101e4100105341c88308410a10442101200041086a103e20011041200041286a22022000280214102a1039200241e781084120103b21012002103a2102200028022c2000280228460440200041386a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602082001200041086a22011030200220011032200028020820002d000c1035200041406b24000f0b41e78108412041a68008410e1069000ba00202037f017e230041406a22002400101e4100105341c88308410a10442101200041086a103e200110410240024002402000280214102a220110070440200041286a220220011039410121010240024002402002107e41ff01710e020201000b41e78108412041808008410d1069000b200041286a220141e781084120103bad2001103aad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041a4d208410036020041a8d20841003a00000b2001450d010b420010140c010b20001033200020002d00043a000c200020002802003602084101200041086a2201105c2003a7200110302003422088a720011032200028020820002d000c10350b200041406b24000f0b41e78108412041a68008410e1069000be50101047f230041406a22002400101e4100105341c88308410a10442101200041086a103e20011041200041286a22012000280214102a103902402001107e41ff0171450440200041286a220241e781084120103b2002103a2103200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602084100200041086a2202105c20021030200320021032200028020820002d000c1035200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b1600101e4100105341d28308410b10444200103f101f0b1600101e4100105341c88308410a10444206103f101f0b0800101e410010530b1501017f101e41001053102922001020200010041a0b1300101e4100105341c483084104104410041a0b1300101e4101105341e083084110105010041a0b1000101e41001053410a1028106e101f0b0c00101e41001053420310140b0d00101e4100105342f40310140b0e00101e4100105342c09a0c10140b1000101e410010534280b4c4c32110140b1f01017f101e4100105310472200410a1049200041c09a0c1049200010041a0b2101017f101e4100105310472200420a107020004280b4c4c3211070200010041a0b9e0101027f230041306b22002400101e410010531047220141ba8308410510441049200141bf830841051044104920002001360214200041086a1033200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107a200028020004402000280204200041186a10300c010b0b200028021820002d001c1035200041306a24000bbc0101057f230041206b22002400101e4100105310472202410a1028106e10492002410a1028106e41021028106c1049200041086a1033200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410421a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1032200421010c010b0b200028021020002d00141035200041206a24000b1200101e41001053420a4280b4c4c321105d0b2401027f101e4100105341ba83084105104441bf830841051044210110041a200110041a0b2901027f101e4100105341ba830841051044410a1028106e210110041a4280b4c4c32110142001101f0b1100101e410110534100101042018610140b1a01017f101e410110534100104f2100410210282000106c101f0b2001017f101e4101105341001038220041c483084104104410031a200010041a0b1c01017f101e410210534100104f220020004101104f10182000101f0b6201037f230041106b22002400101e105510542000410036020020001046210220002802001051104721012000200210560340200028020820002802044f4504402001200041f483084108107c102a10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400101e1055105420004100360200200010462101200028020010512000200110560340200028020820002802044f450440200041f48308410810810120027c21020c010b0b20021014200041106a24000b6001037f230041106b22002400101e105510542000410036020020001046210220002802001051106f21012000200210560340200028020820002802044f4504402001200041f483084108107c103c106d0c010b0b2001101f200041106a24000b4501027f230041106b22002400101e4100105341c483084104104421012000410a1028106e36020c20004280b4c4c321370300200020013602082000105e200041106a24000b9f0102047f017e230041106b22002400101e41011053230041206b22012400200141086a220210372002102c21032002102d21042002102e21020240200128020c2001280208460440200141186a2d0000044041a4d208410036020041a8d20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1043000b2000105e200041106a24000b860101057f230041206b22002400101e4100105341c48308410410442103410a1028106e210410472201420a107020014280b4c4c32110701047220241ba8308410510441049200241bf83084105104410492000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1058200041206a24000bba0101067f230041206b22032400101e41011053200341086a2101230041306b22002400200041086a220210372002104d21042002104e2105200041206a2002102b0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1043000b20011058200341206a24000b0c00101e41001053420110140b5f02017f017e101e41011053027f024002404100101204404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1043000b41dd8308410341808008410d1043000bad42ff018310140b5001037f230041206b22002400101e4100105341c48308410410442101410a1028106e210220004280b4c4c3213703102000200136020420002002360208200041003602002000105b200041206a24000b900101057f230041206b22002400101e4100105341c48308410410442103410a1028106e210410472201420a107020014280b4c4c32110701047220241ba8308410510441049200241bf83084105104410492000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105b200041206a24000b970202057f027e230041206b22012400101e41011053230041306b22002400200041086a22021037200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1043000b200041086a2202102c21042002102d21062002102e21020c010b200041086a2203104d21042003104e2102200041206a2003102b2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1043000b2001105b200141206a24000baf0102037f047e230041306b22002400101e105510542000410036022c200041086a21012000412c6a220228020041acd2082802004e047e420105200241dd8308410310452103200241dd8308410310452104200241dd830841031045210542000b210620012005370318200120043703102001200337030820012006370300200028022c10512000290308500440200029031820002903202104200029031010141014200410140b200041306a24000b8e0102037f017e230041406a22002400101e41011053200041a783084107105036020c200041106a2000410c6a107b106f210120002903102203427f510440102121030b10292102200320002802182001200028021c2000280220200210221a1023200041306a220120021056200141cd8108410b108101200041306a41cd8108410b108101105d200041406b24000b5701027f230041406a22002400101e41011053200041a783084107105036023c200041206a2000413c6a107b106f210120004100360210200020013602042000200029022c370308200020002802283602002000105f000b7402037f017e230041206b22002400101e41011053200041a783084107105036021c20002000411c6a107b106f210120002802082102200029020c2103200041186a1047360200200041146a411c360200200041e882083602102000200337030820002001360204200020023602002000105f000b7402037f017e230041206b22002400101e41011053200041a783084107105036021c20002000411c6a107b106f210120002802082102200029020c2103200041186a1047360200200041146a411d3602002000418483083602102000200337030820002001360204200020023602002000105f000bbd0302057f027e230041f0006b2200240002400240024010602204107622031007450d00200041286a22012003102a1039200141b480084119103b2102200141b48008411910672101104721030340200104402003200041286a41b480084119103b1049200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b416c418084084100100c1a2004416c10151a2000200210642000280220450d00200041286a200210642000280248450d000240200041286a41e88208411c1063450440200041286a41848308411d10630d014197820841361000000b105510542000410036026c200041d0006a2201200041ec006a104a200028026c10512000280250200029035821052000290360210620012003105610552000280254200028025810520d0320052006105d0c010b105510542000410036026c200041d0006a2201200041ec006a104a200028026c10512000280250200029035821052000290360210620012003105610552000280254200028025810520d0220052006105d0b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b0b89040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080ba103617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f6164647265737361726773766172206172677373756d0070616e6963206f6363757272656400419084080b049cffffff@0500@0000@05".to_string(), + data: "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@05".to_string(), }; assert_eq!(tx, Ok(expected)); @@ -59,7 +59,7 @@ async fn test_deploy_with_metadatas() -> Result<(), NovaXError> { deploy_data, &mut executor, 600000000u64, - &BigUint::from(5u8) + &BigUint::from(7u8) ) .await .unwrap(); @@ -70,7 +70,7 @@ async fn test_deploy_with_metadatas() -> Result<(), NovaXError> { receiver: SYSTEM_SC_DEPLOY_ADDRESS.to_string(), egld_value: 0u8.into(), gas_limit: 600000000u64, - data: "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f0060017e006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e029c072603656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564001103656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c0008038c018a010c0002050201020b02010114010303010403020102060202051503070908040d0205060101060702020204030103000001020301010301160303050107060108090608080201040102050a0901070803020201070101060c0217050d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005030100030616037f01418080080b7f0041f0d2080b7f0041f0d2080b07a10a34066d656d6f7279020004696e69740082010667657453756d008301036164640084011372657475726e4e667450726f706572746965730085011772657475726e4e6674456e756d50726f706572746965730086011d72657475726e4e6674456e756d4669656c647350726f706572746965730087011572657475726e46756e6769626c6542616c616e63650088011872657475726e4e6f6e46756e6769626c6542616c616e6365008901156e6f4172674e6f52657475726e456e64706f696e74008a010c72657475726e43616c6c6572008b011372657475726e4d616e61676564427566666572008c011572657475726e436f6e747261637441646472657373008d010d72657475726e42696775696e74008e010872657475726e5538008f010972657475726e5531360090010972657475726e5533320091010972657475726e5536340092010c72657475726e5533325665630093010c72657475726e5536345665630094010f72657475726e4275666665725665630095011072657475726e42696775696e745665630096010c72657475726e54776f5536340097011072657475726e54776f427566666572730098012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740099011472657475726e446f75626c654f66553634417267009a011872657475726e446f75626c654f6642696775696e74417267009b011772657475726e417070656e646564427566666572417267009c011772657475726e53756d54776f42696775696e7441726773009d011b72657475726e436f6e6361744d756c746942756666657241726773009e011572657475726e53756d4d756c746955363441726773009f011972657475726e53756d4d756c746942696775696e744172677300a0011272657475726e437573746f6d53747275637400a1011572657475726e437573746f6d53747275637441726700a2012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a3012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a4011072657475726e437573746f6d456e756d00a5011372657475726e437573746f6d456e756d41726700a6011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a7012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a8011d72657475726e437573746f6d456e756d576974684669656c647341726700a9011372657475726e4d756c746956616c756554776f00aa011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400ab012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00ac01396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00ad013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ae010863616c6c4261636b00af011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a7012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a8011d72657475726e437573746f6d456e756d5769746856616c75657341726700a9010a5f5f646174615f656e6403010b5f5f686561705f6261736503020aee498a012e000240200120024d0440200220044d0d011027000b1027000b2000200220016b3602042000200120036a3602000b0b0041808408410e1000000b1301017f102922012000ad42ff0183100120010b1901017f419084084190840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102c21022001102d210320002001102e36020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1043000b200128020c2000200220036a360200200141106a24000b3002017f017e230041106b22012400200142003703082000200141086a22004108104c20004108107f200141106a24000b08002000102c103c0b1d00200028020820011030200029030020011031200028020c200110320baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410620240024020012d000404402000100722044190ce0041a4d20828020022036b4b0d0120022003200320046a22011079200041002002280200200228020410661a41a4d20820013602000c020b20012802002000106b0c010b2001107520012802002000106b0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081062200241106a24000b0a002000103d200110300b3601027f230041106b22012400200141086a103420012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41a8d2082d0000220245044041a8d20841013a000041a4d2084100360200200141086a410010722001280208200128020c418084084100107410470c010b41808408410010440b360200200020024101733a0004200141106a24000b0b0020002001103610041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1075200228020820022d000c044041a4d208410036020041a8d20841003a00000b200241106a24000b0a0020004100103810390b0d00200010292200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103b103c0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0d00200010292200101a1a20000b0f01017f10292201200010191a20010b0c01017f10292200100520000b4c01037f103e210310292102200041feffffff074604402003104041b0d2082002100620020f0b20001007210420031040200041d0d20810081a41b0d20841d0d208200420012002100920020b0b00200041b0d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210421a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210244100470b2e01017f41ed800841171044220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f1029220220002001100c1a20020b0c00200020012002104b10100b2e01017f104721010340200028020041acd2082802004e4504402001200041f083084104104810490c010b0b20010b1301017f10292200418084084100100c1a20000b0c00200020012002104b10380b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bb80102027e027f027f0240200141a183084106104b101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041acd2082802004e04401047210441010c010b200141a1830841061048210441010b0c020b41a18308410641a68008410e1043000b200141a183084106104522024280808080708321032002a72104200141a1830841061045210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b2f01017f2000280200220341acd2082802004e0440200120024187810841111043000b2000200341016a36020020030b3100200041086a2000280200200120021071044041dd8308410341d88108410f1043000b2000200028020020026a3602000b2a01027f2000106a210110472102037f2001047f20022000102d1070200141016b21010c010520020b0b0b2a01027f2000106a210110472102037f2001047f20022000102c1049200141016b21010c010520020b0b0b0c00200010292200101120000b2101017f41001038220210074120470440200020014187820841101043000b20020b1900200041acd2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101320004604400f0b41aa810841191000000b190041acd20828020041004e04400f0b4187810841111000000b0b0041acd20810133602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010074102760b5501027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280210200141086a22021059200041146a2002105a20002002102f200128020820012d000c1035200141106a24000baf0102017e047f230041106b22032400200010074103762001106120001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810661a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011031200621040c010b0b0b5b01027f230041206b220224002000280200220310572001106120022003100736021820024100360214200220003602100340200241086a200241106a107a20022802080440200228020c200110300c0105200241206a24000b0b0bb00101027f230041206b2201240002402000280200450440200141086a1033200120012d000c3a001c200120012802083602184100200141186a2202105c2000280204200210302000290310200210312000280208200210320c010b200141106a1033200120012d00143a001c200120012802103602184101200141186a2202105c200028020420021059200041086a2002105a200041106a2002102f0b200128021820012d001c1035200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011062200241106a24000b0a0020001014200110140b5801027f230041106b2201240020011033200120012d00043a000c200120012802003602082000280208200141086a22021030200029030020021031200028020c20021032200128020820012d000c1035200141106a24000b7e01057f230041106b2201240020002802102203044010602001103420012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210612002200320051062200041186a2002105a200128020820012d000c103610151a0b200028020020002802042000280208200028020c1025000b1b01027f10292200101641c38108410a10442201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041062200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041a4d20828020022046b2002490d01200341086a2004200220046a220010792003280208200328020c20012002107441a4d20820003602000c020b200028020020012002100e1a0c010b20001075200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061065200141002002280208200228020c10661a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021026200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310420b3502017f017e230041106b220324002003410036020c20002003410c6a2200410420012002107d20004104107f200341106a2400a70b1f0020012002200310022201101c21022000200136020420002002453602000b1600200020011044220020022003100e1a2000100f000b3102017f017e230041106b220124002001410036020c20002001410c6a22004104104c20004104107f200141106a2400a70b09002000200110031a0b0c00200020002001101720000b0a0020002000200110180b1801017f10292101417242121001200120004172101b20010b0e01017f102922004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141a8d2082d00000d0141a4d208200636020041a8d20841013a0000200441086a20061072200541002004280208200428020c10661a200041013a00080b4101200120036a220041a4d2082802004b0d011a20042001200010732002200320042802002004280204107441000c010b200041003a0008200520012002200310660b200441106a24000b3d01017f230041106b22022400200241086a419484084190ce0020011065200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d011027000b1027000b2000200220016b36020420002001419484086a3602000bb50201067f2001200346044020012203410f4b04402000410020006b41037122046a210520040440200221010340200020012d00003a0000200141016a2101200041016a22002005490d000b0b2005200320046b2203417c7122066a21000240200220046a22044103710440200641004c0d012004410374220141187121072004417c71220841046a2102410020016b4118712109200828020021010340200520012007762002280200220120097472360200200241046a2102200541046a22052000490d000b0c010b200641004c0d0020042102034020052002280200360200200241046a2102200541046a22052000490d000b0b20034103712103200420066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b1027000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041a4d208280200107320002802002001280208200128020c100e1a41a4d208410036020041a8d20841003a00000b200141106a24000b0d00200010292200101d1a20000b080020001076103c0b0b0020002001103d10151a0b3f01017f230041106b22032400200341086a20012002419484084190ce001026200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410661a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c10442101200010473602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041066450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102a200341106a24000f0b200120024187810841111043000b2f00200041086a200028020020012002107104402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107d20012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a0041fc8308410310440b6802027f017e230041106b22032400200020012002107c21002003420037030820001007220441094f04402001200241a68008410e1043000b2003200341086a41082004106520004100200328020022002003280204220110421a20002001107f200341106a24000b1701017f101e410110534100104f2100108001200010780b0f00101e410010531080011077101f0b2301037f101e410110534100104f21001080012201107722022000106d2001200210780bc10101037f230041406a22002400101e4100105341c88308410a10442101200041086a103e20011041200041286a22022000280214102a1039200241e781084120103b21012002103a2102200028022c2000280228460440200041386a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602082001200041086a22011030200220011032200028020820002d000c1035200041406b24000f0b41e78108412041a68008410e1069000ba00202037f017e230041406a22002400101e4100105341c88308410a10442101200041086a103e200110410240024002402000280214102a220110070440200041286a220220011039410121010240024002402002107e41ff01710e020201000b41e78108412041808008410d1069000b200041286a220141e781084120103bad2001103aad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041a4d208410036020041a8d20841003a00000b2001450d010b420010140c010b20001033200020002d00043a000c200020002802003602084101200041086a2201105c2003a7200110302003422088a720011032200028020820002d000c10350b200041406b24000f0b41e78108412041a68008410e1069000be50101047f230041406a22002400101e4100105341c88308410a10442101200041086a103e20011041200041286a22012000280214102a103902402001107e41ff0171450440200041286a220241e781084120103b2002103a2103200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b20001033200020002d00043a000c200020002802003602084100200041086a2202105c20021030200320021032200028020820002d000c1035200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b1600101e4100105341d28308410b10444200103f101f0b1600101e4100105341c88308410a10444206103f101f0b0800101e410010530b1501017f101e41001053102922001020200010041a0b1300101e4100105341c483084104104410041a0b1300101e4101105341e083084110105010041a0b1000101e41001053410a1028106e101f0b0c00101e41001053420310140b0d00101e4100105342f40310140b0e00101e4100105342c09a0c10140b1000101e410010534280b4c4c32110140b1f01017f101e4100105310472200410a1049200041c09a0c1049200010041a0b2101017f101e4100105310472200420a107020004280b4c4c3211070200010041a0b9e0101027f230041306b22002400101e410010531047220141ba8308410510441049200141bf830841051044104920002001360214200041086a1033200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107a200028020004402000280204200041186a10300c010b0b200028021820002d001c1035200041306a24000bbc0101057f230041206b22002400101e4100105310472202410a1028106e10492002410a1028106e41021028106c1049200041086a1033200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410421a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1032200421010c010b0b200028021020002d00141035200041206a24000b1200101e41001053420a4280b4c4c321105d0b2401027f101e4100105341ba83084105104441bf830841051044210110041a200110041a0b2901027f101e4100105341ba830841051044410a1028106e210110041a4280b4c4c32110142001101f0b1100101e410110534100101042018610140b1a01017f101e410110534100104f2100410210282000106c101f0b2001017f101e4101105341001038220041c483084104104410031a200010041a0b1c01017f101e410210534100104f220020004101104f10182000101f0b6201037f230041106b22002400101e105510542000410036020020001046210220002802001051104721012000200210560340200028020820002802044f4504402001200041f483084108107c102a10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400101e1055105420004100360200200010462101200028020010512000200110560340200028020820002802044f450440200041f48308410810810120027c21020c010b0b20021014200041106a24000b6001037f230041106b22002400101e105510542000410036020020001046210220002802001051106f21012000200210560340200028020820002802044f4504402001200041f483084108107c103c106d0c010b0b2001101f200041106a24000b4501027f230041106b22002400101e4100105341c483084104104421012000410a1028106e36020c20004280b4c4c321370300200020013602082000105e200041106a24000b9f0102047f017e230041106b22002400101e41011053230041206b22012400200141086a220210372002102c21032002102d21042002102e21020240200128020c2001280208460440200141186a2d0000044041a4d208410036020041a8d20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1043000b2000105e200041106a24000b860101057f230041206b22002400101e4100105341c48308410410442103410a1028106e210410472201420a107020014280b4c4c32110701047220241ba8308410510441049200241bf83084105104410492000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1058200041206a24000bba0101067f230041206b22032400101e41011053200341086a2101230041306b22002400200041086a220210372002104d21042002104e2105200041206a2002102b0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1043000b20011058200341206a24000b0c00101e41001053420110140b5f02017f017e101e41011053027f024002404100101204404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1043000b41dd8308410341808008410d1043000bad42ff018310140b5001037f230041206b22002400101e4100105341c48308410410442101410a1028106e210220004280b4c4c3213703102000200136020420002002360208200041003602002000105b200041206a24000b900101057f230041206b22002400101e4100105341c48308410410442103410a1028106e210410472201420a107020014280b4c4c32110701047220241ba8308410510441049200241bf83084105104410492000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105b200041206a24000b970202057f027e230041206b22012400101e41011053230041306b22002400200041086a22021037200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1043000b200041086a2202102c21042002102d21062002102e21020c010b200041086a2203104d21042003104e2102200041206a2003102b2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041a4d208410036020041a8d20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1043000b2001105b200141206a24000baf0102037f047e230041306b22002400101e105510542000410036022c200041086a21012000412c6a220228020041acd2082802004e047e420105200241dd8308410310452103200241dd8308410310452104200241dd830841031045210542000b210620012005370318200120043703102001200337030820012006370300200028022c10512000290308500440200029031820002903202104200029031010141014200410140b200041306a24000b8e0102037f017e230041406a22002400101e41011053200041a783084107105036020c200041106a2000410c6a107b106f210120002903102203427f510440102121030b10292102200320002802182001200028021c2000280220200210221a1023200041306a220120021056200141cd8108410b108101200041306a41cd8108410b108101105d200041406b24000b5701027f230041406a22002400101e41011053200041a783084107105036023c200041206a2000413c6a107b106f210120004100360210200020013602042000200029022c370308200020002802283602002000105f000b7402037f017e230041206b22002400101e41011053200041a783084107105036021c20002000411c6a107b106f210120002802082102200029020c2103200041186a1047360200200041146a411c360200200041e882083602102000200337030820002001360204200020023602002000105f000b7402037f017e230041206b22002400101e41011053200041a783084107105036021c20002000411c6a107b106f210120002802082102200029020c2103200041186a1047360200200041146a411d3602002000418483083602102000200337030820002001360204200020023602002000105f000bbd0302057f027e230041f0006b2200240002400240024010602204107622031007450d00200041286a22012003102a1039200141b480084119103b2102200141b48008411910672101104721030340200104402003200041286a41b480084119103b1049200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041a4d208410036020041a8d20841003a00000b416c418084084100100c1a2004416c10151a2000200210642000280220450d00200041286a200210642000280248450d000240200041286a41e88208411c1063450440200041286a41848308411d10630d014197820841361000000b105510542000410036026c200041d0006a2201200041ec006a104a200028026c10512000280250200029035821052000290360210620012003105610552000280254200028025810520d0320052006105d0c010b105510542000410036026c200041d0006a2201200041ec006a104a200028026c10512000280250200029035821052000290360210620012003105610552000280254200028025810520d0220052006105d0b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b0b89040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080ba103617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f6164647265737361726773766172206172677373756d0070616e6963206f6363757272656400419084080b049cffffff@0500@0500@05".to_string(), + data: "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0500@07".to_string(), }; assert_eq!(tx, Ok(expected)); diff --git a/tester/core/tests/mock_call.rs b/tester/core/tests/mock_call.rs index 46f56ca..0cafcb6 100644 --- a/tester/core/tests/mock_call.rs +++ b/tester/core/tests/mock_call.rs @@ -5,8 +5,9 @@ use novax::Address; use novax::errors::NovaXError; use novax_mocking::world::infos::ScenarioWorldInfos; use num_bigint::{BigInt, BigUint}; +use novax::executor::call_result::CallResult; use novax::tester::tester::{CustomEnum, CustomEnumWithFields, CustomEnumWithValues, CustomStruct, CustomStructWithStructAndVec, TesterContract}; -use novax::executor::StandardMockExecutor; +use novax::executor::{ExecutorError, MockTransactionError, StandardMockExecutor}; use novax_mocking::ScenarioWorld; const CALLER: &str = "bech32:erd1h4uhy73dev6qrfj7wxsguapzs8632mfwqjswjpsj6kzm2jfrnslqsuduqu"; @@ -78,10 +79,13 @@ async fn test_call_return_caller_no_caller_set() -> Result<(), NovaXError> { ) .call(executor, 600000000) .return_caller() - .await?; + .await + .err() + .unwrap(); - assert!(result.response.is_success()); - assert_eq!(result.result, Some(Address::from(TESTER_CONTRACT_ADDRESS))); + let expected = NovaXError::Executor(ExecutorError::MockTransaction(MockTransactionError::CallerAddressNotPresent)); + + assert_eq!(result, expected); Ok(()) } diff --git a/tester/core/tests/network_call.rs b/tester/core/tests/network_call.rs index 1afd54d..7fd0cc7 100644 --- a/tester/core/tests/network_call.rs +++ b/tester/core/tests/network_call.rs @@ -7,7 +7,7 @@ use tokio::sync::Mutex; use novax::Address; use novax::data::NativeConvertible; use novax::errors::NovaXError; -use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, ExecutorError, NetworkExecutor, SendableTransactionConvertible, TokenTransfer, TopDecodeMulti, TransactionExecutor, TransactionOnNetwork, TransactionOnNetworkTransaction, TransactionOnNetworkTransactionSmartContractResult, Wallet}; +use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, ExecutorError, NetworkExecutor, SendableTransactionConvertible, TokenTransfer, TopDecodeMulti, TransactionExecutor, TransactionOnNetwork, TransactionOnNetworkTransaction, TransactionOnNetworkTransactionLogs, TransactionOnNetworkTransactionSmartContractResult, Wallet}; use novax::tester::tester::{CustomEnum, CustomEnumWithFields, CustomEnumWithValues, CustomStruct, CustomStructWithStructAndVec, TesterContract}; use novax_mocking::ScDeployStep; @@ -135,6 +135,10 @@ impl BlockchainInteractor for MockInteractor { } ]), status: "executed".to_string(), + logs: TransactionOnNetworkTransactionLogs { + address: "".to_string(), + events: vec![], + }, }, }; diff --git a/tester/core/tests/network_deploy.rs b/tester/core/tests/network_deploy.rs index 010a899..754991e 100644 --- a/tester/core/tests/network_deploy.rs +++ b/tester/core/tests/network_deploy.rs @@ -38,9 +38,15 @@ impl BlockchainInteractor for MockInteractor { let mut return_data: Option = None; let deploy_with_biguint_arg_metadata_nothing_data = "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@05"; + let deploy_with_biguint_arg_biguint_return_metadata_nothing_data = "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@0a"; + let deploy_with_biguint_arg_metadata_upgradeable_readable_data = "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0500@07"; if data == deploy_with_biguint_arg_metadata_nothing_data { - return_data = Some("@6f6b@5393e5fe16508e5a31db9b6f9eda760c79d077c6e00f5f4f9bb3bfbc309a7b8c".to_string()); + return_data = Some("@6f6b".to_string()); + } else if data == deploy_with_biguint_arg_biguint_return_metadata_nothing_data { + return_data = Some("@6f6b@0a".to_string()); + } else if data == deploy_with_biguint_arg_metadata_upgradeable_readable_data { + return_data = Some("@6f6b".to_string()); } let Some(return_data) = return_data else { @@ -98,7 +104,7 @@ async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { let deploy_data = DeployData { code: "../../.novax/tester-contract.wasm", - metadata: CodeMetadata::default(), + metadata: CodeMetadata::empty(), }; let deploy_result: (Address, CallResult<()>) = TesterContract::deploy( @@ -121,20 +127,20 @@ async fn test_deploy_with_return_value() -> Result<(), NovaXError> { let deploy_data = DeployData { code: "../../.novax/tester-contract.wasm", - metadata: Default::default(), + metadata: CodeMetadata::empty(), }; let deploy_result: (Address, CallResult) = TesterWithReturningDeployContract::deploy( deploy_data, &mut executor, 600000000u64, - &BigUint::from(5u8) + &BigUint::from(10u8) ) .await .unwrap(); assert_eq!(deploy_result.0, Address::from(NEW_CONTRACT)); - assert_eq!(deploy_result.1.result.unwrap(), BigUint::from(5u8)); + assert_eq!(deploy_result.1.result.unwrap(), BigUint::from(10u8)); Ok(()) } @@ -152,7 +158,7 @@ async fn test_deploy_with_biguint_arg_with_metadatas() -> Result<(), NovaXError> deploy_data, &mut executor, 600000000u64, - &BigUint::from(5u8) + &BigUint::from(7u8) ) .await .unwrap(); From f87397bb8d84cd4dae784b5af8c0b539310e58ad Mon Sep 17 00:00:00 2001 From: Fusee Date: Tue, 28 May 2024 17:46:59 +0200 Subject: [PATCH 11/25] simulation & caching duration strategy --- abi-build/src/generator/impl_abi_mod.rs | 5 - caching/src/date/get_current_timestamp.rs | 41 ++++++++ caching/src/local/caching_local.rs | 68 +++++-------- caching/src/locked/caching.rs | 56 +++++------ caching/src/multi/caching.rs | 67 ++++++------- core/src/caching/caching_none.rs | 12 +-- core/src/caching/caching_strategy.rs | 20 ++-- core/src/caching/mod.rs | 1 + executor/src/base/deploy.rs | 20 ---- executor/src/dummy/transaction.rs | 9 +- executor/src/error/simulation.rs | 4 +- executor/src/mocking/executor.rs | 10 -- executor/src/network/simulate.rs | 77 +++++++-------- executor/src/network/transaction/executor.rs | 37 +------ .../src/network/transaction/interactor.rs | 5 + executor/src/utils/transaction/data.rs | 99 +------------------ executor/src/utils/transaction/mod.rs | 3 +- executor/src/utils/transaction/results.rs | 27 +++++ tester/core/tests/network_simulate.rs | 4 +- token/src/mock/request.rs | 2 +- 20 files changed, 217 insertions(+), 350 deletions(-) create mode 100644 executor/src/utils/transaction/results.rs diff --git a/abi-build/src/generator/impl_abi_mod.rs b/abi-build/src/generator/impl_abi_mod.rs index b6b1791..681eb9f 100644 --- a/abi-build/src/generator/impl_abi_mod.rs +++ b/abi-build/src/generator/impl_abi_mod.rs @@ -13,11 +13,6 @@ pub fn generate_from_abi(abi: &Abi) -> Result { let content = if let Ok(content_file) = syn::parse_file(&content) { prettyplease::unparse(&content_file) } else { - match syn::parse_file(&content) { - Err(error) => println!("hey!!! {}", error.to_string()), - _ => todo!() - } - println!("{content}"); return Err(crate::generator::generator_error::GeneratorError::UnableToFormatRustCode.into()) }; diff --git a/caching/src/date/get_current_timestamp.rs b/caching/src/date/get_current_timestamp.rs index 7ce27c1..68ccbdc 100644 --- a/caching/src/date/get_current_timestamp.rs +++ b/caching/src/date/get_current_timestamp.rs @@ -1,3 +1,12 @@ +pub(crate) fn get_timestamp_of_next_block(current_timestamp: Duration) -> Result { + let mut timestamp = current_timestamp.as_secs() + 1; + while timestamp % 6 != 0 { + timestamp += 1 + } + + Ok(Duration::from_secs(timestamp)) +} + #[cfg(not(test))] mod implementation { use std::time::{Duration, SystemTime, UNIX_EPOCH}; @@ -12,10 +21,12 @@ mod implementation { } } +use std::time::Duration; pub(crate) use implementation::get_current_timestamp; #[cfg(test)] pub(crate) use implementation::set_mock_time; +use novax::errors::NovaXError; #[cfg(test)] mod implementation { @@ -42,4 +53,34 @@ mod implementation { *mock_time = new_time; }); } +} + +#[cfg(test)] +mod tests { + use std::time::Duration; + use crate::date::get_current_timestamp::get_timestamp_of_next_block; + + #[test] + fn test_get_timestamp_of_next_block_start_of_block() { + let result = get_timestamp_of_next_block(Duration::from_secs(6)).unwrap(); + let expected = Duration::from_secs(12); + + assert_eq!(result, expected); + } + + #[test] + fn test_get_timestamp_of_next_block_mid_of_block() { + let result = get_timestamp_of_next_block(Duration::from_secs(8)).unwrap(); + let expected = Duration::from_secs(12); + + assert_eq!(result, expected); + } + + #[test] + fn test_get_timestamp_of_next_block_end_of_block() { + let result = get_timestamp_of_next_block(Duration::from_secs(11)).unwrap(); + let expected = Duration::from_secs(12); + + assert_eq!(result, expected); + } } \ No newline at end of file diff --git a/caching/src/local/caching_local.rs b/caching/src/local/caching_local.rs index a293bd4..17f82a1 100644 --- a/caching/src/local/caching_local.rs +++ b/caching/src/local/caching_local.rs @@ -6,24 +6,22 @@ use std::time::Duration; use serde::Serialize; use serde::de::DeserializeOwned; use tokio::sync::Mutex; -use novax::caching::CachingStrategy; +use novax::caching::{CachingDurationStrategy, CachingStrategy}; use novax::errors::NovaXError; use novax::errors::CachingError; -use crate::date::get_current_timestamp::get_current_timestamp; +use crate::date::get_current_timestamp::{get_current_timestamp, get_timestamp_of_next_block}; #[derive(Clone, Debug)] pub struct CachingLocal { - duration: Duration, - until_next_block: bool, + duration_strategy: CachingDurationStrategy, value_map: Arc>>>, expiration_timestamp_map: Arc>> } impl CachingLocal { - pub fn empty() -> CachingLocal { + pub fn empty(duration_strategy: CachingDurationStrategy) -> CachingLocal { CachingLocal { - duration: Duration::from_secs(0), - until_next_block: false, + duration_strategy, value_map: Arc::new(Mutex::new(HashMap::new())), expiration_timestamp_map: Arc::new(Mutex::new(HashMap::new())) } @@ -41,15 +39,13 @@ impl CachingLocal { async fn set_value(&self, key: u64, value: &T) -> Result<(), NovaXError> { let current_timestamp = get_current_timestamp()?; - let expiration_timestamp = if self.until_next_block { - let mut timestamp = current_timestamp.as_secs() + 1; - while timestamp % 6 != 5 { - timestamp += 1 + let expiration_timestamp = match self.duration_strategy { + CachingDurationStrategy::EachBlock => { + get_timestamp_of_next_block(current_timestamp)? + } + CachingDurationStrategy::Duration(duration) => { + current_timestamp + duration } - - Duration::from_secs(timestamp) - } else { - current_timestamp + self.duration }; self.expiration_timestamp_map.lock().await.insert(key, expiration_timestamp); @@ -65,7 +61,7 @@ impl CachingStrategy for CachingLocal { async fn get_cache(&self, key: u64) -> Result, NovaXError> { let Some(expiration_timestamp) = self.expiration_timestamp_map.lock().await.get(&key).cloned() else { return Ok(None) }; - if get_current_timestamp()? > expiration_timestamp { + if get_current_timestamp()? >= expiration_timestamp { self.remove_key(key).await; Ok(None) } else { @@ -101,19 +97,9 @@ impl CachingStrategy for CachingLocal { Ok(()) } - fn with_duration(&self, duration: Duration) -> Self { - CachingLocal { - duration, - until_next_block: self.until_next_block, - value_map: self.value_map.clone(), - expiration_timestamp_map: self.expiration_timestamp_map.clone() - } - } - - fn until_next_block(&self) -> Self { + fn with_duration_strategy(&self, strategy: CachingDurationStrategy) -> Self { CachingLocal { - duration: Duration::from_secs(0), - until_next_block: true, + duration_strategy: strategy, value_map: self.value_map.clone(), expiration_timestamp_map: self.expiration_timestamp_map.clone() } @@ -123,14 +109,14 @@ impl CachingStrategy for CachingLocal { #[cfg(test)] mod test { use std::time::Duration; - use novax::caching::CachingStrategy; + use novax::caching::{CachingDurationStrategy, CachingStrategy}; use novax::errors::NovaXError; use crate::date::get_current_timestamp::set_mock_time; use crate::local::caching_local::CachingLocal; #[tokio::test] async fn test_get_cache_key_not_found() -> Result<(), NovaXError> { - let caching = CachingLocal::empty(); + let caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let key = 1; let result = caching.get_cache::<()>(key).await?; @@ -142,7 +128,7 @@ mod test { #[tokio::test] async fn test_set_cache() -> Result<(), NovaXError> { - let caching = CachingLocal::empty(); + let caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let key = 1; let value = "test".to_string(); @@ -158,13 +144,13 @@ mod test { #[tokio::test] async fn test_get_cache_before_expiration() -> Result<(), NovaXError> { - let caching = CachingLocal::empty().with_duration(Duration::from_secs(10)); + let caching = CachingLocal::empty(CachingDurationStrategy::Duration(Duration::from_secs(10))); let key = 1; let value = "test".to_string(); caching.set_cache(key, &value).await?; - set_mock_time(Duration::from_secs(10)); + set_mock_time(Duration::from_secs(9)); let result = caching.get_cache::(key).await?; let expected = Some("test".to_string()); @@ -177,7 +163,7 @@ mod test { #[tokio::test] async fn test_get_cache_after_expiration() -> Result<(), NovaXError> { - let caching = CachingLocal::empty().with_duration(Duration::from_secs(10)); + let caching = CachingLocal::empty(CachingDurationStrategy::Duration(Duration::from_secs(10))); let key = 1; let value = "test".to_string(); @@ -196,7 +182,7 @@ mod test { #[tokio::test] async fn test_get_cache_start_of_block() -> Result<(), NovaXError> { set_mock_time(Duration::from_secs(0)); - let caching = CachingLocal::empty().until_next_block(); + let caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let key = 1; let value = "test".to_string(); @@ -215,7 +201,7 @@ mod test { #[tokio::test] async fn test_get_cache_same_block() -> Result<(), NovaXError> { set_mock_time(Duration::from_secs(3)); - let caching = CachingLocal::empty().until_next_block(); + let caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let key = 1; let value = "test".to_string(); @@ -234,7 +220,7 @@ mod test { #[tokio::test] async fn test_get_cache_next_block() -> Result<(), NovaXError> { set_mock_time(Duration::from_secs(3)); - let caching = CachingLocal::empty().until_next_block(); + let caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let key = 1; let value = "test".to_string(); @@ -252,7 +238,7 @@ mod test { #[tokio::test] async fn test_get_or_set_cache_without_previous_value() -> Result<(), NovaXError> { - let caching = CachingLocal::empty(); + let caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let key = 1; let result = caching.get_or_set_cache( @@ -271,7 +257,7 @@ mod test { #[tokio::test] async fn test_get_or_set_cache_with_previous_value() -> Result<(), NovaXError> { - let caching = CachingLocal::empty(); + let caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let key = 1; caching.set_cache(key, &"old value".to_string()).await?; @@ -292,7 +278,7 @@ mod test { #[tokio::test] async fn test_get_or_set_cache_with_previous_value_after_expiration() -> Result<(), NovaXError> { - let caching = CachingLocal::empty().with_duration(Duration::from_secs(10)); + let caching = CachingLocal::empty(CachingDurationStrategy::Duration(Duration::from_secs(10))); let key = 1; caching.set_cache(key, &"old value".to_string()).await?; @@ -315,7 +301,7 @@ mod test { #[tokio::test] async fn test_clear() -> Result<(), NovaXError> { - let caching = CachingLocal::empty(); + let caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); caching.set_cache(1, &"test".to_string()).await?; caching.set_cache(2, &"test2".to_string()).await?; diff --git a/caching/src/locked/caching.rs b/caching/src/locked/caching.rs index 8ad52f1..00052c7 100644 --- a/caching/src/locked/caching.rs +++ b/caching/src/locked/caching.rs @@ -6,7 +6,7 @@ use async_trait::async_trait; use serde::de::DeserializeOwned; use serde::Serialize; use tokio::sync::{Mutex, RwLock}; -use novax::caching::CachingStrategy; +use novax::caching::{CachingDurationStrategy, CachingStrategy}; use novax::errors::NovaXError; #[derive(Clone, Debug)] @@ -81,12 +81,8 @@ impl CachingStrategy for CachingLocked { self.caching.clear().await } - fn with_duration(&self, duration: Duration) -> Self { - CachingLocked::new(self.caching.with_duration(duration)) - } - - fn until_next_block(&self) -> Self { - CachingLocked::new(self.caching.until_next_block()) + fn with_duration_strategy(&self, strategy: CachingDurationStrategy) -> Self { + CachingLocked::new(self.caching.with_duration_strategy(strategy)) } } @@ -99,7 +95,7 @@ mod test { use serde::de::DeserializeOwned; use serde::Serialize; use tokio::sync::Mutex; - use novax::caching::CachingStrategy; + use novax::caching::{CachingDurationStrategy, CachingStrategy}; use novax::errors::NovaXError; use crate::date::get_current_timestamp::set_mock_time; use crate::local::caching_local::CachingLocal; @@ -111,9 +107,9 @@ mod test { } impl CachingLocalDelayedSet { - fn empty() -> Self { + fn empty(duration_strategy: CachingDurationStrategy) -> Self { CachingLocalDelayedSet { - caching: CachingLocal::empty() + caching: CachingLocal::empty(duration_strategy) } } } @@ -142,22 +138,16 @@ mod test { self.caching.clear().await } - fn with_duration(&self, duration: Duration) -> Self { - CachingLocalDelayedSet { - caching: self.caching.with_duration(duration) - } - } - - fn until_next_block(&self) -> Self { + fn with_duration_strategy(&self, strategy: CachingDurationStrategy) -> Self { CachingLocalDelayedSet { - caching: self.caching.until_next_block() + caching: self.caching.with_duration_strategy(strategy) } } } #[tokio::test] async fn test_get_cache_key_not_found() -> Result<(), NovaXError> { - let caching_local = CachingLocal::empty(); + let caching_local = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingLocked::new(caching_local); let key = 1; @@ -170,7 +160,7 @@ mod test { #[tokio::test] async fn test_set_cache() -> Result<(), NovaXError> { - let caching_local = CachingLocal::empty(); + let caching_local = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingLocked::new(caching_local); let key = 1; let value = "test".to_string(); @@ -187,7 +177,7 @@ mod test { #[tokio::test] async fn test_clear() -> Result<(), NovaXError> { - let caching_local = CachingLocal::empty(); + let caching_local = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingLocked::new(caching_local); caching.set_cache(1, &"test".to_string()).await?; @@ -206,14 +196,14 @@ mod test { #[tokio::test] async fn test_get_cache_before_expiration() -> Result<(), NovaXError> { - let caching_local = CachingLocal::empty().with_duration(Duration::from_secs(10)); + let caching_local = CachingLocal::empty(CachingDurationStrategy::Duration(Duration::from_secs(10))); let caching = CachingLocked::new(caching_local); let key = 1; let value = "test".to_string(); caching.set_cache(key, &value).await?; - set_mock_time(Duration::from_secs(10)); + set_mock_time(Duration::from_secs(9)); let result = caching.get_cache::(key).await?; let expected = Some("test".to_string()); @@ -226,7 +216,7 @@ mod test { #[tokio::test] async fn test_get_cache_after_expiration() -> Result<(), NovaXError> { - let caching_local = CachingLocal::empty().with_duration(Duration::from_secs(10)); + let caching_local = CachingLocal::empty(CachingDurationStrategy::Duration(Duration::from_secs(10))); let caching = CachingLocked::new(caching_local); let key = 1; let value = "test".to_string(); @@ -246,7 +236,7 @@ mod test { #[tokio::test] async fn test_get_cache_start_of_block() -> Result<(), NovaXError> { set_mock_time(Duration::from_secs(0)); - let caching_local = CachingLocal::empty().until_next_block(); + let caching_local = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingLocked::new(caching_local); let key = 1; let value = "test".to_string(); @@ -266,7 +256,7 @@ mod test { #[tokio::test] async fn test_get_cache_same_block() -> Result<(), NovaXError> { set_mock_time(Duration::from_secs(3)); - let caching_local = CachingLocal::empty().until_next_block(); + let caching_local = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingLocked::new(caching_local); let key = 1; let value = "test".to_string(); @@ -286,7 +276,7 @@ mod test { #[tokio::test] async fn test_get_cache_next_block() -> Result<(), NovaXError> { set_mock_time(Duration::from_secs(3)); - let caching_local = CachingLocal::empty().until_next_block(); + let caching_local = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingLocked::new(caching_local); let key = 1; let value = "test".to_string(); @@ -305,7 +295,7 @@ mod test { #[tokio::test] async fn test_get_or_set_cache_without_previous_value() -> Result<(), NovaXError> { - let caching_local = CachingLocal::empty(); + let caching_local = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingLocked::new(caching_local); let key = 1; @@ -325,7 +315,7 @@ mod test { #[tokio::test] async fn test_get_or_set_cache_with_previous_value() -> Result<(), NovaXError> { - let caching_local = CachingLocal::empty(); + let caching_local = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingLocked::new(caching_local); let key = 1; @@ -347,7 +337,7 @@ mod test { #[tokio::test] async fn test_get_or_set_cache_with_previous_value_after_expiration() -> Result<(), NovaXError> { - let caching_local = CachingLocal::empty().with_duration(Duration::from_secs(10)); + let caching_local = CachingLocal::empty(CachingDurationStrategy::Duration(Duration::from_secs(10))); let caching = CachingLocked::new(caching_local); let key = 1; @@ -374,7 +364,7 @@ mod test { let key = 1u64; let first_value = "test1".to_string(); let second_value = "test2".to_string(); - let caching_local_delayed = CachingLocalDelayedSet::empty(); + let caching_local_delayed = CachingLocalDelayedSet::empty(CachingDurationStrategy::EachBlock); caching_local_delayed.set_cache(key, &first_value).await.unwrap(); let caching = CachingLocked::new(caching_local_delayed); @@ -407,7 +397,7 @@ mod test { async fn test_locker_get_or_set_cache_value_already_present() { let key = 1u64; let value = "test1".to_string(); - let caching_local = CachingLocal::empty(); + let caching_local = CachingLocal::empty(CachingDurationStrategy::EachBlock); caching_local.set_cache(key, &value).await.unwrap(); let caching = CachingLocked::new(caching_local); @@ -446,7 +436,7 @@ mod test { async fn test_locker_get_or_set_cache_no_previous_value() { let key = 1u64; let second_value = "test2".to_string(); - let caching_local = CachingLocal::empty(); + let caching_local = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingLocked::new(caching_local); let fake_value = Arc::new(Mutex::new(0u64)); diff --git a/caching/src/multi/caching.rs b/caching/src/multi/caching.rs index d70559e..d4d3498 100644 --- a/caching/src/multi/caching.rs +++ b/caching/src/multi/caching.rs @@ -4,7 +4,7 @@ use async_trait::async_trait; use serde::de::DeserializeOwned; use serde::Serialize; use tokio::join; -use novax::caching::CachingStrategy; +use novax::caching::{CachingDurationStrategy, CachingStrategy}; use novax::errors::NovaXError; #[derive(Clone, Debug)] @@ -88,17 +88,10 @@ where Ok(()) } - fn with_duration(&self, duration: Duration) -> Self { + fn with_duration_strategy(&self, strategy: CachingDurationStrategy) -> Self { CachingMulti::new( - self.first.with_duration(duration), - self.second.with_duration(duration) - ) - } - - fn until_next_block(&self) -> Self { - CachingMulti::new( - self.first.until_next_block(), - self.second.until_next_block() + self.first.with_duration_strategy(strategy.clone()), + self.second.with_duration_strategy(strategy) ) } } @@ -106,7 +99,7 @@ where #[cfg(test)] mod test { use std::time::Duration; - use novax::caching::CachingStrategy; + use novax::caching::{CachingDurationStrategy, CachingStrategy}; use novax::errors::NovaXError; use crate::local::caching_local::CachingLocal; use crate::multi::caching::CachingMulti; @@ -116,9 +109,9 @@ mod test { async fn test_get_cache_no_cache() -> Result<(), NovaXError> { let key = 1u64; - let first_caching = CachingLocal::empty(); + let first_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); - let second_caching = CachingLocal::empty(); + let second_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingMulti::new(first_caching, second_caching); @@ -134,10 +127,10 @@ mod test { async fn test_get_cache_first_only() -> Result<(), NovaXError> { let key = 1u64; let value = "test".to_string(); - let first_caching = CachingLocal::empty(); + let first_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); first_caching.set_cache(key, &value).await?; - let second_caching = CachingLocal::empty(); + let second_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingMulti::new(first_caching, second_caching); @@ -153,9 +146,9 @@ mod test { async fn test_get_cache_second_only() -> Result<(), NovaXError> { let key = 1u64; let value = "test".to_string(); - let first_caching = CachingLocal::empty(); + let first_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); - let second_caching = CachingLocal::empty(); + let second_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); second_caching.set_cache(key, &value).await?; let caching = CachingMulti::new(first_caching, second_caching); @@ -172,11 +165,11 @@ mod test { async fn test_get_cache_first_and_second() -> Result<(), NovaXError> { let key = 1u64; let first_value = "test1".to_string(); - let first_caching = CachingLocal::empty(); + let first_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); first_caching.set_cache(key, &first_value).await?; let second_value = "test2".to_string(); - let second_caching = CachingLocal::empty(); + let second_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); second_caching.set_cache(key, &second_value).await?; let caching = CachingMulti::new(first_caching, second_caching); @@ -194,8 +187,8 @@ mod test { let key = 1u64; let value = "test".to_string(); - let first_caching = CachingLocal::empty(); - let second_caching = CachingLocal::empty(); + let first_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); + let second_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingMulti::new(first_caching.clone(), second_caching.clone()); caching.set_cache(key, &value).await?; @@ -212,8 +205,8 @@ mod test { #[tokio::test] async fn test_clear() -> Result<(), NovaXError> { - let first_caching = CachingLocal::empty(); - let second_caching = CachingLocal::empty(); + let first_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); + let second_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingMulti::new(first_caching.clone(), second_caching.clone()); @@ -236,17 +229,17 @@ mod test { let key = 1u64; let value = "test".to_string(); - let first_caching = CachingLocal::empty(); - let second_caching = CachingLocal::empty(); + let first_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); + let second_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingMulti::new( first_caching.clone(), second_caching.clone() ) - .with_duration(Duration::from_secs(10)); + .with_duration_strategy(CachingDurationStrategy::Duration(Duration::from_secs(10))); caching.set_cache(key, &value).await?; - set_mock_time(Duration::from_secs(10)); + set_mock_time(Duration::from_secs(9)); let first_result = first_caching.get_cache::(key).await?; let second_result = second_caching.get_cache::(key).await?; @@ -263,14 +256,14 @@ mod test { let key = 1u64; let value = "test".to_string(); - let first_caching = CachingLocal::empty(); - let second_caching = CachingLocal::empty(); + let first_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); + let second_caching = CachingLocal::empty(CachingDurationStrategy::EachBlock); let caching = CachingMulti::new( first_caching.clone(), second_caching.clone() ) - .with_duration(Duration::from_secs(10)); + .with_duration_strategy(CachingDurationStrategy::Duration(Duration::from_secs(10))); caching.set_cache(key, &value).await?; set_mock_time(Duration::from_secs(11)); @@ -291,14 +284,14 @@ mod test { let key = 1u64; let value = "test".to_string(); - let first_caching = CachingLocal::empty(); - let second_caching = CachingLocal::empty(); + let first_caching = CachingLocal::empty(CachingDurationStrategy::Duration(Duration::from_secs(0))); + let second_caching = CachingLocal::empty(CachingDurationStrategy::Duration(Duration::from_secs(0))); let caching = CachingMulti::new( first_caching.clone(), second_caching.clone() ) - .until_next_block(); + .with_duration_strategy(CachingDurationStrategy::EachBlock); caching.set_cache(key, &value).await?; set_mock_time(Duration::from_secs(5)); @@ -319,14 +312,14 @@ mod test { let key = 1u64; let value = "test".to_string(); - let first_caching = CachingLocal::empty(); - let second_caching = CachingLocal::empty(); + let first_caching = CachingLocal::empty(CachingDurationStrategy::Duration(Duration::from_secs(0))); + let second_caching = CachingLocal::empty(CachingDurationStrategy::Duration(Duration::from_secs(0))); let caching = CachingMulti::new( first_caching.clone(), second_caching.clone() ) - .until_next_block(); + .with_duration_strategy(CachingDurationStrategy::EachBlock); caching.set_cache(key, &value).await?; set_mock_time(Duration::from_secs(6)); diff --git a/core/src/caching/caching_none.rs b/core/src/caching/caching_none.rs index fe6a18e..b91c406 100644 --- a/core/src/caching/caching_none.rs +++ b/core/src/caching/caching_none.rs @@ -3,7 +3,7 @@ use std::future::Future; use std::time::Duration; use serde::Serialize; use serde::de::DeserializeOwned; -use crate::caching::caching_strategy::CachingStrategy; +use crate::caching::caching_strategy::{CachingDurationStrategy, CachingStrategy}; use crate::errors::NovaXError; /// An implementation of the `CachingStrategy` trait that performs no caching. @@ -43,15 +43,7 @@ impl CachingStrategy for CachingNone { value_fn.await } - /// Attempts to create a new `CachingNone` instance with a specified cache duration, - /// but returns a new unchanged `CachingNone` instance since `CachingNone` does not support cache duration. - fn with_duration(&self, _duration: Duration) -> Self { - CachingNone - } - - /// Attempts to create a new `CachingNone` instance that caches values until the next block, - /// but returns a new unchanged `CachingNone` instance since `CachingNone` does not support caching until the next block. - fn until_next_block(&self) -> Self { + fn with_duration_strategy(&self, _strategy: CachingDurationStrategy) -> Self { CachingNone } } \ No newline at end of file diff --git a/core/src/caching/caching_strategy.rs b/core/src/caching/caching_strategy.rs index 88e0278..f7df37c 100644 --- a/core/src/caching/caching_strategy.rs +++ b/core/src/caching/caching_strategy.rs @@ -6,6 +6,12 @@ use serde::de::DeserializeOwned; use serde::Serialize; use crate::errors::NovaXError; +#[derive(Clone, Debug)] +pub enum CachingDurationStrategy { + EachBlock, + Duration(Duration) +} + /// The `CachingStrategy` trait defines the interface for caching strategies used within the "novax" crate. /// /// This trait provides methods for getting, setting, and managing cache data while interacting with smart contracts. @@ -61,20 +67,14 @@ pub trait CachingStrategy: Clone + Send + Sync + Debug { /// - A `Result` indicating success or an error if the operation fails. async fn clear(&self) -> Result<(), NovaXError>; - /// Creates a new `CachingStrategy` instance with a specified cache duration. + /// Creates a new `CachingStrategy` instance with a specified cache duration strategy. /// /// # Parameters - /// - `duration`: The duration for which cache entries should be kept. - /// - /// # Returns - /// - A new `CachingStrategy` instance with the specified cache duration. - fn with_duration(&self, duration: Duration) -> Self; - - /// Creates a new `CachingStrategy` instance that caches values until the next blockchain block. + /// - `strategy`: The duration for which cache entries should be kept. /// /// # Returns - /// - A new `CachingStrategy` instance with the caching behavior set to expire cache entries at the arrival of the next blockchain block. - fn until_next_block(&self) -> Self; + /// - A new `CachingStrategy` instance with the specified cache duration strategy. + fn with_duration_strategy(&self, strategy: CachingDurationStrategy) -> Self; } diff --git a/core/src/caching/mod.rs b/core/src/caching/mod.rs index 646a529..d0cecea 100644 --- a/core/src/caching/mod.rs +++ b/core/src/caching/mod.rs @@ -2,4 +2,5 @@ mod caching_strategy; mod caching_none; pub use caching_strategy::CachingStrategy; +pub use caching_strategy::CachingDurationStrategy; pub use caching_none::CachingNone; \ No newline at end of file diff --git a/executor/src/base/deploy.rs b/executor/src/base/deploy.rs index b144e8a..fe8327a 100644 --- a/executor/src/base/deploy.rs +++ b/executor/src/base/deploy.rs @@ -41,16 +41,6 @@ pub trait DeployExecutor: Send + Sync { ) -> Result<(Address, CallResult), ExecutorError> where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; - - /// Indicates whether to skip deserialization during the deployment execution. - /// - /// This could be useful in cases where deserialization is either unnecessary or could cause errors, - /// for example, with the `DummyExecutor`. - /// - /// # Returns - /// - /// A `bool` indicating whether deserialization should be skipped. - async fn should_skip_deserialization(&self) -> bool; // TODO: remove } /// An implementation of `DeployExecutor` for `Arc>` where `T: DeployExecutor`. @@ -76,14 +66,4 @@ impl DeployExecutor for Arc> { locked.sc_deploy::(bytes, code_metadata, egld_value, arguments, gas_limit).await } } - - /// Indicates whether to skip deserialization during the deployment execution, delegating to the inner `DeployExecutor`. - async fn should_skip_deserialization(&self) -> bool { - { - // Locking here can lead to some performance penalty. A potential solution may be to use - // another type other than Mutex, like RwLock. - let locked = self.lock().await; - locked.should_skip_deserialization().await - } - } } diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index 672b744..545fbef 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -35,10 +35,10 @@ pub struct DummyExecutor { pub caller: Option
} -impl DummyExecutor { +impl DummyExecutor { /// Retrieves the transaction details encapsulated into a `SendableTransaction`. pub fn get_transaction_details(&self) -> Result { - if let Some(tx) = &self.tx { + if let Some(tx) = self.tx.clone() { Ok(tx.to_sendable_transaction()) } else { Err(DummyExecutorError::NoTransactionSent.into()) @@ -152,9 +152,4 @@ impl DeployExecutor for DummyExecutor { Ok((Address::default(), deploy_result)) } - - /// Indicates that deserialization should be skipped as there is no actual execution. - async fn should_skip_deserialization(&self) -> bool { - true - } } \ No newline at end of file diff --git a/executor/src/error/simulation.rs b/executor/src/error/simulation.rs index b028ae5..e856a6d 100644 --- a/executor/src/error/simulation.rs +++ b/executor/src/error/simulation.rs @@ -14,7 +14,9 @@ pub enum SimulationError { /// A code associated with the error. Useful for programmatically identifying /// the nature of the error, and may be helpful in debugging or categorizing different types of execution errors. code: String - } + }, + + NoSmartContractResult } impl From for ExecutorError { diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index eaf5558..bb1d208 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -223,16 +223,6 @@ impl DeployExecutor for MockExecutor Ok((Address::from_bytes(*new_address.as_array()), call_result)) } - - /// Specifies whether deserialization should be skipped during the deployment execution. - /// In this implementation, deserialization is not skipped. - /// - /// # Returns - /// - /// A `bool` value of `false`, indicating that deserialization should not be skipped. - async fn should_skip_deserialization(&self) -> bool { - false - } } /// The `MockExecutor` implementation for the `QueryExecutor` trait, used to simulate smart contract queries in a mock environment. diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index 2c6af6b..97cc3ee 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -10,11 +10,14 @@ use tokio::join; use novax_data::{Address, NativeConvertible}; use novax_request::gateway::client::GatewayClient; -use crate::{ExecutorError, GatewayError, SimulationGatewayRequest, SimulationGatewayResponse, TransactionExecutor}; +use crate::{ExecutorError, GatewayError, SimulationError, SimulationGatewayRequest, SimulationGatewayResponse, TransactionExecutor, TransactionOnNetworkTransactionSmartContractResult}; use crate::call_result::CallResult; +use crate::error::transaction::TransactionError; use crate::network::models::simulate::request::SimulationGatewayRequestBody; use crate::network::utils::address::get_address_info; use crate::network::utils::network::get_network_config; +use crate::utils::transaction::normalization::NormalizationInOut; +use crate::utils::transaction::results::find_smart_contract_result; use crate::utils::transaction::token_transfer::TokenTransfer; /// Type alias for `BaseSimulationNetworkExecutor` with the `String` type as the generic `Client`. @@ -143,15 +146,31 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - /* - let sendable_transaction = sc_call_step.to_sendable_transaction(); + let function_name = if function.is_empty() { + None + } else { + Some(function) + }; - let simulation_data = SimulationGatewayRequest { - value: sendable_transaction.egld_value.to_string(), - receiver: sendable_transaction.receiver, + let normalized = NormalizationInOut { sender: self.sender_address.to_bech32_string()?, - gas_limit: sendable_transaction.gas_limit, - data: sendable_transaction.data, + receiver: to.to_bech32_string()?, + function_name, + arguments, + egld_value, + esdt_transfers, + }.normalize()?; + + let normalized_egld_value = normalized.egld_value.clone(); + let normalized_receiver = normalized.receiver.clone(); + let normalized_sender = normalized.sender.clone(); + + let simulation_data = SimulationGatewayRequest { + value: normalized_egld_value.to_string(), + receiver: normalized_receiver, + sender: normalized_sender, + gas_limit, + data: normalized.get_transaction_data(), }; let response = self.simulate_transaction(simulation_data).await?; @@ -163,49 +182,25 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto let scrs = data.smart_contract_results .into_iter() .map(|(hash, result)| { - ApiSmartContractResult { + TransactionOnNetworkTransactionSmartContractResult { hash, nonce: result.nonce, - value: result.value, - receiver: multiversx_sdk::data::address::Address::from_bech32_string(&result.receiver).unwrap(), - sender: multiversx_sdk::data::address::Address::from_bech32_string(&result.sender).unwrap(), data: result.data, - prev_tx_hash: "".to_string(), - original_tx_hash: "".to_string(), - gas_limit: 0, - gas_price: 0, - call_type: CallType::DirectCall, - relayer_address: None, - relayed_value: None, - code: None, - code_metadata: None, - return_message: None, - original_sender: None, } }) .collect(); - let mut tx_response = TxResponse { - out: vec![], - new_deployed_address: None, - new_issued_token_identifier: None, - tx_error: Default::default(), - logs: vec![], - gas: data.tx_gas_units, - refund: 0, - api_scrs: scrs, - api_logs: None, - }; - - process_out(&mut tx_response); + let mut sc_results = find_smart_contract_result(&Some(scrs)) + .unwrap_or_default(); - sc_call_step.sc_call_step.save_response(tx_response); + let output_managed = OutputManaged::multi_decode(&mut sc_results).unwrap(); // TODO: no unwrap - Ok(()) - - */ + let call_result = CallResult { + response: Default::default(), + result: Some(output_managed.to_native()), + }; - todo!() + Ok(call_result) } } diff --git a/executor/src/network/transaction/executor.rs b/executor/src/network/transaction/executor.rs index ab76f16..8693e36 100644 --- a/executor/src/network/transaction/executor.rs +++ b/executor/src/network/transaction/executor.rs @@ -21,6 +21,7 @@ use crate::network::utils::wallet::Wallet; use crate::TransactionOnNetworkTransactionSmartContractResult; use crate::utils::transaction::deploy::get_deploy_call_input; use crate::utils::transaction::normalization::NormalizationInOut; +use crate::utils::transaction::results::{find_sc_deploy_event, find_smart_contract_result}; use crate::utils::transaction::token_transfer::TokenTransfer; /// Alias for the `BaseTransactionNetworkExecutor` struct, parameterized with the `Interactor` type. @@ -222,40 +223,4 @@ impl DeployExecutor for BaseTransactionNetwork Ok((deployed_address, deploy_result)) } - - /// Specifies whether deserialization should be skipped during the deployment execution. - /// In this implementation, deserialization is not skipped. - /// - /// # Returns - /// - /// A `bool` value of `false`, indicating that deserialization should not be skipped. - async fn should_skip_deserialization(&self) -> bool { - false - } -} - -fn find_sc_deploy_event(logs: &[TransactionOnNetworkTransactionLogsEvents]) -> Option { - logs.iter() - .find(|event| event.identifier == "SCDeploy") - .cloned() -} - -fn find_smart_contract_result(opt_sc_results: &Option>) -> Option>> { - let Some(sc_results) = opt_sc_results else { - return None - }; - - sc_results.iter() - .find(|sc_result| sc_result.nonce != 0 && sc_result.data.starts_with('@')) - .cloned() - .map(|sc_result| { - let mut split = sc_result.data.split('@'); - let _ = split.next().expect("SCR data should start with '@'"); // TODO: no expect and assert_eq! - let result_code = split.next().expect("missing result code"); - assert_eq!(result_code, "6f6b", "result code is not 'ok'"); - - split - .map(|encoded_arg| hex::decode(encoded_arg).expect("error hex-decoding result")) - .collect() - }) } \ No newline at end of file diff --git a/executor/src/network/transaction/interactor.rs b/executor/src/network/transaction/interactor.rs index 6157675..5135db1 100644 --- a/executor/src/network/transaction/interactor.rs +++ b/executor/src/network/transaction/interactor.rs @@ -38,6 +38,11 @@ pub struct Interactor { pub network_config: NetworkGatewayConfig } +pub enum TransactionRefreshStrategy { + EachBlock, + EachDuration(Duration) +} + impl Interactor { async fn get_account_info(&self) -> Result { let address = Address::from(self.wallet.get_address()); diff --git a/executor/src/utils/transaction/data.rs b/executor/src/utils/transaction/data.rs index d8fc2be..ca8fbd2 100644 --- a/executor/src/utils/transaction/data.rs +++ b/executor/src/utils/transaction/data.rs @@ -33,77 +33,14 @@ pub struct SendableTransaction { /// to convert them into a `SendableTransaction`, which is a more frontend-friendly format. pub trait SendableTransactionConvertible { /// Converts the current instance into a [`SendableTransaction`]. - fn to_sendable_transaction(&self) -> SendableTransaction; + fn to_sendable_transaction(self) -> SendableTransaction; } // Implementations of `SendableTransactionConvertible` for various types, enabling them to be converted into `SendableTransaction`s. impl SendableTransactionConvertible for SendableTransaction { - fn to_sendable_transaction(&self) -> SendableTransaction { - self.clone() // TODO: evil clone - } -} - -impl SendableTransactionConvertible for ContractCallWithEgld - where - SA: CallTypeApi + 'static -{ - fn to_sendable_transaction(&self) -> SendableTransaction { - SendableTransaction { - receiver: Address::from_bytes(self.basic.to.to_byte_array()).to_bech32_string().unwrap(), - egld_value: self.egld_payment.to_alloc(), - gas_limit: self.basic.explicit_gas_limit, - data: contract_call_to_tx_data(self), - } - } -} - -impl SendableTransactionConvertible for TxCall { - fn to_sendable_transaction(&self) -> SendableTransaction { - self.to_contract_call().to_sendable_transaction() - } -} - -impl SendableTransactionConvertible for ScCallStep { - fn to_sendable_transaction(&self) -> SendableTransaction { - self.tx.to_sendable_transaction() - } -} - -impl SendableTransactionConvertible for TypedScCall { - fn to_sendable_transaction(&self) -> SendableTransaction { - self.sc_call_step.to_sendable_transaction() - } -} - -impl SendableTransactionConvertible for TxDeploy { - fn to_sendable_transaction(&self) -> SendableTransaction { - let mut call = TxCall { - from: self.from.clone(), - to: Default::default(), - egld_value: self.egld_value.clone(), - esdt_value: Default::default(), - function: Default::default(), - arguments: vec![], - gas_limit: self.gas_limit.clone(), - gas_price: self.gas_price.clone(), - }.to_sendable_transaction(); - - call.data = self.to_tx_data(); - - call - } -} - -impl SendableTransactionConvertible for ScDeployStep { - fn to_sendable_transaction(&self) -> SendableTransaction { - self.tx.to_sendable_transaction() - } -} - -impl SendableTransactionConvertible for TypedScDeploy { - fn to_sendable_transaction(&self) -> SendableTransaction { - self.sc_deploy_step.to_sendable_transaction() + fn to_sendable_transaction(self) -> SendableTransaction { + self } } @@ -116,7 +53,7 @@ impl SendableTransactionConvertible for Tx, RH: TxResultHandler, { - fn to_sendable_transaction(&self) -> SendableTransaction { + fn to_sendable_transaction(self) -> SendableTransaction { let receiver = Address::from_bytes(self.to.to_byte_array()).to_bech32_string().unwrap(); let egld_value = self.payment .clone() // TODO: evil clone @@ -133,34 +70,6 @@ impl SendableTransactionConvertible for Tx(contract_call: &ContractCallWithEgld) -> String - where - SA: CallTypeApi + 'static -{ - let mut result = String::from_utf8( - contract_call - .basic - .function_call - .function_name - .to_boxed_bytes() - .into_vec(), - ) - .unwrap(); - - for argument in contract_call.basic.function_call.arg_buffer.raw_arg_iter() { - result.push('@'); - result.push_str(hex::encode(argument.to_boxed_bytes().as_slice()).as_str()); - } - result -} - fn biguint_serialize(value: &BigUint, serializer: S) -> Result where S: Serializer diff --git a/executor/src/utils/transaction/mod.rs b/executor/src/utils/transaction/mod.rs index 2611bb9..54a628c 100644 --- a/executor/src/utils/transaction/mod.rs +++ b/executor/src/utils/transaction/mod.rs @@ -3,4 +3,5 @@ pub mod call_result; pub mod token_transfer; pub mod transfers; pub mod normalization; -pub mod deploy; \ No newline at end of file +pub mod deploy; +pub mod results; \ No newline at end of file diff --git a/executor/src/utils/transaction/results.rs b/executor/src/utils/transaction/results.rs new file mode 100644 index 0000000..5072361 --- /dev/null +++ b/executor/src/utils/transaction/results.rs @@ -0,0 +1,27 @@ +use crate::{TransactionOnNetworkTransactionLogsEvents, TransactionOnNetworkTransactionSmartContractResult}; + +pub(crate) fn find_sc_deploy_event(logs: &[TransactionOnNetworkTransactionLogsEvents]) -> Option { + logs.iter() + .find(|event| event.identifier == "SCDeploy") + .cloned() +} + +pub(crate) fn find_smart_contract_result(opt_sc_results: &Option>) -> Option>> { + let Some(sc_results) = opt_sc_results else { + return None + }; + + sc_results.iter() + .find(|sc_result| sc_result.nonce != 0 && sc_result.data.starts_with('@')) + .cloned() + .map(|sc_result| { + let mut split = sc_result.data.split('@'); + let _ = split.next().expect("SCR data should start with '@'"); // TODO: no expect and assert_eq! + let result_code = split.next().expect("missing result code"); + assert_eq!(result_code, "6f6b", "result code is not 'ok'"); + + split + .map(|encoded_arg| hex::decode(encoded_arg).expect("error hex-decoding result")) + .collect() + }) +} \ No newline at end of file diff --git a/tester/core/tests/network_simulate.rs b/tester/core/tests/network_simulate.rs index 3d75394..9b3024c 100644 --- a/tester/core/tests/network_simulate.rs +++ b/tester/core/tests/network_simulate.rs @@ -79,7 +79,7 @@ impl GatewayClient for MockClient { } else if url == "/network/config" { get_network_config() } else { - todo!() + unreachable!() }; Ok((result.0, Some(result.1))) @@ -93,7 +93,7 @@ impl GatewayClient for MockClient { } else if data == r#"{"nonce":5,"value":"0","receiver":"erd1qqqqqqqqqqqqqpgq7x53hfeg9558dmzjg9lqyfar77z8wrxf5u7qrawwh0","sender":"erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g","gasPrice":1000000000,"gasLimit":600000000,"data":"YWRkQDBh","chainId":"D","version":1}"# { get_return_biguint_argument_simulation_data() } else { - todo!() + unreachable!() }; Ok((result.0, Some(result.1))) diff --git a/token/src/mock/request.rs b/token/src/mock/request.rs index c6158cf..6f0458c 100644 --- a/token/src/mock/request.rs +++ b/token/src/mock/request.rs @@ -57,7 +57,7 @@ impl GatewayClient for MockClient { if let Some((status, data)) = token::get_token_properties_vm_query_response(&decoded) { Ok((status, Some(data))) } else { - todo!() + unreachable!() } } } From 24be721ba47e2170b789fcbdc415efef65dc4628 Mon Sep 17 00:00:00 2001 From: Fusee Date: Tue, 28 May 2024 18:46:05 +0200 Subject: [PATCH 12/25] removed some TODO --- executor/src/error/date.rs | 14 +++ executor/src/error/executor.rs | 2 + executor/src/error/mod.rs | 3 +- executor/src/error/transaction.rs | 1 + executor/src/lib.rs | 1 + executor/src/mocking/executor.rs | 12 +- executor/src/network/query/executor.rs | 25 ++-- executor/src/network/simulate.rs | 6 +- executor/src/network/transaction/executor.rs | 64 +++++----- .../src/network/transaction/interactor.rs | 42 +++++-- .../src/utils/date/get_current_timestamp.rs | 86 +++++++++++++ executor/src/utils/date/mod.rs | 1 + executor/src/utils/mod.rs | 3 +- executor/src/utils/transaction/results.rs | 46 ++++--- tester/core/tests/network_call.rs | 118 ++++++++++-------- tester/core/tests/network_deploy.rs | 20 ++- 16 files changed, 316 insertions(+), 128 deletions(-) create mode 100644 executor/src/error/date.rs create mode 100644 executor/src/utils/date/get_current_timestamp.rs create mode 100644 executor/src/utils/date/mod.rs diff --git a/executor/src/error/date.rs b/executor/src/error/date.rs new file mode 100644 index 0000000..b40ff66 --- /dev/null +++ b/executor/src/error/date.rs @@ -0,0 +1,14 @@ +use serde::{Deserialize, Serialize}; + +use crate::ExecutorError; + +#[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] +pub enum DateError { + UnableToGetCurrentTimestamp +} + +impl From for ExecutorError { + fn from(value: DateError) -> Self { + ExecutorError::Date(value) + } +} \ No newline at end of file diff --git a/executor/src/error/executor.rs b/executor/src/error/executor.rs index be88cfa..ed7ca6e 100644 --- a/executor/src/error/executor.rs +++ b/executor/src/error/executor.rs @@ -1,6 +1,7 @@ use crate::error::network::NetworkQueryError; use serde::{Deserialize, Serialize}; use novax_data::DataError; +use crate::error::date::DateError; use crate::error::dummy::DummyExecutorError; use crate::error::gateway::GatewayError; use crate::error::mock_deploy::MockDeployError; @@ -18,6 +19,7 @@ pub enum ExecutorError { NetworkQuery(NetworkQueryError), Dummy(DummyExecutorError), + Date(DateError), /// Represents errors specifically related to interactions with the MultiversX gateway. This can include /// HTTP request issues, response parsing errors, and other anomalies encountered while communicating diff --git a/executor/src/error/mod.rs b/executor/src/error/mod.rs index 5beb117..9e218f3 100644 --- a/executor/src/error/mod.rs +++ b/executor/src/error/mod.rs @@ -6,4 +6,5 @@ pub mod simulation; pub mod transaction; pub mod dummy; pub mod wallet; -pub mod mock_transaction; \ No newline at end of file +pub mod mock_transaction; +pub mod date; \ No newline at end of file diff --git a/executor/src/error/transaction.rs b/executor/src/error/transaction.rs index 27e719c..eb62b4f 100644 --- a/executor/src/error/transaction.rs +++ b/executor/src/error/transaction.rs @@ -11,6 +11,7 @@ pub enum TransactionError { CannotDeserializeTransactionOnNetworkResponse { response: String }, FailedToSendTheTransaction { message: String }, NoSmartContractResult, + TimeoutWhenRetrievingTransactionOnNetwork, CannotDecodeSmartContractResult, NoSCDeployLogInTheResponse, CannotEncodeString { string: String }, diff --git a/executor/src/lib.rs b/executor/src/lib.rs index d7f0b55..aa14a50 100644 --- a/executor/src/lib.rs +++ b/executor/src/lib.rs @@ -68,6 +68,7 @@ pub use network::utils::wallet::Wallet; pub use network::transaction::executor::NetworkExecutor; pub use network::transaction::executor::BaseTransactionNetworkExecutor; pub use network::transaction::interactor::BlockchainInteractor; +pub use network::transaction::interactor::TransactionRefreshStrategy; pub use network::query::proxy::BlockchainProxy; pub use network::simulate::SimulationNetworkExecutor; pub use network::simulate::BaseSimulationNetworkExecutor; diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index bb1d208..f0415f7 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -129,7 +129,9 @@ impl TransactionExecutor for MockExecutor .map(|buffer| buffer.to_boxed_bytes().into_vec()) .collect(); - let output_managed = OutputManaged::multi_decode(&mut raw_result).unwrap(); // TODO: no unwrap + let Ok(output_managed) = OutputManaged::multi_decode(&mut raw_result) else { + return Err(TransactionError::CannotDecodeSmartContractResult.into()) + }; let call_result = CallResult { response: Default::default(), @@ -214,7 +216,9 @@ impl DeployExecutor for MockExecutor .map(|buffer| buffer.to_boxed_bytes().into_vec()) .collect(); - let output_managed = OutputManaged::multi_decode(&mut raw_result).unwrap(); // TODO: no unwrap + let Ok(output_managed) = OutputManaged::multi_decode(&mut raw_result) else { + return Err(TransactionError::CannotDecodeSmartContractResult.into()) + }; let call_result = CallResult { response: Default::default(), @@ -284,7 +288,9 @@ impl QueryExecutor for MockExecutor .map(|buffer| buffer.to_boxed_bytes().into_vec()) .collect(); - let output_managed = OutputManaged::multi_decode(&mut raw_result).unwrap(); // TODO: no unwrap + let Ok(output_managed) = OutputManaged::multi_decode(&mut raw_result) else { + return Err(TransactionError::CannotDecodeSmartContractResult.into()) + }; Ok(output_managed.to_native()) } diff --git a/executor/src/network/query/executor.rs b/executor/src/network/query/executor.rs index 274a8cd..3ad0554 100644 --- a/executor/src/network/query/executor.rs +++ b/executor/src/network/query/executor.rs @@ -8,6 +8,7 @@ use novax_data::{NativeConvertible, parse_query_return_string_data}; use crate::{BlockchainProxy, ExecutorError, QueryExecutor, TokenTransfer, VmValuesQueryRequest}; use crate::network::query::proxy::NetworkBlockchainProxy; +use crate::utils::transaction::normalization::NormalizationInOut; /// A convenient type alias for `QueryNetworkExecutor` with `NetworkBlockchainProxy` as the generic type. pub type ProxyQueryExecutor = QueryNetworkExecutor; @@ -58,14 +59,22 @@ impl QueryExecutor for QueryNetworkExecutor { OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { let sc_address = to.to_bech32_string()?; - let arguments = encode_arguments(&arguments); - - let vm_request = VmValuesQueryRequest { // TODO: put this in a separate function so normalization can be tested - sc_address: sc_address.clone(), - func_name: function, - caller: None, // TODO - value: None, // TODO: normalize - args: arguments, + + let normalized = NormalizationInOut { + sender: sc_address.clone(), // TODO + receiver: sc_address, + function_name: Some(function), + arguments, + egld_value, + esdt_transfers, + }.normalize()?; + + let vm_request = VmValuesQueryRequest { + sc_address: normalized.receiver, + func_name: normalized.function_name.unwrap_or_default(), + caller: Some(normalized.sender), + value: Some(normalized.egld_value.to_string()), + args: encode_arguments(&normalized.arguments), }; let blockchain = Proxy::new(self.gateway_url.clone()); diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index 97cc3ee..b741bb4 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -190,10 +190,12 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto }) .collect(); - let mut sc_results = find_smart_contract_result(&Some(scrs)) + let mut raw_result = find_smart_contract_result(&Some(scrs))? .unwrap_or_default(); - let output_managed = OutputManaged::multi_decode(&mut sc_results).unwrap(); // TODO: no unwrap + let Ok(output_managed) = OutputManaged::multi_decode(&mut raw_result) else { + return Err(TransactionError::CannotDecodeSmartContractResult.into()) + }; let call_result = CallResult { response: Default::default(), diff --git a/executor/src/network/transaction/executor.rs b/executor/src/network/transaction/executor.rs index 8693e36..8cc7f94 100644 --- a/executor/src/network/transaction/executor.rs +++ b/executor/src/network/transaction/executor.rs @@ -1,5 +1,6 @@ use std::fmt::{Debug, Formatter}; use std::marker::PhantomData; +use std::time::Duration; use async_trait::async_trait; use multiversx_sc::codec::{TopDecodeMulti, TopEncode}; @@ -15,7 +16,7 @@ use crate::base::transaction::TransactionExecutor; use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::error::transaction::TransactionError; -use crate::network::transaction::interactor::{BlockchainInteractor, Interactor}; +use crate::network::transaction::interactor::{BlockchainInteractor, Interactor, TransactionRefreshStrategy}; use crate::network::transaction::models::transaction_on_network::{TransactionOnNetworkTransactionLogs, TransactionOnNetworkTransactionLogsEvents}; use crate::network::utils::wallet::Wallet; use crate::TransactionOnNetworkTransactionSmartContractResult; @@ -32,13 +33,17 @@ pub type NetworkExecutor = BaseTransactionNetworkExecutor; /// This executor is designed to interact with a blockchain network via a specified gateway URL and a wallet /// for signing transactions. It is parameterized by a type `Interactor` that encapsulates the blockchain interaction logic. pub struct BaseTransactionNetworkExecutor { - /// The URL of the blockchain network gateway through which transactions will be sent. - pub gateway_url: String, - /// The wallet used for signing transactions before they are sent to the blockchain network. - pub wallet: Wallet, - /// Phantom data to allow the generic parameter `Interactor`. - /// This field does not occupy any space in memory. - _phantom_data: PhantomData, + interactor: Interactor +} + +impl BaseTransactionNetworkExecutor { + pub fn set_refresh_strategy(&mut self, strategy: TransactionRefreshStrategy) { + self.interactor.refresh_strategy = strategy; + } + + pub fn set_timeout(&mut self, timeout: Duration) { + self.interactor.timeout = timeout; + } } /// Custom implementation of `Clone` for `BaseTransactionNetworkExecutor`. @@ -49,13 +54,11 @@ pub struct BaseTransactionNetworkExecutor { /// without the `Interactor` needing to be `Clone`. impl Clone for BaseTransactionNetworkExecutor where - Interactor: BlockchainInteractor + Interactor: BlockchainInteractor + Clone { fn clone(&self) -> Self { Self { - gateway_url: self.gateway_url.clone(), - wallet: self.wallet, - _phantom_data: Default::default(), + interactor: self.interactor.clone() } } } @@ -69,13 +72,11 @@ impl Clone for BaseTransactionNetworkExecutor /// formatted using the `Debug` trait regardless of whether `Interactor` implements `Debug`. impl Debug for BaseTransactionNetworkExecutor where - Interactor: BlockchainInteractor + Interactor: BlockchainInteractor + Debug { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - f.debug_struct("BaseTransactionNetworkExecutor") - .field("gateway_url", &self.gateway_url) - .field("wallet", &self.wallet) - .finish() + write!(f, "BaseTransactionNetworkExecutor - ")?; + self.interactor.fmt(f) } } @@ -88,12 +89,17 @@ impl BaseTransactionNetworkExecutor Self { - BaseTransactionNetworkExecutor { - gateway_url: gateway_url.to_string(), - wallet: *wallet, - _phantom_data: PhantomData, - } + pub async fn new(gateway_url: String, wallet: Wallet) -> Result { + let interactor = Interactor::new( + gateway_url, + wallet + ).await?; + + Ok( + BaseTransactionNetworkExecutor { + interactor + } + ) } } @@ -111,12 +117,6 @@ impl TransactionExecutor for BaseTransactionNe where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync { - let mut interactor = Interactor::new( - self.gateway_url.clone(), - self.wallet - ) - .await?; - let function_name = if function.is_empty() { None } else { @@ -124,7 +124,7 @@ impl TransactionExecutor for BaseTransactionNe }; let normalized = NormalizationInOut { - sender: self.wallet.get_address().to_bech32_string()?, + sender: self.interactor.get_sender_address().to_bech32_string()?, receiver: to.to_bech32_string()?, function_name, arguments, @@ -136,7 +136,7 @@ impl TransactionExecutor for BaseTransactionNe let egld_value = normalized.egld_value.clone(); let transaction_data = normalized.get_transaction_data(); - let result = interactor.sc_call( + let result = self.interactor.sc_call( receiver, egld_value, transaction_data, @@ -144,7 +144,7 @@ impl TransactionExecutor for BaseTransactionNe ) .await?; - let Some(mut sc_result) = find_smart_contract_result(&result.transaction.smart_contract_results) else { + let Some(mut sc_result) = find_smart_contract_result(&result.transaction.smart_contract_results)? else { return Err(TransactionError::NoSmartContractResult.into()) }; diff --git a/executor/src/network/transaction/interactor.rs b/executor/src/network/transaction/interactor.rs index 5135db1..89bfc8b 100644 --- a/executor/src/network/transaction/interactor.rs +++ b/executor/src/network/transaction/interactor.rs @@ -3,6 +3,7 @@ use async_trait::async_trait; use multiversx_sc_scenario::scenario_model::ScDeployStep; use num_bigint::BigUint; use reqwest::Client; +use tokio::time::Instant; use novax_data::{Address, NativeConvertible}; use crate::call_result::CallResult; @@ -18,6 +19,7 @@ use crate::network::utils::address::get_address_info; use crate::network::utils::network::get_network_config; use crate::network::utils::transaction::{get_transaction_on_network, send_transaction}; use crate::network::utils::wallet::{SignableTransaction, Wallet}; +use crate::utils::date::get_current_timestamp::{get_current_timestamp, get_timestamp_of_next_block}; #[async_trait] pub trait BlockchainInteractor: Sized + Send + Sync { @@ -30,14 +32,20 @@ pub trait BlockchainInteractor: Sized + Send + Sync { data: String, gas_limit: u64 ) -> Result; + + fn get_sender_address(&self) -> Address; } +#[derive(Clone, Debug)] pub struct Interactor { pub gateway_url: String, pub wallet: Wallet, - pub network_config: NetworkGatewayConfig + pub network_config: NetworkGatewayConfig, + pub refresh_strategy: TransactionRefreshStrategy, + pub timeout: Duration } +#[derive(Clone, Debug)] pub enum TransactionRefreshStrategy { EachBlock, EachDuration(Duration) @@ -51,6 +59,8 @@ impl Interactor { } async fn wait_for_execution(&self, tx_hash: &str) -> Result { + let end_timestamp = get_current_timestamp()? + self.timeout; + loop { let transaction_on_network = get_transaction_on_network( &self.gateway_url, @@ -61,10 +71,22 @@ impl Interactor { return Ok(transaction_on_network) } - tokio::time::sleep(Duration::from_secs(1)).await; // TODO - } + let current_timestamp = get_current_timestamp()?; + + if current_timestamp >= end_timestamp { + return Err(TransactionError::TimeoutWhenRetrievingTransactionOnNetwork.into()) + } - // TODO: add timeout + match self.refresh_strategy { + TransactionRefreshStrategy::EachBlock => { + let timestamp_of_next_block = get_timestamp_of_next_block(current_timestamp)?; + tokio::time::sleep(timestamp_of_next_block - current_timestamp).await; + } + TransactionRefreshStrategy::EachDuration(duration) => { + tokio::time::sleep(duration).await; + } + } + } } fn get_sendable_transaction( @@ -109,7 +131,9 @@ impl BlockchainInteractor for Interactor { Self { gateway_url, wallet, - network_config + network_config, + refresh_strategy: TransactionRefreshStrategy::EachBlock, + timeout: Duration::from_secs(10) } ) } @@ -134,8 +158,8 @@ impl BlockchainInteractor for Interactor { gas_limit, data, self.network_config.config.erd_chain_id.clone(), - 1, // TODO: what's this? - 0 // TODO: what's this? + 1, + 0 ); let tx_hash = send_transaction( @@ -147,6 +171,10 @@ impl BlockchainInteractor for Interactor { self.wait_for_execution(&tx_hash).await } + + fn get_sender_address(&self) -> Address { + self.wallet.get_address() + } } fn encode_code_bytes(bytes: &[u8]) -> String { diff --git a/executor/src/utils/date/get_current_timestamp.rs b/executor/src/utils/date/get_current_timestamp.rs new file mode 100644 index 0000000..a91c2c5 --- /dev/null +++ b/executor/src/utils/date/get_current_timestamp.rs @@ -0,0 +1,86 @@ +pub(crate) fn get_timestamp_of_next_block(current_timestamp: Duration) -> Result { + let mut timestamp = current_timestamp.as_secs() + 1; + while timestamp % 6 != 0 { + timestamp += 1 + } + + Ok(Duration::from_secs(timestamp)) +} + +#[cfg(not(test))] +mod implementation { + use std::time::{Duration, SystemTime, UNIX_EPOCH}; + use crate::error::date::DateError; + use crate::ExecutorError; + + pub(crate) fn get_current_timestamp() -> Result { + let start = SystemTime::now(); + let Ok(timestamp) = start.duration_since(UNIX_EPOCH) else { return Err(DateError::UnableToGetCurrentTimestamp.into())}; + + Ok(timestamp) + } +} + +use std::time::Duration; +pub(crate) use implementation::get_current_timestamp; + +#[cfg(test)] +pub(crate) use implementation::set_mock_time; +use crate::ExecutorError; + +#[cfg(test)] +mod implementation { + use std::cell::RefCell; + use core::time::Duration; + use crate::ExecutorError; + + thread_local! { + static MOCK_TIME: RefCell = RefCell::new(Duration::from_secs(0)); + } + + pub(crate) fn get_current_timestamp() -> Result { + let mut time: Duration = Duration::from_secs(0); + MOCK_TIME.with(|value| { + time = *value.borrow(); + }); + + Ok(time) + } + + pub(crate) fn set_mock_time(new_time: Duration) { + MOCK_TIME.with(|value| { + let mut mock_time = value.borrow_mut(); + *mock_time = new_time; + }); + } +} + +#[cfg(test)] +mod tests { + use std::time::Duration; + use crate::utils::date::get_current_timestamp::get_timestamp_of_next_block; + + #[test] + fn test_get_timestamp_of_next_block_start_of_block() { + let result = get_timestamp_of_next_block(Duration::from_secs(6)).unwrap(); + let expected = Duration::from_secs(12); + + assert_eq!(result, expected); + } + + #[test] + fn test_get_timestamp_of_next_block_mid_of_block() { + let result = get_timestamp_of_next_block(Duration::from_secs(8)).unwrap(); + let expected = Duration::from_secs(12); + + assert_eq!(result, expected); + } + + #[test] + fn test_get_timestamp_of_next_block_end_of_block() { + let result = get_timestamp_of_next_block(Duration::from_secs(11)).unwrap(); + let expected = Duration::from_secs(12); + + assert_eq!(result, expected); + } +} \ No newline at end of file diff --git a/executor/src/utils/date/mod.rs b/executor/src/utils/date/mod.rs new file mode 100644 index 0000000..8a49209 --- /dev/null +++ b/executor/src/utils/date/mod.rs @@ -0,0 +1 @@ +pub mod get_current_timestamp; \ No newline at end of file diff --git a/executor/src/utils/mod.rs b/executor/src/utils/mod.rs index 833c37f..f1b638f 100644 --- a/executor/src/utils/mod.rs +++ b/executor/src/utils/mod.rs @@ -1,2 +1,3 @@ /// The `transaction` module contains essential structs and types for handling blockchain transactions. -pub mod transaction; \ No newline at end of file +pub mod transaction; +pub mod date; // TODO: this mod is a duplicate with the caching crate \ No newline at end of file diff --git a/executor/src/utils/transaction/results.rs b/executor/src/utils/transaction/results.rs index 5072361..ccae5f1 100644 --- a/executor/src/utils/transaction/results.rs +++ b/executor/src/utils/transaction/results.rs @@ -1,4 +1,5 @@ -use crate::{TransactionOnNetworkTransactionLogsEvents, TransactionOnNetworkTransactionSmartContractResult}; +use crate::{ExecutorError, TransactionOnNetworkTransactionLogsEvents, TransactionOnNetworkTransactionSmartContractResult}; +use crate::error::transaction::TransactionError; pub(crate) fn find_sc_deploy_event(logs: &[TransactionOnNetworkTransactionLogsEvents]) -> Option { logs.iter() @@ -6,22 +7,37 @@ pub(crate) fn find_sc_deploy_event(logs: &[TransactionOnNetworkTransactionLogsEv .cloned() } -pub(crate) fn find_smart_contract_result(opt_sc_results: &Option>) -> Option>> { +pub(crate) fn find_smart_contract_result(opt_sc_results: &Option>) -> Result>>, ExecutorError> { let Some(sc_results) = opt_sc_results else { - return None + return Ok(None) }; - sc_results.iter() + let scr_found_result = sc_results.iter() .find(|sc_result| sc_result.nonce != 0 && sc_result.data.starts_with('@')) - .cloned() - .map(|sc_result| { - let mut split = sc_result.data.split('@'); - let _ = split.next().expect("SCR data should start with '@'"); // TODO: no expect and assert_eq! - let result_code = split.next().expect("missing result code"); - assert_eq!(result_code, "6f6b", "result code is not 'ok'"); - - split - .map(|encoded_arg| hex::decode(encoded_arg).expect("error hex-decoding result")) - .collect() - }) + .cloned(); + + let data = if let Some(scr) = scr_found_result { + let mut split = scr.data.split('@'); + if split.next().is_none() { + return Err(TransactionError::CannotDecodeSmartContractResult.into()) + } + + let Some(result_code) = split.next() else { + return Err(TransactionError::CannotDecodeSmartContractResult.into()) + }; + + if result_code != "6f6b" { + return Err(TransactionError::CannotDecodeSmartContractResult.into()) + } + + let data = split + .map(|encoded_arg| hex::decode(encoded_arg).expect("error hex-decoding result")) + .collect(); + + Some(data) + } else { + None + }; + + Ok(data) } \ No newline at end of file diff --git a/tester/core/tests/network_call.rs b/tester/core/tests/network_call.rs index 7fd0cc7..d8a48e0 100644 --- a/tester/core/tests/network_call.rs +++ b/tester/core/tests/network_call.rs @@ -17,12 +17,18 @@ const CALLER_PRIVATE_KEY: &str = "69417ce717e43d0d3a598f68b5e562d7d2a532a5a3ac1e const CALLER: &str = "erd12wf7tlsk2z895vwmndheaknkp3uaqa7xuq847numkwlmcvy60wxql2ndlk"; const TESTER_CONTRACT_ADDRESS: &str = "erd1qqqqqqqqqqqqqpgq9wmk04e90fkhcuzns0pgwm33sdtxze346vpsq0ka9p"; -struct MockInteractor; +struct MockInteractor { + wallet: Wallet +} #[async_trait] impl BlockchainInteractor for MockInteractor { - async fn new(gateway_url: String, wallet: Wallet) -> Result { - Ok(MockInteractor) + async fn new(_gateway_url: String, wallet: Wallet) -> Result { + Ok( + MockInteractor { + wallet, + } + ) } async fn sc_call( @@ -144,15 +150,21 @@ impl BlockchainInteractor for MockInteractor { return Ok(response) } + + fn get_sender_address(&self) -> Address { + self.wallet.get_address() + } } -fn get_executor() -> Arc>> { +async fn get_executor() -> Arc>> { let wallet = Wallet::from_private_key(CALLER_PRIVATE_KEY).unwrap(); let executor = BaseTransactionNetworkExecutor::new( - "", - &wallet - ); + "".to_string(), + wallet + ) + .await + .unwrap(); Arc::new(Mutex::new(executor)) } @@ -161,7 +173,7 @@ fn get_executor() -> Arc>> #[tokio::test] async fn test_clone_network_executor() -> Result<(), NovaXError> { let wallet = Wallet::from_private_key(CALLER_PRIVATE_KEY).unwrap(); - let executor = NetworkExecutor::new("", &wallet); + let executor = NetworkExecutor::new("".to_string(), wallet).await?; #[allow(clippy::redundant_clone)] let _executor2 = executor.clone(); @@ -172,7 +184,7 @@ async fn test_clone_network_executor() -> Result<(), NovaXError> { #[tokio::test] async fn test_debug_network_executor() -> Result<(), NovaXError> { let wallet = Wallet::from_private_key(CALLER_PRIVATE_KEY).unwrap(); - let executor = NetworkExecutor::new("", &wallet); + let executor = NetworkExecutor::new("".to_string(), wallet).await.unwrap(); println!("{executor:?}"); @@ -181,7 +193,7 @@ async fn test_debug_network_executor() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_return_caller() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -198,7 +210,7 @@ async fn test_call_return_caller() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_with_biguint_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -215,7 +227,7 @@ async fn test_call_with_biguint_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_with_biguint_argument() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let contract = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -231,7 +243,7 @@ async fn test_call_with_biguint_argument() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_buffer_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let contract = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -256,7 +268,7 @@ async fn test_call_buffer_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_biguint_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -274,7 +286,7 @@ async fn test_call_biguint_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_u8_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -292,7 +304,7 @@ async fn test_call_u8_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_u16_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -310,7 +322,7 @@ async fn test_call_u16_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_u32_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -328,7 +340,7 @@ async fn test_call_u32_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_u64_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -346,7 +358,7 @@ async fn test_call_u64_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_u32_vec_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -364,7 +376,7 @@ async fn test_call_u32_vec_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_u64_vec_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -382,7 +394,7 @@ async fn test_call_u64_vec_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_buffer_vec_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -400,7 +412,7 @@ async fn test_call_buffer_vec_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_biguint_vec_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -421,7 +433,7 @@ async fn test_call_biguint_vec_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_two_u64_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -439,7 +451,7 @@ async fn test_call_two_u64_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_two_buffers_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -457,7 +469,7 @@ async fn test_call_two_buffers_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_one_buffer_one_u64_and_one_biguint_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -479,7 +491,7 @@ async fn test_call_one_buffer_one_u64_and_one_biguint_result() -> Result<(), Nov #[tokio::test] async fn test_call_double_of_u64_arg_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -497,7 +509,7 @@ async fn test_call_double_of_u64_arg_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_double_of_biguint_arg_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -515,7 +527,7 @@ async fn test_call_double_of_biguint_arg_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_appended_buffer_arg_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -533,7 +545,7 @@ async fn test_call_appended_buffer_arg_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_sum_of_two_biguint_args_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let first_arg = BigUint::from(10u8).pow(18); let second_arg = BigUint::from(10u8).pow(18) * BigUint::from(2u8); @@ -554,7 +566,7 @@ async fn test_call_sum_of_two_biguint_args_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_concat_multi_buffer_args_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let first_arg = "test1".to_string(); let second_arg = "test2".to_string(); @@ -576,7 +588,7 @@ async fn test_call_concat_multi_buffer_args_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_concat_multi_buffer_args_one_fungible_transfer_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let first_arg = "hello".to_string(); let second_arg = "world".to_string(); @@ -607,7 +619,7 @@ async fn test_call_concat_multi_buffer_args_one_fungible_transfer_result() -> Re #[tokio::test] async fn test_call_concat_multi_buffer_args_one_non_fungible_transfer_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let first_arg = "hello".to_string(); let second_arg = "sft".to_string(); @@ -638,7 +650,7 @@ async fn test_call_concat_multi_buffer_args_one_non_fungible_transfer_result() - #[tokio::test] async fn test_call_concat_multi_buffer_args_multi_transfers_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let first_arg = "hello".to_string(); let second_arg = "multi".to_string(); @@ -674,7 +686,7 @@ async fn test_call_concat_multi_buffer_args_multi_transfers_result() -> Result<( #[tokio::test] async fn test_call_sum_multi_u64_args_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let first_arg = 10u64; let second_arg = 9000000000u64; @@ -696,7 +708,7 @@ async fn test_call_sum_multi_u64_args_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_sum_multi_biguint_args_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let first_arg = BigUint::from(10u8).pow(18); let second_arg = BigUint::from(10u8).pow(18) * BigUint::from(2u8); @@ -718,7 +730,7 @@ async fn test_call_sum_multi_biguint_args_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_return_optional_value_bool_arg_some_true() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -738,7 +750,7 @@ async fn test_return_optional_value_bool_arg_some_true() -> Result<(), NovaXErro #[tokio::test] async fn test_return_optional_value_bool_arg_some_false() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -758,7 +770,7 @@ async fn test_return_optional_value_bool_arg_some_false() -> Result<(), NovaXErr #[tokio::test] async fn test_return_optional_value_bool_arg_none() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -778,7 +790,7 @@ async fn test_return_optional_value_bool_arg_none() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_custom_struct_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -800,7 +812,7 @@ async fn test_call_custom_struct_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_custom_struct_arg_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let input = CustomStruct { first: "test".to_string(), @@ -824,7 +836,7 @@ async fn test_call_custom_struct_arg_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_custom_struct_with_struct_and_vec_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -854,7 +866,7 @@ async fn test_call_custom_struct_with_struct_and_vec_result() -> Result<(), Nova #[tokio::test] async fn test_call_custom_struct_with_struct_and_vec_arg_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let first_vec = vec![10u64, 9000000000u64]; let second_vec = vec!["test1".to_string(), "test2".to_string()]; @@ -886,7 +898,7 @@ async fn test_call_custom_struct_with_struct_and_vec_arg_result() -> Result<(), #[tokio::test] async fn test_call_custom_enum_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -904,7 +916,7 @@ async fn test_call_custom_enum_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_custom_enum_arg_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let input = CustomEnum::Third; @@ -924,7 +936,7 @@ async fn test_call_custom_enum_arg_result() -> Result<(), NovaXError> { #[tokio::test] async fn test_call_first_custom_enum_with_values_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -946,7 +958,7 @@ async fn test_call_first_custom_enum_with_values_result() -> Result<(), NovaXErr #[tokio::test] async fn test_call_second_custom_enum_with_values_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -976,7 +988,7 @@ async fn test_call_second_custom_enum_with_values_result() -> Result<(), NovaXEr #[tokio::test] async fn test_call_first_custom_enum_with_values_arg_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let first_vec = vec![10u64, 9000000000u64]; let second_vec = vec!["test1".to_string(), "test2".to_string()]; @@ -1008,7 +1020,7 @@ async fn test_call_first_custom_enum_with_values_arg_result() -> Result<(), Nova #[tokio::test] async fn test_call_second_custom_enum_with_values_arg_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let input = CustomEnumWithValues::First( "test".to_string(), @@ -1032,7 +1044,7 @@ async fn test_call_second_custom_enum_with_values_arg_result() -> Result<(), Nov #[tokio::test] async fn test_call_first_custom_enum_with_fields_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -1054,7 +1066,7 @@ async fn test_call_first_custom_enum_with_fields_result() -> Result<(), NovaXErr #[tokio::test] async fn test_call_second_custom_enum_with_fields_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS @@ -1084,7 +1096,7 @@ async fn test_call_second_custom_enum_with_fields_result() -> Result<(), NovaXEr #[tokio::test] async fn test_call_first_custom_enum_with_fields_arg_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let input = CustomEnumWithFields::First { first_first: "test".to_string(), @@ -1108,7 +1120,7 @@ async fn test_call_first_custom_enum_with_fields_arg_result() -> Result<(), Nova #[tokio::test] async fn test_call_second_custom_enum_with_fields_arg_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let first_vec = vec![10u64, 9000000000u64]; let second_vec = vec!["test1".to_string(), "test2".to_string()]; @@ -1140,7 +1152,7 @@ async fn test_call_second_custom_enum_with_fields_arg_result() -> Result<(), Nov #[tokio::test] async fn test_call_with_bigint_arg_result() -> Result<(), NovaXError> { - let executor = get_executor(); + let executor = get_executor().await; let result = TesterContract::new( TESTER_CONTRACT_ADDRESS diff --git a/tester/core/tests/network_deploy.rs b/tester/core/tests/network_deploy.rs index 754991e..393a81d 100644 --- a/tester/core/tests/network_deploy.rs +++ b/tester/core/tests/network_deploy.rs @@ -19,6 +19,7 @@ const NEW_CONTRACT: &str = "erd1qqqqqqqqqqqqqpgq74myhunu4sfdpmskm6s6ul8k4cetjvhh const RETURNING_MOCK_URL: &str = "returning"; struct MockInteractor { + wallet: Wallet, is_deploy_returning: bool } @@ -29,6 +30,7 @@ impl BlockchainInteractor for MockInteractor { Ok( MockInteractor { + wallet, is_deploy_returning, } ) @@ -80,10 +82,14 @@ impl BlockchainInteractor for MockInteractor { return Ok(response) } + + fn get_sender_address(&self) -> Address { + self.wallet.get_address() + } } -fn get_executor(is_returning_value: bool) -> BaseTransactionNetworkExecutor { +async fn get_executor(is_returning_value: bool) -> BaseTransactionNetworkExecutor { let wallet = Wallet::from_private_key(CALLER_PRIVATE_KEY).unwrap(); let url = if is_returning_value { @@ -93,14 +99,16 @@ fn get_executor(is_returning_value: bool) -> BaseTransactionNetworkExecutor Result<(), NovaXError> { - let mut executor = get_executor(false); + let mut executor = get_executor(false).await; let deploy_data = DeployData { code: "../../.novax/tester-contract.wasm", @@ -123,7 +131,7 @@ async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { #[tokio::test] async fn test_deploy_with_return_value() -> Result<(), NovaXError> { - let mut executor = get_executor(true); + let mut executor = get_executor(true).await; let deploy_data = DeployData { code: "../../.novax/tester-contract.wasm", @@ -147,7 +155,7 @@ async fn test_deploy_with_return_value() -> Result<(), NovaXError> { #[tokio::test] async fn test_deploy_with_biguint_arg_with_metadatas() -> Result<(), NovaXError> { - let mut executor = get_executor(false); + let mut executor = get_executor(false).await; let deploy_data = DeployData { code: "../../.novax/tester-contract.wasm", From 88f6cfb3d79671b1ccf02f86b2ed3f6e79707c02 Mon Sep 17 00:00:00 2001 From: Fusee Date: Tue, 28 May 2024 19:07:38 +0200 Subject: [PATCH 13/25] removed some TODO --- abi-build/src/generator/impl_contract.rs | 8 ++--- .../src/network/transaction/interactor.rs | 2 +- tester/core/tests/dummy_deploy.rs | 2 ++ tester/core/tests/mock_deploy.rs | 2 ++ tester/core/tests/network_call.rs | 10 +++--- tester/core/tests/network_deploy.rs | 31 +++++++++++++++++++ 6 files changed, 44 insertions(+), 11 deletions(-) diff --git a/abi-build/src/generator/impl_contract.rs b/abi-build/src/generator/impl_contract.rs index da6b87c..d35f778 100644 --- a/abi-build/src/generator/impl_contract.rs +++ b/abi-build/src/generator/impl_contract.rs @@ -464,8 +464,8 @@ fn impl_abi_endpoint_call_query( &_novax_contract_address, #endpoint_name.to_string(), _novax_bytes_args, - num_bigint::BigUint::from(0u8), // TODO - vec![], // TODO + self.egld_value.clone(), + vec![], ).await; if let Result::Ok(result) = result { @@ -518,7 +518,7 @@ fn impl_abi_constructor(contract_info_name: &str, abi_constructor: &AbiConstruct /// - `CallResult`: A `CallResult` instance containing the response data from the contract's deployment. /// /// Or a `NovaXError` if the deployment process fails. - pub async fn #function_name(_novax_deploy_data: DeployData, _novax_executor: &mut Executor, _novax_gas_limit: u64, #function_inputs) -> Result<(Address, CallResult<#function_native_outputs>), NovaXError> { + pub async fn #function_name(_novax_deploy_data: DeployData, _novax_executor: &mut Executor, _novax_egld_value: num_bigint::BigUint, _novax_gas_limit: u64, #function_inputs) -> Result<(Address, CallResult<#function_native_outputs>), NovaXError> { let mut _novax_contract = #contract_info_ident::new(&multiversx_sc::types::Address::from(<[u8;32]>::default())); #endpoint_args_let_statements @@ -531,7 +531,7 @@ fn impl_abi_constructor(contract_info_name: &str, abi_constructor: &AbiConstruct _novax_executor.sc_deploy::<#function_managed_outputs>( _novax_code_bytes, _novax_deploy_data.metadata, - num_bigint::BigUint::from(0u8), // TODO + _novax_egld_value, _novax_bytes_args, _novax_gas_limit ) diff --git a/executor/src/network/transaction/interactor.rs b/executor/src/network/transaction/interactor.rs index 89bfc8b..a78dfae 100644 --- a/executor/src/network/transaction/interactor.rs +++ b/executor/src/network/transaction/interactor.rs @@ -147,7 +147,7 @@ impl BlockchainInteractor for Interactor { ) -> Result { let sender_info = self.get_account_info().await?; let sender_address = sender_info.address; - let nonce = sender_info.nonce; // TODO: +1? + let nonce = sender_info.nonce; let transaction_request = self.get_sendable_transaction( nonce, diff --git a/tester/core/tests/dummy_deploy.rs b/tester/core/tests/dummy_deploy.rs index a4178a3..33c0e2a 100644 --- a/tester/core/tests/dummy_deploy.rs +++ b/tester/core/tests/dummy_deploy.rs @@ -26,6 +26,7 @@ async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { TesterContract::deploy( deploy_data, &mut executor, + BigUint::from(0u8), 600000000u64, &BigUint::from(5u8) ) @@ -58,6 +59,7 @@ async fn test_deploy_with_metadatas() -> Result<(), NovaXError> { TesterContract::deploy( deploy_data, &mut executor, + BigUint::from(0u8), 600000000u64, &BigUint::from(7u8) ) diff --git a/tester/core/tests/mock_deploy.rs b/tester/core/tests/mock_deploy.rs index 0cb4a58..5b8b876 100644 --- a/tester/core/tests/mock_deploy.rs +++ b/tester/core/tests/mock_deploy.rs @@ -39,6 +39,7 @@ async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { let deploy_result = TesterContract::deploy( deploy_data, &mut executor, + BigUint::from(0u8), 600000000u64, &BigUint::from(5u8) ) @@ -74,6 +75,7 @@ async fn test_deploy_with_metadatas() -> Result<(), NovaXError> { let deploy_result = TesterContract::deploy( deploy_data, &mut executor, + BigUint::from(0u8), 600000000u64, &BigUint::from(5u8) ) diff --git a/tester/core/tests/network_call.rs b/tester/core/tests/network_call.rs index d8a48e0..6129420 100644 --- a/tester/core/tests/network_call.rs +++ b/tester/core/tests/network_call.rs @@ -9,7 +9,6 @@ use novax::data::NativeConvertible; use novax::errors::NovaXError; use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, ExecutorError, NetworkExecutor, SendableTransactionConvertible, TokenTransfer, TopDecodeMulti, TransactionExecutor, TransactionOnNetwork, TransactionOnNetworkTransaction, TransactionOnNetworkTransactionLogs, TransactionOnNetworkTransactionSmartContractResult, Wallet}; use novax::tester::tester::{CustomEnum, CustomEnumWithFields, CustomEnumWithValues, CustomStruct, CustomStructWithStructAndVec, TesterContract}; -use novax_mocking::ScDeployStep; mod utils; @@ -173,9 +172,8 @@ async fn get_executor() -> Arc Result<(), NovaXError> { let wallet = Wallet::from_private_key(CALLER_PRIVATE_KEY).unwrap(); - let executor = NetworkExecutor::new("".to_string(), wallet).await?; - #[allow(clippy::redundant_clone)] - let _executor2 = executor.clone(); + let executor = NetworkExecutor::new("".to_string(), wallet).await; + _ = executor.map(|e| e.clone()); Ok(()) } @@ -184,9 +182,9 @@ async fn test_clone_network_executor() -> Result<(), NovaXError> { #[tokio::test] async fn test_debug_network_executor() -> Result<(), NovaXError> { let wallet = Wallet::from_private_key(CALLER_PRIVATE_KEY).unwrap(); - let executor = NetworkExecutor::new("".to_string(), wallet).await.unwrap(); + let executor = NetworkExecutor::new("".to_string(), wallet).await; - println!("{executor:?}"); + _ = executor.map(|e| println!("{:?}", e.clone())); Ok(()) } diff --git a/tester/core/tests/network_deploy.rs b/tester/core/tests/network_deploy.rs index 393a81d..4510117 100644 --- a/tester/core/tests/network_deploy.rs +++ b/tester/core/tests/network_deploy.rs @@ -42,6 +42,7 @@ impl BlockchainInteractor for MockInteractor { let deploy_with_biguint_arg_metadata_nothing_data = "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@05"; let deploy_with_biguint_arg_biguint_return_metadata_nothing_data = "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@0a"; let deploy_with_biguint_arg_metadata_upgradeable_readable_data = "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0500@07"; + let deploy_with_biguint_arg_metadata_nothing_data_egld_value = "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@08"; if data == deploy_with_biguint_arg_metadata_nothing_data { return_data = Some("@6f6b".to_string()); @@ -49,6 +50,8 @@ impl BlockchainInteractor for MockInteractor { return_data = Some("@6f6b@0a".to_string()); } else if data == deploy_with_biguint_arg_metadata_upgradeable_readable_data { return_data = Some("@6f6b".to_string()); + } else if data == deploy_with_biguint_arg_metadata_nothing_data_egld_value && value == BigUint::from(100u8) { + return_data = Some("@6f6b@08".to_string()); } let Some(return_data) = return_data else { @@ -118,6 +121,7 @@ async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { let deploy_result: (Address, CallResult<()>) = TesterContract::deploy( deploy_data, &mut executor, + BigUint::from(0u8), 600000000u64, &BigUint::from(5u8) ) @@ -141,6 +145,7 @@ async fn test_deploy_with_return_value() -> Result<(), NovaXError> { let deploy_result: (Address, CallResult) = TesterWithReturningDeployContract::deploy( deploy_data, &mut executor, + BigUint::from(0u8), 600000000u64, &BigUint::from(10u8) ) @@ -165,6 +170,7 @@ async fn test_deploy_with_biguint_arg_with_metadatas() -> Result<(), NovaXError> let deploy_result: (Address, CallResult<()>) = TesterContract::deploy( deploy_data, &mut executor, + BigUint::from(0u8), 600000000u64, &BigUint::from(7u8) ) @@ -173,5 +179,30 @@ async fn test_deploy_with_biguint_arg_with_metadatas() -> Result<(), NovaXError> assert_eq!(deploy_result.0, Address::from(NEW_CONTRACT)); + Ok(()) +} + +#[tokio::test] +async fn test_deploy_with_biguint_arg_with_egld_value() -> Result<(), NovaXError> { + let mut executor = get_executor(false).await; + + let deploy_data = DeployData { + code: "../../.novax/tester-contract.wasm", + metadata: CodeMetadata::default() + }; + + let deploy_result: (Address, CallResult<_>) = TesterWithReturningDeployContract::deploy( + deploy_data, + &mut executor, + BigUint::from(100u8), + 600000000u64, + &BigUint::from(8u8) + ) + .await + .unwrap(); + + assert_eq!(deploy_result.0, Address::from(NEW_CONTRACT)); + assert_eq!(deploy_result.1.result.unwrap(), BigUint::from(8u8)); + Ok(()) } \ No newline at end of file From 2f0c120a5260fc2a70c66198359847b903d92f4a Mon Sep 17 00:00:00 2001 From: Fusee Date: Tue, 28 May 2024 19:11:54 +0200 Subject: [PATCH 14/25] removed some TODO --- executor/src/utils/transaction/data.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/executor/src/utils/transaction/data.rs b/executor/src/utils/transaction/data.rs index ca8fbd2..d0e225a 100644 --- a/executor/src/utils/transaction/data.rs +++ b/executor/src/utils/transaction/data.rs @@ -48,7 +48,7 @@ impl SendableTransactionConvertible for Tx, - Payment: TxPayment + Clone, // TODO: evil clone + Payment: TxPayment + Clone, Gas: TxGas, Data: TxDataFunctionCall, RH: TxResultHandler, @@ -56,7 +56,7 @@ impl SendableTransactionConvertible for Tx SendableTransaction { let receiver = Address::from_bytes(self.to.to_byte_array()).to_bech32_string().unwrap(); let egld_value = self.payment - .clone() // TODO: evil clone + .clone() .into_full_payment_data(&self.env).egld .map(|v| BigUint::from_bytes_be(v.value.to_bytes_be().as_slice())) .unwrap_or_default(); From a14683d5568293296190b0aa0aa1eaa60ab438da Mon Sep 17 00:00:00 2001 From: Fusee Date: Tue, 28 May 2024 19:20:55 +0200 Subject: [PATCH 15/25] removed some warnings --- core/src/caching/caching_none.rs | 7 ++++--- executor/src/base/deploy.rs | 5 +++-- executor/src/network/query/executor.rs | 2 +- executor/src/network/transaction/executor.rs | 9 ++------- executor/src/network/transaction/interactor.rs | 12 ++++-------- 5 files changed, 14 insertions(+), 21 deletions(-) diff --git a/core/src/caching/caching_none.rs b/core/src/caching/caching_none.rs index b91c406..d374f68 100644 --- a/core/src/caching/caching_none.rs +++ b/core/src/caching/caching_none.rs @@ -1,8 +1,9 @@ -use async_trait::async_trait; use std::future::Future; -use std::time::Duration; -use serde::Serialize; + +use async_trait::async_trait; use serde::de::DeserializeOwned; +use serde::Serialize; + use crate::caching::caching_strategy::{CachingDurationStrategy, CachingStrategy}; use crate::errors::NovaXError; diff --git a/executor/src/base/deploy.rs b/executor/src/base/deploy.rs index fe8327a..eedfc8e 100644 --- a/executor/src/base/deploy.rs +++ b/executor/src/base/deploy.rs @@ -1,11 +1,12 @@ use std::sync::Arc; + use async_trait::async_trait; -use multiversx_sc::codec::TopEncodeMulti; use multiversx_sc::types::CodeMetadata; -use multiversx_sc_scenario::scenario_model::TypedScDeploy; use num_bigint::BigUint; use tokio::sync::Mutex; + use novax_data::{Address, NativeConvertible}; + use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::TopDecodeMulti; diff --git a/executor/src/network/query/executor.rs b/executor/src/network/query/executor.rs index 3ad0554..d9b94e9 100644 --- a/executor/src/network/query/executor.rs +++ b/executor/src/network/query/executor.rs @@ -61,7 +61,7 @@ impl QueryExecutor for QueryNetworkExecutor { let sc_address = to.to_bech32_string()?; let normalized = NormalizationInOut { - sender: sc_address.clone(), // TODO + sender: sc_address.clone(), // TODO: allow custom sender receiver: sc_address, function_name: Some(function), arguments, diff --git a/executor/src/network/transaction/executor.rs b/executor/src/network/transaction/executor.rs index 8cc7f94..64a39c8 100644 --- a/executor/src/network/transaction/executor.rs +++ b/executor/src/network/transaction/executor.rs @@ -1,12 +1,9 @@ use std::fmt::{Debug, Formatter}; -use std::marker::PhantomData; use std::time::Duration; use async_trait::async_trait; -use multiversx_sc::codec::{TopDecodeMulti, TopEncode}; -use multiversx_sc::imports::{CodeMetadata, ManagedBuffer}; -use multiversx_sc_scenario::api::StaticApi; -use multiversx_sc_scenario::multiversx_chain_vm::crypto_functions::keccak256; +use multiversx_sc::codec::TopDecodeMulti; +use multiversx_sc::imports::CodeMetadata; use num_bigint::BigUint; use novax_data::{Address, NativeConvertible}; @@ -17,9 +14,7 @@ use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::error::transaction::TransactionError; use crate::network::transaction::interactor::{BlockchainInteractor, Interactor, TransactionRefreshStrategy}; -use crate::network::transaction::models::transaction_on_network::{TransactionOnNetworkTransactionLogs, TransactionOnNetworkTransactionLogsEvents}; use crate::network::utils::wallet::Wallet; -use crate::TransactionOnNetworkTransactionSmartContractResult; use crate::utils::transaction::deploy::get_deploy_call_input; use crate::utils::transaction::normalization::NormalizationInOut; use crate::utils::transaction::results::{find_sc_deploy_event, find_smart_contract_result}; diff --git a/executor/src/network/transaction/interactor.rs b/executor/src/network/transaction/interactor.rs index a78dfae..1e395e3 100644 --- a/executor/src/network/transaction/interactor.rs +++ b/executor/src/network/transaction/interactor.rs @@ -1,19 +1,15 @@ use std::time::Duration; + use async_trait::async_trait; -use multiversx_sc_scenario::scenario_model::ScDeployStep; use num_bigint::BigUint; -use reqwest::Client; -use tokio::time::Instant; -use novax_data::{Address, NativeConvertible}; -use crate::call_result::CallResult; -use crate::error::transaction::TransactionError; +use novax_data::Address; -use crate::{ExecutorError, TopDecodeMulti}; +use crate::error::transaction::TransactionError; +use crate::ExecutorError; use crate::network::models::address::info::AddressGatewayInfoAccount; use crate::network::models::network::config::NetworkGatewayConfig; use crate::network::transaction::models::send_request::TransactionSendRequest; -use crate::network::transaction::models::send_response::TransactionSendResponse; use crate::network::transaction::models::transaction_on_network::TransactionOnNetwork; use crate::network::utils::address::get_address_info; use crate::network::utils::network::get_network_config; From aeef5de494d76d824a0a3c5f93308813717f9b71 Mon Sep 17 00:00:00 2001 From: Fusee Date: Wed, 29 May 2024 16:57:27 +0200 Subject: [PATCH 16/25] removed some todo --- executor/src/error/transaction.rs | 5 +- executor/src/network/query/executor.rs | 2 +- executor/src/network/simulate.rs | 2 +- executor/src/network/transaction/executor.rs | 5 +- .../models/transaction_on_network.rs | 10 +- executor/src/utils/transaction/results.rs | 1250 ++++++++++++++++- tester/core/tests/network_deploy.rs | 4 +- 7 files changed, 1266 insertions(+), 12 deletions(-) diff --git a/executor/src/error/transaction.rs b/executor/src/error/transaction.rs index eb62b4f..dbd7486 100644 --- a/executor/src/error/transaction.rs +++ b/executor/src/error/transaction.rs @@ -17,7 +17,10 @@ pub enum TransactionError { CannotEncodeString { string: String }, CannotEncodeU64 { value: u64 }, CannotEncodeTransfer, - CannotSerializeTransactionData + CannotSerializeTransactionData, + CannotDecodeBase64, + CannotDecodeTopic, + WrongTopicsCountForSignalErrorEvent } impl From for ExecutorError { diff --git a/executor/src/network/query/executor.rs b/executor/src/network/query/executor.rs index d9b94e9..2fb0774 100644 --- a/executor/src/network/query/executor.rs +++ b/executor/src/network/query/executor.rs @@ -61,7 +61,7 @@ impl QueryExecutor for QueryNetworkExecutor { let sc_address = to.to_bech32_string()?; let normalized = NormalizationInOut { - sender: sc_address.clone(), // TODO: allow custom sender + sender: sc_address.clone(), receiver: sc_address, function_name: Some(function), arguments, diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index b741bb4..80da741 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -190,7 +190,7 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto }) .collect(); - let mut raw_result = find_smart_contract_result(&Some(scrs))? + let mut raw_result = find_smart_contract_result(&Some(scrs), None)? .unwrap_or_default(); let Ok(output_managed) = OutputManaged::multi_decode(&mut raw_result) else { diff --git a/executor/src/network/transaction/executor.rs b/executor/src/network/transaction/executor.rs index 64a39c8..e0b535b 100644 --- a/executor/src/network/transaction/executor.rs +++ b/executor/src/network/transaction/executor.rs @@ -139,7 +139,10 @@ impl TransactionExecutor for BaseTransactionNe ) .await?; - let Some(mut sc_result) = find_smart_contract_result(&result.transaction.smart_contract_results)? else { + let Some(mut sc_result) = find_smart_contract_result( + &result.transaction.smart_contract_results, + Some(&result.transaction.logs) + )? else { return Err(TransactionError::NoSmartContractResult.into()) }; diff --git a/executor/src/network/transaction/models/transaction_on_network.rs b/executor/src/network/transaction/models/transaction_on_network.rs index 09e76d4..23c2c1d 100644 --- a/executor/src/network/transaction/models/transaction_on_network.rs +++ b/executor/src/network/transaction/models/transaction_on_network.rs @@ -1,5 +1,7 @@ use serde::Deserialize; +use crate::utils::transaction::results::find_sc_error; + #[derive(Deserialize, Clone, Default)] #[serde(rename_all = "camelCase")] pub struct TransactionOnNetworkResponse { @@ -43,11 +45,15 @@ pub struct TransactionOnNetworkTransactionLogsEvents { pub address: String, pub identifier: String, pub topics: Vec, - pub data: String + pub data: Option } impl TransactionOnNetwork { pub fn is_success(&self) -> bool { - true // TODO + if let Ok(None) = find_sc_error(&self.transaction.logs) { + true + } else { + false + } } } \ No newline at end of file diff --git a/executor/src/utils/transaction/results.rs b/executor/src/utils/transaction/results.rs index ccae5f1..caf56de 100644 --- a/executor/src/utils/transaction/results.rs +++ b/executor/src/utils/transaction/results.rs @@ -1,17 +1,67 @@ -use crate::{ExecutorError, TransactionOnNetworkTransactionLogsEvents, TransactionOnNetworkTransactionSmartContractResult}; +use base64::Engine; +use multiversx_sc_scenario::scenario_model::decode_scr_data_or_panic; +use multiversx_sdk::utils::base64_decode; + +use crate::{ExecutorError, TransactionOnNetworkTransactionLogs, TransactionOnNetworkTransactionLogsEvents, TransactionOnNetworkTransactionSmartContractResult}; use crate::error::transaction::TransactionError; +#[derive(Clone, Debug)] +pub(crate) struct SmartContractError { + pub status: u64, + pub message: String +} + pub(crate) fn find_sc_deploy_event(logs: &[TransactionOnNetworkTransactionLogsEvents]) -> Option { logs.iter() .find(|event| event.identifier == "SCDeploy") .cloned() } -pub(crate) fn find_smart_contract_result(opt_sc_results: &Option>) -> Result>>, ExecutorError> { - let Some(sc_results) = opt_sc_results else { - return Ok(None) +pub(crate) fn find_smart_contract_result( + opt_sc_results: &Option>, + opt_logs: Option<&TransactionOnNetworkTransactionLogs> +) -> Result>>, ExecutorError> { + let mut result = if let Some(sc_results) = opt_sc_results { + find_smart_contract_result_from_regular_sc_results(sc_results)? + } else { + None }; + if result.is_none() { + if let Some(logs) = opt_logs { + result = find_smart_contract_result_from_logs(logs)?; + } + } + + Ok(result) +} + +pub(crate) fn find_sc_error(logs: &TransactionOnNetworkTransactionLogs) -> Result, ExecutorError> { + let opt_signal_error_event = logs.events + .iter() + .find(|log| log.identifier == "signalError"); + + if let Some(signal_error_event) = opt_signal_error_event { + let topics = &signal_error_event.topics; + + if topics.len() != 2 { + return Err(TransactionError::WrongTopicsCountForSignalErrorEvent.into()) + } + + let error = decode_topic(topics.get(1).unwrap())?; + let result = SmartContractError { + status: 4, + message: error, + }; + return Ok(Some(result)); + } + + Ok(None) +} + +fn find_smart_contract_result_from_regular_sc_results( + sc_results: &[TransactionOnNetworkTransactionSmartContractResult] +) -> Result>>, ExecutorError> { let scr_found_result = sc_results.iter() .find(|sc_result| sc_result.nonce != 0 && sc_result.data.starts_with('@')) .cloned(); @@ -40,4 +90,1196 @@ pub(crate) fn find_smart_contract_result(opt_sc_results: &Option Result>>, ExecutorError> { + let find_result = logs.events + .iter() + .rev() + .find_map(|event| { + if event.identifier == "writeLog" { + if let Some(data) = &event.data { + let decoded_data = String::from_utf8(base64_decode(data)).unwrap(); + + if decoded_data.starts_with('@') { + let out = decode_scr_data_or_panic(decoded_data.as_str()); + return Some(out); + } + } + } + + None + }); + + Ok(find_result) +} + +fn decode_topic(topic: &str) -> Result { + let decoded = base64::engine::general_purpose::STANDARD.decode(topic) + .map_err(|_| TransactionError::CannotDecodeTopic)?; + + String::from_utf8(decoded) + .map_err(|_| TransactionError::CannotDecodeTopic.into()) +} + +#[cfg(test)] +mod tests { + use crate::TransactionOnNetworkResponse; + use crate::utils::transaction::results::find_smart_contract_result; + + #[test] + fn test_with_multi_contract_same_shard_tx_that_has_no_sc_result() { + // transaction data from the devnet + // context : user -> A --call--> B, B returns a MultiValue2, A returns the B's returned value + let data = r#" + { + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "SCInvoking", + "processingTypeOnDestination": "SCInvoking", + "hash": "e914857f1bfd003ba411bae372266703e5f706fa412c378feb37faa5e18c3d73", + "nonce": 49, + "round": 7646960, + "epoch": 6339, + "value": "0", + "receiver": "erd1qqqqqqqqqqqqqpgqshqmekudxlxwp0d9j368etjamr5dw7k45u7qx40w6h", + "sender": "erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g", + "gasPrice": 1000000000, + "gasLimit": 600000000, + "gasUsed": 600000000, + "data": "Y2FsbEFub3RoZXJDb250cmFjdFJldHVyblR3b1U2NEAwMDAwMDAwMDAwMDAwMDAwMDUwMEFDRkY2QjdBNEVCODEwMUE4REU3RkY3RjVEMkMwQkYzRTRENjNGNDdBNzND", + "signature": "53cc6496647287d735bd7950f4ec79d7b51f884defda1d6d840d722b7d0d869900ccecc01602da7a7c717955e8d4ed0711b92acd980d64ed6eebd6eaed0c4608", + "sourceShard": 0, + "destinationShard": 0, + "blockNonce": 7600794, + "blockHash": "77eb0904e56d6dd596c0d72821cf33b326fde383e72903ca4df5c2f200b0ea75", + "notarizedAtSourceInMetaNonce": 7609344, + "NotarizedAtSourceInMetaHash": "12df3fe65cacde2c9742b9506ac2261d34f3c72d690301192fd8016430d51913", + "notarizedAtDestinationInMetaNonce": 7609344, + "notarizedAtDestinationInMetaHash": "12df3fe65cacde2c9742b9506ac2261d34f3c72d690301192fd8016430d51913", + "miniblockType": "TxBlock", + "miniblockHash": "03219ac7427f7511687f0768c722c759c1b1428b2664b44a0cbe2072154851ee", + "hyperblockNonce": 7609344, + "hyperblockHash": "12df3fe65cacde2c9742b9506ac2261d34f3c72d690301192fd8016430d51913", + "timestamp": 1694433360, + "logs": { + "address": "erd1qqqqqqqqqqqqqpgqshqmekudxlxwp0d9j368etjamr5dw7k45u7qx40w6h", + "events": [ + { + "address": "erd1qqqqqqqqqqqqqpgqshqmekudxlxwp0d9j368etjamr5dw7k45u7qx40w6h", + "identifier": "writeLog", + "topics": [ + "5fXsK/a5JVZf0e2Z6ViFglDOQP1zsS1XkuaLvaZ5pzw=", + "QHRvbyBtdWNoIGdhcyBwcm92aWRlZCBmb3IgcHJvY2Vzc2luZzogZ2FzIHByb3ZpZGVkID0gNTk5ODA2MDAwLCBnYXMgdXNlZCA9IDM4NDcyNDA=" + ], + "data": "QDZmNmJAMGFAMDIxODcxMWEwMA==" + }, + { + "address": "erd1qqqqqqqqqqqqqpgqshqmekudxlxwp0d9j368etjamr5dw7k45u7qx40w6h", + "identifier": "completedTxEvent", + "topics": [ + "6RSFfxv9ADukEbrjciZnA+X3BvpBLDeP6zf6peGMPXM=" + ], + "data": null + } + ] + }, + "status": "success", + "operation": "transfer", + "function": "callAnotherContractReturnTwoU64", + "initiallyPaidFee": "6192060000000000", + "fee": "6192060000000000", + "chainID": "D", + "version": 2, + "options": 0 + } + }, + "error": "", + "code": "successful" + } + "#; + + let tx_on_network = serde_json::from_str::(data) + .unwrap() + .data + .unwrap() + .transaction; + + let results = find_smart_contract_result( + &tx_on_network.smart_contract_results, + Some(&tx_on_network.logs) + ) + .unwrap() + .unwrap(); + + let expected: Vec> = vec![ + hex::decode("0a").unwrap(), + hex::decode("0218711a00").unwrap(), + ]; + + assert_eq!(results, expected) + } + + #[test] + fn test_with_multi_contract_cross_shard_tx_that_has_no_callback() { + // transaction data from the devnet + // context : user -> A --async call--> B, no callback + let data = r#" + { + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "SCInvoking", + "processingTypeOnDestination": "SCInvoking", + "hash": "4d50a055663dfee2479851684d7fb83cf00695b6f03f4dbbdf0f9232477cafc4", + "nonce": 51, + "round": 7647523, + "epoch": 6340, + "value": "0", + "receiver": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "sender": "erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g", + "gasPrice": 1000000000, + "gasLimit": 600000000, + "gasUsed": 600000000, + "data": "YXN5bmNDYWxsQW5vdGhlckNvbnRyYWN0UmV0dXJuVHdvVTY0Tm9DYWxsYmFja0AwMDAwMDAwMDAwMDAwMDAwMDUwMEFDRkY2QjdBNEVCODEwMUE4REU3RkY3RjVEMkMwQkYzRTRENjNGNDdBNzND", + "signature": "0fc30cddaa8e5365662a14344e3434cbccf287f357be99b3ed4add182f64dded774ec0d095ab1589e7c6c07e00de3b7239efc96eb2e0e97b48c1ef87084cec01", + "sourceShard": 0, + "destinationShard": 1, + "blockNonce": 7593758, + "blockHash": "a828c0ca58ef1c8aff60e512ab59f18204f1915d4a6c8285cfceb1c5725b88e8", + "notarizedAtSourceInMetaNonce": 7609903, + "NotarizedAtSourceInMetaHash": "4e90fe45c2fdccd5cf6977c1422e5f4ffa41c4e9f31fb4a50c20455f87df1e99", + "notarizedAtDestinationInMetaNonce": 7609907, + "notarizedAtDestinationInMetaHash": "10b8666a44411c3babbe20af7154fb3d47efcb1cb10d955523ec68fece26e517", + "miniblockType": "TxBlock", + "miniblockHash": "4ff4bb1ac88911d617c9b0342aeb5158db78490c2fe414cad08adcc584a77be7", + "hyperblockNonce": 7609907, + "hyperblockHash": "10b8666a44411c3babbe20af7154fb3d47efcb1cb10d955523ec68fece26e517", + "timestamp": 1694436738, + "smartContractResults": [ + { + "hash": "462b56a1530e6070dc7c15f755e51a97a6972c8cd7891f3be4635b93211890c5", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "sender": "erd1qqqqqqqqqqqqqpgq4nlkk7jwhqgp4r08lal46tqt70jdv0685u7qrr3l2d", + "data": "@00@0a@0218711a00", + "prevTxHash": "41d56fdacf3e14de67e821427c732b62ebfa07c82d2e5db6de75fe3a1c828d9b", + "originalTxHash": "4d50a055663dfee2479851684d7fb83cf00695b6f03f4dbbdf0f9232477cafc4", + "gasLimit": 595637825, + "gasPrice": 1000000000, + "callType": 2, + "logs": { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "events": [ + { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "identifier": "writeLog", + "topics": [ + "AAAAAAAAAAAFAP/Aj4ZNGKlpx2+xeJLdoJbREzb20P0=", + "QHRvbyBtdWNoIGdhcyBwcm92aWRlZCBmb3IgcHJvY2Vzc2luZzogZ2FzIHByb3ZpZGVkID0gNTk1NjM3ODI1LCBnYXMgdXNlZCA9IDIxNjE3NzA=" + ], + "data": "QDZmNmI=" + }, + { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "identifier": "completedTxEvent", + "topics": [ + "QdVv2s8+FN5n6CFCfHMrYuv6B8gtLl223nX+OhyCjZs=" + ], + "data": null + } + ] + }, + "operation": "transfer" + }, + { + "hash": "41d56fdacf3e14de67e821427c732b62ebfa07c82d2e5db6de75fe3a1c828d9b", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgq4nlkk7jwhqgp4r08lal46tqt70jdv0685u7qrr3l2d", + "sender": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "data": "returnTwoU64@4f3c60", + "prevTxHash": "4d50a055663dfee2479851684d7fb83cf00695b6f03f4dbbdf0f9232477cafc4", + "originalTxHash": "4d50a055663dfee2479851684d7fb83cf00695b6f03f4dbbdf0f9232477cafc4", + "gasLimit": 597479490, + "gasPrice": 1000000000, + "callType": 1, + "operation": "transfer", + "function": "returnTwoU64" + } + ], + "logs": { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "events": [ + { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "identifier": "writeLog", + "topics": [ + "5fXsK/a5JVZf0e2Z6ViFglDOQP1zsS1XkuaLvaZ5pzw=" + ], + "data": "QDZmNmI=" + } + ] + }, + "status": "success", + "operation": "transfer", + "function": "asyncCallAnotherContractReturnTwoU64NoCallback", + "initiallyPaidFee": "6214335000000000", + "fee": "6214335000000000", + "chainID": "D", + "version": 2, + "options": 0 + } + }, + "error": "", + "code": "successful" + } + "#; + + let tx_on_network = serde_json::from_str::(data) + .unwrap() + .data + .unwrap() + .transaction; + + let results = find_smart_contract_result( + &tx_on_network.smart_contract_results, + Some(&tx_on_network.logs) + ) + .unwrap() + .unwrap(); + + let expected: Vec> = vec![]; + + assert_eq!(results, expected) + } + + #[test] + fn test_with_multi_contract_cross_shard_tx_that_has_non_returning_callback() { + // transaction data from the devnet + // context : user -> A --async call--> B --callback--> A, the callback returns () + let data = r#" + { + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "SCInvoking", + "processingTypeOnDestination": "SCInvoking", + "hash": "4f7f19e448176e4d47a0f844cbd6bdb1b6c68035dafe927e8249ed60af1c3b17", + "nonce": 52, + "round": 7647560, + "epoch": 6340, + "value": "0", + "receiver": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "sender": "erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g", + "gasPrice": 1000000000, + "gasLimit": 600000000, + "gasUsed": 600000000, + "data": "YXN5bmNDYWxsQW5vdGhlckNvbnRyYWN0UmV0dXJuVHdvVTY0V2l0aE5vblJldHVybmluZ0NhbGxiYWNrQDAwMDAwMDAwMDAwMDAwMDAwNTAwQUNGRjZCN0E0RUI4MTAxQThERTdGRjdGNUQyQzBCRjNFNEQ2M0Y0N0E3M0M=", + "signature": "3918fce429b2059b2321b709011079755dbb835e12839278ee510e4741180540e80c6111eea1d3312b2c63446de08b20e01f6040358fa94d1633c355bb65bc0f", + "sourceShard": 0, + "destinationShard": 1, + "blockNonce": 7593795, + "blockHash": "c17e727f90025225670b7852ea9807c67753c9b3f21b6ec7cc40077e3849a8b7", + "notarizedAtSourceInMetaNonce": 7609940, + "NotarizedAtSourceInMetaHash": "c67b5c550986cfd6c94d00f4b90234eb38ee196ff0d79a00d916f3bd24be272c", + "notarizedAtDestinationInMetaNonce": 7609944, + "notarizedAtDestinationInMetaHash": "d59b7398d962ce3119679af59d5d74e10083e62c3ee2b15421cc0d607979ca18", + "miniblockType": "TxBlock", + "miniblockHash": "2977affeffeb6cf41117bed442662021cb713528cdb1d0dce4537b01caeb8e0b", + "hyperblockNonce": 7609944, + "hyperblockHash": "d59b7398d962ce3119679af59d5d74e10083e62c3ee2b15421cc0d607979ca18", + "timestamp": 1694436960, + "smartContractResults": [ + { + "hash": "fe7474188d5ca4b84c7577f03fc778d22d53c070dfcb05a9cda840229d30e4d3", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgq4nlkk7jwhqgp4r08lal46tqt70jdv0685u7qrr3l2d", + "sender": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "data": "returnTwoU64@4f3c60", + "prevTxHash": "4f7f19e448176e4d47a0f844cbd6bdb1b6c68035dafe927e8249ed60af1c3b17", + "originalTxHash": "4f7f19e448176e4d47a0f844cbd6bdb1b6c68035dafe927e8249ed60af1c3b17", + "gasLimit": 596979545, + "gasPrice": 1000000000, + "callType": 1, + "operation": "transfer", + "function": "returnTwoU64" + }, + { + "hash": "948dc6702b376d1e043db8de2f87ca12907c342f54cfad7dfebadf59145ca3ac", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "sender": "erd1qqqqqqqqqqqqqpgq4nlkk7jwhqgp4r08lal46tqt70jdv0685u7qrr3l2d", + "data": "@00@0a@0218711a00", + "prevTxHash": "fe7474188d5ca4b84c7577f03fc778d22d53c070dfcb05a9cda840229d30e4d3", + "originalTxHash": "4f7f19e448176e4d47a0f844cbd6bdb1b6c68035dafe927e8249ed60af1c3b17", + "gasLimit": 595137880, + "gasPrice": 1000000000, + "callType": 2, + "logs": { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "events": [ + { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "identifier": "writeLog", + "topics": [ + "AAAAAAAAAAAFAP/Aj4ZNGKlpx2+xeJLdoJbREzb20P0=", + "QHRvbyBtdWNoIGdhcyBwcm92aWRlZCBmb3IgcHJvY2Vzc2luZzogZ2FzIHByb3ZpZGVkID0gNTk1MTM3ODgwLCBnYXMgdXNlZCA9IDIyODg1NTA=" + ], + "data": "QDZmNmJAMGFAMDIxODcxMWEwMA==" + }, + { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "identifier": "completedTxEvent", + "topics": [ + "/nR0GI1cpLhMdXfwP8d40i1TwHDfywWpzahAIp0w5NM=" + ], + "data": null + } + ] + }, + "operation": "transfer" + } + ], + "logs": { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "events": [ + { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "identifier": "writeLog", + "topics": [ + "5fXsK/a5JVZf0e2Z6ViFglDOQP1zsS1XkuaLvaZ5pzw=" + ], + "data": "QDZmNmI=" + } + ] + }, + "status": "success", + "operation": "transfer", + "function": "asyncCallAnotherContractReturnTwoU64WithNonReturningCallback", + "initiallyPaidFee": "6235125000000000", + "fee": "6235125000000000", + "chainID": "D", + "version": 2, + "options": 0 + } + }, + "error": "", + "code": "successful" + } + "#; + + let tx_on_network = serde_json::from_str::(data) + .unwrap() + .data + .unwrap() + .transaction; + + let results = find_smart_contract_result( + &tx_on_network.smart_contract_results, + Some(&tx_on_network.logs) + ) + .unwrap() + .unwrap(); + + let expected: Vec> = vec![]; + + assert_eq!(results, expected) + } + + #[test] + fn test_with_multi_contract_cross_shard_tx_that_has_returning_callback() { + // transaction data from the devnet + // context : user -> A --async call--> B --callback--> A, the callback returns a MultiValue2 + let data = r#" + { + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "SCInvoking", + "processingTypeOnDestination": "SCInvoking", + "hash": "f34e136ca81c0e32f6fb532b753612715675073f3718b5db009bb275d246fd7a", + "nonce": 53, + "round": 7647583, + "epoch": 6340, + "value": "0", + "receiver": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "sender": "erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g", + "gasPrice": 1000000000, + "gasLimit": 600000000, + "gasUsed": 600000000, + "data": "YXN5bmNDYWxsQW5vdGhlckNvbnRyYWN0UmV0dXJuVHdvVTY0V2l0aFJldHVybmluZ0NhbGxiYWNrQDAwMDAwMDAwMDAwMDAwMDAwNTAwQUNGRjZCN0E0RUI4MTAxQThERTdGRjdGNUQyQzBCRjNFNEQ2M0Y0N0E3M0M=", + "signature": "858958d4aaf9cb0220ab2933edad3f65e1cb4c58aa7940cb0f40b489d0bd9fdf5c4736a40d6e813743ee622bb91e9f86eacf01b9a31e0ff53f9c84f13c500304", + "sourceShard": 0, + "destinationShard": 1, + "blockNonce": 7593818, + "blockHash": "b19f97110ca38d3cb15f802a00ab403491b0e5804ebc701527ab50064dc06825", + "notarizedAtSourceInMetaNonce": 7609963, + "NotarizedAtSourceInMetaHash": "4d9db6de610ca778114d44fe91dd036fac7c375c373ae9e77130d3fb9efc8391", + "notarizedAtDestinationInMetaNonce": 7609967, + "notarizedAtDestinationInMetaHash": "a4573d388c31860f9bd6f9507b65d1b3130e445abcada538f10704feba4614e7", + "miniblockType": "TxBlock", + "miniblockHash": "530f5fa3c7af474a187caca8dcea02a7a155017414147871d083bed5c49ec8f5", + "hyperblockNonce": 7609967, + "hyperblockHash": "a4573d388c31860f9bd6f9507b65d1b3130e445abcada538f10704feba4614e7", + "timestamp": 1694437098, + "smartContractResults": [ + { + "hash": "065291164a8acd27c26b5a8f09664810081fda18cd54fca635196cf9b200297a", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgq4nlkk7jwhqgp4r08lal46tqt70jdv0685u7qrr3l2d", + "sender": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "data": "returnTwoU64@4f3c60", + "prevTxHash": "f34e136ca81c0e32f6fb532b753612715675073f3718b5db009bb275d246fd7a", + "originalTxHash": "f34e136ca81c0e32f6fb532b753612715675073f3718b5db009bb275d246fd7a", + "gasLimit": 596994205, + "gasPrice": 1000000000, + "callType": 1, + "operation": "transfer", + "function": "returnTwoU64" + }, + { + "hash": "bc31cb153ae615204625df84fe9ae3a159aa412b7342f3dca958dd5517a08197", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "sender": "erd1qqqqqqqqqqqqqpgq4nlkk7jwhqgp4r08lal46tqt70jdv0685u7qrr3l2d", + "data": "@00@0a@0218711a00", + "prevTxHash": "065291164a8acd27c26b5a8f09664810081fda18cd54fca635196cf9b200297a", + "originalTxHash": "f34e136ca81c0e32f6fb532b753612715675073f3718b5db009bb275d246fd7a", + "gasLimit": 595152540, + "gasPrice": 1000000000, + "callType": 2, + "logs": { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "events": [ + { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "identifier": "writeLog", + "topics": [ + "AAAAAAAAAAAFAP/Aj4ZNGKlpx2+xeJLdoJbREzb20P0=", + "QHRvbyBtdWNoIGdhcyBwcm92aWRlZCBmb3IgcHJvY2Vzc2luZzogZ2FzIHByb3ZpZGVkID0gNTk1MTUyNTQwLCBnYXMgdXNlZCA9IDIyODgwMTU=" + ], + "data": "QDZmNmJAMGFAMDIxODcxMWEwMA==" + }, + { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "identifier": "completedTxEvent", + "topics": [ + "BlKRFkqKzSfCa1qPCWZIEAgf2hjNVPymNRls+bIAKXo=" + ], + "data": null + } + ] + }, + "operation": "transfer" + } + ], + "logs": { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "events": [ + { + "address": "erd1qqqqqqqqqqqqqpgqllqglpjdrz5kn3m0k9uf9hdqjmg3xdhk6r7se3wvlk", + "identifier": "writeLog", + "topics": [ + "5fXsK/a5JVZf0e2Z6ViFglDOQP1zsS1XkuaLvaZ5pzw=" + ], + "data": "QDZmNmI=" + } + ] + }, + "status": "success", + "operation": "transfer", + "function": "asyncCallAnotherContractReturnTwoU64WithReturningCallback", + "initiallyPaidFee": "6230670000000000", + "fee": "6230670000000000", + "chainID": "D", + "version": 2, + "options": 0 + } + }, + "error": "", + "code": "successful" + } + "#; + + let tx_on_network = serde_json::from_str::(data) + .unwrap() + .data + .unwrap() + .transaction; + + let results = find_smart_contract_result( + &tx_on_network.smart_contract_results, + Some(&tx_on_network.logs) + ) + .unwrap() + .unwrap(); + + let expected: Vec> = vec![]; + + assert_eq!(results, expected) + } + + #[test] + fn test_transaction_multiple_sc_results() { + let data = r#" + { + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "BuiltInFunctionCall", + "processingTypeOnDestination": "SCInvoking", + "hash": "c6dc718c56c8795156d847f4f9768f2b1976a516d390fdce0f5b8bad1ac3cce5", + "nonce": 236, + "round": 3353069, + "epoch": 1371, + "value": "0", + "receiver": "erd1qqqqqqqqqqqqqpgq4zafu6rzdw7fj07hjh5tkm68jsaj7hl60n4s8py4ra", + "sender": "erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa", + "gasPrice": 1000000000, + "gasLimit": 100000000, + "gasUsed": 12767998, + "data": "RVNEVFRyYW5zZmVyQDU1NTQ0YjJkMzEzNDY0MzUzNzY0QDhhYzcyMzA0ODllODAwMDBANzM3NzYxNzA1NDZmNmI2NTZlNzM0NjY5Nzg2NTY0NDk2ZTcwNzU3NEA1NzQ1NDc0YzQ0MmQ2MTMyMzg2MzM1MzlAZThkNGE1MTAwMA==", + "signature": "caed340339e3ae17a92783f5f08f96ac875885e44c25510cd11251ce23f22994985a6605c4d36f841b7110288a5e928f624f150a66a9de8ade36b68028a9af09", + "sourceShard": 0, + "destinationShard": 1, + "blockNonce": 3288476, + "blockHash": "0e70ea5fb26c58b1029c84e24eb9a661272b6253d30c668af91f167bfd67b2b0", + "notarizedAtSourceInMetaNonce": 3290316, + "NotarizedAtSourceInMetaHash": "8200662ca3ade8fa8e1dd3a4184b0a74d4c43de8f4153170a506f60c94ad3e8b", + "notarizedAtDestinationInMetaNonce": 3290320, + "notarizedAtDestinationInMetaHash": "e5f332a8f2070fd1c4ff90f5dc1ee691f36e4ecb9cb5c37e8e7c8595036c3792", + "miniblockType": "TxBlock", + "miniblockHash": "d271ad87c6cf8653cc950272f3ee5e976820ada80468518fa35fe45b6e33dca8", + "hyperblockNonce": 3290320, + "hyperblockHash": "e5f332a8f2070fd1c4ff90f5dc1ee691f36e4ecb9cb5c37e8e7c8595036c3792", + "timestamp": 1714118414, + "smartContractResults": [ + { + "hash": "c0e63f1018ece1036e3e6dc405553e5f6badfe0f5d2a104f4cd4457a872d02f9", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgq4zafu6rzdw7fj07hjh5tkm68jsaj7hl60n4s8py4ra", + "sender": "erd1qqqqqqqqqqqqqpgq4zafu6rzdw7fj07hjh5tkm68jsaj7hl60n4s8py4ra", + "data": "swapTokensFixedInput@5745474c442d613238633539@e8d4a51000", + "prevTxHash": "c6dc718c56c8795156d847f4f9768f2b1976a516d390fdce0f5b8bad1ac3cce5", + "originalTxHash": "c6dc718c56c8795156d847f4f9768f2b1976a516d390fdce0f5b8bad1ac3cce5", + "gasLimit": 99559500, + "gasPrice": 1000000000, + "callType": 0, + "originalSender": "erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa", + "operation": "transfer", + "function": "swapTokensFixedInput" + }, + { + "hash": "40078cec63b6e0d0d9522ea5e6d2d0cb6f21ebae981f354de3dc3545ac2928ad", + "nonce": 0, + "value": 0, + "receiver": "erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa", + "sender": "erd1qqqqqqqqqqqqqpgq4zafu6rzdw7fj07hjh5tkm68jsaj7hl60n4s8py4ra", + "data": "ESDTTransfer@5745474c442d613238633539@9b35e4dd3902b9", + "prevTxHash": "c6dc718c56c8795156d847f4f9768f2b1976a516d390fdce0f5b8bad1ac3cce5", + "originalTxHash": "c6dc718c56c8795156d847f4f9768f2b1976a516d390fdce0f5b8bad1ac3cce5", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "originalSender": "erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa", + "logs": { + "address": "erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa", + "events": [ + { + "address": "erd1qqqqqqqqqqqqqpgq4zafu6rzdw7fj07hjh5tkm68jsaj7hl60n4s8py4ra", + "identifier": "ESDTTransfer", + "topics": [ + "V0VHTEQtYTI4YzU5", + "", + "mzXk3TkCuQ==", + "4yr+3JBP4ZOXRq2XO+s4NWPPY2QrpmmzBA+blCil7WA=" + ], + "data": null, + "additionalData": [ + "", + "RVNEVFRyYW5zZmVy", + "V0VHTEQtYTI4YzU5", + "mzXk3TkCuQ==" + ] + }, + { + "address": "erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa", + "identifier": "writeLog", + "topics": [ + "AAAAAAAAAAAFAKi6nmhia7yZP9eV6LtvR5Q7L1/6fOs=" + ], + "data": "QDZmNmI=", + "additionalData": [ + "QDZmNmI=" + ] + }, + { + "address": "erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa", + "identifier": "completedTxEvent", + "topics": [ + "xtxxjFbIeVFW2Ef0+XaPKxl2pRbTkP3OD1uLrRrDzOU=" + ], + "data": null, + "additionalData": null + } + ] + }, + "tokens": [ + "WEGLD-a28c59" + ], + "esdtValues": [ + "43687878470468281" + ], + "operation": "ESDTTransfer" + }, + { + "hash": "26487a550721b8282ceafe603bb4d53ee93929ffd9ded39b08e7422adb4d8795", + "nonce": 237, + "value": 872320020000000, + "receiver": "erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa", + "sender": "erd1qqqqqqqqqqqqqpgq4zafu6rzdw7fj07hjh5tkm68jsaj7hl60n4s8py4ra", + "data": "@6f6b@0000000c5745474c442d6132386335390000000000000000000000079b35e4dd3902b9", + "prevTxHash": "c6dc718c56c8795156d847f4f9768f2b1976a516d390fdce0f5b8bad1ac3cce5", + "originalTxHash": "c6dc718c56c8795156d847f4f9768f2b1976a516d390fdce0f5b8bad1ac3cce5", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "logs": { + "address": "erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa", + "events": [ + { + "address": "erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa", + "identifier": "completedTxEvent", + "topics": [ + "xtxxjFbIeVFW2Ef0+XaPKxl2pRbTkP3OD1uLrRrDzOU=" + ], + "data": null, + "additionalData": null + } + ] + }, + "operation": "transfer", + "isRefund": true + }, + { + "hash": "798ba4333a7cedb62f811d942dedb8c0c09bf9945a0d2ccede2eaed967eba135", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgqw88ux2l44eufvwz2uhvduhq03g8pxc4j0n4s0frzjz", + "sender": "erd1qqqqqqqqqqqqqpgq4zafu6rzdw7fj07hjh5tkm68jsaj7hl60n4s8py4ra", + "data": "ESDTTransfer@55544b2d313464353764@2d79883d2000@6465706f7369745377617046656573", + "prevTxHash": "c6dc718c56c8795156d847f4f9768f2b1976a516d390fdce0f5b8bad1ac3cce5", + "originalTxHash": "c6dc718c56c8795156d847f4f9768f2b1976a516d390fdce0f5b8bad1ac3cce5", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "originalSender": "erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa", + "tokens": [ + "UTK-14d57d" + ], + "esdtValues": [ + "50000000000000" + ], + "operation": "ESDTTransfer", + "function": "depositSwapFees" + } + ], + "logs": { + "address": "erd1qqqqqqqqqqqqqpgq4zafu6rzdw7fj07hjh5tkm68jsaj7hl60n4s8py4ra", + "events": [ + { + "address": "erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa", + "identifier": "ESDTTransfer", + "topics": [ + "VVRLLTE0ZDU3ZA==", + "", + "iscjBInoAAA=", + "AAAAAAAAAAAFAKi6nmhia7yZP9eV6LtvR5Q7L1/6fOs=" + ], + "data": null, + "additionalData": [ + "", + "RVNEVFRyYW5zZmVy", + "VVRLLTE0ZDU3ZA==", + "iscjBInoAAA=", + "c3dhcFRva2Vuc0ZpeGVkSW5wdXQ=", + "V0VHTEQtYTI4YzU5", + "6NSlEAA=" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgq4zafu6rzdw7fj07hjh5tkm68jsaj7hl60n4s8py4ra", + "identifier": "ESDTTransfer", + "topics": [ + "VVRLLTE0ZDU3ZA==", + "", + "LXmIPSAA", + "AAAAAAAAAAAFAHHPwyv1rniWOErl2N5cD4oOE2KyfOs=" + ], + "data": "RXhlY3V0ZU9uRGVzdENvbnRleHQ=", + "additionalData": [ + "RXhlY3V0ZU9uRGVzdENvbnRleHQ=", + "RVNEVFRyYW5zZmVy", + "VVRLLTE0ZDU3ZA==", + "LXmIPSAA", + "ZGVwb3NpdFN3YXBGZWVz" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqw88ux2l44eufvwz2uhvduhq03g8pxc4j0n4s0frzjz", + "identifier": "depositSwapFees", + "topics": [ + "ZGVwb3NpdF9zd2FwX2ZlZXNfZXZlbnQ=", + "AAAAAAAAAAAFAKi6nmhia7yZP9eV6LtvR5Q7L1/6fOs=", + "ug==", + "AAAAClVUSy0xNGQ1N2QAAAAAAAAAAAAAAAYteYg9IAA=" + ], + "data": null, + "additionalData": [ + "" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgq4zafu6rzdw7fj07hjh5tkm68jsaj7hl60n4s8py4ra", + "identifier": "ESDTTransfer", + "topics": [ + "V0VHTEQtYTI4YzU5", + "", + "mzXk3TkCuQ==", + "4yr+3JBP4ZOXRq2XO+s4NWPPY2QrpmmzBA+blCil7WA=" + ], + "data": "RGlyZWN0Q2FsbA==", + "additionalData": [ + "RGlyZWN0Q2FsbA==", + "RVNEVFRyYW5zZmVy", + "V0VHTEQtYTI4YzU5", + "mzXk3TkCuQ==" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgq4zafu6rzdw7fj07hjh5tkm68jsaj7hl60n4s8py4ra", + "identifier": "swapTokensFixedInput", + "topics": [ + "c3dhcA==", + "VVRLLTE0ZDU3ZA==", + "V0VHTEQtYTI4YzU5", + "4yr+3JBP4ZOXRq2XO+s4NWPPY2QrpmmzBA+blCil7WA=", + "BVs=" + ], + "data": "4yr+3JBP4ZOXRq2XO+s4NWPPY2QrpmmzBA+blCil7WAAAAAKVVRLLTE0ZDU3ZAAAAAiKxyMEiegAAAAAAAxXRUdMRC1hMjhjNTkAAAAHmzXk3TkCuQAAAAcjhvJvwQAAAAAACwGBykedC25GCD5kAAAACgGwxHNBlOj27dQAAAAAADItnAAAAAAAAAVbAAAAAGYrXw4=", + "additionalData": [ + "4yr+3JBP4ZOXRq2XO+s4NWPPY2QrpmmzBA+blCil7WAAAAAKVVRLLTE0ZDU3ZAAAAAiKxyMEiegAAAAAAAxXRUdMRC1hMjhjNTkAAAAHmzXk3TkCuQAAAAcjhvJvwQAAAAAACwGBykedC25GCD5kAAAACgGwxHNBlOj27dQAAAAAADItnAAAAAAAAAVbAAAAAGYrXw4=" + ] + } + ] + }, + "status": "success", + "tokens": [ + "UTK-14d57d" + ], + "esdtValues": [ + "10000000000000000000" + ], + "operation": "ESDTTransfer", + "function": "swapTokensFixedInput", + "initiallyPaidFee": "1238095000000000", + "fee": "365774980000000", + "chainID": "D", + "version": 1, + "options": 0 + } + }, + "error": "", + "code": "successful" + }"#; + + let tx_on_network = serde_json::from_str::(data) + .unwrap() + .data + .unwrap() + .transaction; + + let results = find_smart_contract_result( + &tx_on_network.smart_contract_results, + Some(&tx_on_network.logs) + ) + .unwrap() + .unwrap(); + + let expected: Vec> = vec![ + hex::decode("0000000c5745474c442d6132386335390000000000000000000000079b35e4dd3902b9").unwrap() + ]; + + assert_eq!(results, expected) + } + + #[test] + fn test_with_tx_that_has_sc_result() { + // transaction data from the devnet, an artificial "10" result has been appended on the original result + let data = r#" + { + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "BuiltInFunctionCall", + "processingTypeOnDestination": "SCInvoking", + "hash": "d4058bd3c13db0b14832c7c58fe163db2f579ff6544380586b8a27d88b4a5070", + "nonce": 30, + "round": 7639115, + "epoch": 6333, + "value": "0", + "receiver": "erd1qqqqqqqqqqqqqpgq5400a82at6ttplyrdhyn8kk9lhxaed5d0n4s9s77kz", + "sender": "erd14r7m6drneg69jyxvxxnrsss6x5gg2cqqwreyhdwanj0fcza0ynnq5jmy4g", + "gasPrice": 1000000000, + "gasLimit": 25500000, + "gasUsed": 15297149, + "data": "RVNEVFRyYW5zZmVyQDQ4NTQ0ZDJkNjY2NTMxNjYzNjM5QDBkZTBiNmIzYTc2NDAwMDBANzM3NzYxNzA1NDZmNmI2NTZlNzM0NjY5Nzg2NTY0NDk2ZTcwNzU3NEA1NzQ1NDc0YzQ0MmQ2NDM3NjMzNjYyNjJAMDM3Yzc3OGZjY2U5YzU1Yg==", + "signature": "e912fae4b7a9e51ddf316a5e82a0f457d453a62e3c17477f5d6175e1b33c5e92ddb187d65f54cf3131a0603321290279a0456c20778039f2ab09b54e33c60f0d", + "sourceShard": 2, + "destinationShard": 1, + "blockNonce": 7585351, + "blockHash": "e456f38f11fec78ed26d5fda068e912739dceedb2e5ce559bf17614b8386c039", + "notarizedAtSourceInMetaNonce": 7601495, + "NotarizedAtSourceInMetaHash": "e28c6011d4b3f73f3945cae70ff251e675dfea331a70077c5ab3310e3101af17", + "notarizedAtDestinationInMetaNonce": 7601499, + "notarizedAtDestinationInMetaHash": "333d4266614e981cc1c5654f85ef496038a8cddac46dfc0ad0b7c44c37ab489d", + "miniblockType": "TxBlock", + "miniblockHash": "13e041f32fde79ebf1abdcfe692e99516f9ec6778dcb917251b440daa7f1210a", + "hyperblockNonce": 7601499, + "hyperblockHash": "333d4266614e981cc1c5654f85ef496038a8cddac46dfc0ad0b7c44c37ab489d", + "timestamp": 1694386290, + "smartContractResults": [ + { + "hash": "a23faa3c80bae0b968f007ff0fad3afdec05b4e71d749c3d583dec10c6eb05a2", + "nonce": 0, + "value": 0, + "receiver": "erd14r7m6drneg69jyxvxxnrsss6x5gg2cqqwreyhdwanj0fcza0ynnq5jmy4g", + "sender": "erd1qqqqqqqqqqqqqpgq5400a82at6ttplyrdhyn8kk9lhxaed5d0n4s9s77kz", + "data": "ESDTTransfer@5745474c442d643763366262@03856446ff9a304b", + "prevTxHash": "d4058bd3c13db0b14832c7c58fe163db2f579ff6544380586b8a27d88b4a5070", + "originalTxHash": "d4058bd3c13db0b14832c7c58fe163db2f579ff6544380586b8a27d88b4a5070", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "logs": { + "address": "erd14r7m6drneg69jyxvxxnrsss6x5gg2cqqwreyhdwanj0fcza0ynnq5jmy4g", + "events": [ + { + "address": "erd1qqqqqqqqqqqqqpgq5400a82at6ttplyrdhyn8kk9lhxaed5d0n4s9s77kz", + "identifier": "ESDTTransfer", + "topics": [ + "V0VHTEQtZDdjNmJi", + "", + "A4VkRv+aMEs=", + "qP29NHPKNFkQzDGmOEIaNRCFYABw8ku13ZyenAuvJOY=" + ], + "data": null + }, + { + "address": "erd14r7m6drneg69jyxvxxnrsss6x5gg2cqqwreyhdwanj0fcza0ynnq5jmy4g", + "identifier": "writeLog", + "topics": [ + "AAAAAAAAAAAFAKVe/p1dXpaw/INtyTPaxf3N3LaNfOs=" + ], + "data": "QDZmNmI=" + }, + { + "address": "erd14r7m6drneg69jyxvxxnrsss6x5gg2cqqwreyhdwanj0fcza0ynnq5jmy4g", + "identifier": "completedTxEvent", + "topics": [ + "1AWL08E9sLFIMsfFj+Fj2y9Xn/ZUQ4BYa4on2ItKUHA=" + ], + "data": null + } + ] + }, + "tokens": [ + "WEGLD-d7c6bb" + ], + "esdtValues": [ + "253719210115084363" + ], + "operation": "ESDTTransfer" + }, + { + "hash": "b7b4d15917fd215399d8e772c3c4e732008baaedc2b8172f71c91708ba7523f0", + "nonce": 31, + "value": 102028510000000, + "receiver": "erd14r7m6drneg69jyxvxxnrsss6x5gg2cqqwreyhdwanj0fcza0ynnq5jmy4g", + "sender": "erd1qqqqqqqqqqqqqpgq5400a82at6ttplyrdhyn8kk9lhxaed5d0n4s9s77kz", + "data": "@6f6b@0000000c5745474c442d64376336626200000000000000000000000803856446ff9a304b@10", + "prevTxHash": "d4058bd3c13db0b14832c7c58fe163db2f579ff6544380586b8a27d88b4a5070", + "originalTxHash": "d4058bd3c13db0b14832c7c58fe163db2f579ff6544380586b8a27d88b4a5070", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "logs": { + "address": "erd14r7m6drneg69jyxvxxnrsss6x5gg2cqqwreyhdwanj0fcza0ynnq5jmy4g", + "events": [ + { + "address": "erd14r7m6drneg69jyxvxxnrsss6x5gg2cqqwreyhdwanj0fcza0ynnq5jmy4g", + "identifier": "completedTxEvent", + "topics": [ + "1AWL08E9sLFIMsfFj+Fj2y9Xn/ZUQ4BYa4on2ItKUHA=" + ], + "data": null + } + ] + }, + "operation": "transfer", + "isRefund": true + }, + { + "hash": "05a766ca05d2053d1c0fbeb1797116474a06c86402a3bfd6c132c9a24cfa1bb0", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgq5400a82at6ttplyrdhyn8kk9lhxaed5d0n4s9s77kz", + "sender": "erd1qqqqqqqqqqqqqpgq5400a82at6ttplyrdhyn8kk9lhxaed5d0n4s9s77kz", + "data": "swapTokensFixedInput@5745474c442d643763366262@037c778fcce9c55b", + "prevTxHash": "d4058bd3c13db0b14832c7c58fe163db2f579ff6544380586b8a27d88b4a5070", + "originalTxHash": "d4058bd3c13db0b14832c7c58fe163db2f579ff6544380586b8a27d88b4a5070", + "gasLimit": 25050500, + "gasPrice": 1000000000, + "callType": 0, + "operation": "transfer", + "function": "swapTokensFixedInput" + }, + { + "hash": "4e639c80822d5d7780c8326d683fa9cd6d59649d14122dfabc5a96dda36da527", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgquu5rsa4ee6l4azz6vdu4hjp8z4p6tt8m0n4suht3dy", + "sender": "erd1qqqqqqqqqqqqqpgq5400a82at6ttplyrdhyn8kk9lhxaed5d0n4s9s77kz", + "data": "ESDTTransfer@5745474c442d643763366262@e7730d1ef1b0@737761704e6f466565416e64466f7277617264@4d45582d646332383963@0000000000000000000000000000000000000000000000000000000000000000", + "prevTxHash": "d4058bd3c13db0b14832c7c58fe163db2f579ff6544380586b8a27d88b4a5070", + "originalTxHash": "d4058bd3c13db0b14832c7c58fe163db2f579ff6544380586b8a27d88b4a5070", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "tokens": [ + "WEGLD-d7c6bb" + ], + "esdtValues": [ + "254481327387056" + ], + "operation": "ESDTTransfer", + "function": "swapNoFeeAndForward" + } + ], + "logs": { + "address": "erd1qqqqqqqqqqqqqpgq5400a82at6ttplyrdhyn8kk9lhxaed5d0n4s9s77kz", + "events": [ + { + "address": "erd14r7m6drneg69jyxvxxnrsss6x5gg2cqqwreyhdwanj0fcza0ynnq5jmy4g", + "identifier": "ESDTTransfer", + "topics": [ + "SFRNLWZlMWY2OQ==", + "", + "DeC2s6dkAAA=", + "AAAAAAAAAAAFAKVe/p1dXpaw/INtyTPaxf3N3LaNfOs=" + ], + "data": null + }, + { + "address": "erd1qqqqqqqqqqqqqpgq5400a82at6ttplyrdhyn8kk9lhxaed5d0n4s9s77kz", + "identifier": "ESDTTransfer", + "topics": [ + "V0VHTEQtZDdjNmJi", + "", + "53MNHvGw", + "AAAAAAAAAAAFAOcoOHa5zr9eiFpjeVvIJxVDpaz7fOs=" + ], + "data": null + }, + { + "address": "erd1qqqqqqqqqqqqqpgquu5rsa4ee6l4azz6vdu4hjp8z4p6tt8m0n4suht3dy", + "identifier": "ESDTLocalBurn", + "topics": [ + "TUVYLWRjMjg5Yw==", + "", + "AuMDPq1jy03x" + ], + "data": null + }, + { + "address": "erd1qqqqqqqqqqqqqpgquu5rsa4ee6l4azz6vdu4hjp8z4p6tt8m0n4suht3dy", + "identifier": "swapNoFeeAndForward", + "topics": [ + "c3dhcF9ub19mZWVfYW5kX2ZvcndhcmQ=", + "TUVYLWRjMjg5Yw==", + "AAAAAAAAAAAFAKVe/p1dXpaw/INtyTPaxf3N3LaNfOs=", + "GL0=" + ], + "data": "AAAAAAAAAAAFAKVe/p1dXpaw/INtyTPaxf3N3LaNfOsAAAAMV0VHTEQtZDdjNmJiAAAABudzDR7xsAAAAApNRVgtZGMyODljAAAACQLjAz6tY8tN8QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABzvkcAAAAAAAAYvQAAAABk/khy" + }, + { + "address": "erd1qqqqqqqqqqqqqpgq5400a82at6ttplyrdhyn8kk9lhxaed5d0n4s9s77kz", + "identifier": "ESDTTransfer", + "topics": [ + "V0VHTEQtZDdjNmJi", + "", + "A4VkRv+aMEs=", + "qP29NHPKNFkQzDGmOEIaNRCFYABw8ku13ZyenAuvJOY=" + ], + "data": null + }, + { + "address": "erd1qqqqqqqqqqqqqpgq5400a82at6ttplyrdhyn8kk9lhxaed5d0n4s9s77kz", + "identifier": "swapTokensFixedInput", + "topics": [ + "c3dhcA==", + "SFRNLWZlMWY2OQ==", + "V0VHTEQtZDdjNmJi", + "qP29NHPKNFkQzDGmOEIaNRCFYABw8ku13ZyenAuvJOY=", + "GL0=" + ], + "data": "qP29NHPKNFkQzDGmOEIaNRCFYABw8ku13ZyenAuvJOYAAAAKSFRNLWZlMWY2OQAAAAgN4Lazp2QAAAAAAAxXRUdMRC1kN2M2YmIAAAAIA4VkRv+aMEsAAAAHA41+pMaAAAAAAAoofxtJRPkr8X9kAAAACgpOPCsHUu261HUAAAAAAHO+RwAAAAAAABi9AAAAAGT+SHI=" + } + ] + }, + "status": "success", + "tokens": [ + "HTM-fe1f69" + ], + "esdtValues": [ + "1000000000000000000" + ], + "operation": "ESDTTransfer", + "function": "swapTokensFixedInput", + "initiallyPaidFee": "502005000000000", + "fee": "399976490000000", + "chainID": "D", + "version": 1, + "options": 0 + } + }, + "error": "", + "code": "successful" + } + "#; + + let tx_on_network = serde_json::from_str::(data) + .unwrap() + .data + .unwrap() + .transaction; + + let results = find_smart_contract_result( + &tx_on_network.smart_contract_results, + Some(&tx_on_network.logs) + ) + .unwrap() + .unwrap(); + + let expected: Vec> = vec![ + hex::decode("0000000c5745474c442d64376336626200000000000000000000000803856446ff9a304b") + .unwrap(), + hex::decode("10").unwrap(), + ]; + + assert_eq!(results, expected) + } + + #[test] + fn test_with_tx_that_has_no_sc_result() { + // transaction data from the devnet + let data = r#" + { + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "SCInvoking", + "processingTypeOnDestination": "SCInvoking", + "hash": "6afac3ec13c89cc56154d06efdb457a24f58361699eee00a48202a8f8adc8c8a", + "nonce": 17, + "round": 7548071, + "epoch": 6257, + "value": "0", + "receiver": "erd1qqqqqqqqqqqqqpgq4nlkk7jwhqgp4r08lal46tqt70jdv0685u7qrr3l2d", + "sender": "erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g", + "gasPrice": 1000000000, + "gasLimit": 600000000, + "gasUsed": 600000000, + "data": "cmV0dXJuVHdvVTY0", + "signature": "f3a3ca96a78c90c9cf1b08541e1777010f0176a5e1e525e631155b2784932cbfd74c9168d03ba201fd5434d1a1b4789895ddade9883eca2ee9e0bce18468fb00", + "sourceShard": 0, + "destinationShard": 0, + "blockNonce": 7502091, + "blockHash": "5ec66c651cb1514cba200e7e80a4491880f0db678ce7631c397872e3842f0aa2", + "notarizedAtSourceInMetaNonce": 7510505, + "NotarizedAtSourceInMetaHash": "8410309ec5b988af79b4dcfb44fd4729d46874ebd796672c78e417e314409051", + "notarizedAtDestinationInMetaNonce": 7510505, + "notarizedAtDestinationInMetaHash": "8410309ec5b988af79b4dcfb44fd4729d46874ebd796672c78e417e314409051", + "miniblockType": "TxBlock", + "miniblockHash": "fb150e515449c9b658879ed06f256b429239cbe78ec2c2821deb4b283ff21554", + "hyperblockNonce": 7510505, + "hyperblockHash": "8410309ec5b988af79b4dcfb44fd4729d46874ebd796672c78e417e314409051", + "timestamp": 1693840026, + "logs": { + "address": "erd1qqqqqqqqqqqqqpgq4nlkk7jwhqgp4r08lal46tqt70jdv0685u7qrr3l2d", + "events": [ + { + "address": "erd1qqqqqqqqqqqqqpgq4nlkk7jwhqgp4r08lal46tqt70jdv0685u7qrr3l2d", + "identifier": "writeLog", + "topics": [ + "5fXsK/a5JVZf0e2Z6ViFglDOQP1zsS1XkuaLvaZ5pzw=", + "QHRvbyBtdWNoIGdhcyBwcm92aWRlZCBmb3IgcHJvY2Vzc2luZzogZ2FzIHByb3ZpZGVkID0gNTk5OTMyMDAwLCBnYXMgdXNlZCA9IDE4NDE2NjU=" + ], + "data": "QDZmNmJAMGFAMDIxODcxMWEwMA==" + }, + { + "address": "erd1qqqqqqqqqqqqqpgq4nlkk7jwhqgp4r08lal46tqt70jdv0685u7qrr3l2d", + "identifier": "completedTxEvent", + "topics": [ + "avrD7BPInMVhVNBu/bRXok9YNhaZ7uAKSCAqj4rcjIo=" + ], + "data": null + } + ] + }, + "status": "success", + "operation": "transfer", + "function": "returnTwoU64", + "initiallyPaidFee": "6067320000000000", + "fee": "6067320000000000", + "chainID": "D", + "version": 1, + "options": 0 + } + }, + "error": "", + "code": "successful" + } + "#; + + let tx_on_network = serde_json::from_str::(data) + .unwrap() + .data + .unwrap() + .transaction; + + let results = find_smart_contract_result( + &tx_on_network.smart_contract_results, + Some(&tx_on_network.logs) + ) + .unwrap() + .unwrap(); + + let expected: Vec> = vec![ + hex::decode("0a").unwrap(), + hex::decode("0218711a00").unwrap(), + ]; + + assert_eq!(results, expected) + } } \ No newline at end of file diff --git a/tester/core/tests/network_deploy.rs b/tester/core/tests/network_deploy.rs index 4510117..f162d88 100644 --- a/tester/core/tests/network_deploy.rs +++ b/tester/core/tests/network_deploy.rs @@ -61,7 +61,7 @@ impl BlockchainInteractor for MockInteractor { let response = TransactionOnNetwork { transaction: TransactionOnNetworkTransaction { gas_used: 0, - smart_contract_results: Some(vec![ // TODO: use writeLog result + smart_contract_results: Some(vec![ TransactionOnNetworkTransactionSmartContractResult { hash: "".to_string(), nonce: 1, @@ -75,7 +75,7 @@ impl BlockchainInteractor for MockInteractor { address: NEW_CONTRACT.to_string(), identifier: "SCDeploy".to_string(), topics: vec![], - data, + data: Some(data), } ], }, From cd5fa4db9712868aad13d0445b36c9d9f90ece2d Mon Sep 17 00:00:00 2001 From: Fusee Date: Wed, 29 May 2024 19:42:55 +0200 Subject: [PATCH 17/25] removed some warnings + fixes --- .../contract-with-upgrade-endpoint.abi.json | 37 + .../tester-contract-deploy-return.abi.json | 237 +- .novax/abis/tester-contract.abi.json | 20 +- .novax/tester-contract.wasm | Bin 12835 -> 11942 bytes Cargo.lock | 102 +- abi-build/src/generator/impl_abi_mod.rs | 4 +- abi-build/src/generator/impl_contract.rs | 6 +- caching/src/locked/caching.rs | 6 +- caching/src/multi/caching.rs | 7 +- core/Cargo.toml | 10 +- core/build.rs | 11 +- core/src/code/bytes.rs | 2 +- core/src/code/file.rs | 3 +- data/Cargo.toml | 8 +- executor/Cargo.toml | 8 +- executor/src/dummy/transaction.rs | 9 +- executor/src/error/network.rs | 3 + executor/src/lib.rs | 2 +- executor/src/mocking/executor.rs | 32 +- executor/src/network/query/models/response.rs | 4 +- executor/src/network/query/proxy.rs | 12 +- executor/src/network/simulate.rs | 10 - .../src/network/transaction/interactor.rs | 4 - executor/src/network/utils/transaction.rs | 4 +- .../src/utils/date/get_current_timestamp.rs | 3 - executor/src/utils/transaction/data.rs | 8 +- .../src/utils/transaction/normalization.rs | 6 +- executor/src/utils/transaction/transfers.rs | 1 - mocking/Cargo.toml | 6 +- mocking/src/lib.rs | 3 - mocking/src/world/infos.rs | 4 +- tester/contract/.gitignore | 10 - tester/contract/Cargo.lock | 2513 +++++++++++++++++ tester/contract/Cargo.toml | 15 +- tester/contract/meta/Cargo.toml | 19 +- tester/contract/multiversx.json | 3 + .../contract/output/tester-contract.abi.json | 840 ++++++ .../output/tester-contract.imports.json | 43 + .../contract/output/tester-contract.mxsc.json | 894 ++++++ tester/contract/output/tester-contract.wasm | Bin 0 -> 11942 bytes tester/contract/src/call.rs | 9 +- tester/contract/src/lib.rs | 3 + tester/contract/wasm/Cargo.lock | 188 ++ tester/contract/wasm/Cargo.toml | 31 +- tester/contract/wasm/src/lib.rs | 10 +- tester/core/tests/dummy_deploy.rs | 4 +- tester/core/tests/mock_call.rs | 1 - tester/core/tests/network_call.rs | 9 +- tester/core/tests/network_deploy.rs | 44 +- tester/core/tests/network_simulate.rs | 15 +- token/Cargo.toml | 6 +- token/src/mock/request.rs | 1 - 52 files changed, 4979 insertions(+), 251 deletions(-) create mode 100644 .novax/abis/contract-with-upgrade-endpoint.abi.json delete mode 100644 tester/contract/.gitignore create mode 100644 tester/contract/Cargo.lock create mode 100644 tester/contract/multiversx.json create mode 100644 tester/contract/output/tester-contract.abi.json create mode 100644 tester/contract/output/tester-contract.imports.json create mode 100644 tester/contract/output/tester-contract.mxsc.json create mode 100755 tester/contract/output/tester-contract.wasm create mode 100644 tester/contract/wasm/Cargo.lock diff --git a/.novax/abis/contract-with-upgrade-endpoint.abi.json b/.novax/abis/contract-with-upgrade-endpoint.abi.json new file mode 100644 index 0000000..fd0ef2b --- /dev/null +++ b/.novax/abis/contract-with-upgrade-endpoint.abi.json @@ -0,0 +1,37 @@ +{ + "buildInfo": { + "rustc": { + "version": "1.76.0-nightly", + "commitHash": "d86d65bbc19b928387f68427fcc3a0da498d8a19", + "commitDate": "2023-12-10", + "channel": "Nightly", + "short": "rustc 1.76.0-nightly (d86d65bbc 2023-12-10)" + }, + "contractCrate": { + "name": "contract", + "version": "0.0.0" + }, + "framework": { + "name": "multiversx-sc", + "version": "0.48.0" + } + }, + "name": "ContractWithUpgradeEndpoint", + "constructor": { + "inputs": [], + "outputs": [] + }, + "endpoints": [ + { + "name": "upgrade", + "mutability": "mutable", + "inputs": [], + "outputs": [] + } + ], + "esdtAttributes": [], + "hasCallback": false, + "types": { + + } +} \ No newline at end of file diff --git a/.novax/abis/tester-contract-deploy-return.abi.json b/.novax/abis/tester-contract-deploy-return.abi.json index d20c56b..e6ead5c 100644 --- a/.novax/abis/tester-contract-deploy-return.abi.json +++ b/.novax/abis/tester-contract-deploy-return.abi.json @@ -1,19 +1,20 @@ { "buildInfo": { "rustc": { - "version": "1.74.0-nightly", - "commitHash": "ec08a0337f3556212525dbf1d3b41e19bdf27621", - "commitDate": "2023-09-04", - "channel": "Nightly", - "short": "rustc 1.74.0-nightly (ec08a0337 2023-09-04)" + "version": "1.78.0", + "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", + "commitDate": "2024-04-29", + "channel": "Stable", + "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" }, "contractCrate": { "name": "tester-contract", - "version": "0.0.0" + "version": "0.0.0", + "gitVersion": "0.1.6-17-gaeef5de" }, "framework": { "name": "multiversx-sc", - "version": "0.43.3" + "version": "0.50.3" } }, "name": "TesterWithReturningDeploy", @@ -30,6 +31,10 @@ } ] }, + "upgradeConstructor": { + "inputs": [], + "outputs": [] + }, "endpoints": [ { "name": "getSum", @@ -52,6 +57,56 @@ ], "outputs": [] }, + { + "name": "returnNftProperties", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "TestTokenProperties" + } + ] + }, + { + "name": "returnNftEnumProperties", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "TestEnumProperties" + } + ] + }, + { + "name": "returnNftEnumFieldsProperties", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "TestEnumPropertiesWithFields" + } + ] + }, + { + "name": "returnFungibleBalance", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "returnNonFungibleBalance", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, { "name": "noArgNoReturnEndpoint", "mutability": "mutable", @@ -78,6 +133,21 @@ } ] }, + { + "name": "returnContractAddress", + "mutability": "mutable", + "inputs": [ + { + "name": "contract_address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "Address" + } + ] + }, { "name": "returnBiguint", "mutability": "mutable", @@ -467,6 +537,34 @@ } ] }, + { + "name": "returnOptionalValueBool", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "returnOptionalValueBoolArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "optional", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, { "name": "returnMultiValueTwo", "mutability": "mutable", @@ -483,10 +581,76 @@ "multi_result": true } ] + }, + { + "name": "returnBigIntArg", + "mutability": "mutable", + "inputs": [ + { + "name": "value", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "callAnotherContractReturnTwoU64", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "u64" + }, + { + "type": "u64" + } + ] + }, + { + "name": "asyncCallAnotherContractReturnTwoU64NoCallback", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [] + }, + { + "name": "asyncCallAnotherContractReturnTwoU64WithReturningCallback", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [] + }, + { + "name": "asyncCallAnotherContractReturnTwoU64WithNonReturningCallback", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [] } ], - "events": [], - "hasCallback": false, + "esdtAttributes": [], + "hasCallback": true, "types": { "CustomEnum": { "type": "enum", @@ -620,6 +784,61 @@ "type": "CustomStruct" } ] + }, + "TestEnumProperties": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0 + }, + { + "name": "Second", + "discriminant": 1, + "fields": [ + { + "name": "0", + "type": "bytes" + }, + { + "name": "1", + "type": "BigUint" + } + ] + } + ] + }, + "TestEnumPropertiesWithFields": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0, + "fields": [ + { + "name": "buffer_value", + "type": "bytes" + }, + { + "name": "integer", + "type": "BigUint" + } + ] + } + ] + }, + "TestTokenProperties": { + "type": "struct", + "fields": [ + { + "name": "buffer", + "type": "bytes" + }, + { + "name": "integer", + "type": "BigUint" + } + ] } } } diff --git a/.novax/abis/tester-contract.abi.json b/.novax/abis/tester-contract.abi.json index 4a9d8da..a1a0951 100644 --- a/.novax/abis/tester-contract.abi.json +++ b/.novax/abis/tester-contract.abi.json @@ -1,20 +1,20 @@ { "buildInfo": { "rustc": { - "version": "1.70.0-nightly", - "commitHash": "8a73f50d875840b8077b8ec080fa41881d7ce40d", - "commitDate": "2023-03-11", - "channel": "Nightly", - "short": "rustc 1.70.0-nightly (8a73f50d8 2023-03-11)" + "version": "1.78.0", + "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", + "commitDate": "2024-04-29", + "channel": "Stable", + "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" }, "contractCrate": { "name": "tester-contract", "version": "0.0.0", - "gitVersion": "0.0.25-1-gb35f7e9" + "gitVersion": "0.1.6-17-gaeef5de" }, "framework": { "name": "multiversx-sc", - "version": "0.43.3" + "version": "0.50.3" } }, "name": "Tester", @@ -27,6 +27,10 @@ ], "outputs": [] }, + "upgradeConstructor": { + "inputs": [], + "outputs": [] + }, "endpoints": [ { "name": "getSum", @@ -641,7 +645,7 @@ "outputs": [] } ], - "events": [], + "esdtAttributes": [], "hasCallback": true, "types": { "CustomEnum": { diff --git a/.novax/tester-contract.wasm b/.novax/tester-contract.wasm index 991a56cce07824f71f4c275017d18189be84ec9b..da1ad6c67d145124099575cb1671ea1ac7cba4d1 100755 GIT binary patch literal 11942 zcmb_iTWlQHc|PaN>~hKB6?1!izBD%n^t9))m&H4iV{a_<>@l4b^7wL5-e|pjCKCl;+$w9rT7{4cF)^leGb>E^F<4}bY+XC zt#SY9>UzB~wUgCLj#_s-`bc%*3QaIJR|aZw&4wFmRBOQ8iE1gv>!x^4+`&uaOxihl zA)1^Wsh%udv33?#6;9`Cv}9%Nh*fa}W{ql2{*BGUW4+nIZLq@8QvF19z9BY{@b-B2 z(B)`yu@Q|{9*OFWBh^YHy4(;OIihQFE-F<{MUBOp!>MH`;U6ekBeISuhV?6zNiro` zy_e*RvQ?;zk}6PAZju?_^ORCqmFf0ca;++pl``AWf+k;j9%7dAHhWUyz9oacoR@8F zMVD&JfkX>BvRhQ91HtY8_D^O!DZK0!Z&`-duH}Md5#IPadwC6)miOBZW#^;$YVC>= zJ_1QYJeP&S#un$r^Ii$yxw@%l^)Pb2ak5rjh-!^8BEj<3v~{SmIN#KBP2RJrYq%WE zP1TzQd{u6C1BMqX)8&b|D2X{Q$ews+wX(MFy4+l;!jVR*rz|%^m8pel86n|@YrGtwgR3Hy9jNrq~k8@LRImje4ZI2nCOx=ZM<0cs-*3y15n__oTovtU5+y%dl(5pd)!xpNYME38x-7ou9? zC8w;j#d!R_ytkADxDOdOQl%?SlqP4zAIr~uoEcP?Td7=`PAC6BKJ;-Xk5uDe-8}z? zGDnGuWaLj|%i_Xxtuz%OVBFniRzdX-w^=;qE;e($&Sq`n<5MVd#!;|&G8iAf5S13j zCrb6mQ*HlvslHaY(rc4U5vnApAw;*EeOmrBIx31#nIa9#mL{(?x~>;MDbQWx!z`FVic~9>FltuXS4?g&yW!N7yo({ve z-_3!G7Nff0dypC2=n#Yc?cJQt^|G6{SdPrLLQ?@{LNj`U+fuePNrWNAY*FYoXipV< z{AKW$#a|2lr0vP!u2sWDbY=)F$nc$OR8M;^Bn!oZveWn>95L*i36(wqC5G~_*a3kV z4{&MiS3S7o`c*eBFa)jB;;fVHr-Pb|3n1QJ(HV-Phs8Z0XC1K1DV^T?Y4im5LP_C& zVg0Ropum_Tb!RWuzX6MR_SPtGZC~q4wU|)J{%0M@d-%>Lv@-s7=ljhVCab*jIqKx7?_G(>&H^5tKKqZ zeg_<6L0T6SedwA#?GLI!qiz+l;eYz!7p~nlJ9k_5E!0>Lt_z98Yc@JVJ z1k5H$5$R+;0~Pp1fnGkO6OOVm$SX#0gi%@r=Acqx4oauDj^{q;G31Gg9D%)yASLK%U0Kk#~1@Kj3R;HGjMT0eI_p< ziK62CWpF3-eqDh$ayBp9Wrj$<`_O&**qWiVtPKMjVCFo56-SZKAVWZY8NT#FF4R^U z6?9{`k&pRZD?H4Kyy#G(11I97L7l^@NI5*JUA31w#TUpgpf9&NZn0w zcT&4jKW<$g5zFQqXBl{p2wKT_CR9tor!i9Z=OvYOm&5=~+J_Vju<&DFl%R-}T zCX~oB%6aymF}3^F5{3sM zLBWlZ+)Iy&bFX!-H212e1f`l1lu8p6NHIZynfpyP?=w6EPrC$bW(zC?h|YqiAGiE6 zq&irIdchNTZT))c5rL~zBT*_5ZH#038c8<>J$*k86N=n&vo>=gomRq~Qy#z8cn$Y32!-B=LQh-xZ~Hn!2p z;DU-v4+sIyFe`&X$UOjqe)`ZeLrmBn74D~!lQ<4j9SM#jfar;&xPV+VC+kb#pV9+^ zC~%QO5VP$v)VS0;@nmy(A9Glr>elB(a4N++O9YPyV7B*c&<7c%FWU+LN^}?oMPv=J zk~OeGoHfvctP$*lzF{1XDOlgbFp!qmLks|0AUxO^C_ou5+X-g7k(3jb!BC*%M7s2I z!q&Lfl(tm;NG`0#xDK+njUaZ>Z9xw~xhF5fT5%&wdWcffJCHsvr|a8NnHB6WxENkl zd#~iv7yY!T$?g(r5dR5jU^&O!N#mln$rLi-Ykwn-cgXOs-pv8vxcLhdO3Zd_Vc7zZ zSyYAJ#|{O90Yo1_%o2$BaXeFQrl3sb(GG+T#7N+Dw%~=& zT`aU<2xH{g;*F=d99Vi_5CC?izJ zg%mE35h{a>AxjtZU_e~f0`yS;QxV8r0e7MNODp+bg1V7Wp$Mrz53hB5s0GyXt`R=j z*&7V4f$K*(1icAvne3L7%VS@Y>E@IEkK)TOD5?oz1gJUgqpW~Rp&4j^9?3fh?#M8A z0akEv*oY}!F*c}`*r3wbfF8t#JT!x11)`z4wgoU1?gC5jMMz|qB0aZhV6RH|58*4Q z;A|xl{wXTYc0E8+dbo*{C7cVMb=eMEYP<1)BzD*1LJCFjL&d$Nt!yKDnU#Z#`LG>} zmX9iq_1>6o>|?0cv~=7@7$CM2PV8ZUNR-Fhb#AFJ!s^kMhX+za#&M4o2WEz>IO5IR zWqJ|n5N9+b$yedv$RoiIS%)NBXP=qfE_n$cv3gg;d4Nj<{CJ+4P=4WHH{UQ<2dHPs_tT91H~Jqy?ZNwo>39z(4e(-t_4uYB!e^?|OoTZaHim~j%sBH;+HCc+MFK}pdQz&(5$YdmzjXl~xf!}0Ts zV2KWncA(U_yAFmrWPlQGv#q(ULY~G}59AI4PUdCaS=}%uuCJVbjf2uhswPoN)7i;~ znwM%!)nIe$Dw!#=E2EsTk0SNlRZt+7#(vrfmI$?0rc}La0k9>3?Yn?&pa-C_L4ZGP zj?rAq+U8t5I@s)7h~B~@paPr%he(?eVsC?(uLsgLy4t^>P3x0v)5*9t{aHPa<=W$h zqKCazNAmDKpAxSuzV${s9+RoXYd?DXCwVk*n-}}-FlvQ1Y*4WY#8_OpR(@4~u?>4& z9JJZVxZ{Xr=fv2Oq)x1dfxy26!x;#{9q*6Rdkb%kO&@R%ZQBitbz0PSSXm>Ma?j#I zuiLW#vD~xZ(hfhyo&^PmvQB9?E^pw~Uc7@t+z*`*RHzu}di*@!Sc2n37 z83xKkLy30s66%Cbpwr!V4ze=XA&KoUG#_l>3N94uqPz)<_O1!flpB_s#bDFibr@15 zK*LeDwdD>sK)KLfphct})!WdU4lDoKPb5^{l*(VN z2^txB25#o+i*_V9{W++4pM~>&R7Of4u%$O3i+wt9%QT0IW5@bw&Zd}lEbh6}9iOa7 zdl~?t;+GRmg~keZH{(rqv(KkOdQQZ=&nRF62HroofPog3px!!Wb6h~a+u=09P=GqL z+p(sTfMfSvD9Q9Vv}9fXZ)4X7A1Dx=BcPnajz*>_8Dn=Os(Q>SX(XRP<9?ip=zEog zs3EF$xPu1Gl3#>}X1H^=w!v$T{dVoWV$b@Tgk4c|S@m%v*KKSa4I8k4#7Ti8WYgq& znw5~qa}uSIoTp^t_T7^ci+f2mh_JBjl&U)H7g|HTE6KwJQ% zz(q4J01SL4W+~*MBs?hP<#nYp%ZjBLxN(WWc@R#9;F(}K_8^3?!@{80qY&`26Ry%C zGWH77sU*%i)@m@Bz0U$_e;!9h^gS5Y^>~_4^Yn-$FmUoL>o^Pm0$& zqbIAbF%*M< zgzWGYP`1$+dmeAur-7VBv{}h0T%ITGcW^P{UoA@P{bMHZx}oWw8&~^ERUgmeY%hRW zQoSL#QEzy~K)peWK!9b4_RuF;U%))pIQ;3+oB5ySq*jAfdmff-8-cY?1g}vBTmPq! z2goq#7BtYJPukZ^*oRwj^pf5Mez7dy)#Bm<9bWO?I;2S8&cMtFX!AsoiJz*Wod5@mJS=R#i z&kW%}L}KrT!)Z!QXB))Aa97s&K<**;ge?!_3Aa4^xqh1%nC69xd) zXZ0CAe2G8j^eEWB(UET_Tb8?aAi*$z5@xiQ-UQ|SOeNPN{z9k zR-nx{4ZsRL(4vWFJupiq!R<10S=E_qBzl%{Vnk+Ar@gb`zxvy{yzP2&-s8OygEH+G|S~YXk%5*)d zl`-j=sAi_{(a=<6B7QD>7!u>1ZSdz_DgGXIRk!Keeb|yXA6+uZ2z)+OHTXF3%1XCggXFqmg%!Mh}t*WZC3AJ&~A9r6q)o~@S>-X`4Ch+Qp#Cmu0+-FVT zyK#U&_wi?B`1Ib=#Nr2qf` literal 12835 zcmcIqTaX;rSw81<&+P2>UXJCJv|7u!XY7PkB3YJXuWb3YJ@RVhNM6ahIF6k}8tt}L zvzM9G%&ac9vnxkJF@eMm7#u<_1VR)7j!j4)l?p|uRsozv&?pa1&(|2f^N(wx&uDgCk@IH}Z0v$Uj6>LtB|Kk|f@!ar|m ziJkmWCw=@)f6!@`7G=%iNsUI1gBX<+i}JXLN4Wo|JAX@i)-hCW_7AonH_C3>J6pY(|f8q^=PeiG;ZPV@ZGA5on3R~h0~|w#&~>Q z<=D}abVT#>acxrh?S1>IwQBQ>GVHT+m0D#go;WJOi(8`?T5$s$ zlq<89+C=PlunBdHAB<~Lt%O+La(DS+D{i`NH!ssV`pB`>^!m76r<+3VEuS|gTycM_ zIaZ&EYmZb~6?GFw(`}#vw@seC>y|f<8dD2%ajoU{PY0YTR;);5Z&R^Ie@k<&GCK?P zV*lecS|FaxXa>SyCezWCqhg{>+2}h~%lJ)GaVw>_LVxHVUzkgWn$DCPQf{2xQj)5h zjP$P@blkY1n-hf`ZPgnvF@IvGk%49P9%@vlsxa@d3;QeZ2@yZB#$yY!s)KtZ&u|d; zyeT2PuTh^Xi!)|CiJxsu#*fw48cnDjuAg_*`jgpv>+=_BoTIZo8 z_fDLNCuYX$hbtGw&Pr6_w7yD9B2iBw@LrfTZa68|wNFp5hg|SNWV0^lz){*cn z$?DMy@x($aK2&=oZnpN;YpwV~OWn*FeG{{BrFJB4Ei{~;3PY&@;6Wzy=`GAy`x~lWg-O+_P^(pOD;4Uxdn;W8(@zbrtjrx4tXjK6Vzp6K8 z-J`XIxwfHC>swb0?W@MKlg+jXzoyr_3HugmQ`J+maSBYot_PBp_1fyO&*=5FI>Kta zeni+Atxe9?s{n}4>Tb6v@r)N!h97g#;80b)lx|9^H!2gY6f8fdd)#_>`T`05hAy~{ z0RQcjhvU0;J`qo-SF-2fyZQWi-Iwek5YMjP(RRhQ z?E6Bx?AZDGaghDpbPk@K7)|v>U2^LV)neC&1|~?^5B9m>X&jy#8cFCBtokQcWLMw;rY`WCkn^g2;#0dZQ@Y++OVeyVn? zlrhIhQ~iP75Az8sN};t6B%xKT(-oh|Bf*tooK7boAdb#D%Y=e2emB6%43e&m2;~ zpELhd-!=gli)!`OnYfWg$q@;*#2>${@2sS7cY}H3b%x@p%EXNNGkxECSwVHVovO8| zZ1H#W1MhY5cs+sc_VwS@1xi#VBY%DaLy1Yk2#d)kbckx*|_KJ3EPe)Q7cs_1)fQmZ9z=0Fdo zh93U+r%T#?0(@d0jPZ|erw2JT)KGo55%I}*y<4MgFH#-y9AG=q#CaIU=^^2_eDBpz zmBH)f^3c^QY+m|#$K~>X^j^C3-+h_B^fZOmi;5ZYLd*1a!WxpIYy zrF4a9DD-r?Zx`8soOV|*tWBGhX#u-iEDCEwz1viGq|feAbVfJ_dK~AoE0!s<6#d}M z!ZxK!W)yyacBJFCe#d5pbgH!3Ctl32ulhqWxA&hz|sBofuM)#*jiGyXAlvy3p-%9 z4k`e`MqGtf_q0<0IB`J&bwDdZJ?Q0(pTO@!`w-mpsmu>Oh7K)Y=ZZdkuRVNnp^xzK z((n;Ox!|dRPxLc*{4hrdz*=#cjMvTNRiaz4z}~{>?q;-8k{kvPf(siJJ-byz`Ni9B zzumD9e(l-4(U0M##^yuQ2f%@>;LYxZ4FCFO!4?KN%qBJ`>z$zi0$~*07!6+4x+8HK z%7-cCd|BD9k^$2A_?N@KJpOgyAEFy01++RX!=M8W0>i#>iOT98gq)GOU-yPSBFT$- zrz2xWAsYQ>GsG9CQ(@<@8NgFv*z{AM!^YyL!+}=b*(2v5)7z$cBQ>^1-I}Vb&zXQ= z^~)Fu?u3$}pJM-wcC19l*0y&L`(J_mJZUnjK@TR>HQAoBpn{m5H1;+gl;tl8_TObmPGg{3 z=jg)0b*FB(~OFNi)5cUi{--;a?{qcT|8Y2o<@Uvz#GGdFSOrj$aY;B**qE{72m z44`fMVZz`xdZ@Nf2?_{MN?3{KbG(y`cSPn~AbDXu=B^K3*AC%BN&g1?LsA#I0NG)v zgt>t+iWU$I@reM2p{617$2i-E(j-e;G$czCa_(_%Ycm@C84XJsptg#}$DJXJJ%NS= z3frBMS_jC%W_vFdge)uGzsj9}+kLcL)HfaJ<=pq0HhR%-gD=YNAu-vQYAEL5y#Qv| zzLb9yc5}F!3%#^TaWIZ_Iz1SATf71S3t1cCn`UiBa+0+rsI#nX+OoE3%i1Q(+91WO z4QB2R^F^P55^; zf?y*EMsMr0kr5Yl1?7eSwcm=WAhoy8WUB>@1aqYnqoxu|!>`hM43-wZ5H}GcN%}he zUI|;6RS47k{j@sFPus6Wby4TqiWsQKmOOvNPC`j2W-@-!LS-lQ3^FUI!lg^ObfcK4 zALigG3LYpM(y^TY_t}j|RaCxnZM38Y?zTfJxCKH<=r@Wqsj_3BuR~ zsZd#yu|gGr*xftGxKyZ~+PavV#cD@TNzl25Ot{Zy;xeN>iYU*D51E8NIhGbk+tWqD z0DeH0=MdAQu~Wc0W~S(YWDc2XH29)+HoFTmSgS`v(QHvJ6&Tl5+|gJgLD+RCZbsJBN83QgX01jVq=WcVanO2qH@F(QfWU2zn?SsS$ggO67c6 z=_AgRL==w?1tb(_(rLtj^O6TwDvKh01Lt=z2?JEckBguyUft$n#;x9|%m_)!^#K=M z_X2@br964v=se1R&|{ox9EEpg9^a(vc;THa6l{q3XNm>{|(t>d{ zN?vN!A(b2*5?&sMEV32pMRE#tCQA>b(Pwa4k$N`z7LEwrc8sL#0e8p)DdHsvBjJ{p zcr*2EW*7tkAk6h_Y69zJMA^Rg5V5N6CYuIgAPu#@$n3{KmHSV;w zV?)?JF*x!8&IJtoTExwkfGaL0s&sZLPL<@xM>gWY9PpGSm0%;Jvtgv|6FBS~DJpw~mU}Mf zQ|MLp2|U|pZ85l=R}m}cf!wnt#GO4W>^&F!wRX2ABY>GZlJ(Kwz#&ji6+sq^*$BHo zf+mUuEFCiacAI?w68r>Z7p`6~&DaO2n<2B6e}-I9a_=;PeeK&Ih1wPdLvXXUMGFFp zgUE(pau?zPmx~;L1LDksVpc^XGjt8NZ=ye#{;LM(Pf`853Smb0KdC|nY|{Z-Bywr{ zK%|R0nPKcFHB0nfW3)|nhMD25KN@k)pfTzcM|68o`Sp^RmH47`6qpS4HXXVZCI_Jg*8?YfhW zvWFvmPx|mPKJ}(gKm0;B9@C}eOW*nNkBaEvtw9pR2T<^I;f4fv3Yd#u?p0hdUhcwW z3$CkWFU$hC4Lsr_5hsq``|cd$K=lCud+6fMQ-;P=ZW*l{Q^uPIga;#h?8M6 z1V#{}cQ9IUh(n$4jYvD>aTk*j>il849+byb{##Tz!e3C5+05^bmL5zEnH zFyWvd@0!FC_DTC;j6-{vW*>8auIw>hE<)+XeuNemK!%wQQP))Q&)`c1BswGokLOu1 zMX{+%oasK^mKN9C1tj1*_84~1YwVEH{}m*e=ZZ$?8@oOwUwMxrG~b&D58Jbe1jTfR z(X8yr+%?rQX*y?>YRQ?A=Vyo_g_EtMRKB8(pOpuW5NwQU!QJ%1g9ZQgK+D@vJsZ3t zz*9wGd}kRtMX-cK3gZO?&2%GG z;uJ-Gr4|Rj0$ywBP=j~R@t)y6uX0bwg@F@*hhsB>((GoGLkh1Qpg!|dj}G-U#4K+D zy+b{`7~;DG_c}K-Qu6Fl9!g<%Tev^#36Ml*Zq#9k=LQawWi+5zaC6!mGGe-yHb z=3n}M@BrX1&F)l9%cIrKkvm@`j78uN<2K{y6@0q2WLQ(XC~?YM!wnP*{1A{&Q2=m{ zyDE;JuuX-%M&kl!wH`57LTM-(PhNWL=S3oTHclP#4$Ld-CxPYOH5_+(sDMOOKL@a{<9ibb3a#i|aR(W|GKfW| zH{codhA$=ff*o3fzo7bL_P{%V!>mBIK*3@kxH_&E?Rq2&AMpq#sM%mcd&*?BcN1Lh z_TaOWW915RA3b%qo;e?E?G$^pkMOJOONB$`wsYmyz=$P5p9egfFCYz z;aKk*wC@)NN-(7}vumXdnFg^-=ZtL0}(c;SI_ zF}CBe2a&+@pN_sGHwX_QK+^VHk*@wel=tc(~+KZVSiG*(X$`1PjX1cpR~tu%EN`1eHy{@e@7End!$LveM`xu zh*RbA$v1iflH5W`8madJDRB>+boe~5$*(3e z&YEZH4ScZ=M%=derY+<*^kJpdYE)0*`{m}I@Kj|I1RIr$;jDbVU#o}w*zHthVkSJj zP@CXqg5i05R~NRY;amGA3hVZudNZHlVuGbyzbTz|rS zV%Wqld0l&qUk-v-Hzm=#Tj#zX1mCS4{IipP#`hiDRyj2>8J|8jdNgf9n<;B25(?;Q vo~tydy{6Mq9TtQ-8 Result { fn get_mod_imports() -> TokenStream { quote! { #![allow(unused_imports)] + #![allow(dead_code)] multiversx_sc::imports!(); multiversx_sc::derive_imports!(); @@ -96,9 +97,6 @@ fn get_mod_imports() -> TokenStream { use multiversx_sc_codec::Empty; use multiversx_sc_scenario::ContractInfo; use multiversx_sc_snippets::Interactor; - use multiversx_sc_scenario::scenario_model::ScCallStep; - use multiversx_sc_scenario::scenario_model::TypedScCall; - use multiversx_sc_scenario::scenario_model::TxExpect; use multiversx_sc_scenario::scenario_model::AddressKey; use multiversx_sc::api::VMApi; use multiversx_sc_scenario::DebugApi; diff --git a/abi-build/src/generator/impl_contract.rs b/abi-build/src/generator/impl_contract.rs index d35f778..cf281cd 100644 --- a/abi-build/src/generator/impl_contract.rs +++ b/abi-build/src/generator/impl_contract.rs @@ -24,7 +24,6 @@ pub(crate) fn impl_contract(mod_name: &str, abi: &Abi) -> Result Resu // (TokenStream, TokenStream) = (calls, queries) fn impl_abi_endpoints( contract_info_name: &str, - proxy_mod_name: &str, abi_endpoints: &AbiEndpoints, abi_types: &AbiTypes ) -> Result<(TokenStream, TokenStream), BuildError> { @@ -351,7 +349,6 @@ fn impl_abi_endpoints( for endpoint in abi_endpoints { let endpoint_impls = impl_abi_endpoint_call_query( contract_info_name, - proxy_mod_name, endpoint, abi_types )?; @@ -374,7 +371,6 @@ fn impl_abi_endpoints( fn impl_abi_endpoint_call_query( contract_info_name: &str, - proxy_mod_name: &str, abi_endpoint: &AbiEndpoint, abi_types: &AbiTypes ) -> Result<(TokenStream, TokenStream), BuildError> { @@ -616,7 +612,7 @@ fn impl_endpoint_args_for_call(abi_inputs: &AbiInputs, all_abi_types: &AbiTypes) inputs_function_arg_idents.push(quote! { { let mut _novax_top_encoded_args = ManagedVec::<#static_api, ManagedBuffer<#static_api>>::new(); - #input_managed_name_ident.multi_encode(&mut _novax_top_encoded_args); + _ = #input_managed_name_ident.multi_encode(&mut _novax_top_encoded_args); for _novax_top_encoded_arg in _novax_top_encoded_args.into_iter() { _novax_bytes_args.push(_novax_top_encoded_arg.to_boxed_bytes().into_vec()); diff --git a/caching/src/locked/caching.rs b/caching/src/locked/caching.rs index 00052c7..b817165 100644 --- a/caching/src/locked/caching.rs +++ b/caching/src/locked/caching.rs @@ -1,11 +1,12 @@ use std::collections::HashMap; use std::future::Future; use std::sync::Arc; -use std::time::Duration; + use async_trait::async_trait; use serde::de::DeserializeOwned; use serde::Serialize; use tokio::sync::{Mutex, RwLock}; + use novax::caching::{CachingDurationStrategy, CachingStrategy}; use novax::errors::NovaXError; @@ -91,12 +92,15 @@ mod test { use std::future::Future; use std::sync::Arc; use std::time::Duration; + use async_trait::async_trait; use serde::de::DeserializeOwned; use serde::Serialize; use tokio::sync::Mutex; + use novax::caching::{CachingDurationStrategy, CachingStrategy}; use novax::errors::NovaXError; + use crate::date::get_current_timestamp::set_mock_time; use crate::local::caching_local::CachingLocal; use crate::locked::caching::CachingLocked; diff --git a/caching/src/multi/caching.rs b/caching/src/multi/caching.rs index d4d3498..12cce02 100644 --- a/caching/src/multi/caching.rs +++ b/caching/src/multi/caching.rs @@ -1,9 +1,10 @@ use std::future::Future; -use std::time::Duration; + use async_trait::async_trait; use serde::de::DeserializeOwned; use serde::Serialize; use tokio::join; + use novax::caching::{CachingDurationStrategy, CachingStrategy}; use novax::errors::NovaXError; @@ -99,11 +100,13 @@ where #[cfg(test)] mod test { use std::time::Duration; + use novax::caching::{CachingDurationStrategy, CachingStrategy}; use novax::errors::NovaXError; + + use crate::date::get_current_timestamp::set_mock_time; use crate::local::caching_local::CachingLocal; use crate::multi::caching::CachingMulti; - use crate::date::get_current_timestamp::set_mock_time; #[tokio::test] async fn test_get_cache_no_cache() -> Result<(), NovaXError> { diff --git a/core/Cargo.toml b/core/Cargo.toml index 9b4ed02..a0128c0 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -22,11 +22,11 @@ async-trait = "0.1.72" serde = "1.0.177" serde_json = "1.0.104" tokio = "1.29.1" -multiversx-sc = { path = "../../mx-sdk-rs/framework/base" } -multiversx-sc-snippets = { path = "../../mx-sdk-rs/framework/snippets" } -multiversx-sdk = { path = "../../mx-sdk-rs/sdk/core" } -multiversx-sc-scenario = { path = "../../mx-sdk-rs/framework/scenario" } -multiversx-sc-codec = { path = "../../mx-sdk-rs/data/codec" } +multiversx-sc = "0.50.3" +multiversx-sc-snippets = "0.50.3" +multiversx-sdk = "0.4.1" +multiversx-sc-scenario = "0.50.3" +multiversx-sc-codec = "0.19.0" multiversx-sc-codec-derive = "=0.19.0" reqwest = "0.11.18" hex = "0.4.3" diff --git a/core/build.rs b/core/build.rs index aaf3b92..7d790ee 100644 --- a/core/build.rs +++ b/core/build.rs @@ -47,7 +47,16 @@ fn main() { if file_type.is_file() && file_name.ends_with(".abi.json") { let abi_path = abis_path.join(file_name); - let abi = parse_abi_file(&abi_path).unwrap(); + let mut abi = parse_abi_file(&abi_path).unwrap(); + + // Backward compatibility. + // + // In a few versions of the Rust SDK, the upgrade function was an endpoint in the ABI. + // It is now under the field upgradeConstructor. + abi.endpoints = abi.endpoints.into_iter() + .filter(|endpoint| endpoint.name != "upgrade") + .collect(); + let abi_generated_file = generate_from_abi(&abi).unwrap(); lib_file_content += &format!("#[allow(missing_docs)]\npub mod {};\n", abi_generated_file.mod_name); diff --git a/core/src/code/bytes.rs b/core/src/code/bytes.rs index a22f455..b1b7947 100644 --- a/core/src/code/bytes.rs +++ b/core/src/code/bytes.rs @@ -1,5 +1,5 @@ use async_trait::async_trait; -use multiversx_sc_scenario::scenario_model::BytesValue; + use crate::errors::NovaXError; /// An asynchronous trait defining a type that can be converted into a `BytesValue`. diff --git a/core/src/code/file.rs b/core/src/code/file.rs index c4b39c3..6fec10b 100644 --- a/core/src/code/file.rs +++ b/core/src/code/file.rs @@ -1,7 +1,8 @@ use std::fs::read; use std::path::{Path, PathBuf}; + use async_trait::async_trait; -use multiversx_sc_scenario::scenario_model::BytesValue; + use crate::code::bytes::AsBytesValue; use crate::errors::{CodeError, NovaXError}; diff --git a/data/Cargo.toml b/data/Cargo.toml index 502e9da..fb279b7 100644 --- a/data/Cargo.toml +++ b/data/Cargo.toml @@ -10,9 +10,9 @@ repository = "https://github.com/gfusee/novax" [dependencies] num-bigint = "0.4.3" -multiversx-sc = { path = "../../mx-sdk-rs/framework/base" } -multiversx-sc-scenario = { path = "../../mx-sdk-rs/framework/scenario" } -multiversx-sc-codec = { path = "../../mx-sdk-rs/data/codec" } -multiversx-sdk = { path = "../../mx-sdk-rs/sdk/core" } +multiversx-sc = "0.50.3" +multiversx-sc-scenario = "0.50.3" +multiversx-sc-codec = "0.19.0" +multiversx-sdk = "0.4.1" serde = "1.0.183" base64 = "0.21.3" diff --git a/executor/Cargo.toml b/executor/Cargo.toml index 02f4d33..879ee13 100644 --- a/executor/Cargo.toml +++ b/executor/Cargo.toml @@ -20,10 +20,10 @@ base64 = "0.21.3" sha3 = "0.10.8" novax-data = { path = "../data", version = "0.1.6" } novax-request = { path = "../request", version = "0.1.6" } -multiversx-sc = { path = "../../mx-sdk-rs/framework/base" } -multiversx-sc-scenario = { path = "../../mx-sdk-rs/framework/scenario" } -multiversx-sdk = { path = "../../mx-sdk-rs/sdk/core" } -multiversx-sc-snippets = { path = "../../mx-sdk-rs/framework/snippets" } +multiversx-sc = "0.50.3" +multiversx-sc-scenario = "0.50.3" +multiversx-sdk = "0.4.1" +multiversx-sc-snippets = "0.50.3" [dev-dependencies] serde_json = "1.0.105" diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index 545fbef..2fcaa33 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -1,10 +1,6 @@ -use std::mem; - use async_trait::async_trait; -use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; -use multiversx_sc::imports::{CodeMetadata, Tx, TxScEnv}; -use multiversx_sc_scenario::imports::{AddressValue, Bech32Address}; -use multiversx_sc_scenario::scenario_model::{ScDeployStep, TypedScDeploy}; +use multiversx_sc::codec::TopDecodeMulti; +use multiversx_sc::imports::CodeMetadata; use num_bigint::BigUint; use novax_data::{Address, NativeConvertible}; @@ -18,7 +14,6 @@ use crate::utils::transaction::data::{SendableTransaction, SendableTransactionCo use crate::utils::transaction::deploy::get_deploy_call_input; use crate::utils::transaction::normalization::NormalizationInOut; use crate::utils::transaction::token_transfer::TokenTransfer; -use crate::utils::transaction::transfers::get_egld_or_esdt_transfers; /// A type alias for `DummyExecutor` handling `ScCallStep`. pub type DummyTransactionExecutor = DummyExecutor; diff --git a/executor/src/error/network.rs b/executor/src/error/network.rs index 8900d7b..f9ceca6 100644 --- a/executor/src/error/network.rs +++ b/executor/src/error/network.rs @@ -20,6 +20,9 @@ pub enum NetworkQueryError { /// Contains a descriptive error message explaining the reason for the failure while sending the request. message: String }, + ErrorInResponse { + message: String + } } /// An implementation of the `From` trait to allow for easy conversions from `NetworkQueryError` to `ExecutorError`. diff --git a/executor/src/lib.rs b/executor/src/lib.rs index aa14a50..8b54805 100644 --- a/executor/src/lib.rs +++ b/executor/src/lib.rs @@ -97,5 +97,5 @@ pub use utils::transaction::token_transfer::TokenTransfer; pub use utils::transaction::call_result; pub use multiversx_sc_scenario::ScenarioWorld; -pub use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, ScQueryStep, SetStateStep, Account, TxQuery, TxResponse, TypedScCall, TypedScDeploy, TypedScQuery, TypedResponse}; +pub use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, ScQueryStep, SetStateStep, Account, TxQuery, TxResponse, TypedScDeploy, TypedScQuery, TypedResponse}; pub use multiversx_sc::codec::TopDecodeMulti; \ No newline at end of file diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index f0415f7..8429600 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -1,11 +1,10 @@ -use std::mem; use std::ops::Deref; use std::sync::Arc; use async_trait::async_trait; -use multiversx_sc::codec::{TopDecodeMulti, TopEncodeMulti}; +use multiversx_sc::codec::TopDecodeMulti; use multiversx_sc::imports::{CodeMetadata, ReturnsNewAddress}; -use multiversx_sc::types::{MultiValueEncoded, ReturnsRawResult}; +use multiversx_sc::types::ReturnsRawResult; use multiversx_sc_scenario::imports::{Bech32Address, BytesValue}; use multiversx_sc_scenario::ScenarioTxRun; use num_bigint::BigUint; @@ -14,7 +13,6 @@ use tokio::sync::Mutex; use novax_data::Address; use novax_data::NativeConvertible; -use crate::{ScCallStep, ScDeployStep, ScQueryStep, TxQuery, TypedScDeploy}; use crate::base::deploy::DeployExecutor; use crate::base::query::QueryExecutor; use crate::base::transaction::TransactionExecutor; @@ -24,7 +22,6 @@ use crate::error::mock_deploy::MockDeployError; use crate::error::mock_transaction::MockTransactionError; use crate::error::transaction::TransactionError; use crate::ScenarioWorld; -use crate::utils::transaction::deploy::get_deploy_call_input; use crate::utils::transaction::token_transfer::TokenTransfer; use crate::utils::transaction::transfers::get_egld_or_esdt_transfers; @@ -260,8 +257,8 @@ impl QueryExecutor for MockExecutor to: &Address, function: String, arguments: Vec>, - egld_value: BigUint, - esdt_transfers: Vec + _egld_value: BigUint, + _esdt_transfers: Vec ) -> Result where OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync @@ -294,25 +291,4 @@ impl QueryExecutor for MockExecutor Ok(output_managed.to_native()) } -} - -/// Converts a smart contract query step to a call step. -/// -/// This conversion is needed to accommodate the types expected by the scenario engine from the MultiversX Rust Testing Framework. -fn convert_sc_query_step_to_call_step(query_step: &ScCallStep) -> ScQueryStep { - let query_tx = TxQuery { - to: query_step.tx.to.clone(), - function: query_step.tx.function.clone(), - arguments: query_step.tx.arguments.clone(), - }; - - ScQueryStep { - id: query_step.id.clone(), - tx_id: query_step.tx_id.clone(), - explicit_tx_hash: query_step.explicit_tx_hash.clone(), - comment: query_step.comment.clone(), - tx: Box::new(query_tx), - expect: query_step.expect.clone(), - response: query_step.response.clone(), - } } \ No newline at end of file diff --git a/executor/src/network/query/models/response.rs b/executor/src/network/query/models/response.rs index ca3c914..2d4ced5 100644 --- a/executor/src/network/query/models/response.rs +++ b/executor/src/network/query/models/response.rs @@ -1,10 +1,10 @@ -use multiversx_sdk::data::vm::VmValuesResponseData; use serde::Deserialize; #[derive(Deserialize)] #[serde(rename_all = "camelCase")] pub struct VmValuesQueryResponse { - pub data: Option + pub data: Option, + pub error: String } #[derive(Deserialize)] diff --git a/executor/src/network/query/proxy.rs b/executor/src/network/query/proxy.rs index 88810a3..879a07e 100644 --- a/executor/src/network/query/proxy.rs +++ b/executor/src/network/query/proxy.rs @@ -3,7 +3,7 @@ use reqwest::Client; use crate::error::executor::ExecutorError; use crate::network::query::models::request::VmValuesQueryRequest; -use crate::network::query::models::response::VmValuesQueryResponseData; +use crate::network::query::models::response::{VmValuesQueryResponse, VmValuesQueryResponseData}; use crate::NetworkQueryError; #[async_trait] @@ -46,7 +46,13 @@ impl BlockchainProxy for NetworkBlockchainProxy { .await .map_err(|error| NetworkQueryError::ErrorWhileSendingRequest { message: error.to_string() })?; - serde_json::from_str(&text) - .map_err(|_| NetworkQueryError::CannotDeserializeVmValuesResponse.into()) + let response = serde_json::from_str::(&text) + .map_err(|_| NetworkQueryError::CannotDeserializeVmValuesResponse)?; + + let Some(response_data) = response.data else { + return Err(NetworkQueryError::ErrorInResponse { message: response.error }.into()) + }; + + Ok(response_data) } } \ No newline at end of file diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index 80da741..8a23206 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -3,7 +3,6 @@ use std::fmt::{Debug, Formatter}; use async_trait::async_trait; use base64::Engine; use multiversx_sc::codec::TopDecodeMulti; -use multiversx_sc_scenario::scenario_model::TxResponse; use num_bigint::BigUint; use tokio::join; @@ -204,13 +203,4 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto Ok(call_result) } -} - -/// Processes the output of a transaction response. -fn process_out(step: &mut TxResponse) { - let out_scr = step.api_scrs.iter().find(multiversx_sc_scenario::scenario_model::is_out_scr); - - if let Some(out_scr) = out_scr { - step.out = multiversx_sc_scenario::scenario_model::decode_scr_data_or_panic(&out_scr.data); - } } \ No newline at end of file diff --git a/executor/src/network/transaction/interactor.rs b/executor/src/network/transaction/interactor.rs index 1e395e3..41fd8bc 100644 --- a/executor/src/network/transaction/interactor.rs +++ b/executor/src/network/transaction/interactor.rs @@ -172,7 +172,3 @@ impl BlockchainInteractor for Interactor { self.wallet.get_address() } } - -fn encode_code_bytes(bytes: &[u8]) -> String { - hex::encode(bytes) -} \ No newline at end of file diff --git a/executor/src/network/utils/transaction.rs b/executor/src/network/utils/transaction.rs index 38743f4..a656cca 100644 --- a/executor/src/network/utils/transaction.rs +++ b/executor/src/network/utils/transaction.rs @@ -14,7 +14,7 @@ pub async fn send_transaction(client: &Client, transactio }; let sent_transaction_response: TransactionSendResponse = serde_json::from_str(&text) - .map_err(|error| TransactionError::CannotDeserializeTransactionSendingResponse { response: text })?; + .map_err(|_| TransactionError::CannotDeserializeTransactionSendingResponse { response: text })?; let Some(sent_transaction_data) = sent_transaction_response.data else { return Err(TransactionError::FailedToSendTheTransaction { message: sent_transaction_response.error }.into()) @@ -33,7 +33,7 @@ pub async fn get_transaction_on_network(client: &Client, }; let transaction_on_network_response: TransactionOnNetworkResponse = serde_json::from_str(&text) - .map_err(|error| TransactionError::CannotDeserializeTransactionOnNetworkResponse { response: text })?; + .map_err(|_| TransactionError::CannotDeserializeTransactionOnNetworkResponse { response: text })?; let Some(transaction_on_network_data) = transaction_on_network_response.data else { return Err(TransactionError::FailedToSendTheTransaction { message: transaction_on_network_response.error }.into()) diff --git a/executor/src/utils/date/get_current_timestamp.rs b/executor/src/utils/date/get_current_timestamp.rs index a91c2c5..bc09d2a 100644 --- a/executor/src/utils/date/get_current_timestamp.rs +++ b/executor/src/utils/date/get_current_timestamp.rs @@ -23,9 +23,6 @@ mod implementation { use std::time::Duration; pub(crate) use implementation::get_current_timestamp; - -#[cfg(test)] -pub(crate) use implementation::set_mock_time; use crate::ExecutorError; #[cfg(test)] diff --git a/executor/src/utils/transaction/data.rs b/executor/src/utils/transaction/data.rs index d0e225a..1c0336b 100644 --- a/executor/src/utils/transaction/data.rs +++ b/executor/src/utils/transaction/data.rs @@ -1,10 +1,6 @@ -use std::convert::From; use std::str::FromStr; - -use multiversx_sc::api::CallTypeApi; -use multiversx_sc::imports::{Tx, TxData, TxDataFunctionCall, TxEnv, TxFrom, TxGas, TxPayment, TxResultHandler, TxTo}; -use multiversx_sc::types::{ContractCallWithEgld, ManagedAddress}; -use multiversx_sc_scenario::scenario_model::{ScCallStep, ScDeployStep, TxCall, TxDeploy, TypedScCall, TypedScDeploy}; +use multiversx_sc::imports::{Tx, TxDataFunctionCall, TxEnv, TxFrom, TxGas, TxPayment, TxResultHandler}; +use multiversx_sc::types::ManagedAddress; use multiversx_sdk::data::address::Address; use num_bigint::BigUint; use serde::{de, Deserialize, Serialize, Serializer}; diff --git a/executor/src/utils/transaction/normalization.rs b/executor/src/utils/transaction/normalization.rs index b254378..4d87b8c 100644 --- a/executor/src/utils/transaction/normalization.rs +++ b/executor/src/utils/transaction/normalization.rs @@ -415,6 +415,7 @@ mod tests { }; let result = value.normalize().unwrap(); + let result_data = result.clone().get_transaction_data(); let expected = NormalizationInOut { sender: SENDER.to_string(), @@ -438,6 +439,7 @@ mod tests { let expected_data = format!("MultiESDTNFTTransfer@{RECEIVER_HEX}@{FUNGIBLE_NAME_HEX}@@0a@{NON_FUNGIBLE_NAME_HEX}@01@64@@{ENDPOINT_NAME_HEX}"); assert_eq!(result, expected); + assert_eq!(result_data, expected_data); } #[test] @@ -491,7 +493,9 @@ mod tests { let expected_data = format!("MultiESDTNFTTransfer@{RECEIVER_HEX}@{FUNGIBLE_NAME_HEX}@@0a@{NON_FUNGIBLE_NAME_HEX}@01@64@@{ENDPOINT_NAME_HEX}@0102@0304"); - assert_eq!(result, expected); } + assert_eq!(result, expected); + assert_eq!(result_data, expected_data); + } #[test] fn test_normalize_esdt_and_egld_payment() { diff --git a/executor/src/utils/transaction/transfers.rs b/executor/src/utils/transaction/transfers.rs index 363d60f..db45758 100644 --- a/executor/src/utils/transaction/transfers.rs +++ b/executor/src/utils/transaction/transfers.rs @@ -1,5 +1,4 @@ use multiversx_sc::imports::{EgldOrMultiEsdtPayment, EsdtTokenPayment, ManagedVec}; -use multiversx_sc::types::TokenIdentifier; use multiversx_sc_scenario::imports::StaticApi; use num_bigint::BigUint; diff --git a/mocking/Cargo.toml b/mocking/Cargo.toml index a8cd9b3..30325f7 100644 --- a/mocking/Cargo.toml +++ b/mocking/Cargo.toml @@ -15,9 +15,9 @@ tokio = "1.30.0" novax = { path = "../core", version = "0.1.6" } novax-token = { path = "../token", version = "0.1.6" } novax-executor = { path = "../executor", version = "0.1.6" } -multiversx-sc = { path = "../../mx-sdk-rs/framework/base" } -multiversx-sc-snippets = { path = "../../mx-sdk-rs/framework/snippets" } -multiversx-sdk = { path = "../../mx-sdk-rs/sdk/core" } +multiversx-sc = "0.50.3" +multiversx-sc-snippets = "0.50.3" +multiversx-sdk = "0.4.1" reqwest = "0.11.18" serde = "1.0.180" serde_json = "1.0.104" diff --git a/mocking/src/lib.rs b/mocking/src/lib.rs index 98c1c1c..e5db376 100644 --- a/mocking/src/lib.rs +++ b/mocking/src/lib.rs @@ -1,6 +1,3 @@ -#![feature(future_join)] -#![feature(type_changing_struct_update)] - pub mod world; pub mod gateway; pub mod errors; diff --git a/mocking/src/world/infos.rs b/mocking/src/world/infos.rs index 97e9f4f..3a98961 100644 --- a/mocking/src/world/infos.rs +++ b/mocking/src/world/infos.rs @@ -1,6 +1,6 @@ use std::collections::{BTreeMap, HashMap}; use std::fs::OpenOptions; -use std::future::join; +use tokio::join; use std::hash::Hash; use std::path::Path; use base64::Engine; @@ -93,7 +93,7 @@ impl ScenarioWorldInfos { get_addresses_infos(gateway_url, addresses), get_addresses_keys(gateway_url, addresses), get_addresses_balances(gateway_url, addresses) - ).await; + ); let infos = ScenarioWorldInfos { address_keys: keys?, diff --git a/tester/contract/.gitignore b/tester/contract/.gitignore deleted file mode 100644 index dd49a95..0000000 --- a/tester/contract/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -# Generated by Cargo -# will have compiled files and executables -/target/ -*/target/ - -# The mxpy output -/output*/ - -# Mandos test trace -trace*.scen.json diff --git a/tester/contract/Cargo.lock b/tester/contract/Cargo.lock new file mode 100644 index 0000000..ddc6cd5 --- /dev/null +++ b/tester/contract/Cargo.lock @@ -0,0 +1,2513 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "backtrace" +version = "0.3.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bstr" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" + +[[package]] +name = "cc" +version = "1.0.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clap" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "colored" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +dependencies = [ + "lazy_static", + "windows-sys 0.48.0", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + +[[package]] +name = "contract-meta" +version = "0.0.0" +dependencies = [ + "multiversx-sc-meta", + "tester", +] + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "copy_dir" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "543d1dd138ef086e2ff05e3a48cf9da045da2033d16f8538fd76b86cd49b2ca3" +dependencies = [ + "walkdir", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "flate2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + +[[package]] +name = "globset" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "h2" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "serde", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "hyper" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "ignore" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata", + "same-file", + "walkdir", + "winapi-util", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", + "serde", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + +[[package]] +name = "multiversx-chain-scenario-format" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9190bdd56300e801e7793fc4ee7dc0c76c1149aac019da8c71cc58254966fe" +dependencies = [ + "bech32", + "hex", + "num-bigint", + "num-traits", + "serde", + "serde_json", + "sha3", +] + +[[package]] +name = "multiversx-chain-vm" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f69520691466bc184475320c27db21137e68be5e959df25c1a14b09e055d0d58" +dependencies = [ + "bitflags 2.5.0", + "colored", + "ed25519-dalek", + "hex", + "hex-literal", + "itertools", + "multiversx-chain-vm-executor", + "num-bigint", + "num-traits", + "rand 0.8.5", + "rand_seeder", + "sha2 0.10.8", + "sha3", +] + +[[package]] +name = "multiversx-chain-vm-executor" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b59072fa0624b55ae5ae3fa6bfa91515bbeb4ac440214bc4a509e2c8806d6e9f" + +[[package]] +name = "multiversx-sc" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d79d1cea2d23e8f2545749c9b31952305b54c415af88b224b985784d3d6529d" +dependencies = [ + "bitflags 2.5.0", + "hex-literal", + "multiversx-sc-codec", + "multiversx-sc-derive", + "num-traits", + "unwrap-infallible", +] + +[[package]] +name = "multiversx-sc-codec" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35c94397b2fba14e40edfa55905b3f453ed57aa06c9b1960ad6a0ca6bfb7a236" +dependencies = [ + "arrayvec", + "multiversx-sc-codec-derive", + "num-bigint", + "unwrap-infallible", +] + +[[package]] +name = "multiversx-sc-codec-derive" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf72a8042da0bc19da0b8f0d4f61b4c66ae853560fefc69cd8fea87bf1aa8c14" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "multiversx-sc-derive" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54e6926e181f6306b69aa805b8d24aa33084497e38ac03e37df457456b6757cc" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "radix_trie", + "syn", +] + +[[package]] +name = "multiversx-sc-meta" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07fe6edb214529678c77e82e25d9495b04773d489c441ef49fc19ad0664504f3" +dependencies = [ + "clap", + "colored", + "common-path", + "convert_case", + "copy_dir", + "hex", + "lazy_static", + "multiversx-sc", + "pathdiff", + "reqwest", + "ruplacer", + "rustc_version", + "semver", + "serde", + "serde_json", + "toml", + "wasmparser", + "wasmprinter", + "zip", +] + +[[package]] +name = "multiversx-sc-scenario" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dd07e4626e551c051f3065c0b2b44047d3281c20cdbcef9375aecb5f9fd5307" +dependencies = [ + "base64", + "bech32", + "clap", + "colored", + "hex", + "itertools", + "log", + "multiversx-chain-scenario-format", + "multiversx-chain-vm", + "multiversx-chain-vm-executor", + "multiversx-sc", + "multiversx-sc-meta", + "multiversx-sdk", + "num-bigint", + "num-traits", + "pathdiff", + "serde", + "serde_json", + "sha2 0.10.8", + "tokio", + "unwrap-infallible", +] + +[[package]] +name = "multiversx-sdk" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cb2f8dd4a17ce9c9fa1ab3d80152929702968be6536499f32bd7e2278c2e0fb" +dependencies = [ + "anyhow", + "base64", + "bech32", + "bip39", + "hex", + "hmac", + "itertools", + "pbkdf2", + "pem", + "rand 0.8.5", + "reqwest", + "serde", + "serde_json", + "serde_repr", + "sha2 0.10.8", + "sha3", + "tokio", + "zeroize", +] + +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "num-bigint" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.5", +] + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "pem" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +dependencies = [ + "base64", + "serde", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro2" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_seeder" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf2890aaef0aa82719a50e808de264f9484b74b442e1a3a0e5ee38243ac40bdb" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "reqwest" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "ruplacer" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58a26a1b15ff113d31d139357f7422708312978ed69cd5dd47e36d1b80b7eaf3" +dependencies = [ + "Inflector", + "anyhow", + "clap", + "colored", + "ignore", + "regex", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.5.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "serde" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "syn" +version = "2.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "tester" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "multiversx-sc-scenario", + "num-bigint", +] + +[[package]] +name = "thiserror" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "wasmparser" +version = "0.208.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd921789c9dcc495f589cb37d200155dee65b4a4beeb853323b5e24e0a5f9c58" +dependencies = [ + "ahash", + "bitflags 2.5.0", + "hashbrown", + "indexmap", + "semver", + "serde", +] + +[[package]] +name = "wasmprinter" +version = "0.208.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700bdace4821e6c694617938500ae9999946df464bb13219c16570f8b6f202f" +dependencies = [ + "anyhow", + "wasmparser", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86c949fede1d13936a99f14fafd3e76fd642b556dd2ce96287fbe2e0151bfac6" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zip" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd56a4d5921bc2f99947ac5b3abe5f510b1be7376fdc5e9fce4a23c6a93e87c" +dependencies = [ + "arbitrary", + "crc32fast", + "crossbeam-utils", + "displaydoc", + "flate2", + "indexmap", + "memchr", + "thiserror", + "zopfli", +] + +[[package]] +name = "zopfli" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", +] diff --git a/tester/contract/Cargo.toml b/tester/contract/Cargo.toml index 9411e97..40ad5e1 100644 --- a/tester/contract/Cargo.toml +++ b/tester/contract/Cargo.toml @@ -1,19 +1,18 @@ [package] name = "tester-contract" version = "0.0.0" -authors = [ "you",] -edition = "2018" +authors = ["you"] +edition = "2021" publish = false -license = "GPL-3.0-only" [lib] path = "src/lib.rs" -[dependencies] -multiversx-sc = { path = "../../../mx-sdk-rs/framework/base" } +[dependencies.multiversx-sc] +version = "0.50.3" [dev-dependencies] -multiversx-sc-scenario = { path = "../../../mx-sdk-rs/framework/scenario" } +num-bigint = "0.4" -[package.metadata.release] -release = false +[dev-dependencies.multiversx-sc-scenario] +version = "0.50.3" diff --git a/tester/contract/meta/Cargo.toml b/tester/contract/meta/Cargo.toml index 11814ee..f43870e 100644 --- a/tester/contract/meta/Cargo.toml +++ b/tester/contract/meta/Cargo.toml @@ -1,17 +1,12 @@ [package] -name = "tester-contract-meta" +name = "contract-meta" version = "0.0.0" -edition = "2018" +edition = "2021" publish = false -authors = [ "you",] - -[dev-dependencies] - -[dependencies] -multiversx-sc-meta = { path = "../../../../mx-sdk-rs/framework/meta" } -tester-contract = { path = ".." } - -[package.metadata.release] -release = false +[dependencies.tester-contract] +path = ".." +[dependencies.multiversx-sc-meta] +version = "0.50.3" +default-features = false diff --git a/tester/contract/multiversx.json b/tester/contract/multiversx.json new file mode 100644 index 0000000..7365539 --- /dev/null +++ b/tester/contract/multiversx.json @@ -0,0 +1,3 @@ +{ + "language": "rust" +} \ No newline at end of file diff --git a/tester/contract/output/tester-contract.abi.json b/tester/contract/output/tester-contract.abi.json new file mode 100644 index 0000000..a1a0951 --- /dev/null +++ b/tester/contract/output/tester-contract.abi.json @@ -0,0 +1,840 @@ +{ + "buildInfo": { + "rustc": { + "version": "1.78.0", + "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", + "commitDate": "2024-04-29", + "channel": "Stable", + "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" + }, + "contractCrate": { + "name": "tester-contract", + "version": "0.0.0", + "gitVersion": "0.1.6-17-gaeef5de" + }, + "framework": { + "name": "multiversx-sc", + "version": "0.50.3" + } + }, + "name": "Tester", + "constructor": { + "inputs": [ + { + "name": "initial_value", + "type": "BigUint" + } + ], + "outputs": [] + }, + "upgradeConstructor": { + "inputs": [], + "outputs": [] + }, + "endpoints": [ + { + "name": "getSum", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "add", + "mutability": "mutable", + "inputs": [ + { + "name": "value", + "type": "BigUint" + } + ], + "outputs": [] + }, + { + "name": "returnNftProperties", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "TestTokenProperties" + } + ] + }, + { + "name": "returnNftEnumProperties", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "TestEnumProperties" + } + ] + }, + { + "name": "returnNftEnumFieldsProperties", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "TestEnumPropertiesWithFields" + } + ] + }, + { + "name": "returnFungibleBalance", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "returnNonFungibleBalance", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "noArgNoReturnEndpoint", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "name": "returnCaller", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "Address" + } + ] + }, + { + "name": "returnManagedBuffer", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "returnContractAddress", + "mutability": "mutable", + "inputs": [ + { + "name": "contract_address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "Address" + } + ] + }, + { + "name": "returnBiguint", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "returnU8", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u8" + } + ] + }, + { + "name": "returnU16", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u16" + } + ] + }, + { + "name": "returnU32", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "returnU64", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "returnU32Vec", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "returnU64Vec", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "returnBufferVec", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "returnBiguintVec", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "returnTwoU64", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u64" + }, + { + "type": "u64" + } + ] + }, + { + "name": "returnTwoBuffers", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "bytes" + }, + { + "type": "bytes" + } + ] + }, + { + "name": "returnOneBufferOneU64AndOneBiguint", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "bytes" + }, + { + "type": "u64" + }, + { + "type": "BigUint" + } + ] + }, + { + "name": "returnDoubleOfU64Arg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "u64" + } + ], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "returnDoubleOfBiguintArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "returnAppendedBufferArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "returnSumTwoBiguintArgs", + "mutability": "mutable", + "inputs": [ + { + "name": "first_arg", + "type": "BigUint" + }, + { + "name": "second_arg", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "returnConcatMultiBufferArgs", + "mutability": "mutable", + "inputs": [ + { + "name": "args", + "type": "variadic", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "returnSumMultiU64Args", + "mutability": "mutable", + "inputs": [ + { + "name": "args", + "type": "variadic", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "returnSumMultiBiguintArgs", + "mutability": "mutable", + "inputs": [ + { + "name": "args", + "type": "variadic", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "returnCustomStruct", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomStruct" + } + ] + }, + { + "name": "returnCustomStructArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "CustomStruct" + } + ], + "outputs": [ + { + "type": "CustomStruct" + } + ] + }, + { + "name": "returnCustomStructWithStructAndVec", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomStructWithStructAndVec" + } + ] + }, + { + "name": "returnCustomStructWithStructAndVecArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "CustomStructWithStructAndVec" + } + ], + "outputs": [ + { + "type": "CustomStructWithStructAndVec" + } + ] + }, + { + "name": "returnCustomEnum", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomEnum" + } + ] + }, + { + "name": "returnCustomEnumArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "CustomEnum" + } + ], + "outputs": [ + { + "type": "CustomEnum" + } + ] + }, + { + "name": "returnFirstCustomEnumWithValues", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomEnumWithValues" + } + ] + }, + { + "name": "returnSecondCustomEnumWithValues", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomEnumWithValues" + } + ] + }, + { + "name": "returnCustomEnumWithValuesArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "CustomEnumWithValues" + } + ], + "outputs": [ + { + "type": "CustomEnumWithValues" + } + ] + }, + { + "name": "returnFirstCustomEnumWithFields", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomEnumWithFields" + } + ] + }, + { + "name": "returnSecondCustomEnumWithFields", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomEnumWithFields" + } + ] + }, + { + "name": "returnCustomEnumWithFieldsArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "CustomEnumWithFields" + } + ], + "outputs": [ + { + "type": "CustomEnumWithFields" + } + ] + }, + { + "name": "returnOptionalValueBool", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "returnOptionalValueBoolArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "optional", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "returnMultiValueTwo", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "optional>", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "optional>", + "multi_result": true + } + ] + }, + { + "name": "returnBigIntArg", + "mutability": "mutable", + "inputs": [ + { + "name": "value", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "callAnotherContractReturnTwoU64", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "u64" + }, + { + "type": "u64" + } + ] + }, + { + "name": "asyncCallAnotherContractReturnTwoU64NoCallback", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [] + }, + { + "name": "asyncCallAnotherContractReturnTwoU64WithReturningCallback", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [] + }, + { + "name": "asyncCallAnotherContractReturnTwoU64WithNonReturningCallback", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [] + } + ], + "esdtAttributes": [], + "hasCallback": true, + "types": { + "CustomEnum": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0 + }, + { + "name": "Second", + "discriminant": 1 + }, + { + "name": "Third", + "discriminant": 2 + } + ] + }, + "CustomEnumWithFields": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0, + "fields": [ + { + "name": "first_first", + "type": "bytes" + }, + { + "name": "first_second", + "type": "u64" + }, + { + "name": "first_third", + "type": "BigUint" + } + ] + }, + { + "name": "Second", + "discriminant": 1, + "fields": [ + { + "name": "second_first", + "type": "List" + }, + { + "name": "second_second", + "type": "List" + }, + { + "name": "second_third", + "type": "CustomStruct" + } + ] + } + ] + }, + "CustomEnumWithValues": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0, + "fields": [ + { + "name": "0", + "type": "bytes" + }, + { + "name": "1", + "type": "u64" + }, + { + "name": "2", + "type": "BigUint" + } + ] + }, + { + "name": "Second", + "discriminant": 1, + "fields": [ + { + "name": "0", + "type": "List" + }, + { + "name": "1", + "type": "List" + }, + { + "name": "2", + "type": "CustomStruct" + } + ] + } + ] + }, + "CustomStruct": { + "type": "struct", + "fields": [ + { + "name": "first", + "type": "bytes" + }, + { + "name": "second", + "type": "u64" + }, + { + "name": "third", + "type": "BigUint" + } + ] + }, + "CustomStructWithStructAndVec": { + "type": "struct", + "fields": [ + { + "name": "first", + "type": "List" + }, + { + "name": "second", + "type": "List" + }, + { + "name": "third", + "type": "CustomStruct" + } + ] + }, + "TestEnumProperties": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0 + }, + { + "name": "Second", + "discriminant": 1, + "fields": [ + { + "name": "0", + "type": "bytes" + }, + { + "name": "1", + "type": "BigUint" + } + ] + } + ] + }, + "TestEnumPropertiesWithFields": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0, + "fields": [ + { + "name": "buffer_value", + "type": "bytes" + }, + { + "name": "integer", + "type": "BigUint" + } + ] + } + ] + }, + "TestTokenProperties": { + "type": "struct", + "fields": [ + { + "name": "buffer", + "type": "bytes" + }, + { + "name": "integer", + "type": "BigUint" + } + ] + } + } +} diff --git a/tester/contract/output/tester-contract.imports.json b/tester/contract/output/tester-contract.imports.json new file mode 100644 index 0000000..3dbe2cb --- /dev/null +++ b/tester/contract/output/tester-contract.imports.json @@ -0,0 +1,43 @@ +[ + "bigIntAdd", + "bigIntFinishSigned", + "bigIntFinishUnsigned", + "bigIntGetESDTExternalBalance", + "bigIntGetExternalBalance", + "bigIntGetSignedArgument", + "bigIntGetUnsignedArgument", + "bigIntMul", + "bigIntNew", + "bigIntPow", + "bigIntSetInt64", + "checkNoPayment", + "cleanReturnData", + "getArgumentLength", + "getGasLeft", + "getNumArguments", + "mBufferAppend", + "mBufferAppendBytes", + "mBufferCopyByteSlice", + "mBufferFinish", + "mBufferFromBigIntUnsigned", + "mBufferGetArgument", + "mBufferGetByteSlice", + "mBufferGetBytes", + "mBufferGetLength", + "mBufferNew", + "mBufferSetBytes", + "mBufferStorageLoad", + "mBufferStorageStore", + "mBufferToBigIntUnsigned", + "managedAsyncCall", + "managedCaller", + "managedExecuteOnDestContext", + "managedGetESDTTokenData", + "managedGetOriginalTxHash", + "managedSCAddress", + "managedSignalError", + "signalError", + "smallIntFinishSigned", + "smallIntFinishUnsigned", + "smallIntGetUnsignedArgument" +] \ No newline at end of file diff --git a/tester/contract/output/tester-contract.mxsc.json b/tester/contract/output/tester-contract.mxsc.json new file mode 100644 index 0000000..e8b4341 --- /dev/null +++ b/tester/contract/output/tester-contract.mxsc.json @@ -0,0 +1,894 @@ +{ + "buildInfo": { + "rustc": { + "version": "1.78.0", + "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", + "commitDate": "2024-04-29", + "channel": "Stable", + "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" + }, + "contractCrate": { + "name": "tester-contract", + "version": "0.0.0" + }, + "framework": { + "name": "multiversx-sc", + "version": "0.50.3" + } + }, + "abi": { + "name": "Tester", + "constructor": { + "inputs": [ + { + "name": "initial_value", + "type": "BigUint" + } + ], + "outputs": [] + }, + "upgradeConstructor": { + "inputs": [], + "outputs": [] + }, + "endpoints": [ + { + "name": "getSum", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "add", + "mutability": "mutable", + "inputs": [ + { + "name": "value", + "type": "BigUint" + } + ], + "outputs": [] + }, + { + "name": "returnNftProperties", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "TestTokenProperties" + } + ] + }, + { + "name": "returnNftEnumProperties", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "TestEnumProperties" + } + ] + }, + { + "name": "returnNftEnumFieldsProperties", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "TestEnumPropertiesWithFields" + } + ] + }, + { + "name": "returnFungibleBalance", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "returnNonFungibleBalance", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "noArgNoReturnEndpoint", + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "name": "returnCaller", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "Address" + } + ] + }, + { + "name": "returnManagedBuffer", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "returnContractAddress", + "mutability": "mutable", + "inputs": [ + { + "name": "contract_address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "Address" + } + ] + }, + { + "name": "returnBiguint", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "returnU8", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u8" + } + ] + }, + { + "name": "returnU16", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u16" + } + ] + }, + { + "name": "returnU32", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u32" + } + ] + }, + { + "name": "returnU64", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "returnU32Vec", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "returnU64Vec", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "returnBufferVec", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "returnBiguintVec", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "List" + } + ] + }, + { + "name": "returnTwoU64", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "u64" + }, + { + "type": "u64" + } + ] + }, + { + "name": "returnTwoBuffers", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "bytes" + }, + { + "type": "bytes" + } + ] + }, + { + "name": "returnOneBufferOneU64AndOneBiguint", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "bytes" + }, + { + "type": "u64" + }, + { + "type": "BigUint" + } + ] + }, + { + "name": "returnDoubleOfU64Arg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "u64" + } + ], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "returnDoubleOfBiguintArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "returnAppendedBufferArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "bytes" + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "returnSumTwoBiguintArgs", + "mutability": "mutable", + "inputs": [ + { + "name": "first_arg", + "type": "BigUint" + }, + { + "name": "second_arg", + "type": "BigUint" + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "returnConcatMultiBufferArgs", + "mutability": "mutable", + "inputs": [ + { + "name": "args", + "type": "variadic", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "bytes" + } + ] + }, + { + "name": "returnSumMultiU64Args", + "mutability": "mutable", + "inputs": [ + { + "name": "args", + "type": "variadic", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "u64" + } + ] + }, + { + "name": "returnSumMultiBiguintArgs", + "mutability": "mutable", + "inputs": [ + { + "name": "args", + "type": "variadic", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "BigUint" + } + ] + }, + { + "name": "returnCustomStruct", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomStruct" + } + ] + }, + { + "name": "returnCustomStructArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "CustomStruct" + } + ], + "outputs": [ + { + "type": "CustomStruct" + } + ] + }, + { + "name": "returnCustomStructWithStructAndVec", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomStructWithStructAndVec" + } + ] + }, + { + "name": "returnCustomStructWithStructAndVecArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "CustomStructWithStructAndVec" + } + ], + "outputs": [ + { + "type": "CustomStructWithStructAndVec" + } + ] + }, + { + "name": "returnCustomEnum", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomEnum" + } + ] + }, + { + "name": "returnCustomEnumArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "CustomEnum" + } + ], + "outputs": [ + { + "type": "CustomEnum" + } + ] + }, + { + "name": "returnFirstCustomEnumWithValues", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomEnumWithValues" + } + ] + }, + { + "name": "returnSecondCustomEnumWithValues", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomEnumWithValues" + } + ] + }, + { + "name": "returnCustomEnumWithValuesArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "CustomEnumWithValues" + } + ], + "outputs": [ + { + "type": "CustomEnumWithValues" + } + ] + }, + { + "name": "returnFirstCustomEnumWithFields", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomEnumWithFields" + } + ] + }, + { + "name": "returnSecondCustomEnumWithFields", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "CustomEnumWithFields" + } + ] + }, + { + "name": "returnCustomEnumWithFieldsArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "CustomEnumWithFields" + } + ], + "outputs": [ + { + "type": "CustomEnumWithFields" + } + ] + }, + { + "name": "returnOptionalValueBool", + "mutability": "mutable", + "inputs": [], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "returnOptionalValueBoolArg", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "optional", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "optional", + "multi_result": true + } + ] + }, + { + "name": "returnMultiValueTwo", + "mutability": "mutable", + "inputs": [ + { + "name": "arg", + "type": "optional>", + "multi_arg": true + } + ], + "outputs": [ + { + "type": "optional>", + "multi_result": true + } + ] + }, + { + "name": "returnBigIntArg", + "mutability": "mutable", + "inputs": [ + { + "name": "value", + "type": "BigInt" + } + ], + "outputs": [ + { + "type": "BigInt" + } + ] + }, + { + "name": "callAnotherContractReturnTwoU64", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [ + { + "type": "u64" + }, + { + "type": "u64" + } + ] + }, + { + "name": "asyncCallAnotherContractReturnTwoU64NoCallback", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [] + }, + { + "name": "asyncCallAnotherContractReturnTwoU64WithReturningCallback", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [] + }, + { + "name": "asyncCallAnotherContractReturnTwoU64WithNonReturningCallback", + "mutability": "mutable", + "inputs": [ + { + "name": "address", + "type": "Address" + } + ], + "outputs": [] + } + ], + "esdtAttributes": [], + "hasCallback": true, + "types": { + "CustomEnum": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0 + }, + { + "name": "Second", + "discriminant": 1 + }, + { + "name": "Third", + "discriminant": 2 + } + ] + }, + "CustomEnumWithFields": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0, + "fields": [ + { + "name": "first_first", + "type": "bytes" + }, + { + "name": "first_second", + "type": "u64" + }, + { + "name": "first_third", + "type": "BigUint" + } + ] + }, + { + "name": "Second", + "discriminant": 1, + "fields": [ + { + "name": "second_first", + "type": "List" + }, + { + "name": "second_second", + "type": "List" + }, + { + "name": "second_third", + "type": "CustomStruct" + } + ] + } + ] + }, + "CustomEnumWithValues": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0, + "fields": [ + { + "name": "0", + "type": "bytes" + }, + { + "name": "1", + "type": "u64" + }, + { + "name": "2", + "type": "BigUint" + } + ] + }, + { + "name": "Second", + "discriminant": 1, + "fields": [ + { + "name": "0", + "type": "List" + }, + { + "name": "1", + "type": "List" + }, + { + "name": "2", + "type": "CustomStruct" + } + ] + } + ] + }, + "CustomStruct": { + "type": "struct", + "fields": [ + { + "name": "first", + "type": "bytes" + }, + { + "name": "second", + "type": "u64" + }, + { + "name": "third", + "type": "BigUint" + } + ] + }, + "CustomStructWithStructAndVec": { + "type": "struct", + "fields": [ + { + "name": "first", + "type": "List" + }, + { + "name": "second", + "type": "List" + }, + { + "name": "third", + "type": "CustomStruct" + } + ] + }, + "TestEnumProperties": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0 + }, + { + "name": "Second", + "discriminant": 1, + "fields": [ + { + "name": "0", + "type": "bytes" + }, + { + "name": "1", + "type": "BigUint" + } + ] + } + ] + }, + "TestEnumPropertiesWithFields": { + "type": "enum", + "variants": [ + { + "name": "First", + "discriminant": 0, + "fields": [ + { + "name": "buffer_value", + "type": "bytes" + }, + { + "name": "integer", + "type": "BigUint" + } + ] + } + ] + }, + "TestTokenProperties": { + "type": "struct", + "fields": [ + { + "name": "buffer", + "type": "bytes" + }, + { + "name": "integer", + "type": "BigUint" + } + ] + } + } + }, + "size": 11942, + "code": "0061736d01000000018e011760000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f017f60047f7f7f7f0060027f7e0060017f017e60017e0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060057f7f7f7f7f0002ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d4275666665724765744c656e677468000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7617626967496e744765745369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000803656e76126d42756666657253746f726167654c6f6164000403656e76136d42756666657253746f7261676553746f7265000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001103656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001203656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000803656e76106d616e616765644173796e6343616c6c00090387018501090002050201020b02010113010504030302020206020514030708090205060101060d070202020401030300000102031503010101030307050506010803060909020401020a0802010207010101061602050d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07f40a38066d656d6f7279020004696e6974007c0667657453756d007d03616464007e1372657475726e4e667450726f70657274696573007f1772657475726e4e6674456e756d50726f706572746965730080011d72657475726e4e6674456e756d4669656c647350726f706572746965730081011572657475726e46756e6769626c6542616c616e63650082011872657475726e4e6f6e46756e6769626c6542616c616e6365008301156e6f4172674e6f52657475726e456e64706f696e740084010c72657475726e43616c6c65720085011372657475726e4d616e616765644275666665720086011572657475726e436f6e7472616374416464726573730087010d72657475726e42696775696e740088010872657475726e55380089010972657475726e553136008a010972657475726e553332008b010972657475726e553634008c010c72657475726e553332566563008d010c72657475726e553634566563008e010f72657475726e427566666572566563008f011072657475726e42696775696e745665630090010c72657475726e54776f5536340091011072657475726e54776f427566666572730092012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740093011472657475726e446f75626c654f665536344172670094011872657475726e446f75626c654f6642696775696e744172670095011772657475726e417070656e6465644275666665724172670096011772657475726e53756d54776f42696775696e74417267730097011b72657475726e436f6e6361744d756c7469427566666572417267730098011572657475726e53756d4d756c7469553634417267730099011972657475726e53756d4d756c746942696775696e7441726773009a011272657475726e437573746f6d537472756374009b011572657475726e437573746f6d537472756374417267009c012272657475726e437573746f6d53747275637457697468537472756374416e64566563009d012572657475726e437573746f6d53747275637457697468537472756374416e64566563417267009e011072657475726e437573746f6d456e756d009f011372657475726e437573746f6d456e756d41726700a0011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a1012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a2011d72657475726e437573746f6d456e756d576974684669656c647341726700a3011772657475726e4f7074696f6e616c56616c7565426f6f6c00a4011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700a5011372657475726e4d756c746956616c756554776f00a6010f72657475726e426967496e7441726700a7011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400a8012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00a901396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00aa013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ab010863616c6c4261636b00ac0107757067726164650084011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a1012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a2011d72657475726e437573746f6d456e756d5769746856616c75657341726700a3010a5f5f646174615f656e6403010b5f5f686561705f6261736503020adb4385011b00200120034b0440102a000b20002001360204200020023602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1044000b200128020c2000200220036a360200200141106a24000b820102017e017f230041106b22022400200242003703082000200241086a4108104c20022903082101200241106a2400200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484840b08002000102f103b0b1d00200028020820011033200029030020011034200028020c200110350b5001027f230041106b22022400200220001005220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410732001200010031a200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081073200241106a24000b0a002000103e200110330b0a0041948408410010370b1101017f102c220220002001100c1a20020b0700200010041a0b3101027f4100103a220210052101200041003a00102000200136020c2000200236020820002001360204200041003602000b0d002000102c2200100d1a20000b0d002000102c2200101b1a20000b0e00200041e781084120103d103b0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0f01017f102c22012000101a1a20010b0c01017f102c2200100620000b4c01037f103f2103102c2102200041feffffff074604402003104141c4d2082002100720020f0b20001005210420031041200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011005450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210431a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171037220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b2e01017f104621010340200028020041c0d2082802004e4504402001200041f083084104104710480c010b0b20010b1301017f102c2200419484084100100c1a20000b0c00200020012002104a103a0b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bbf0102027e037f200141a183084106104a1010220242808080801054044002402002a7220641ebde0147410020061b450440200141a183084106104b22034280808080708321022003a72104200141a183084106104b21030c010b027e200128020041c0d2082802004e0440410121051046210442000c010b41012105200141a1830841061047210442000b21020b200020033703102000200636020420002005360200200020022004ad843703080f0b41a18308410641a68008410e1044000b2f01017f2000280200220341c0d2082802004e0440200120024187810841111044000b2000200341016a36020020030b0c00200020012002104a10100b3100200041086a200028020020012002106f044041dd8308410341d88108410f1044000b2000200028020020026a3602000b2a01027f2000106a210110462102037f2001047f200220001030106e200141016b21010c010520020b0b0b2a01027f2000106a210110462102037f2001047f20022000102f1048200141016b21010c010520020b0b0b0c002000102c2200101120000b2101017f4100103a220210054120470440200020014187820841101044000b20020b1400200020014d04400f0b4198810841121000000b1900200041c0d2082802004e04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010054102760b2701017f10362101200028020820011033200029030020011034200028020c20011035200110380b0a0020001015200110150b6001027f20002802002102103621010240200245044041002001105b2000280204200110332000290310200110342000280208200110350c010b41012001105b20002802042001105c200041086a2001105d200041106a200110320b200110380b2601017f230041106b22022400200220003a000f20012002410f6a41011073200241106a24000baf0102017e047f230041106b22032400200010054103762001107420001005210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810651a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b220224002000280200220310572001107420022003100536021c20024100360218200220003602140340200241086a200241146a107520022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b2401017f1036210120002802102001105c200041146a2001105d200020011032200110380b0d0020001061200120021028000b0a0041764200100141760b1b01027f102c2200101741c38108410a10372201200010031a20010b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200110052206200241106a41201029200141002002280208200228020c10651a2000200636022020002002290310370000200041086a2005290300370000200041106a2004290300370000200041186a2003290300370000200241306a24000b0c00200020012002200310430b4b01047f106241948408410010372101200028020021032000280204220420011074200120032004100e1a200041086a2001105d2001101f1a200028020c200028021020002802141060000b5201017f230041106b220324002003410036020c20002003410c6a4104200120021078200328020c2100200341106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b1f0020012002200310022201101d21022000200136020420002002453602000b1600200020011037220020022003100e1a2000100f000b4e01017f230041106b220124002001410036020c20002001410c6a4104104c200128020c2100200141106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b0c00200020002001101820000b0a0020002000200110190b1801017f102c2101417242121001200120004172101c20010b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000b850401077f230041106b2206240002400240027f024020002d000845044020002802002204100522054190ce004b0d0141bcd2082d00000d0141b8d208200536020041bcd20841013a0000200641086a200541a884084190ce001029200441002006280208200628020c10651a20002d0008044041b8d208410036020041bcd20841003a00000b200041013a00080b4101200120036a220041b8d2082802004b0d011a20002001490d0220004190ce004b0d03200141a884086a2100200341104f04402002410020026b41037122046a210520040440200021010340200220012d00003a0000200141016a2101200241016a22022005490d000b0b2005200320046b2203417c7122076a21020240200020046a22044103710440200741004c0d012004410374220141187121082004417c71220941046a2100410020016b411871210a2009280200210103402005200120087620002802002201200a7472360200200041046a2100200541046a22052002490d000b0c010b200741004c0d0020042100034020052000280200360200200041046a2100200541046a22052002490d000b0b20034103712103200420076a21000b20030440200220036a21010340200220002d00003a0000200041016a2100200241016a22022001490d000b0b41000c010b200041003a0008200420012002200310650b200641106a24000f0b102a000b102a000b0d002000102c2200101e1a20000b0b0020002001103e101f1a0b080020001070103b0b0b00200020012002100e1a0b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041073200241106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410651a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b4a01017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c103721012000104636020420002001360200200020023602080b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041065450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111044000b2f00200041086a200028020020012002106f04402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107820012d000f200141106a24000b0a00418e8408410310370bab0102017e027f230041106b22042400200020012002107721002004420037030820001005220541094f04402001200241a68008410e1044000b20004100200420056b41106a200510431a20042903082103200441106a2400200342388620034280fe0383422886842003428080fc0783421886200342808080f80f834208868484200342088842808080f80f832003421888428080fc07838420034228884280fe038320034238888484840b1601017f1020410110534100104f2100107a200010710b0e00102041001053107a107210210b2201037f1020410110534100104f2100107a2201107222022000106c2001200210710bc00101037f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c2000412c6a220241e781084120103d21012002103c21022000280230200028022c46044020002d003c044041b8d208410036020041bcd20841003a00000b200110362201103320022001103520011038200041406b24000f0b41e78108412041a68008410e1069000b9b0202037f017e230041406a2200240010204100105341c88308410a103721012000410c6a103f200110420240024002402000280218102d220110050440200110052102200041003a003c2000200236023820002001360234200020023602302000410036022c410121010240024002402000412c6a107941ff01710e020201000b41e78108412041808008410d1069000b2000412c6a220141e781084120103dad2001103cad422086842103410021010b2000280230200028022c470d0320002d003c044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b410110362201105b2003a7200110332003422088a720011035200110380b200041406b24000f0b41e78108412041a68008410e1069000be20101047f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c02402000412c6a107941ff01714504402000412c6a220141e781084120103d2001103c21032000280230200028022c470d0120002d003c044041b8d208410036020041bcd20841003a00000b410010362201105b2001103320032001103520011038200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b160010204100105341d28308410b10374200104010210b160010204100105341c88308410a10374206104010210b08001020410010530b1501017f102041001053102c22001022200010041a0b130010204100105341c483084104103710041a0b130010204101105341e083084110105010041a0b1000102041001053410a102b106d10210b0c00102041001053420310150b0d0010204100105342f40310150b0e0010204100105342c09a0c10150b10001020410010534280b4c4c32110150b1f01017f10204100105310462200410a1048200041c09a0c1048200010041a0b2101017f10204100105310462200420a106e20004280b4c4c321106e200010041a0b7f01037f230041206b220024001020410010531046220141ba8308410510371048200141bf8308410510371048200020013602101036210220002001100536021c200041003602182000200041106a3602140340200041086a200041146a107520002802080440200028020c200210330c010b0b20021038200041206a24000b9a0101067f230041106b2201240010204100105310462202410a102b106d10482002410a102b106d4102102b106b1048103621032002100521040340200041046a220520044b4504402001410036020c200220002001410c6a410410431a200128020c220041187420004180fe03714108747220004108764180fe03712000411876727220031035200521000c010b0b20031038200141106a24000b1200102041001053420a4280b4c4c32110590b2401027f10204100105341ba83084105103741bf830841051037210110041a200110041a0b2901027f10204100105341ba830841051037410a102b106d210110041a4280b4c4c3211015200110210b11001020410110534100101042018610150b1a01017f1020410110534100104f21004102102b2000106b10210b2001017f1020410110534100103a220041c483084104103710031a200010041a0b1c01017f1020410210534100104f220020004101104f1019200010210b6201037f230041106b220024001020105510542000410036020020001045210220002802001052104621012000200210560340200028020820002802044f4504402001200041f4830841081077102d10031a0c010b0b200110041a200041106a24000b5d02027f017e230041106b2200240010201055105420004100360200200010452101200028020010522000200110560340200028020820002802044f450440200041f483084108107b20027c21020c010b0b20021015200041106a24000b6401037f230041106b220024001020105510542000410036020020001045210220002802001052102c2201420010012000200210560340200028020820002802044f4504402001200041f4830841081077103b106c0c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105341c483084104103721012000410a102b106d36020c20004280b4c4c3213703002000200136020820001058200041106a24000b9c0102047f017e230041106b22002400102041011053230041206b220124002001410c6a220210392002102f210320021030210420021031210202402001280210200128020c46044020012d001c044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1044000b20001058200041106a24000b860101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a105f200041206a24000bd00101067f230041206b22032400102041011053200341086a2101230041406a220024002000411c6a220210392002104d21042002104e2105200041306a2002102e02402000280220200028021c460440200041106a2202200041386a2903003703002000200029033037030820002d002c044041b8d208410036020041bcd20841003a00000b200120002903083703002001200536021420012004360210200141086a2002290300370300200041406b24000c010b41dd8308410341a68008410e1044000b2001105f200341206a24000b0c00102041001053420110150b5f02017f017e102041011053027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1044000b41dd8308410341808008410d1044000bad42ff018310150b5001037f230041206b2200240010204100105341c48308410410372101410a102b106d210220004280b4c4c3213703102000200136020420002002360208200041003602002000105a200041206a24000b8a0101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200436021c2000200336021820004280b4c4c3213703102000200236020820002001360204200041013602002000105a200041206a24000b940202057f027e230041206b22012400102041011053230041306b220024002000410c6a22021039200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1044000b2000410c6a2202102f21042002103021062002103121020c010b2000410c6a2203104d21042003104e2102200041206a2003102e2000290328210520002903202106410121030b02402000280210200028020c46044020002d001c044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1044000b2001105a200141206a24000b0c001020410010534101105e0b7d02037f017e230041106b220024001020105510542000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd83084103104a1010220342015804402003a741016b0d020c010b41dd8308410341fc830841121044000b410121010b20010541020b200028020c1052105e200041106a24000bab0102037f047e230041306b220024001020105510542000410036020c200041106a21012000410c6a220228020041c0d2082802004e047e420105200241dd83084103104b2103200241dd83084103104b2104200241dd83084103104b210542000b210620012005370318200120043703102001200337030820012006370300200028020c105220002903105004402000290328200029032020002903181015101510150b200041306a24000b1601017f1020410110534100102c22001012200010230b900102037f017e230041206b22002400102041011053200041a7830841071050360210200041046a200041106a1076102421032000280208210120002802042102200342a08d067d2003200342a08d06561b200028020c106120022001102c220110251a1026200041146a220220011056200241cd8108410b107b200041146a41cd8108410b107b1059200041206a24000b5701017f230041206b22002400102041011053200041a783084107105036021c200041106a2000411c6a10762000200028021836020c20002000290210370204200041046a2200280208200028020020002802041060000b0b0041e88208411c10ad010b0b0041848308411d10ad010bda0302057f027e230041f0006b2200240002400240024010622204107022011005450d002001102d220310052101200041003a00402000200136023c200020033602382000200136023420004100360230200041306a220141b480084119103d2102200141b48008411910672101104621030340200104402003200041306a41b480084119103d1048200141016b21010c010b0b20002802342000280230470d0120002d0040044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c101f1a2000410c6a20021064200028022c450d00200041306a200210642000280250450d000240200041306a41e88208411c1063450440200041306a41848308411d10630d014197820841361000000b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d03200510590c010b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d02200510590b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b7601067f230041206b22022400102041011053200241a783084107105036021c200241046a22032002411c6a1076200228020c21042002280204210520022802082106104621072002200636021820022005360214200220043602102002200736020c200220013602082002200036020420031066000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff", + "report": { + "imports": [ + "bigIntAdd", + "bigIntFinishSigned", + "bigIntFinishUnsigned", + "bigIntGetESDTExternalBalance", + "bigIntGetExternalBalance", + "bigIntGetSignedArgument", + "bigIntGetUnsignedArgument", + "bigIntMul", + "bigIntNew", + "bigIntPow", + "bigIntSetInt64", + "checkNoPayment", + "cleanReturnData", + "getArgumentLength", + "getGasLeft", + "getNumArguments", + "mBufferAppend", + "mBufferAppendBytes", + "mBufferCopyByteSlice", + "mBufferFinish", + "mBufferFromBigIntUnsigned", + "mBufferGetArgument", + "mBufferGetByteSlice", + "mBufferGetBytes", + "mBufferGetLength", + "mBufferNew", + "mBufferSetBytes", + "mBufferStorageLoad", + "mBufferStorageStore", + "mBufferToBigIntUnsigned", + "managedAsyncCall", + "managedCaller", + "managedExecuteOnDestContext", + "managedGetESDTTokenData", + "managedGetOriginalTxHash", + "managedSCAddress", + "managedSignalError", + "signalError", + "smallIntFinishSigned", + "smallIntFinishUnsigned", + "smallIntGetUnsignedArgument" + ], + "memoryAllocationError": false, + "isMemGrow": false, + "eiCheck": { + "eiVersion": "1.3", + "ok": true + } + } +} diff --git a/tester/contract/output/tester-contract.wasm b/tester/contract/output/tester-contract.wasm new file mode 100755 index 0000000000000000000000000000000000000000..da1ad6c67d145124099575cb1671ea1ac7cba4d1 GIT binary patch literal 11942 zcmb_iTWlQHc|PaN>~hKB6?1!izBD%n^t9))m&H4iV{a_<>@l4b^7wL5-e|pjCKCl;+$w9rT7{4cF)^leGb>E^F<4}bY+XC zt#SY9>UzB~wUgCLj#_s-`bc%*3QaIJR|aZw&4wFmRBOQ8iE1gv>!x^4+`&uaOxihl zA)1^Wsh%udv33?#6;9`Cv}9%Nh*fa}W{ql2{*BGUW4+nIZLq@8QvF19z9BY{@b-B2 z(B)`yu@Q|{9*OFWBh^YHy4(;OIihQFE-F<{MUBOp!>MH`;U6ekBeISuhV?6zNiro` zy_e*RvQ?;zk}6PAZju?_^ORCqmFf0ca;++pl``AWf+k;j9%7dAHhWUyz9oacoR@8F zMVD&JfkX>BvRhQ91HtY8_D^O!DZK0!Z&`-duH}Md5#IPadwC6)miOBZW#^;$YVC>= zJ_1QYJeP&S#un$r^Ii$yxw@%l^)Pb2ak5rjh-!^8BEj<3v~{SmIN#KBP2RJrYq%WE zP1TzQd{u6C1BMqX)8&b|D2X{Q$ews+wX(MFy4+l;!jVR*rz|%^m8pel86n|@YrGtwgR3Hy9jNrq~k8@LRImje4ZI2nCOx=ZM<0cs-*3y15n__oTovtU5+y%dl(5pd)!xpNYME38x-7ou9? zC8w;j#d!R_ytkADxDOdOQl%?SlqP4zAIr~uoEcP?Td7=`PAC6BKJ;-Xk5uDe-8}z? zGDnGuWaLj|%i_Xxtuz%OVBFniRzdX-w^=;qE;e($&Sq`n<5MVd#!;|&G8iAf5S13j zCrb6mQ*HlvslHaY(rc4U5vnApAw;*EeOmrBIx31#nIa9#mL{(?x~>;MDbQWx!z`FVic~9>FltuXS4?g&yW!N7yo({ve z-_3!G7Nff0dypC2=n#Yc?cJQt^|G6{SdPrLLQ?@{LNj`U+fuePNrWNAY*FYoXipV< z{AKW$#a|2lr0vP!u2sWDbY=)F$nc$OR8M;^Bn!oZveWn>95L*i36(wqC5G~_*a3kV z4{&MiS3S7o`c*eBFa)jB;;fVHr-Pb|3n1QJ(HV-Phs8Z0XC1K1DV^T?Y4im5LP_C& zVg0Ropum_Tb!RWuzX6MR_SPtGZC~q4wU|)J{%0M@d-%>Lv@-s7=ljhVCab*jIqKx7?_G(>&H^5tKKqZ zeg_<6L0T6SedwA#?GLI!qiz+l;eYz!7p~nlJ9k_5E!0>Lt_z98Yc@JVJ z1k5H$5$R+;0~Pp1fnGkO6OOVm$SX#0gi%@r=Acqx4oauDj^{q;G31Gg9D%)yASLK%U0Kk#~1@Kj3R;HGjMT0eI_p< ziK62CWpF3-eqDh$ayBp9Wrj$<`_O&**qWiVtPKMjVCFo56-SZKAVWZY8NT#FF4R^U z6?9{`k&pRZD?H4Kyy#G(11I97L7l^@NI5*JUA31w#TUpgpf9&NZn0w zcT&4jKW<$g5zFQqXBl{p2wKT_CR9tor!i9Z=OvYOm&5=~+J_Vju<&DFl%R-}T zCX~oB%6aymF}3^F5{3sM zLBWlZ+)Iy&bFX!-H212e1f`l1lu8p6NHIZynfpyP?=w6EPrC$bW(zC?h|YqiAGiE6 zq&irIdchNTZT))c5rL~zBT*_5ZH#038c8<>J$*k86N=n&vo>=gomRq~Qy#z8cn$Y32!-B=LQh-xZ~Hn!2p z;DU-v4+sIyFe`&X$UOjqe)`ZeLrmBn74D~!lQ<4j9SM#jfar;&xPV+VC+kb#pV9+^ zC~%QO5VP$v)VS0;@nmy(A9Glr>elB(a4N++O9YPyV7B*c&<7c%FWU+LN^}?oMPv=J zk~OeGoHfvctP$*lzF{1XDOlgbFp!qmLks|0AUxO^C_ou5+X-g7k(3jb!BC*%M7s2I z!q&Lfl(tm;NG`0#xDK+njUaZ>Z9xw~xhF5fT5%&wdWcffJCHsvr|a8NnHB6WxENkl zd#~iv7yY!T$?g(r5dR5jU^&O!N#mln$rLi-Ykwn-cgXOs-pv8vxcLhdO3Zd_Vc7zZ zSyYAJ#|{O90Yo1_%o2$BaXeFQrl3sb(GG+T#7N+Dw%~=& zT`aU<2xH{g;*F=d99Vi_5CC?izJ zg%mE35h{a>AxjtZU_e~f0`yS;QxV8r0e7MNODp+bg1V7Wp$Mrz53hB5s0GyXt`R=j z*&7V4f$K*(1icAvne3L7%VS@Y>E@IEkK)TOD5?oz1gJUgqpW~Rp&4j^9?3fh?#M8A z0akEv*oY}!F*c}`*r3wbfF8t#JT!x11)`z4wgoU1?gC5jMMz|qB0aZhV6RH|58*4Q z;A|xl{wXTYc0E8+dbo*{C7cVMb=eMEYP<1)BzD*1LJCFjL&d$Nt!yKDnU#Z#`LG>} zmX9iq_1>6o>|?0cv~=7@7$CM2PV8ZUNR-Fhb#AFJ!s^kMhX+za#&M4o2WEz>IO5IR zWqJ|n5N9+b$yedv$RoiIS%)NBXP=qfE_n$cv3gg;d4Nj<{CJ+4P=4WHH{UQ<2dHPs_tT91H~Jqy?ZNwo>39z(4e(-t_4uYB!e^?|OoTZaHim~j%sBH;+HCc+MFK}pdQz&(5$YdmzjXl~xf!}0Ts zV2KWncA(U_yAFmrWPlQGv#q(ULY~G}59AI4PUdCaS=}%uuCJVbjf2uhswPoN)7i;~ znwM%!)nIe$Dw!#=E2EsTk0SNlRZt+7#(vrfmI$?0rc}La0k9>3?Yn?&pa-C_L4ZGP zj?rAq+U8t5I@s)7h~B~@paPr%he(?eVsC?(uLsgLy4t^>P3x0v)5*9t{aHPa<=W$h zqKCazNAmDKpAxSuzV${s9+RoXYd?DXCwVk*n-}}-FlvQ1Y*4WY#8_OpR(@4~u?>4& z9JJZVxZ{Xr=fv2Oq)x1dfxy26!x;#{9q*6Rdkb%kO&@R%ZQBitbz0PSSXm>Ma?j#I zuiLW#vD~xZ(hfhyo&^PmvQB9?E^pw~Uc7@t+z*`*RHzu}di*@!Sc2n37 z83xKkLy30s66%Cbpwr!V4ze=XA&KoUG#_l>3N94uqPz)<_O1!flpB_s#bDFibr@15 zK*LeDwdD>sK)KLfphct})!WdU4lDoKPb5^{l*(VN z2^txB25#o+i*_V9{W++4pM~>&R7Of4u%$O3i+wt9%QT0IW5@bw&Zd}lEbh6}9iOa7 zdl~?t;+GRmg~keZH{(rqv(KkOdQQZ=&nRF62HroofPog3px!!Wb6h~a+u=09P=GqL z+p(sTfMfSvD9Q9Vv}9fXZ)4X7A1Dx=BcPnajz*>_8Dn=Os(Q>SX(XRP<9?ip=zEog zs3EF$xPu1Gl3#>}X1H^=w!v$T{dVoWV$b@Tgk4c|S@m%v*KKSa4I8k4#7Ti8WYgq& znw5~qa}uSIoTp^t_T7^ci+f2mh_JBjl&U)H7g|HTE6KwJQ% zz(q4J01SL4W+~*MBs?hP<#nYp%ZjBLxN(WWc@R#9;F(}K_8^3?!@{80qY&`26Ry%C zGWH77sU*%i)@m@Bz0U$_e;!9h^gS5Y^>~_4^Yn-$FmUoL>o^Pm0$& zqbIAbF%*M< zgzWGYP`1$+dmeAur-7VBv{}h0T%ITGcW^P{UoA@P{bMHZx}oWw8&~^ERUgmeY%hRW zQoSL#QEzy~K)peWK!9b4_RuF;U%))pIQ;3+oB5ySq*jAfdmff-8-cY?1g}vBTmPq! z2goq#7BtYJPukZ^*oRwj^pf5Mez7dy)#Bm<9bWO?I;2S8&cMtFX!AsoiJz*Wod5@mJS=R#i z&kW%}L}KrT!)Z!QXB))Aa97s&K<**;ge?!_3Aa4^xqh1%nC69xd) zXZ0CAe2G8j^eEWB(UET_Tb8?aAi*$z5@xiQ-UQ|SOeNPN{z9k zR-nx{4ZsRL(4vWFJupiq!R<10S=E_qBzl%{Vnk+Ar@gb`zxvy{yzP2&-s8OygEH+G|S~YXk%5*)d zl`-j=sAi_{(a=<6B7QD>7!u>1ZSdz_DgGXIRk!Keeb|yXA6+uZ2z)+OHTXF3%1XCggXFqmg%!Mh}t*WZC3AJ&~A9r6q)o~@S>-X`4Ch+Qp#Cmu0+-FVT zyK#U&_wi?B`1Ib=#Nr2qf` literal 0 HcmV?d00001 diff --git a/tester/contract/src/call.rs b/tester/contract/src/call.rs index 4683958..e99d175 100644 --- a/tester/contract/src/call.rs +++ b/tester/contract/src/call.rs @@ -25,8 +25,7 @@ pub trait CallModule: ContractBase { address ) .return_two_u64() - .async_call() - .call_and_exit() + .async_call_and_exit() } #[endpoint(asyncCallAnotherContractReturnTwoU64WithReturningCallback)] @@ -38,9 +37,8 @@ pub trait CallModule: ContractBase { address ) .return_two_u64() - .async_call() .with_callback(self.callbacks().callback_that_returns_result()) - .call_and_exit() + .async_call_and_exit() } #[endpoint(asyncCallAnotherContractReturnTwoU64WithNonReturningCallback)] @@ -52,9 +50,8 @@ pub trait CallModule: ContractBase { address ) .return_two_u64() - .async_call() .with_callback(self.callbacks().callback_that_returns_nothing()) - .call_and_exit() + .async_call_and_exit() } #[callback] diff --git a/tester/contract/src/lib.rs b/tester/contract/src/lib.rs index b36f41f..4e6e95c 100644 --- a/tester/contract/src/lib.rs +++ b/tester/contract/src/lib.rs @@ -12,4 +12,7 @@ pub trait Tester: ContractBase + adder::AdderModule + printer::PrinterModule + c fn init(&self, initial_value: BigUint) { self.sum().set(initial_value); } + + #[upgrade] + fn upgrade(&self) {} } diff --git a/tester/contract/wasm/Cargo.lock b/tester/contract/wasm/Cargo.lock new file mode 100644 index 0000000..f97c504 --- /dev/null +++ b/tester/contract/wasm/Cargo.lock @@ -0,0 +1,188 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "multiversx-sc" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d79d1cea2d23e8f2545749c9b31952305b54c415af88b224b985784d3d6529d" +dependencies = [ + "bitflags", + "hex-literal", + "multiversx-sc-codec", + "multiversx-sc-derive", + "num-traits", + "unwrap-infallible", +] + +[[package]] +name = "multiversx-sc-codec" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35c94397b2fba14e40edfa55905b3f453ed57aa06c9b1960ad6a0ca6bfb7a236" +dependencies = [ + "arrayvec", + "multiversx-sc-codec-derive", + "unwrap-infallible", +] + +[[package]] +name = "multiversx-sc-codec-derive" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf72a8042da0bc19da0b8f0d4f61b4c66ae853560fefc69cd8fea87bf1aa8c14" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "multiversx-sc-derive" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54e6926e181f6306b69aa805b8d24aa33084497e38ac03e37df457456b6757cc" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "radix_trie", + "syn", +] + +[[package]] +name = "multiversx-sc-wasm-adapter" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4350e286afce68bb2448d30572f68dd344b2e98e160404dd7f7d13f185e7acfd" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "proc-macro2" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "syn" +version = "2.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tester-contract" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "tester-contract-wasm" +version = "0.0.0" +dependencies = [ + "multiversx-sc-wasm-adapter", + "tester-contract", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" diff --git a/tester/contract/wasm/Cargo.toml b/tester/contract/wasm/Cargo.toml index d06c2bb..83ff236 100644 --- a/tester/contract/wasm/Cargo.toml +++ b/tester/contract/wasm/Cargo.toml @@ -1,17 +1,17 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + [package] name = "tester-contract-wasm" version = "0.0.0" -authors = [ "you",] -edition = "2018" +edition = "2021" publish = false [lib] -crate-type = [ "cdylib",] - -[workspace] -members = [ ".",] - -[dev-dependencies] +crate-type = ["cdylib"] [profile.release] codegen-units = 1 @@ -19,7 +19,16 @@ opt-level = "z" lto = true debug = false panic = "abort" +overflow-checks = false -[dependencies] -tester-contract = { path = ".." } -multiversx-sc-wasm-adapter = "=0.50.1" \ No newline at end of file +[profile.dev] +panic = "abort" + +[dependencies.tester-contract] +path = ".." + +[dependencies.multiversx-sc-wasm-adapter] +version = "0.50.3" + +[workspace] +members = ["."] diff --git a/tester/contract/wasm/src/lib.rs b/tester/contract/wasm/src/lib.rs index 432dac8..d953337 100644 --- a/tester/contract/wasm/src/lib.rs +++ b/tester/contract/wasm/src/lib.rs @@ -1,20 +1,17 @@ -// Code generated by the multiversx-sc multi-contract system. DO NOT EDIT. +// Code generated by the multiversx-sc build system. DO NOT EDIT. //////////////////////////////////////////////////// ////////////////// AUTO-GENERATED ////////////////// //////////////////////////////////////////////////// // Init: 1 +// Upgrade: 1 // Endpoints: 50 // Async Callback: 1 -// Total number of exported functions: 52 +// Total number of exported functions: 53 #![no_std] -// Configuration that works with rustc < 1.73.0. -// TODO: Recommended rustc version: 1.73.0 or newer. -#![feature(lang_items)] - multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -22,6 +19,7 @@ multiversx_sc_wasm_adapter::endpoints! { tester_contract ( init => init + upgrade => upgrade getSum => sum add => add returnNftProperties => return_nft_properties diff --git a/tester/core/tests/dummy_deploy.rs b/tester/core/tests/dummy_deploy.rs index 33c0e2a..fe35028 100644 --- a/tester/core/tests/dummy_deploy.rs +++ b/tester/core/tests/dummy_deploy.rs @@ -39,7 +39,7 @@ async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { receiver: SYSTEM_SC_DEPLOY_ADDRESS.to_string(), egld_value: 0u8.into(), gas_limit: 600000000u64, - data: "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@05".to_string(), + data: "0061736d01000000018e011760000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f017f60047f7f7f7f0060027f7e0060017f017e60017e0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060057f7f7f7f7f0002ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d4275666665724765744c656e677468000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7617626967496e744765745369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000803656e76126d42756666657253746f726167654c6f6164000403656e76136d42756666657253746f7261676553746f7265000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001103656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001203656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000803656e76106d616e616765644173796e6343616c6c00090387018501090002050201020b02010113010504030302020206020514030708090205060101060d070202020401030300000102031503010101030307050506010803060909020401020a0802010207010101061602050d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07f40a38066d656d6f7279020004696e6974007c0667657453756d007d03616464007e1372657475726e4e667450726f70657274696573007f1772657475726e4e6674456e756d50726f706572746965730080011d72657475726e4e6674456e756d4669656c647350726f706572746965730081011572657475726e46756e6769626c6542616c616e63650082011872657475726e4e6f6e46756e6769626c6542616c616e6365008301156e6f4172674e6f52657475726e456e64706f696e740084010c72657475726e43616c6c65720085011372657475726e4d616e616765644275666665720086011572657475726e436f6e7472616374416464726573730087010d72657475726e42696775696e740088010872657475726e55380089010972657475726e553136008a010972657475726e553332008b010972657475726e553634008c010c72657475726e553332566563008d010c72657475726e553634566563008e010f72657475726e427566666572566563008f011072657475726e42696775696e745665630090010c72657475726e54776f5536340091011072657475726e54776f427566666572730092012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740093011472657475726e446f75626c654f665536344172670094011872657475726e446f75626c654f6642696775696e744172670095011772657475726e417070656e6465644275666665724172670096011772657475726e53756d54776f42696775696e74417267730097011b72657475726e436f6e6361744d756c7469427566666572417267730098011572657475726e53756d4d756c7469553634417267730099011972657475726e53756d4d756c746942696775696e7441726773009a011272657475726e437573746f6d537472756374009b011572657475726e437573746f6d537472756374417267009c012272657475726e437573746f6d53747275637457697468537472756374416e64566563009d012572657475726e437573746f6d53747275637457697468537472756374416e64566563417267009e011072657475726e437573746f6d456e756d009f011372657475726e437573746f6d456e756d41726700a0011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a1012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a2011d72657475726e437573746f6d456e756d576974684669656c647341726700a3011772657475726e4f7074696f6e616c56616c7565426f6f6c00a4011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700a5011372657475726e4d756c746956616c756554776f00a6010f72657475726e426967496e7441726700a7011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400a8012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00a901396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00aa013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ab010863616c6c4261636b00ac0107757067726164650084011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a1012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a2011d72657475726e437573746f6d456e756d5769746856616c75657341726700a3010a5f5f646174615f656e6403010b5f5f686561705f6261736503020adb4385011b00200120034b0440102a000b20002001360204200020023602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1044000b200128020c2000200220036a360200200141106a24000b820102017e017f230041106b22022400200242003703082000200241086a4108104c20022903082101200241106a2400200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484840b08002000102f103b0b1d00200028020820011033200029030020011034200028020c200110350b5001027f230041106b22022400200220001005220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410732001200010031a200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081073200241106a24000b0a002000103e200110330b0a0041948408410010370b1101017f102c220220002001100c1a20020b0700200010041a0b3101027f4100103a220210052101200041003a00102000200136020c2000200236020820002001360204200041003602000b0d002000102c2200100d1a20000b0d002000102c2200101b1a20000b0e00200041e781084120103d103b0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0f01017f102c22012000101a1a20010b0c01017f102c2200100620000b4c01037f103f2103102c2102200041feffffff074604402003104141c4d2082002100720020f0b20001005210420031041200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011005450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210431a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171037220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b2e01017f104621010340200028020041c0d2082802004e4504402001200041f083084104104710480c010b0b20010b1301017f102c2200419484084100100c1a20000b0c00200020012002104a103a0b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bbf0102027e037f200141a183084106104a1010220242808080801054044002402002a7220641ebde0147410020061b450440200141a183084106104b22034280808080708321022003a72104200141a183084106104b21030c010b027e200128020041c0d2082802004e0440410121051046210442000c010b41012105200141a1830841061047210442000b21020b200020033703102000200636020420002005360200200020022004ad843703080f0b41a18308410641a68008410e1044000b2f01017f2000280200220341c0d2082802004e0440200120024187810841111044000b2000200341016a36020020030b0c00200020012002104a10100b3100200041086a200028020020012002106f044041dd8308410341d88108410f1044000b2000200028020020026a3602000b2a01027f2000106a210110462102037f2001047f200220001030106e200141016b21010c010520020b0b0b2a01027f2000106a210110462102037f2001047f20022000102f1048200141016b21010c010520020b0b0b0c002000102c2200101120000b2101017f4100103a220210054120470440200020014187820841101044000b20020b1400200020014d04400f0b4198810841121000000b1900200041c0d2082802004e04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010054102760b2701017f10362101200028020820011033200029030020011034200028020c20011035200110380b0a0020001015200110150b6001027f20002802002102103621010240200245044041002001105b2000280204200110332000290310200110342000280208200110350c010b41012001105b20002802042001105c200041086a2001105d200041106a200110320b200110380b2601017f230041106b22022400200220003a000f20012002410f6a41011073200241106a24000baf0102017e047f230041106b22032400200010054103762001107420001005210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810651a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b220224002000280200220310572001107420022003100536021c20024100360218200220003602140340200241086a200241146a107520022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b2401017f1036210120002802102001105c200041146a2001105d200020011032200110380b0d0020001061200120021028000b0a0041764200100141760b1b01027f102c2200101741c38108410a10372201200010031a20010b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200110052206200241106a41201029200141002002280208200228020c10651a2000200636022020002002290310370000200041086a2005290300370000200041106a2004290300370000200041186a2003290300370000200241306a24000b0c00200020012002200310430b4b01047f106241948408410010372101200028020021032000280204220420011074200120032004100e1a200041086a2001105d2001101f1a200028020c200028021020002802141060000b5201017f230041106b220324002003410036020c20002003410c6a4104200120021078200328020c2100200341106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b1f0020012002200310022201101d21022000200136020420002002453602000b1600200020011037220020022003100e1a2000100f000b4e01017f230041106b220124002001410036020c20002001410c6a4104104c200128020c2100200141106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b0c00200020002001101820000b0a0020002000200110190b1801017f102c2101417242121001200120004172101c20010b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000b850401077f230041106b2206240002400240027f024020002d000845044020002802002204100522054190ce004b0d0141bcd2082d00000d0141b8d208200536020041bcd20841013a0000200641086a200541a884084190ce001029200441002006280208200628020c10651a20002d0008044041b8d208410036020041bcd20841003a00000b200041013a00080b4101200120036a220041b8d2082802004b0d011a20002001490d0220004190ce004b0d03200141a884086a2100200341104f04402002410020026b41037122046a210520040440200021010340200220012d00003a0000200141016a2101200241016a22022005490d000b0b2005200320046b2203417c7122076a21020240200020046a22044103710440200741004c0d012004410374220141187121082004417c71220941046a2100410020016b411871210a2009280200210103402005200120087620002802002201200a7472360200200041046a2100200541046a22052002490d000b0c010b200741004c0d0020042100034020052000280200360200200041046a2100200541046a22052002490d000b0b20034103712103200420076a21000b20030440200220036a21010340200220002d00003a0000200041016a2100200241016a22022001490d000b0b41000c010b200041003a0008200420012002200310650b200641106a24000f0b102a000b102a000b0d002000102c2200101e1a20000b0b0020002001103e101f1a0b080020001070103b0b0b00200020012002100e1a0b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041073200241106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410651a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b4a01017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c103721012000104636020420002001360200200020023602080b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041065450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111044000b2f00200041086a200028020020012002106f04402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107820012d000f200141106a24000b0a00418e8408410310370bab0102017e027f230041106b22042400200020012002107721002004420037030820001005220541094f04402001200241a68008410e1044000b20004100200420056b41106a200510431a20042903082103200441106a2400200342388620034280fe0383422886842003428080fc0783421886200342808080f80f834208868484200342088842808080f80f832003421888428080fc07838420034228884280fe038320034238888484840b1601017f1020410110534100104f2100107a200010710b0e00102041001053107a107210210b2201037f1020410110534100104f2100107a2201107222022000106c2001200210710bc00101037f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c2000412c6a220241e781084120103d21012002103c21022000280230200028022c46044020002d003c044041b8d208410036020041bcd20841003a00000b200110362201103320022001103520011038200041406b24000f0b41e78108412041a68008410e1069000b9b0202037f017e230041406a2200240010204100105341c88308410a103721012000410c6a103f200110420240024002402000280218102d220110050440200110052102200041003a003c2000200236023820002001360234200020023602302000410036022c410121010240024002402000412c6a107941ff01710e020201000b41e78108412041808008410d1069000b2000412c6a220141e781084120103dad2001103cad422086842103410021010b2000280230200028022c470d0320002d003c044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b410110362201105b2003a7200110332003422088a720011035200110380b200041406b24000f0b41e78108412041a68008410e1069000be20101047f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c02402000412c6a107941ff01714504402000412c6a220141e781084120103d2001103c21032000280230200028022c470d0120002d003c044041b8d208410036020041bcd20841003a00000b410010362201105b2001103320032001103520011038200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b160010204100105341d28308410b10374200104010210b160010204100105341c88308410a10374206104010210b08001020410010530b1501017f102041001053102c22001022200010041a0b130010204100105341c483084104103710041a0b130010204101105341e083084110105010041a0b1000102041001053410a102b106d10210b0c00102041001053420310150b0d0010204100105342f40310150b0e0010204100105342c09a0c10150b10001020410010534280b4c4c32110150b1f01017f10204100105310462200410a1048200041c09a0c1048200010041a0b2101017f10204100105310462200420a106e20004280b4c4c321106e200010041a0b7f01037f230041206b220024001020410010531046220141ba8308410510371048200141bf8308410510371048200020013602101036210220002001100536021c200041003602182000200041106a3602140340200041086a200041146a107520002802080440200028020c200210330c010b0b20021038200041206a24000b9a0101067f230041106b2201240010204100105310462202410a102b106d10482002410a102b106d4102102b106b1048103621032002100521040340200041046a220520044b4504402001410036020c200220002001410c6a410410431a200128020c220041187420004180fe03714108747220004108764180fe03712000411876727220031035200521000c010b0b20031038200141106a24000b1200102041001053420a4280b4c4c32110590b2401027f10204100105341ba83084105103741bf830841051037210110041a200110041a0b2901027f10204100105341ba830841051037410a102b106d210110041a4280b4c4c3211015200110210b11001020410110534100101042018610150b1a01017f1020410110534100104f21004102102b2000106b10210b2001017f1020410110534100103a220041c483084104103710031a200010041a0b1c01017f1020410210534100104f220020004101104f1019200010210b6201037f230041106b220024001020105510542000410036020020001045210220002802001052104621012000200210560340200028020820002802044f4504402001200041f4830841081077102d10031a0c010b0b200110041a200041106a24000b5d02027f017e230041106b2200240010201055105420004100360200200010452101200028020010522000200110560340200028020820002802044f450440200041f483084108107b20027c21020c010b0b20021015200041106a24000b6401037f230041106b220024001020105510542000410036020020001045210220002802001052102c2201420010012000200210560340200028020820002802044f4504402001200041f4830841081077103b106c0c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105341c483084104103721012000410a102b106d36020c20004280b4c4c3213703002000200136020820001058200041106a24000b9c0102047f017e230041106b22002400102041011053230041206b220124002001410c6a220210392002102f210320021030210420021031210202402001280210200128020c46044020012d001c044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1044000b20001058200041106a24000b860101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a105f200041206a24000bd00101067f230041206b22032400102041011053200341086a2101230041406a220024002000411c6a220210392002104d21042002104e2105200041306a2002102e02402000280220200028021c460440200041106a2202200041386a2903003703002000200029033037030820002d002c044041b8d208410036020041bcd20841003a00000b200120002903083703002001200536021420012004360210200141086a2002290300370300200041406b24000c010b41dd8308410341a68008410e1044000b2001105f200341206a24000b0c00102041001053420110150b5f02017f017e102041011053027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1044000b41dd8308410341808008410d1044000bad42ff018310150b5001037f230041206b2200240010204100105341c48308410410372101410a102b106d210220004280b4c4c3213703102000200136020420002002360208200041003602002000105a200041206a24000b8a0101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200436021c2000200336021820004280b4c4c3213703102000200236020820002001360204200041013602002000105a200041206a24000b940202057f027e230041206b22012400102041011053230041306b220024002000410c6a22021039200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1044000b2000410c6a2202102f21042002103021062002103121020c010b2000410c6a2203104d21042003104e2102200041206a2003102e2000290328210520002903202106410121030b02402000280210200028020c46044020002d001c044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1044000b2001105a200141206a24000b0c001020410010534101105e0b7d02037f017e230041106b220024001020105510542000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd83084103104a1010220342015804402003a741016b0d020c010b41dd8308410341fc830841121044000b410121010b20010541020b200028020c1052105e200041106a24000bab0102037f047e230041306b220024001020105510542000410036020c200041106a21012000410c6a220228020041c0d2082802004e047e420105200241dd83084103104b2103200241dd83084103104b2104200241dd83084103104b210542000b210620012005370318200120043703102001200337030820012006370300200028020c105220002903105004402000290328200029032020002903181015101510150b200041306a24000b1601017f1020410110534100102c22001012200010230b900102037f017e230041206b22002400102041011053200041a7830841071050360210200041046a200041106a1076102421032000280208210120002802042102200342a08d067d2003200342a08d06561b200028020c106120022001102c220110251a1026200041146a220220011056200241cd8108410b107b200041146a41cd8108410b107b1059200041206a24000b5701017f230041206b22002400102041011053200041a783084107105036021c200041106a2000411c6a10762000200028021836020c20002000290210370204200041046a2200280208200028020020002802041060000b0b0041e88208411c10ad010b0b0041848308411d10ad010bda0302057f027e230041f0006b2200240002400240024010622204107022011005450d002001102d220310052101200041003a00402000200136023c200020033602382000200136023420004100360230200041306a220141b480084119103d2102200141b48008411910672101104621030340200104402003200041306a41b480084119103d1048200141016b21010c010b0b20002802342000280230470d0120002d0040044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c101f1a2000410c6a20021064200028022c450d00200041306a200210642000280250450d000240200041306a41e88208411c1063450440200041306a41848308411d10630d014197820841361000000b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d03200510590c010b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d02200510590b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b7601067f230041206b22022400102041011053200241a783084107105036021c200241046a22032002411c6a1076200228020c21042002280204210520022802082106104621072002200636021820022005360214200220043602102002200736020c200220013602082002200036020420031066000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@05".to_string(), }; assert_eq!(tx, Ok(expected)); @@ -72,7 +72,7 @@ async fn test_deploy_with_metadatas() -> Result<(), NovaXError> { receiver: SYSTEM_SC_DEPLOY_ADDRESS.to_string(), egld_value: 0u8.into(), gas_limit: 600000000u64, - data: "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0500@07".to_string(), + data: "0061736d01000000018e011760000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f017f60047f7f7f7f0060027f7e0060017f017e60017e0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060057f7f7f7f7f0002ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d4275666665724765744c656e677468000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7617626967496e744765745369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000803656e76126d42756666657253746f726167654c6f6164000403656e76136d42756666657253746f7261676553746f7265000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001103656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001203656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000803656e76106d616e616765644173796e6343616c6c00090387018501090002050201020b02010113010504030302020206020514030708090205060101060d070202020401030300000102031503010101030307050506010803060909020401020a0802010207010101061602050d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07f40a38066d656d6f7279020004696e6974007c0667657453756d007d03616464007e1372657475726e4e667450726f70657274696573007f1772657475726e4e6674456e756d50726f706572746965730080011d72657475726e4e6674456e756d4669656c647350726f706572746965730081011572657475726e46756e6769626c6542616c616e63650082011872657475726e4e6f6e46756e6769626c6542616c616e6365008301156e6f4172674e6f52657475726e456e64706f696e740084010c72657475726e43616c6c65720085011372657475726e4d616e616765644275666665720086011572657475726e436f6e7472616374416464726573730087010d72657475726e42696775696e740088010872657475726e55380089010972657475726e553136008a010972657475726e553332008b010972657475726e553634008c010c72657475726e553332566563008d010c72657475726e553634566563008e010f72657475726e427566666572566563008f011072657475726e42696775696e745665630090010c72657475726e54776f5536340091011072657475726e54776f427566666572730092012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740093011472657475726e446f75626c654f665536344172670094011872657475726e446f75626c654f6642696775696e744172670095011772657475726e417070656e6465644275666665724172670096011772657475726e53756d54776f42696775696e74417267730097011b72657475726e436f6e6361744d756c7469427566666572417267730098011572657475726e53756d4d756c7469553634417267730099011972657475726e53756d4d756c746942696775696e7441726773009a011272657475726e437573746f6d537472756374009b011572657475726e437573746f6d537472756374417267009c012272657475726e437573746f6d53747275637457697468537472756374416e64566563009d012572657475726e437573746f6d53747275637457697468537472756374416e64566563417267009e011072657475726e437573746f6d456e756d009f011372657475726e437573746f6d456e756d41726700a0011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a1012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a2011d72657475726e437573746f6d456e756d576974684669656c647341726700a3011772657475726e4f7074696f6e616c56616c7565426f6f6c00a4011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700a5011372657475726e4d756c746956616c756554776f00a6010f72657475726e426967496e7441726700a7011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400a8012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00a901396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00aa013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ab010863616c6c4261636b00ac0107757067726164650084011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a1012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a2011d72657475726e437573746f6d456e756d5769746856616c75657341726700a3010a5f5f646174615f656e6403010b5f5f686561705f6261736503020adb4385011b00200120034b0440102a000b20002001360204200020023602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1044000b200128020c2000200220036a360200200141106a24000b820102017e017f230041106b22022400200242003703082000200241086a4108104c20022903082101200241106a2400200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484840b08002000102f103b0b1d00200028020820011033200029030020011034200028020c200110350b5001027f230041106b22022400200220001005220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410732001200010031a200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081073200241106a24000b0a002000103e200110330b0a0041948408410010370b1101017f102c220220002001100c1a20020b0700200010041a0b3101027f4100103a220210052101200041003a00102000200136020c2000200236020820002001360204200041003602000b0d002000102c2200100d1a20000b0d002000102c2200101b1a20000b0e00200041e781084120103d103b0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0f01017f102c22012000101a1a20010b0c01017f102c2200100620000b4c01037f103f2103102c2102200041feffffff074604402003104141c4d2082002100720020f0b20001005210420031041200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011005450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210431a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171037220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b2e01017f104621010340200028020041c0d2082802004e4504402001200041f083084104104710480c010b0b20010b1301017f102c2200419484084100100c1a20000b0c00200020012002104a103a0b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bbf0102027e037f200141a183084106104a1010220242808080801054044002402002a7220641ebde0147410020061b450440200141a183084106104b22034280808080708321022003a72104200141a183084106104b21030c010b027e200128020041c0d2082802004e0440410121051046210442000c010b41012105200141a1830841061047210442000b21020b200020033703102000200636020420002005360200200020022004ad843703080f0b41a18308410641a68008410e1044000b2f01017f2000280200220341c0d2082802004e0440200120024187810841111044000b2000200341016a36020020030b0c00200020012002104a10100b3100200041086a200028020020012002106f044041dd8308410341d88108410f1044000b2000200028020020026a3602000b2a01027f2000106a210110462102037f2001047f200220001030106e200141016b21010c010520020b0b0b2a01027f2000106a210110462102037f2001047f20022000102f1048200141016b21010c010520020b0b0b0c002000102c2200101120000b2101017f4100103a220210054120470440200020014187820841101044000b20020b1400200020014d04400f0b4198810841121000000b1900200041c0d2082802004e04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010054102760b2701017f10362101200028020820011033200029030020011034200028020c20011035200110380b0a0020001015200110150b6001027f20002802002102103621010240200245044041002001105b2000280204200110332000290310200110342000280208200110350c010b41012001105b20002802042001105c200041086a2001105d200041106a200110320b200110380b2601017f230041106b22022400200220003a000f20012002410f6a41011073200241106a24000baf0102017e047f230041106b22032400200010054103762001107420001005210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810651a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b220224002000280200220310572001107420022003100536021c20024100360218200220003602140340200241086a200241146a107520022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b2401017f1036210120002802102001105c200041146a2001105d200020011032200110380b0d0020001061200120021028000b0a0041764200100141760b1b01027f102c2200101741c38108410a10372201200010031a20010b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200110052206200241106a41201029200141002002280208200228020c10651a2000200636022020002002290310370000200041086a2005290300370000200041106a2004290300370000200041186a2003290300370000200241306a24000b0c00200020012002200310430b4b01047f106241948408410010372101200028020021032000280204220420011074200120032004100e1a200041086a2001105d2001101f1a200028020c200028021020002802141060000b5201017f230041106b220324002003410036020c20002003410c6a4104200120021078200328020c2100200341106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b1f0020012002200310022201101d21022000200136020420002002453602000b1600200020011037220020022003100e1a2000100f000b4e01017f230041106b220124002001410036020c20002001410c6a4104104c200128020c2100200141106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b0c00200020002001101820000b0a0020002000200110190b1801017f102c2101417242121001200120004172101c20010b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000b850401077f230041106b2206240002400240027f024020002d000845044020002802002204100522054190ce004b0d0141bcd2082d00000d0141b8d208200536020041bcd20841013a0000200641086a200541a884084190ce001029200441002006280208200628020c10651a20002d0008044041b8d208410036020041bcd20841003a00000b200041013a00080b4101200120036a220041b8d2082802004b0d011a20002001490d0220004190ce004b0d03200141a884086a2100200341104f04402002410020026b41037122046a210520040440200021010340200220012d00003a0000200141016a2101200241016a22022005490d000b0b2005200320046b2203417c7122076a21020240200020046a22044103710440200741004c0d012004410374220141187121082004417c71220941046a2100410020016b411871210a2009280200210103402005200120087620002802002201200a7472360200200041046a2100200541046a22052002490d000b0c010b200741004c0d0020042100034020052000280200360200200041046a2100200541046a22052002490d000b0b20034103712103200420076a21000b20030440200220036a21010340200220002d00003a0000200041016a2100200241016a22022001490d000b0b41000c010b200041003a0008200420012002200310650b200641106a24000f0b102a000b102a000b0d002000102c2200101e1a20000b0b0020002001103e101f1a0b080020001070103b0b0b00200020012002100e1a0b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041073200241106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410651a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b4a01017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c103721012000104636020420002001360200200020023602080b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041065450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111044000b2f00200041086a200028020020012002106f04402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107820012d000f200141106a24000b0a00418e8408410310370bab0102017e027f230041106b22042400200020012002107721002004420037030820001005220541094f04402001200241a68008410e1044000b20004100200420056b41106a200510431a20042903082103200441106a2400200342388620034280fe0383422886842003428080fc0783421886200342808080f80f834208868484200342088842808080f80f832003421888428080fc07838420034228884280fe038320034238888484840b1601017f1020410110534100104f2100107a200010710b0e00102041001053107a107210210b2201037f1020410110534100104f2100107a2201107222022000106c2001200210710bc00101037f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c2000412c6a220241e781084120103d21012002103c21022000280230200028022c46044020002d003c044041b8d208410036020041bcd20841003a00000b200110362201103320022001103520011038200041406b24000f0b41e78108412041a68008410e1069000b9b0202037f017e230041406a2200240010204100105341c88308410a103721012000410c6a103f200110420240024002402000280218102d220110050440200110052102200041003a003c2000200236023820002001360234200020023602302000410036022c410121010240024002402000412c6a107941ff01710e020201000b41e78108412041808008410d1069000b2000412c6a220141e781084120103dad2001103cad422086842103410021010b2000280230200028022c470d0320002d003c044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b410110362201105b2003a7200110332003422088a720011035200110380b200041406b24000f0b41e78108412041a68008410e1069000be20101047f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c02402000412c6a107941ff01714504402000412c6a220141e781084120103d2001103c21032000280230200028022c470d0120002d003c044041b8d208410036020041bcd20841003a00000b410010362201105b2001103320032001103520011038200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b160010204100105341d28308410b10374200104010210b160010204100105341c88308410a10374206104010210b08001020410010530b1501017f102041001053102c22001022200010041a0b130010204100105341c483084104103710041a0b130010204101105341e083084110105010041a0b1000102041001053410a102b106d10210b0c00102041001053420310150b0d0010204100105342f40310150b0e0010204100105342c09a0c10150b10001020410010534280b4c4c32110150b1f01017f10204100105310462200410a1048200041c09a0c1048200010041a0b2101017f10204100105310462200420a106e20004280b4c4c321106e200010041a0b7f01037f230041206b220024001020410010531046220141ba8308410510371048200141bf8308410510371048200020013602101036210220002001100536021c200041003602182000200041106a3602140340200041086a200041146a107520002802080440200028020c200210330c010b0b20021038200041206a24000b9a0101067f230041106b2201240010204100105310462202410a102b106d10482002410a102b106d4102102b106b1048103621032002100521040340200041046a220520044b4504402001410036020c200220002001410c6a410410431a200128020c220041187420004180fe03714108747220004108764180fe03712000411876727220031035200521000c010b0b20031038200141106a24000b1200102041001053420a4280b4c4c32110590b2401027f10204100105341ba83084105103741bf830841051037210110041a200110041a0b2901027f10204100105341ba830841051037410a102b106d210110041a4280b4c4c3211015200110210b11001020410110534100101042018610150b1a01017f1020410110534100104f21004102102b2000106b10210b2001017f1020410110534100103a220041c483084104103710031a200010041a0b1c01017f1020410210534100104f220020004101104f1019200010210b6201037f230041106b220024001020105510542000410036020020001045210220002802001052104621012000200210560340200028020820002802044f4504402001200041f4830841081077102d10031a0c010b0b200110041a200041106a24000b5d02027f017e230041106b2200240010201055105420004100360200200010452101200028020010522000200110560340200028020820002802044f450440200041f483084108107b20027c21020c010b0b20021015200041106a24000b6401037f230041106b220024001020105510542000410036020020001045210220002802001052102c2201420010012000200210560340200028020820002802044f4504402001200041f4830841081077103b106c0c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105341c483084104103721012000410a102b106d36020c20004280b4c4c3213703002000200136020820001058200041106a24000b9c0102047f017e230041106b22002400102041011053230041206b220124002001410c6a220210392002102f210320021030210420021031210202402001280210200128020c46044020012d001c044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1044000b20001058200041106a24000b860101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a105f200041206a24000bd00101067f230041206b22032400102041011053200341086a2101230041406a220024002000411c6a220210392002104d21042002104e2105200041306a2002102e02402000280220200028021c460440200041106a2202200041386a2903003703002000200029033037030820002d002c044041b8d208410036020041bcd20841003a00000b200120002903083703002001200536021420012004360210200141086a2002290300370300200041406b24000c010b41dd8308410341a68008410e1044000b2001105f200341206a24000b0c00102041001053420110150b5f02017f017e102041011053027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1044000b41dd8308410341808008410d1044000bad42ff018310150b5001037f230041206b2200240010204100105341c48308410410372101410a102b106d210220004280b4c4c3213703102000200136020420002002360208200041003602002000105a200041206a24000b8a0101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200436021c2000200336021820004280b4c4c3213703102000200236020820002001360204200041013602002000105a200041206a24000b940202057f027e230041206b22012400102041011053230041306b220024002000410c6a22021039200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1044000b2000410c6a2202102f21042002103021062002103121020c010b2000410c6a2203104d21042003104e2102200041206a2003102e2000290328210520002903202106410121030b02402000280210200028020c46044020002d001c044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1044000b2001105a200141206a24000b0c001020410010534101105e0b7d02037f017e230041106b220024001020105510542000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd83084103104a1010220342015804402003a741016b0d020c010b41dd8308410341fc830841121044000b410121010b20010541020b200028020c1052105e200041106a24000bab0102037f047e230041306b220024001020105510542000410036020c200041106a21012000410c6a220228020041c0d2082802004e047e420105200241dd83084103104b2103200241dd83084103104b2104200241dd83084103104b210542000b210620012005370318200120043703102001200337030820012006370300200028020c105220002903105004402000290328200029032020002903181015101510150b200041306a24000b1601017f1020410110534100102c22001012200010230b900102037f017e230041206b22002400102041011053200041a7830841071050360210200041046a200041106a1076102421032000280208210120002802042102200342a08d067d2003200342a08d06561b200028020c106120022001102c220110251a1026200041146a220220011056200241cd8108410b107b200041146a41cd8108410b107b1059200041206a24000b5701017f230041206b22002400102041011053200041a783084107105036021c200041106a2000411c6a10762000200028021836020c20002000290210370204200041046a2200280208200028020020002802041060000b0b0041e88208411c10ad010b0b0041848308411d10ad010bda0302057f027e230041f0006b2200240002400240024010622204107022011005450d002001102d220310052101200041003a00402000200136023c200020033602382000200136023420004100360230200041306a220141b480084119103d2102200141b48008411910672101104621030340200104402003200041306a41b480084119103d1048200141016b21010c010b0b20002802342000280230470d0120002d0040044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c101f1a2000410c6a20021064200028022c450d00200041306a200210642000280250450d000240200041306a41e88208411c1063450440200041306a41848308411d10630d014197820841361000000b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d03200510590c010b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d02200510590b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b7601067f230041206b22022400102041011053200241a783084107105036021c200241046a22032002411c6a1076200228020c21042002280204210520022802082106104621072002200636021820022005360214200220043602102002200736020c200220013602082002200036020420031066000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0500@07".to_string(), }; assert_eq!(tx, Ok(expected)); diff --git a/tester/core/tests/mock_call.rs b/tester/core/tests/mock_call.rs index 0cafcb6..283d8df 100644 --- a/tester/core/tests/mock_call.rs +++ b/tester/core/tests/mock_call.rs @@ -5,7 +5,6 @@ use novax::Address; use novax::errors::NovaXError; use novax_mocking::world::infos::ScenarioWorldInfos; use num_bigint::{BigInt, BigUint}; -use novax::executor::call_result::CallResult; use novax::tester::tester::{CustomEnum, CustomEnumWithFields, CustomEnumWithValues, CustomStruct, CustomStructWithStructAndVec, TesterContract}; use novax::executor::{ExecutorError, MockTransactionError, StandardMockExecutor}; use novax_mocking::ScenarioWorld; diff --git a/tester/core/tests/network_call.rs b/tester/core/tests/network_call.rs index 6129420..4068881 100644 --- a/tester/core/tests/network_call.rs +++ b/tester/core/tests/network_call.rs @@ -5,9 +5,8 @@ use num_bigint::{BigInt, BigUint}; use tokio::sync::Mutex; use novax::Address; -use novax::data::NativeConvertible; use novax::errors::NovaXError; -use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, ExecutorError, NetworkExecutor, SendableTransactionConvertible, TokenTransfer, TopDecodeMulti, TransactionExecutor, TransactionOnNetwork, TransactionOnNetworkTransaction, TransactionOnNetworkTransactionLogs, TransactionOnNetworkTransactionSmartContractResult, Wallet}; +use novax::executor::{BaseTransactionNetworkExecutor, BlockchainInteractor, ExecutorError, NetworkExecutor, TokenTransfer, TransactionOnNetwork, TransactionOnNetworkTransaction, TransactionOnNetworkTransactionLogs, TransactionOnNetworkTransactionSmartContractResult, Wallet}; use novax::tester::tester::{CustomEnum, CustomEnumWithFields, CustomEnumWithValues, CustomStruct, CustomStructWithStructAndVec, TesterContract}; mod utils; @@ -32,10 +31,10 @@ impl BlockchainInteractor for MockInteractor { async fn sc_call( &mut self, - to: String, - value: BigUint, + _to: String, + _value: BigUint, data: String, - gas_limit: u64 + _gas_limit: u64 ) -> Result { let mut return_data: Option = None; diff --git a/tester/core/tests/network_deploy.rs b/tester/core/tests/network_deploy.rs index f162d88..6b7171b 100644 --- a/tester/core/tests/network_deploy.rs +++ b/tester/core/tests/network_deploy.rs @@ -1,48 +1,42 @@ use async_trait::async_trait; use num_bigint::BigUint; -use novax::code::DeployData; + use novax::{Address, CodeMetadata}; +use novax::code::DeployData; use novax::errors::NovaXError; -use novax::tester::tester::TesterContract; -use novax::testerwithreturningdeploy::testerwithreturningdeploy::TesterWithReturningDeployContract; use novax::executor::{BlockchainInteractor, ExecutorError, TransactionOnNetwork, TransactionOnNetworkTransaction, TransactionOnNetworkTransactionLogs, TransactionOnNetworkTransactionLogsEvents, TransactionOnNetworkTransactionSmartContractResult, Wallet}; use novax::executor::BaseTransactionNetworkExecutor; use novax::executor::call_result::CallResult; -use novax_mocking::{ScCallStep, ScDeployStep, TxResponse}; -use crate::utils::decode_scr_data::decode_scr_data_or_panic; +use novax::tester::tester::TesterContract; +use novax::testerwithreturningdeploy::testerwithreturningdeploy::TesterWithReturningDeployContract; mod utils; const CALLER_PRIVATE_KEY: &str = "69417ce717e43d0d3a598f68b5e562d7d2a532a5a3ac1e8b3342515e0b2d950f"; // to anyone reading : this has been generated only for the tests below const CALLER: &str = "erd12wf7tlsk2z895vwmndheaknkp3uaqa7xuq847numkwlmcvy60wxql2ndlk"; const NEW_CONTRACT: &str = "erd1qqqqqqqqqqqqqpgq74myhunu4sfdpmskm6s6ul8k4cetjvhhlfpsaa20la"; -const RETURNING_MOCK_URL: &str = "returning"; struct MockInteractor { - wallet: Wallet, - is_deploy_returning: bool + wallet: Wallet } #[async_trait] impl BlockchainInteractor for MockInteractor { async fn new(_gateway_url: String, wallet: Wallet) -> Result { - let is_deploy_returning = _gateway_url == RETURNING_MOCK_URL; - Ok( MockInteractor { wallet, - is_deploy_returning, } ) } - async fn sc_call(&mut self, to: String, value: BigUint, data: String, gas_limit: u64) -> Result { + async fn sc_call(&mut self, _to: String, value: BigUint, data: String, _gas_limit: u64) -> Result { let mut return_data: Option = None; - let deploy_with_biguint_arg_metadata_nothing_data = "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@05"; - let deploy_with_biguint_arg_biguint_return_metadata_nothing_data = "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@0a"; - let deploy_with_biguint_arg_metadata_upgradeable_readable_data = "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0500@07"; - let deploy_with_biguint_arg_metadata_nothing_data_egld_value = "0061736d010000000194011860000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f0060047f7f7f7f017f60027f7e0060017f017e60017e0060057f7f7f7f7f0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060027f7f017e02ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e76106d4275666665724765744c656e677468000203656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000f03656e7609626967496e744e6577001003656e76176d616e6167656447657445534454546f6b656e44617461001103656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7617626967496e744765745369676e6564417267756d656e74000103656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76136d42756666657253746f7261676553746f7265000403656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000903656e76126d42756666657253746f726167654c6f6164000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001203656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001303656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000903656e76106d616e616765644173796e6343616c6c00080391018f010d0002050201020b02010114010303010403020102060202051503070908040e060105060201020207020403010300000102160301010103030303050107060108090208060801040102050a0901070803020201070101060d0217050e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07ed0a37066d656d6f7279020004696e69740086010667657453756d008701036164640088011372657475726e4e667450726f706572746965730089011772657475726e4e6674456e756d50726f70657274696573008a011d72657475726e4e6674456e756d4669656c647350726f70657274696573008b011572657475726e46756e6769626c6542616c616e6365008c011872657475726e4e6f6e46756e6769626c6542616c616e6365008d01156e6f4172674e6f52657475726e456e64706f696e74008e010c72657475726e43616c6c6572008f011372657475726e4d616e616765644275666665720090011572657475726e436f6e7472616374416464726573730091010d72657475726e42696775696e740092010872657475726e55380093010972657475726e5531360094010972657475726e5533320095010972657475726e5536340096010c72657475726e5533325665630097010c72657475726e5536345665630098010f72657475726e4275666665725665630099011072657475726e42696775696e74566563009a010c72657475726e54776f553634009b011072657475726e54776f42756666657273009c012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e74009d011472657475726e446f75626c654f66553634417267009e011872657475726e446f75626c654f6642696775696e74417267009f011772657475726e417070656e64656442756666657241726700a0011772657475726e53756d54776f42696775696e744172677300a1011b72657475726e436f6e6361744d756c74694275666665724172677300a2011572657475726e53756d4d756c74695536344172677300a3011972657475726e53756d4d756c746942696775696e744172677300a4011272657475726e437573746f6d53747275637400a5011572657475726e437573746f6d53747275637441726700a6012272657475726e437573746f6d53747275637457697468537472756374416e6456656300a7012572657475726e437573746f6d53747275637457697468537472756374416e6456656341726700a8011072657475726e437573746f6d456e756d00a9011372657475726e437573746f6d456e756d41726700aa011f72657475726e4669727374437573746f6d456e756d576974684669656c647300ab012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300ac011d72657475726e437573746f6d456e756d576974684669656c647341726700ad011772657475726e4f7074696f6e616c56616c7565426f6f6c00ae011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700af011372657475726e4d756c746956616c756554776f00b0010f72657475726e426967496e7441726700b1011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400b2012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00b301396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00b4013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00b5010863616c6c4261636b00b6011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300ab012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300ac011d72657475726e437573746f6d456e756d5769746856616c75657341726700ad010a5f5f646174615f656e6403010b5f5f686561705f6261736503020acf4a8f012e000240200120024d0440200220044d0d01102a000b102a000b2000200220016b3602042000200120036a3602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106b2102200141086a2000280208200028020022032002106c2001280208410147044041dd8308410341d88108410f1046000b200128020c2000200220036a360200200141106a24000b3102017f017e230041106b22012400200142003703082000200141086a22004108105120004108108301200141106a24000b08002000102f103f0b1d00200028020820011033200029030020011034200028020c200110350baf0101037f230041106b22022400200220001007220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410660240024020012d000404402000100722044190ce0041b8d20828020022036b4b0d0120022003200320046a2201107d2000410020022802002002280204106a1a41b8d20820013602000c020b20012802002000106f0c010b2001107920012802002000106f0b200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081066200241106a24000b0a0020001040200110330b3601027f230041106b22012400200141086a103720012802082102200020012d000c4101713a000420002002360200200141106a24000b6c01027f230041106b220124002000027f41bcd2082d0000220245044041bcd20841013a000041b8d2084100360200200141086a410010762001280208200128020c4194840841001078104b0c010b41948408410010470b360200200020024101733a0004200141106a24000b0b0020002001103910041a0b4801017f230041106b22022400200220013a000c20022000360208200241086a1079200228020820022d000c044041b8d208410036020041bcd20841003a00000b200241106a24000b0a0020004100103b103c0b0d002000102c2200100d1a20000b3301017f200110072102200041106a41003a00002000410c6a20023602002000200136020820002002360204200041003602000b0e00200041e781084120103e103f0b5a01037f230041106b22032400200020012002106d2104200341086a2000280208200028020022052004106c200328020841014704402001200241d88108410f106e000b200328020c2000200420056a360200200341106a24000b0d002000102c2200101c1a20000b0f01017f102c22012000101b1a20010b0c01017f102c2200100520000b4c01037f10412103102c2102200041feffffff074604402003104341c4d2082002100620020f0b20001007210420031043200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011007450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210451a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171047220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b1101017f102c220220002001100c1a20020b0c00200020012002104910100b2f01017f2000280200220341c0d2082802004e0440200120024187810841111046000b2000200341016a36020020030bb80102027e027f027f0240200141a1830841061049101022024280808080105404402002a7220545200541ebde0146720d01027f200128020041c0d2082802004e0440104b210441010c010b200141a183084106104c210441010b0c020b41a18308410641a68008410e1046000b200141a183084106104822024280808080708321032002a72104200141a1830841061048210241000b2101200020023703102000200536020420002001360200200020032004ad843703080b1301017f102c2200419484084100100c1a20000b0c002000200120021049103b0b2e01017f104b21010340200028020041c0d2082802004e4504402001200041f083084104104c104e0c010b0b20010b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000b2a01027f2000106b2101104b2102037f2001047f2002200010301074200141016b21010c010520020b0b0b2a01027f2000106b2101104b2102037f2001047f20022000102f104e200141016b21010c010520020b0b0b3100200041086a2000280200200120021075044041dd8308410341d88108410f1046000b2000200028020020026a3602000b0c002000102c2200101220000b2101017f4100103b220210074120470440200020014187820841101046000b20020b1900200041c0d2082802004e04400f0b4198810841121000000b1400200020014d04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105a21022000410036020820002002360204200020013602000b0900200010074102760b0a0020001015200110150bb00101027f230041206b2201240002402000280200450440200141086a1036200120012d000c3a001c200120012802083602184100200141186a2202105d2000280204200210332000290310200210342000280208200210350c010b200141106a1036200120012d00143a001c200120012802103602184101200141186a2202105d20002802042002105e200041086a2002105f200041106a200210320b200128021820012d001c1038200141206a24000b2601017f230041106b22022400200220003a000f20012002410f6a41011066200241106a24000baf0102017e047f230041106b22032400200010074103762001106520001007210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a4108106a1a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b2202240020002802002203105a2001106520022003100736021820024100360214200220003602100340200241086a200241106a107e20022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b5801027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280208200141086a22021033200029030020021034200028020c20021035200128020820012d000c1038200141106a24000b5501027f230041106b2201240020011036200120012d00043a000c200120012802003602082000280210200141086a2202105e200041146a2002105f200020021032200128020820012d000c1038200141106a24000b7e01057f230041106b2201240020002802102203044010642001103720012001280200360208200120012d00044101713a000c200041146a2802002205200141086a220210652002200320051066200041186a2002105f200128020820012d000c103910171a0b200028020020002802042000280208200028020c1028000b1b01027f102c2200101841c38108410a10472201200010031a20010b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041066200241106a24000b7e01027f230041106b220324000240024020002d000404404190ce0041b8d20828020022046b2002490d01200341086a2004200220046a2200107d2003280208200328020c20012002107841b8d20820003602000c020b200028020020012002100e1a0c010b20001079200028020020012002100e1a0b200341106a24000b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200241106a41202001100722061069200141002002280208200228020c106a1a20002006360220200041186a2003290300370000200041106a2004290300370000200041086a200529030037000020002002290310370000200241306a24000b3b01017f230041106b22042400200441086a41002003200120021029200428020c21012000200428020836020020002001360204200441106a24000b0c00200020012002200310450b3202017f017e230041106b220124002001410036020c20002001410c6a22004104105120004104108301200141106a2400a70b1f0020012002200310022201101e21022000200136020420002002453602000b3702017f017e230041106b220324002003410036020c20002003410c6a220041042001200210810120004104108301200341106a2400a70b1600200020011047220020022003100e1a2000100f000b09002000200110031a0b0c00200020002001101920000b0a00200020002001101a0b1801017f102c2101417242121001200120004172101d20010b0e01017f102c22004200100120000b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000bb20101037f230041106b22042400027f024020002d000845044020002802002205100722064190ce004b0d0141bcd2082d00000d0141b8d208200636020041bcd20841013a0000200441086a20061076200541002004280208200428020c106a1a200041013a00080b4101200120036a220041b8d2082802004b0d011a20042001200010772002200320042802002004280204107841000c010b200041003a00082005200120022003106a0b200441106a24000b3d01017f230041106b22022400200241086a41a884084190ce0020011069200228020c21012000200228020836020020002001360204200241106a24000b32000240200120024d044020024190ce004d0d01102a000b102a000b2000200220016b3602042000200141a884086a3602000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b102a000b5701027f230041106b2201240020002d0004200041003a00040440200141086a410041b8d208280200107720002802002001280208200128020c100e1a41b8d208410036020041bcd20841003a00000b200141106a24000b0d002000102c2200101f1a20000b08002000107a103f0b0b0020002001104010171a0b3f01017f230041106b22032400200341086a2001200241a884084190ce001029200328020c21012000200328020836020020002001360204200341106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a4104106a1a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b5101017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c104721012000104b3602102000200136020c200020023602082000427f3703000b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a4104106a450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111046000b2f00200041086a200028020020012002107504402003200441d88108410f106e000b2000200028020020026a3602000b3201017f230041106b22012400200141003a000f20002001410f6a410141e78108412010810120012d000f200141106a24000b3401017e02402001450d0003402001450d01200141016b210120003100002002420886842102200041016a21000c000b000b20020b0a00418e8408410310470b6a02027f017e230041106b2203240020002001200210800121002003420037030820001007220441094f04402001200241a68008410e1046000b2003200341086a41082004106920004100200328020022002003280204220110451a20002001108301200341106a24000b1701017f1020410110564100105221001084012000107c0b0f00102041001056108401107b10210b2301037f1020410110564100105221001084012201107b22022000107120012002107c0bc10101037f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22022000280214102d103c200241e781084120103e21012002103d2102200028022c2000280228460440200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602082001200041086a22011033200220011035200028020820002d000c1038200041406b24000f0b41e78108412041a68008410e106e000ba10202037f017e230041406a2200240010204100105641c88308410a10472101200041086a1041200110440240024002402000280214102d220110070440200041286a22022001103c41012101024002400240200210820141ff01710e020201000b41e78108412041808008410d106e000b200041286a220141e781084120103ead2001103dad422086842103410021010b200028022c2000280228470d03200041386a2d0000044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b20001036200020002d00043a000c200020002802003602084101200041086a2201105d2003a7200110332003422088a720011035200028020820002d000c10380b200041406b24000f0b41e78108412041a68008410e106e000be60101047f230041406a2200240010204100105641c88308410a10472101200041086a104120011044200041286a22012000280214102d103c0240200110820141ff0171450440200041286a220241e781084120103e2002103d2103200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b20001036200020002d00043a000c200020002802003602084100200041086a2202105d20021033200320021035200028020820002d000c1038200041406b24000f0b41e78108412041808008410d106e000b41e78108412041a68008410e106e000b160010204100105641d28308410b10474200104210210b160010204100105641c88308410a10474206104210210b08001020410010560b1501017f102041001056102c22001022200010041a0b130010204100105641c483084104104710041a0b130010204101105641e083084110105310041a0b1000102041001056410a102b107210210b0c00102041001056420310150b0d0010204100105642f40310150b0e0010204100105642c09a0c10150b10001020410010564280b4c4c32110150b1f01017f102041001056104b2200410a104e200041c09a0c104e200010041a0b2101017f102041001056104b2200420a107420004280b4c4c3211074200010041a0b9e0101027f230041306b22002400102041001056104b220141ba830841051047104e200141bf830841051047104e20002001360214200041086a1036200020002d000c3a001c20002000280208360218200020011007360228200041003602242000200041146a36022003402000200041206a107e200028020004402000280204200041186a10330c010b0b200028021820002d001c1038200041306a24000bbc0101057f230041206b22002400102041001056104b2202410a102b1072104e2002410a102b10724102102b1070104e200041086a1036200020002d000c3a0014200020002802083602102002100721030340200141046a220420034b4504402000410036021c200220012000411c6a410410451a200028021c220141187420014180fe03714108747220014108764180fe037120014118767272200041106a1035200421010c010b0b200028021020002d00141038200041206a24000b1200102041001056420a4280b4c4c321105b0b2401027f10204100105641ba83084105104741bf830841051047210110041a200110041a0b2901027f10204100105641ba830841051047410a102b1072210110041a4280b4c4c3211015200110210b11001020410110564100101042018610150b1a01017f1020410110564100105221004102102b2000107010210b2001017f1020410110564100103b220041c483084104104710031a200010041a0b1c01017f102041021056410010522200200041011052101a200010210b6301037f230041106b22002400102010581057200041003602002000104d210220002802001054104b21012000200210590340200028020820002802044f4504402001200041f483084108108001102d10031a0c010b0b200110041a200041106a24000b5e02027f017e230041106b22002400102010581057200041003602002000104d2101200028020010542000200110590340200028020820002802044f450440200041f48308410810850120027c21020c010b0b20021015200041106a24000b6101037f230041106b22002400102010581057200041003602002000104d210220002802001054107321012000200210590340200028020820002802044f4504402001200041f483084108108001103f10710c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105641c483084104104721012000410a102b107236020c20004280b4c4c3213703002000200136020820001061200041106a24000b9f0102047f017e230041106b22002400102041011056230041206b22012400200141086a2202103a2002102f21032002103021042002103121020240200128020c2001280208460440200141186a2d0000044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1046000b20001061200041106a24000b860101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a1062200041206a24000bba0101067f230041206b22032400102041011056200341086a2101230041306b22002400200041086a2202103a2002104f2104200210502105200041206a2002102e0240200028020c200028020846044020012000290320370300200141086a200041286a290300370300200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200536021420012004360210200041306a24000c010b41dd8308410341a68008410e1046000b20011062200341206a24000b0c00102041001056420110150b5f02017f017e102041011056027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1046000b41dd8308410341808008410d1046000bad42ff018310150b5001037f230041206b2200240010204100105641c48308410410472101410a102b1072210220004280b4c4c3213703102000200136020420002002360208200041003602002000105c200041206a24000b900101057f230041206b2200240010204100105641c48308410410472103410a102b10722104104b2201420a107420014280b4c4c3211074104b220241ba830841051047104e200241bf830841051047104e2000411c6a2004360200200041186a200336020020004280b4c4c3213703102000200236020820002001360204200041013602002000105c200041206a24000b970202057f027e230041206b22012400102041011056230041306b22002400200041086a2202103a200041003a00202002200041206a41011051024002400240024020002d00200e020102000b41dd8308410341808008410d1046000b200041086a2202102f21042002103021062002103121020c010b200041086a2203104f2104200310502102200041206a2003102e2000290328210520002903202106410121030b0240200028020c2000280208460440200041186a2d0000044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1046000b2001105c200141206a24000b0c00102041001056410110600b7d02037f017e230041106b220024001020105810572000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd8308410310491010220342015804402003a741016b0d020c010b41dd8308410341fc830841121046000b410121010b20010541020b200028020c10541060200041106a24000baf0102037f047e230041306b220024001020105810572000410036022c200041086a21012000412c6a220228020041c0d2082802004e047e420105200241dd8308410310482103200241dd8308410310482104200241dd830841031048210542000b210620012005370318200120043703102001200337030820012006370300200028022c10542000290308500440200029031820002903202104200029031010151015200410150b200041306a24000b1601017f1020410110564100102c22001011200010230b8e0102037f017e230041406a22002400102041011056200041a783084107105336020c200041106a2000410c6a107f1073210120002903102203427f510440102421030b102c2102200320002802182001200028021c2000280220200210251a1026200041306a220120021059200141cd8108410b108501200041306a41cd8108410b108501105b200041406b24000b5701027f230041406a22002400102041011056200041a783084107105336023c200041206a2000413c6a107f1073210120004100360210200020013602042000200029022c3703082000200028022836020020001063000b0b0041e88208411c10b7010b0b0041848308411d10b7010bbd0302057f027e230041f0006b2200240002400240024010642204107a22031007450d00200041286a22012003102d103c200141b480084119103e2102200141b480084119106d2101104b21030340200104402003200041286a41b480084119103e104e200141016b21010c010b0b200028022c2000280228470d01200041386a2d0000044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c10171a2000200210682000280220450d00200041286a200210682000280248450d000240200041286a41e88208411c1067450440200041286a41848308411d10670d014197820841361000000b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0320052006105b0c010b105810572000410036026c200041d0006a2201200041ec006a104a200028026c10542000280250200029035821052000290360210620012003105910582000280254200028025810550d0220052006105b0b200041f0006a24000f0b41b48008411941a68008410e106e000b41cd8208411b1000000b7202037f017e230041206b22022400102041011056200241a783084107105336021c20022002411c6a107f1073210320022802082104200229020c2105200241186a104b360200200241146a20013602002002200036021020022005370308200220033602042002200436020020021063000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@08"; + let deploy_with_biguint_arg_metadata_nothing_data = "0061736d01000000018e011760000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f017f60047f7f7f7f0060027f7e0060017f017e60017e0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060057f7f7f7f7f0002ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d4275666665724765744c656e677468000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7617626967496e744765745369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000803656e76126d42756666657253746f726167654c6f6164000403656e76136d42756666657253746f7261676553746f7265000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001103656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001203656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000803656e76106d616e616765644173796e6343616c6c00090387018501090002050201020b02010113010504030302020206020514030708090205060101060d070202020401030300000102031503010101030307050506010803060909020401020a0802010207010101061602050d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07f40a38066d656d6f7279020004696e6974007c0667657453756d007d03616464007e1372657475726e4e667450726f70657274696573007f1772657475726e4e6674456e756d50726f706572746965730080011d72657475726e4e6674456e756d4669656c647350726f706572746965730081011572657475726e46756e6769626c6542616c616e63650082011872657475726e4e6f6e46756e6769626c6542616c616e6365008301156e6f4172674e6f52657475726e456e64706f696e740084010c72657475726e43616c6c65720085011372657475726e4d616e616765644275666665720086011572657475726e436f6e7472616374416464726573730087010d72657475726e42696775696e740088010872657475726e55380089010972657475726e553136008a010972657475726e553332008b010972657475726e553634008c010c72657475726e553332566563008d010c72657475726e553634566563008e010f72657475726e427566666572566563008f011072657475726e42696775696e745665630090010c72657475726e54776f5536340091011072657475726e54776f427566666572730092012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740093011472657475726e446f75626c654f665536344172670094011872657475726e446f75626c654f6642696775696e744172670095011772657475726e417070656e6465644275666665724172670096011772657475726e53756d54776f42696775696e74417267730097011b72657475726e436f6e6361744d756c7469427566666572417267730098011572657475726e53756d4d756c7469553634417267730099011972657475726e53756d4d756c746942696775696e7441726773009a011272657475726e437573746f6d537472756374009b011572657475726e437573746f6d537472756374417267009c012272657475726e437573746f6d53747275637457697468537472756374416e64566563009d012572657475726e437573746f6d53747275637457697468537472756374416e64566563417267009e011072657475726e437573746f6d456e756d009f011372657475726e437573746f6d456e756d41726700a0011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a1012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a2011d72657475726e437573746f6d456e756d576974684669656c647341726700a3011772657475726e4f7074696f6e616c56616c7565426f6f6c00a4011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700a5011372657475726e4d756c746956616c756554776f00a6010f72657475726e426967496e7441726700a7011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400a8012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00a901396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00aa013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ab010863616c6c4261636b00ac0107757067726164650084011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a1012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a2011d72657475726e437573746f6d456e756d5769746856616c75657341726700a3010a5f5f646174615f656e6403010b5f5f686561705f6261736503020adb4385011b00200120034b0440102a000b20002001360204200020023602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1044000b200128020c2000200220036a360200200141106a24000b820102017e017f230041106b22022400200242003703082000200241086a4108104c20022903082101200241106a2400200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484840b08002000102f103b0b1d00200028020820011033200029030020011034200028020c200110350b5001027f230041106b22022400200220001005220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410732001200010031a200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081073200241106a24000b0a002000103e200110330b0a0041948408410010370b1101017f102c220220002001100c1a20020b0700200010041a0b3101027f4100103a220210052101200041003a00102000200136020c2000200236020820002001360204200041003602000b0d002000102c2200100d1a20000b0d002000102c2200101b1a20000b0e00200041e781084120103d103b0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0f01017f102c22012000101a1a20010b0c01017f102c2200100620000b4c01037f103f2103102c2102200041feffffff074604402003104141c4d2082002100720020f0b20001005210420031041200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011005450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210431a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171037220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b2e01017f104621010340200028020041c0d2082802004e4504402001200041f083084104104710480c010b0b20010b1301017f102c2200419484084100100c1a20000b0c00200020012002104a103a0b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bbf0102027e037f200141a183084106104a1010220242808080801054044002402002a7220641ebde0147410020061b450440200141a183084106104b22034280808080708321022003a72104200141a183084106104b21030c010b027e200128020041c0d2082802004e0440410121051046210442000c010b41012105200141a1830841061047210442000b21020b200020033703102000200636020420002005360200200020022004ad843703080f0b41a18308410641a68008410e1044000b2f01017f2000280200220341c0d2082802004e0440200120024187810841111044000b2000200341016a36020020030b0c00200020012002104a10100b3100200041086a200028020020012002106f044041dd8308410341d88108410f1044000b2000200028020020026a3602000b2a01027f2000106a210110462102037f2001047f200220001030106e200141016b21010c010520020b0b0b2a01027f2000106a210110462102037f2001047f20022000102f1048200141016b21010c010520020b0b0b0c002000102c2200101120000b2101017f4100103a220210054120470440200020014187820841101044000b20020b1400200020014d04400f0b4198810841121000000b1900200041c0d2082802004e04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010054102760b2701017f10362101200028020820011033200029030020011034200028020c20011035200110380b0a0020001015200110150b6001027f20002802002102103621010240200245044041002001105b2000280204200110332000290310200110342000280208200110350c010b41012001105b20002802042001105c200041086a2001105d200041106a200110320b200110380b2601017f230041106b22022400200220003a000f20012002410f6a41011073200241106a24000baf0102017e047f230041106b22032400200010054103762001107420001005210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810651a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b220224002000280200220310572001107420022003100536021c20024100360218200220003602140340200241086a200241146a107520022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b2401017f1036210120002802102001105c200041146a2001105d200020011032200110380b0d0020001061200120021028000b0a0041764200100141760b1b01027f102c2200101741c38108410a10372201200010031a20010b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200110052206200241106a41201029200141002002280208200228020c10651a2000200636022020002002290310370000200041086a2005290300370000200041106a2004290300370000200041186a2003290300370000200241306a24000b0c00200020012002200310430b4b01047f106241948408410010372101200028020021032000280204220420011074200120032004100e1a200041086a2001105d2001101f1a200028020c200028021020002802141060000b5201017f230041106b220324002003410036020c20002003410c6a4104200120021078200328020c2100200341106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b1f0020012002200310022201101d21022000200136020420002002453602000b1600200020011037220020022003100e1a2000100f000b4e01017f230041106b220124002001410036020c20002001410c6a4104104c200128020c2100200141106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b0c00200020002001101820000b0a0020002000200110190b1801017f102c2101417242121001200120004172101c20010b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000b850401077f230041106b2206240002400240027f024020002d000845044020002802002204100522054190ce004b0d0141bcd2082d00000d0141b8d208200536020041bcd20841013a0000200641086a200541a884084190ce001029200441002006280208200628020c10651a20002d0008044041b8d208410036020041bcd20841003a00000b200041013a00080b4101200120036a220041b8d2082802004b0d011a20002001490d0220004190ce004b0d03200141a884086a2100200341104f04402002410020026b41037122046a210520040440200021010340200220012d00003a0000200141016a2101200241016a22022005490d000b0b2005200320046b2203417c7122076a21020240200020046a22044103710440200741004c0d012004410374220141187121082004417c71220941046a2100410020016b411871210a2009280200210103402005200120087620002802002201200a7472360200200041046a2100200541046a22052002490d000b0c010b200741004c0d0020042100034020052000280200360200200041046a2100200541046a22052002490d000b0b20034103712103200420076a21000b20030440200220036a21010340200220002d00003a0000200041016a2100200241016a22022001490d000b0b41000c010b200041003a0008200420012002200310650b200641106a24000f0b102a000b102a000b0d002000102c2200101e1a20000b0b0020002001103e101f1a0b080020001070103b0b0b00200020012002100e1a0b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041073200241106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410651a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b4a01017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c103721012000104636020420002001360200200020023602080b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041065450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111044000b2f00200041086a200028020020012002106f04402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107820012d000f200141106a24000b0a00418e8408410310370bab0102017e027f230041106b22042400200020012002107721002004420037030820001005220541094f04402001200241a68008410e1044000b20004100200420056b41106a200510431a20042903082103200441106a2400200342388620034280fe0383422886842003428080fc0783421886200342808080f80f834208868484200342088842808080f80f832003421888428080fc07838420034228884280fe038320034238888484840b1601017f1020410110534100104f2100107a200010710b0e00102041001053107a107210210b2201037f1020410110534100104f2100107a2201107222022000106c2001200210710bc00101037f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c2000412c6a220241e781084120103d21012002103c21022000280230200028022c46044020002d003c044041b8d208410036020041bcd20841003a00000b200110362201103320022001103520011038200041406b24000f0b41e78108412041a68008410e1069000b9b0202037f017e230041406a2200240010204100105341c88308410a103721012000410c6a103f200110420240024002402000280218102d220110050440200110052102200041003a003c2000200236023820002001360234200020023602302000410036022c410121010240024002402000412c6a107941ff01710e020201000b41e78108412041808008410d1069000b2000412c6a220141e781084120103dad2001103cad422086842103410021010b2000280230200028022c470d0320002d003c044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b410110362201105b2003a7200110332003422088a720011035200110380b200041406b24000f0b41e78108412041a68008410e1069000be20101047f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c02402000412c6a107941ff01714504402000412c6a220141e781084120103d2001103c21032000280230200028022c470d0120002d003c044041b8d208410036020041bcd20841003a00000b410010362201105b2001103320032001103520011038200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b160010204100105341d28308410b10374200104010210b160010204100105341c88308410a10374206104010210b08001020410010530b1501017f102041001053102c22001022200010041a0b130010204100105341c483084104103710041a0b130010204101105341e083084110105010041a0b1000102041001053410a102b106d10210b0c00102041001053420310150b0d0010204100105342f40310150b0e0010204100105342c09a0c10150b10001020410010534280b4c4c32110150b1f01017f10204100105310462200410a1048200041c09a0c1048200010041a0b2101017f10204100105310462200420a106e20004280b4c4c321106e200010041a0b7f01037f230041206b220024001020410010531046220141ba8308410510371048200141bf8308410510371048200020013602101036210220002001100536021c200041003602182000200041106a3602140340200041086a200041146a107520002802080440200028020c200210330c010b0b20021038200041206a24000b9a0101067f230041106b2201240010204100105310462202410a102b106d10482002410a102b106d4102102b106b1048103621032002100521040340200041046a220520044b4504402001410036020c200220002001410c6a410410431a200128020c220041187420004180fe03714108747220004108764180fe03712000411876727220031035200521000c010b0b20031038200141106a24000b1200102041001053420a4280b4c4c32110590b2401027f10204100105341ba83084105103741bf830841051037210110041a200110041a0b2901027f10204100105341ba830841051037410a102b106d210110041a4280b4c4c3211015200110210b11001020410110534100101042018610150b1a01017f1020410110534100104f21004102102b2000106b10210b2001017f1020410110534100103a220041c483084104103710031a200010041a0b1c01017f1020410210534100104f220020004101104f1019200010210b6201037f230041106b220024001020105510542000410036020020001045210220002802001052104621012000200210560340200028020820002802044f4504402001200041f4830841081077102d10031a0c010b0b200110041a200041106a24000b5d02027f017e230041106b2200240010201055105420004100360200200010452101200028020010522000200110560340200028020820002802044f450440200041f483084108107b20027c21020c010b0b20021015200041106a24000b6401037f230041106b220024001020105510542000410036020020001045210220002802001052102c2201420010012000200210560340200028020820002802044f4504402001200041f4830841081077103b106c0c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105341c483084104103721012000410a102b106d36020c20004280b4c4c3213703002000200136020820001058200041106a24000b9c0102047f017e230041106b22002400102041011053230041206b220124002001410c6a220210392002102f210320021030210420021031210202402001280210200128020c46044020012d001c044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1044000b20001058200041106a24000b860101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a105f200041206a24000bd00101067f230041206b22032400102041011053200341086a2101230041406a220024002000411c6a220210392002104d21042002104e2105200041306a2002102e02402000280220200028021c460440200041106a2202200041386a2903003703002000200029033037030820002d002c044041b8d208410036020041bcd20841003a00000b200120002903083703002001200536021420012004360210200141086a2002290300370300200041406b24000c010b41dd8308410341a68008410e1044000b2001105f200341206a24000b0c00102041001053420110150b5f02017f017e102041011053027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1044000b41dd8308410341808008410d1044000bad42ff018310150b5001037f230041206b2200240010204100105341c48308410410372101410a102b106d210220004280b4c4c3213703102000200136020420002002360208200041003602002000105a200041206a24000b8a0101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200436021c2000200336021820004280b4c4c3213703102000200236020820002001360204200041013602002000105a200041206a24000b940202057f027e230041206b22012400102041011053230041306b220024002000410c6a22021039200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1044000b2000410c6a2202102f21042002103021062002103121020c010b2000410c6a2203104d21042003104e2102200041206a2003102e2000290328210520002903202106410121030b02402000280210200028020c46044020002d001c044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1044000b2001105a200141206a24000b0c001020410010534101105e0b7d02037f017e230041106b220024001020105510542000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd83084103104a1010220342015804402003a741016b0d020c010b41dd8308410341fc830841121044000b410121010b20010541020b200028020c1052105e200041106a24000bab0102037f047e230041306b220024001020105510542000410036020c200041106a21012000410c6a220228020041c0d2082802004e047e420105200241dd83084103104b2103200241dd83084103104b2104200241dd83084103104b210542000b210620012005370318200120043703102001200337030820012006370300200028020c105220002903105004402000290328200029032020002903181015101510150b200041306a24000b1601017f1020410110534100102c22001012200010230b900102037f017e230041206b22002400102041011053200041a7830841071050360210200041046a200041106a1076102421032000280208210120002802042102200342a08d067d2003200342a08d06561b200028020c106120022001102c220110251a1026200041146a220220011056200241cd8108410b107b200041146a41cd8108410b107b1059200041206a24000b5701017f230041206b22002400102041011053200041a783084107105036021c200041106a2000411c6a10762000200028021836020c20002000290210370204200041046a2200280208200028020020002802041060000b0b0041e88208411c10ad010b0b0041848308411d10ad010bda0302057f027e230041f0006b2200240002400240024010622204107022011005450d002001102d220310052101200041003a00402000200136023c200020033602382000200136023420004100360230200041306a220141b480084119103d2102200141b48008411910672101104621030340200104402003200041306a41b480084119103d1048200141016b21010c010b0b20002802342000280230470d0120002d0040044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c101f1a2000410c6a20021064200028022c450d00200041306a200210642000280250450d000240200041306a41e88208411c1063450440200041306a41848308411d10630d014197820841361000000b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d03200510590c010b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d02200510590b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b7601067f230041206b22022400102041011053200241a783084107105036021c200241046a22032002411c6a1076200228020c21042002280204210520022802082106104621072002200636021820022005360214200220043602102002200736020c200220013602082002200036020420031066000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@05"; + let deploy_with_biguint_arg_biguint_return_metadata_nothing_data = "0061736d01000000018e011760000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f017f60047f7f7f7f0060027f7e0060017f017e60017e0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060057f7f7f7f7f0002ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d4275666665724765744c656e677468000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7617626967496e744765745369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000803656e76126d42756666657253746f726167654c6f6164000403656e76136d42756666657253746f7261676553746f7265000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001103656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001203656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000803656e76106d616e616765644173796e6343616c6c00090387018501090002050201020b02010113010504030302020206020514030708090205060101060d070202020401030300000102031503010101030307050506010803060909020401020a0802010207010101061602050d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07f40a38066d656d6f7279020004696e6974007c0667657453756d007d03616464007e1372657475726e4e667450726f70657274696573007f1772657475726e4e6674456e756d50726f706572746965730080011d72657475726e4e6674456e756d4669656c647350726f706572746965730081011572657475726e46756e6769626c6542616c616e63650082011872657475726e4e6f6e46756e6769626c6542616c616e6365008301156e6f4172674e6f52657475726e456e64706f696e740084010c72657475726e43616c6c65720085011372657475726e4d616e616765644275666665720086011572657475726e436f6e7472616374416464726573730087010d72657475726e42696775696e740088010872657475726e55380089010972657475726e553136008a010972657475726e553332008b010972657475726e553634008c010c72657475726e553332566563008d010c72657475726e553634566563008e010f72657475726e427566666572566563008f011072657475726e42696775696e745665630090010c72657475726e54776f5536340091011072657475726e54776f427566666572730092012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740093011472657475726e446f75626c654f665536344172670094011872657475726e446f75626c654f6642696775696e744172670095011772657475726e417070656e6465644275666665724172670096011772657475726e53756d54776f42696775696e74417267730097011b72657475726e436f6e6361744d756c7469427566666572417267730098011572657475726e53756d4d756c7469553634417267730099011972657475726e53756d4d756c746942696775696e7441726773009a011272657475726e437573746f6d537472756374009b011572657475726e437573746f6d537472756374417267009c012272657475726e437573746f6d53747275637457697468537472756374416e64566563009d012572657475726e437573746f6d53747275637457697468537472756374416e64566563417267009e011072657475726e437573746f6d456e756d009f011372657475726e437573746f6d456e756d41726700a0011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a1012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a2011d72657475726e437573746f6d456e756d576974684669656c647341726700a3011772657475726e4f7074696f6e616c56616c7565426f6f6c00a4011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700a5011372657475726e4d756c746956616c756554776f00a6010f72657475726e426967496e7441726700a7011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400a8012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00a901396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00aa013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ab010863616c6c4261636b00ac0107757067726164650084011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a1012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a2011d72657475726e437573746f6d456e756d5769746856616c75657341726700a3010a5f5f646174615f656e6403010b5f5f686561705f6261736503020adb4385011b00200120034b0440102a000b20002001360204200020023602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1044000b200128020c2000200220036a360200200141106a24000b820102017e017f230041106b22022400200242003703082000200241086a4108104c20022903082101200241106a2400200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484840b08002000102f103b0b1d00200028020820011033200029030020011034200028020c200110350b5001027f230041106b22022400200220001005220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410732001200010031a200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081073200241106a24000b0a002000103e200110330b0a0041948408410010370b1101017f102c220220002001100c1a20020b0700200010041a0b3101027f4100103a220210052101200041003a00102000200136020c2000200236020820002001360204200041003602000b0d002000102c2200100d1a20000b0d002000102c2200101b1a20000b0e00200041e781084120103d103b0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0f01017f102c22012000101a1a20010b0c01017f102c2200100620000b4c01037f103f2103102c2102200041feffffff074604402003104141c4d2082002100720020f0b20001005210420031041200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011005450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210431a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171037220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b2e01017f104621010340200028020041c0d2082802004e4504402001200041f083084104104710480c010b0b20010b1301017f102c2200419484084100100c1a20000b0c00200020012002104a103a0b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bbf0102027e037f200141a183084106104a1010220242808080801054044002402002a7220641ebde0147410020061b450440200141a183084106104b22034280808080708321022003a72104200141a183084106104b21030c010b027e200128020041c0d2082802004e0440410121051046210442000c010b41012105200141a1830841061047210442000b21020b200020033703102000200636020420002005360200200020022004ad843703080f0b41a18308410641a68008410e1044000b2f01017f2000280200220341c0d2082802004e0440200120024187810841111044000b2000200341016a36020020030b0c00200020012002104a10100b3100200041086a200028020020012002106f044041dd8308410341d88108410f1044000b2000200028020020026a3602000b2a01027f2000106a210110462102037f2001047f200220001030106e200141016b21010c010520020b0b0b2a01027f2000106a210110462102037f2001047f20022000102f1048200141016b21010c010520020b0b0b0c002000102c2200101120000b2101017f4100103a220210054120470440200020014187820841101044000b20020b1400200020014d04400f0b4198810841121000000b1900200041c0d2082802004e04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010054102760b2701017f10362101200028020820011033200029030020011034200028020c20011035200110380b0a0020001015200110150b6001027f20002802002102103621010240200245044041002001105b2000280204200110332000290310200110342000280208200110350c010b41012001105b20002802042001105c200041086a2001105d200041106a200110320b200110380b2601017f230041106b22022400200220003a000f20012002410f6a41011073200241106a24000baf0102017e047f230041106b22032400200010054103762001107420001005210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810651a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b220224002000280200220310572001107420022003100536021c20024100360218200220003602140340200241086a200241146a107520022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b2401017f1036210120002802102001105c200041146a2001105d200020011032200110380b0d0020001061200120021028000b0a0041764200100141760b1b01027f102c2200101741c38108410a10372201200010031a20010b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200110052206200241106a41201029200141002002280208200228020c10651a2000200636022020002002290310370000200041086a2005290300370000200041106a2004290300370000200041186a2003290300370000200241306a24000b0c00200020012002200310430b4b01047f106241948408410010372101200028020021032000280204220420011074200120032004100e1a200041086a2001105d2001101f1a200028020c200028021020002802141060000b5201017f230041106b220324002003410036020c20002003410c6a4104200120021078200328020c2100200341106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b1f0020012002200310022201101d21022000200136020420002002453602000b1600200020011037220020022003100e1a2000100f000b4e01017f230041106b220124002001410036020c20002001410c6a4104104c200128020c2100200141106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b0c00200020002001101820000b0a0020002000200110190b1801017f102c2101417242121001200120004172101c20010b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000b850401077f230041106b2206240002400240027f024020002d000845044020002802002204100522054190ce004b0d0141bcd2082d00000d0141b8d208200536020041bcd20841013a0000200641086a200541a884084190ce001029200441002006280208200628020c10651a20002d0008044041b8d208410036020041bcd20841003a00000b200041013a00080b4101200120036a220041b8d2082802004b0d011a20002001490d0220004190ce004b0d03200141a884086a2100200341104f04402002410020026b41037122046a210520040440200021010340200220012d00003a0000200141016a2101200241016a22022005490d000b0b2005200320046b2203417c7122076a21020240200020046a22044103710440200741004c0d012004410374220141187121082004417c71220941046a2100410020016b411871210a2009280200210103402005200120087620002802002201200a7472360200200041046a2100200541046a22052002490d000b0c010b200741004c0d0020042100034020052000280200360200200041046a2100200541046a22052002490d000b0b20034103712103200420076a21000b20030440200220036a21010340200220002d00003a0000200041016a2100200241016a22022001490d000b0b41000c010b200041003a0008200420012002200310650b200641106a24000f0b102a000b102a000b0d002000102c2200101e1a20000b0b0020002001103e101f1a0b080020001070103b0b0b00200020012002100e1a0b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041073200241106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410651a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b4a01017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c103721012000104636020420002001360200200020023602080b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041065450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111044000b2f00200041086a200028020020012002106f04402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107820012d000f200141106a24000b0a00418e8408410310370bab0102017e027f230041106b22042400200020012002107721002004420037030820001005220541094f04402001200241a68008410e1044000b20004100200420056b41106a200510431a20042903082103200441106a2400200342388620034280fe0383422886842003428080fc0783421886200342808080f80f834208868484200342088842808080f80f832003421888428080fc07838420034228884280fe038320034238888484840b1601017f1020410110534100104f2100107a200010710b0e00102041001053107a107210210b2201037f1020410110534100104f2100107a2201107222022000106c2001200210710bc00101037f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c2000412c6a220241e781084120103d21012002103c21022000280230200028022c46044020002d003c044041b8d208410036020041bcd20841003a00000b200110362201103320022001103520011038200041406b24000f0b41e78108412041a68008410e1069000b9b0202037f017e230041406a2200240010204100105341c88308410a103721012000410c6a103f200110420240024002402000280218102d220110050440200110052102200041003a003c2000200236023820002001360234200020023602302000410036022c410121010240024002402000412c6a107941ff01710e020201000b41e78108412041808008410d1069000b2000412c6a220141e781084120103dad2001103cad422086842103410021010b2000280230200028022c470d0320002d003c044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b410110362201105b2003a7200110332003422088a720011035200110380b200041406b24000f0b41e78108412041a68008410e1069000be20101047f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c02402000412c6a107941ff01714504402000412c6a220141e781084120103d2001103c21032000280230200028022c470d0120002d003c044041b8d208410036020041bcd20841003a00000b410010362201105b2001103320032001103520011038200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b160010204100105341d28308410b10374200104010210b160010204100105341c88308410a10374206104010210b08001020410010530b1501017f102041001053102c22001022200010041a0b130010204100105341c483084104103710041a0b130010204101105341e083084110105010041a0b1000102041001053410a102b106d10210b0c00102041001053420310150b0d0010204100105342f40310150b0e0010204100105342c09a0c10150b10001020410010534280b4c4c32110150b1f01017f10204100105310462200410a1048200041c09a0c1048200010041a0b2101017f10204100105310462200420a106e20004280b4c4c321106e200010041a0b7f01037f230041206b220024001020410010531046220141ba8308410510371048200141bf8308410510371048200020013602101036210220002001100536021c200041003602182000200041106a3602140340200041086a200041146a107520002802080440200028020c200210330c010b0b20021038200041206a24000b9a0101067f230041106b2201240010204100105310462202410a102b106d10482002410a102b106d4102102b106b1048103621032002100521040340200041046a220520044b4504402001410036020c200220002001410c6a410410431a200128020c220041187420004180fe03714108747220004108764180fe03712000411876727220031035200521000c010b0b20031038200141106a24000b1200102041001053420a4280b4c4c32110590b2401027f10204100105341ba83084105103741bf830841051037210110041a200110041a0b2901027f10204100105341ba830841051037410a102b106d210110041a4280b4c4c3211015200110210b11001020410110534100101042018610150b1a01017f1020410110534100104f21004102102b2000106b10210b2001017f1020410110534100103a220041c483084104103710031a200010041a0b1c01017f1020410210534100104f220020004101104f1019200010210b6201037f230041106b220024001020105510542000410036020020001045210220002802001052104621012000200210560340200028020820002802044f4504402001200041f4830841081077102d10031a0c010b0b200110041a200041106a24000b5d02027f017e230041106b2200240010201055105420004100360200200010452101200028020010522000200110560340200028020820002802044f450440200041f483084108107b20027c21020c010b0b20021015200041106a24000b6401037f230041106b220024001020105510542000410036020020001045210220002802001052102c2201420010012000200210560340200028020820002802044f4504402001200041f4830841081077103b106c0c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105341c483084104103721012000410a102b106d36020c20004280b4c4c3213703002000200136020820001058200041106a24000b9c0102047f017e230041106b22002400102041011053230041206b220124002001410c6a220210392002102f210320021030210420021031210202402001280210200128020c46044020012d001c044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1044000b20001058200041106a24000b860101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a105f200041206a24000bd00101067f230041206b22032400102041011053200341086a2101230041406a220024002000411c6a220210392002104d21042002104e2105200041306a2002102e02402000280220200028021c460440200041106a2202200041386a2903003703002000200029033037030820002d002c044041b8d208410036020041bcd20841003a00000b200120002903083703002001200536021420012004360210200141086a2002290300370300200041406b24000c010b41dd8308410341a68008410e1044000b2001105f200341206a24000b0c00102041001053420110150b5f02017f017e102041011053027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1044000b41dd8308410341808008410d1044000bad42ff018310150b5001037f230041206b2200240010204100105341c48308410410372101410a102b106d210220004280b4c4c3213703102000200136020420002002360208200041003602002000105a200041206a24000b8a0101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200436021c2000200336021820004280b4c4c3213703102000200236020820002001360204200041013602002000105a200041206a24000b940202057f027e230041206b22012400102041011053230041306b220024002000410c6a22021039200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1044000b2000410c6a2202102f21042002103021062002103121020c010b2000410c6a2203104d21042003104e2102200041206a2003102e2000290328210520002903202106410121030b02402000280210200028020c46044020002d001c044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1044000b2001105a200141206a24000b0c001020410010534101105e0b7d02037f017e230041106b220024001020105510542000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd83084103104a1010220342015804402003a741016b0d020c010b41dd8308410341fc830841121044000b410121010b20010541020b200028020c1052105e200041106a24000bab0102037f047e230041306b220024001020105510542000410036020c200041106a21012000410c6a220228020041c0d2082802004e047e420105200241dd83084103104b2103200241dd83084103104b2104200241dd83084103104b210542000b210620012005370318200120043703102001200337030820012006370300200028020c105220002903105004402000290328200029032020002903181015101510150b200041306a24000b1601017f1020410110534100102c22001012200010230b900102037f017e230041206b22002400102041011053200041a7830841071050360210200041046a200041106a1076102421032000280208210120002802042102200342a08d067d2003200342a08d06561b200028020c106120022001102c220110251a1026200041146a220220011056200241cd8108410b107b200041146a41cd8108410b107b1059200041206a24000b5701017f230041206b22002400102041011053200041a783084107105036021c200041106a2000411c6a10762000200028021836020c20002000290210370204200041046a2200280208200028020020002802041060000b0b0041e88208411c10ad010b0b0041848308411d10ad010bda0302057f027e230041f0006b2200240002400240024010622204107022011005450d002001102d220310052101200041003a00402000200136023c200020033602382000200136023420004100360230200041306a220141b480084119103d2102200141b48008411910672101104621030340200104402003200041306a41b480084119103d1048200141016b21010c010b0b20002802342000280230470d0120002d0040044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c101f1a2000410c6a20021064200028022c450d00200041306a200210642000280250450d000240200041306a41e88208411c1063450440200041306a41848308411d10630d014197820841361000000b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d03200510590c010b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d02200510590b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b7601067f230041206b22022400102041011053200241a783084107105036021c200241046a22032002411c6a1076200228020c21042002280204210520022802082106104621072002200636021820022005360214200220043602102002200736020c200220013602082002200036020420031066000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@0a"; + let deploy_with_biguint_arg_metadata_upgradeable_readable_data = "0061736d01000000018e011760000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f017f60047f7f7f7f0060027f7e0060017f017e60017e0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060057f7f7f7f7f0002ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d4275666665724765744c656e677468000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7617626967496e744765745369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000803656e76126d42756666657253746f726167654c6f6164000403656e76136d42756666657253746f7261676553746f7265000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001103656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001203656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000803656e76106d616e616765644173796e6343616c6c00090387018501090002050201020b02010113010504030302020206020514030708090205060101060d070202020401030300000102031503010101030307050506010803060909020401020a0802010207010101061602050d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07f40a38066d656d6f7279020004696e6974007c0667657453756d007d03616464007e1372657475726e4e667450726f70657274696573007f1772657475726e4e6674456e756d50726f706572746965730080011d72657475726e4e6674456e756d4669656c647350726f706572746965730081011572657475726e46756e6769626c6542616c616e63650082011872657475726e4e6f6e46756e6769626c6542616c616e6365008301156e6f4172674e6f52657475726e456e64706f696e740084010c72657475726e43616c6c65720085011372657475726e4d616e616765644275666665720086011572657475726e436f6e7472616374416464726573730087010d72657475726e42696775696e740088010872657475726e55380089010972657475726e553136008a010972657475726e553332008b010972657475726e553634008c010c72657475726e553332566563008d010c72657475726e553634566563008e010f72657475726e427566666572566563008f011072657475726e42696775696e745665630090010c72657475726e54776f5536340091011072657475726e54776f427566666572730092012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740093011472657475726e446f75626c654f665536344172670094011872657475726e446f75626c654f6642696775696e744172670095011772657475726e417070656e6465644275666665724172670096011772657475726e53756d54776f42696775696e74417267730097011b72657475726e436f6e6361744d756c7469427566666572417267730098011572657475726e53756d4d756c7469553634417267730099011972657475726e53756d4d756c746942696775696e7441726773009a011272657475726e437573746f6d537472756374009b011572657475726e437573746f6d537472756374417267009c012272657475726e437573746f6d53747275637457697468537472756374416e64566563009d012572657475726e437573746f6d53747275637457697468537472756374416e64566563417267009e011072657475726e437573746f6d456e756d009f011372657475726e437573746f6d456e756d41726700a0011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a1012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a2011d72657475726e437573746f6d456e756d576974684669656c647341726700a3011772657475726e4f7074696f6e616c56616c7565426f6f6c00a4011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700a5011372657475726e4d756c746956616c756554776f00a6010f72657475726e426967496e7441726700a7011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400a8012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00a901396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00aa013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ab010863616c6c4261636b00ac0107757067726164650084011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a1012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a2011d72657475726e437573746f6d456e756d5769746856616c75657341726700a3010a5f5f646174615f656e6403010b5f5f686561705f6261736503020adb4385011b00200120034b0440102a000b20002001360204200020023602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1044000b200128020c2000200220036a360200200141106a24000b820102017e017f230041106b22022400200242003703082000200241086a4108104c20022903082101200241106a2400200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484840b08002000102f103b0b1d00200028020820011033200029030020011034200028020c200110350b5001027f230041106b22022400200220001005220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410732001200010031a200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081073200241106a24000b0a002000103e200110330b0a0041948408410010370b1101017f102c220220002001100c1a20020b0700200010041a0b3101027f4100103a220210052101200041003a00102000200136020c2000200236020820002001360204200041003602000b0d002000102c2200100d1a20000b0d002000102c2200101b1a20000b0e00200041e781084120103d103b0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0f01017f102c22012000101a1a20010b0c01017f102c2200100620000b4c01037f103f2103102c2102200041feffffff074604402003104141c4d2082002100720020f0b20001005210420031041200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011005450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210431a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171037220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b2e01017f104621010340200028020041c0d2082802004e4504402001200041f083084104104710480c010b0b20010b1301017f102c2200419484084100100c1a20000b0c00200020012002104a103a0b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bbf0102027e037f200141a183084106104a1010220242808080801054044002402002a7220641ebde0147410020061b450440200141a183084106104b22034280808080708321022003a72104200141a183084106104b21030c010b027e200128020041c0d2082802004e0440410121051046210442000c010b41012105200141a1830841061047210442000b21020b200020033703102000200636020420002005360200200020022004ad843703080f0b41a18308410641a68008410e1044000b2f01017f2000280200220341c0d2082802004e0440200120024187810841111044000b2000200341016a36020020030b0c00200020012002104a10100b3100200041086a200028020020012002106f044041dd8308410341d88108410f1044000b2000200028020020026a3602000b2a01027f2000106a210110462102037f2001047f200220001030106e200141016b21010c010520020b0b0b2a01027f2000106a210110462102037f2001047f20022000102f1048200141016b21010c010520020b0b0b0c002000102c2200101120000b2101017f4100103a220210054120470440200020014187820841101044000b20020b1400200020014d04400f0b4198810841121000000b1900200041c0d2082802004e04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010054102760b2701017f10362101200028020820011033200029030020011034200028020c20011035200110380b0a0020001015200110150b6001027f20002802002102103621010240200245044041002001105b2000280204200110332000290310200110342000280208200110350c010b41012001105b20002802042001105c200041086a2001105d200041106a200110320b200110380b2601017f230041106b22022400200220003a000f20012002410f6a41011073200241106a24000baf0102017e047f230041106b22032400200010054103762001107420001005210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810651a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b220224002000280200220310572001107420022003100536021c20024100360218200220003602140340200241086a200241146a107520022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b2401017f1036210120002802102001105c200041146a2001105d200020011032200110380b0d0020001061200120021028000b0a0041764200100141760b1b01027f102c2200101741c38108410a10372201200010031a20010b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200110052206200241106a41201029200141002002280208200228020c10651a2000200636022020002002290310370000200041086a2005290300370000200041106a2004290300370000200041186a2003290300370000200241306a24000b0c00200020012002200310430b4b01047f106241948408410010372101200028020021032000280204220420011074200120032004100e1a200041086a2001105d2001101f1a200028020c200028021020002802141060000b5201017f230041106b220324002003410036020c20002003410c6a4104200120021078200328020c2100200341106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b1f0020012002200310022201101d21022000200136020420002002453602000b1600200020011037220020022003100e1a2000100f000b4e01017f230041106b220124002001410036020c20002001410c6a4104104c200128020c2100200141106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b0c00200020002001101820000b0a0020002000200110190b1801017f102c2101417242121001200120004172101c20010b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000b850401077f230041106b2206240002400240027f024020002d000845044020002802002204100522054190ce004b0d0141bcd2082d00000d0141b8d208200536020041bcd20841013a0000200641086a200541a884084190ce001029200441002006280208200628020c10651a20002d0008044041b8d208410036020041bcd20841003a00000b200041013a00080b4101200120036a220041b8d2082802004b0d011a20002001490d0220004190ce004b0d03200141a884086a2100200341104f04402002410020026b41037122046a210520040440200021010340200220012d00003a0000200141016a2101200241016a22022005490d000b0b2005200320046b2203417c7122076a21020240200020046a22044103710440200741004c0d012004410374220141187121082004417c71220941046a2100410020016b411871210a2009280200210103402005200120087620002802002201200a7472360200200041046a2100200541046a22052002490d000b0c010b200741004c0d0020042100034020052000280200360200200041046a2100200541046a22052002490d000b0b20034103712103200420076a21000b20030440200220036a21010340200220002d00003a0000200041016a2100200241016a22022001490d000b0b41000c010b200041003a0008200420012002200310650b200641106a24000f0b102a000b102a000b0d002000102c2200101e1a20000b0b0020002001103e101f1a0b080020001070103b0b0b00200020012002100e1a0b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041073200241106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410651a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b4a01017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c103721012000104636020420002001360200200020023602080b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041065450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111044000b2f00200041086a200028020020012002106f04402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107820012d000f200141106a24000b0a00418e8408410310370bab0102017e027f230041106b22042400200020012002107721002004420037030820001005220541094f04402001200241a68008410e1044000b20004100200420056b41106a200510431a20042903082103200441106a2400200342388620034280fe0383422886842003428080fc0783421886200342808080f80f834208868484200342088842808080f80f832003421888428080fc07838420034228884280fe038320034238888484840b1601017f1020410110534100104f2100107a200010710b0e00102041001053107a107210210b2201037f1020410110534100104f2100107a2201107222022000106c2001200210710bc00101037f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c2000412c6a220241e781084120103d21012002103c21022000280230200028022c46044020002d003c044041b8d208410036020041bcd20841003a00000b200110362201103320022001103520011038200041406b24000f0b41e78108412041a68008410e1069000b9b0202037f017e230041406a2200240010204100105341c88308410a103721012000410c6a103f200110420240024002402000280218102d220110050440200110052102200041003a003c2000200236023820002001360234200020023602302000410036022c410121010240024002402000412c6a107941ff01710e020201000b41e78108412041808008410d1069000b2000412c6a220141e781084120103dad2001103cad422086842103410021010b2000280230200028022c470d0320002d003c044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b410110362201105b2003a7200110332003422088a720011035200110380b200041406b24000f0b41e78108412041a68008410e1069000be20101047f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c02402000412c6a107941ff01714504402000412c6a220141e781084120103d2001103c21032000280230200028022c470d0120002d003c044041b8d208410036020041bcd20841003a00000b410010362201105b2001103320032001103520011038200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b160010204100105341d28308410b10374200104010210b160010204100105341c88308410a10374206104010210b08001020410010530b1501017f102041001053102c22001022200010041a0b130010204100105341c483084104103710041a0b130010204101105341e083084110105010041a0b1000102041001053410a102b106d10210b0c00102041001053420310150b0d0010204100105342f40310150b0e0010204100105342c09a0c10150b10001020410010534280b4c4c32110150b1f01017f10204100105310462200410a1048200041c09a0c1048200010041a0b2101017f10204100105310462200420a106e20004280b4c4c321106e200010041a0b7f01037f230041206b220024001020410010531046220141ba8308410510371048200141bf8308410510371048200020013602101036210220002001100536021c200041003602182000200041106a3602140340200041086a200041146a107520002802080440200028020c200210330c010b0b20021038200041206a24000b9a0101067f230041106b2201240010204100105310462202410a102b106d10482002410a102b106d4102102b106b1048103621032002100521040340200041046a220520044b4504402001410036020c200220002001410c6a410410431a200128020c220041187420004180fe03714108747220004108764180fe03712000411876727220031035200521000c010b0b20031038200141106a24000b1200102041001053420a4280b4c4c32110590b2401027f10204100105341ba83084105103741bf830841051037210110041a200110041a0b2901027f10204100105341ba830841051037410a102b106d210110041a4280b4c4c3211015200110210b11001020410110534100101042018610150b1a01017f1020410110534100104f21004102102b2000106b10210b2001017f1020410110534100103a220041c483084104103710031a200010041a0b1c01017f1020410210534100104f220020004101104f1019200010210b6201037f230041106b220024001020105510542000410036020020001045210220002802001052104621012000200210560340200028020820002802044f4504402001200041f4830841081077102d10031a0c010b0b200110041a200041106a24000b5d02027f017e230041106b2200240010201055105420004100360200200010452101200028020010522000200110560340200028020820002802044f450440200041f483084108107b20027c21020c010b0b20021015200041106a24000b6401037f230041106b220024001020105510542000410036020020001045210220002802001052102c2201420010012000200210560340200028020820002802044f4504402001200041f4830841081077103b106c0c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105341c483084104103721012000410a102b106d36020c20004280b4c4c3213703002000200136020820001058200041106a24000b9c0102047f017e230041106b22002400102041011053230041206b220124002001410c6a220210392002102f210320021030210420021031210202402001280210200128020c46044020012d001c044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1044000b20001058200041106a24000b860101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a105f200041206a24000bd00101067f230041206b22032400102041011053200341086a2101230041406a220024002000411c6a220210392002104d21042002104e2105200041306a2002102e02402000280220200028021c460440200041106a2202200041386a2903003703002000200029033037030820002d002c044041b8d208410036020041bcd20841003a00000b200120002903083703002001200536021420012004360210200141086a2002290300370300200041406b24000c010b41dd8308410341a68008410e1044000b2001105f200341206a24000b0c00102041001053420110150b5f02017f017e102041011053027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1044000b41dd8308410341808008410d1044000bad42ff018310150b5001037f230041206b2200240010204100105341c48308410410372101410a102b106d210220004280b4c4c3213703102000200136020420002002360208200041003602002000105a200041206a24000b8a0101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200436021c2000200336021820004280b4c4c3213703102000200236020820002001360204200041013602002000105a200041206a24000b940202057f027e230041206b22012400102041011053230041306b220024002000410c6a22021039200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1044000b2000410c6a2202102f21042002103021062002103121020c010b2000410c6a2203104d21042003104e2102200041206a2003102e2000290328210520002903202106410121030b02402000280210200028020c46044020002d001c044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1044000b2001105a200141206a24000b0c001020410010534101105e0b7d02037f017e230041106b220024001020105510542000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd83084103104a1010220342015804402003a741016b0d020c010b41dd8308410341fc830841121044000b410121010b20010541020b200028020c1052105e200041106a24000bab0102037f047e230041306b220024001020105510542000410036020c200041106a21012000410c6a220228020041c0d2082802004e047e420105200241dd83084103104b2103200241dd83084103104b2104200241dd83084103104b210542000b210620012005370318200120043703102001200337030820012006370300200028020c105220002903105004402000290328200029032020002903181015101510150b200041306a24000b1601017f1020410110534100102c22001012200010230b900102037f017e230041206b22002400102041011053200041a7830841071050360210200041046a200041106a1076102421032000280208210120002802042102200342a08d067d2003200342a08d06561b200028020c106120022001102c220110251a1026200041146a220220011056200241cd8108410b107b200041146a41cd8108410b107b1059200041206a24000b5701017f230041206b22002400102041011053200041a783084107105036021c200041106a2000411c6a10762000200028021836020c20002000290210370204200041046a2200280208200028020020002802041060000b0b0041e88208411c10ad010b0b0041848308411d10ad010bda0302057f027e230041f0006b2200240002400240024010622204107022011005450d002001102d220310052101200041003a00402000200136023c200020033602382000200136023420004100360230200041306a220141b480084119103d2102200141b48008411910672101104621030340200104402003200041306a41b480084119103d1048200141016b21010c010b0b20002802342000280230470d0120002d0040044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c101f1a2000410c6a20021064200028022c450d00200041306a200210642000280250450d000240200041306a41e88208411c1063450440200041306a41848308411d10630d014197820841361000000b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d03200510590c010b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d02200510590b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b7601067f230041206b22022400102041011053200241a783084107105036021c200241046a22032002411c6a1076200228020c21042002280204210520022802082106104621072002200636021820022005360214200220043602102002200736020c200220013602082002200036020420031066000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0500@07"; + let deploy_with_biguint_arg_metadata_nothing_data_egld_value = "0061736d01000000018e011760000060027f7f0060017f017f60017f0060027f7f017f6000017f60037f7f7f017f60037f7f7f0060047f7f7f7f017f60047f7f7f7f0060027f7e0060017f017e60017e0060037f7f7f017e60057f7f7f7e7f0060017e017f600b7f7f7e7f7f7f7f7f7f7f7f006000017e60067e7f7f7f7f7f017f60027e7f0060027f7e017f60027e7e0060057f7f7f7f7f0002ee072903656e760b7369676e616c4572726f72000103656e760e626967496e74536574496e743634000a03656e760a6d4275666665724e6577000503656e760d6d427566666572417070656e64000403656e760d6d42756666657246696e697368000203656e76106d4275666665724765744c656e677468000203656e76106d616e61676564534341646472657373000303656e7618626967496e7447657445787465726e616c42616c616e6365000103656e760f6d4275666665724765744279746573000403656e761c626967496e744765744553445445787465726e616c42616c616e6365000e03656e7609626967496e744e6577000f03656e76176d616e6167656447657445534454546f6b656e44617461001003656e760f6d4275666665725365744279746573000603656e76126d427566666572476574417267756d656e74000403656e76126d427566666572417070656e644279746573000603656e76126d616e616765645369676e616c4572726f72000303656e761b736d616c6c496e74476574556e7369676e6564417267756d656e74000b03656e7619626967496e74476574556e7369676e6564417267756d656e74000103656e7617626967496e744765745369676e6564417267756d656e74000103656e7611676574417267756d656e744c656e677468000203656e760f6765744e756d417267756d656e7473000503656e7616736d616c6c496e7446696e697368556e7369676e6564000c03656e7614736d616c6c496e7446696e6973685369676e6564000c03656e76186d616e616765644765744f726967696e616c547848617368000303656e7609626967496e744d756c000703656e7609626967496e74416464000703656e76196d42756666657246726f6d426967496e74556e7369676e6564000403656e76176d427566666572546f426967496e74556e7369676e6564000403656e7609626967496e74506f77000703656e76146d427566666572436f707942797465536c696365000803656e76126d42756666657253746f726167654c6f6164000403656e76136d42756666657253746f7261676553746f7265000403656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000303656e760d6d616e6167656443616c6c6572000303656e7612626967496e7446696e6973685369676e6564000303656e760a6765744761734c656674001103656e761b6d616e61676564457865637574654f6e44657374436f6e74657874001203656e760f636c65616e52657475726e44617461000003656e76136d42756666657247657442797465536c696365000803656e76106d616e616765644173796e6343616c6c00090387018501090002050201020b02010113010504030302020206020514030708090205060101060d070202020401030300000102031503010101030307050506010803060909020401020a0802010207010101061602050d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105030100030616037f01418080080b7f004184d3080b7f004190d3080b07f40a38066d656d6f7279020004696e6974007c0667657453756d007d03616464007e1372657475726e4e667450726f70657274696573007f1772657475726e4e6674456e756d50726f706572746965730080011d72657475726e4e6674456e756d4669656c647350726f706572746965730081011572657475726e46756e6769626c6542616c616e63650082011872657475726e4e6f6e46756e6769626c6542616c616e6365008301156e6f4172674e6f52657475726e456e64706f696e740084010c72657475726e43616c6c65720085011372657475726e4d616e616765644275666665720086011572657475726e436f6e7472616374416464726573730087010d72657475726e42696775696e740088010872657475726e55380089010972657475726e553136008a010972657475726e553332008b010972657475726e553634008c010c72657475726e553332566563008d010c72657475726e553634566563008e010f72657475726e427566666572566563008f011072657475726e42696775696e745665630090010c72657475726e54776f5536340091011072657475726e54776f427566666572730092012272657475726e4f6e654275666665724f6e65553634416e644f6e6542696775696e740093011472657475726e446f75626c654f665536344172670094011872657475726e446f75626c654f6642696775696e744172670095011772657475726e417070656e6465644275666665724172670096011772657475726e53756d54776f42696775696e74417267730097011b72657475726e436f6e6361744d756c7469427566666572417267730098011572657475726e53756d4d756c7469553634417267730099011972657475726e53756d4d756c746942696775696e7441726773009a011272657475726e437573746f6d537472756374009b011572657475726e437573746f6d537472756374417267009c012272657475726e437573746f6d53747275637457697468537472756374416e64566563009d012572657475726e437573746f6d53747275637457697468537472756374416e64566563417267009e011072657475726e437573746f6d456e756d009f011372657475726e437573746f6d456e756d41726700a0011f72657475726e4669727374437573746f6d456e756d576974684669656c647300a1012072657475726e5365636f6e64437573746f6d456e756d576974684669656c647300a2011d72657475726e437573746f6d456e756d576974684669656c647341726700a3011772657475726e4f7074696f6e616c56616c7565426f6f6c00a4011a72657475726e4f7074696f6e616c56616c7565426f6f6c41726700a5011372657475726e4d756c746956616c756554776f00a6010f72657475726e426967496e7441726700a7011f63616c6c416e6f74686572436f6e747261637452657475726e54776f55363400a8012e6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536344e6f43616c6c6261636b00a901396173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f5536345769746852657475726e696e6743616c6c6261636b00aa013c6173796e6343616c6c416e6f74686572436f6e747261637452657475726e54776f553634576974684e6f6e52657475726e696e6743616c6c6261636b00ab010863616c6c4261636b00ac0107757067726164650084011f72657475726e4669727374437573746f6d456e756d5769746856616c75657300a1012072657475726e5365636f6e64437573746f6d456e756d5769746856616c75657300a2011d72657475726e437573746f6d456e756d5769746856616c75657341726700a3010a5f5f646174615f656e6403010b5f5f686561705f6261736503020adb4385011b00200120034b0440102a000b20002001360204200020023602000b0b0041948408410e1000000b1301017f102c22012000ad42ff0183100120010b1901017f41a4840841a4840828020041016b220036020020000b0f01017f10022201200010031a20010b2902017f017e2001102f210220011030210320002001103136020c20002002360208200020033703000b5801047f230041106b220124002000106a2102200141086a200028020820002802002203200210682001280208410147044041dd8308410341d88108410f1044000b200128020c2000200220036a360200200141106a24000b820102017e017f230041106b22022400200242003703082000200241086a4108104c20022903082101200241106a2400200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484840b08002000102f103b0b1d00200028020820011033200029030020011034200028020c200110350b5001027f230041106b22022400200220001005220341187420034180fe03714108747220034108764180fe03712003411876727236020c20012002410c6a410410732001200010031a200241106a24000b7701017f230041106b220224002002200042388620004280fe0383422886842000428080fc0783421886200042808080f80f834208868484200042088842808080f80f832000421888428080fc07838420004228884280fe038320004238888484843703082001200241086a41081073200241106a24000b0a002000103e200110330b0a0041948408410010370b1101017f102c220220002001100c1a20020b0700200010041a0b3101027f4100103a220210052101200041003a00102000200136020c2000200236020820002001360204200041003602000b0d002000102c2200100d1a20000b0d002000102c2200101b1a20000b0e00200041e781084120103d103b0b5a01037f230041106b2203240020002001200210672104200341086a20002802082000280200220520041068200328020841014704402001200241d88108410f1069000b200328020c2000200420056a360200200341106a24000b0f01017f102c22012000101a1a20010b0c01017f102c2200100620000b4c01037f103f2103102c2102200041feffffff074604402003104141c4d2082002100720020f0b20001005210420031041200041e4d20810081a41c4d20841e4d208200420012002100920020b0b00200041c4d20810081a0bad0101077f230041106b220324002001200242064200100a220210022204100222051002220610022207100222014200100a220810022209100b20011005450440200141cd80084120100c1a0b200341003b010e200441002003410e6a410210431a200041013a001c200020023602002000200936021820002008360214200020013602102000200736020c2000200636020820002005360204200020032d000e4100473a001d200341106a24000b0f00200020012003200210274100470b2e01017f41ed800841171037220420002001100e1a2004418481084103100e1a200420022003100e1a2004100f000b2e01017f104621010340200028020041c0d2082802004e4504402001200041f083084104104710480c010b0b20010b1301017f102c2200419484084100100c1a20000b0c00200020012002104a103a0b4601017f230041106b220224002002200141187420014180fe03714108747220014108764180fe03712001411876727236020c20002002410c6a4104100e1a200241106a24000bbf0102027e037f200141a183084106104a1010220242808080801054044002402002a7220641ebde0147410020061b450440200141a183084106104b22034280808080708321022003a72104200141a183084106104b21030c010b027e200128020041c0d2082802004e0440410121051046210442000c010b41012105200141a1830841061047210442000b21020b200020033703102000200636020420002005360200200020022004ad843703080f0b41a18308410641a68008410e1044000b2f01017f2000280200220341c0d2082802004e0440200120024187810841111044000b2000200341016a36020020030b0c00200020012002104a10100b3100200041086a200028020020012002106f044041dd8308410341d88108410f1044000b2000200028020020026a3602000b2a01027f2000106a210110462102037f2001047f200220001030106e200141016b21010c010520020b0b0b2a01027f2000106a210110462102037f2001047f20022000102f1048200141016b21010c010520020b0b0b0c002000102c2200101120000b2101017f4100103a220210054120470440200020014187820841101044000b20020b1400200020014d04400f0b4198810841121000000b1900200041c0d2082802004e04400f0b4198810841121000000b1400101420004604400f0b41aa810841191000000b190041c0d20828020041004e04400f0b4187810841111000000b0b0041c0d20810143602000b1f01017f2001105721022000410036020820002002360204200020013602000b0900200010054102760b2701017f10362101200028020820011033200029030020011034200028020c20011035200110380b0a0020001015200110150b6001027f20002802002102103621010240200245044041002001105b2000280204200110332000290310200110342000280208200110350c010b41012001105b20002802042001105c200041086a2001105d200041106a200110320b200110380b2601017f230041106b22022400200220003a000f20012002410f6a41011073200241106a24000baf0102017e047f230041106b22032400200010054103762001107420001005210503402005200441086a2206490440200341106a2400052003420037030820002004200341086a410810651a2003290308220242388620024280fe0383422886842002428080fc0783421886200242808080f80f834208868484200242088842808080f80f832002421888428080fc07838420024228884280fe0383200242388884848420011034200621040c010b0b0b5b01027f230041206b220224002000280200220310572001107420022003100536021c20024100360218200220003602140340200241086a200241146a107520022802080440200228020c200110330c0105200241206a24000b0b0b1700200041ff017141024704402000ad42ff018310160b0b2401017f1036210120002802102001105c200041146a2001105d200020011032200110380b0d0020001061200120021028000b0a0041764200100141760b1b01027f102c2200101741c38108410a10372201200010031a20010b5201037f2002200028022046047f02402002450d00034020002d0000220420012d00002205460440200041016a2100200141016a2101200241016b22020d010c020b0b200420056b21030b20030541010b450b9c0101057f230041306b22022400200241286a22034200370300200241206a22044200370300200241186a2205420037030020024200370310200241086a200110052206200241106a41201029200141002002280208200228020c10651a2000200636022020002002290310370000200041086a2005290300370000200041106a2004290300370000200041186a2003290300370000200241306a24000b0c00200020012002200310430b4b01047f106241948408410010372101200028020021032000280204220420011074200120032004100e1a200041086a2001105d2001101f1a200028020c200028021020002802141060000b5201017f230041106b220324002003410036020c20002003410c6a4104200120021078200328020c2100200341106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b1f0020012002200310022201101d21022000200136020420002002453602000b1600200020011037220020022003100e1a2000100f000b4e01017f230041106b220124002001410036020c20002001410c6a4104104c200128020c2100200141106a2400200041187420004180fe03714108747220004108764180fe0371200041187672720b0c00200020002001101820000b0a0020002000200110190b1801017f102c2101417242121001200120004172101c20010b7801017f230041106b220224002002200142388620014280fe0383422886842001428080fc0783421886200142808080f80f834208868484200142088842808080f80f832001421888428080fc07838420014228884280fe038320014238888484843703082000200241086a4108100e1a200241106a24000b850401077f230041106b2206240002400240027f024020002d000845044020002802002204100522054190ce004b0d0141bcd2082d00000d0141b8d208200536020041bcd20841013a0000200641086a200541a884084190ce001029200441002006280208200628020c10651a20002d0008044041b8d208410036020041bcd20841003a00000b200041013a00080b4101200120036a220041b8d2082802004b0d011a20002001490d0220004190ce004b0d03200141a884086a2100200341104f04402002410020026b41037122046a210520040440200021010340200220012d00003a0000200141016a2101200241016a22022005490d000b0b2005200320046b2203417c7122076a21020240200020046a22044103710440200741004c0d012004410374220141187121082004417c71220941046a2100410020016b411871210a2009280200210103402005200120087620002802002201200a7472360200200041046a2100200541046a22052002490d000b0c010b200741004c0d0020042100034020052000280200360200200041046a2100200541046a22052002490d000b0b20034103712103200420076a21000b20030440200220036a21010340200220002d00003a0000200041016a2100200241016a22022001490d000b0b41000c010b200041003a0008200420012002200310650b200641106a24000f0b102a000b102a000b0d002000102c2200101e1a20000b0b0020002001103e101f1a0b080020001070103b0b0b00200020012002100e1a0b4501017f230041106b220224002002200041187420004180fe03714108747220004108764180fe03712000411876727236020c20012002410c6a41041073200241106a24000b8a0101047f230041106b220324002001280204220241046a220420012802084b047f41000520012802002003410036020c28020020022003410c6a410410651a200328020c210220012004360204200241187420024180fe03714108747220024108764180fe037120024118767272210241010b21012000200236020420002001360200200341106a24000b4a01017f20012802002102200141feffffff07360200200241feffffff07460440418d800841191000000b41ae8308410c103721012000104636020420002001360200200020023602080b7b01027f230041106b22032400200028020821042003410036020c200028020020044102742003410c6a41041065450440200328020c21012000200441016a360208200141187420014180fe03714108747220014108764180fe037120014118767272102d200341106a24000f0b200120024187810841111044000b2f00200041086a200028020020012002106f04402003200441d88108410f1069000b2000200028020020026a3602000b3101017f230041106b22012400200141003a000f20002001410f6a410141e781084120107820012d000f200141106a24000b0a00418e8408410310370bab0102017e027f230041106b22042400200020012002107721002004420037030820001005220541094f04402001200241a68008410e1044000b20004100200420056b41106a200510431a20042903082103200441106a2400200342388620034280fe0383422886842003428080fc0783421886200342808080f80f834208868484200342088842808080f80f832003421888428080fc07838420034228884280fe038320034238888484840b1601017f1020410110534100104f2100107a200010710b0e00102041001053107a107210210b2201037f1020410110534100104f2100107a2201107222022000106c2001200210710bc00101037f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c2000412c6a220241e781084120103d21012002103c21022000280230200028022c46044020002d003c044041b8d208410036020041bcd20841003a00000b200110362201103320022001103520011038200041406b24000f0b41e78108412041a68008410e1069000b9b0202037f017e230041406a2200240010204100105341c88308410a103721012000410c6a103f200110420240024002402000280218102d220110050440200110052102200041003a003c2000200236023820002001360234200020023602302000410036022c410121010240024002402000412c6a107941ff01710e020201000b41e78108412041808008410d1069000b2000412c6a220141e781084120103dad2001103cad422086842103410021010b2000280230200028022c470d0320002d003c044041b8d208410036020041bcd20841003a00000b2001450d010b420010150c010b410110362201105b2003a7200110332003422088a720011035200110380b200041406b24000f0b41e78108412041a68008410e1069000be20101047f230041406a2200240010204100105341c88308410a103721012000410c6a103f200110422000280218102d220210052101200041003a003c2000200136023820002002360234200020013602302000410036022c02402000412c6a107941ff01714504402000412c6a220141e781084120103d2001103c21032000280230200028022c470d0120002d003c044041b8d208410036020041bcd20841003a00000b410010362201105b2001103320032001103520011038200041406b24000f0b41e78108412041808008410d1069000b41e78108412041a68008410e1069000b160010204100105341d28308410b10374200104010210b160010204100105341c88308410a10374206104010210b08001020410010530b1501017f102041001053102c22001022200010041a0b130010204100105341c483084104103710041a0b130010204101105341e083084110105010041a0b1000102041001053410a102b106d10210b0c00102041001053420310150b0d0010204100105342f40310150b0e0010204100105342c09a0c10150b10001020410010534280b4c4c32110150b1f01017f10204100105310462200410a1048200041c09a0c1048200010041a0b2101017f10204100105310462200420a106e20004280b4c4c321106e200010041a0b7f01037f230041206b220024001020410010531046220141ba8308410510371048200141bf8308410510371048200020013602101036210220002001100536021c200041003602182000200041106a3602140340200041086a200041146a107520002802080440200028020c200210330c010b0b20021038200041206a24000b9a0101067f230041106b2201240010204100105310462202410a102b106d10482002410a102b106d4102102b106b1048103621032002100521040340200041046a220520044b4504402001410036020c200220002001410c6a410410431a200128020c220041187420004180fe03714108747220004108764180fe03712000411876727220031035200521000c010b0b20031038200141106a24000b1200102041001053420a4280b4c4c32110590b2401027f10204100105341ba83084105103741bf830841051037210110041a200110041a0b2901027f10204100105341ba830841051037410a102b106d210110041a4280b4c4c3211015200110210b11001020410110534100101042018610150b1a01017f1020410110534100104f21004102102b2000106b10210b2001017f1020410110534100103a220041c483084104103710031a200010041a0b1c01017f1020410210534100104f220020004101104f1019200010210b6201037f230041106b220024001020105510542000410036020020001045210220002802001052104621012000200210560340200028020820002802044f4504402001200041f4830841081077102d10031a0c010b0b200110041a200041106a24000b5d02027f017e230041106b2200240010201055105420004100360200200010452101200028020010522000200110560340200028020820002802044f450440200041f483084108107b20027c21020c010b0b20021015200041106a24000b6401037f230041106b220024001020105510542000410036020020001045210220002802001052102c2201420010012000200210560340200028020820002802044f4504402001200041f4830841081077103b106c0c010b0b20011021200041106a24000b4501027f230041106b2200240010204100105341c483084104103721012000410a102b106d36020c20004280b4c4c3213703002000200136020820001058200041106a24000b9c0102047f017e230041106b22002400102041011053230041206b220124002001410c6a220210392002102f210320021030210420021031210202402001280210200128020c46044020012d001c044041b8d208410036020041bcd20841003a00000b2000200236020c2000200336020820002004370300200141206a24000c010b41dd8308410341a68008410e1044000b20001058200041106a24000b860101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200236021c20002001360218200020043602142000200336021020004280b4c4c321370308200041086a105f200041206a24000bd00101067f230041206b22032400102041011053200341086a2101230041406a220024002000411c6a220210392002104d21042002104e2105200041306a2002102e02402000280220200028021c460440200041106a2202200041386a2903003703002000200029033037030820002d002c044041b8d208410036020041bcd20841003a00000b200120002903083703002001200536021420012004360210200141086a2002290300370300200041406b24000c010b41dd8308410341a68008410e1044000b2001105f200341206a24000b0c00102041001053420110150b5f02017f017e102041011053027f024002404100101304404100101022014280025a0d012001a7220041ff017141034f0d020b20000c020b41dd8308410341a68008410e1044000b41dd8308410341808008410d1044000bad42ff018310150b5001037f230041206b2200240010204100105341c48308410410372101410a102b106d210220004280b4c4c3213703102000200136020420002002360208200041003602002000105a200041206a24000b8a0101057f230041206b2200240010204100105341c48308410410372103410a102b106d210410462201420a106e20014280b4c4c321106e1046220241ba8308410510371048200241bf83084105103710482000200436021c2000200336021820004280b4c4c3213703102000200236020820002001360204200041013602002000105a200041206a24000b940202057f027e230041206b22012400102041011053230041306b220024002000410c6a22021039200041003a00202002200041206a4101104c024002400240024020002d00200e020102000b41dd8308410341808008410d1044000b2000410c6a2202102f21042002103021062002103121020c010b2000410c6a2203104d21042003104e2102200041206a2003102e2000290328210520002903202106410121030b02402000280210200028020c46044020002d001c044041b8d208410036020041bcd20841003a00000b2001200537031820012006370310200120023602082001200436020420012003360200200041306a24000c010b41dd8308410341a68008410e1044000b2001105a200141206a24000b0c001020410010534101105e0b7d02037f017e230041106b220024001020105510542000410036020c2000410c6a220228020041c0d20828020048047f02400240200241dd83084103104a1010220342015804402003a741016b0d020c010b41dd8308410341fc830841121044000b410121010b20010541020b200028020c1052105e200041106a24000bab0102037f047e230041306b220024001020105510542000410036020c200041106a21012000410c6a220228020041c0d2082802004e047e420105200241dd83084103104b2103200241dd83084103104b2104200241dd83084103104b210542000b210620012005370318200120043703102001200337030820012006370300200028020c105220002903105004402000290328200029032020002903181015101510150b200041306a24000b1601017f1020410110534100102c22001012200010230b900102037f017e230041206b22002400102041011053200041a7830841071050360210200041046a200041106a1076102421032000280208210120002802042102200342a08d067d2003200342a08d06561b200028020c106120022001102c220110251a1026200041146a220220011056200241cd8108410b107b200041146a41cd8108410b107b1059200041206a24000b5701017f230041206b22002400102041011053200041a783084107105036021c200041106a2000411c6a10762000200028021836020c20002000290210370204200041046a2200280208200028020020002802041060000b0b0041e88208411c10ad010b0b0041848308411d10ad010bda0302057f027e230041f0006b2200240002400240024010622204107022011005450d002001102d220310052101200041003a00402000200136023c200020033602382000200136023420004100360230200041306a220141b480084119103d2102200141b48008411910672101104621030340200104402003200041306a41b480084119103d1048200141016b21010c010b0b20002802342000280230470d0120002d0040044041b8d208410036020041bcd20841003a00000b416c419484084100100c1a2004416c101f1a2000410c6a20021064200028022c450d00200041306a200210642000280250450d000240200041306a41e88208411c1063450440200041306a41848308411d10630d014197820841361000000b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d03200510590c010b1055105420004100360254200041d8006a2201200041d4006a10492000280254105220002903682105200029036020002802582001200310561055200028025c200028026010510d02200510590b200041f0006a24000f0b41b48008411941a68008410e1069000b41cd8208411b1000000b7601067f230041206b22022400102041011053200241a783084107105036021c200241046a22032002411c6a1076200228020c21042002280204210520022802082106104621072002200636021820022005360214200220043602102002200736020c200220013602082002200036020420031066000b0b9d040300418080080b4d696e76616c69642076616c7565726563697069656e742061646472657373206e6f7420736574696e70757420746f6f206c6f6e6773657269616c697a6572206465636f6465206572726f723a200041ed80080bb503617267756d656e74206465636f6465206572726f722028293a20746f6f2066657720617267756d656e7473746f6f206d616e7920617267756d656e747377726f6e67206e756d626572206f6620617267756d656e747343425f434c4f5355524573796e6320726573756c74696e70757420746f6f2073686f72746572726f72206465636f64696e67204553445420617474726962757465733a20626164206172726179206c656e6774686e6f2063616c6c6261636b2066756e6374696f6e20776974682074686174206e616d652065786973747320696e20636f6e74726163746173796e632063616c6c20726573756c74206973206e6f74206f6b63616c6c6261636b5f746861745f72657475726e735f726573756c7463616c6c6261636b5f746861745f72657475726e735f6e6f7468696e67726573756c746164647265737372657475726e54776f55363474657374317465737432746573744e46542d616263646566544553542d616263646566617267636f6e74726163745f61646472657373617267737661722061726773696e707574206f7574206f662072616e676573756d00000070616e6963206f636375727265640041a484080b049cffffff@0500@0000@08"; if data == deploy_with_biguint_arg_metadata_nothing_data { return_data = Some("@6f6b".to_string()); @@ -92,17 +86,11 @@ impl BlockchainInteractor for MockInteractor { } -async fn get_executor(is_returning_value: bool) -> BaseTransactionNetworkExecutor { +async fn get_executor() -> BaseTransactionNetworkExecutor { let wallet = Wallet::from_private_key(CALLER_PRIVATE_KEY).unwrap(); - let url = if is_returning_value { - RETURNING_MOCK_URL.to_string() - } else { - "".to_string() - }; - BaseTransactionNetworkExecutor::new( - url, + "".to_string(), wallet ) .await @@ -111,7 +99,7 @@ async fn get_executor(is_returning_value: bool) -> BaseTransactionNetworkExecuto #[tokio::test] async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { - let mut executor = get_executor(false).await; + let mut executor = get_executor().await; let deploy_data = DeployData { code: "../../.novax/tester-contract.wasm", @@ -135,7 +123,7 @@ async fn test_deploy_with_biguint_arg() -> Result<(), NovaXError> { #[tokio::test] async fn test_deploy_with_return_value() -> Result<(), NovaXError> { - let mut executor = get_executor(true).await; + let mut executor = get_executor().await; let deploy_data = DeployData { code: "../../.novax/tester-contract.wasm", @@ -160,7 +148,7 @@ async fn test_deploy_with_return_value() -> Result<(), NovaXError> { #[tokio::test] async fn test_deploy_with_biguint_arg_with_metadatas() -> Result<(), NovaXError> { - let mut executor = get_executor(false).await; + let mut executor = get_executor().await; let deploy_data = DeployData { code: "../../.novax/tester-contract.wasm", @@ -184,7 +172,7 @@ async fn test_deploy_with_biguint_arg_with_metadatas() -> Result<(), NovaXError> #[tokio::test] async fn test_deploy_with_biguint_arg_with_egld_value() -> Result<(), NovaXError> { - let mut executor = get_executor(false).await; + let mut executor = get_executor().await; let deploy_data = DeployData { code: "../../.novax/tester-contract.wasm", diff --git a/tester/core/tests/network_simulate.rs b/tester/core/tests/network_simulate.rs index 9b3024c..e9ca9e8 100644 --- a/tester/core/tests/network_simulate.rs +++ b/tester/core/tests/network_simulate.rs @@ -1,19 +1,20 @@ -mod utils; - use std::sync::Arc; + use async_trait::async_trait; -use hyper::{http, StatusCode}; +use hyper::StatusCode; +use num_bigint::BigUint; +use serde::Serialize; use tokio::sync::Mutex; + use novax::Address; use novax::errors::NovaXError; -use num_bigint::BigUint; -use reqwest::{Body, Response}; -use serde::Serialize; -use novax::tester::tester::TesterContract; use novax::executor::{BaseSimulationNetworkExecutor, SimulationNetworkExecutor}; +use novax::tester::tester::TesterContract; use novax_request::error::request::RequestError; use novax_request::gateway::client::GatewayClient; +mod utils; + const CALLER: &str = "erd1uh67c2lkhyj4vh73akv7jky9sfgvus8awwcj64uju69mmfne5u7q299t7g"; const TESTER_CONTRACT_ADDRESS: &str = "erd1qqqqqqqqqqqqqpgq7x53hfeg9558dmzjg9lqyfar77z8wrxf5u7qrawwh0"; diff --git a/token/Cargo.toml b/token/Cargo.toml index 687f7b0..9f85bfa 100644 --- a/token/Cargo.toml +++ b/token/Cargo.toml @@ -17,9 +17,9 @@ novax-data = { path = "../data", version = "0.1.6" } novax-request = { path = "../request", version = "0.1.6" } num-bigint = "0.4.4" async-trait = "0.1.73" -multiversx-sc = { path = "../../mx-sdk-rs/framework/base" } -multiversx-sc-scenario = { path = "../../mx-sdk-rs/framework/scenario" } -multiversx-sc-codec = { path = "../../mx-sdk-rs/data/codec" } +multiversx-sc = "0.50.3" +multiversx-sc-scenario = "0.50.3" +multiversx-sc-codec = "0.19.0" base64 = "0.21.5" [dev-dependencies] diff --git a/token/src/mock/request.rs b/token/src/mock/request.rs index 6f0458c..88ff9b3 100644 --- a/token/src/mock/request.rs +++ b/token/src/mock/request.rs @@ -1,6 +1,5 @@ use async_trait::async_trait; use http::StatusCode; -use reqwest::ResponseBuilderExt; use serde::Serialize; use serde_json::Value; From cca7becbd3c92a11f40a1dbfe2c924cb1ebdb55e Mon Sep 17 00:00:00 2001 From: Fusee Date: Thu, 30 May 2024 18:50:24 +0200 Subject: [PATCH 18/25] various fixes on query and transactions --- Cargo.lock | 1 + core/src/lib.rs | 1 + executor/Cargo.toml | 1 + executor/src/error/wallet.rs | 3 +- executor/src/mocking/executor.rs | 7 +- executor/src/network/query/executor.rs | 7 +- executor/src/network/query/models/response.rs | 51 +- executor/src/network/simulate.rs | 7 +- executor/src/network/transaction/executor.rs | 8 +- .../src/network/transaction/interactor.rs | 21 +- .../transaction/models/send_request.rs | 17 +- .../models/transaction_on_network.rs | 899 +++++++++++++++++- executor/src/network/utils/transaction.rs | 6 +- executor/src/network/utils/wallet.rs | 39 +- .../src/utils/transaction/normalization.rs | 4 +- executor/src/utils/transaction/results.rs | 14 +- request/src/gateway/reqwest.rs | 2 + tester/core/tests/network_call.rs | 12 +- tester/core/tests/network_deploy.rs | 26 +- tester/core/tests/network_query.rs | 3 +- 20 files changed, 1071 insertions(+), 58 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1836b27..4e18bf6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1432,6 +1432,7 @@ dependencies = [ "novax-data", "novax-request", "num-bigint", + "pem", "reqwest 0.12.4", "serde", "serde_json", diff --git a/core/src/lib.rs b/core/src/lib.rs index 62e3b95..1786ac2 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -67,6 +67,7 @@ include!(concat!(env!("OUT_DIR"), "/generated_lib.rs")); pub use multiversx_sdk::data::address::Address as SDKAddress; pub use multiversx_sdk::data::vm::VMOutputApi; +pub use novax_executor::Wallet; pub use novax_data::Address; pub use multiversx_sc::types::CodeMetadata; use multiversx_sc_scenario::imports::StaticApi; diff --git a/executor/Cargo.toml b/executor/Cargo.toml index 879ee13..852bcf9 100644 --- a/executor/Cargo.toml +++ b/executor/Cargo.toml @@ -18,6 +18,7 @@ serde_json = "1.0.108" hex = "0.4.3" base64 = "0.21.3" sha3 = "0.10.8" +pem = "3.0.4" novax-data = { path = "../data", version = "0.1.6" } novax-request = { path = "../request", version = "0.1.6" } multiversx-sc = "0.50.3" diff --git a/executor/src/error/wallet.rs b/executor/src/error/wallet.rs index b35c575..4ef5762 100644 --- a/executor/src/error/wallet.rs +++ b/executor/src/error/wallet.rs @@ -4,7 +4,8 @@ use crate::ExecutorError; #[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] pub enum WalletError { - InvalidPrivateKey + InvalidPrivateKey, + InvalidPemFile } impl From for ExecutorError { diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index 8429600..8da5948 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -21,7 +21,7 @@ use crate::error::executor::ExecutorError; use crate::error::mock_deploy::MockDeployError; use crate::error::mock_transaction::MockTransactionError; use crate::error::transaction::TransactionError; -use crate::ScenarioWorld; +use crate::{ScenarioWorld, TransactionOnNetwork}; use crate::utils::transaction::token_transfer::TokenTransfer; use crate::utils::transaction::transfers::get_egld_or_esdt_transfers; @@ -130,8 +130,11 @@ impl TransactionExecutor for MockExecutor return Err(TransactionError::CannotDecodeSmartContractResult.into()) }; + let mut response = TransactionOnNetwork::default(); + response.transaction.status = "successful".to_string(); + let call_result = CallResult { - response: Default::default(), + response, result: Some(output_managed.to_native()), }; diff --git a/executor/src/network/query/executor.rs b/executor/src/network/query/executor.rs index 2fb0774..1a77059 100644 --- a/executor/src/network/query/executor.rs +++ b/executor/src/network/query/executor.rs @@ -6,7 +6,7 @@ use num_bigint::BigUint; use novax_data::{NativeConvertible, parse_query_return_string_data}; -use crate::{BlockchainProxy, ExecutorError, QueryExecutor, TokenTransfer, VmValuesQueryRequest}; +use crate::{BlockchainProxy, ExecutorError, NetworkQueryError, QueryExecutor, TokenTransfer, VmValuesQueryRequest}; use crate::network::query::proxy::NetworkBlockchainProxy; use crate::utils::transaction::normalization::NormalizationInOut; @@ -79,8 +79,11 @@ impl QueryExecutor for QueryNetworkExecutor { let blockchain = Proxy::new(self.gateway_url.clone()); let result = blockchain.execute_vmquery(&vm_request).await?; + let Some(return_data) = result.data.return_data else { + return Err(NetworkQueryError::ErrorInResponse { message: result.data.return_message }.into()) + }; - let data: Vec<&str> = result.data.return_data.iter().map(AsRef::as_ref).collect(); + let data: Vec<&str> = return_data.iter().map(AsRef::as_ref).collect(); Ok(parse_query_return_string_data::(data.as_slice())?.to_native()) } diff --git a/executor/src/network/query/models/response.rs b/executor/src/network/query/models/response.rs index 2d4ced5..11d564e 100644 --- a/executor/src/network/query/models/response.rs +++ b/executor/src/network/query/models/response.rs @@ -16,5 +16,54 @@ pub struct VmValuesQueryResponseData { #[derive(Deserialize)] #[serde(rename_all = "camelCase")] pub struct VmValuesQueryResponseDataData { - pub return_data: Vec + pub return_data: Option>, + pub return_message: String +} + +#[cfg(test)] +mod tests { + use crate::network::query::models::response::VmValuesQueryResponse; + + #[test] + fn test_deserialize_execution_error() { + let data = r#" +{ + "data": { + "blockInfo": { + "nonce": 20144493, + "hash": "325c96bb497e497fe417aa20dbcba9fc233654e9999982fdf9f5599ec83daa2f", + "rootHash": "81e0c2bcb292ae083af60fdfa1889d032dbfc79e4d14a8d1a0dbe9c5606d5033" + }, + "data": { + "returnData": null, + "returnCode": "contract not found", + "returnMessage": "invalid contract code (not found)", + "gasRemaining": 0, + "gasRefund": 0, + "outputAccounts": {}, + "deletedAccounts": null, + "touchedAccounts": null, + "logs": [ + { + "identifier": "aW50ZXJuYWxWTUVycm9ycw==", + "address": "erd1qqqqqqqqqqqqqpgqhnmuen6gx7unfmqsjwx0ul7ezjyg2ndfvcqsa4nqax", + "topics": [ + "AAAAAAAAAAAFALz3zM9IN7k07BCTjP5/2RSIhU2pZgE=", + "dmlld1BhaXJz" + ], + "data": "CglydW50aW1lLmdvOjgyNyBbaW52YWxpZCBjb250cmFjdCBjb2RlIChub3QgZm91bmQpXSBbdmlld1BhaXJzXQ==", + "additionalData": [ + "CglydW50aW1lLmdvOjgyNyBbaW52YWxpZCBjb250cmFjdCBjb2RlIChub3QgZm91bmQpXSBbdmlld1BhaXJzXQ==" + ] + } + ] + } + }, + "error": "", + "code": "successful" +} + "#; + + _ = serde_json::from_str::(data).unwrap(); + } } \ No newline at end of file diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index 8a23206..e9f5c0e 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -9,7 +9,7 @@ use tokio::join; use novax_data::{Address, NativeConvertible}; use novax_request::gateway::client::GatewayClient; -use crate::{ExecutorError, GatewayError, SimulationError, SimulationGatewayRequest, SimulationGatewayResponse, TransactionExecutor, TransactionOnNetworkTransactionSmartContractResult}; +use crate::{ExecutorError, GatewayError, SimulationError, SimulationGatewayRequest, SimulationGatewayResponse, TransactionExecutor, TransactionOnNetwork, TransactionOnNetworkTransactionSmartContractResult}; use crate::call_result::CallResult; use crate::error::transaction::TransactionError; use crate::network::models::simulate::request::SimulationGatewayRequestBody; @@ -196,8 +196,11 @@ impl TransactionExecutor for BaseSimulationNetworkExecuto return Err(TransactionError::CannotDecodeSmartContractResult.into()) }; + let mut response = TransactionOnNetwork::default(); + response.transaction.status = "success".to_string(); + let call_result = CallResult { - response: Default::default(), + response, result: Some(output_managed.to_native()), }; diff --git a/executor/src/network/transaction/executor.rs b/executor/src/network/transaction/executor.rs index e0b535b..73c6606 100644 --- a/executor/src/network/transaction/executor.rs +++ b/executor/src/network/transaction/executor.rs @@ -141,7 +141,7 @@ impl TransactionExecutor for BaseTransactionNe let Some(mut sc_result) = find_smart_contract_result( &result.transaction.smart_contract_results, - Some(&result.transaction.logs) + result.transaction.logs.as_ref() )? else { return Err(TransactionError::NoSmartContractResult.into()) }; @@ -213,7 +213,11 @@ impl DeployExecutor for BaseTransactionNetwork ) .await?; - let Some(sc_deploy_event) = find_sc_deploy_event(&deploy_result.response.transaction.logs.events) else { + let Some(logs) = deploy_result.response.transaction.logs.as_ref() else { + return Err(TransactionError::NoSCDeployLogInTheResponse.into()) + }; + + let Some(sc_deploy_event) = find_sc_deploy_event(&logs.events) else { return Err(TransactionError::NoSCDeployLogInTheResponse.into()) }; diff --git a/executor/src/network/transaction/interactor.rs b/executor/src/network/transaction/interactor.rs index 41fd8bc..87fca7b 100644 --- a/executor/src/network/transaction/interactor.rs +++ b/executor/src/network/transaction/interactor.rs @@ -1,6 +1,7 @@ use std::time::Duration; use async_trait::async_trait; +use base64::Engine; use num_bigint::BigUint; use novax_data::Address; @@ -10,7 +11,7 @@ use crate::ExecutorError; use crate::network::models::address::info::AddressGatewayInfoAccount; use crate::network::models::network::config::NetworkGatewayConfig; use crate::network::transaction::models::send_request::TransactionSendRequest; -use crate::network::transaction::models::transaction_on_network::TransactionOnNetwork; +use crate::network::transaction::models::transaction_on_network::{FINAL_TRANSACTION_STATUS, TransactionOnNetwork}; use crate::network::utils::address::get_address_info; use crate::network::utils::network::get_network_config; use crate::network::utils::transaction::{get_transaction_on_network, send_transaction}; @@ -63,7 +64,7 @@ impl Interactor { tx_hash ).await?; - if transaction_on_network.transaction.status == "executed" { + if FINAL_TRANSACTION_STATUS.contains(&transaction_on_network.transaction.status.as_ref()) { return Ok(transaction_on_network) } @@ -95,18 +96,20 @@ impl Interactor { gas_limit: u64, data: String, chain_id: String, - version: u64, - options: u64 + version: u32, + options: u32 ) -> TransactionSendRequest { + let base64_encoded_data = base64::engine::general_purpose::STANDARD.encode(data); + let tx_to_sign = SignableTransaction { nonce, - value: value.clone(), - receiver: receiver.clone(), - sender: sender.clone(), + value, + receiver, + sender, gas_price, gas_limit, - data: data.clone(), - chain_id: chain_id.clone(), + data: Some(base64_encoded_data), + chain_id, version, options, }; diff --git a/executor/src/network/transaction/models/send_request.rs b/executor/src/network/transaction/models/send_request.rs index 243616b..ead3538 100644 --- a/executor/src/network/transaction/models/send_request.rs +++ b/executor/src/network/transaction/models/send_request.rs @@ -1,14 +1,25 @@ use serde::Serialize; #[derive(Serialize)] +#[serde(rename_all = "camelCase")] pub struct TransactionSendRequest { pub nonce: u64, pub value: String, pub receiver: String, + pub sender: String, pub gas_price: u64, pub gas_limit: u64, - pub data: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub data: Option, + pub signature: String, + #[serde(rename = "chainID")] pub chain_id: String, - pub version: u64, - pub signature: String + pub version: u32, + #[serde(skip_serializing_if = "is_zero")] + pub options: u32, +} + +#[allow(clippy::trivially_copy_pass_by_ref)] +fn is_zero(num: &u32) -> bool { + *num == 0 } \ No newline at end of file diff --git a/executor/src/network/transaction/models/transaction_on_network.rs b/executor/src/network/transaction/models/transaction_on_network.rs index 23c2c1d..c60177e 100644 --- a/executor/src/network/transaction/models/transaction_on_network.rs +++ b/executor/src/network/transaction/models/transaction_on_network.rs @@ -2,6 +2,9 @@ use serde::Deserialize; use crate::utils::transaction::results::find_sc_error; +pub(crate) const SUCCESS_TRANSACTION_STATUS: [&str; 2] = ["success", "successful"]; +pub(crate) const FINAL_TRANSACTION_STATUS: [&str; 3] = ["success", "successful", "fail"]; + #[derive(Deserialize, Clone, Default)] #[serde(rename_all = "camelCase")] pub struct TransactionOnNetworkResponse { @@ -21,7 +24,7 @@ pub struct TransactionOnNetworkTransaction { pub gas_used: u64, pub smart_contract_results: Option>, pub status: String, - pub logs: TransactionOnNetworkTransactionLogs + pub logs: Option } #[derive(Deserialize, Clone, Default)] @@ -50,10 +53,902 @@ pub struct TransactionOnNetworkTransactionLogsEvents { impl TransactionOnNetwork { pub fn is_success(&self) -> bool { - if let Ok(None) = find_sc_error(&self.transaction.logs) { + if !SUCCESS_TRANSACTION_STATUS.contains(&self.transaction.status.as_ref()) { + return false; + } + + let Some(logs) = self.transaction.logs.as_ref() else { + return true + }; + + if let Ok(None) = find_sc_error(logs) { true } else { false } } +} + +#[cfg(test)] +mod tests { + use crate::TransactionOnNetworkResponse; + + #[test] + fn test_deserialize_successful_swap() { + let data = r#" +{ + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "BuiltInFunctionCall", + "processingTypeOnDestination": "SCInvoking", + "hash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "nonce": 1255, + "round": 3844407, + "epoch": 1576, + "value": "0", + "receiver": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "sender": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "gasPrice": 1000000000, + "gasLimit": 30000000, + "gasUsed": 22468098, + "data": "RVNEVFRyYW5zZmVyQDU3NDU0NzRjNDQyZDYxMzIzODYzMzUzOUAwZGUwYjZiM2E3NjQwMDAwQDczNzc2MTcwNTQ2ZjZiNjU2ZTczNDY2OTc4NjU2NDQ5NmU3MDc1NzRANTU1MzQ0NDMyZDMzMzUzMDYzMzQ2NUAwMWEyNTc5OA==", + "signature": "7183d3cb779ba376e6cb1f09cdf03325ee2b60e5274374b47e080981b802f41692c499f114fe352802bd7a7695aac1edf6c27cc6cc1a4f0fba54aba1f54e4c03", + "sourceShard": 1, + "destinationShard": 1, + "blockNonce": 3778507, + "blockHash": "f088d44a244c21913767b484719c430589cbe04419df33ea53360b911ce8ae3f", + "notarizedAtSourceInMetaNonce": 3780438, + "NotarizedAtSourceInMetaHash": "0cb49fcb2a943d8e155bd041032c93d953487e24ff14387c369b7cce5a224d2b", + "notarizedAtDestinationInMetaNonce": 3780438, + "notarizedAtDestinationInMetaHash": "0cb49fcb2a943d8e155bd041032c93d953487e24ff14387c369b7cce5a224d2b", + "miniblockType": "TxBlock", + "miniblockHash": "88fd59d5dba5305633c2992955f424f2aa97a008120c52ef9e10bfa9b51cd61a", + "hyperblockNonce": 3780438, + "hyperblockHash": "0cb49fcb2a943d8e155bd041032c93d953487e24ff14387c369b7cce5a224d2b", + "timestamp": 1717066442, + "smartContractResults": [ + { + "hash": "75b44b7c9a3b0fd35c70162d006e576f77af592a5f2a6eaad22cdd24b57c64e9", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgqzw0d0tj25qme9e4ukverjjjqle6xamay0n4s5r0v9g", + "sender": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "data": "ESDTTransfer@5745474c442d613238633539@0388f27d8d3000@737761704e6f466565416e64466f7277617264@4d45582d613635396430@0000000000000000000000000000000000000000000000000000000000000000", + "prevTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "originalTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "originalSender": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "tokens": [ + "WEGLD-a28c59" + ], + "esdtValues": [ + "995000000000000" + ], + "operation": "ESDTTransfer", + "function": "swapNoFeeAndForward" + }, + { + "hash": "0c8456d6acb7b835dd2ed5f851bcfde19c898086ed0c5cfd1edabd5360c28687", + "nonce": 1256, + "value": 75319020000000, + "receiver": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "sender": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "data": "@6f6b@0000000b555344432d33353063346500000000000000000000000401a6868d", + "prevTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "originalTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "operation": "transfer", + "isRefund": true + }, + { + "hash": "9054856f6e4b361801b69efa70e7265b017657f273452b5e2eaafdcbd11dad2e", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "sender": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "data": "swapTokensFixedInput@555344432d333530633465@01a25798", + "prevTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "originalTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "gasLimit": 29559500, + "gasPrice": 1000000000, + "callType": 0, + "originalSender": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "operation": "transfer", + "function": "swapTokensFixedInput" + }, + { + "hash": "96a0496387b4b4f790cf30012bd434732ac60d3b1eb0d3f04c39fa2705432397", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgqw88ux2l44eufvwz2uhvduhq03g8pxc4j0n4s0frzjz", + "sender": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "data": "ESDTTransfer@5745474c442d613238633539@048c27395000@6465706f7369745377617046656573", + "prevTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "originalTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "originalSender": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "tokens": [ + "WEGLD-a28c59" + ], + "esdtValues": [ + "5000000000000" + ], + "operation": "ESDTTransfer", + "function": "depositSwapFees" + }, + { + "hash": "fa78830f8c2629c840f4e558c198cc0986f4d1ea4d76e7a6ade86911620d8c1c", + "nonce": 0, + "value": 0, + "receiver": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "sender": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "data": "ESDTTransfer@555344432d333530633465@01a6868d", + "prevTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "originalTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "originalSender": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "tokens": [ + "USDC-350c4e" + ], + "esdtValues": [ + "27690637" + ], + "operation": "ESDTTransfer" + } + ], + "logs": { + "address": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "events": [ + { + "address": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "identifier": "ESDTTransfer", + "topics": [ + "V0VHTEQtYTI4YzU5", + "", + "DeC2s6dkAAA=", + "AAAAAAAAAAAFAFgTchSw4UwpSGChbBEEKqcavBcgfOs=" + ], + "data": null, + "additionalData": [ + "", + "RVNEVFRyYW5zZmVy", + "V0VHTEQtYTI4YzU5", + "DeC2s6dkAAA=", + "c3dhcFRva2Vuc0ZpeGVkSW5wdXQ=", + "VVNEQy0zNTBjNGU=", + "AaJXmA==" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "identifier": "ESDTTransfer", + "topics": [ + "V0VHTEQtYTI4YzU5", + "", + "BIwnOVAA", + "AAAAAAAAAAAFAHHPwyv1rniWOErl2N5cD4oOE2KyfOs=" + ], + "data": "RXhlY3V0ZU9uRGVzdENvbnRleHQ=", + "additionalData": [ + "RXhlY3V0ZU9uRGVzdENvbnRleHQ=", + "RVNEVFRyYW5zZmVy", + "V0VHTEQtYTI4YzU5", + "BIwnOVAA", + "ZGVwb3NpdFN3YXBGZWVz" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqw88ux2l44eufvwz2uhvduhq03g8pxc4j0n4s0frzjz", + "identifier": "depositSwapFees", + "topics": [ + "ZGVwb3NpdF9zd2FwX2ZlZXNfZXZlbnQ=", + "AAAAAAAAAAAFAFgTchSw4UwpSGChbBEEKqcavBcgfOs=", + "1w==", + "AAAADFdFR0xELWEyOGM1OQAAAAAAAAAAAAAABgSMJzlQAA==" + ], + "data": null, + "additionalData": [ + "" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "identifier": "ESDTTransfer", + "topics": [ + "V0VHTEQtYTI4YzU5", + "", + "A4jyfY0wAA==", + "AAAAAAAAAAAFABOe165KoDeS5ryzMjlKQP50bu+kfOs=" + ], + "data": "RXhlY3V0ZU9uRGVzdENvbnRleHQ=", + "additionalData": [ + "RXhlY3V0ZU9uRGVzdENvbnRleHQ=", + "RVNEVFRyYW5zZmVy", + "V0VHTEQtYTI4YzU5", + "A4jyfY0wAA==", + "c3dhcE5vRmVlQW5kRm9yd2FyZA==", + "TUVYLWE2NTlkMA==", + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqzw0d0tj25qme9e4ukverjjjqle6xamay0n4s5r0v9g", + "identifier": "ESDTLocalBurn", + "topics": [ + "TUVYLWE2NTlkMA==", + "", + "AWETfrHs3tgu/Q==" + ], + "data": null, + "additionalData": null + }, + { + "address": "erd1qqqqqqqqqqqqqpgqzw0d0tj25qme9e4ukverjjjqle6xamay0n4s5r0v9g", + "identifier": "swapNoFeeAndForward", + "topics": [ + "c3dhcF9ub19mZWVfYW5kX2ZvcndhcmQ=", + "TUVYLWE2NTlkMA==", + "AAAAAAAAAAAFAFgTchSw4UwpSGChbBEEKqcavBcgfOs=", + "Big=" + ], + "data": "AAAAAAAAAAAFAFgTchSw4UwpSGChbBEEKqcavBcgfOsAAAAMV0VHTEQtYTI4YzU5AAAABwOI8n2NMAAAAAAKTUVYLWE2NTlkMAAAAAoBYRN+seze2C79AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADmnywAAAAAAAAYoAAAAAGZYWso=", + "additionalData": [ + "AAAAAAAAAAAFAFgTchSw4UwpSGChbBEEKqcavBcgfOsAAAAMV0VHTEQtYTI4YzU5AAAABwOI8n2NMAAAAAAKTUVYLWE2NTlkMAAAAAoBYRN+seze2C79AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADmnywAAAAAAAAYoAAAAAGZYWso=" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "identifier": "ESDTTransfer", + "topics": [ + "VVNEQy0zNTBjNGU=", + "", + "AaaGjQ==", + "NEq8RBGc/KziU94F4zwBeWwS+W87zFK1BLm8K5aSfOs=" + ], + "data": "RGlyZWN0Q2FsbA==", + "additionalData": [ + "RGlyZWN0Q2FsbA==", + "RVNEVFRyYW5zZmVy", + "VVNEQy0zNTBjNGU=", + "AaaGjQ==" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "identifier": "swapTokensFixedInput", + "topics": [ + "c3dhcA==", + "V0VHTEQtYTI4YzU5", + "VVNEQy0zNTBjNGU=", + "NEq8RBGc/KziU94F4zwBeWwS+W87zFK1BLm8K5aSfOs=", + "Big=" + ], + "data": "NEq8RBGc/KziU94F4zwBeWwS+W87zFK1BLm8K5aSfOsAAAAMV0VHTEQtYTI4YzU5AAAACA3gtrOnZAAAAAAAC1VTREMtMzUwYzRlAAAABAGmho0AAAAHA41+pMaAAAAAAAoEzt4YZBpkcbUoAAAABZLSUp2BAAAAAAA5p8sAAAAAAAAGKAAAAABmWFrK", + "additionalData": [ + "NEq8RBGc/KziU94F4zwBeWwS+W87zFK1BLm8K5aSfOsAAAAMV0VHTEQtYTI4YzU5AAAACA3gtrOnZAAAAAAAC1VTREMtMzUwYzRlAAAABAGmho0AAAAHA41+pMaAAAAAAAoEzt4YZBpkcbUoAAAABZLSUp2BAAAAAAA5p8sAAAAAAAAGKAAAAABmWFrK" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "identifier": "completedTxEvent", + "topics": [ + "hKyvZSjmVb0ZMKwSsT7mivFavYtfxLpGRLULpPiUADI=" + ], + "data": null, + "additionalData": null + } + ] + }, + "status": "success", + "tokens": [ + "WEGLD-a28c59" + ], + "esdtValues": [ + "1000000000000000000" + ], + "operation": "ESDTTransfer", + "function": "swapTokensFixedInput", + "initiallyPaidFee": "538095000000000", + "fee": "462775980000000", + "chainID": "D", + "version": 1, + "options": 0 + } + }, + "error": "", + "code": "successful" +} + "#; + + _ = serde_json::from_str::(data).unwrap(); + } + + #[test] + fn test_is_success_successful_swap() { + let data = r#" +{ + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "BuiltInFunctionCall", + "processingTypeOnDestination": "SCInvoking", + "hash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "nonce": 1255, + "round": 3844407, + "epoch": 1576, + "value": "0", + "receiver": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "sender": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "gasPrice": 1000000000, + "gasLimit": 30000000, + "gasUsed": 22468098, + "data": "RVNEVFRyYW5zZmVyQDU3NDU0NzRjNDQyZDYxMzIzODYzMzUzOUAwZGUwYjZiM2E3NjQwMDAwQDczNzc2MTcwNTQ2ZjZiNjU2ZTczNDY2OTc4NjU2NDQ5NmU3MDc1NzRANTU1MzQ0NDMyZDMzMzUzMDYzMzQ2NUAwMWEyNTc5OA==", + "signature": "7183d3cb779ba376e6cb1f09cdf03325ee2b60e5274374b47e080981b802f41692c499f114fe352802bd7a7695aac1edf6c27cc6cc1a4f0fba54aba1f54e4c03", + "sourceShard": 1, + "destinationShard": 1, + "blockNonce": 3778507, + "blockHash": "f088d44a244c21913767b484719c430589cbe04419df33ea53360b911ce8ae3f", + "notarizedAtSourceInMetaNonce": 3780438, + "NotarizedAtSourceInMetaHash": "0cb49fcb2a943d8e155bd041032c93d953487e24ff14387c369b7cce5a224d2b", + "notarizedAtDestinationInMetaNonce": 3780438, + "notarizedAtDestinationInMetaHash": "0cb49fcb2a943d8e155bd041032c93d953487e24ff14387c369b7cce5a224d2b", + "miniblockType": "TxBlock", + "miniblockHash": "88fd59d5dba5305633c2992955f424f2aa97a008120c52ef9e10bfa9b51cd61a", + "hyperblockNonce": 3780438, + "hyperblockHash": "0cb49fcb2a943d8e155bd041032c93d953487e24ff14387c369b7cce5a224d2b", + "timestamp": 1717066442, + "smartContractResults": [ + { + "hash": "75b44b7c9a3b0fd35c70162d006e576f77af592a5f2a6eaad22cdd24b57c64e9", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgqzw0d0tj25qme9e4ukverjjjqle6xamay0n4s5r0v9g", + "sender": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "data": "ESDTTransfer@5745474c442d613238633539@0388f27d8d3000@737761704e6f466565416e64466f7277617264@4d45582d613635396430@0000000000000000000000000000000000000000000000000000000000000000", + "prevTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "originalTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "originalSender": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "tokens": [ + "WEGLD-a28c59" + ], + "esdtValues": [ + "995000000000000" + ], + "operation": "ESDTTransfer", + "function": "swapNoFeeAndForward" + }, + { + "hash": "0c8456d6acb7b835dd2ed5f851bcfde19c898086ed0c5cfd1edabd5360c28687", + "nonce": 1256, + "value": 75319020000000, + "receiver": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "sender": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "data": "@6f6b@0000000b555344432d33353063346500000000000000000000000401a6868d", + "prevTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "originalTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "operation": "transfer", + "isRefund": true + }, + { + "hash": "9054856f6e4b361801b69efa70e7265b017657f273452b5e2eaafdcbd11dad2e", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "sender": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "data": "swapTokensFixedInput@555344432d333530633465@01a25798", + "prevTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "originalTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "gasLimit": 29559500, + "gasPrice": 1000000000, + "callType": 0, + "originalSender": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "operation": "transfer", + "function": "swapTokensFixedInput" + }, + { + "hash": "96a0496387b4b4f790cf30012bd434732ac60d3b1eb0d3f04c39fa2705432397", + "nonce": 0, + "value": 0, + "receiver": "erd1qqqqqqqqqqqqqpgqw88ux2l44eufvwz2uhvduhq03g8pxc4j0n4s0frzjz", + "sender": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "data": "ESDTTransfer@5745474c442d613238633539@048c27395000@6465706f7369745377617046656573", + "prevTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "originalTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "originalSender": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "tokens": [ + "WEGLD-a28c59" + ], + "esdtValues": [ + "5000000000000" + ], + "operation": "ESDTTransfer", + "function": "depositSwapFees" + }, + { + "hash": "fa78830f8c2629c840f4e558c198cc0986f4d1ea4d76e7a6ade86911620d8c1c", + "nonce": 0, + "value": 0, + "receiver": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "sender": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "data": "ESDTTransfer@555344432d333530633465@01a6868d", + "prevTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "originalTxHash": "84acaf6528e655bd1930ac12b13ee68af15abd8b5fc4ba4644b50ba4f8940032", + "gasLimit": 0, + "gasPrice": 1000000000, + "callType": 0, + "originalSender": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "tokens": [ + "USDC-350c4e" + ], + "esdtValues": [ + "27690637" + ], + "operation": "ESDTTransfer" + } + ], + "logs": { + "address": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "events": [ + { + "address": "erd1x39tc3q3nn72ecjnmcz7x0qp09kp97t080x99dgyhx7zh95j0n4szskhlv", + "identifier": "ESDTTransfer", + "topics": [ + "V0VHTEQtYTI4YzU5", + "", + "DeC2s6dkAAA=", + "AAAAAAAAAAAFAFgTchSw4UwpSGChbBEEKqcavBcgfOs=" + ], + "data": null, + "additionalData": [ + "", + "RVNEVFRyYW5zZmVy", + "V0VHTEQtYTI4YzU5", + "DeC2s6dkAAA=", + "c3dhcFRva2Vuc0ZpeGVkSW5wdXQ=", + "VVNEQy0zNTBjNGU=", + "AaJXmA==" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "identifier": "ESDTTransfer", + "topics": [ + "V0VHTEQtYTI4YzU5", + "", + "BIwnOVAA", + "AAAAAAAAAAAFAHHPwyv1rniWOErl2N5cD4oOE2KyfOs=" + ], + "data": "RXhlY3V0ZU9uRGVzdENvbnRleHQ=", + "additionalData": [ + "RXhlY3V0ZU9uRGVzdENvbnRleHQ=", + "RVNEVFRyYW5zZmVy", + "V0VHTEQtYTI4YzU5", + "BIwnOVAA", + "ZGVwb3NpdFN3YXBGZWVz" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqw88ux2l44eufvwz2uhvduhq03g8pxc4j0n4s0frzjz", + "identifier": "depositSwapFees", + "topics": [ + "ZGVwb3NpdF9zd2FwX2ZlZXNfZXZlbnQ=", + "AAAAAAAAAAAFAFgTchSw4UwpSGChbBEEKqcavBcgfOs=", + "1w==", + "AAAADFdFR0xELWEyOGM1OQAAAAAAAAAAAAAABgSMJzlQAA==" + ], + "data": null, + "additionalData": [ + "" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "identifier": "ESDTTransfer", + "topics": [ + "V0VHTEQtYTI4YzU5", + "", + "A4jyfY0wAA==", + "AAAAAAAAAAAFABOe165KoDeS5ryzMjlKQP50bu+kfOs=" + ], + "data": "RXhlY3V0ZU9uRGVzdENvbnRleHQ=", + "additionalData": [ + "RXhlY3V0ZU9uRGVzdENvbnRleHQ=", + "RVNEVFRyYW5zZmVy", + "V0VHTEQtYTI4YzU5", + "A4jyfY0wAA==", + "c3dhcE5vRmVlQW5kRm9yd2FyZA==", + "TUVYLWE2NTlkMA==", + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqzw0d0tj25qme9e4ukverjjjqle6xamay0n4s5r0v9g", + "identifier": "ESDTLocalBurn", + "topics": [ + "TUVYLWE2NTlkMA==", + "", + "AWETfrHs3tgu/Q==" + ], + "data": null, + "additionalData": null + }, + { + "address": "erd1qqqqqqqqqqqqqpgqzw0d0tj25qme9e4ukverjjjqle6xamay0n4s5r0v9g", + "identifier": "swapNoFeeAndForward", + "topics": [ + "c3dhcF9ub19mZWVfYW5kX2ZvcndhcmQ=", + "TUVYLWE2NTlkMA==", + "AAAAAAAAAAAFAFgTchSw4UwpSGChbBEEKqcavBcgfOs=", + "Big=" + ], + "data": "AAAAAAAAAAAFAFgTchSw4UwpSGChbBEEKqcavBcgfOsAAAAMV0VHTEQtYTI4YzU5AAAABwOI8n2NMAAAAAAKTUVYLWE2NTlkMAAAAAoBYRN+seze2C79AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADmnywAAAAAAAAYoAAAAAGZYWso=", + "additionalData": [ + "AAAAAAAAAAAFAFgTchSw4UwpSGChbBEEKqcavBcgfOsAAAAMV0VHTEQtYTI4YzU5AAAABwOI8n2NMAAAAAAKTUVYLWE2NTlkMAAAAAoBYRN+seze2C79AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADmnywAAAAAAAAYoAAAAAGZYWso=" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "identifier": "ESDTTransfer", + "topics": [ + "VVNEQy0zNTBjNGU=", + "", + "AaaGjQ==", + "NEq8RBGc/KziU94F4zwBeWwS+W87zFK1BLm8K5aSfOs=" + ], + "data": "RGlyZWN0Q2FsbA==", + "additionalData": [ + "RGlyZWN0Q2FsbA==", + "RVNEVFRyYW5zZmVy", + "VVNEQy0zNTBjNGU=", + "AaaGjQ==" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "identifier": "swapTokensFixedInput", + "topics": [ + "c3dhcA==", + "V0VHTEQtYTI4YzU5", + "VVNEQy0zNTBjNGU=", + "NEq8RBGc/KziU94F4zwBeWwS+W87zFK1BLm8K5aSfOs=", + "Big=" + ], + "data": "NEq8RBGc/KziU94F4zwBeWwS+W87zFK1BLm8K5aSfOsAAAAMV0VHTEQtYTI4YzU5AAAACA3gtrOnZAAAAAAAC1VTREMtMzUwYzRlAAAABAGmho0AAAAHA41+pMaAAAAAAAoEzt4YZBpkcbUoAAAABZLSUp2BAAAAAAA5p8sAAAAAAAAGKAAAAABmWFrK", + "additionalData": [ + "NEq8RBGc/KziU94F4zwBeWwS+W87zFK1BLm8K5aSfOsAAAAMV0VHTEQtYTI4YzU5AAAACA3gtrOnZAAAAAAAC1VTREMtMzUwYzRlAAAABAGmho0AAAAHA41+pMaAAAAAAAoEzt4YZBpkcbUoAAAABZLSUp2BAAAAAAA5p8sAAAAAAAAGKAAAAABmWFrK" + ] + }, + { + "address": "erd1qqqqqqqqqqqqqpgqtqfhy99su9xzjjrq59kpzpp25udtc9eq0n4sr90ax6", + "identifier": "completedTxEvent", + "topics": [ + "hKyvZSjmVb0ZMKwSsT7mivFavYtfxLpGRLULpPiUADI=" + ], + "data": null, + "additionalData": null + } + ] + }, + "status": "success", + "tokens": [ + "WEGLD-a28c59" + ], + "esdtValues": [ + "1000000000000000000" + ], + "operation": "ESDTTransfer", + "function": "swapTokensFixedInput", + "initiallyPaidFee": "538095000000000", + "fee": "462775980000000", + "chainID": "D", + "version": 1, + "options": 0 + } + }, + "error": "", + "code": "successful" +} + "#; + + let tx_on_network = serde_json::from_str::(data).unwrap(); + + assert!(tx_on_network.data.unwrap().is_success()); + } + + #[test] + fn test_deserialize_pending_swap_multiple_contracts_transaction() { + let data = r#" +{ + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "SCInvoking", + "processingTypeOnDestination": "SCInvoking", + "hash": "4cba466f2506d80a5fd19f36079a8b82ff5683e77d02e6612d29892d1b95b945", + "nonce": 29, + "round": 0, + "epoch": 0, + "value": "0", + "receiver": "erd1qqqqqqqqqqqqqpgqc7fc277m787qr54cgftsr9marwlca9ee37esyyw4f5", + "sender": "erd17pl75t9wlvk6dm0u8hkhw2fw6yks6wv3ansnwzj0ch9m0xlk37es3y9x4c", + "gasPrice": 1000000000, + "gasLimit": 80000000, + "gasUsed": 318500, + "data": "eEV4Y2hhbmdlU3dhcEAwMDAwMDAwMDAwMDAwMDAwMDUwMDU4MTM3MjE0YjBlMTRjMjk0ODYwYTE2YzExMDQyYWE3MWFiYzE3MjA3Y2ViQDU1NTM0NDQzMmQzMzM1MzA2MzM0NjVAMDIxY2NmQDAwMDAwMDBjNTc0NTQ3NGM0NDJkNjEzMjM4NjMzNTM5MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA3YjFhMmJjMmVjNTAwMDA=", + "signature": "597919b9532a10ef0b3bafdb8f0bb0ab4190614028027fcd489ea16e666652ca5a7224662c959bc3713174f9caa102743cd25d5fce38d44e137e5922eaa2ea02", + "sourceShard": 1, + "destinationShard": 1, + "status": "pending", + "initiallyPaidFee": "80000000000000000", + "fee": "318500000000000", + "chainID": "D", + "version": 1, + "options": 0 + } + }, + "error": "", + "code": "successful" +} + "#; + + _ = serde_json::from_str::(data).unwrap(); + } + + #[test] + fn test_is_success_for_pending_transaction() { + let data = r#" +{ + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "SCInvoking", + "processingTypeOnDestination": "SCInvoking", + "hash": "4cba466f2506d80a5fd19f36079a8b82ff5683e77d02e6612d29892d1b95b945", + "nonce": 29, + "round": 0, + "epoch": 0, + "value": "0", + "receiver": "erd1qqqqqqqqqqqqqpgqc7fc277m787qr54cgftsr9marwlca9ee37esyyw4f5", + "sender": "erd17pl75t9wlvk6dm0u8hkhw2fw6yks6wv3ansnwzj0ch9m0xlk37es3y9x4c", + "gasPrice": 1000000000, + "gasLimit": 80000000, + "gasUsed": 318500, + "data": "eEV4Y2hhbmdlU3dhcEAwMDAwMDAwMDAwMDAwMDAwMDUwMDU4MTM3MjE0YjBlMTRjMjk0ODYwYTE2YzExMDQyYWE3MWFiYzE3MjA3Y2ViQDU1NTM0NDQzMmQzMzM1MzA2MzM0NjVAMDIxY2NmQDAwMDAwMDBjNTc0NTQ3NGM0NDJkNjEzMjM4NjMzNTM5MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA3YjFhMmJjMmVjNTAwMDA=", + "signature": "597919b9532a10ef0b3bafdb8f0bb0ab4190614028027fcd489ea16e666652ca5a7224662c959bc3713174f9caa102743cd25d5fce38d44e137e5922eaa2ea02", + "sourceShard": 1, + "destinationShard": 1, + "status": "pending", + "initiallyPaidFee": "80000000000000000", + "fee": "318500000000000", + "chainID": "D", + "version": 1, + "options": 0 + } + }, + "error": "", + "code": "successful" +} + "#; + + let tx_on_network = serde_json::from_str::(data).unwrap(); + + assert!(!tx_on_network.data.unwrap().is_success()) + } + + #[test] + fn test_deserialize_execution_failed_user_error_transaction() { + let data = r#" +{ + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "BuiltInFunctionCall", + "processingTypeOnDestination": "SCInvoking", + "hash": "36878321d56fca840ebb138f9473067f72dc120602854e550ea4a45b6c69ef43", + "nonce": 358, + "round": 1226784, + "epoch": 510, + "value": "0", + "receiver": "erd1j6kua7p67qnaw3y4sudmk25xsuv4k8ws6pwvax8fd2vtmuc3q33s840l87", + "sender": "erd1j6kua7p67qnaw3y4sudmk25xsuv4k8ws6pwvax8fd2vtmuc3q33s840l87", + "gasPrice": 1000000000, + "gasLimit": 500000000, + "gasUsed": 500000000, + "data": "TXVsdGlFU0RUTkZUVHJhbnNmZXJAMDAwMDAwMDAwMDAwMDAwMDA1MDBjNDM0OWU1ZTg0MzMzMTMwZTJiMzA5NTYyNGYyNDY1YjQxZDYzNDc4MDQ2M0AwMUA0MTU0NTMyZDM0NjMzMDM5MzIzMEBAOGFjNzIzMDQ4OWU4MDAwMEA2NTZlNzQ2NTcyNTM3NDYxNmI2NQ==", + "signature": "57a5f6a2f48bdb739d2cbf80e9480694208c8d30beed84f1dd94c03123b7796d1834950adaf8cf77c27151437035a87613f62d453aa2667c04e42f949f9fb106", + "sourceShard": 1, + "destinationShard": 1, + "blockNonce": 1225573, + "blockHash": "9ce7c413116101432a4541e7587208acd7e139fcf326184eb41b08daaffaaf56", + "notarizedAtSourceInMetaNonce": 1225798, + "NotarizedAtSourceInMetaHash": "01d4e84604742ac1b159d46bf1b02f58189ed8de55216a289eded34f72b6afdb", + "notarizedAtDestinationInMetaNonce": 1225798, + "notarizedAtDestinationInMetaHash": "01d4e84604742ac1b159d46bf1b02f58189ed8de55216a289eded34f72b6afdb", + "miniblockType": "TxBlock", + "miniblockHash": "a1f2fc40b6fc0beb17d8dacab8a726a07cf482cd43e4091b4a02f43f5c3fe592", + "hyperblockNonce": 1225798, + "hyperblockHash": "01d4e84604742ac1b159d46bf1b02f58189ed8de55216a289eded34f72b6afdb", + "timestamp": 1701360704, + "logs": { + "address": "erd1j6kua7p67qnaw3y4sudmk25xsuv4k8ws6pwvax8fd2vtmuc3q33s840l87", + "events": [ + { + "address": "erd1j6kua7p67qnaw3y4sudmk25xsuv4k8ws6pwvax8fd2vtmuc3q33s840l87", + "identifier": "MultiESDTNFTTransfer", + "topics": [ + "QVRTLTRjMDkyMA==", + "", + "iscjBInoAAA=", + "AAAAAAAAAAAFAMQ0nl6EMzEw4rMJViTyRltB1jR4BGM=" + ], + "data": null, + "additionalData": null + }, + { + "address": "erd1j6kua7p67qnaw3y4sudmk25xsuv4k8ws6pwvax8fd2vtmuc3q33s840l87", + "identifier": "signalError", + "topics": [ + "lq3O+DrwJ9dElYcbuyqGhxlbHdDQXM6Y6WqYvfMRBGM=", + "RXNkdExvY2FsUm9sZUJ1cm4gaXMgbWlzc2luZyBmb3IgYXNzZXQgdG9rZW4=" + ], + "data": "QDc1NzM2NTcyMjA2NTcyNzI2Zjcy", + "additionalData": null + }, + { + "address": "erd1j6kua7p67qnaw3y4sudmk25xsuv4k8ws6pwvax8fd2vtmuc3q33s840l87", + "identifier": "internalVMErrors", + "topics": [ + "AAAAAAAAAAAFAMQ0nl6EMzEw4rMJViTyRltB1jR4BGM=", + "ZW50ZXJTdGFrZQ==" + ], + "data": "CglydW50aW1lLmdvOjExNzUgW2Vycm9yIHNpZ25hbGxlZCBieSBzbWFydGNvbnRyYWN0XSBbZW50ZXJTdGFrZV0KCXJ1bnRpbWUuZ286MTE3NSBbZXJyb3Igc2lnbmFsbGVkIGJ5IHNtYXJ0Y29udHJhY3RdIFtlbnRlclN0YWtlXQoJcnVudGltZS5nbzoxMTcyIFtFc2R0TG9jYWxSb2xlQnVybiBpcyBtaXNzaW5nIGZvciBhc3NldCB0b2tlbl0=", + "additionalData": null + } + ] + }, + "status": "success", + "tokens": [ + "ATS-4c0920" + ], + "esdtValues": [ + "10000000000000000000" + ], + "receivers": [ + "erd1qqqqqqqqqqqqqpgqcs6fuh5yxvcnpc4np9tzfujxtdqavdrcq33sfl9n6z" + ], + "receiversShardIDs": [1], + "operation": "MultiESDTNFTTransfer", + "function": "enterStake", + "initiallyPaidFee": "5269280000000000", + "fee": "5269280000000000", + "chainID": "D", + "version": 1, + "options": 0 + } + }, + "error": "", + "code": "successful" +} + "#; + + _ = serde_json::from_str::(data).unwrap(); + } + + #[test] + fn test_is_success_execution_failed_user_error_transaction() { + let data = r#" +{ + "data": { + "transaction": { + "type": "normal", + "processingTypeOnSource": "BuiltInFunctionCall", + "processingTypeOnDestination": "SCInvoking", + "hash": "36878321d56fca840ebb138f9473067f72dc120602854e550ea4a45b6c69ef43", + "nonce": 358, + "round": 1226784, + "epoch": 510, + "value": "0", + "receiver": "erd1j6kua7p67qnaw3y4sudmk25xsuv4k8ws6pwvax8fd2vtmuc3q33s840l87", + "sender": "erd1j6kua7p67qnaw3y4sudmk25xsuv4k8ws6pwvax8fd2vtmuc3q33s840l87", + "gasPrice": 1000000000, + "gasLimit": 500000000, + "gasUsed": 500000000, + "data": "TXVsdGlFU0RUTkZUVHJhbnNmZXJAMDAwMDAwMDAwMDAwMDAwMDA1MDBjNDM0OWU1ZTg0MzMzMTMwZTJiMzA5NTYyNGYyNDY1YjQxZDYzNDc4MDQ2M0AwMUA0MTU0NTMyZDM0NjMzMDM5MzIzMEBAOGFjNzIzMDQ4OWU4MDAwMEA2NTZlNzQ2NTcyNTM3NDYxNmI2NQ==", + "signature": "57a5f6a2f48bdb739d2cbf80e9480694208c8d30beed84f1dd94c03123b7796d1834950adaf8cf77c27151437035a87613f62d453aa2667c04e42f949f9fb106", + "sourceShard": 1, + "destinationShard": 1, + "blockNonce": 1225573, + "blockHash": "9ce7c413116101432a4541e7587208acd7e139fcf326184eb41b08daaffaaf56", + "notarizedAtSourceInMetaNonce": 1225798, + "NotarizedAtSourceInMetaHash": "01d4e84604742ac1b159d46bf1b02f58189ed8de55216a289eded34f72b6afdb", + "notarizedAtDestinationInMetaNonce": 1225798, + "notarizedAtDestinationInMetaHash": "01d4e84604742ac1b159d46bf1b02f58189ed8de55216a289eded34f72b6afdb", + "miniblockType": "TxBlock", + "miniblockHash": "a1f2fc40b6fc0beb17d8dacab8a726a07cf482cd43e4091b4a02f43f5c3fe592", + "hyperblockNonce": 1225798, + "hyperblockHash": "01d4e84604742ac1b159d46bf1b02f58189ed8de55216a289eded34f72b6afdb", + "timestamp": 1701360704, + "logs": { + "address": "erd1j6kua7p67qnaw3y4sudmk25xsuv4k8ws6pwvax8fd2vtmuc3q33s840l87", + "events": [ + { + "address": "erd1j6kua7p67qnaw3y4sudmk25xsuv4k8ws6pwvax8fd2vtmuc3q33s840l87", + "identifier": "MultiESDTNFTTransfer", + "topics": [ + "QVRTLTRjMDkyMA==", + "", + "iscjBInoAAA=", + "AAAAAAAAAAAFAMQ0nl6EMzEw4rMJViTyRltB1jR4BGM=" + ], + "data": null, + "additionalData": null + }, + { + "address": "erd1j6kua7p67qnaw3y4sudmk25xsuv4k8ws6pwvax8fd2vtmuc3q33s840l87", + "identifier": "signalError", + "topics": [ + "lq3O+DrwJ9dElYcbuyqGhxlbHdDQXM6Y6WqYvfMRBGM=", + "RXNkdExvY2FsUm9sZUJ1cm4gaXMgbWlzc2luZyBmb3IgYXNzZXQgdG9rZW4=" + ], + "data": "QDc1NzM2NTcyMjA2NTcyNzI2Zjcy", + "additionalData": null + }, + { + "address": "erd1j6kua7p67qnaw3y4sudmk25xsuv4k8ws6pwvax8fd2vtmuc3q33s840l87", + "identifier": "internalVMErrors", + "topics": [ + "AAAAAAAAAAAFAMQ0nl6EMzEw4rMJViTyRltB1jR4BGM=", + "ZW50ZXJTdGFrZQ==" + ], + "data": "CglydW50aW1lLmdvOjExNzUgW2Vycm9yIHNpZ25hbGxlZCBieSBzbWFydGNvbnRyYWN0XSBbZW50ZXJTdGFrZV0KCXJ1bnRpbWUuZ286MTE3NSBbZXJyb3Igc2lnbmFsbGVkIGJ5IHNtYXJ0Y29udHJhY3RdIFtlbnRlclN0YWtlXQoJcnVudGltZS5nbzoxMTcyIFtFc2R0TG9jYWxSb2xlQnVybiBpcyBtaXNzaW5nIGZvciBhc3NldCB0b2tlbl0=", + "additionalData": null + } + ] + }, + "status": "success", + "tokens": [ + "ATS-4c0920" + ], + "esdtValues": [ + "10000000000000000000" + ], + "receivers": [ + "erd1qqqqqqqqqqqqqpgqcs6fuh5yxvcnpc4np9tzfujxtdqavdrcq33sfl9n6z" + ], + "receiversShardIDs": [1], + "operation": "MultiESDTNFTTransfer", + "function": "enterStake", + "initiallyPaidFee": "5269280000000000", + "fee": "5269280000000000", + "chainID": "D", + "version": 1, + "options": 0 + } + }, + "error": "", + "code": "successful" +} + "#; + + let tx_on_network = serde_json::from_str::(data).unwrap(); + assert!(!tx_on_network.data.unwrap().is_success()) + } } \ No newline at end of file diff --git a/executor/src/network/utils/transaction.rs b/executor/src/network/utils/transaction.rs index a656cca..9f6fa35 100644 --- a/executor/src/network/utils/transaction.rs +++ b/executor/src/network/utils/transaction.rs @@ -24,7 +24,7 @@ pub async fn send_transaction(client: &Client, transactio } pub async fn get_transaction_on_network(client: &Client, tx_hash: &str) -> Result { - let url_to_append = format!("transaction/{tx_hash}?withResults=true"); + let url_to_append = format!("/transaction/{tx_hash}?withResults=true"); let Ok((_, Some(text))) = client .with_appended_url(&url_to_append) .get() @@ -33,7 +33,9 @@ pub async fn get_transaction_on_network(client: &Client, }; let transaction_on_network_response: TransactionOnNetworkResponse = serde_json::from_str(&text) - .map_err(|_| TransactionError::CannotDeserializeTransactionOnNetworkResponse { response: text })?; + .map_err(|_| { + TransactionError::CannotDeserializeTransactionOnNetworkResponse { response: text } + })?; let Some(transaction_on_network_data) = transaction_on_network_response.data else { return Err(TransactionError::FailedToSendTheTransaction { message: transaction_on_network_response.error }.into()) diff --git a/executor/src/network/utils/wallet.rs b/executor/src/network/utils/wallet.rs index 08f851c..3ae4653 100644 --- a/executor/src/network/utils/wallet.rs +++ b/executor/src/network/utils/wallet.rs @@ -1,5 +1,5 @@ use std::fmt::{Debug, Formatter}; -use multiversx_sdk::crypto::private_key::PrivateKey; +use multiversx_sdk::crypto::private_key::{PRIVATE_KEY_LENGTH, PrivateKey}; use multiversx_sdk::crypto::public_key::PublicKey; use serde::Serialize; use serde_json::json; @@ -10,6 +10,7 @@ use crate::ExecutorError; use crate::network::transaction::models::send_request::TransactionSendRequest; #[derive(Serialize)] +#[serde(rename_all = "camelCase")] pub struct SignableTransaction { pub nonce: u64, pub value: String, @@ -17,10 +18,18 @@ pub struct SignableTransaction { pub sender: String, pub gas_price: u64, pub gas_limit: u64, - pub data: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub data: Option, + #[serde(rename = "chainID")] pub chain_id: String, - pub version: u64, - pub options: u64 + pub version: u32, + #[serde(skip_serializing_if = "is_zero")] + pub options: u32, +} + +#[allow(clippy::trivially_copy_pass_by_ref)] +fn is_zero(num: &u32) -> bool { + *num == 0 } impl SignableTransaction { @@ -31,12 +40,14 @@ impl SignableTransaction { nonce: self.nonce, value: self.value, receiver: self.receiver, + sender: self.sender, gas_price: self.gas_price, gas_limit: self.gas_limit, data: self.data, + signature, chain_id: self.chain_id, version: self.version, - signature, + options: self.options, } } } @@ -52,6 +63,24 @@ impl Wallet { Ok(Wallet(private_key)) } + pub fn from_pem_file(file_path: &str) -> Result { + let contents = std::fs::read_to_string(file_path) + .map_err(|e| WalletError::InvalidPemFile)?; + + Self::from_pem_file_contents(contents) + } + + pub fn from_pem_file_contents(contents: String) -> Result { + let x = pem::parse(contents) + .map_err(|_| WalletError::InvalidPemFile)?; + let x = x.contents()[..PRIVATE_KEY_LENGTH].to_vec(); + let priv_key_str = std::str::from_utf8(x.as_slice()) + .map_err(|_| WalletError::InvalidPemFile)?; + let pri_key = PrivateKey::from_hex_str(priv_key_str) + .map_err(|_| WalletError::InvalidPemFile)?; + Ok(Self(pri_key)) + } + pub fn get_address(&self) -> Address { let public_key = PublicKey::from(&self.0); Address::from(multiversx_sdk::data::address::Address::from(&public_key)) diff --git a/executor/src/utils/transaction/normalization.rs b/executor/src/utils/transaction/normalization.rs index 4d87b8c..a71ec7f 100644 --- a/executor/src/utils/transaction/normalization.rs +++ b/executor/src/utils/transaction/normalization.rs @@ -436,7 +436,7 @@ mod tests { esdt_transfers: vec![] }; - let expected_data = format!("MultiESDTNFTTransfer@{RECEIVER_HEX}@{FUNGIBLE_NAME_HEX}@@0a@{NON_FUNGIBLE_NAME_HEX}@01@64@@{ENDPOINT_NAME_HEX}"); + let expected_data = format!("MultiESDTNFTTransfer@{RECEIVER_HEX}@02@{FUNGIBLE_NAME_HEX}@@0a@{NON_FUNGIBLE_NAME_HEX}@01@64@{ENDPOINT_NAME_HEX}"); assert_eq!(result, expected); assert_eq!(result_data, expected_data); @@ -491,7 +491,7 @@ mod tests { esdt_transfers: vec![] }; - let expected_data = format!("MultiESDTNFTTransfer@{RECEIVER_HEX}@{FUNGIBLE_NAME_HEX}@@0a@{NON_FUNGIBLE_NAME_HEX}@01@64@@{ENDPOINT_NAME_HEX}@0102@0304"); + let expected_data = format!("MultiESDTNFTTransfer@{RECEIVER_HEX}@02@{FUNGIBLE_NAME_HEX}@@0a@{NON_FUNGIBLE_NAME_HEX}@01@64@{ENDPOINT_NAME_HEX}@0102@0304"); assert_eq!(result, expected); assert_eq!(result_data, expected_data); diff --git a/executor/src/utils/transaction/results.rs b/executor/src/utils/transaction/results.rs index caf56de..f218f3f 100644 --- a/executor/src/utils/transaction/results.rs +++ b/executor/src/utils/transaction/results.rs @@ -210,7 +210,7 @@ mod tests { let results = find_smart_contract_result( &tx_on_network.smart_contract_results, - Some(&tx_on_network.logs) + tx_on_network.logs.as_ref() ) .unwrap() .unwrap(); @@ -348,7 +348,7 @@ mod tests { let results = find_smart_contract_result( &tx_on_network.smart_contract_results, - Some(&tx_on_network.logs) + tx_on_network.logs.as_ref() ) .unwrap() .unwrap(); @@ -483,7 +483,7 @@ mod tests { let results = find_smart_contract_result( &tx_on_network.smart_contract_results, - Some(&tx_on_network.logs) + tx_on_network.logs.as_ref() ) .unwrap() .unwrap(); @@ -618,7 +618,7 @@ mod tests { let results = find_smart_contract_result( &tx_on_network.smart_contract_results, - Some(&tx_on_network.logs) + tx_on_network.logs.as_ref() ) .unwrap() .unwrap(); @@ -911,7 +911,7 @@ mod tests { let results = find_smart_contract_result( &tx_on_network.smart_contract_results, - Some(&tx_on_network.logs) + tx_on_network.logs.as_ref() ) .unwrap() .unwrap(); @@ -1176,7 +1176,7 @@ mod tests { let results = find_smart_contract_result( &tx_on_network.smart_contract_results, - Some(&tx_on_network.logs) + tx_on_network.logs.as_ref() ) .unwrap() .unwrap(); @@ -1270,7 +1270,7 @@ mod tests { let results = find_smart_contract_result( &tx_on_network.smart_contract_results, - Some(&tx_on_network.logs) + tx_on_network.logs.as_ref() ) .unwrap() .unwrap(); diff --git a/request/src/gateway/reqwest.rs b/request/src/gateway/reqwest.rs index bcd58c7..73d3bb3 100644 --- a/request/src/gateway/reqwest.rs +++ b/request/src/gateway/reqwest.rs @@ -59,6 +59,8 @@ where Some(text) } else { + let text = response.text().await.unwrap(); // TODO + None }; diff --git a/tester/core/tests/network_call.rs b/tester/core/tests/network_call.rs index 4068881..ed562d3 100644 --- a/tester/core/tests/network_call.rs +++ b/tester/core/tests/network_call.rs @@ -138,11 +138,13 @@ impl BlockchainInteractor for MockInteractor { data: return_data, } ]), - status: "executed".to_string(), - logs: TransactionOnNetworkTransactionLogs { - address: "".to_string(), - events: vec![], - }, + status: "success".to_string(), + logs: Some( + TransactionOnNetworkTransactionLogs { + address: "".to_string(), + events: vec![], + } + ), }, }; diff --git a/tester/core/tests/network_deploy.rs b/tester/core/tests/network_deploy.rs index 6b7171b..96f5854 100644 --- a/tester/core/tests/network_deploy.rs +++ b/tester/core/tests/network_deploy.rs @@ -62,18 +62,20 @@ impl BlockchainInteractor for MockInteractor { data: return_data, } ]), - logs: TransactionOnNetworkTransactionLogs { - address: CALLER.to_string(), - events: vec![ - TransactionOnNetworkTransactionLogsEvents { - address: NEW_CONTRACT.to_string(), - identifier: "SCDeploy".to_string(), - topics: vec![], - data: Some(data), - } - ], - }, - status: "executed".to_string(), + logs: Some( + TransactionOnNetworkTransactionLogs { + address: CALLER.to_string(), + events: vec![ + TransactionOnNetworkTransactionLogsEvents { + address: NEW_CONTRACT.to_string(), + identifier: "SCDeploy".to_string(), + topics: vec![], + data: Some(data), + } + ], + } + ), + status: "success".to_string(), }, }; diff --git a/tester/core/tests/network_query.rs b/tester/core/tests/network_query.rs index 4ad2e09..af5e213 100644 --- a/tester/core/tests/network_query.rs +++ b/tester/core/tests/network_query.rs @@ -128,7 +128,8 @@ impl BlockchainProxy for MockProxy { fn get_success_vm_response_data(return_data: Vec) -> VmValuesQueryResponseData { VmValuesQueryResponseData { data: VmValuesQueryResponseDataData { - return_data, + return_data: Some(return_data), + return_message: "".to_string() } } } From 95a210170f8359d5cf648dbc0e4a868efe711374 Mon Sep 17 00:00:00 2001 From: Fusee Date: Thu, 30 May 2024 18:53:28 +0200 Subject: [PATCH 19/25] various fixes on query and transactions --- request/src/gateway/reqwest.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/request/src/gateway/reqwest.rs b/request/src/gateway/reqwest.rs index 73d3bb3..bcd58c7 100644 --- a/request/src/gateway/reqwest.rs +++ b/request/src/gateway/reqwest.rs @@ -59,8 +59,6 @@ where Some(text) } else { - let text = response.text().await.unwrap(); // TODO - None }; From 4942d0516e5d1ec3d58811ff639a39afcc568dc0 Mon Sep 17 00:00:00 2001 From: Fusee Date: Thu, 30 May 2024 18:59:08 +0200 Subject: [PATCH 20/25] removed some warnings --- core/src/lib.rs | 2 +- data/src/lib.rs | 2 +- executor/src/lib.rs | 2 +- executor/src/network/utils/wallet.rs | 2 +- executor/src/utils/date/get_current_timestamp.rs | 7 ------- 5 files changed, 4 insertions(+), 11 deletions(-) diff --git a/core/src/lib.rs b/core/src/lib.rs index 1786ac2..dbac29c 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -43,7 +43,7 @@ //! //! The `novax` crate utilizes Rust's procedural macro facilities to perform code generation at compile time. //! This ensures that the generated code is type-safe, efficient, and ready-to-use right out of the box. -#![warn(missing_docs)] +// TODO #![warn(missing_docs)] /// The `caching` module provides caching strategies to optimize smart contract queries. pub mod caching; diff --git a/data/src/lib.rs b/data/src/lib.rs index 8b00ea5..5477a50 100644 --- a/data/src/lib.rs +++ b/data/src/lib.rs @@ -44,7 +44,7 @@ //! For a deep dive into each module and to understand the various types, traits, and functions provided, //! navigate through the module documentation below. //! -#![warn(missing_docs)] +// TODO #![warn(missing_docs)] mod types; mod constants; diff --git a/executor/src/lib.rs b/executor/src/lib.rs index 8b54805..b66641e 100644 --- a/executor/src/lib.rs +++ b/executor/src/lib.rs @@ -42,7 +42,7 @@ //! Error handling in `novax-executor` is comprehensive and designed to cover a range of issues that might arise while interacting with the blockchain. //! See [`ExecutorError`](enum.ExecutorError.html), [`NetworkQueryError`](enum.NetworkQueryError.html), and [`MockDeployError`](enum.MockDeployError.html) for more details. -#![warn(missing_docs)] +// TODO #![warn(missing_docs)] mod error; mod base; diff --git a/executor/src/network/utils/wallet.rs b/executor/src/network/utils/wallet.rs index 3ae4653..6297ee4 100644 --- a/executor/src/network/utils/wallet.rs +++ b/executor/src/network/utils/wallet.rs @@ -65,7 +65,7 @@ impl Wallet { pub fn from_pem_file(file_path: &str) -> Result { let contents = std::fs::read_to_string(file_path) - .map_err(|e| WalletError::InvalidPemFile)?; + .map_err(|_| WalletError::InvalidPemFile)?; Self::from_pem_file_contents(contents) } diff --git a/executor/src/utils/date/get_current_timestamp.rs b/executor/src/utils/date/get_current_timestamp.rs index bc09d2a..b2e1261 100644 --- a/executor/src/utils/date/get_current_timestamp.rs +++ b/executor/src/utils/date/get_current_timestamp.rs @@ -43,13 +43,6 @@ mod implementation { Ok(time) } - - pub(crate) fn set_mock_time(new_time: Duration) { - MOCK_TIME.with(|value| { - let mut mock_time = value.borrow_mut(); - *mock_time = new_time; - }); - } } #[cfg(test)] From 821966adb2d71bd8f8d8ae994cdcc6b0ee402e45 Mon Sep 17 00:00:00 2001 From: Fusee Date: Fri, 31 May 2024 11:14:41 +0200 Subject: [PATCH 21/25] added TODO on outdated comments --- abi-build/src/generator/impl_contract.rs | 6 ++--- core/src/caching/caching_strategy.rs | 2 +- core/src/code/file.rs | 4 ++-- executor/src/base/deploy.rs | 8 +++---- executor/src/base/query.rs | 8 +++---- executor/src/base/transaction.rs | 8 +++---- executor/src/dummy/transaction.rs | 23 ++++--------------- executor/src/error/mock_deploy.rs | 8 +++---- executor/src/error/mock_transaction.rs | 2 +- executor/src/error/network.rs | 2 +- executor/src/mocking/executor.rs | 6 ++--- executor/src/network/query/executor.rs | 10 ++++---- executor/src/network/simulate.rs | 2 +- executor/src/network/transaction/executor.rs | 10 ++++---- executor/src/utils/transaction/call_result.rs | 4 ++-- 15 files changed, 45 insertions(+), 58 deletions(-) diff --git a/abi-build/src/generator/impl_contract.rs b/abi-build/src/generator/impl_contract.rs index cf281cd..feeb00b 100644 --- a/abi-build/src/generator/impl_contract.rs +++ b/abi-build/src/generator/impl_contract.rs @@ -412,7 +412,7 @@ fn impl_abi_endpoint_call_query( }; let call_token = quote! { - /// Executes the `#function_name` function on the smart contract. + /// TODO Executes the `#function_name` function on the smart contract. /// /// # Description /// #abi_description @@ -439,7 +439,7 @@ fn impl_abi_endpoint_call_query( }; let query_token = quote! { - /// Executes the `#function_name` query on the smart contract. + /// TODO Executes the `#function_name` query on the smart contract. /// /// # Description /// #abi_description @@ -487,7 +487,7 @@ fn impl_abi_constructor(contract_info_name: &str, abi_constructor: &AbiConstruct let (function_managed_outputs, function_native_outputs) = impl_endpoint_outputs(&abi_constructor.outputs, abi_types, &debug_api)?; let function_token = quote! { - /// This asynchronous function encapsulates the logic for deploying a smart contract to the blockchain. + /// TODO This asynchronous function encapsulates the logic for deploying a smart contract to the blockchain. /// It takes in a `DeployData` instance, an executor, a gas limit, and additional function-specific inputs /// to facilitate the deployment process. /// diff --git a/core/src/caching/caching_strategy.rs b/core/src/caching/caching_strategy.rs index f7df37c..8bb2f67 100644 --- a/core/src/caching/caching_strategy.rs +++ b/core/src/caching/caching_strategy.rs @@ -67,7 +67,7 @@ pub trait CachingStrategy: Clone + Send + Sync + Debug { /// - A `Result` indicating success or an error if the operation fails. async fn clear(&self) -> Result<(), NovaXError>; - /// Creates a new `CachingStrategy` instance with a specified cache duration strategy. + /// TODO Creates a new `CachingStrategy` instance with a specified cache duration strategy. /// /// # Parameters /// - `strategy`: The duration for which cache entries should be kept. diff --git a/core/src/code/file.rs b/core/src/code/file.rs index 6fec10b..490e822 100644 --- a/core/src/code/file.rs +++ b/core/src/code/file.rs @@ -11,7 +11,7 @@ pub struct FileCode(PathBuf); #[async_trait] impl AsBytesValue for &FileCode { - /// Asynchronously reads the content of the file identified by the path contained in `self`, + /// TODO Asynchronously reads the content of the file identified by the path contained in `self`, /// converting the file content into a `BytesValue`. /// /// # Errors @@ -25,7 +25,7 @@ impl AsBytesValue for &FileCode { #[async_trait] impl AsBytesValue for &str { - /// Asynchronously reads the content of the file identified by `self` as a path, + /// TODO Asynchronously reads the content of the file identified by `self` as a path, /// converting the file content into a `BytesValue`. /// /// This implementation constructs a `FileCode` from `self` and delegates the task to the diff --git a/executor/src/base/deploy.rs b/executor/src/base/deploy.rs index eedfc8e..63c192a 100644 --- a/executor/src/base/deploy.rs +++ b/executor/src/base/deploy.rs @@ -11,10 +11,10 @@ use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::TopDecodeMulti; -/// A trait defining the contract for executing smart contract deployment operations asynchronously. +/// TODO A trait defining the contract for executing smart contract deployment operations asynchronously. #[async_trait] pub trait DeployExecutor: Send + Sync { - /// Executes a smart contract deployment step asynchronously. + /// TODO Executes a smart contract deployment step asynchronously. /// /// # Type Parameters /// @@ -44,11 +44,11 @@ pub trait DeployExecutor: Send + Sync { OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; } -/// An implementation of `DeployExecutor` for `Arc>` where `T: DeployExecutor`. +/// TODO An implementation of `DeployExecutor` for `Arc>` where `T: DeployExecutor`. /// This wrapper allows for thread-safe, shared ownership of a deploy executor. #[async_trait] impl DeployExecutor for Arc> { - /// Executes a smart contract deployment step asynchronously, delegating to the inner `DeployExecutor`. + /// TODO Executes a smart contract deployment step asynchronously, delegating to the inner `DeployExecutor`. async fn sc_deploy< OutputManaged >( diff --git a/executor/src/base/query.rs b/executor/src/base/query.rs index 1655a23..6bebbda 100644 --- a/executor/src/base/query.rs +++ b/executor/src/base/query.rs @@ -7,7 +7,7 @@ use novax_data::{Address, NativeConvertible}; use crate::error::executor::ExecutorError; use crate::TokenTransfer; -/// A trait representing the execution of smart contract queries. +/// TODO A trait representing the execution of smart contract queries. /// /// This trait is implemented by types that can execute smart contract queries in a specific environment, /// like a real blockchain or a mocked one. The trait's associated function, `execute`, is responsible for @@ -15,7 +15,7 @@ use crate::TokenTransfer; /// and returning the result of the query. #[async_trait] pub trait QueryExecutor: Send + Sync { - /// Executes a smart contract query and returns the result. + /// TODO Executes a smart contract query and returns the result. /// /// # Parameters /// @@ -42,7 +42,7 @@ pub trait QueryExecutor: Send + Sync { OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; } -/// An implementation of `QueryExecutor` for `Arc` where `T: QueryExecutor`. +/// TODO An implementation of `QueryExecutor` for `Arc` where `T: QueryExecutor`. /// /// This implementation allows shared access to an executor instance. #[async_trait] @@ -69,7 +69,7 @@ impl QueryExecutor for Arc { } } -/// An implementation of `QueryExecutor` for `Arc>` where `T: QueryExecutor`. +/// TODO An implementation of `QueryExecutor` for `Arc>` where `T: QueryExecutor`. /// /// This implementation allows exclusive access to an executor instance, ensuring safe mutable access. #[async_trait] diff --git a/executor/src/base/transaction.rs b/executor/src/base/transaction.rs index 129ca99..be49c42 100644 --- a/executor/src/base/transaction.rs +++ b/executor/src/base/transaction.rs @@ -11,12 +11,12 @@ use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::utils::transaction::token_transfer::TokenTransfer; -/// A trait defining the necessary operations for executing smart contract transactions. +/// TODO A trait defining the necessary operations for executing smart contract transactions. /// /// Implementations of this trait can vary based on the specific environment (e.g., real blockchain, mock blockchain). #[async_trait] pub trait TransactionExecutor: Send + Sync { - /// Executes a smart contract call with the specified parameters. + /// TODO Executes a smart contract call with the specified parameters. /// /// # Parameters /// - `sc_call_step`: A mutable reference to the typed smart contract call step. @@ -39,12 +39,12 @@ pub trait TransactionExecutor: Send + Sync { OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; } -/// An implementation of `TransactionExecutor` trait for types wrapped in `Arc>`. +/// TODO An implementation of `TransactionExecutor` trait for types wrapped in `Arc>`. /// /// This implementation allows shared access to a transaction executor instance across multiple threads. #[async_trait] impl TransactionExecutor for Arc> { - /// Executes a smart contract call using the underlying `TransactionExecutor` implementation. + /// TODO Executes a smart contract call using the underlying `TransactionExecutor` implementation. async fn sc_call( &mut self, to: &Address, diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index 2fcaa33..4098a1d 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -15,13 +15,13 @@ use crate::utils::transaction::deploy::get_deploy_call_input; use crate::utils::transaction::normalization::NormalizationInOut; use crate::utils::transaction::token_transfer::TokenTransfer; -/// A type alias for `DummyExecutor` handling `ScCallStep`. +/// TODO A type alias for `DummyExecutor` handling `ScCallStep`. pub type DummyTransactionExecutor = DummyExecutor; -/// A type alias for `DummyExecutor` handling `ScDeployStep`. +/// TODO A type alias for `DummyExecutor` handling `ScDeployStep`. pub type DummyDeployExecutor = DummyExecutor; -/// A structure for capturing transaction details without performing actual blockchain transactions. +/// TODO A structure for capturing transaction details without performing actual blockchain transactions. /// It is designed for testing scenarios, especially to fetch `SendableTransaction` details from interactions. pub struct DummyExecutor { /// Holds the transaction details. @@ -31,7 +31,7 @@ pub struct DummyExecutor { } impl DummyExecutor { - /// Retrieves the transaction details encapsulated into a `SendableTransaction`. + /// TODO Retrieves the transaction details encapsulated into a `SendableTransaction`. pub fn get_transaction_details(&self) -> Result { if let Some(tx) = self.tx.clone() { Ok(tx.to_sendable_transaction()) @@ -42,7 +42,7 @@ impl DummyExecutor { } impl DummyExecutor { - /// Constructs a new `DummyExecutor` instance. + /// TODO Constructs a new `DummyExecutor` instance. /// /// # Arguments /// @@ -89,19 +89,6 @@ impl TransactionExecutor for DummyExecutor { self.tx = Some(normalized.to_sendable_transaction(gas_limit)); - /* - let mut owned_sc_call_step = mem::replace(sc_call_step, ScCallStep::new().into()); - - if let Some(caller) = &self.caller { - owned_sc_call_step = owned_sc_call_step.from(&multiversx_sc::types::Address::from(caller.to_bytes())); - } - - self.tx = owned_sc_call_step.sc_call_step; - - Ok(()) - - */ - let dummy_result = CallResult { response: Default::default(), result: None, diff --git a/executor/src/error/mock_deploy.rs b/executor/src/error/mock_deploy.rs index f77506b..57b5dde 100644 --- a/executor/src/error/mock_deploy.rs +++ b/executor/src/error/mock_deploy.rs @@ -1,24 +1,24 @@ use crate::error::executor::ExecutorError; use serde::{Deserialize, Serialize}; -/// An enumeration representing the various errors that can occur when deploying through the `MockExecutor`. +/// TODO An enumeration representing the various errors that can occur when deploying through the `MockExecutor`. /// /// Currently, it includes the following variant: /// * `CallerAddressNotPresent` - Indicates that a caller address is not present but is required for the deployment operation. #[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] pub enum MockDeployError { - /// This error variant is triggered when there is an attempt to deploy, but no caller address is present. + /// TODO This error variant is triggered when there is an attempt to deploy, but no caller address is present. /// In the context of a `MockExecutor`, a caller's address is essential for deployment, and if the /// `opt_caller` field is `None`, this error will be thrown. CallerAddressNotPresent, } -/// An implementation of the `From` trait to allow for easy conversions from `MockDeployError` to `ExecutorError`. +/// TODO An implementation of the `From` trait to allow for easy conversions from `MockDeployError` to `ExecutorError`. /// /// This implementation facilitates the propagation of `MockDeployError`s through the code, /// by allowing them to be converted into the more general `ExecutorError` type. impl From for ExecutorError { - /// Performs the conversion from a `MockDeployError` to an `ExecutorError`. + /// TODO Performs the conversion from a `MockDeployError` to an `ExecutorError`. /// /// # Parameters /// diff --git a/executor/src/error/mock_transaction.rs b/executor/src/error/mock_transaction.rs index 101ff3f..ca19d75 100644 --- a/executor/src/error/mock_transaction.rs +++ b/executor/src/error/mock_transaction.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] pub enum MockTransactionError { - /// This error variant is triggered when there is an attempt to deploy, but no caller address is present. + /// TODO This error variant is triggered when there is an attempt to deploy, but no caller address is present. /// In the context of a `MockExecutor`, a caller's wallet address is essential for calling a contract, and if the /// `opt_caller` field is `None`, this error will be thrown. CallerAddressNotPresent, diff --git a/executor/src/error/network.rs b/executor/src/error/network.rs index f9ceca6..7cc7d45 100644 --- a/executor/src/error/network.rs +++ b/executor/src/error/network.rs @@ -1,7 +1,7 @@ use crate::error::executor::ExecutorError; use serde::{Deserialize, Serialize}; -/// An enumeration representing the various errors that can occur during network query operations. +/// TODO An enumeration representing the various errors that can occur during network query operations. /// /// It includes the following variants: /// * `EmptyArgs` - Indicates that the arguments provided for the network query are empty when they shouldn't be. diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index 8da5948..bd97c6d 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -70,7 +70,7 @@ impl TransactionExecutor for MockExecutor A: Deref + Send + Sync, Address: for<'a> From<&'a A::Target> { - /// Executes a smart contract call within a mocked environment. + /// TODO Executes a smart contract call within a mocked environment. /// /// This method extracts or determines the caller's address, performs a smart contract call, /// and updates the world state accordingly, all within a controlled, mocked environment. @@ -159,7 +159,7 @@ impl DeployExecutor for MockExecutor A: Deref + Send + Sync, Address: for<'a> From<&'a A::Target> { - /// Asynchronously deploys a smart contract to the mock blockchain environment. + /// TODO Asynchronously deploys a smart contract to the mock blockchain environment. /// /// # Type Parameters /// @@ -241,7 +241,7 @@ impl QueryExecutor for MockExecutor A: Clone + Deref + Send + Sync, Address: for<'a> From<&'a A::Target> { - /// Executes a simulated smart contract query in the mock environment. + /// TODO Executes a simulated smart contract query in the mock environment. /// /// # Type Parameters /// diff --git a/executor/src/network/query/executor.rs b/executor/src/network/query/executor.rs index 1a77059..1be0261 100644 --- a/executor/src/network/query/executor.rs +++ b/executor/src/network/query/executor.rs @@ -10,10 +10,10 @@ use crate::{BlockchainProxy, ExecutorError, NetworkQueryError, QueryExecutor, To use crate::network::query::proxy::NetworkBlockchainProxy; use crate::utils::transaction::normalization::NormalizationInOut; -/// A convenient type alias for `QueryNetworkExecutor` with `NetworkBlockchainProxy` as the generic type. +/// TODO A convenient type alias for `QueryNetworkExecutor` with `NetworkBlockchainProxy` as the generic type. pub type ProxyQueryExecutor = QueryNetworkExecutor; -/// A structure to execute smart contract queries on a real blockchain environment via a specified gateway. +/// TODO A structure to execute smart contract queries on a real blockchain environment via a specified gateway. /// /// This executor utilizes a blockchain proxy to communicate with the blockchain network and /// execute the queries. @@ -43,7 +43,7 @@ impl QueryNetworkExecutor { #[async_trait] impl QueryExecutor for QueryNetworkExecutor { - /// Executes a smart contract query on the real blockchain environment. + /// TODO Executes a smart contract query on the real blockchain environment. /// /// This method constructs a VM request from the provided `ScCallStep`, sends it to the blockchain network /// via the blockchain proxy, and processes the result to return it in a native format. @@ -91,7 +91,7 @@ impl QueryExecutor for QueryNetworkExecutor { #[async_trait] impl QueryExecutor for &str { - /// Allows using a string representing the gateway URL to execute a query on the real blockchain environment. + /// TODO Allows using a string representing the gateway URL to execute a query on the real blockchain environment. /// /// This implementation creates a new `ProxyQueryExecutor` instance using the string as the gateway URL, /// and delegates the query execution to it. @@ -120,7 +120,7 @@ impl QueryExecutor for &str { #[async_trait] impl QueryExecutor for String { - /// Allows using a string representing the gateway URL to execute a query on the real blockchain environment. + /// TODO Allows using a string representing the gateway URL to execute a query on the real blockchain environment. /// /// This implementation creates a new `ProxyQueryExecutor` instance using the string as the gateway URL, /// and delegates the query execution to it. diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index e9f5c0e..d8b8eba 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -123,7 +123,7 @@ impl Debug for BaseSimulationNetworkExecutor #[async_trait] impl TransactionExecutor for BaseSimulationNetworkExecutor { - /// Executes a smart contract call in a simulated environment. + /// TODO Executes a smart contract call in a simulated environment. /// /// # Type Parameters /// - `OriginalResult`: The result type expected from the smart contract call. diff --git a/executor/src/network/transaction/executor.rs b/executor/src/network/transaction/executor.rs index 73c6606..8233c84 100644 --- a/executor/src/network/transaction/executor.rs +++ b/executor/src/network/transaction/executor.rs @@ -41,7 +41,7 @@ impl BaseTransactionNetworkExecutor { } } -/// Custom implementation of `Clone` for `BaseTransactionNetworkExecutor`. +/// TODO Custom implementation of `Clone` for `BaseTransactionNetworkExecutor`. /// /// This implementation is necessary because the `Interactor` generic parameter might not /// implement `Clone`. However, since `Interactor` is used only as phantom data (it does not @@ -58,7 +58,7 @@ impl Clone for BaseTransactionNetworkExecutor } } -/// Custom implementation of `Debug` for `BaseTransactionNetworkExecutor`. +/// TODO Custom implementation of `Debug` for `BaseTransactionNetworkExecutor`. /// /// This implementation is necessary because the `Interactor` generic parameter might not /// implement `Debug`. As with `Clone`, since `Interactor` is only used as phantom data, @@ -76,7 +76,7 @@ impl Debug for BaseTransactionNetworkExecutor } impl BaseTransactionNetworkExecutor { - /// Creates a new instance of `BaseTransactionNetworkExecutor`. + /// TODO Creates a new instance of `BaseTransactionNetworkExecutor`. /// /// # Parameters /// - `gateway_url`: The URL of the blockchain network gateway. @@ -160,13 +160,13 @@ impl TransactionExecutor for BaseTransactionNe } } -/// Implementation of the `DeployExecutor` trait for the `BaseTransactionNetworkExecutor` struct. +/// TODO Implementation of the `DeployExecutor` trait for the `BaseTransactionNetworkExecutor` struct. /// This implementation enables the deployment of smart contracts on the blockchain /// using a specified blockchain interactor. #[async_trait] impl DeployExecutor for BaseTransactionNetworkExecutor { - /// Asynchronously deploys a smart contract to the blockchain. + /// TODO Asynchronously deploys a smart contract to the blockchain. /// /// # Type Parameters /// diff --git a/executor/src/utils/transaction/call_result.rs b/executor/src/utils/transaction/call_result.rs index 8bc404d..e6af0d6 100644 --- a/executor/src/utils/transaction/call_result.rs +++ b/executor/src/utils/transaction/call_result.rs @@ -1,12 +1,12 @@ use crate::TransactionOnNetwork; -/// A structure encapsulating the result of a contract call. +/// TODO A structure encapsulating the result of a contract call. /// /// `CallResult` is designed to hold the outcome of a contract call operation. It provides /// a clear separation between the transaction response and the actual result data, if any, /// returned by the contract call. pub struct CallResult { - /// The response of the transaction triggered by the contract call. + /// TODO The response of the transaction triggered by the contract call. /// /// This field holds all the general transaction-related information returned after a contract call, /// such as the transaction status, error messages (if any), and other relevant data pertaining to From f7eb16a6134ba38fdc5ebd9292b833287de29ec9 Mon Sep 17 00:00:00 2001 From: Fusee Date: Fri, 31 May 2024 11:22:03 +0200 Subject: [PATCH 22/25] marked with_duration and until_next_block as deprecated --- core/src/caching/caching_none.rs | 1 + core/src/caching/caching_strategy.rs | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/core/src/caching/caching_none.rs b/core/src/caching/caching_none.rs index d374f68..03377e5 100644 --- a/core/src/caching/caching_none.rs +++ b/core/src/caching/caching_none.rs @@ -1,4 +1,5 @@ use std::future::Future; +use std::time::Duration; use async_trait::async_trait; use serde::de::DeserializeOwned; diff --git a/core/src/caching/caching_strategy.rs b/core/src/caching/caching_strategy.rs index 8bb2f67..76b51f1 100644 --- a/core/src/caching/caching_strategy.rs +++ b/core/src/caching/caching_strategy.rs @@ -75,6 +75,18 @@ pub trait CachingStrategy: Clone + Send + Sync + Debug { /// # Returns /// - A new `CachingStrategy` instance with the specified cache duration strategy. fn with_duration_strategy(&self, strategy: CachingDurationStrategy) -> Self; + + #[allow(missing_docs)] + #[deprecated(note = "This function will be removed soon, please use `with_duration_strategy`.")] + fn with_duration(&self, duration: Duration) -> Self { + self.with_duration_strategy(CachingDurationStrategy::Duration(duration)) + } + + #[allow(missing_docs)] + #[deprecated(note = "This function will be removed soon, please use `with_duration_strategy`.")] + fn until_next_block(&self) -> Self { + self.with_duration_strategy(CachingDurationStrategy::EachBlock) + } } From 46e227821fa992167c93e8c6ab459a253cc6b7f7 Mon Sep 17 00:00:00 2001 From: Fusee Date: Fri, 31 May 2024 11:44:11 +0200 Subject: [PATCH 23/25] updated outdated comments --- abi-build/src/generator/impl_contract.rs | 32 ++----------- core/src/caching/caching_strategy.rs | 4 +- core/src/code/file.rs | 4 +- executor/src/base/deploy.rs | 23 ++------- executor/src/base/query.rs | 22 ++------- executor/src/base/transaction.rs | 17 ++----- executor/src/dummy/transaction.rs | 10 ++-- executor/src/error/mock_deploy.rs | 19 ++------ executor/src/error/mock_transaction.rs | 2 +- executor/src/error/network.rs | 7 +-- executor/src/mocking/executor.rs | 48 ++----------------- executor/src/network/query/executor.rs | 14 +++--- executor/src/network/simulate.rs | 11 +---- executor/src/network/transaction/executor.rs | 44 ++++------------- executor/src/utils/transaction/call_result.rs | 4 +- 15 files changed, 51 insertions(+), 210 deletions(-) diff --git a/abi-build/src/generator/impl_contract.rs b/abi-build/src/generator/impl_contract.rs index feeb00b..7f9eb05 100644 --- a/abi-build/src/generator/impl_contract.rs +++ b/abi-build/src/generator/impl_contract.rs @@ -412,7 +412,7 @@ fn impl_abi_endpoint_call_query( }; let call_token = quote! { - /// TODO Executes the `#function_name` function on the smart contract. + /// Executes the `#function_name` function on the smart contract. /// /// # Description /// #abi_description @@ -439,7 +439,7 @@ fn impl_abi_endpoint_call_query( }; let query_token = quote! { - /// TODO Executes the `#function_name` query on the smart contract. + /// Executes the `#function_name` query on the smart contract. /// /// # Description /// #abi_description @@ -487,33 +487,7 @@ fn impl_abi_constructor(contract_info_name: &str, abi_constructor: &AbiConstruct let (function_managed_outputs, function_native_outputs) = impl_endpoint_outputs(&abi_constructor.outputs, abi_types, &debug_api)?; let function_token = quote! { - /// TODO This asynchronous function encapsulates the logic for deploying a smart contract to the blockchain. - /// It takes in a `DeployData` instance, an executor, a gas limit, and additional function-specific inputs - /// to facilitate the deployment process. - /// - /// # Type Parameters - /// - /// - `Code`: This type represents the contract code and must implement the `AsBytesValue` trait to ensure - /// it can be properly serialized for deployment. - /// - `Executor`: This type represents the executor that will carry out the deployment transaction and - /// must implement the `DeployExecutor` trait. - /// - /// # Parameters - /// - /// - `_novax_deploy_data`: An instance of `DeployData` containing the contract code and metadata necessary - /// for deployment. - /// - `_novax_executor`: A mutable reference to an executor that will perform the deployment transaction. - /// - `gas_limit`: The maximum amount of gas that can be consumed during the deployment process. - /// - `#function_inputs`: Additional inputs required for deploying the contract, as defined in the contract's ABI. - /// - /// # Returns - /// - /// A `Result` containing a tuple with the following elements upon successful deployment: - /// - /// - `Address`: The address of the newly deployed contract on the blockchain. - /// - `CallResult`: A `CallResult` instance containing the response data from the contract's deployment. - /// - /// Or a `NovaXError` if the deployment process fails. + /// This asynchronous function encapsulates the logic for deploying a smart contract to the blockchain. pub async fn #function_name(_novax_deploy_data: DeployData, _novax_executor: &mut Executor, _novax_egld_value: num_bigint::BigUint, _novax_gas_limit: u64, #function_inputs) -> Result<(Address, CallResult<#function_native_outputs>), NovaXError> { let mut _novax_contract = #contract_info_ident::new(&multiversx_sc::types::Address::from(<[u8;32]>::default())); diff --git a/core/src/caching/caching_strategy.rs b/core/src/caching/caching_strategy.rs index 76b51f1..d1fa431 100644 --- a/core/src/caching/caching_strategy.rs +++ b/core/src/caching/caching_strategy.rs @@ -67,10 +67,10 @@ pub trait CachingStrategy: Clone + Send + Sync + Debug { /// - A `Result` indicating success or an error if the operation fails. async fn clear(&self) -> Result<(), NovaXError>; - /// TODO Creates a new `CachingStrategy` instance with a specified cache duration strategy. + /// Creates a new `CachingStrategy` instance with a specified cache duration strategy. /// /// # Parameters - /// - `strategy`: The duration for which cache entries should be kept. + /// - `strategy`: The duration strategy for which cache entries should be kept. /// /// # Returns /// - A new `CachingStrategy` instance with the specified cache duration strategy. diff --git a/core/src/code/file.rs b/core/src/code/file.rs index 490e822..6fec10b 100644 --- a/core/src/code/file.rs +++ b/core/src/code/file.rs @@ -11,7 +11,7 @@ pub struct FileCode(PathBuf); #[async_trait] impl AsBytesValue for &FileCode { - /// TODO Asynchronously reads the content of the file identified by the path contained in `self`, + /// Asynchronously reads the content of the file identified by the path contained in `self`, /// converting the file content into a `BytesValue`. /// /// # Errors @@ -25,7 +25,7 @@ impl AsBytesValue for &FileCode { #[async_trait] impl AsBytesValue for &str { - /// TODO Asynchronously reads the content of the file identified by `self` as a path, + /// Asynchronously reads the content of the file identified by `self` as a path, /// converting the file content into a `BytesValue`. /// /// This implementation constructs a `FileCode` from `self` and delegates the task to the diff --git a/executor/src/base/deploy.rs b/executor/src/base/deploy.rs index 63c192a..cd7957e 100644 --- a/executor/src/base/deploy.rs +++ b/executor/src/base/deploy.rs @@ -11,25 +11,10 @@ use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::TopDecodeMulti; -/// TODO A trait defining the contract for executing smart contract deployment operations asynchronously. +/// A trait defining the contract for executing smart contract deployment operations asynchronously. #[async_trait] pub trait DeployExecutor: Send + Sync { - /// TODO Executes a smart contract deployment step asynchronously. - /// - /// # Type Parameters - /// - /// * `OriginalResult` - The result type expected from the smart contract deployment. - /// Must implement `TopEncodeMulti`, `Send`, and `Sync`. - /// * `S` - The type encapsulating the smart contract deployment step. - /// Must implement `AsMut>` and `Send`. - /// - /// # Parameters - /// - /// * `sc_deploy_step` - The smart contract deployment step to be executed. - /// - /// # Returns - /// - /// A `Result` with an empty `Ok(())` value for success, or `Err(ExecutorError)` for failure. + /// Executes a smart contract deployment step asynchronously. async fn sc_deploy< OutputManaged >( @@ -44,11 +29,11 @@ pub trait DeployExecutor: Send + Sync { OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; } -/// TODO An implementation of `DeployExecutor` for `Arc>` where `T: DeployExecutor`. +/// An implementation of `DeployExecutor` for `Arc>` where `T: DeployExecutor`. /// This wrapper allows for thread-safe, shared ownership of a deploy executor. #[async_trait] impl DeployExecutor for Arc> { - /// TODO Executes a smart contract deployment step asynchronously, delegating to the inner `DeployExecutor`. + /// Executes a smart contract deployment step asynchronously, delegating to the inner `DeployExecutor`. async fn sc_deploy< OutputManaged >( diff --git a/executor/src/base/query.rs b/executor/src/base/query.rs index 6bebbda..fcd4d67 100644 --- a/executor/src/base/query.rs +++ b/executor/src/base/query.rs @@ -7,7 +7,7 @@ use novax_data::{Address, NativeConvertible}; use crate::error::executor::ExecutorError; use crate::TokenTransfer; -/// TODO A trait representing the execution of smart contract queries. +/// A trait representing the execution of smart contract queries. /// /// This trait is implemented by types that can execute smart contract queries in a specific environment, /// like a real blockchain or a mocked one. The trait's associated function, `execute`, is responsible for @@ -15,21 +15,7 @@ use crate::TokenTransfer; /// and returning the result of the query. #[async_trait] pub trait QueryExecutor: Send + Sync { - /// TODO Executes a smart contract query and returns the result. - /// - /// # Parameters - /// - /// - `request`: A reference to the [`ScCallStep`] representing the smart contract query to be executed. - /// - /// # Type Parameters - /// - /// - `OutputManaged`: The managed type representing the expected output of the query. - /// It must implement [`TopDecodeMulti`], [`NativeConvertible`], [`Send`], and [`Sync`]. - /// - /// # Returns - /// - /// A [`Result`] containing the native representation of the query result, - /// or an [`ExecutorError`] if the query execution fails. + /// Executes a smart contract query and returns the result. async fn execute( &self, to: &Address, @@ -42,7 +28,7 @@ pub trait QueryExecutor: Send + Sync { OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; } -/// TODO An implementation of `QueryExecutor` for `Arc` where `T: QueryExecutor`. +/// An implementation of `QueryExecutor` for `Arc` where `T: QueryExecutor`. /// /// This implementation allows shared access to an executor instance. #[async_trait] @@ -69,7 +55,7 @@ impl QueryExecutor for Arc { } } -/// TODO An implementation of `QueryExecutor` for `Arc>` where `T: QueryExecutor`. +/// An implementation of `QueryExecutor` for `Arc>` where `T: QueryExecutor`. /// /// This implementation allows exclusive access to an executor instance, ensuring safe mutable access. #[async_trait] diff --git a/executor/src/base/transaction.rs b/executor/src/base/transaction.rs index be49c42..954b148 100644 --- a/executor/src/base/transaction.rs +++ b/executor/src/base/transaction.rs @@ -11,21 +11,12 @@ use crate::call_result::CallResult; use crate::error::executor::ExecutorError; use crate::utils::transaction::token_transfer::TokenTransfer; -/// TODO A trait defining the necessary operations for executing smart contract transactions. +/// A trait defining the necessary operations for executing smart contract transactions. /// /// Implementations of this trait can vary based on the specific environment (e.g., real blockchain, mock blockchain). #[async_trait] pub trait TransactionExecutor: Send + Sync { - /// TODO Executes a smart contract call with the specified parameters. - /// - /// # Parameters - /// - `sc_call_step`: A mutable reference to the typed smart contract call step. - /// - /// # Type Parameters - /// - `OriginalResult`: The type of the result expected from the smart contract call. Must implement the `Send` trait. - /// - /// # Returns - /// - A `Result` with an empty `Ok(())` value if the call is successful, or an `Err(ExecutorError)` if the call fails. + /// Executes a smart contract call with the specified parameters. async fn sc_call( &mut self, to: &Address, @@ -39,12 +30,12 @@ pub trait TransactionExecutor: Send + Sync { OutputManaged: TopDecodeMulti + NativeConvertible + Send + Sync; } -/// TODO An implementation of `TransactionExecutor` trait for types wrapped in `Arc>`. +/// An implementation of `TransactionExecutor` trait for types wrapped in `Arc>`. /// /// This implementation allows shared access to a transaction executor instance across multiple threads. #[async_trait] impl TransactionExecutor for Arc> { - /// TODO Executes a smart contract call using the underlying `TransactionExecutor` implementation. + /// Executes a smart contract call using the underlying `TransactionExecutor` implementation. async fn sc_call( &mut self, to: &Address, diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index 4098a1d..175bd2f 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -15,13 +15,13 @@ use crate::utils::transaction::deploy::get_deploy_call_input; use crate::utils::transaction::normalization::NormalizationInOut; use crate::utils::transaction::token_transfer::TokenTransfer; -/// TODO A type alias for `DummyExecutor` handling `ScCallStep`. +/// A type alias for `DummyExecutor` handling `SendableTransaction`. pub type DummyTransactionExecutor = DummyExecutor; -/// TODO A type alias for `DummyExecutor` handling `ScDeployStep`. +/// A type alias for `DummyExecutor` handling `SendableTransaction`. pub type DummyDeployExecutor = DummyExecutor; -/// TODO A structure for capturing transaction details without performing actual blockchain transactions. +/// A structure for capturing transaction details without performing actual blockchain transactions. /// It is designed for testing scenarios, especially to fetch `SendableTransaction` details from interactions. pub struct DummyExecutor { /// Holds the transaction details. @@ -31,7 +31,7 @@ pub struct DummyExecutor { } impl DummyExecutor { - /// TODO Retrieves the transaction details encapsulated into a `SendableTransaction`. + /// Retrieves the transaction details encapsulated into a `SendableTransaction`. pub fn get_transaction_details(&self) -> Result { if let Some(tx) = self.tx.clone() { Ok(tx.to_sendable_transaction()) @@ -42,7 +42,7 @@ impl DummyExecutor { } impl DummyExecutor { - /// TODO Constructs a new `DummyExecutor` instance. + /// Constructs a new `DummyExecutor` instance. /// /// # Arguments /// diff --git a/executor/src/error/mock_deploy.rs b/executor/src/error/mock_deploy.rs index 57b5dde..f5953e5 100644 --- a/executor/src/error/mock_deploy.rs +++ b/executor/src/error/mock_deploy.rs @@ -1,32 +1,21 @@ use crate::error::executor::ExecutorError; use serde::{Deserialize, Serialize}; -/// TODO An enumeration representing the various errors that can occur when deploying through the `MockExecutor`. -/// -/// Currently, it includes the following variant: -/// * `CallerAddressNotPresent` - Indicates that a caller address is not present but is required for the deployment operation. +/// An enumeration representing the various errors that can occur when deploying through the `MockExecutor`. #[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] pub enum MockDeployError { - /// TODO This error variant is triggered when there is an attempt to deploy, but no caller address is present. + /// This error variant is triggered when there is an attempt to deploy, but no caller address is present. /// In the context of a `MockExecutor`, a caller's address is essential for deployment, and if the /// `opt_caller` field is `None`, this error will be thrown. CallerAddressNotPresent, } -/// TODO An implementation of the `From` trait to allow for easy conversions from `MockDeployError` to `ExecutorError`. +/// An implementation of the `From` trait to allow for easy conversions from `MockDeployError` to `ExecutorError`. /// /// This implementation facilitates the propagation of `MockDeployError`s through the code, /// by allowing them to be converted into the more general `ExecutorError` type. impl From for ExecutorError { - /// TODO Performs the conversion from a `MockDeployError` to an `ExecutorError`. - /// - /// # Parameters - /// - /// * `value`: The `MockDeployError` value to be converted. - /// - /// # Returns - /// - /// * `ExecutorError`: An `ExecutorError` instance containing the provided `MockDeployError` value. + /// Performs the conversion from a `MockDeployError` to an `ExecutorError`. fn from(value: MockDeployError) -> Self { ExecutorError::MockDeploy(value) } diff --git a/executor/src/error/mock_transaction.rs b/executor/src/error/mock_transaction.rs index ca19d75..101ff3f 100644 --- a/executor/src/error/mock_transaction.rs +++ b/executor/src/error/mock_transaction.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] pub enum MockTransactionError { - /// TODO This error variant is triggered when there is an attempt to deploy, but no caller address is present. + /// This error variant is triggered when there is an attempt to deploy, but no caller address is present. /// In the context of a `MockExecutor`, a caller's wallet address is essential for calling a contract, and if the /// `opt_caller` field is `None`, this error will be thrown. CallerAddressNotPresent, diff --git a/executor/src/error/network.rs b/executor/src/error/network.rs index 7cc7d45..0704d10 100644 --- a/executor/src/error/network.rs +++ b/executor/src/error/network.rs @@ -1,12 +1,7 @@ use crate::error::executor::ExecutorError; use serde::{Deserialize, Serialize}; -/// TODO An enumeration representing the various errors that can occur during network query operations. -/// -/// It includes the following variants: -/// * `EmptyArgs` - Indicates that the arguments provided for the network query are empty when they shouldn't be. -/// * `ErrorWhileSendingRequest` - Indicates an error occurred while sending the request to the network. -/// The accompanying message provides more detail regarding the nature of the error. +/// An enumeration representing the various errors that can occur during network query operations. #[derive(Serialize, Deserialize, PartialEq, Clone, Debug)] pub enum NetworkQueryError { /// This error variant is triggered when the argument provided for the network query is empty, diff --git a/executor/src/mocking/executor.rs b/executor/src/mocking/executor.rs index bd97c6d..2727cff 100644 --- a/executor/src/mocking/executor.rs +++ b/executor/src/mocking/executor.rs @@ -70,20 +70,9 @@ impl TransactionExecutor for MockExecutor A: Deref + Send + Sync, Address: for<'a> From<&'a A::Target> { - /// TODO Executes a smart contract call within a mocked environment. + /// Executes a smart contract call within a mocked environment. /// - /// This method extracts or determines the caller's address, performs a smart contract call, - /// and updates the world state accordingly, all within a controlled, mocked environment. - /// - /// # Parameters - /// - `sc_call_step`: A mutable reference to a `TypedScCall` object representing the smart contract call step. - /// - /// # Type Parameters - /// - `OriginalResult`: The type of the result expected from the smart contract call. Must implement the `Send` trait. - /// - /// # Returns - /// - A `Result` object with an empty `Ok(())` value if the call is successful, - /// or an `Err(ExecutorError)` if the call fails for any reason. + /// This method updates the world state accordingly, all within a controlled, mocked environment. async fn sc_call( &mut self, to: &Address, @@ -159,23 +148,7 @@ impl DeployExecutor for MockExecutor A: Deref + Send + Sync, Address: for<'a> From<&'a A::Target> { - /// TODO Asynchronously deploys a smart contract to the mock blockchain environment. - /// - /// # Type Parameters - /// - /// * `OriginalResult`: Represents the result type expected from the smart contract deployment. - /// This type must implement `TopEncodeMulti`, `Send`, and `Sync`. - /// * `S`: Represents the type encapsulating the smart contract deployment step. - /// This type must implement `AsMut>` and `Send`. - /// - /// # Parameters - /// - /// * `sc_deploy_step`: A mutable reference to the smart contract deployment step to be executed. - /// - /// # Returns - /// - /// A `Result` with an empty `Ok(())` value indicating success, or an `Err(ExecutorError)` indicating failure, - /// specifically a `MockDeployError::WalletAddressNotPresent` error if the wallet address is not present. + /// Asynchronously deploys a smart contract to the mock blockchain environment. async fn sc_deploy< OutputManaged >( @@ -241,20 +214,7 @@ impl QueryExecutor for MockExecutor A: Clone + Deref + Send + Sync, Address: for<'a> From<&'a A::Target> { - /// TODO Executes a simulated smart contract query in the mock environment. - /// - /// # Type Parameters - /// - /// * `OutputManaged`: The type representing the expected output of the smart contract query. It should implement `TopDecodeMulti`, `NativeConvertible`, `Send`, and `Sync`. - /// - /// # Parameters - /// - /// * `request`: A reference to the `ScCallStep` detailing the smart contract query to be executed. - /// - /// # Returns - /// - /// * `Result`: On successful execution, returns a `Result` containing the native converted query output. - /// On failure, returns a `Result` containing an `ExecutorError`. + /// Executes a simulated smart contract query in the mock environment. async fn execute( &self, to: &Address, diff --git a/executor/src/network/query/executor.rs b/executor/src/network/query/executor.rs index 1be0261..f5040f4 100644 --- a/executor/src/network/query/executor.rs +++ b/executor/src/network/query/executor.rs @@ -10,10 +10,11 @@ use crate::{BlockchainProxy, ExecutorError, NetworkQueryError, QueryExecutor, To use crate::network::query::proxy::NetworkBlockchainProxy; use crate::utils::transaction::normalization::NormalizationInOut; -/// TODO A convenient type alias for `QueryNetworkExecutor` with `NetworkBlockchainProxy` as the generic type. +/// A convenient type alias for `QueryNetworkExecutor` with `NetworkBlockchainProxy` as the generic type. +/// This is the privileged query executor for network interaction. pub type ProxyQueryExecutor = QueryNetworkExecutor; -/// TODO A structure to execute smart contract queries on a real blockchain environment via a specified gateway. +/// A structure to execute smart contract queries on a real blockchain environment via a specified gateway. /// /// This executor utilizes a blockchain proxy to communicate with the blockchain network and /// execute the queries. @@ -43,10 +44,7 @@ impl QueryNetworkExecutor { #[async_trait] impl QueryExecutor for QueryNetworkExecutor { - /// TODO Executes a smart contract query on the real blockchain environment. - /// - /// This method constructs a VM request from the provided `ScCallStep`, sends it to the blockchain network - /// via the blockchain proxy, and processes the result to return it in a native format. + /// Executes a smart contract query on the real blockchain environment. async fn execute( &self, to: &novax_data::Address, @@ -91,7 +89,7 @@ impl QueryExecutor for QueryNetworkExecutor { #[async_trait] impl QueryExecutor for &str { - /// TODO Allows using a string representing the gateway URL to execute a query on the real blockchain environment. + /// Convenience implementation which allows using a string representing the gateway URL to execute a query on the real blockchain environment. /// /// This implementation creates a new `ProxyQueryExecutor` instance using the string as the gateway URL, /// and delegates the query execution to it. @@ -120,7 +118,7 @@ impl QueryExecutor for &str { #[async_trait] impl QueryExecutor for String { - /// TODO Allows using a string representing the gateway URL to execute a query on the real blockchain environment. + /// Convenience implementation which allows using a string representing the gateway URL to execute a query on the real blockchain environment. /// /// This implementation creates a new `ProxyQueryExecutor` instance using the string as the gateway URL, /// and delegates the query execution to it. diff --git a/executor/src/network/simulate.rs b/executor/src/network/simulate.rs index d8b8eba..56c5187 100644 --- a/executor/src/network/simulate.rs +++ b/executor/src/network/simulate.rs @@ -123,16 +123,7 @@ impl Debug for BaseSimulationNetworkExecutor #[async_trait] impl TransactionExecutor for BaseSimulationNetworkExecutor { - /// TODO Executes a smart contract call in a simulated environment. - /// - /// # Type Parameters - /// - `OriginalResult`: The result type expected from the smart contract call. - /// - /// # Parameters - /// - `sc_call_step`: The smart contract call step to be executed. - /// - /// # Returns - /// A `Result` indicating the success or failure of the smart contract call execution. + /// Executes a smart contract call in a simulated environment. async fn sc_call( &mut self, to: &Address, diff --git a/executor/src/network/transaction/executor.rs b/executor/src/network/transaction/executor.rs index 8233c84..a5b7461 100644 --- a/executor/src/network/transaction/executor.rs +++ b/executor/src/network/transaction/executor.rs @@ -41,12 +41,7 @@ impl BaseTransactionNetworkExecutor { } } -/// TODO Custom implementation of `Clone` for `BaseTransactionNetworkExecutor`. -/// -/// This implementation is necessary because the `Interactor` generic parameter might not -/// implement `Clone`. However, since `Interactor` is used only as phantom data (it does not -/// affect the state of `BaseTransactionNetworkExecutor`), we can safely implement `Clone` -/// without the `Interactor` needing to be `Clone`. +/// Custom implementation of `Clone` for `BaseTransactionNetworkExecutor`, when `Interactor` is `Clone`. impl Clone for BaseTransactionNetworkExecutor where Interactor: BlockchainInteractor + Clone @@ -58,13 +53,9 @@ impl Clone for BaseTransactionNetworkExecutor } } -/// TODO Custom implementation of `Debug` for `BaseTransactionNetworkExecutor`. +/// Custom implementation of `Debug` for `BaseTransactionNetworkExecutor`, when `Interactor` is `Debug`. /// -/// This implementation is necessary because the `Interactor` generic parameter might not -/// implement `Debug`. As with `Clone`, since `Interactor` is only used as phantom data, -/// it does not impact the debug representation of `BaseTransactionNetworkExecutor`. This -/// implementation ensures that instances of `BaseTransactionNetworkExecutor` can be -/// formatted using the `Debug` trait regardless of whether `Interactor` implements `Debug`. +/// The implementation is basic, it prefixes "BaseTransactionNetworkExecutor" before the `Interactor`'s debug implementation. impl Debug for BaseTransactionNetworkExecutor where Interactor: BlockchainInteractor + Debug @@ -76,14 +67,10 @@ impl Debug for BaseTransactionNetworkExecutor } impl BaseTransactionNetworkExecutor { - /// TODO Creates a new instance of `BaseTransactionNetworkExecutor`. - /// - /// # Parameters - /// - `gateway_url`: The URL of the blockchain network gateway. - /// - `wallet`: A reference to the wallet used for signing transactions. + /// Creates a new instance of `BaseTransactionNetworkExecutor`. /// - /// # Returns - /// A new `BaseTransactionNetworkExecutor` instance. + /// This function is async because the Interactor may perform some requests, such as retrieving the network configuration. + /// Those async operations might fail, thus the Result return type. pub async fn new(gateway_url: String, wallet: Wallet) -> Result { let interactor = Interactor::new( gateway_url, @@ -160,28 +147,13 @@ impl TransactionExecutor for BaseTransactionNe } } -/// TODO Implementation of the `DeployExecutor` trait for the `BaseTransactionNetworkExecutor` struct. +/// Implementation of the `DeployExecutor` trait for the `BaseTransactionNetworkExecutor` struct. /// This implementation enables the deployment of smart contracts on the blockchain /// using a specified blockchain interactor. #[async_trait] impl DeployExecutor for BaseTransactionNetworkExecutor { - /// TODO Asynchronously deploys a smart contract to the blockchain. - /// - /// # Type Parameters - /// - /// * `OriginalResult`: Represents the result type expected from the smart contract deployment. - /// This type must implement `TopEncodeMulti`, `Send`, and `Sync`. - /// * `S`: Represents the type encapsulating the smart contract deployment step. - /// This type must implement `AsMut>` and `Send`. - /// - /// # Parameters - /// - /// * `sc_deploy_step`: A mutable reference to the smart contract deployment step to be executed. - /// - /// # Returns - /// - /// A `Result` with an empty `Ok(())` value indicating success, or an `Err(ExecutorError)` indicating failure. + /// Asynchronously deploys a smart contract to the blockchain. async fn sc_deploy< OutputManaged >( diff --git a/executor/src/utils/transaction/call_result.rs b/executor/src/utils/transaction/call_result.rs index e6af0d6..8bc404d 100644 --- a/executor/src/utils/transaction/call_result.rs +++ b/executor/src/utils/transaction/call_result.rs @@ -1,12 +1,12 @@ use crate::TransactionOnNetwork; -/// TODO A structure encapsulating the result of a contract call. +/// A structure encapsulating the result of a contract call. /// /// `CallResult` is designed to hold the outcome of a contract call operation. It provides /// a clear separation between the transaction response and the actual result data, if any, /// returned by the contract call. pub struct CallResult { - /// TODO The response of the transaction triggered by the contract call. + /// The response of the transaction triggered by the contract call. /// /// This field holds all the general transaction-related information returned after a contract call, /// such as the transaction status, error messages (if any), and other relevant data pertaining to From ce498cefb541570e8c5e55088720049c78f60c5c Mon Sep 17 00:00:00 2001 From: Fusee Date: Fri, 31 May 2024 11:50:41 +0200 Subject: [PATCH 24/25] removed warnings --- core/src/caching/caching_none.rs | 1 - executor/src/error/transaction.rs | 1 + executor/src/network/transaction/executor.rs | 11 ++++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/src/caching/caching_none.rs b/core/src/caching/caching_none.rs index 03377e5..d374f68 100644 --- a/core/src/caching/caching_none.rs +++ b/core/src/caching/caching_none.rs @@ -1,5 +1,4 @@ use std::future::Future; -use std::time::Duration; use async_trait::async_trait; use serde::de::DeserializeOwned; diff --git a/executor/src/error/transaction.rs b/executor/src/error/transaction.rs index dbd7486..1671184 100644 --- a/executor/src/error/transaction.rs +++ b/executor/src/error/transaction.rs @@ -11,6 +11,7 @@ pub enum TransactionError { CannotDeserializeTransactionOnNetworkResponse { response: String }, FailedToSendTheTransaction { message: String }, NoSmartContractResult, + SmartContractExecutionError { status: u64, message: String }, TimeoutWhenRetrievingTransactionOnNetwork, CannotDecodeSmartContractResult, NoSCDeployLogInTheResponse, diff --git a/executor/src/network/transaction/executor.rs b/executor/src/network/transaction/executor.rs index a5b7461..289a8fa 100644 --- a/executor/src/network/transaction/executor.rs +++ b/executor/src/network/transaction/executor.rs @@ -17,7 +17,7 @@ use crate::network::transaction::interactor::{BlockchainInteractor, Interactor, use crate::network::utils::wallet::Wallet; use crate::utils::transaction::deploy::get_deploy_call_input; use crate::utils::transaction::normalization::NormalizationInOut; -use crate::utils::transaction::results::{find_sc_deploy_event, find_smart_contract_result}; +use crate::utils::transaction::results::{find_sc_deploy_event, find_sc_error, find_smart_contract_result}; use crate::utils::transaction::token_transfer::TokenTransfer; /// Alias for the `BaseTransactionNetworkExecutor` struct, parameterized with the `Interactor` type. @@ -130,6 +130,15 @@ impl TransactionExecutor for BaseTransactionNe &result.transaction.smart_contract_results, result.transaction.logs.as_ref() )? else { + if let Some(logs) = result.transaction.logs.as_ref() { + if let Ok(Some(error_log)) = find_sc_error(logs) { + return Err(TransactionError::SmartContractExecutionError { // TODO add tests for this + status: error_log.status, + message: error_log.message + }.into()) + } + } + return Err(TransactionError::NoSmartContractResult.into()) }; From 4417151b5a5ae35255080208204f6702a3a90a31 Mon Sep 17 00:00:00 2001 From: Fusee Date: Fri, 31 May 2024 12:04:43 +0200 Subject: [PATCH 25/25] clippy --- caching/src/date/get_current_timestamp.rs | 2 +- core/build.rs | 4 +- executor/src/dummy/transaction.rs | 2 +- executor/src/network/query/executor.rs | 4 +- .../src/network/transaction/interactor.rs | 5 ++- .../models/transaction_on_network.rs | 6 +-- .../src/utils/date/get_current_timestamp.rs | 2 +- executor/src/utils/transaction/deploy.rs | 2 +- .../src/utils/transaction/normalization.rs | 38 ++++++++++++------- tester/core/tests/network_call.rs | 1 + 10 files changed, 37 insertions(+), 29 deletions(-) diff --git a/caching/src/date/get_current_timestamp.rs b/caching/src/date/get_current_timestamp.rs index 68ccbdc..250188f 100644 --- a/caching/src/date/get_current_timestamp.rs +++ b/caching/src/date/get_current_timestamp.rs @@ -35,7 +35,7 @@ mod implementation { use core::time::Duration; thread_local! { - static MOCK_TIME: RefCell = RefCell::new(Duration::from_secs(0)); + static MOCK_TIME: RefCell = const { RefCell::new(Duration::from_secs(0)) }; } pub(crate) fn get_current_timestamp() -> Result { diff --git a/core/build.rs b/core/build.rs index 7d790ee..66eb3d2 100644 --- a/core/build.rs +++ b/core/build.rs @@ -53,9 +53,7 @@ fn main() { // // In a few versions of the Rust SDK, the upgrade function was an endpoint in the ABI. // It is now under the field upgradeConstructor. - abi.endpoints = abi.endpoints.into_iter() - .filter(|endpoint| endpoint.name != "upgrade") - .collect(); + abi.endpoints.retain(|endpoint| endpoint.name != "upgrade"); let abi_generated_file = generate_from_abi(&abi).unwrap(); diff --git a/executor/src/dummy/transaction.rs b/executor/src/dummy/transaction.rs index 175bd2f..ffe0cfc 100644 --- a/executor/src/dummy/transaction.rs +++ b/executor/src/dummy/transaction.rs @@ -87,7 +87,7 @@ impl TransactionExecutor for DummyExecutor { esdt_transfers, }.normalize()?; - self.tx = Some(normalized.to_sendable_transaction(gas_limit)); + self.tx = Some(normalized.into_sendable_transaction(gas_limit)); let dummy_result = CallResult { response: Default::default(), diff --git a/executor/src/network/query/executor.rs b/executor/src/network/query/executor.rs index f5040f4..d8beba4 100644 --- a/executor/src/network/query/executor.rs +++ b/executor/src/network/query/executor.rs @@ -147,7 +147,7 @@ impl QueryExecutor for String { fn encode_arguments(arguments: &[Vec]) -> Vec { arguments.iter() - .map(|arg| hex::encode(arg)) + .map(hex::encode) .collect() } @@ -162,7 +162,7 @@ mod tests { #[test] fn test_encode_arguments_empty() { - let result = encode_arguments(&vec![]); + let result = encode_arguments(&[]); let expected: Vec = vec![]; assert_eq!(result, expected); diff --git a/executor/src/network/transaction/interactor.rs b/executor/src/network/transaction/interactor.rs index 87fca7b..9272fee 100644 --- a/executor/src/network/transaction/interactor.rs +++ b/executor/src/network/transaction/interactor.rs @@ -50,7 +50,7 @@ pub enum TransactionRefreshStrategy { impl Interactor { async fn get_account_info(&self) -> Result { - let address = Address::from(self.wallet.get_address()); + let address = self.wallet.get_address(); Ok(get_address_info(&self.gateway_url, address).await?.account) } @@ -85,7 +85,8 @@ impl Interactor { } } } - + + #[allow(clippy::too_many_arguments)] fn get_sendable_transaction( &self, nonce: u64, diff --git a/executor/src/network/transaction/models/transaction_on_network.rs b/executor/src/network/transaction/models/transaction_on_network.rs index c60177e..a3bd440 100644 --- a/executor/src/network/transaction/models/transaction_on_network.rs +++ b/executor/src/network/transaction/models/transaction_on_network.rs @@ -61,11 +61,7 @@ impl TransactionOnNetwork { return true }; - if let Ok(None) = find_sc_error(logs) { - true - } else { - false - } + matches!(find_sc_error(logs), Ok(None)) } } diff --git a/executor/src/utils/date/get_current_timestamp.rs b/executor/src/utils/date/get_current_timestamp.rs index b2e1261..f6067c5 100644 --- a/executor/src/utils/date/get_current_timestamp.rs +++ b/executor/src/utils/date/get_current_timestamp.rs @@ -32,7 +32,7 @@ mod implementation { use crate::ExecutorError; thread_local! { - static MOCK_TIME: RefCell = RefCell::new(Duration::from_secs(0)); + static MOCK_TIME: RefCell = const { RefCell::new(Duration::from_secs(0)) }; } pub(crate) fn get_current_timestamp() -> Result { diff --git a/executor/src/utils/transaction/deploy.rs b/executor/src/utils/transaction/deploy.rs index 576194d..0402d65 100644 --- a/executor/src/utils/transaction/deploy.rs +++ b/executor/src/utils/transaction/deploy.rs @@ -22,7 +22,7 @@ pub fn get_deploy_call_input( gas_limit: u64 ) -> DeployCallInput { let mut encoded_metadata: ManagedBuffer = ManagedBuffer::new(); - _ = code_metadata.top_encode(&mut encoded_metadata).unwrap(); + code_metadata.top_encode(&mut encoded_metadata).unwrap(); let built_in_arguments: Vec> = vec![ bytes, diff --git a/executor/src/utils/transaction/normalization.rs b/executor/src/utils/transaction/normalization.rs index a71ec7f..c04500e 100644 --- a/executor/src/utils/transaction/normalization.rs +++ b/executor/src/utils/transaction/normalization.rs @@ -13,6 +13,12 @@ pub struct NormalizationInOut { pub esdt_transfers: Vec } +struct TokenPaymentBytes { + token_identifier: Vec, + nonce: Vec, + amount: Vec +} + impl NormalizationInOut { pub fn normalize(mut self) -> Result { let esdt_transfers_len = self.esdt_transfers.len(); @@ -26,23 +32,23 @@ impl NormalizationInOut { } else if esdt_transfers_len == 1 { let transfer = self.esdt_transfers.remove(0); let is_fungible = transfer.nonce == 0; - let (encoded_identifier, encoded_nonce, encoded_amount) = encode_transfer(transfer)?; + let encoded_token_payment = encode_transfer(transfer)?; let (receiver, function_name, mut built_in_args) = if is_fungible { let function_name = "ESDTTransfer".to_string(); let built_in_args = vec![ - encoded_identifier, - encoded_amount + encoded_token_payment.token_identifier, + encoded_token_payment.amount ]; (self.receiver, Some(function_name), built_in_args) } else { let function_name = "ESDTNFTTransfer".to_string(); let built_in_args = vec![ - encoded_identifier, - encoded_nonce, - encoded_amount, + encoded_token_payment.token_identifier, + encoded_token_payment.nonce, + encoded_token_payment.amount, Address::from_bech32_string(&self.receiver)?.to_bytes().to_vec(), ]; @@ -74,11 +80,11 @@ impl NormalizationInOut { ]; for transfer in self.esdt_transfers { - let (encoded_identifier, encoded_nonce, encoded_amount) = encode_transfer(transfer)?; + let encoded_token_payment = encode_transfer(transfer)?; - built_in_args.push(encoded_identifier); - built_in_args.push(encoded_nonce); - built_in_args.push(encoded_amount); + built_in_args.push(encoded_token_payment.token_identifier); + built_in_args.push(encoded_token_payment.nonce); + built_in_args.push(encoded_token_payment.amount); } if let Some(function_name) = self.function_name { @@ -117,7 +123,7 @@ impl NormalizationInOut { args_string.join("@") } - pub fn to_sendable_transaction(self, gas_limit: u64) -> SendableTransaction { + pub fn into_sendable_transaction(self, gas_limit: u64) -> SendableTransaction { SendableTransaction { receiver: self.receiver.clone(), egld_value: self.egld_value.clone(), @@ -142,7 +148,7 @@ fn encode_u64(value: u64) -> Vec { bytes } -fn encode_transfer(token_transfer: TokenTransfer) -> Result<(Vec, Vec, Vec), ExecutorError> { +fn encode_transfer(token_transfer: TokenTransfer) -> Result { let encoded_identifier = encode_string(&token_transfer.identifier) .map_err(|_| TransactionError::CannotEncodeTransfer)?; @@ -151,7 +157,13 @@ fn encode_transfer(token_transfer: TokenTransfer) -> Result<(Vec, Vec, V let encoded_amount = hex::decode(hex::encode(token_transfer.amount.to_bytes_be())) .map_err(|_| TransactionError::CannotEncodeTransfer)?; - Ok((encoded_identifier, encoded_nonce, encoded_amount)) + let result = TokenPaymentBytes { + token_identifier: encoded_identifier, + nonce: encoded_nonce, + amount: encoded_amount, + }; + + Ok(result) } #[cfg(test)] diff --git a/tester/core/tests/network_call.rs b/tester/core/tests/network_call.rs index ed562d3..d4d81c6 100644 --- a/tester/core/tests/network_call.rs +++ b/tester/core/tests/network_call.rs @@ -170,6 +170,7 @@ async fn get_executor() -> Arc Result<(), NovaXError> { let wallet = Wallet::from_private_key(CALLER_PRIVATE_KEY).unwrap();