Skip to content

Commit

Permalink
test: Add mock runtime to frame-babel (#83)
Browse files Browse the repository at this point in the history
* build(deps): Bump frontier to stable2409

* test: Add mock runtime to frame-babel

* test: Use existing types for frame-babel mock runtime

---------

Co-authored-by: Jeeyong Um <conr2d@proton.me>
  • Loading branch information
code0xff and conr2d authored Oct 25, 2024
1 parent 52953fd commit 1e669ba
Show file tree
Hide file tree
Showing 8 changed files with 398 additions and 21 deletions.
30 changes: 22 additions & 8 deletions frame/babel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cosmwasm-std = { workspace = true, default-features = false, optional = true }
cosmwasm-vm = { workspace = true, default-features = false, optional = true }
cosmwasm-vm-wasmi = { workspace = true, default-features = false, optional = true }
ethereum = { version = "0.15.0", default-features = false, optional = true }
fp-evm = { git = "https://github.com/polkadot-evm/frontier", rev = "aacf5a4e", default-features = false, optional = true }
fp-evm = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false, optional = true }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
hex-literal = "0.4"
Expand All @@ -30,17 +30,17 @@ pallet-cosmos-x-auth-signing = { workspace = true, default-features = false, opt
pallet-cosmos-x-bank = { workspace = true, default-features = false, optional = true }
pallet-cosmos-x-wasm = { workspace = true, default-features = false, optional = true }
pallet-cosmwasm = { workspace = true, default-features = false, optional = true }
pallet-ethereum = { git = "https://github.com/polkadot-evm/frontier", rev = "aacf5a4e", default-features = false, optional = true }
pallet-evm = { git = "https://github.com/polkadot-evm/frontier", rev = "aacf5a4e", default-features = false, optional = true }
pallet-ethereum = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false, optional = true }
pallet-evm = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false, optional = true }
pallet-evm-precompileset-assets-erc20 = { workspace = true, optional = true }
pallet-evm-precompile-balances-erc20 = { workspace = true, optional = true }
pallet-evm-precompile-blake2 = { git = "https://github.com/polkadot-evm/frontier", rev = "aacf5a4e", default-features = false, optional = true }
pallet-evm-precompile-bn128 = { git = "https://github.com/polkadot-evm/frontier", rev = "aacf5a4e", default-features = false, optional = true }
pallet-evm-precompile-modexp = { git = "https://github.com/polkadot-evm/frontier", rev = "aacf5a4e", default-features = false, optional = true }
pallet-evm-precompile-simple = { git = "https://github.com/polkadot-evm/frontier", rev = "aacf5a4e", default-features = false, optional = true }
pallet-evm-precompile-blake2 = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false, optional = true }
pallet-evm-precompile-bn128 = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false, optional = true }
pallet-evm-precompile-modexp = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false, optional = true }
pallet-evm-precompile-simple = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false, optional = true }
pallet-multimap = { workspace = true, default-features = false }
parity-scale-codec = { version = "3.6", default-features = false, features = ["derive"] }
precompile-utils = { git = "https://github.com/polkadot-evm/frontier", rev = "aacf5a4e", default-features = false, optional = true }
precompile-utils = { git = "https://github.com/noirhq/frontier", branch = "stable2409", default-features = false, optional = true }
scale-info = { version = "2.11", default-features = false, features = ["derive"] }
serde = { version = "1.0.210", default-features = false, features = ["derive"], optional = true }
serde-json-wasm = { version = "1.0.1", default-features = false, optional = true }
Expand All @@ -50,6 +50,20 @@ sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "sta

[dev-dependencies]
hex = "0.4.3"
# substrate
pallet-assets = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409" }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409" }
pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409" }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409" }
# frontier
pallet-ethereum = { git = "https://github.com/noirhq/frontier", branch = "stable2409" }
pallet-evm = { git = "https://github.com/noirhq/frontier", branch = "stable2409" }
# noir
np-runtime = { workspace = true, default-features = true }
pallet-cosmos = { workspace = true, default-features = true }
pallet-cosmos-x-auth = { workspace = true, default-features = false }
pallet-cosmwasm = { workspace = true, default-features = true }
pallet-multimap = { workspace = true, default-features = true }

[features]
default = ["std", "pallet"]
Expand Down
2 changes: 2 additions & 0 deletions frame/babel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ pub mod cosmos;
#[cfg(feature = "ethereum")]
pub mod ethereum;
pub mod extensions;
#[cfg(test)]
mod mock;

pub use extensions::unify_account::UnifyAccount;
pub use np_babel::VarAddress;
Expand Down
Loading

0 comments on commit 1e669ba

Please sign in to comment.