diff --git a/Cargo.lock b/Cargo.lock index 78260be29..f292ba987 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -190,9 +190,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" dependencies = [ "memchr", ] @@ -203,6 +203,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127" +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -566,7 +572,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -658,9 +664,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.1" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1e31e207a6b8fb791a38ea3105e6cb541f55e4d029902d3039a4ad07cc4105" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "base64ct" @@ -857,7 +863,7 @@ dependencies = [ [[package]] name = "bp-darwinia-core" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bp-messages", "bp-runtime", @@ -874,7 +880,7 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bp-runtime", "finality-grandpa", @@ -891,7 +897,7 @@ dependencies = [ [[package]] name = "bp-message-dispatch" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bp-runtime", "frame-support", @@ -904,7 +910,7 @@ dependencies = [ [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bitvec", "bp-runtime", @@ -921,7 +927,7 @@ dependencies = [ [[package]] name = "bp-parachains" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bp-polkadot-core", "bp-runtime", @@ -934,7 +940,7 @@ dependencies = [ [[package]] name = "bp-polkadot-core" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bp-messages", "bp-runtime", @@ -953,7 +959,7 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "frame-support", "frame-system", @@ -974,7 +980,7 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -989,7 +995,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bp-header-chain", "bp-message-dispatch", @@ -997,6 +1003,7 @@ dependencies = [ "bp-parachains", "bp-polkadot-core", "bp-runtime", + "fp-account", "frame-support", "frame-system", "hash-db 0.16.0", @@ -1217,13 +1224,13 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "time 0.1.45", "wasm-bindgen", @@ -1293,9 +1300,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.0" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93aae7a4192245f70fe75dd9157fc7b4a5bf53e88d30bd4396f7d8f9284d5acc" +checksum = "b4ed2379f8603fa2b7509891660e802b88c70a79a6427a70abb5968054de2c28" dependencies = [ "clap_builder", "clap_derive", @@ -1304,9 +1311,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.0" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f423e341edefb78c9caba2d9c7f7687d0e72e89df3ce3394554754393ac3990" +checksum = "72394f3339a76daf211e57d4bcb374410f3965dcc606dd0e03738c7888766980" dependencies = [ "anstream", "anstyle", @@ -1317,14 +1324,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.0" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "191d9573962933b4027f932c600cd252ce27a8ad5979418fe78e43c07996f27b" +checksum = "59e9ef9a08ee1c0e1f2e162121665ac45ac3783b0f897db7244ae75ad9a8f65b" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -1363,9 +1370,9 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "comfy-table" -version = "6.1.4" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e7b787b0dc42e8111badfdbe4c3059158ccb2db8780352fa1b01e8ccf45cc4d" +checksum = "7e959d788268e3bf9d35ace83e81b124190378e4c91c9067524675e33394b8ba" dependencies = [ "strum", "strum_macros", @@ -2350,9 +2357,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" +checksum = "109308c20e8445959c2792e81871054c6a17e6976489a93d2769641a2ba5839c" dependencies = [ "cc", "cxxbridge-flags", @@ -2362,9 +2369,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" +checksum = "daf4c6755cdf10798b97510e0e2b3edb9573032bd9379de8fffa59d68165494f" dependencies = [ "cc", "codespan-reporting", @@ -2372,24 +2379,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] name = "cxxbridge-flags" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" +checksum = "882074421238e84fe3b4c65d0081de34e5b323bf64555d3e61991f76eb64a7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" +checksum = "4a076022ece33e7686fb76513518e219cca4fce5750a8ae6d1ce6c0f48fd1af9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -3140,7 +3147,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -3309,7 +3316,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -3320,7 +3327,7 @@ checksum = "48016319042fb7c87b78d2993084a831793a897a5cd1a2a67cab9d1eeb4b7d76" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -3541,7 +3548,7 @@ dependencies = [ [[package]] name = "evm-tracing-events" version = "0.1.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "environmental", "ethereum", @@ -4342,9 +4349,9 @@ dependencies = [ [[package]] name = "fs4" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f5b6908aecca5812a4569056285e58c666588c9573ee59765bf1d3692699e2" +checksum = "7672706608ecb74ab2e055c68327ffc25ae4cac1e12349204fd5fb0f3487cce2" dependencies = [ "rustix 0.37.19", "windows-sys 0.48.0", @@ -4434,7 +4441,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -5028,13 +5035,14 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.3" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729" +checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" dependencies = [ "console", + "instant", "number_prefix", - "portable-atomic 0.3.20", + "portable-atomic", "unicode-width", ] @@ -5095,9 +5103,9 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi 0.3.1", "libc", @@ -5480,9 +5488,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "fc86cde3ff845662b8f4ef6cb50ea0e20c524eb3d29ae048287e06a1b3fa6a81" [[package]] name = "libloading" @@ -6090,12 +6098,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" [[package]] name = "lru" @@ -6321,14 +6326,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -6396,7 +6400,7 @@ dependencies = [ [[package]] name = "moonbeam-client-evm-tracing" version = "0.1.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "ethereum-types 0.14.1", "evm-tracing-events", @@ -6411,7 +6415,7 @@ dependencies = [ [[package]] name = "moonbeam-evm-tracer" version = "0.1.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "ethereum-types 0.14.1", "evm", @@ -6431,7 +6435,7 @@ dependencies = [ [[package]] name = "moonbeam-primitives-ext" version = "0.1.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "ethereum-types 0.14.1", "evm-tracing-events", @@ -6444,7 +6448,7 @@ dependencies = [ [[package]] name = "moonbeam-rpc-core-debug" version = "0.1.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "ethereum-types 0.14.1", "futures 0.3.28", @@ -6459,7 +6463,7 @@ dependencies = [ [[package]] name = "moonbeam-rpc-core-trace" version = "0.6.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "ethereum-types 0.14.1", "futures 0.3.28", @@ -6473,7 +6477,7 @@ dependencies = [ [[package]] name = "moonbeam-rpc-core-types" version = "0.1.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "ethereum-types 0.14.1", "serde", @@ -6483,7 +6487,7 @@ dependencies = [ [[package]] name = "moonbeam-rpc-debug" version = "0.1.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "ethereum", "ethereum-types 0.14.1", @@ -6513,7 +6517,7 @@ dependencies = [ [[package]] name = "moonbeam-rpc-primitives-debug" version = "0.1.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "environmental", "ethereum", @@ -6531,7 +6535,7 @@ dependencies = [ [[package]] name = "moonbeam-rpc-trace" version = "0.6.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "ethereum", "ethereum-types 0.14.1", @@ -7006,9 +7010,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -7024,9 +7028,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.52" +version = "0.10.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +checksum = "69b3f656a17a6cbc115b5c7a40c616947d213ba182135b014d6051b73ab6f019" dependencies = [ "bitflags", "cfg-if", @@ -7045,7 +7049,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -7056,9 +7060,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.87" +version = "0.9.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +checksum = "c2ce0f250f34a308dcfdbb351f511359857d4ed2134ba715a4eadd46e1ffd617" dependencies = [ "cc", "libc", @@ -7426,7 +7430,7 @@ dependencies = [ [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bp-message-dispatch", "bp-runtime", @@ -7442,7 +7446,7 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bp-header-chain", "bp-runtime", @@ -7464,7 +7468,7 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bitvec", "bp-message-dispatch", @@ -7485,7 +7489,7 @@ dependencies = [ [[package]] name = "pallet-bridge-parachains" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bp-parachains", "bp-polkadot-core", @@ -7654,7 +7658,7 @@ dependencies = [ [[package]] name = "pallet-ethereum-xcm" version = "1.0.0-dev" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "ethereum", "ethereum-types 0.14.1", @@ -7662,6 +7666,7 @@ dependencies = [ "fp-evm", "fp-rpc", "fp-self-contained", + "frame-benchmarking", "frame-support", "frame-system", "pallet-evm", @@ -7768,7 +7773,7 @@ dependencies = [ [[package]] name = "pallet-fee-market" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#b332097ec8d704c569dc045746ef39134c08d3a7" +source = "git+https://github.com/darwinia-network/darwinia-messages-substrate?branch=polkadot-v0.9.40#17bf264f31f8b7744bf0ccb8f8f65fa642607e79" dependencies = [ "bp-messages", "bp-runtime", @@ -8859,7 +8864,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -8900,7 +8905,7 @@ checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -10150,18 +10155,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e30165d31df606f5726b090ec7592c308a0eaf61721ff64c9a3018e344a8753e" -dependencies = [ - "portable-atomic 1.3.2", -] - -[[package]] -name = "portable-atomic" -version = "1.3.2" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc59d1bcc64fc5d021d67521f818db868368028108d37f0e98d74e33f68297b5" +checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794" [[package]] name = "ppv-lite86" @@ -10172,7 +10168,7 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "precompile-utils" version = "0.1.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "affix", "derive_more", @@ -10197,13 +10193,12 @@ dependencies = [ "sp-core", "sp-io", "sp-std", - "xcm", ] [[package]] name = "precompile-utils-macro" version = "0.1.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "case", "num_enum", @@ -10342,9 +10337,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" dependencies = [ "unicode-ident", ] @@ -10508,9 +10503,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ "proc-macro2", ] @@ -10713,7 +10708,7 @@ checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -10730,11 +10725,11 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.2" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1a59b5d8e97dee33696bf13c5ba8ab85341c002922fba050069326b9c498974" +checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390" dependencies = [ - "aho-corasick 1.0.1", + "aho-corasick 1.0.2", "memchr", "regex-syntax 0.7.2", ] @@ -10778,7 +10773,7 @@ version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ - "base64 0.21.1", + "base64 0.21.2", "bytes", "encoding_rs", "futures-core", @@ -11225,7 +11220,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64 0.21.1", + "base64 0.21.2", ] [[package]] @@ -12623,7 +12618,7 @@ checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -13906,9 +13901,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" dependencies = [ "proc-macro2", "quote", @@ -14014,7 +14009,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -14169,9 +14164,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.1" +version = "1.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" +checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" dependencies = [ "autocfg", "bytes", @@ -14194,7 +14189,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -14274,9 +14269,9 @@ checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" [[package]] name = "toml_edit" -version = "0.19.9" +version = "0.19.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d964908cec0d030b812013af25a0e57fddfadb1e066ecc6681d86253129d4f" +checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" dependencies = [ "indexmap", "toml_datetime", @@ -14345,7 +14340,7 @@ checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] @@ -14706,9 +14701,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] name = "unicode-normalization" @@ -14899,7 +14894,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", "wasm-bindgen-shared", ] @@ -14933,7 +14928,7 @@ checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -16002,11 +15997,12 @@ dependencies = [ [[package]] name = "xcm-primitives" version = "0.1.0" -source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40#51d02a6f53ddf6319d29194f4b2d3ef179e90195" +source = "git+https://github.com/darwinia-network/moonbeam?branch=polkadot-v0.9.40-1#8a49604e60078a64aac6005a79a0045cbc1792b6" dependencies = [ "cumulus-primitives-core", "ethereum", "ethereum-types 0.14.1", + "frame-benchmarking", "frame-support", "frame-system", "hex", @@ -16076,7 +16072,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.18", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 13359d0db..1e2bff913 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -104,14 +104,14 @@ pallet-evm-precompile-modexp = { git = "https://github.com/darwinia-network/fr pallet-evm-precompile-simple = { git = "https://github.com/darwinia-network/frontier", branch = "polkadot-v0.9.40", default-features = false } # moonbeam -pallet-ethereum-xcm = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40", default-features = false } -moonbeam-evm-tracer = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40", default-features = false } -moonbeam-primitives-ext = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40", default-features = false } -moonbeam-rpc-debug = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40" } -moonbeam-rpc-primitives-debug = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40", default-features = false } -moonbeam-rpc-trace = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40" } -precompile-utils = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40", default-features = false } -xcm-primitives = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40", default-features = false } +pallet-ethereum-xcm = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40-1", default-features = false } +moonbeam-evm-tracer = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40-1", default-features = false } +moonbeam-primitives-ext = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40-1", default-features = false } +moonbeam-rpc-debug = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40-1" } +moonbeam-rpc-primitives-debug = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40-1", default-features = false } +moonbeam-rpc-trace = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40-1" } +precompile-utils = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40-1", default-features = false } +xcm-primitives = { git = "https://github.com/darwinia-network/moonbeam", branch = "polkadot-v0.9.40-1", default-features = false } # polkadot pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.40", default-features = false } diff --git a/precompile/assets/src/lib.rs b/precompile/assets/src/lib.rs index 295d87d11..62c7aeab6 100644 --- a/precompile/assets/src/lib.rs +++ b/precompile/assets/src/lib.rs @@ -78,7 +78,7 @@ where AccountIdOf: From, <::RuntimeCall as Dispatchable>::RuntimeOrigin: OriginTrait, ::RuntimeOrigin: From>, - BalanceOf: TryFrom + Into + EvmData, + BalanceOf: TryFrom + Into + solidity::Codec, { #[precompile::public("totalSupply()")] #[precompile::view] @@ -171,7 +171,7 @@ where SELECTOR_LOG_APPROVAL, handle.context().caller, spender, - EvmDataWriter::new().write(value).build(), + solidity::encode_event_data(value), ) .record(handle)?; @@ -205,7 +205,7 @@ where SELECTOR_LOG_TRANSFER, handle.context().caller, to, - EvmDataWriter::new().write(value).build(), + solidity::encode_event_data(value), ) .record(handle)?; @@ -260,7 +260,7 @@ where SELECTOR_LOG_TRANSFER, from, to, - EvmDataWriter::new().write(value).build(), + solidity::encode_event_data(value), ) .record(handle)?; @@ -321,7 +321,7 @@ where SELECTOR_LOG_TRANSFER, H160::default(), to, - EvmDataWriter::new().write(value).build(), + solidity::encode_event_data(value), ) .record(handle)?; @@ -355,7 +355,7 @@ where SELECTOR_LOG_TRANSFER, from, H160::default(), - EvmDataWriter::new().write(value).build(), + solidity::encode_event_data(value), ) .record(handle)?; diff --git a/precompile/assets/src/tests.rs b/precompile/assets/src/tests.rs index 0df9d642e..83525343e 100644 --- a/precompile/assets/src/tests.rs +++ b/precompile/assets/src/tests.rs @@ -27,7 +27,6 @@ use crate::{ use precompile_utils::{ prelude::{Address, UnboundedBytes}, testing::{PrecompileTesterExt, PrecompilesModifierTester}, - EvmDataWriter, }; // substrate use frame_support::assert_ok; @@ -154,7 +153,7 @@ fn get_total_supply() { precompiles() .prepare_test(Alice, Precompile, InternalCall::total_supply {}) .expect_no_logs() - .execute_returns_encoded(U256::from(1000u64)); + .execute_returns(U256::from(1000u64)); }); } @@ -182,7 +181,7 @@ fn get_balances_known_user() { InternalCall::balance_of { who: Address(Alice.into()) }, ) .expect_no_logs() - .execute_returns_encoded(U256::from(1000u64)); + .execute_returns(U256::from(1000u64)); }); } @@ -206,7 +205,7 @@ fn get_balances_unknown_user() { precompiles() .prepare_test(Alice, Precompile, InternalCall::balance_of { who: Address(Bob.into()) }) .expect_no_logs() - .execute_returns_encoded(U256::from(0u64)); + .execute_returns(U256::from(0u64)); }); } @@ -238,9 +237,9 @@ fn approve() { SELECTOR_LOG_APPROVAL, H256::from(Alice), H256::from(Bob), - EvmDataWriter::new().write(U256::from(500)).build(), + solidity::encode_event_data(U256::from(500)), )) - .execute_returns_encoded(true); + .execute_returns(true); }); } @@ -267,7 +266,7 @@ fn approve_saturating() { Precompile, InternalCall::approve { spender: Address(Bob.into()), value: U256::MAX }, ) - .execute_returns_encoded(true); + .execute_returns(true); precompiles() .prepare_test( Alice, @@ -277,7 +276,7 @@ fn approve_saturating() { spender: Address(Bob.into()), }, ) - .execute_returns_encoded(U256::from(u128::MAX)); + .execute_returns(U256::from(u128::MAX)); }); } @@ -317,7 +316,7 @@ fn check_allowance_existing() { ) .expect_cost(0) .expect_no_logs() - .execute_returns_encoded(U256::from(500u64)); + .execute_returns(U256::from(500u64)); }); } @@ -343,7 +342,7 @@ fn check_allowance_not_existing() { ) .expect_cost(0) .expect_no_logs() - .execute_returns_encoded(U256::from(0u64)); + .execute_returns(U256::from(0u64)); }); } @@ -375,14 +374,14 @@ fn transfer() { SELECTOR_LOG_TRANSFER, H256::from(Alice), H256::from(Bob), - EvmDataWriter::new().write(U256::from(400)).build(), + solidity::encode_event_data(U256::from(400)), )) - .execute_returns_encoded(true); + .execute_returns(true); precompiles() .prepare_test(Bob, Precompile, InternalCall::balance_of { who: Address(Bob.into()) }) .expect_no_logs() - .execute_returns_encoded(U256::from(400)); + .execute_returns(U256::from(400)); precompiles() .prepare_test( @@ -392,7 +391,7 @@ fn transfer() { ) .expect_cost(0) .expect_no_logs() - .execute_returns_encoded(U256::from(600)); + .execute_returns(U256::from(600)); }); } @@ -466,9 +465,9 @@ fn transfer_from() { SELECTOR_LOG_TRANSFER, H256::from(Alice), H256::from(Charlie), - EvmDataWriter::new().write(U256::from(400)).build(), + solidity::encode_event_data(U256::from(400)), )) - .execute_returns_encoded(true); + .execute_returns(true); precompiles() .prepare_test( @@ -478,12 +477,12 @@ fn transfer_from() { ) .expect_cost(0) // TODO: Test db read/write costs .expect_no_logs() - .execute_returns_encoded(U256::from(600)); + .execute_returns(U256::from(600)); precompiles() .prepare_test(Bob, Precompile, InternalCall::balance_of { who: Address(Bob.into()) }) .expect_no_logs() - .execute_returns_encoded(U256::from(0)); + .execute_returns(U256::from(0)); precompiles() .prepare_test( @@ -492,7 +491,7 @@ fn transfer_from() { InternalCall::balance_of { who: Address(Charlie.into()) }, ) .expect_no_logs() - .execute_returns_encoded(U256::from(400)); + .execute_returns(U256::from(400)); precompiles() .prepare_test( @@ -505,7 +504,7 @@ fn transfer_from() { ) .expect_cost(0) .expect_no_logs() - .execute_returns_encoded(U256::from(100u64)); + .execute_returns(U256::from(100u64)); }); } @@ -527,9 +526,9 @@ fn transfer_from_non_incremental_approval() { SELECTOR_LOG_APPROVAL, H256::from(Alice), H256::from(Bob), - EvmDataWriter::new().write(U256::from(500)).build(), + solidity::encode_event_data(U256::from(500)), )) - .execute_returns_encoded(true); + .execute_returns(true); // We then approve 300. Non-incremental, so this is // the approved new value @@ -546,9 +545,9 @@ fn transfer_from_non_incremental_approval() { SELECTOR_LOG_APPROVAL, H256::from(Alice), H256::from(Bob), - EvmDataWriter::new().write(U256::from(300)).build(), + solidity::encode_event_data(U256::from(300)), )) - .execute_returns_encoded(true); + .execute_returns(true); // This should fail, as now the new approved quantity is 300 precompiles() @@ -643,9 +642,9 @@ fn transfer_from_self() { SELECTOR_LOG_TRANSFER, H256::from(Alice), H256::from(Bob), - EvmDataWriter::new().write(U256::from(400)).build(), + solidity::encode_event_data(U256::from(400)), )) - .execute_returns_encoded(true); + .execute_returns(true); precompiles() .prepare_test( @@ -655,13 +654,13 @@ fn transfer_from_self() { ) .expect_cost(0) .expect_no_logs() - .execute_returns_encoded(U256::from(600)); + .execute_returns(U256::from(600)); precompiles() .prepare_test(Alice, Precompile, InternalCall::balance_of { who: Address(Bob.into()) }) .expect_cost(0) // TODO: Test db read/write costs .expect_no_logs() - .execute_returns_encoded(U256::from(400)); + .execute_returns(U256::from(400)); }); } @@ -691,23 +690,19 @@ fn get_metadata() { .prepare_test(Alice, Precompile, InternalCall::name {}) .expect_cost(0) .expect_no_logs() - .execute_returns( - EvmDataWriter::new().write::("TestToken".into()).build(), - ); + .execute_returns(UnboundedBytes::from("TestToken")); precompiles() .prepare_test(Alice, Precompile, InternalCall::symbol {}) .expect_cost(0) .expect_no_logs() - .execute_returns( - EvmDataWriter::new().write::("Test".into()).build(), - ); + .execute_returns(UnboundedBytes::from("Test")); precompiles() .prepare_test(Alice, Precompile, InternalCall::decimals {}) .expect_cost(0) .expect_no_logs() - .execute_returns_encoded(12u8); + .execute_returns(12u8); }); } @@ -736,9 +731,9 @@ fn mint() { SELECTOR_LOG_TRANSFER, H256::default(), H256::from(Bob), - EvmDataWriter::new().write(U256::from(400)).build(), + solidity::encode_event_data(U256::from(400)), )) - .execute_returns_encoded(true); + .execute_returns(true); precompiles() .prepare_test( @@ -748,7 +743,7 @@ fn mint() { ) .expect_cost(0) // TODO: Test db read/write costs .expect_no_logs() - .execute_returns_encoded(U256::from(400)); + .execute_returns(U256::from(400)); }); } @@ -783,9 +778,9 @@ fn burn() { SELECTOR_LOG_TRANSFER, H256::from(Alice), H256::default(), - EvmDataWriter::new().write(U256::from(400)).build(), + solidity::encode_event_data(U256::from(400)), )) - .execute_returns_encoded(true); + .execute_returns(true); precompiles() .prepare_test( @@ -794,7 +789,7 @@ fn burn() { InternalCall::balance_of { who: Address(Alice.into()) }, ) .expect_no_logs() - .execute_returns_encoded(U256::from(600)); + .execute_returns(U256::from(600)); }); } @@ -825,7 +820,7 @@ fn freeze() { InternalCall::freeze { account: Address(Bob.into()) }, ) .expect_no_logs() - .execute_returns_encoded(true); + .execute_returns(true); precompiles() .prepare_test( @@ -867,7 +862,7 @@ fn thaw() { InternalCall::freeze { account: Address(Bob.into()) }, ) .expect_no_logs() - .execute_returns_encoded(true); + .execute_returns(true); precompiles() .prepare_test( @@ -876,7 +871,7 @@ fn thaw() { InternalCall::thaw { account: Address(Bob.into()) }, ) .expect_no_logs() - .execute_returns_encoded(true); + .execute_returns(true); precompiles() .prepare_test( @@ -889,9 +884,9 @@ fn thaw() { SELECTOR_LOG_TRANSFER, H256::from(Bob), H256::from(Alice), - EvmDataWriter::new().write(U256::from(400)).build(), + solidity::encode_event_data(U256::from(400)), )) - .execute_returns_encoded(true); + .execute_returns(true); }); } @@ -924,7 +919,7 @@ fn transfer_ownership() { InternalCall::transfer_ownership { owner: Address(Bob.into()) }, ) .expect_no_logs() - .execute_returns_encoded(true); + .execute_returns(true); // Now Bob should be able to change ownership, and not Alice precompiles() @@ -945,7 +940,7 @@ fn transfer_ownership() { InternalCall::transfer_ownership { owner: Address(Alice.into()) }, ) .expect_no_logs() - .execute_returns_encoded(true); + .execute_returns(true); }); } @@ -982,7 +977,7 @@ fn transfer_amount_overflow() { .prepare_test(Bob, Precompile, InternalCall::balance_of { who: Address(Bob.into()) }) .expect_cost(0) .expect_no_logs() - .execute_returns_encoded(U256::from(0)); + .execute_returns(U256::from(0)); precompiles() .prepare_test( @@ -992,7 +987,7 @@ fn transfer_amount_overflow() { ) .expect_cost(0) .expect_no_logs() - .execute_returns_encoded(U256::from(1000)); + .execute_returns(U256::from(1000)); }); } diff --git a/precompile/deposit/src/tests.rs b/precompile/deposit/src/tests.rs index 2a2d3f36f..31639b6ee 100644 --- a/precompile/deposit/src/tests.rs +++ b/precompile/deposit/src/tests.rs @@ -24,7 +24,7 @@ use crate::mock::{ }; use darwinia_deposit::MILLISECS_PER_MONTH; // moonbeam -use precompile_utils::{testing::PrecompileTesterExt, EvmDataWriter}; +use precompile_utils::testing::PrecompileTesterExt; // substrate use sp_core::H160; @@ -46,14 +46,12 @@ fn lock_and_claim() { // lock precompiles() .prepare_test(alice, Precompile, PCall::lock { amount: 200.into(), months: 1 }) - .execute_returns(EvmDataWriter::new().write(true).build()); + .execute_returns(true); assert!(Deposit::deposit_of(&alice).is_some()); // claim efflux(MILLISECS_PER_MONTH); - precompiles() - .prepare_test(alice, Precompile, PCall::claim {}) - .execute_returns(EvmDataWriter::new().write(true).build()); + precompiles().prepare_test(alice, Precompile, PCall::claim {}).execute_returns(true); assert!(Deposit::deposit_of(&alice).is_none()); }); } @@ -65,13 +63,13 @@ fn claim_with_penalty() { // lock precompiles() .prepare_test(alice, Precompile, PCall::lock { amount: 200.into(), months: 1 }) - .execute_returns(EvmDataWriter::new().write(true).build()); + .execute_returns(true); assert!(Deposit::deposit_of(&alice).is_some()); // claim with penalty precompiles() .prepare_test(alice, Precompile, PCall::claim_with_penalty { id: 0 }) - .execute_returns(EvmDataWriter::new().write(true).build()); + .execute_returns(true); assert!(Deposit::deposit_of(&alice).is_none()); }); } diff --git a/precompile/staking/src/tests.rs b/precompile/staking/src/tests.rs index 1de3f9f8a..0296f7706 100644 --- a/precompile/staking/src/tests.rs +++ b/precompile/staking/src/tests.rs @@ -23,7 +23,7 @@ use crate::mock::{ }; use sp_runtime::Perbill; // moonbeam -use precompile_utils::{testing::PrecompileTesterExt, EvmDataWriter}; +use precompile_utils::testing::PrecompileTesterExt; // substrate use sp_core::{H160, U256}; @@ -57,7 +57,7 @@ fn stake_unstake_restake() { deposits: vec![], }, ) - .execute_returns(EvmDataWriter::new().write(true).build()); + .execute_returns(true); assert_eq!(Staking::ledger_of(alice).unwrap().staked_ring, 200); // unstake @@ -71,7 +71,7 @@ fn stake_unstake_restake() { deposits: vec![], }, ) - .execute_returns(EvmDataWriter::new().write(true).build()); + .execute_returns(true); assert_eq!(Staking::ledger_of(alice).unwrap().staked_ring, 0); assert_eq!(Staking::ledger_of(alice).unwrap().unstaking_ring.len(), 1); @@ -86,7 +86,7 @@ fn stake_unstake_restake() { deposits: vec![], }, ) - .execute_returns(EvmDataWriter::new().write(true).build()); + .execute_returns(true); assert_eq!(Staking::ledger_of(alice).unwrap().staked_ring, 200); assert_eq!(Staking::ledger_of(alice).unwrap().unstaking_ring.len(), 0); }); @@ -107,7 +107,7 @@ fn claim() { deposits: vec![], }, ) - .execute_returns(EvmDataWriter::new().write(true).build()); + .execute_returns(true); // unstake precompiles() @@ -120,13 +120,11 @@ fn claim() { deposits: vec![], }, ) - .execute_returns(EvmDataWriter::new().write(true).build()); + .execute_returns(true); // You have to wait for MinStakingDuration to claim System::set_block_number(5); - precompiles() - .prepare_test(alice, Precompile, PCall::claim {}) - .execute_returns(EvmDataWriter::new().write(true).build()); + precompiles().prepare_test(alice, Precompile, PCall::claim {}).execute_returns(true); assert!(Staking::ledger_of(alice).is_none()); }); } @@ -148,12 +146,12 @@ fn nominate() { deposits: vec![], }, ) - .execute_returns(EvmDataWriter::new().write(true).build()); + .execute_returns(true); // check the collator commission precompiles() .prepare_test(alice, Precompile, PCall::collect { commission: 30 }) - .execute_returns(EvmDataWriter::new().write(true).build()); + .execute_returns(true); assert_eq!(Staking::collator_of(alice).unwrap(), Perbill::from_percent(30)); // bob stake as nominator @@ -167,24 +165,20 @@ fn nominate() { deposits: vec![], }, ) - .execute_returns(EvmDataWriter::new().write(true).build()); + .execute_returns(true); // check nominate result precompiles() .prepare_test(bob, Precompile, PCall::nominate { target: alice.into() }) - .execute_returns(EvmDataWriter::new().write(true).build()); + .execute_returns(true); assert_eq!(Staking::nominator_of(bob).unwrap(), alice); // check alice(collator) chill - precompiles() - .prepare_test(alice, Precompile, PCall::chill {}) - .execute_returns(EvmDataWriter::new().write(true).build()); + precompiles().prepare_test(alice, Precompile, PCall::chill {}).execute_returns(true); assert!(Staking::collator_of(alice).is_none()); // check bob(nominator) chill - precompiles() - .prepare_test(bob, Precompile, PCall::chill {}) - .execute_returns(EvmDataWriter::new().write(true).build()); + precompiles().prepare_test(bob, Precompile, PCall::chill {}).execute_returns(true); assert!(Staking::nominator_of(bob).is_none()); }, ); diff --git a/precompile/state-storage/src/tests.rs b/precompile/state-storage/src/tests.rs index 52241bad2..b32a93b0a 100644 --- a/precompile/state-storage/src/tests.rs +++ b/precompile/state-storage/src/tests.rs @@ -25,7 +25,6 @@ use crate::mock::{ use precompile_utils::{ prelude::{RuntimeHelper, UnboundedBytes}, testing::{PrecompileTesterExt, PrecompilesModifierTester}, - EvmDataWriter, }; // substrate use frame_support::{StorageHasher, Twox128}; @@ -69,9 +68,7 @@ fn test_state_storage() { .prepare_test(Alice, Precompile, PCall::state_storage_at { key: key.into() }) .expect_cost(RuntimeHelper::::db_read_gas_cost()) .expect_no_logs() - .execute_returns( - EvmDataWriter::new().write(UnboundedBytes::from(&5u64.to_le_bytes())).build(), - ); + .execute_returns(UnboundedBytes::from(&5u64.to_le_bytes())); }); } diff --git a/runtime/crab/src/pallets/evm.rs b/runtime/crab/src/pallets/evm.rs index e466b3b60..a11a3126b 100644 --- a/runtime/crab/src/pallets/evm.rs +++ b/runtime/crab/src/pallets/evm.rs @@ -77,7 +77,7 @@ where let (code_addr, context_addr) = (handle.code_address(), handle.context().address); // Filter known precompile addresses except Ethereum officials if self.is_precompile(code_addr) && code_addr > addr(9) && code_addr != context_addr { - return Some(Err(precompile_utils::revert( + return Some(Err(precompile_utils::prelude::revert( "cannot be called with DELEGATECALL or CALLCODE", ))); }; diff --git a/runtime/darwinia/src/pallets/evm.rs b/runtime/darwinia/src/pallets/evm.rs index 3686fb546..483ec97a2 100644 --- a/runtime/darwinia/src/pallets/evm.rs +++ b/runtime/darwinia/src/pallets/evm.rs @@ -76,7 +76,7 @@ where let (code_addr, context_addr) = (handle.code_address(), handle.context().address); // Filter known precompile addresses except Ethereum officials if self.is_precompile(code_addr) && code_addr > addr(9) && code_addr != context_addr { - return Some(Err(precompile_utils::revert( + return Some(Err(precompile_utils::prelude::revert( "cannot be called with DELEGATECALL or CALLCODE", ))); }; diff --git a/runtime/pangolin/src/pallets/evm.rs b/runtime/pangolin/src/pallets/evm.rs index 2b774d843..51bce419c 100644 --- a/runtime/pangolin/src/pallets/evm.rs +++ b/runtime/pangolin/src/pallets/evm.rs @@ -77,7 +77,7 @@ where let (code_addr, context_addr) = (handle.code_address(), handle.context().address); // Filter known precompile addresses except Ethereum officials if self.is_precompile(code_addr) && code_addr > addr(9) && code_addr != context_addr { - return Some(Err(precompile_utils::revert( + return Some(Err(precompile_utils::prelude::revert( "cannot be called with DELEGATECALL or CALLCODE", ))); }; diff --git a/runtime/pangoro/src/pallets/evm.rs b/runtime/pangoro/src/pallets/evm.rs index 02254f02f..1b963224f 100644 --- a/runtime/pangoro/src/pallets/evm.rs +++ b/runtime/pangoro/src/pallets/evm.rs @@ -77,7 +77,7 @@ where let (code_addr, context_addr) = (handle.code_address(), handle.context().address); // Filter known precompile addresses except Ethereum officials if self.is_precompile(code_addr) && code_addr > addr(9) && code_addr != context_addr { - return Some(Err(precompile_utils::revert( + return Some(Err(precompile_utils::prelude::revert( "cannot be called with DELEGATECALL or CALLCODE", ))); };