From 2cc60b37f0f6ba2e885e67903325e5362dfdb07c Mon Sep 17 00:00:00 2001 From: Thanos <56822898+thadouk@users.noreply.github.com> Date: Fri, 3 Mar 2023 12:03:24 +0000 Subject: [PATCH] Add indices for calls of ethereum-transactions See: - https://github.com/paritytech/substrate/pull/12891 - https://github.com/paritytech/substrate/pull/11381 --- pallets/ethereum-events/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pallets/ethereum-events/src/lib.rs b/pallets/ethereum-events/src/lib.rs index 09e39cb13..e61e2bb55 100644 --- a/pallets/ethereum-events/src/lib.rs +++ b/pallets/ethereum-events/src/lib.rs @@ -422,6 +422,7 @@ pub mod pallet { impl Pallet { /// This extrinsic is being deprecated. Use add_ethereum_log // We need to maintain this till SYS-888 is resolved. After that it can be removed. + #[pallet::call_index(0)] #[pallet::weight( ::WeightInfo::add_validator_log( MAX_NUMBER_OF_UNCHECKED_EVENTS, MAX_NUMBER_OF_EVENTS_PENDING_CHALLENGES @@ -436,6 +437,7 @@ pub mod pallet { /// This extrinsic is being deprecated. Use add_ethereum_log // We need to maintain this till SYS-888 is resolved. After that it can be removed. + #[pallet::call_index(1)] #[pallet::weight( ::WeightInfo::add_lift_log( MAX_NUMBER_OF_UNCHECKED_EVENTS, MAX_NUMBER_OF_EVENTS_PENDING_CHALLENGES @@ -448,6 +450,7 @@ pub mod pallet { return Self::add_event(ValidEvents::Lifted, tx_hash, account_id) } + #[pallet::call_index(2)] #[pallet::weight( ::WeightInfo::submit_checkevent_result( MAX_NUMBER_OF_VALIDATORS_ACCOUNTS, MAX_NUMBER_OF_UNCHECKED_EVENTS @@ -500,6 +503,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(3)] #[pallet::weight( ::WeightInfo::process_event_with_successful_challenge( MAX_NUMBER_OF_VALIDATORS_ACCOUNTS, MAX_NUMBER_OF_EVENTS_PENDING_CHALLENGES @@ -616,6 +620,7 @@ pub mod pallet { Ok(Some(final_weight).into()) } + #[pallet::call_index(4)] #[pallet::weight( ::WeightInfo::challenge_event( MAX_NUMBER_OF_VALIDATORS_ACCOUNTS, MAX_NUMBER_OF_EVENTS_PENDING_CHALLENGES, @@ -679,6 +684,7 @@ pub mod pallet { } /// Submits an ethereum transaction hash into the chain + #[pallet::call_index(5)] #[pallet::weight( ::WeightInfo::add_ethereum_log( MAX_NUMBER_OF_UNCHECKED_EVENTS, MAX_NUMBER_OF_EVENTS_PENDING_CHALLENGES @@ -696,6 +702,7 @@ pub mod pallet { } // # + #[pallet::call_index(6)] #[pallet::weight( ::WeightInfo::signed_add_ethereum_log( MAX_NUMBER_OF_UNCHECKED_EVENTS, MAX_NUMBER_OF_EVENTS_PENDING_CHALLENGES @@ -729,6 +736,7 @@ pub mod pallet { } /// Sets the address for ethereum contracts + #[pallet::call_index(7)] #[pallet::weight( ::WeightInfo::set_ethereum_contract_map_storage().max(::WeightInfo::set_ethereum_contract_storage() ))] @@ -751,6 +759,7 @@ pub mod pallet { Ok(()) } + #[pallet::call_index(8)] #[pallet::weight(::WeightInfo::set_event_challenge_period())] pub fn set_event_challenge_period( origin: OriginFor,