Skip to content

Commit

Permalink
Merge pull request #304 from bit-country/master
Browse files Browse the repository at this point in the history
Upgrade subwasm build and missing std
  • Loading branch information
justinphamnz authored Jan 7, 2024
2 parents 61dc316 + 96259e3 commit d924c1c
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 67 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
Expand Down
92 changes: 46 additions & 46 deletions Cargo.toml

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions primitives/precompiles/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

Expand All @@ -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" ]
9 changes: 5 additions & 4 deletions primitives/precompiles/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,25 @@
// along with Utils. If not, see <http://www.gnu.org/licenses/>.

#![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};
Expand Down
2 changes: 1 addition & 1 deletion primitives/precompiles/src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 8 additions & 3 deletions runtime/continuum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down
6 changes: 5 additions & 1 deletion runtime/pioneer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit d924c1c

Please sign in to comment.