diff --git a/Cargo.lock b/Cargo.lock index a8e483d7c..b8484b5a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -401,7 +401,7 @@ dependencies = [ [[package]] name = "bevm-finality-rpc" -version = "5.2.2" +version = "5.2.4" dependencies = [ "fc-db", "fc-rpc", @@ -787,14 +787,14 @@ dependencies = [ [[package]] name = "chainx" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-cli", ] [[package]] name = "chainx-cli" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-executor", "chainx-primitives", @@ -850,7 +850,7 @@ dependencies = [ [[package]] name = "chainx-executor" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-runtime", "dev-runtime", @@ -862,7 +862,7 @@ dependencies = [ [[package]] name = "chainx-primitives" -version = "5.2.3" +version = "5.2.4" dependencies = [ "frame-system", "parity-scale-codec", @@ -876,7 +876,7 @@ dependencies = [ [[package]] name = "chainx-rpc" -version = "5.2.3" +version = "5.2.4" dependencies = [ "bevm-finality-rpc", "chainx-primitives", @@ -937,11 +937,12 @@ dependencies = [ [[package]] name = "chainx-runtime" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "chainx-runtime-common", "fp-evm", + "fp-rent", "fp-rpc", "fp-self-contained", "frame-benchmarking", @@ -969,6 +970,7 @@ dependencies = [ "pallet-evm-precompile-modexp", "pallet-evm-precompile-sha3fips", "pallet-evm-precompile-simple", + "pallet-evm-rent", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -1055,7 +1057,7 @@ dependencies = [ [[package]] name = "chainx-service" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-executor", "chainx-primitives", @@ -1568,11 +1570,12 @@ dependencies = [ [[package]] name = "dev-runtime" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "chainx-runtime-common", "fp-evm", + "fp-rent", "fp-rpc", "fp-self-contained", "frame-benchmarking", @@ -1600,6 +1603,7 @@ dependencies = [ "pallet-evm-precompile-modexp", "pallet-evm-precompile-sha3fips", "pallet-evm-precompile-simple", + "pallet-evm-rent", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -2064,7 +2068,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "async-trait", "fc-db", @@ -2083,7 +2087,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "fp-storage", "kvdb-rocksdb", @@ -2097,7 +2101,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "fc-db", "fp-consensus", @@ -2114,7 +2118,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "ethereum", "ethereum-types", @@ -2156,7 +2160,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "ethereum", "ethereum-types", @@ -2263,7 +2267,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "ethereum", "parity-scale-codec", @@ -2275,7 +2279,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "evm", "parity-scale-codec", @@ -2284,10 +2288,18 @@ dependencies = [ "sp-std", ] +[[package]] +name = "fp-rent" +version = "2.0.0-dev" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" +dependencies = [ + "sp-core", +] + [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "ethereum", "ethereum-types", @@ -2304,7 +2316,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "ethereum", "frame-support", @@ -2320,7 +2332,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "parity-scale-codec", ] @@ -4548,11 +4560,12 @@ dependencies = [ [[package]] name = "malan-runtime" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "chainx-runtime-common", "fp-evm", + "fp-rent", "fp-rpc", "fp-self-contained", "frame-benchmarking", @@ -4580,6 +4593,7 @@ dependencies = [ "pallet-evm-precompile-modexp", "pallet-evm-precompile-sha3fips", "pallet-evm-precompile-simple", + "pallet-evm-rent", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -5296,7 +5310,7 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "frame-support", "frame-system", @@ -5378,13 +5392,14 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "ethereum", "ethereum-types", "evm", "fp-consensus", "fp-evm", + "fp-rent", "fp-rpc", "fp-self-contained", "fp-storage", @@ -5407,10 +5422,11 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "evm", "fp-evm", + "fp-rent", "frame-benchmarking", "frame-support", "frame-system", @@ -5433,7 +5449,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "fp-evm", ] @@ -5441,7 +5457,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "fp-evm", "sp-core", @@ -5451,7 +5467,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "fp-evm", "frame-support", @@ -5461,7 +5477,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "fp-evm", "num", @@ -5470,7 +5486,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "fp-evm", "tiny-keccak", @@ -5479,13 +5495,29 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#f42dbeb4013f239c07f99add4bd14b5cbe79eb58" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" dependencies = [ "fp-evm", "ripemd", "sp-io", ] +[[package]] +name = "pallet-evm-rent" +version = "1.0.0" +source = "git+https://github.com/chainx-org/frontier?branch=polkadot-v0.9.18-btc-fix2#3925a4d27bb30310212c86d2ced940b789cbc406" +dependencies = [ + "fp-rent", + "frame-support", + "frame-system", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-runtime", +] + [[package]] name = "pallet-grandpa" version = "4.0.0-dev" @@ -9432,7 +9464,7 @@ dependencies = [ "chrono", "lazy_static", "matchers", - "parking_lot 0.11.2", + "parking_lot 0.10.2", "regex", "serde", "serde_json", @@ -10287,7 +10319,7 @@ dependencies = [ [[package]] name = "xp-assets-registrar" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "impl-trait-for-tuples", @@ -10300,7 +10332,7 @@ dependencies = [ [[package]] name = "xp-gateway-bitcoin" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "frame-support", @@ -10317,7 +10349,7 @@ dependencies = [ [[package]] name = "xp-gateway-common" -version = "5.2.3" +version = "5.2.4" dependencies = [ "bs58 0.3.1", "frame-support", @@ -10330,7 +10362,7 @@ dependencies = [ [[package]] name = "xp-genesis-builder" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "serde", @@ -10339,7 +10371,7 @@ dependencies = [ [[package]] name = "xp-io" -version = "5.2.3" +version = "5.2.4" dependencies = [ "hex", "parity-scale-codec", @@ -10350,7 +10382,7 @@ dependencies = [ [[package]] name = "xp-mining-common" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "sp-arithmetic", @@ -10359,7 +10391,7 @@ dependencies = [ [[package]] name = "xp-mining-staking" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "sp-runtime", @@ -10369,7 +10401,7 @@ dependencies = [ [[package]] name = "xp-protocol" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "parity-scale-codec", @@ -10380,7 +10412,7 @@ dependencies = [ [[package]] name = "xp-rpc" -version = "5.2.3" +version = "5.2.4" dependencies = [ "hex", "jsonrpc-core", @@ -10390,7 +10422,7 @@ dependencies = [ [[package]] name = "xp-runtime" -version = "5.2.3" +version = "5.2.4" dependencies = [ "fp-rpc", "hex", @@ -10405,7 +10437,7 @@ dependencies = [ [[package]] name = "xpallet-assets" -version = "5.2.3" +version = "5.2.4" dependencies = [ "bitflags", "chainx-primitives", @@ -10428,7 +10460,7 @@ dependencies = [ [[package]] name = "xpallet-assets-bridge" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "ethabi", @@ -10451,7 +10483,7 @@ dependencies = [ [[package]] name = "xpallet-assets-registrar" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "frame-benchmarking", @@ -10473,7 +10505,7 @@ dependencies = [ [[package]] name = "xpallet-assets-rpc" -version = "5.2.3" +version = "5.2.4" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -10488,7 +10520,7 @@ dependencies = [ [[package]] name = "xpallet-assets-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "parity-scale-codec", @@ -10499,7 +10531,7 @@ dependencies = [ [[package]] name = "xpallet-btc-ledger" -version = "5.2.3" +version = "5.2.4" dependencies = [ "frame-benchmarking", "frame-support", @@ -10514,7 +10546,7 @@ dependencies = [ [[package]] name = "xpallet-btc-ledger-rpc" -version = "5.2.3" +version = "5.2.4" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -10529,7 +10561,7 @@ dependencies = [ [[package]] name = "xpallet-btc-ledger-runtime-api" -version = "5.2.3" +version = "5.2.4" dependencies = [ "parity-scale-codec", "sp-api", @@ -10538,7 +10570,7 @@ dependencies = [ [[package]] name = "xpallet-dex-spot" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "env_logger 0.7.1", @@ -10562,7 +10594,7 @@ dependencies = [ [[package]] name = "xpallet-dex-spot-rpc" -version = "5.2.3" +version = "5.2.4" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -10578,7 +10610,7 @@ dependencies = [ [[package]] name = "xpallet-dex-spot-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" dependencies = [ "parity-scale-codec", "sp-api", @@ -10599,7 +10631,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-bitcoin" -version = "5.2.3" +version = "5.2.4" dependencies = [ "bs58 0.3.1", "chainx-primitives", @@ -10638,7 +10670,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-bitcoin-rpc" -version = "5.2.3" +version = "5.2.4" dependencies = [ "hex", "jsonrpc-core", @@ -10655,7 +10687,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-bitcoin-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "parity-scale-codec", @@ -10669,7 +10701,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-common" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "frame-benchmarking", @@ -10707,7 +10739,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-common-rpc" -version = "5.2.3" +version = "5.2.4" dependencies = [ "hex", "jsonrpc-core", @@ -10724,7 +10756,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-common-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "parity-scale-codec", @@ -10740,7 +10772,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-records" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "frame-benchmarking", @@ -10763,7 +10795,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-records-rpc" -version = "5.2.3" +version = "5.2.4" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -10779,7 +10811,7 @@ dependencies = [ [[package]] name = "xpallet-gateway-records-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "parity-scale-codec", @@ -10791,7 +10823,7 @@ dependencies = [ [[package]] name = "xpallet-genesis-builder" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "frame-support", @@ -10812,7 +10844,7 @@ dependencies = [ [[package]] name = "xpallet-mining-asset" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "env_logger 0.7.1", @@ -10841,7 +10873,7 @@ dependencies = [ [[package]] name = "xpallet-mining-asset-rpc" -version = "5.2.3" +version = "5.2.4" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -10856,7 +10888,7 @@ dependencies = [ [[package]] name = "xpallet-mining-asset-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "parity-scale-codec", @@ -10867,7 +10899,7 @@ dependencies = [ [[package]] name = "xpallet-mining-staking" -version = "5.2.3" +version = "5.2.4" dependencies = [ "chainx-primitives", "frame-benchmarking", @@ -10897,7 +10929,7 @@ dependencies = [ [[package]] name = "xpallet-mining-staking-rpc" -version = "5.2.3" +version = "5.2.4" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -10912,7 +10944,7 @@ dependencies = [ [[package]] name = "xpallet-mining-staking-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" dependencies = [ "parity-scale-codec", "sp-api", @@ -10922,7 +10954,7 @@ dependencies = [ [[package]] name = "xpallet-support" -version = "5.2.3" +version = "5.2.4" dependencies = [ "hex", "sp-std", @@ -10930,7 +10962,7 @@ dependencies = [ [[package]] name = "xpallet-system" -version = "5.2.3" +version = "5.2.4" dependencies = [ "frame-support", "frame-system", @@ -10944,7 +10976,7 @@ dependencies = [ [[package]] name = "xpallet-transaction-fee" -version = "5.2.3" +version = "5.2.4" dependencies = [ "frame-support", "frame-system", @@ -10958,7 +10990,7 @@ dependencies = [ [[package]] name = "xpallet-transaction-fee-rpc" -version = "5.2.3" +version = "5.2.4" dependencies = [ "jsonrpc-core", "jsonrpc-core-client", @@ -10976,7 +11008,7 @@ dependencies = [ [[package]] name = "xpallet-transaction-fee-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" dependencies = [ "parity-scale-codec", "sp-api", diff --git a/Cargo.toml b/Cargo.toml index ba8f78883..e449efbd9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" description = "Fully Decentralized Interchain Crypto Asset Management on Polkadot" diff --git a/cli/Cargo.toml b/cli/Cargo.toml index edc671c01..c60d7812f 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx-cli" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] description = "Implementation of protocol https://chainx.org in Rust based on the Substrate framework." edition = "2021" diff --git a/client/rpc/finality/Cargo.toml b/client/rpc/finality/Cargo.toml index 59e964987..e5d827ca9 100644 --- a/client/rpc/finality/Cargo.toml +++ b/client/rpc/finality/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevm-finality-rpc" description = "An experimental RPC to check for block and transaction finality in the bevm chain" -version = "5.2.2" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/executor/Cargo.toml b/executor/Cargo.toml index 0bfe0ed7d..76a13a26d 100644 --- a/executor/Cargo.toml +++ b/executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx-executor" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/primitives/Cargo.toml b/primitives/Cargo.toml index 5b6aa2679..89b9cd5a1 100644 --- a/primitives/Cargo.toml +++ b/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx-primitives" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/primitives/assets-registrar/Cargo.toml b/primitives/assets-registrar/Cargo.toml index 31753157d..8d36b1a30 100644 --- a/primitives/assets-registrar/Cargo.toml +++ b/primitives/assets-registrar/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-assets-registrar" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/primitives/gateway/bitcoin/Cargo.toml b/primitives/gateway/bitcoin/Cargo.toml index 8ef4a30c0..0528ff635 100644 --- a/primitives/gateway/bitcoin/Cargo.toml +++ b/primitives/gateway/bitcoin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-gateway-bitcoin" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/primitives/gateway/common/Cargo.toml b/primitives/gateway/common/Cargo.toml index c2e922bc8..fe8cc0c4c 100644 --- a/primitives/gateway/common/Cargo.toml +++ b/primitives/gateway/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-gateway-common" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/primitives/genesis-builder/Cargo.toml b/primitives/genesis-builder/Cargo.toml index 2e22f9441..3e6e1e762 100644 --- a/primitives/genesis-builder/Cargo.toml +++ b/primitives/genesis-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-genesis-builder" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/primitives/io/Cargo.toml b/primitives/io/Cargo.toml index 2864e89a8..876c4f819 100644 --- a/primitives/io/Cargo.toml +++ b/primitives/io/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-io" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/primitives/mining/common/Cargo.toml b/primitives/mining/common/Cargo.toml index c64db3a49..90e85e020 100644 --- a/primitives/mining/common/Cargo.toml +++ b/primitives/mining/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-mining-common" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/primitives/mining/staking/Cargo.toml b/primitives/mining/staking/Cargo.toml index 97b73437f..5db5702b2 100644 --- a/primitives/mining/staking/Cargo.toml +++ b/primitives/mining/staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-mining-staking" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/primitives/protocol/Cargo.toml b/primitives/protocol/Cargo.toml index 2e8b96220..f97a9b758 100644 --- a/primitives/protocol/Cargo.toml +++ b/primitives/protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-protocol" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/primitives/rpc/Cargo.toml b/primitives/rpc/Cargo.toml index f34fe6766..6ed90dff9 100644 --- a/primitives/rpc/Cargo.toml +++ b/primitives/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-rpc" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/primitives/runtime/Cargo.toml b/primitives/runtime/Cargo.toml index b2cef59f4..7d4cecbed 100644 --- a/primitives/runtime/Cargo.toml +++ b/primitives/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xp-runtime" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/rpc/Cargo.toml b/rpc/Cargo.toml index 5f33e8d8b..ad14ef9f6 100644 --- a/rpc/Cargo.toml +++ b/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx-rpc" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/runtime/chainx/Cargo.toml b/runtime/chainx/Cargo.toml index 858e2c1a2..3d38f3c8d 100644 --- a/runtime/chainx/Cargo.toml +++ b/runtime/chainx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx-runtime" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" @@ -102,6 +102,8 @@ xpallet-btc-ledger-runtime-api = { path = "../../xpallets/btc-ledger/rpc/runtime pallet-evm = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false, features = ["chainx-adaptor"] } pallet-ethereum = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } pallet-base-fee = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } +pallet-evm-rent = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } + xpallet-ethereum-chain-id = { path = "../../xpallets/ethereum-chain-id", default-features = false } xpallet-assets-bridge = { path = "../../xpallets/assets-bridge", default-features = false } @@ -116,6 +118,7 @@ pallet-evm-precompile-blake2 = { git = "https://github.com/chainx-org/frontier", # ETH API fp-rpc = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } fp-self-contained = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } +fp-rent = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } [build-dependencies] substrate-wasm-builder = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18-fix2" } @@ -206,11 +209,13 @@ std = [ "pallet-evm/std", "pallet-ethereum/std", "pallet-base-fee/std", + "pallet-evm-rent/std", "xpallet-ethereum-chain-id/std", "xpallet-assets-bridge/std", "fp-evm/std", "fp-rpc/std", "fp-self-contained/std", + "fp-rent/std", ] runtime-benchmarks = [ "hex-literal", diff --git a/runtime/chainx/src/lib.rs b/runtime/chainx/src/lib.rs index c91a6d12b..2439abfb5 100644 --- a/runtime/chainx/src/lib.rs +++ b/runtime/chainx/src/lib.rs @@ -125,7 +125,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("chainx"), impl_name: create_runtime_str!("chainx-net"), authoring_version: 1, - spec_version: 35, + spec_version: 36, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 8, @@ -688,7 +688,7 @@ parameter_types! { pub const VotingBond: Balance = DOLLARS; pub const TermDuration: BlockNumber = DAYS; pub const DesiredMembers: u32 = 6; - pub const DesiredRunnersUp: u32 = 0; + pub const DesiredRunnersUp: u32 = 3; pub const ElectionsPhragmenPalletId: LockIdentifier = *b"pcx/phre"; } @@ -1159,6 +1159,7 @@ impl pallet_evm::Config for Runtime { type OnChargeTransaction = pallet_evm::EVMCurrencyAdapter; type BlockGasLimit = BlockGasLimit; type FindAuthor = (); + type EvmRentCalculator = EvmRent; type WeightInfo = pallet_evm::weights::SubstrateWeight; } @@ -1203,6 +1204,12 @@ impl xpallet_assets_bridge::Config for Runtime { type ClaimBond = ClaimBond; } +impl pallet_evm_rent::Config for Runtime { + type Event = Event; + type CouncilOrigin = + pallet_collective::EnsureProportionAtLeast; +} + construct_runtime!( pub enum Runtime where Block = Block, @@ -1281,6 +1288,7 @@ construct_runtime!( XAssetsBridge: xpallet_assets_bridge::{Pallet, Call, Storage, Config, Event} = 45, XBtcLedger: xpallet_btc_ledger::{Pallet, Call, Storage, Config, Event} = 46, + EvmRent: pallet_evm_rent::{Pallet, Call, Storage, Event} = 47, } ); @@ -1322,25 +1330,8 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - AssetsBridgeMigration, >; -pub struct AssetsBridgeMigration; -impl OnRuntimeUpgrade for AssetsBridgeMigration { - fn on_runtime_upgrade() -> Weight { - use frame_support::storage::migration; - - frame_support::log::info!("🔍️ AssetsBridgeMigration start"); - - // Remove the storage value `HotAccount` from pallet `XAssetsBridge` - migration::remove_storage_prefix(b"XAssetsBridge", b"HotAccount", b""); - - frame_support::log::info!("🚀 AssetsBridgeMigration end"); - - ::DbWeight::get().writes(1) - } -} - pub struct TransactionConverter; impl fp_rpc::ConvertTransaction for TransactionConverter { fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic { diff --git a/runtime/chainx/src/precompiles.rs b/runtime/chainx/src/precompiles.rs index 7f6c291c1..60aea941e 100644 --- a/runtime/chainx/src/precompiles.rs +++ b/runtime/chainx/src/precompiles.rs @@ -40,7 +40,8 @@ impl PrecompileSet for ChainXPrecompiles where R: xpallet_assets_bridge::Config + xpallet_gateway_common::Config - + xpallet_gateway_records::Config, + + xpallet_gateway_records::Config + + pallet_evm_rent::Config, Dispatch: Precompile, { fn execute( diff --git a/runtime/chainx/src/withdraw.rs b/runtime/chainx/src/withdraw.rs index faf21fdec..df202059a 100644 --- a/runtime/chainx/src/withdraw.rs +++ b/runtime/chainx/src/withdraw.rs @@ -1,10 +1,9 @@ -#![cfg_attr(not(feature = "std"), no_std)] - use codec::{Decode, Encode}; use core::marker::PhantomData; use fp_evm::{ Context, ExitRevert, ExitSucceed, PrecompileFailure, PrecompileOutput, PrecompileResult, }; +use fp_rent::EvmRentCalculator; use frame_support::log; use pallet_evm::{AddressMapping, Precompile}; use sp_core::{hexdisplay::HexDisplay, H160, U256}; @@ -14,10 +13,19 @@ use sp_std::vec; const MIN_BTC_TRANSFER_VALUE: u128 = 10_000_000_000; const BASE_GAS_COST: u64 = 100_000; +#[derive(Clone, Debug, Eq, PartialEq)] +enum ReturnType { + WithdrawBTC, + WithdrawPCX, + EstimateRent(u128, u64), + RentSettings(u128, u64), +} + pub struct Withdraw< T: xpallet_assets_bridge::Config + xpallet_gateway_common::Config - + xpallet_gateway_records::Config, + + xpallet_gateway_records::Config + + pallet_evm_rent::Config, > { _marker: PhantomData, } @@ -25,10 +33,11 @@ pub struct Withdraw< impl< T: xpallet_assets_bridge::Config + xpallet_gateway_common::Config - + xpallet_gateway_records::Config, + + xpallet_gateway_records::Config + + pallet_evm_rent::Config, > Withdraw { - fn process(caller: &H160, input: &[u8]) -> Result<(), PrecompileFailure> { + fn process(caller: &H160, input: &[u8]) -> Result { match input.first() { // Withdraw BTC Some(&0) if input.len() >= 67 && input.len() <= 95 => { @@ -43,7 +52,7 @@ impl< log::debug!(target: "evm-withdraw", "btc: success"); - Ok(()) + Ok(ReturnType::WithdrawBTC) } // Withdraw PCX Some(&1) if input.len() == 65 => { @@ -58,7 +67,36 @@ impl< log::debug!(target: "evm-withdraw", "pcx: success"); - Ok(()) + Ok(ReturnType::WithdrawPCX) + } + // EstimateRent + Some(&2) if input.len() == 21 => { + // input = (flag, 1 byte) + evm_account(20 bytes) + + log::debug!(target: "evm-withdraw", "estimateRent: call"); + let (rent_balance, days) = + Self::process_estimate_rent(&input[1..]).map_err(|err| { + log::warn!(target: "evm-withdraw", "estimateRent: err = {:?}", err); + err + })?; + log::debug!(target: "evm-withdraw", "estimateRent: success"); + + Ok(ReturnType::EstimateRent(rent_balance, days)) + } + + // Get Rent Settings + Some(&3) if input.len() == 1 => { + // input = (flag, 1 byte) + + log::debug!(target: "evm-withdraw", "rentSettings: call"); + let (daily_rent, active_timestamp) = + Self::process_rent_settings().map_err(|err| { + log::warn!(target: "evm-withdraw", "rentSettings: err = {:?}", err); + err + })?; + log::debug!(target: "evm-withdraw", "rentSettings: success"); + + Ok(ReturnType::RentSettings(daily_rent, active_timestamp)) } _ => { log::warn!(target: "evm-withdraw", "invalid input: {:?}", input); @@ -207,13 +245,30 @@ impl< Ok(()) } + + fn process_estimate_rent(input: &[u8]) -> Result<(u128, u64), PrecompileFailure> { + let evm_account = H160::from_slice(&input[0..20]); + + let (rent_balance, days) = + as EvmRentCalculator>::estimate_rent(evm_account); + + Ok((rent_balance, days)) + } + + fn process_rent_settings() -> Result<(u128, u64), PrecompileFailure> { + let daily_rent: u128 = pallet_evm_rent::Pallet::::daily_rent(); + let active_timestamp: u64 = pallet_evm_rent::Pallet::::active_timestamp(); + + Ok((daily_rent, active_timestamp)) + } } impl Precompile for Withdraw where T: xpallet_assets_bridge::Config + xpallet_gateway_common::Config - + xpallet_gateway_records::Config, + + xpallet_gateway_records::Config + + pallet_evm_rent::Config, T::AccountId: Decode, { fn execute( @@ -224,17 +279,34 @@ where ) -> PrecompileResult { log::debug!(target: "evm-withdraw", "caller: {:?}", context.caller); - Self::process(&context.caller, input).map(|_| { - // Refer: https://github.com/rust-ethereum/ethabi/blob/master/ethabi/src/encoder.rs#L144 - let mut out = vec![0u8; 32]; - out[31] = 1u8; - - Ok(PrecompileOutput { - exit_status: ExitSucceed::Returned, - cost: BASE_GAS_COST, - output: out.to_vec(), - logs: Default::default(), - }) + Self::process(&context.caller, input).map(|r| { + match r { + ReturnType::WithdrawBTC | ReturnType::WithdrawPCX => { + // Refer: https://github.com/rust-ethereum/ethabi/blob/master/ethabi/src/encoder.rs#L144 + let mut out = vec![0u8; 32]; + out[31] = 1u8; + + Ok(PrecompileOutput { + exit_status: ExitSucceed::Returned, + cost: BASE_GAS_COST, + output: out.to_vec(), + logs: Default::default(), + }) + } + ReturnType::EstimateRent(balance, time) + | ReturnType::RentSettings(balance, time) => { + let mut padded = [0u8; 64]; + padded[16..32].copy_from_slice(balance.to_be_bytes().as_slice()); + padded[56..64].copy_from_slice(time.to_be_bytes().as_slice()); + + Ok(PrecompileOutput { + exit_status: ExitSucceed::Returned, + cost: BASE_GAS_COST, + output: padded.to_vec(), + logs: Default::default(), + }) + } + } })? } } diff --git a/runtime/dev/Cargo.toml b/runtime/dev/Cargo.toml index 927b317ec..6c31ce343 100644 --- a/runtime/dev/Cargo.toml +++ b/runtime/dev/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dev-runtime" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" @@ -103,6 +103,8 @@ xpallet-btc-ledger-runtime-api = { path = "../../xpallets/btc-ledger/rpc/runtime pallet-evm = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false, features = ["chainx-adaptor"] } pallet-ethereum = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } pallet-base-fee = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } +pallet-evm-rent = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } + xpallet-ethereum-chain-id = { path = "../../xpallets/ethereum-chain-id", default-features = false } xpallet-assets-bridge = { path = "../../xpallets/assets-bridge", default-features = false } @@ -117,6 +119,7 @@ pallet-evm-precompile-blake2 = { git = "https://github.com/chainx-org/frontier", # ETH API fp-rpc = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } fp-self-contained = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } +fp-rent = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } [build-dependencies] substrate-wasm-builder = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18-fix2" } @@ -208,11 +211,13 @@ std = [ "pallet-evm/std", "pallet-ethereum/std", "pallet-base-fee/std", + "pallet-evm-rent/std", "xpallet-ethereum-chain-id/std", "xpallet-assets-bridge/std", "fp-evm/std", "fp-rpc/std", "fp-self-contained/std", + "fp-rent/std", ] runtime-benchmarks = [ "hex-literal", diff --git a/runtime/dev/src/lib.rs b/runtime/dev/src/lib.rs index 6dee1ad1a..e19626002 100644 --- a/runtime/dev/src/lib.rs +++ b/runtime/dev/src/lib.rs @@ -125,7 +125,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("chainx"), impl_name: create_runtime_str!("chainx-dev"), authoring_version: 1, - spec_version: 34, + spec_version: 36, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 7, @@ -1163,6 +1163,7 @@ impl pallet_evm::Config for Runtime { type OnChargeTransaction = pallet_evm::EVMCurrencyAdapter; type BlockGasLimit = BlockGasLimit; type FindAuthor = (); + type EvmRentCalculator = EvmRent; type WeightInfo = pallet_evm::weights::SubstrateWeight; } @@ -1207,6 +1208,12 @@ impl xpallet_assets_bridge::Config for Runtime { type ClaimBond = ClaimBond; } +impl pallet_evm_rent::Config for Runtime { + type Event = Event; + type CouncilOrigin = + pallet_collective::EnsureProportionAtLeast; +} + construct_runtime!( pub enum Runtime where Block = Block, @@ -1288,6 +1295,7 @@ construct_runtime!( XAssetsBridge: xpallet_assets_bridge::{Pallet, Call, Storage, Config, Event} = 45, XBtcLedger: xpallet_btc_ledger::{Pallet, Call, Storage, Config, Event} = 46, + EvmRent: pallet_evm_rent::{Pallet, Call, Storage, Event} = 47, } ); @@ -1329,25 +1337,8 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - AssetsBridgeMigration, >; -pub struct AssetsBridgeMigration; -impl OnRuntimeUpgrade for AssetsBridgeMigration { - fn on_runtime_upgrade() -> Weight { - use frame_support::storage::migration; - - frame_support::log::info!("🔍️ AssetsBridgeMigration start"); - - // Remove the storage value `HotAccount` from pallet `XAssetsBridge` - migration::remove_storage_prefix(b"XAssetsBridge", b"HotAccount", b""); - - frame_support::log::info!("🚀 AssetsBridgeMigration end"); - - ::DbWeight::get().writes(1) - } -} - pub struct TransactionConverter; impl fp_rpc::ConvertTransaction for TransactionConverter { fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic { diff --git a/runtime/dev/src/precompiles.rs b/runtime/dev/src/precompiles.rs index 7f6c291c1..60aea941e 100644 --- a/runtime/dev/src/precompiles.rs +++ b/runtime/dev/src/precompiles.rs @@ -40,7 +40,8 @@ impl PrecompileSet for ChainXPrecompiles where R: xpallet_assets_bridge::Config + xpallet_gateway_common::Config - + xpallet_gateway_records::Config, + + xpallet_gateway_records::Config + + pallet_evm_rent::Config, Dispatch: Precompile, { fn execute( diff --git a/runtime/dev/src/withdraw.rs b/runtime/dev/src/withdraw.rs index faf21fdec..df202059a 100644 --- a/runtime/dev/src/withdraw.rs +++ b/runtime/dev/src/withdraw.rs @@ -1,10 +1,9 @@ -#![cfg_attr(not(feature = "std"), no_std)] - use codec::{Decode, Encode}; use core::marker::PhantomData; use fp_evm::{ Context, ExitRevert, ExitSucceed, PrecompileFailure, PrecompileOutput, PrecompileResult, }; +use fp_rent::EvmRentCalculator; use frame_support::log; use pallet_evm::{AddressMapping, Precompile}; use sp_core::{hexdisplay::HexDisplay, H160, U256}; @@ -14,10 +13,19 @@ use sp_std::vec; const MIN_BTC_TRANSFER_VALUE: u128 = 10_000_000_000; const BASE_GAS_COST: u64 = 100_000; +#[derive(Clone, Debug, Eq, PartialEq)] +enum ReturnType { + WithdrawBTC, + WithdrawPCX, + EstimateRent(u128, u64), + RentSettings(u128, u64), +} + pub struct Withdraw< T: xpallet_assets_bridge::Config + xpallet_gateway_common::Config - + xpallet_gateway_records::Config, + + xpallet_gateway_records::Config + + pallet_evm_rent::Config, > { _marker: PhantomData, } @@ -25,10 +33,11 @@ pub struct Withdraw< impl< T: xpallet_assets_bridge::Config + xpallet_gateway_common::Config - + xpallet_gateway_records::Config, + + xpallet_gateway_records::Config + + pallet_evm_rent::Config, > Withdraw { - fn process(caller: &H160, input: &[u8]) -> Result<(), PrecompileFailure> { + fn process(caller: &H160, input: &[u8]) -> Result { match input.first() { // Withdraw BTC Some(&0) if input.len() >= 67 && input.len() <= 95 => { @@ -43,7 +52,7 @@ impl< log::debug!(target: "evm-withdraw", "btc: success"); - Ok(()) + Ok(ReturnType::WithdrawBTC) } // Withdraw PCX Some(&1) if input.len() == 65 => { @@ -58,7 +67,36 @@ impl< log::debug!(target: "evm-withdraw", "pcx: success"); - Ok(()) + Ok(ReturnType::WithdrawPCX) + } + // EstimateRent + Some(&2) if input.len() == 21 => { + // input = (flag, 1 byte) + evm_account(20 bytes) + + log::debug!(target: "evm-withdraw", "estimateRent: call"); + let (rent_balance, days) = + Self::process_estimate_rent(&input[1..]).map_err(|err| { + log::warn!(target: "evm-withdraw", "estimateRent: err = {:?}", err); + err + })?; + log::debug!(target: "evm-withdraw", "estimateRent: success"); + + Ok(ReturnType::EstimateRent(rent_balance, days)) + } + + // Get Rent Settings + Some(&3) if input.len() == 1 => { + // input = (flag, 1 byte) + + log::debug!(target: "evm-withdraw", "rentSettings: call"); + let (daily_rent, active_timestamp) = + Self::process_rent_settings().map_err(|err| { + log::warn!(target: "evm-withdraw", "rentSettings: err = {:?}", err); + err + })?; + log::debug!(target: "evm-withdraw", "rentSettings: success"); + + Ok(ReturnType::RentSettings(daily_rent, active_timestamp)) } _ => { log::warn!(target: "evm-withdraw", "invalid input: {:?}", input); @@ -207,13 +245,30 @@ impl< Ok(()) } + + fn process_estimate_rent(input: &[u8]) -> Result<(u128, u64), PrecompileFailure> { + let evm_account = H160::from_slice(&input[0..20]); + + let (rent_balance, days) = + as EvmRentCalculator>::estimate_rent(evm_account); + + Ok((rent_balance, days)) + } + + fn process_rent_settings() -> Result<(u128, u64), PrecompileFailure> { + let daily_rent: u128 = pallet_evm_rent::Pallet::::daily_rent(); + let active_timestamp: u64 = pallet_evm_rent::Pallet::::active_timestamp(); + + Ok((daily_rent, active_timestamp)) + } } impl Precompile for Withdraw where T: xpallet_assets_bridge::Config + xpallet_gateway_common::Config - + xpallet_gateway_records::Config, + + xpallet_gateway_records::Config + + pallet_evm_rent::Config, T::AccountId: Decode, { fn execute( @@ -224,17 +279,34 @@ where ) -> PrecompileResult { log::debug!(target: "evm-withdraw", "caller: {:?}", context.caller); - Self::process(&context.caller, input).map(|_| { - // Refer: https://github.com/rust-ethereum/ethabi/blob/master/ethabi/src/encoder.rs#L144 - let mut out = vec![0u8; 32]; - out[31] = 1u8; - - Ok(PrecompileOutput { - exit_status: ExitSucceed::Returned, - cost: BASE_GAS_COST, - output: out.to_vec(), - logs: Default::default(), - }) + Self::process(&context.caller, input).map(|r| { + match r { + ReturnType::WithdrawBTC | ReturnType::WithdrawPCX => { + // Refer: https://github.com/rust-ethereum/ethabi/blob/master/ethabi/src/encoder.rs#L144 + let mut out = vec![0u8; 32]; + out[31] = 1u8; + + Ok(PrecompileOutput { + exit_status: ExitSucceed::Returned, + cost: BASE_GAS_COST, + output: out.to_vec(), + logs: Default::default(), + }) + } + ReturnType::EstimateRent(balance, time) + | ReturnType::RentSettings(balance, time) => { + let mut padded = [0u8; 64]; + padded[16..32].copy_from_slice(balance.to_be_bytes().as_slice()); + padded[56..64].copy_from_slice(time.to_be_bytes().as_slice()); + + Ok(PrecompileOutput { + exit_status: ExitSucceed::Returned, + cost: BASE_GAS_COST, + output: padded.to_vec(), + logs: Default::default(), + }) + } + } })? } } diff --git a/runtime/malan/Cargo.toml b/runtime/malan/Cargo.toml index 561357808..0feaa68c5 100644 --- a/runtime/malan/Cargo.toml +++ b/runtime/malan/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "malan-runtime" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" @@ -103,6 +103,8 @@ xpallet-btc-ledger-runtime-api = { path = "../../xpallets/btc-ledger/rpc/runtime pallet-evm = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false, features = ["chainx-adaptor"] } pallet-ethereum = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } pallet-base-fee = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } +pallet-evm-rent = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } + xpallet-ethereum-chain-id = { path = "../../xpallets/ethereum-chain-id", default-features = false } xpallet-assets-bridge = { path = "../../xpallets/assets-bridge", default-features = false } @@ -117,6 +119,7 @@ pallet-evm-precompile-blake2 = { git = "https://github.com/chainx-org/frontier", # ETH API fp-rpc = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } fp-self-contained = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } +fp-rent = { git = "https://github.com/chainx-org/frontier", branch = "polkadot-v0.9.18-btc-fix2", default-features = false } [build-dependencies] substrate-wasm-builder = { git = "https://github.com/chainx-org/substrate", branch = "polkadot-v0.9.18-fix2" } @@ -208,11 +211,13 @@ std = [ "pallet-evm/std", "pallet-ethereum/std", "pallet-base-fee/std", + "pallet-evm-rent/std", "xpallet-ethereum-chain-id/std", "xpallet-assets-bridge/std", "fp-evm/std", "fp-rpc/std", "fp-self-contained/std", + "fp-rent/std", ] runtime-benchmarks = [ "hex-literal", diff --git a/runtime/malan/src/lib.rs b/runtime/malan/src/lib.rs index fab6576f1..9bdd39f9c 100644 --- a/runtime/malan/src/lib.rs +++ b/runtime/malan/src/lib.rs @@ -125,7 +125,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("chainx"), impl_name: create_runtime_str!("chainx-malan"), authoring_version: 1, - spec_version: 34, + spec_version: 36, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 7, @@ -1163,6 +1163,7 @@ impl pallet_evm::Config for Runtime { type OnChargeTransaction = pallet_evm::EVMCurrencyAdapter; type BlockGasLimit = BlockGasLimit; type FindAuthor = (); + type EvmRentCalculator = EvmRent; type WeightInfo = pallet_evm::weights::SubstrateWeight; } @@ -1207,6 +1208,12 @@ impl xpallet_assets_bridge::Config for Runtime { type ClaimBond = ClaimBond; } +impl pallet_evm_rent::Config for Runtime { + type Event = Event; + type CouncilOrigin = + pallet_collective::EnsureProportionAtLeast; +} + construct_runtime!( pub enum Runtime where Block = Block, @@ -1288,6 +1295,7 @@ construct_runtime!( XAssetsBridge: xpallet_assets_bridge::{Pallet, Call, Storage, Config, Event} = 45, XBtcLedger: xpallet_btc_ledger::{Pallet, Call, Storage, Config, Event} = 46, + EvmRent: pallet_evm_rent::{Pallet, Call, Storage, Event} = 47, } ); diff --git a/runtime/malan/src/precompiles.rs b/runtime/malan/src/precompiles.rs index 7f6c291c1..60aea941e 100644 --- a/runtime/malan/src/precompiles.rs +++ b/runtime/malan/src/precompiles.rs @@ -40,7 +40,8 @@ impl PrecompileSet for ChainXPrecompiles where R: xpallet_assets_bridge::Config + xpallet_gateway_common::Config - + xpallet_gateway_records::Config, + + xpallet_gateway_records::Config + + pallet_evm_rent::Config, Dispatch: Precompile, { fn execute( diff --git a/runtime/malan/src/withdraw.rs b/runtime/malan/src/withdraw.rs index faf21fdec..df202059a 100644 --- a/runtime/malan/src/withdraw.rs +++ b/runtime/malan/src/withdraw.rs @@ -1,10 +1,9 @@ -#![cfg_attr(not(feature = "std"), no_std)] - use codec::{Decode, Encode}; use core::marker::PhantomData; use fp_evm::{ Context, ExitRevert, ExitSucceed, PrecompileFailure, PrecompileOutput, PrecompileResult, }; +use fp_rent::EvmRentCalculator; use frame_support::log; use pallet_evm::{AddressMapping, Precompile}; use sp_core::{hexdisplay::HexDisplay, H160, U256}; @@ -14,10 +13,19 @@ use sp_std::vec; const MIN_BTC_TRANSFER_VALUE: u128 = 10_000_000_000; const BASE_GAS_COST: u64 = 100_000; +#[derive(Clone, Debug, Eq, PartialEq)] +enum ReturnType { + WithdrawBTC, + WithdrawPCX, + EstimateRent(u128, u64), + RentSettings(u128, u64), +} + pub struct Withdraw< T: xpallet_assets_bridge::Config + xpallet_gateway_common::Config - + xpallet_gateway_records::Config, + + xpallet_gateway_records::Config + + pallet_evm_rent::Config, > { _marker: PhantomData, } @@ -25,10 +33,11 @@ pub struct Withdraw< impl< T: xpallet_assets_bridge::Config + xpallet_gateway_common::Config - + xpallet_gateway_records::Config, + + xpallet_gateway_records::Config + + pallet_evm_rent::Config, > Withdraw { - fn process(caller: &H160, input: &[u8]) -> Result<(), PrecompileFailure> { + fn process(caller: &H160, input: &[u8]) -> Result { match input.first() { // Withdraw BTC Some(&0) if input.len() >= 67 && input.len() <= 95 => { @@ -43,7 +52,7 @@ impl< log::debug!(target: "evm-withdraw", "btc: success"); - Ok(()) + Ok(ReturnType::WithdrawBTC) } // Withdraw PCX Some(&1) if input.len() == 65 => { @@ -58,7 +67,36 @@ impl< log::debug!(target: "evm-withdraw", "pcx: success"); - Ok(()) + Ok(ReturnType::WithdrawPCX) + } + // EstimateRent + Some(&2) if input.len() == 21 => { + // input = (flag, 1 byte) + evm_account(20 bytes) + + log::debug!(target: "evm-withdraw", "estimateRent: call"); + let (rent_balance, days) = + Self::process_estimate_rent(&input[1..]).map_err(|err| { + log::warn!(target: "evm-withdraw", "estimateRent: err = {:?}", err); + err + })?; + log::debug!(target: "evm-withdraw", "estimateRent: success"); + + Ok(ReturnType::EstimateRent(rent_balance, days)) + } + + // Get Rent Settings + Some(&3) if input.len() == 1 => { + // input = (flag, 1 byte) + + log::debug!(target: "evm-withdraw", "rentSettings: call"); + let (daily_rent, active_timestamp) = + Self::process_rent_settings().map_err(|err| { + log::warn!(target: "evm-withdraw", "rentSettings: err = {:?}", err); + err + })?; + log::debug!(target: "evm-withdraw", "rentSettings: success"); + + Ok(ReturnType::RentSettings(daily_rent, active_timestamp)) } _ => { log::warn!(target: "evm-withdraw", "invalid input: {:?}", input); @@ -207,13 +245,30 @@ impl< Ok(()) } + + fn process_estimate_rent(input: &[u8]) -> Result<(u128, u64), PrecompileFailure> { + let evm_account = H160::from_slice(&input[0..20]); + + let (rent_balance, days) = + as EvmRentCalculator>::estimate_rent(evm_account); + + Ok((rent_balance, days)) + } + + fn process_rent_settings() -> Result<(u128, u64), PrecompileFailure> { + let daily_rent: u128 = pallet_evm_rent::Pallet::::daily_rent(); + let active_timestamp: u64 = pallet_evm_rent::Pallet::::active_timestamp(); + + Ok((daily_rent, active_timestamp)) + } } impl Precompile for Withdraw where T: xpallet_assets_bridge::Config + xpallet_gateway_common::Config - + xpallet_gateway_records::Config, + + xpallet_gateway_records::Config + + pallet_evm_rent::Config, T::AccountId: Decode, { fn execute( @@ -224,17 +279,34 @@ where ) -> PrecompileResult { log::debug!(target: "evm-withdraw", "caller: {:?}", context.caller); - Self::process(&context.caller, input).map(|_| { - // Refer: https://github.com/rust-ethereum/ethabi/blob/master/ethabi/src/encoder.rs#L144 - let mut out = vec![0u8; 32]; - out[31] = 1u8; - - Ok(PrecompileOutput { - exit_status: ExitSucceed::Returned, - cost: BASE_GAS_COST, - output: out.to_vec(), - logs: Default::default(), - }) + Self::process(&context.caller, input).map(|r| { + match r { + ReturnType::WithdrawBTC | ReturnType::WithdrawPCX => { + // Refer: https://github.com/rust-ethereum/ethabi/blob/master/ethabi/src/encoder.rs#L144 + let mut out = vec![0u8; 32]; + out[31] = 1u8; + + Ok(PrecompileOutput { + exit_status: ExitSucceed::Returned, + cost: BASE_GAS_COST, + output: out.to_vec(), + logs: Default::default(), + }) + } + ReturnType::EstimateRent(balance, time) + | ReturnType::RentSettings(balance, time) => { + let mut padded = [0u8; 64]; + padded[16..32].copy_from_slice(balance.to_be_bytes().as_slice()); + padded[56..64].copy_from_slice(time.to_be_bytes().as_slice()); + + Ok(PrecompileOutput { + exit_status: ExitSucceed::Returned, + cost: BASE_GAS_COST, + output: padded.to_vec(), + logs: Default::default(), + }) + } + } })? } } diff --git a/service/Cargo.toml b/service/Cargo.toml index 27753facf..4495afed6 100644 --- a/service/Cargo.toml +++ b/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chainx-service" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/assets-bridge/Cargo.toml b/xpallets/assets-bridge/Cargo.toml index efb04d790..f36ea3f2d 100644 --- a/xpallets/assets-bridge/Cargo.toml +++ b/xpallets/assets-bridge/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-assets-bridge" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/assets-bridge/src/mock.rs b/xpallets/assets-bridge/src/mock.rs index 68713d8af..88b9f75d7 100644 --- a/xpallets/assets-bridge/src/mock.rs +++ b/xpallets/assets-bridge/src/mock.rs @@ -137,6 +137,7 @@ impl pallet_evm::Config for Test { type OnChargeTransaction = (); type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; type FindAuthor = (); + type EvmRentCalculator = (); type WeightInfo = (); } diff --git a/xpallets/assets-registrar/Cargo.toml b/xpallets/assets-registrar/Cargo.toml index b75e39295..602cd8a74 100644 --- a/xpallets/assets-registrar/Cargo.toml +++ b/xpallets/assets-registrar/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-assets-registrar" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/assets/Cargo.toml b/xpallets/assets/Cargo.toml index c70345f9a..7b84a7644 100644 --- a/xpallets/assets/Cargo.toml +++ b/xpallets/assets/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-assets" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/assets/rpc/Cargo.toml b/xpallets/assets/rpc/Cargo.toml index bdcec6cf9..e265ef87c 100644 --- a/xpallets/assets/rpc/Cargo.toml +++ b/xpallets/assets/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-assets-rpc" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/assets/rpc/runtime-api/Cargo.toml b/xpallets/assets/rpc/runtime-api/Cargo.toml index 1d46373df..c8958b054 100644 --- a/xpallets/assets/rpc/runtime-api/Cargo.toml +++ b/xpallets/assets/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-assets-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/btc-ledger/Cargo.toml b/xpallets/btc-ledger/Cargo.toml index 45215b1f8..b8f452fcd 100644 --- a/xpallets/btc-ledger/Cargo.toml +++ b/xpallets/btc-ledger/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-btc-ledger" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/btc-ledger/rpc/Cargo.toml b/xpallets/btc-ledger/rpc/Cargo.toml index 3a4dece56..d25f77a4f 100644 --- a/xpallets/btc-ledger/rpc/Cargo.toml +++ b/xpallets/btc-ledger/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-btc-ledger-rpc" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/btc-ledger/rpc/runtime-api/Cargo.toml b/xpallets/btc-ledger/rpc/runtime-api/Cargo.toml index 83686ce33..2c3c188f4 100644 --- a/xpallets/btc-ledger/rpc/runtime-api/Cargo.toml +++ b/xpallets/btc-ledger/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-btc-ledger-runtime-api" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/dex/spot/Cargo.toml b/xpallets/dex/spot/Cargo.toml index 3d7336078..6f76a1fcf 100644 --- a/xpallets/dex/spot/Cargo.toml +++ b/xpallets/dex/spot/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-dex-spot" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/dex/spot/rpc/Cargo.toml b/xpallets/dex/spot/rpc/Cargo.toml index 4039ff6ca..3492d3424 100644 --- a/xpallets/dex/spot/rpc/Cargo.toml +++ b/xpallets/dex/spot/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-dex-spot-rpc" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/dex/spot/rpc/runtime-api/Cargo.toml b/xpallets/dex/spot/rpc/runtime-api/Cargo.toml index 61a1247d5..20c2071b7 100644 --- a/xpallets/dex/spot/rpc/runtime-api/Cargo.toml +++ b/xpallets/dex/spot/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-dex-spot-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/gateway/bitcoin/Cargo.toml b/xpallets/gateway/bitcoin/Cargo.toml index 1965d8df0..e782e2be6 100644 --- a/xpallets/gateway/bitcoin/Cargo.toml +++ b/xpallets/gateway/bitcoin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-bitcoin" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/gateway/bitcoin/rpc/Cargo.toml b/xpallets/gateway/bitcoin/rpc/Cargo.toml index 66496a26f..e3123c84e 100644 --- a/xpallets/gateway/bitcoin/rpc/Cargo.toml +++ b/xpallets/gateway/bitcoin/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-bitcoin-rpc" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/gateway/bitcoin/rpc/runtime-api/Cargo.toml b/xpallets/gateway/bitcoin/rpc/runtime-api/Cargo.toml index a79fc77a3..c7882c6cc 100644 --- a/xpallets/gateway/bitcoin/rpc/runtime-api/Cargo.toml +++ b/xpallets/gateway/bitcoin/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-bitcoin-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/gateway/bitcoin/src/mock.rs b/xpallets/gateway/bitcoin/src/mock.rs index 31dbe7a86..7883d9115 100644 --- a/xpallets/gateway/bitcoin/src/mock.rs +++ b/xpallets/gateway/bitcoin/src/mock.rs @@ -272,6 +272,7 @@ impl pallet_evm::Config for Test { type OnChargeTransaction = (); type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; type FindAuthor = (); + type EvmRentCalculator = (); type WeightInfo = (); } diff --git a/xpallets/gateway/common/Cargo.toml b/xpallets/gateway/common/Cargo.toml index b28e3a9b2..64d472aaa 100644 --- a/xpallets/gateway/common/Cargo.toml +++ b/xpallets/gateway/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-common" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/gateway/common/rpc/Cargo.toml b/xpallets/gateway/common/rpc/Cargo.toml index 7c9224727..73f4819ba 100644 --- a/xpallets/gateway/common/rpc/Cargo.toml +++ b/xpallets/gateway/common/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-common-rpc" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/gateway/common/rpc/runtime-api/Cargo.toml b/xpallets/gateway/common/rpc/runtime-api/Cargo.toml index b39e6e6f3..f3f0e8839 100644 --- a/xpallets/gateway/common/rpc/runtime-api/Cargo.toml +++ b/xpallets/gateway/common/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-common-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/gateway/common/src/mock.rs b/xpallets/gateway/common/src/mock.rs index 89b5db626..f8a4aad61 100644 --- a/xpallets/gateway/common/src/mock.rs +++ b/xpallets/gateway/common/src/mock.rs @@ -258,6 +258,7 @@ impl pallet_evm::Config for Test { type OnChargeTransaction = (); type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping; type FindAuthor = (); + type EvmRentCalculator = (); type WeightInfo = (); } diff --git a/xpallets/gateway/records/Cargo.toml b/xpallets/gateway/records/Cargo.toml index be84a1e28..187f6bc68 100644 --- a/xpallets/gateway/records/Cargo.toml +++ b/xpallets/gateway/records/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-records" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/gateway/records/rpc/Cargo.toml b/xpallets/gateway/records/rpc/Cargo.toml index 8704627d0..45909d34f 100644 --- a/xpallets/gateway/records/rpc/Cargo.toml +++ b/xpallets/gateway/records/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-records-rpc" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/gateway/records/rpc/runtime-api/Cargo.toml b/xpallets/gateway/records/rpc/runtime-api/Cargo.toml index 32ef8e782..93b416186 100644 --- a/xpallets/gateway/records/rpc/runtime-api/Cargo.toml +++ b/xpallets/gateway/records/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-gateway-records-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/genesis-builder/Cargo.toml b/xpallets/genesis-builder/Cargo.toml index 33e8cdc66..059939d5e 100644 --- a/xpallets/genesis-builder/Cargo.toml +++ b/xpallets/genesis-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-genesis-builder" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/mining/asset/Cargo.toml b/xpallets/mining/asset/Cargo.toml index bc0614f0a..d9ea5cc86 100644 --- a/xpallets/mining/asset/Cargo.toml +++ b/xpallets/mining/asset/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-mining-asset" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/mining/asset/rpc/Cargo.toml b/xpallets/mining/asset/rpc/Cargo.toml index a96f8f42e..f196a9491 100644 --- a/xpallets/mining/asset/rpc/Cargo.toml +++ b/xpallets/mining/asset/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-mining-asset-rpc" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/mining/asset/rpc/runtime-api/Cargo.toml b/xpallets/mining/asset/rpc/runtime-api/Cargo.toml index 8f1f0930d..79abad9d4 100644 --- a/xpallets/mining/asset/rpc/runtime-api/Cargo.toml +++ b/xpallets/mining/asset/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-mining-asset-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/mining/staking/Cargo.toml b/xpallets/mining/staking/Cargo.toml index 8724cffbb..0cce949c3 100644 --- a/xpallets/mining/staking/Cargo.toml +++ b/xpallets/mining/staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-mining-staking" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/mining/staking/rpc/Cargo.toml b/xpallets/mining/staking/rpc/Cargo.toml index 1c45203de..e1da014e1 100644 --- a/xpallets/mining/staking/rpc/Cargo.toml +++ b/xpallets/mining/staking/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-mining-staking-rpc" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/mining/staking/rpc/runtime-api/Cargo.toml b/xpallets/mining/staking/rpc/runtime-api/Cargo.toml index e1eeed9a7..6b2b3faef 100644 --- a/xpallets/mining/staking/rpc/runtime-api/Cargo.toml +++ b/xpallets/mining/staking/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-mining-staking-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/support/Cargo.toml b/xpallets/support/Cargo.toml index 10efe0076..36abb9bf2 100644 --- a/xpallets/support/Cargo.toml +++ b/xpallets/support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-support" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/system/Cargo.toml b/xpallets/system/Cargo.toml index 0ed4c8744..021cf02f4 100644 --- a/xpallets/system/Cargo.toml +++ b/xpallets/system/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-system" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/transaction-fee/Cargo.toml b/xpallets/transaction-fee/Cargo.toml index 0f278a835..223333a91 100644 --- a/xpallets/transaction-fee/Cargo.toml +++ b/xpallets/transaction-fee/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-transaction-fee" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/transaction-fee/rpc/Cargo.toml b/xpallets/transaction-fee/rpc/Cargo.toml index 98a235351..a89c29055 100644 --- a/xpallets/transaction-fee/rpc/Cargo.toml +++ b/xpallets/transaction-fee/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-transaction-fee-rpc" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021" diff --git a/xpallets/transaction-fee/rpc/runtime-api/Cargo.toml b/xpallets/transaction-fee/rpc/runtime-api/Cargo.toml index a607ef2e3..c87557776 100644 --- a/xpallets/transaction-fee/rpc/runtime-api/Cargo.toml +++ b/xpallets/transaction-fee/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xpallet-transaction-fee-rpc-runtime-api" -version = "5.2.3" +version = "5.2.4" authors = ["The ChainX Authors"] edition = "2021"