Skip to content

Commit

Permalink
feat: erc20 evm precompiles
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
  • Loading branch information
gregdhill committed Aug 23, 2023
1 parent f77d5b1 commit b2eec9e
Show file tree
Hide file tree
Showing 16 changed files with 1,317 additions and 23 deletions.
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.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ members = [
"primitives",
"parachain",
"parachain/runtime/*",
"parachain/runtime/common/src/evm/macro",
"parachain/runtime/common/src/evm/utils",
"rpc",
]

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 = "src/evm/macro", default-features = false }
evm-utils = { path = "src/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/src/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

0 comments on commit b2eec9e

Please sign in to comment.