From 27a7ba44701acd51d02970c8de4d2f54383f4022 Mon Sep 17 00:00:00 2001 From: dmoka Date: Fri, 10 Nov 2023 14:28:05 +0100 Subject: [PATCH] Remove utility macro module as we can just use it from acala --- Cargo.lock | 341 +++++++++--------- Cargo.toml | 3 +- .../src/evm/modules/evm-utility/Cargo.toml | 32 -- .../evm/modules/evm-utility/macro/Cargo.toml | 14 - .../evm/modules/evm-utility/macro/src/lib.rs | 80 ---- .../modules/evm-utility/macro/tests/test.rs | 57 --- .../src/evm/modules/evm-utility/src/lib.rs | 47 --- 7 files changed, 175 insertions(+), 399 deletions(-) delete mode 100644 runtime/hydradx/src/evm/modules/evm-utility/Cargo.toml delete mode 100644 runtime/hydradx/src/evm/modules/evm-utility/macro/Cargo.toml delete mode 100644 runtime/hydradx/src/evm/modules/evm-utility/macro/src/lib.rs delete mode 100644 runtime/hydradx/src/evm/modules/evm-utility/macro/tests/test.rs delete mode 100644 runtime/hydradx/src/evm/modules/evm-utility/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 33aed16dd..c2dbb1ed1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1770,7 +1770,7 @@ dependencies = [ "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -1786,7 +1786,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "xcm", ] @@ -1813,7 +1813,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 5.0.0", "sp-trie", "sp-version", "xcm", @@ -1842,7 +1842,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "xcm", ] @@ -1863,7 +1863,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "xcm", "xcm-executor", ] @@ -1879,7 +1879,7 @@ dependencies = [ "polkadot-primitives", "sp-api", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-trie", "xcm", ] @@ -1901,7 +1901,7 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 5.0.0", "sp-storage", "sp-trie", "tracing", @@ -1916,7 +1916,7 @@ dependencies = [ "futures", "parity-scale-codec", "sp-inherents", - "sp-std", + "sp-std 5.0.0", "sp-timestamp", ] @@ -1932,7 +1932,7 @@ dependencies = [ "polkadot-runtime-common", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "xcm", "xcm-builder", "xcm-executor", @@ -2061,7 +2061,7 @@ dependencies = [ "polkadot-primitives", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -3183,7 +3183,7 @@ dependencies = [ "parity-scale-codec", "sp-core", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -3197,7 +3197,7 @@ dependencies = [ "frame-support", "num_enum", "parity-scale-codec", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -3211,7 +3211,7 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -3228,7 +3228,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -3278,7 +3278,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-runtime-interface", - "sp-std", + "sp-std 5.0.0", "sp-storage", "static_assertions", ] @@ -3323,7 +3323,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 5.0.0", "sp-storage", "sp-trie", "thiserror", @@ -3355,7 +3355,7 @@ dependencies = [ "sp-core", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -3371,7 +3371,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-tracing", ] @@ -3429,7 +3429,7 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std", + "sp-std 5.0.0", "sp-tracing", "sp-weights", "tt-call", @@ -3485,7 +3485,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-version", "sp-weights", ] @@ -3502,7 +3502,7 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -3523,7 +3523,7 @@ dependencies = [ "parity-scale-codec", "sp-api", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -4084,7 +4084,7 @@ dependencies = [ "scale-info", "serde", "sp-arithmetic", - "sp-std", + "sp-std 5.0.0", "test-case 2.2.2", ] @@ -4212,7 +4212,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "xcm", "xcm-builder", "xcm-executor", @@ -4322,7 +4322,7 @@ dependencies = [ "sp-offchain", "sp-runtime", "sp-session", - "sp-std", + "sp-std 5.0.0", "sp-transaction-pool", "sp-trie", "sp-version", @@ -4343,7 +4343,7 @@ dependencies = [ "scale-info", "serde", "sp-arithmetic", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -5000,7 +5000,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 5.0.0", "sp-transaction-pool", "sp-version", "static_assertions", @@ -5974,19 +5974,21 @@ dependencies = [ [[package]] name = "module-evm-utility" -version = "2.20.0" +version = "2.22.0" +source = "git+https://github.com/AcalaNetwork/Acala?branch=release-acala-2.22.0#37d9e3604fb3f217869ccc49dcce8a7b632fb73a" dependencies = [ "ethereum", "evm 0.36.0", "evm-gasometer 0.36.0", "evm-runtime 0.36.0", "sha3", - "sp-std", + "sp-std 8.0.0", ] [[package]] name = "module-evm-utility-macro" -version = "2.20.0" +version = "2.22.0" +source = "git+https://github.com/AcalaNetwork/Acala?branch=release-acala-2.22.0#37d9e3604fb3f217869ccc49dcce8a7b632fb73a" dependencies = [ "module-evm-utility", "proc-macro2", @@ -6481,7 +6483,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-runtime-interface", - "sp-std", + "sp-std 5.0.0", "sp-storage", ] @@ -6498,7 +6500,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6513,7 +6515,7 @@ dependencies = [ "scale-info", "serde", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6531,7 +6533,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "xcm", ] @@ -6546,7 +6548,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 5.0.0", "xcm", ] @@ -6561,7 +6563,7 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6576,7 +6578,7 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6589,7 +6591,7 @@ dependencies = [ "pallet-xcm", "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 5.0.0", "xcm", ] @@ -6602,7 +6604,7 @@ dependencies = [ "orml-traits", "parity-scale-codec", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "xcm", "xcm-executor", ] @@ -6623,7 +6625,7 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "xcm", "xcm-executor", ] @@ -6685,7 +6687,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "substrate-wasm-builder", "test-utils", "xcm", @@ -6704,7 +6706,7 @@ dependencies = [ "sp-application-crypto", "sp-consensus-aura", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6720,7 +6722,7 @@ dependencies = [ "sp-application-crypto", "sp-authority-discovery", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6734,7 +6736,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6758,7 +6760,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6777,7 +6779,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-tracing", ] @@ -6793,7 +6795,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6809,7 +6811,7 @@ dependencies = [ "serde", "sp-beefy", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6832,7 +6834,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6856,7 +6858,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-tracing", ] @@ -6875,7 +6877,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6894,7 +6896,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6917,7 +6919,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "test-case 3.1.0", "test-utils", ] @@ -6944,7 +6946,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -6970,7 +6972,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 5.0.0", "substrate-wasm-builder", ] @@ -6990,7 +6992,7 @@ dependencies = [ "scale-info", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7007,7 +7009,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7024,7 +7026,7 @@ dependencies = [ "serde", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7043,7 +7045,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7081,7 +7083,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-tracing", "test-case 2.2.2", "test-utils", @@ -7102,7 +7104,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7122,7 +7124,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7145,7 +7147,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "substrate-wasm-builder", ] @@ -7168,7 +7170,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7190,7 +7192,7 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "strum", ] @@ -7222,7 +7224,7 @@ dependencies = [ "sp-io", "sp-npos-elections", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7245,7 +7247,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-io", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7272,7 +7274,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7296,7 +7298,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7335,7 +7337,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7352,7 +7354,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7375,7 +7377,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7391,7 +7393,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7411,7 +7413,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7428,7 +7430,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7452,7 +7454,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "substrate-wasm-builder", "test-utils", ] @@ -7479,7 +7481,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "test-utils", ] @@ -7497,7 +7499,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7514,7 +7516,7 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7530,7 +7532,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7546,7 +7548,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7563,7 +7565,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7583,7 +7585,7 @@ dependencies = [ "sp-runtime", "sp-runtime-interface", "sp-staking", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7593,7 +7595,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bc dependencies = [ "parity-scale-codec", "sp-api", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7610,7 +7612,7 @@ dependencies = [ "serde", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7634,7 +7636,7 @@ dependencies = [ "scale-info", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7660,7 +7662,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-tracing", ] @@ -7689,7 +7691,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "test-utils", ] @@ -7711,7 +7713,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "test-utils", ] @@ -7729,7 +7731,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7744,7 +7746,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7762,7 +7764,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7777,7 +7779,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7796,7 +7798,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7810,7 +7812,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-api", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7834,7 +7836,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "test-utils", ] @@ -7851,7 +7853,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-weights", ] @@ -7872,7 +7874,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 5.0.0", "sp-trie", ] @@ -7889,7 +7891,7 @@ dependencies = [ "rand 0.8.5", "sp-runtime", "sp-session", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7903,7 +7905,7 @@ dependencies = [ "rand_chacha 0.2.2", "scale-info", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7926,7 +7928,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-tracing", ] @@ -7951,7 +7953,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -7974,7 +7976,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -8011,7 +8013,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -8025,7 +8027,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -8042,7 +8044,7 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-timestamp", ] @@ -8062,7 +8064,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -8085,7 +8087,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "test-utils", ] @@ -8107,7 +8109,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -8123,7 +8125,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -8168,7 +8170,7 @@ dependencies = [ "scale-info", "serde", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -8183,7 +8185,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -8199,7 +8201,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -8214,7 +8216,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -8229,7 +8231,7 @@ dependencies = [ "scale-info", "sp-api", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -8247,7 +8249,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "xcm", "xcm-executor", ] @@ -8265,7 +8267,7 @@ dependencies = [ "scale-info", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "xcm", "xcm-builder", "xcm-executor", @@ -8294,7 +8296,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "test-case 3.1.0", "test-utils", "xcm", @@ -8324,7 +8326,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "substrate-wasm-builder", ] @@ -8845,7 +8847,7 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -9445,7 +9447,7 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -9486,7 +9488,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -9600,7 +9602,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 5.0.0", "sp-transaction-pool", "sp-version", "static_assertions", @@ -9654,7 +9656,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 5.0.0", "static_assertions", "xcm", ] @@ -9681,7 +9683,7 @@ dependencies = [ "bs58", "parity-scale-codec", "polkadot-primitives", - "sp-std", + "sp-std 5.0.0", "sp-tracing", ] @@ -9722,7 +9724,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 5.0.0", "static_assertions", "xcm", "xcm-executor", @@ -9999,7 +10001,7 @@ dependencies = [ "scale-info", "serde", "sp-core", - "sp-std", + "sp-std 5.0.0", "static_assertions", ] @@ -10665,7 +10667,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 5.0.0", "sp-transaction-pool", "sp-version", "static_assertions", @@ -10853,7 +10855,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 5.0.0", "sp-transaction-pool", "sp-trie", "sp-version", @@ -11967,7 +11969,7 @@ dependencies = [ "serde_json", "sp-core", "sp-io", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -12485,7 +12487,7 @@ dependencies = [ "parity-scale-codec", "paste", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -12575,7 +12577,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 5.0.0", "sp-trie", "sp-version", "thiserror", @@ -12603,7 +12605,7 @@ dependencies = [ "serde", "sp-core", "sp-io", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -12616,7 +12618,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 5.0.0", "static_assertions", ] @@ -12630,7 +12632,7 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -12647,7 +12649,7 @@ dependencies = [ "sp-io", "sp-mmr-primitives", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -12659,7 +12661,7 @@ dependencies = [ "sp-api", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -12693,7 +12695,7 @@ dependencies = [ "sp-inherents", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 5.0.0", "sp-version", "thiserror", ] @@ -12712,7 +12714,7 @@ dependencies = [ "sp-consensus-slots", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-timestamp", ] @@ -12735,7 +12737,7 @@ dependencies = [ "sp-inherents", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-timestamp", ] @@ -12747,7 +12749,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 5.0.0", "sp-timestamp", ] @@ -12761,7 +12763,7 @@ dependencies = [ "schnorrkel", "sp-core", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -12797,7 +12799,7 @@ dependencies = [ "sp-debug-derive", "sp-externalities", "sp-runtime-interface", - "sp-std", + "sp-std 5.0.0", "sp-storage", "ss58-registry", "substrate-bip39", @@ -12816,7 +12818,7 @@ dependencies = [ "digest 0.10.7", "sha2 0.10.7", "sha3", - "sp-std", + "sp-std 5.0.0", "twox-hash", ] @@ -12857,7 +12859,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bc dependencies = [ "environmental", "parity-scale-codec", - "sp-std", + "sp-std 5.0.0", "sp-storage", ] @@ -12876,7 +12878,7 @@ dependencies = [ "sp-core", "sp-keystore", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -12889,7 +12891,7 @@ dependencies = [ "parity-scale-codec", "sp-core", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "thiserror", ] @@ -12911,7 +12913,7 @@ dependencies = [ "sp-keystore", "sp-runtime-interface", "sp-state-machine", - "sp-std", + "sp-std 5.0.0", "sp-tracing", "sp-trie", "tracing", @@ -12969,7 +12971,7 @@ dependencies = [ "sp-core", "sp-debug-derive", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "thiserror", ] @@ -12984,7 +12986,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -13035,7 +13037,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-io", - "sp-std", + "sp-std 5.0.0", "sp-weights", ] @@ -13050,7 +13052,7 @@ dependencies = [ "primitive-types", "sp-externalities", "sp-runtime-interface-proc-macro", - "sp-std", + "sp-std 5.0.0", "sp-storage", "sp-tracing", "sp-wasm-interface", @@ -13080,7 +13082,7 @@ dependencies = [ "sp-core", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -13092,7 +13094,7 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -13109,7 +13111,7 @@ dependencies = [ "sp-core", "sp-externalities", "sp-panic-handler", - "sp-std", + "sp-std 5.0.0", "sp-trie", "thiserror", "tracing", @@ -13120,6 +13122,11 @@ name = "sp-std" version = "5.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +[[package]] +name = "sp-std" +version = "8.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v1.0.0#948fbd2fd1233dc26dbb9f9bbc1d2cca2c03945d" + [[package]] name = "sp-storage" version = "7.0.0" @@ -13130,7 +13137,7 @@ dependencies = [ "ref-cast", "serde", "sp-debug-derive", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -13144,7 +13151,7 @@ dependencies = [ "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "thiserror", ] @@ -13154,7 +13161,7 @@ version = "6.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 5.0.0", "tracing", "tracing-core", "tracing-subscriber", @@ -13181,7 +13188,7 @@ dependencies = [ "sp-core", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-trie", ] @@ -13201,7 +13208,7 @@ dependencies = [ "scale-info", "schnellru", "sp-core", - "sp-std", + "sp-std 5.0.0", "thiserror", "tracing", "trie-db", @@ -13220,7 +13227,7 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-version-proc-macro", "thiserror", ] @@ -13244,7 +13251,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", + "sp-std 5.0.0", "wasmi", "wasmtime", ] @@ -13261,7 +13268,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-debug-derive", - "sp-std", + "sp-std 5.0.0", ] [[package]] @@ -15188,7 +15195,7 @@ dependencies = [ "sp-runtime", "sp-session", "sp-staking", - "sp-std", + "sp-std 5.0.0", "sp-transaction-pool", "sp-version", "substrate-wasm-builder", @@ -15597,7 +15604,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "xcm", "xcm-executor", ] @@ -15623,7 +15630,7 @@ dependencies = [ "quote", "sp-arithmetic", "sp-io", - "sp-std", + "sp-std 5.0.0", "xcm", "xcm-executor", ] @@ -15643,7 +15650,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 5.0.0", "sp-weights", "xcm", ] diff --git a/Cargo.toml b/Cargo.toml index c566d2bdc..649a51331 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,6 @@ members = [ 'math', 'pallets/staking', 'pallets/democracy', - 'runtime/hydradx/src/evm/modules/evm-utility/macro', ] [workspace.dependencies] @@ -228,7 +227,7 @@ pallet-evm-chain-id = { git = "https://github.com/PureStake/frontier", branch = pallet-evm-precompile-dispatch = { git = "https://github.com/PureStake/frontier", branch = "moonbeam-polkadot-v0.9.38", default-features = false } # EVM from acala -module-evm-utility-macro = { path = "runtime/hydradx/src/evm/modules/evm-utility/macro", default-features = false} +module-evm-utility-macro = { git = "https://github.com/AcalaNetwork/Acala", branch = "release-acala-2.22.0", default-features = false } # Polkadot dependencies pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.38", default-features = false } diff --git a/runtime/hydradx/src/evm/modules/evm-utility/Cargo.toml b/runtime/hydradx/src/evm/modules/evm-utility/Cargo.toml deleted file mode 100644 index 228697adb..000000000 --- a/runtime/hydradx/src/evm/modules/evm-utility/Cargo.toml +++ /dev/null @@ -1,32 +0,0 @@ -[package] -name = "module-evm-utility" -version = "2.20.0" -authors = ["Acala Developers"] -edition = "2021" - -[dependencies] -sha3 = { version = "0.10.6", default-features = false } - -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } - -evm = { git = "https://github.com/rust-blockchain/evm", rev = "13240a8a551586fdef0b5028ed73af80b248092a", default-features = false, features = ["with-codec"] } -evm-gasometer = { git = "https://github.com/rust-blockchain/evm", rev = "13240a8a551586fdef0b5028ed73af80b248092a", default-features = false } -evm-runtime = { git = "https://github.com/rust-blockchain/evm", rev = "13240a8a551586fdef0b5028ed73af80b248092a", default-features = false } -ethereum = { version = "0.14.0", default-features = false, features = ["with-codec"] } - -[features] -default = ["std"] -std = [ - "sha3/std", - "sp-std/std", - "evm/std", - "evm/with-serde", - "evm-runtime/std", - "evm-gasometer/std", - "ethereum/with-serde", -] -tracing = [ - "evm/tracing", - "evm-gasometer/tracing", - "evm-runtime/tracing", -] diff --git a/runtime/hydradx/src/evm/modules/evm-utility/macro/Cargo.toml b/runtime/hydradx/src/evm/modules/evm-utility/macro/Cargo.toml deleted file mode 100644 index 73473f26f..000000000 --- a/runtime/hydradx/src/evm/modules/evm-utility/macro/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "module-evm-utility-macro" -version = "2.20.0" -authors = ["Acala Developers"] -edition = "2021" - -[lib] -proc-macro = true - -[dependencies] -quote = "1.0.20" -syn = { version = "1.0.98", features = ["full", "fold", "extra-traits", "visit"] } -proc-macro2 = "1.0.40" -module-evm-utility = { path = ".." } diff --git a/runtime/hydradx/src/evm/modules/evm-utility/macro/src/lib.rs b/runtime/hydradx/src/evm/modules/evm-utility/macro/src/lib.rs deleted file mode 100644 index 52d9f70c5..000000000 --- a/runtime/hydradx/src/evm/modules/evm-utility/macro/src/lib.rs +++ /dev/null @@ -1,80 +0,0 @@ -// : $$\ $$\ $$\ $$$$$$$\ $$\ $$\ -// !YJJ^ $$ | $$ | $$ | $$ __$$\ $$ | $$ | -// 7B5. ~B5^ $$ | $$ |$$\ $$\ $$$$$$$ | $$$$$$\ $$$$$$\ $$ | $$ |\$$\ $$ | -// .?B@G ~@@P~ $$$$$$$$ |$$ | $$ |$$ __$$ |$$ __$$\ \____$$\ $$ | $$ | \$$$$ / -// :?#@@@Y .&@@@P!. $$ __$$ |$$ | $$ |$$ / $$ |$$ | \__|$$$$$$$ |$$ | $$ | $$ $$< -// ^?J^7P&@@! .5@@#Y~!J!. $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ __$$ |$$ | $$ |$$ /\$$\ -// ^JJ!. :!J5^ ?5?^ ^?Y7. $$ | $$ |\$$$$$$$ |\$$$$$$$ |$$ | \$$$$$$$ |$$$$$$$ |$$ / $$ | -// ~PP: 7#B5!. :?P#G: 7G?. \__| \__| \____$$ | \_______|\__| \_______|\_______/ \__| \__| -// .!P@G 7@@@#Y^ .!P@@@#. ~@&J: $$\ $$ | -// !&@@J :&@@@@P. !&@@@@5 #@@P. \$$$$$$ | -// :J##: Y@@&P! :JB@@&~ ?@G! \______/ -// .?P!.?GY7: .. . ^?PP^:JP~ -// .7Y7. .!YGP^ ?BP?^ ^JJ^ This file is part of https://github.com/galacticcouncil/HydraDX-node -// .!Y7Y#@@#: ?@@@G?JJ^ Built with <3 for decentralisation. -// !G@@@Y .&@@&J: -// ^5@#. 7@#?. Copyright (C) 2021-2023 Intergalactic, Limited (GIB). -// :5P^.?G7. SPDX-License-Identifier: Apache-2.0 -// :?Y! Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// http://www.apache.org/licenses/LICENSE-2.0 - -use proc_macro::TokenStream; -use proc_macro2::Literal; -use quote::quote; -use syn::{parse_macro_input, Expr, ExprLit, Ident, ItemEnum, Lit, LitByteStr, LitStr}; - -#[proc_macro_attribute] -pub fn generate_function_selector(_: TokenStream, input: TokenStream) -> TokenStream { - let item = parse_macro_input!(input as ItemEnum); - - let ItemEnum { - attrs, - vis, - enum_token, - ident, - variants, - .. - } = item; - - let mut ident_expressions: Vec = vec![]; - let mut variant_expressions: Vec = vec![]; - for variant in variants { - if let Some((_, Expr::Lit(ExprLit { lit, .. }))) = variant.discriminant { - if let Lit::Str(token) = lit { - let selector = module_evm_utility::get_function_selector(&token.value()); - // println!("method: {:?}, selector: {:?}", token.value(), selector); - ident_expressions.push(variant.ident); - variant_expressions.push(Expr::Lit(ExprLit { - lit: Lit::Verbatim(Literal::u32_suffixed(selector)), - attrs: Default::default(), - })); - } else { - panic!("Not method string: `{:?}`", lit); - } - } else { - panic!("Not enum: `{:?}`", variant); - } - } - - (quote! { - #(#attrs)* - #vis #enum_token #ident { - #( - #ident_expressions = #variant_expressions, - )* - } - }) - .into() -} - -#[proc_macro] -pub fn keccak256(input: TokenStream) -> TokenStream { - let lit_str = parse_macro_input!(input as LitStr); - - let result = module_evm_utility::sha3_256(&lit_str.value()); - - let eval = Lit::ByteStr(LitByteStr::new(result.as_ref(), proc_macro2::Span::call_site())); - - quote!(#eval).into() -} diff --git a/runtime/hydradx/src/evm/modules/evm-utility/macro/tests/test.rs b/runtime/hydradx/src/evm/modules/evm-utility/macro/tests/test.rs deleted file mode 100644 index e6237b7b6..000000000 --- a/runtime/hydradx/src/evm/modules/evm-utility/macro/tests/test.rs +++ /dev/null @@ -1,57 +0,0 @@ -// : $$\ $$\ $$\ $$$$$$$\ $$\ $$\ -// !YJJ^ $$ | $$ | $$ | $$ __$$\ $$ | $$ | -// 7B5. ~B5^ $$ | $$ |$$\ $$\ $$$$$$$ | $$$$$$\ $$$$$$\ $$ | $$ |\$$\ $$ | -// .?B@G ~@@P~ $$$$$$$$ |$$ | $$ |$$ __$$ |$$ __$$\ \____$$\ $$ | $$ | \$$$$ / -// :?#@@@Y .&@@@P!. $$ __$$ |$$ | $$ |$$ / $$ |$$ | \__|$$$$$$$ |$$ | $$ | $$ $$< -// ^?J^7P&@@! .5@@#Y~!J!. $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ __$$ |$$ | $$ |$$ /\$$\ -// ^JJ!. :!J5^ ?5?^ ^?Y7. $$ | $$ |\$$$$$$$ |\$$$$$$$ |$$ | \$$$$$$$ |$$$$$$$ |$$ / $$ | -// ~PP: 7#B5!. :?P#G: 7G?. \__| \__| \____$$ | \_______|\__| \_______|\_______/ \__| \__| -// .!P@G 7@@@#Y^ .!P@@@#. ~@&J: $$\ $$ | -// !&@@J :&@@@@P. !&@@@@5 #@@P. \$$$$$$ | -// :J##: Y@@&P! :JB@@&~ ?@G! \______/ -// .?P!.?GY7: .. . ^?PP^:JP~ -// .7Y7. .!YGP^ ?BP?^ ^JJ^ This file is part of https://github.com/galacticcouncil/HydraDX-node -// .!Y7Y#@@#: ?@@@G?JJ^ Built with <3 for decentralisation. -// !G@@@Y .&@@&J: -// ^5@#. 7@#?. Copyright (C) 2021-2023 Intergalactic, Limited (GIB). -// :5P^.?G7. SPDX-License-Identifier: Apache-2.0 -// :?Y! Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// http://www.apache.org/licenses/LICENSE-2.0 - -#[cfg(test)] -mod tests { - #[test] - fn generate_function_selector_works() { - #[module_evm_utility_macro::generate_function_selector] - #[derive(Debug, Eq, PartialEq)] - #[repr(u32)] - pub enum Action { - Name = "name()", - Symbol = "symbol()", - Decimals = "decimals()", - TotalSupply = "totalSupply()", - BalanceOf = "balanceOf(address)", - Transfer = "transfer(address,uint256)", - } - - assert_eq!(Action::Name as u32, 0x06fdde03_u32); - assert_eq!(Action::Symbol as u32, 0x95d89b41_u32); - assert_eq!(Action::Decimals as u32, 0x313ce567_u32); - assert_eq!(Action::TotalSupply as u32, 0x18160ddd_u32); - assert_eq!(Action::BalanceOf as u32, 0x70a08231_u32); - assert_eq!(Action::Transfer as u32, 0xa9059cbb_u32); - } - - #[test] - fn keccak256_works() { - assert_eq!( - module_evm_utility_macro::keccak256!(""), - &module_evm_utility::sha3_256("") - ); - assert_eq!( - module_evm_utility_macro::keccak256!("keccak256"), - &module_evm_utility::sha3_256("keccak256") - ); - } -} diff --git a/runtime/hydradx/src/evm/modules/evm-utility/src/lib.rs b/runtime/hydradx/src/evm/modules/evm-utility/src/lib.rs deleted file mode 100644 index 14b04220b..000000000 --- a/runtime/hydradx/src/evm/modules/evm-utility/src/lib.rs +++ /dev/null @@ -1,47 +0,0 @@ -// : $$\ $$\ $$\ $$$$$$$\ $$\ $$\ -// !YJJ^ $$ | $$ | $$ | $$ __$$\ $$ | $$ | -// 7B5. ~B5^ $$ | $$ |$$\ $$\ $$$$$$$ | $$$$$$\ $$$$$$\ $$ | $$ |\$$\ $$ | -// .?B@G ~@@P~ $$$$$$$$ |$$ | $$ |$$ __$$ |$$ __$$\ \____$$\ $$ | $$ | \$$$$ / -// :?#@@@Y .&@@@P!. $$ __$$ |$$ | $$ |$$ / $$ |$$ | \__|$$$$$$$ |$$ | $$ | $$ $$< -// ^?J^7P&@@! .5@@#Y~!J!. $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ __$$ |$$ | $$ |$$ /\$$\ -// ^JJ!. :!J5^ ?5?^ ^?Y7. $$ | $$ |\$$$$$$$ |\$$$$$$$ |$$ | \$$$$$$$ |$$$$$$$ |$$ / $$ | -// ~PP: 7#B5!. :?P#G: 7G?. \__| \__| \____$$ | \_______|\__| \_______|\_______/ \__| \__| -// .!P@G 7@@@#Y^ .!P@@@#. ~@&J: $$\ $$ | -// !&@@J :&@@@@P. !&@@@@5 #@@P. \$$$$$$ | -// :J##: Y@@&P! :JB@@&~ ?@G! \______/ -// .?P!.?GY7: .. . ^?PP^:JP~ -// .7Y7. .!YGP^ ?BP?^ ^JJ^ This file is part of https://github.com/galacticcouncil/HydraDX-node -// .!Y7Y#@@#: ?@@@G?JJ^ Built with <3 for decentralisation. -// !G@@@Y .&@@&J: -// ^5@#. 7@#?. Copyright (C) 2021-2023 Intergalactic, Limited (GIB). -// :5P^.?G7. SPDX-License-Identifier: Apache-2.0 -// :?Y! Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// http://www.apache.org/licenses/LICENSE-2.0 - -#![cfg_attr(not(feature = "std"), no_std)] - -use sha3::{Digest, Keccak256}; - -pub use ethereum; -pub use evm::{self, backend::Basic as Account}; -pub use evm_gasometer; -pub use evm_runtime; - -pub fn sha3_256(s: &str) -> [u8; 32] { - let mut result = [0u8; 32]; - - // create a SHA3-256 object - let mut hasher = Keccak256::new(); - // write input message - hasher.update(s); - // read hash digest - result.copy_from_slice(&hasher.finalize()[..32]); - - result -} - -pub fn get_function_selector(s: &str) -> u32 { - let result = sha3_256(s); - u32::from_be_bytes(result[..4].try_into().unwrap()) -}