diff --git a/.github/workflows/build-wasm.yml b/.github/workflows/build-wasm.yml index 52e03a40..bf274d7f 100644 --- a/.github/workflows/build-wasm.yml +++ b/.github/workflows/build-wasm.yml @@ -5,7 +5,7 @@ name: Publish Release # - Build WASM using Substrate Runtime Tool env: - SUBWASM_VERSION: 0.17.0 + SUBWASM_VERSION: 0.20.0 on: workflow_dispatch: @@ -37,7 +37,7 @@ jobs: # Build WASM with Substrate Runtime Tool - name: Srtool build id: srtool_build - uses: chevdor/srtool-actions@v0.4.0 + uses: chevdor/srtool-actions@v0.7.0 with: chain: ${{ github.event.inputs.chain }} tag: ${{ github.event.inputs.srtool_image }} diff --git a/Cargo.toml b/Cargo.toml index 5bee28f4..33bb3a55 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ members = [ [workspace.dependencies] # General codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false, features = ["derive"] } -serde_json = "1.0.92" +serde_json = "1.0.92" serde = { version = "1.0.151" } scale-info = { version = "2.5.0", features = ["derive"], default-features = false } hex-literal = { version = "0.3.4" } @@ -38,7 +38,7 @@ similar-asserts = { version = "1.1.0" } # General (ethereum) ethabi = { version = "18.0.0", default-features = false } -evm = { git = "https://github.com/rust-blockchain/evm", rev = "b7b82c7e1fc57b7449d6dfa6826600de37cc1e65", default-features = false, features = [ "with-codec" ] } +evm = { git = "https://github.com/rust-blockchain/evm", rev = "b7b82c7e1fc57b7449d6dfa6826600de37cc1e65", default-features = false, features = ["with-codec"] } # General (precompile macro) proc-macro2 = "1.0" @@ -60,7 +60,7 @@ frame-executive = { git = 'https://github.com/paritytech/substrate', branch = 'p frame-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } frame-support = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } frame-system = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } -frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false} +frame-system-benchmarking = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } @@ -84,7 +84,7 @@ sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43"} +sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } @@ -99,24 +99,24 @@ sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "polkad # Substrate Primitive Dependencies (general) sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } sp-block-builder = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } sp-api = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } -sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } -sp-inherents = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } -sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } -sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } -sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } -sp-version = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } -sp-application-crypto = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } -sp-arithmetic = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } +sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } +sp-inherents = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } +sp-io = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } +sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } +sp-std = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } +sp-version = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } +sp-application-crypto = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } +sp-arithmetic = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } # Substrate Utilities -node-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43"} +node-primitives = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } substrate-fixed = { default-features = false, git = "https://github.com/encointer/substrate-fixed" } # Node template RPCs @@ -125,13 +125,13 @@ sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkad sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } -pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43"} +pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } # Substrate Pallets pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } pallet-balances = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } -pallet-collective = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false} +pallet-collective = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } pallet-democracy = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } pallet-insecure-randomness-collective-flip = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } pallet-sudo = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } @@ -152,7 +152,7 @@ pallet-preimage = { git = 'https://github.com/paritytech/substrate', branch = 'p pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } pallet-proxy = { git = 'https://github.com/paritytech/substrate', branch = 'polkadot-v0.9.43', default-features = false } -# Cumulus (node -only) +# Cumulus (node-only) cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.43' } cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.43' } cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.43' } @@ -183,40 +183,40 @@ pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus', bra # Polkadot polkadot-cli = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43" } polkadot-service = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43" } -polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43" , default-features = false } -polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43" , default-features = false } -polkadot-primitives = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43" , default-features = false } -xcm = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43" , default-features = false } -xcm-builder = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43" , default-features = false } -xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43" , default-features = false } -pallet-xcm = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43" , default-features = false } +polkadot-parachain = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43", default-features = false } +polkadot-runtime-parachains = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43", default-features = false } +polkadot-primitives = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43", default-features = false } +xcm = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43", default-features = false } +xcm-builder = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43", default-features = false } +xcm-executor = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43", default-features = false } +pallet-xcm = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43", default-features = false } polkadot-runtime-common = { git = 'https://github.com/paritytech/polkadot', branch = "release-v0.9.43", default-features = false } kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43", default-features = false } # ORML -orml-currencies = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } -orml-rewards = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } -orml-tokens = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } -orml-traits = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } -orml-nft = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } -orml-unknown-tokens = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } -orml-xtokens = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } -orml-xcm = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } -orml-xcm-support = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } -orml-oracle = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } +orml-currencies = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } +orml-rewards = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } +orml-tokens = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } +orml-traits = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } +orml-nft = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } +orml-unknown-tokens = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } +orml-xtokens = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } +orml-xcm = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } +orml-xcm-support = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } +orml-oracle = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } orml-benchmarking = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-9.43", default-features = false } # EVM pallet-dynamic-fee = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43" } -fp-consensus = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43"} +fp-consensus = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43" } fp-storage = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43" } fc-storage = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43" } -fc-cli = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43"} -fc-rpc = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43"} -fc-rpc-core = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43"} -fc-consensus = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43"} -fc-mapping-sync = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43"} -fc-db = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43"} +fc-cli = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43" } +fc-rpc = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43" } +fc-rpc-core = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43" } +fc-consensus = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43" } +fc-mapping-sync = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43" } +fc-db = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43" } fp-self-contained = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43", default-features = false } fp-rpc = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43", default-features = false } fp-evm = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43", default-features = false } @@ -231,7 +231,7 @@ pallet-evm-precompile-ed25519 = { git = "https://github.com/justinphamnz/frontie pallet-evm-precompile-modexp = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43", default-features = false } pallet-evm-precompile-sha3fips = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43", default-features = false } pallet-evm-precompile-simple = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v0.9.43", default-features = false } -libsecp256k1 = { version = "0.7.0", default-features = false, features = ["hmac", "static-context"]} +libsecp256k1 = { version = "0.7.0", default-features = false, features = ["hmac", "static-context"] } # ink! pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false } @@ -239,7 +239,7 @@ pallet-contracts-primitives = { git = "https://github.com/paritytech/substrate", # try-runtime frame-try-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } -try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } +try-runtime-cli = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.43", default-features = false } # Metaverse Network Traits auction-manager = { default-features = false, package = 'auction-manager', path = '../../traits/auction-manager' } diff --git a/primitives/precompiles/Cargo.toml b/primitives/precompiles/Cargo.toml index 1c29ba7b..5a4d66d1 100644 --- a/primitives/precompiles/Cargo.toml +++ b/primitives/precompiles/Cargo.toml @@ -10,7 +10,6 @@ log = { workspace = true, default-features = true } num_enum = { workspace = true } sha3 = { version = "0.9", default-features = false } similar-asserts = { workspace = true, optional = true } - # Moonbeam precompile-utils-macro = { path = "macro" } @@ -32,17 +31,18 @@ xcm = { workspace = true } [dev-dependencies] hex-literal = { workspace = true } +#assert_matches = { workspace = true } [features] -default = [ "std" ] +default = ["std"] std = [ - "codec/std", - "fp-evm/std", - "frame-support/std", - "frame-system/std", - "pallet-evm/std", - "sp-core/std", - "sp-io/std", - "sp-std/std", + "codec/std", + "fp-evm/std", + "frame-support/std", + "frame-system/std", + "pallet-evm/std", + "sp-core/std", + "sp-io/std", + "sp-std/std", ] #testing = [ "similar-asserts", "std" ] diff --git a/primitives/precompiles/src/lib.rs b/primitives/precompiles/src/lib.rs index 2472aecc..b7b38ee1 100644 --- a/primitives/precompiles/src/lib.rs +++ b/primitives/precompiles/src/lib.rs @@ -15,24 +15,25 @@ // along with Utils. If not, see . #![cfg_attr(not(feature = "std"), no_std)] -#![feature(assert_matches)] extern crate alloc; +use fp_evm::{ExitError, ExitRevert, ExitSucceed, PrecompileFailure, PrecompileHandle, PrecompileOutput}; + +use crate::alloc::borrow::ToOwned; + pub mod costs; pub mod handle; pub mod logs; pub mod modifier; pub mod precompile_set; pub mod substrate; +#[cfg(feature = "testing")] pub mod testing; #[cfg(test)] mod tests; -use crate::alloc::borrow::ToOwned; -use fp_evm::{ExitError, ExitRevert, ExitSucceed, PrecompileFailure, PrecompileHandle, PrecompileOutput}; - pub mod data; // pub use data::{Address, Bytes, EvmData, EvmDataReader, EvmDataWriter}; diff --git a/primitives/precompiles/src/testing.rs b/primitives/precompiles/src/testing.rs index 276dce8c..c420a041 100644 --- a/primitives/precompiles/src/testing.rs +++ b/primitives/precompiles/src/testing.rs @@ -17,7 +17,7 @@ use { alloc::format, alloc::string::String, - core::assert_matches::assert_matches, + assert_matches::assert_matches, fp_evm::{ Context, ExitError, ExitReason, ExitSucceed, Log, PrecompileFailure, PrecompileHandle, PrecompileOutput, PrecompileResult, PrecompileSet, Transfer, diff --git a/runtime/continuum/Cargo.toml b/runtime/continuum/Cargo.toml index 8418bb45..9ced420f 100644 --- a/runtime/continuum/Cargo.toml +++ b/runtime/continuum/Cargo.toml @@ -4,15 +4,16 @@ description = "Continuum Runtime" version = "0.0.7" edition = '2021' + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [build-dependencies] -substrate-wasm-builder = { workspace = true, default-features = true } +substrate-wasm-builder = { workspace = true } [dependencies] -codec = { workspace = true, package = "parity-scale-codec" } -serde = { workspace = true, optional = true, features = ['derive'] } +codec = { workspace = true, package = "parity-scale-codec", default-features = false, features = ['derive'] } log = { workspace = true } +serde = { workspace = true, optional = true, features = ['derive'] } scale-info = { workspace = true } smallvec = { workspace = true } hex-literal = { workspace = true } @@ -148,11 +149,13 @@ std = [ "frame-support/std", "frame-executive/std", "frame-system/std", + "frame-system-rpc-runtime-api/std", "pallet-balances/std", "pallet-insecure-randomness-collective-flip/std", "pallet-timestamp/std", "pallet-sudo/std", "pallet-transaction-payment/std", + "pallet-transaction-payment-rpc-runtime-api/std", "pallet-collective/std", "pallet-session/std", "pallet-scheduler/std", @@ -162,6 +165,8 @@ std = [ "pallet-membership/std", "pallet-utility/std", "pallet-proxy/std", + "pallet-grandpa/std", + "pallet-democracy/std", "parachain-info/std", "cumulus-pallet-aura-ext/std", "cumulus-pallet-parachain-system/std", diff --git a/runtime/pioneer/Cargo.toml b/runtime/pioneer/Cargo.toml index 61e38f8b..22e30e78 100644 --- a/runtime/pioneer/Cargo.toml +++ b/runtime/pioneer/Cargo.toml @@ -7,7 +7,7 @@ edition = '2021' # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [build-dependencies] -substrate-wasm-builder = { workspace = true, default-features = true } +substrate-wasm-builder = { workspace = true } [dependencies] codec = { workspace = true, package = "parity-scale-codec" } @@ -149,12 +149,16 @@ std = [ "frame-support/std", "frame-executive/std", "frame-system/std", + "frame-system-rpc-runtime-api/std", "pallet-balances/std", "pallet-insecure-randomness-collective-flip/std", "pallet-timestamp/std", "pallet-sudo/std", + "pallet-grandpa/std", "pallet-transaction-payment/std", + "pallet-transaction-payment-rpc-runtime-api/std", "pallet-collective/std", + "pallet-democracy/std", "pallet-session/std", "pallet-scheduler/std", "pallet-vesting/std",