Skip to content

Commit

Permalink
resolve merging issues
Browse files Browse the repository at this point in the history
  • Loading branch information
breathx committed Aug 11, 2024
1 parent 4596f46 commit e4614f6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 0 additions & 2 deletions pallets/gear-eth-bridge/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ impl<T: Config> BuiltinActor for Actor<T>
where
T::AccountId: Origin,
{
const ID: u64 = 3;

type Error = BuiltinActorError;

fn handle(dispatch: &StoredDispatch, gas_limit: u64) -> (Result<Payload, Self::Error>, u64) {
Expand Down
5 changes: 4 additions & 1 deletion pallets/gear-eth-bridge/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use frame_support::{
use frame_support_test::TestRandomness;
use frame_system::{self as system, pallet_prelude::BlockNumberFor};
use gprimitives::ActorId;
use pallet_gear_builtin::ActorWithId;
use pallet_session::{SessionManager, ShouldEndSession};
use sp_core::{ed25519::Public, H256};
use sp_runtime::{
Expand Down Expand Up @@ -172,9 +173,11 @@ pallet_gear::impl_config!(
BuiltinDispatcherFactory = GearBuiltin,
);

pub const BUILTIN_ID: u64 = 1;

impl pallet_gear_builtin::Config for Test {
type RuntimeCall = RuntimeCall;
type Builtins = (crate::builtin::Actor<Test>,);
type Builtins = (ActorWithId<BUILTIN_ID, crate::builtin::Actor<Test>>,);
type WeightInfo = ();
}

Expand Down
3 changes: 1 addition & 2 deletions pallets/gear-eth-bridge/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,9 @@ mod utils {
use crate::builtin;
use gear_core::message::UserMessage;
use gprimitives::{ActorId, MessageId};
use pallet_gear_builtin::BuiltinActor;

pub(crate) fn builtin_id() -> ActorId {
GearBuiltin::generate_actor_id(builtin::Actor::<Test>::ID)
GearBuiltin::generate_actor_id(BUILTIN_ID)
}

#[track_caller]
Expand Down
6 changes: 3 additions & 3 deletions runtime/vara/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1180,9 +1180,9 @@ pub type BuiltinActors = (
/// Builtin actors arranged in a tuple.
#[cfg(feature = "dev")]
pub type BuiltinActors = (
pallet_gear_builtin::bls12_381::Actor<Runtime>,
pallet_gear_builtin::staking::Actor<Runtime>,
pallet_gear_eth_bridge::Actor<Runtime>,
ActorWithId<1, pallet_gear_builtin::bls12_381::Actor<Runtime>>,
ActorWithId<2, pallet_gear_builtin::staking::Actor<Runtime>>,
ActorWithId<3, pallet_gear_eth_bridge::Actor<Runtime>>,
);

impl pallet_gear_builtin::Config for Runtime {
Expand Down

0 comments on commit e4614f6

Please sign in to comment.