Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Substrate EVM (#3927)
Browse files Browse the repository at this point in the history
* srml-evm: init the basic structures

* srml-evm: finish executor implementation

* srml-evm: implement balance deposit and withdraw

* srml-evm: implement the actuall call/create

* srml-evm: use crates.io version of evm

* srml-evm: fix no-std compile

* Remove dependency patch

* Update to evm 0.14

* Use double map for account storage

* Add precompiles support

* Add some basic docs

* Use runtime_io::chain_id()

* Update srml/evm/src/lib.rs

Co-Authored-By: Xiliang Chen <xlchen1291@gmail.com>

* Update srml/evm/src/lib.rs

Co-Authored-By: Xiliang Chen <xlchen1291@gmail.com>

* Fix WithdrawReason

* Unique saturate balance to u128

* Unique saturate withdraw to u128

* Remove extern crate alloc

* Move account code to a separate storage and use ref for convert_account_id

* More match cause for error message

* Fix potential interger overflow

* Use decode_len for fetching code length
  • Loading branch information
sorpaas committed Nov 3, 2019
1 parent a218568 commit 1d5cae9
Show file tree
Hide file tree
Showing 7 changed files with 601 additions and 30 deletions.
117 changes: 89 additions & 28 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 @@ -93,6 +93,7 @@ members = [
"srml/transaction-payment",
"srml/transaction-payment/rpc",
"srml/utility",
"srml/evm",
"node/cli",
"node/executor",
"node/primitives",
Expand Down
2 changes: 1 addition & 1 deletion core/externalities/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"

[dependencies]
primitive-types = { version = "0.5.1", features = ["codec"] }
primitive-types = { version = "0.6", features = ["codec"] }
primitives-storage = { package = "substrate-primitives-storage", path = "../primitives/storage" }
rstd = { package = "sr-std", path = "../sr-std" }
environmental = { version = "1.0.2" }
2 changes: 1 addition & 1 deletion core/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ log = { version = "0.4.8", default-features = false }
serde = { version = "1.0.101", optional = true, features = ["derive"] }
twox-hash = { version = "1.5.0", optional = true }
byteorder = { version = "1.3.2", default-features = false }
primitive-types = { version = "0.5.1", default-features = false, features = ["codec"] }
primitive-types = { version = "0.6", default-features = false, features = ["codec"] }
impl-serde = { version = "0.2.3", optional = true }
wasmi = { version = "0.5.1", optional = true }
hash-db = { version = "0.15.2", default-features = false }
Expand Down
40 changes: 40 additions & 0 deletions srml/evm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[package]
name = "srml-evm"
version = "2.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"

[dependencies]
serde = { version = "1.0.101", optional = true, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false }
support = { package = "srml-support", path = "../support", default-features = false }
system = { package = "srml-system", path = "../system", default-features = false }
timestamp = { package = "srml-timestamp", path = "../timestamp", default-features = false }
balances = { package = "srml-balances", path = "../balances", default-features = false }
primitives = { package = "substrate-primitives", path = "../../core/primitives", default-features = false }
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
rstd = { package = "sr-std", path = "../../core/sr-std", default-features = false }
runtime-io = { package = "sr-io", path = "../../core/sr-io", default-features = false }
primitive-types = { version = "0.6", default-features = false, features = ["rlp"] }
rlp = { version = "0.4", default-features = false }
evm = { version = "0.14", default-features = false }
sha3 = { version = "0.8", default-features = false }

[features]
default = ["std"]
std = [
"serde",
"codec/std",
"primitives/std",
"sr-primitives/std",
"support/std",
"system/std",
"balances/std",
"runtime-io/std",
"rstd/std",
"sha3/std",
"rlp/std",
"primitive-types/std",
"evm/std",
"timestamp/std",
]
Loading

0 comments on commit 1d5cae9

Please sign in to comment.