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

Commit

Permalink
Delete s2s related pallets (#1436)
Browse files Browse the repository at this point in the history
* Delete s2s backing and issuing pallets

* Fix runtime compile

* Delete precompile

* Delete dp-s2s primitive

* Delete dp-contract primitive

* Delete part of darwinia-support

* Remove ethabi encode

* Move remaining s2s part to parachain

* Self review

* Add migation

* Remove deprecated precompile

* Update address space
  • Loading branch information
boundless-forest authored Sep 14, 2022
1 parent 5621afa commit 897125f
Show file tree
Hide file tree
Showing 59 changed files with 57 additions and 4,274 deletions.
135 changes: 1 addition & 134 deletions Cargo.lock

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

6 changes: 0 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ members = [
"frame/dvm/ethereum",
"frame/dvm/evm",
"frame/dvm/evm/precompiles/bls12381",
"frame/dvm/evm/precompiles/bridge/s2s",
"frame/dvm/evm/precompiles/dispatch",
"frame/dvm/evm/precompiles/kton",
"frame/dvm/evm/precompiles/state-storage",
Expand All @@ -29,18 +28,13 @@ members = [
"frame/transaction-pause",
"frame/wormhole/backing/ethereum",
"frame/wormhole/backing/parachain",
"frame/wormhole/backing/s2s",
"frame/wormhole/backing/tron",
"frame/wormhole/issuing/s2s",
"primitives/asset",
"primitives/contract",
"primitives/ethereum",
"primitives/evm-trace/ext",
"primitives/evm-trace/tracer",
"primitives/merkle-patricia-trie",
"primitives/message",
"primitives/relayer-game",
"primitives/s2s",
]

# The list of dependencies below (which can be both direct and indirect dependencies) are crates
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ The Darwinia Runtime Module Library (DRML) is a darwinia.network maintained coll
- Pallet that provides the staking-related features, nominating, validating etc.
- [darwinia-support](./frame/support)
- Basic utility module.
- [from-substrate-issuing](./frame/wormhole/issuing/s2s)
- Pallet of issuing assets on the Substrate base network.
- [to-ethereum-backing](./frame/wormhole/backing/ethereum)
- Pallet of backing assets on the Ethereum network.
- [to-substrate-backing](./frame/wormhole/backing/s2s)
- Pallet of backing assets on the Substrate base network.
- [to-tron-backing](./frame/wormhole/backing/tron)
- Pallet of backing assets on the Tron network.

Expand Down
7 changes: 2 additions & 5 deletions frame/bridge/message-gadget/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,24 @@ version = "2.9.4"
# crates.io
codec = { package = "parity-scale-codec", version = "2.3", default-features = false }
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
sha3 = { version = "0.9", default-features = false }
# darwinia-network
darwinia-ethereum = { default-features = false, path = "../../dvm/ethereum" }
dp-contract = { default-features = false, path = "../../../primitives/contract" }
# paritytech
frame-support = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.12.4" }
frame-system = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.12.4" }
sp-core = { default-features = false, git = "https://github.com/darwinia-network/substrate", branch = "darwinia-v0.12.4" }

[dev-dependencies]
array-bytes = { version = "2.0" }

[features]
default = ["std"]

std = [
# crates.io
"codec/std",
"scale-info/std",
"sha3/std",
# darwinia-network
"darwinia-ethereum/std",
"dp-contract/std",
# paritytech
"frame-support/std",
"frame-system/std",
Expand Down
5 changes: 3 additions & 2 deletions frame/bridge/message-gadget/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@

// --- core ---
use core::marker::PhantomData;
// --- crates.io ---
use sha3::{Digest, Keccak256};
// --- darwinia-network ---
use darwinia_ethereum::InternalTransactHandler;
use dp_contract::beefy;
// --- paritytech ---
use frame_support::{log, pallet_prelude::*, traits::Get};
use frame_system::pallet_prelude::*;
Expand Down Expand Up @@ -94,7 +95,7 @@ where
let raw_message_root = unwrap_or_return!(
<darwinia_ethereum::Pallet<T>>::read_only_call(
<CommitmentContract<T>>::get(),
unwrap_or_return!(beefy::commitment(), "Fail to encode `commitment` ABI, return.")
Keccak256::digest(b"commitment()")[0..4].to_vec()
),
"Fail to read message root from DVM, return."
);
Expand Down
1 change: 0 additions & 1 deletion frame/dvm/ethereum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Those pallets are part of the DVM system:

## EVM Pallet Customized Precompiles

- `darwinia-evm-precompile-bridge-s2s`: The encoder precompile for s2s bridge.
- `darwinia-evm-precompile-bls12-381`: The BLS12381 precompile.
- `darwinia-evm-precompile-state-storage`: The precompile to read state storage with filter.
- `darwinia-evm-precompile-dispatch`: Enable interoperability between EVM contracts and other Substrate runtime components.
Expand Down
2 changes: 0 additions & 2 deletions frame/dvm/evm/precompiles/bls12381/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ sp-std = { default-features = false, git = "https://github.com/darwinia-network/
# darwinia-network
darwinia-evm = { default-features = false, path = "../.." }
darwinia-evm-precompile-utils = { default-features = false, path = "../utils" }
dp-contract = { default-features = false, path = "../../../../../primitives/contract" }
# frontier
fp-evm = { default-features = false, git = "https://github.com/darwinia-network/frontier", branch = "darwinia-v0.12.4" }

Expand All @@ -34,7 +33,6 @@ std = [
# darwinia-network
"darwinia-evm/std",
"darwinia-evm-precompile-utils/std",
"dp-contract/std",
# frontier
"fp-evm/std",
]
Loading

0 comments on commit 897125f

Please sign in to comment.