From 2d6056c355e81d518a3a53b548f162777e222208 Mon Sep 17 00:00:00 2001 From: cdamian <17934949+cdamian@users.noreply.github.com> Date: Tue, 18 Jul 2023 11:40:08 +0300 Subject: [PATCH] connectors-gateway: Rename LocalOrigin to LocalEVMOrigin --- pallets/connectors-gateway/src/lib.rs | 4 ++-- pallets/connectors-gateway/src/mock.rs | 2 +- runtime/development/src/connectors.rs | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pallets/connectors-gateway/src/lib.rs b/pallets/connectors-gateway/src/lib.rs index 20cef49fc9..e9b7f84d2b 100644 --- a/pallets/connectors-gateway/src/lib.rs +++ b/pallets/connectors-gateway/src/lib.rs @@ -56,7 +56,7 @@ pub mod pallet { /// The LocalOrigin ensures that some calls can only be performed from a /// local context i.e. a different pallet. - type LocalOrigin: EnsureOrigin< + type LocalEVMOrigin: EnsureOrigin< ::RuntimeOrigin, Success = DomainAddress, >; @@ -226,7 +226,7 @@ pub mod pallet { origin: OriginFor, msg: BoundedVec, ) -> DispatchResult { - let domain_address = T::LocalOrigin::ensure_origin(origin)?; + let domain_address = T::LocalEVMOrigin::ensure_origin(origin)?; match domain_address { DomainAddress::EVM(_, _) => { diff --git a/pallets/connectors-gateway/src/mock.rs b/pallets/connectors-gateway/src/mock.rs index d6ae3f731f..f302652309 100644 --- a/pallets/connectors-gateway/src/mock.rs +++ b/pallets/connectors-gateway/src/mock.rs @@ -81,7 +81,7 @@ impl pallet_mock_routers::Config for Runtime {} impl pallet_connectors_gateway::Config for Runtime { type AdminOrigin = EnsureRoot; type InboundQueue = MockConnectors; - type LocalOrigin = EnsureLocal; + type LocalEVMOrigin = EnsureLocal; type MaxIncomingMessageSize = MaxIncomingMessageSize; type Message = MessageMock; type Router = RouterMock; diff --git a/runtime/development/src/connectors.rs b/runtime/development/src/connectors.rs index e0174a355a..70eecc69ba 100644 --- a/runtime/development/src/connectors.rs +++ b/runtime/development/src/connectors.rs @@ -22,14 +22,13 @@ use crate::Connectors; type ConnectorsMessage = pallet_connectors::Message; parameter_types! { - // TODO(cdamian): Double-check these. pub const MaxIncomingMessageSize: u32 = 1024; } impl pallet_connectors_gateway::Config for Runtime { type AdminOrigin = EnsureRoot; type InboundQueue = Connectors; - type LocalOrigin = pallet_connectors_gateway::EnsureLocal; + type LocalEVMOrigin = pallet_connectors_gateway::EnsureLocal; type MaxIncomingMessageSize = MaxIncomingMessageSize; type Message = ConnectorsMessage; type Router = DummyRouter;