Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: erc20 evm precompiles #1181

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 37 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ members = [
"primitives",
"parachain",
"parachain/runtime/*",
"parachain/runtime/common/evm/*",
"rpc",
]

Expand Down
1 change: 1 addition & 0 deletions crates/dex-stable/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ use sp_std::{ops::Sub, vec, vec::Vec};

pub use default_weights::WeightInfo;
pub use pallet::*;
pub use primitives::Pool;
use primitives::*;
use traits::{StablePoolLpCurrencyIdGenerate, ValidateCurrency};

Expand Down
9 changes: 9 additions & 0 deletions parachain/runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ version = "1.2.0"
targets = ['x86_64-unknown-linux-gnu']

[dependencies]
evm-macro = { path = "evm/macro", default-features = false }
evm-utils = { path = "evm/utils", default-features = false }

# Substrate dependencies
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false }
Expand All @@ -30,6 +32,7 @@ clients-info = { path = "../../../crates/clients-info", default-features = false
collator-selection = { path = "../../../crates/collator-selection", default-features = false }
currency = { path = "../../../crates/currency", default-features = false }
democracy = { path = "../../../crates/democracy", default-features = false }
dex-stable = { path = "../../../crates/dex-stable", default-features = false }
escrow = { path = "../../../crates/escrow", default-features = false }
fee = { path = "../../../crates/fee", default-features = false }
issue = { path = "../../../crates/issue", default-features = false }
Expand Down Expand Up @@ -58,6 +61,7 @@ orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-modu
orml-unknown-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "3fcd3cf9e63fe80fd9671912833a900ba09d1cc0", default-features = false }

# Frontier dependencies
fp-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false }
pallet-base-fee = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false }
pallet-ethereum = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false }
pallet-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42", default-features = false }
Expand All @@ -73,6 +77,9 @@ pallet-evm-precompile-simple = { git = "https://github.com/paritytech/frontier",
[features]
default = ["std"]
std = [
"evm-macro/std",
"evm-utils/std",

"sp-std/std",
"sp-runtime/std",
"sp-core/std",
Expand All @@ -91,6 +98,7 @@ std = [
"currency/std",
"collator-selection/std",
"democracy/std",
"dex-stable/std",
"escrow/std",
"fee/std",
"issue/std",
Expand All @@ -117,6 +125,7 @@ std = [
"orml-xcm-support/std",
"orml-unknown-tokens/std",

"fp-evm/std",
"pallet-base-fee/std",
"pallet-ethereum/std",
"pallet-evm/std",
Expand Down
32 changes: 32 additions & 0 deletions parachain/runtime/common/evm/macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
authors = ["Interlay Ltd"]
edition = "2021"
name = 'evm-macro'
version = "1.2.0"

[lib]
proc-macro = true

[dependencies]
quote = "1.0.20"
syn = { version = "1.0.98", features = ["full", "fold", "extra-traits", "visit"] }
proc-macro2 = "1.0.40"
sha3 = { version = "0.10", default-features = false }

[dev-dependencies]
hex = "0.4.2"
hex-literal = "0.3.1"
evm-utils = { path = "../utils" }

# Substrate dependencies
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }

# Frontier dependencies
fp-evm = { git = "https://github.com/paritytech/frontier", branch = "polkadot-v0.9.42" }

[features]
default = ["std"]
std = [
"sha3/std",
]
Loading