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

Rename control to system #1030

Merged
merged 6 commits into from
Dec 1, 2023
Merged
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
2 changes: 1 addition & 1 deletion contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Agents are defined by the following contracts:
* [Agent.sol](src/Agent.sol): Agent contract
* [AgentExecutor.sol](src/AgentExecutor.sol): Code executed within an agent using `delegatecall`

The creation of new agents can be initiated by calling `EthereumControl::create_agent` extrinsic on the BridgeHub parachain.
The creation of new agents can be initiated by calling `EthereumSystem::create_agent` extrinsic on the BridgeHub parachain.

### BeefyClient

Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ More concretely, they have a number of purposes in the bridge design:
* Users wanting to send outbound messages to Polkadot need to pay fees into the agent contract corresponding to the destination parachain
* Relayers submitting messages to the Gateway are rewarded from the agent contract corresponding to the origin parachain.

The creation of new agents can be initiated permissionlessly by calling `EthereumControl::create_agent` extrinsic on the BridgeHub parachain.
The creation of new agents can be initiated permissionlessly by calling `EthereumSystem::create_agent` extrinsic on the BridgeHub parachain.

### BeefyClient

Expand Down
80 changes: 40 additions & 40 deletions parachain/Cargo.lock

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

16 changes: 14 additions & 2 deletions parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@ members = [
"pallets/outbound-queue/runtime-api",
"pallets/outbound-queue/merkle-tree",
"pallets/ethereum-beacon-client",
"pallets/control",
"pallets/control/runtime-api",
"pallets/system",
"pallets/system/runtime-api",
"runtime/runtime-common",
]

[patch.'https://github.com/snowfork/snowbridge']
snowbridge-beacon-primitives = { path = "./primitives/beacon" }
snowbridge-system = { path = "./pallets/system" }
snowbridge-system-runtime-api = { path = "./pallets/system/runtime-api" }
snowbridge-core = { path = "./primitives/core" }
snowbridge-ethereum-beacon-client = { path = "./pallets/ethereum-beacon-client" }
snowbridge-inbound-queue = { path = "./pallets/inbound-queue" }
snowbridge-outbound-queue = { path = "./pallets/outbound-queue" }
snowbridge-outbound-queue-runtime-api = { path = "./pallets/outbound-queue/runtime-api" }
snowbridge-router-primitives = { path = "./primitives/router" }
snowbridge-runtime-common = { path = "./runtime/runtime-common" }
4 changes: 2 additions & 2 deletions parachain/pallets/outbound-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
//! # Overview
//!
//! Messages come either from sibling parachains via XCM, or BridgeHub itself
//! via the `snowbridge-control` pallet:
//! via the `snowbridge-system` pallet:
//!
//! 1. `snowbridge_router_primitives::outbound::EthereumBlobExporter::deliver`
//! 2. `snowbridge_control::Pallet::send`
//! 2. `snowbridge_system::Pallet::send`
//!
//! The message submission pipeline works like this:
//! 1. The message is first validated via the implementation for
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
[package]
name = "snowbridge-control"
version = "4.0.0-dev"
description = "FRAME pallet template for defining custom runtime logic."
authors = ["Substrate DevHub <https://github.com/substrate-developer-hub>"]
homepage = "https://substrate.io"
name = "snowbridge-system"
version = "0.1.1"
description = "Snowbridge System"
authors = ["Snowfork <[email protected]>"]
edition = "2021"
license = "MIT-0"
publish = false
repository = "https://github.com/substrate-developer-hub/substrate-node-template/"
repository = "https://github.com/Snowfork/snowbridge"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "snowbridge-control-runtime-api"
name = "snowbridge-system-runtime-api"
version = "0.1.0"
edition = "2021"
authors = ["Snowfork <[email protected]>"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]>
use crate as snowbridge_control;
use crate as snowbridge_system;
use frame_support::{
parameter_types,
traits::{tokens::fungible::Mutate, ConstU128, ConstU16, ConstU64, ConstU8},
Expand Down Expand Up @@ -91,7 +91,7 @@ frame_support::construct_runtime!(
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
XcmOrigin: pallet_xcm_origin::{Pallet, Origin},
OutboundQueue: snowbridge_outbound_queue::{Pallet, Call, Storage, Event<T>},
EthereumControl: snowbridge_control,
EthereumSystem: snowbridge_system,
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>}
}
);
Expand Down Expand Up @@ -176,7 +176,7 @@ impl snowbridge_outbound_queue::Config for Test {
type MaxMessagesPerBlock = MaxMessagesPerBlock;
type GasMeter = ConstantGasMeter;
type Balance = u128;
type PricingParameters = EthereumControl;
type PricingParameters = EthereumSystem;
type WeightToFee = IdentityFee<u128>;
type WeightInfo = ();
}
Expand Down Expand Up @@ -263,6 +263,6 @@ pub fn make_xcm_origin(location: MultiLocation) -> RuntimeOrigin {
}

pub fn make_agent_id(location: MultiLocation) -> AgentId {
<Test as snowbridge_control::Config>::AgentIdOf::convert_location(&location)
<Test as snowbridge_system::Config>::AgentIdOf::convert_location(&location)
.expect("convert location")
}
Loading
Loading