Skip to content

Commit df7d606

Browse files
committed
make origin configurable
1 parent 6d6713f commit df7d606

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

frame/ethereum/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ use frame_support::{
4747
weights::{DispatchInfo, Pays, PostDispatchInfo, Weight},
4848
};
4949
use frame_system::{pallet_prelude::OriginFor, CheckWeight, WeightInfo};
50-
use pallet_evm::{BlockHashMapping, EnsureAddressOrigin, FeeCalculator, GasWeightMapping, Runner};
50+
use pallet_evm::{BlockHashMapping, FeeCalculator, GasWeightMapping, Runner};
5151
use sha3::{Digest, Keccak256};
5252
use sp_runtime::{
5353
generic::DigestItem,
@@ -239,7 +239,7 @@ pub mod pallet {
239239
/// How Ethereum state root is calculated.
240240
type StateRoot: Get<H256>;
241241
/// Origin for xcm transact
242-
type XcmTransactOrigin: EnsureAddressOrigin<Self::Origin>;
242+
type XcmEthereumOrigin: EnsureOrigin<Self::Origin>;
243243
}
244244

245245
#[pallet::pallet]

frame/ethereum/src/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ impl pallet_evm::Config for Test {
174174
impl crate::Config for Test {
175175
type Event = Event;
176176
type StateRoot = IntermediateStateRoot<Self>;
177-
type XcmTransactOrigin = pallet_evm::EnsureAddressTruncated;
177+
type XcmEthereumOrigin = crate::EnsureXcmEthereumTransaction;
178178
}
179179

180180
impl fp_self_contained::SelfContainedCall for Call {

template/runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ impl pallet_evm::Config for Runtime {
347347
impl pallet_ethereum::Config for Runtime {
348348
type Event = Event;
349349
type StateRoot = pallet_ethereum::IntermediateStateRoot<Self>;
350-
type XcmTransactOrigin = pallet_evm::EnsureAddressTruncated;
350+
type XcmEthereumOrigin = pallet_ethereum::EnsureXcmEthereumTransaction;
351351
}
352352

353353
frame_support::parameter_types! {

0 commit comments

Comments
 (0)