Skip to content

Commit

Permalink
Add indices for calls of ethereum-transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
thadouk committed Mar 3, 2023
1 parent 28bcad6 commit 3a23e6a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pallets/ethereum-transactions/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ pub mod pallet {
// finalized, and possible in a state where our governance is centralized.
// Suggestion: We can wrap it in a build configuration flag for conditional compilation, eg
// "allow-sudo-shortcuts"
#[pallet::call_index(0)]
#[pallet::weight(<T as pallet::Config>::WeightInfo::set_transaction_id())]
pub fn set_transaction_id(
origin: OriginFor<T>,
Expand All @@ -231,6 +232,7 @@ pub mod pallet {
Ok(())
}

#[pallet::call_index(1)]
#[pallet::weight(<T as pallet::Config>::WeightInfo::set_eth_tx_hash_for_dispatched_tx(MAX_VALIDATORS, MAX_TXS_PER_ACCOUNT))]
pub fn set_eth_tx_hash_for_dispatched_tx(
origin: OriginFor<T>,
Expand Down Expand Up @@ -273,6 +275,7 @@ pub mod pallet {
// See SYS-870 & SYS-855 for more information
/// Removes a reservation for a transaction that was created with reserve_transaction_id
/// Only sudo should call this to repair a network.
#[pallet::call_index(2)]
#[pallet::weight(<T as pallet::Config>::WeightInfo::unreserve_transaction())]
pub fn unreserve_transaction(
origin: OriginFor<T>,
Expand All @@ -291,6 +294,7 @@ pub mod pallet {
}

/// Sets the address for ethereum contracts
#[pallet::call_index(3)]
#[pallet::weight(<T as pallet::Config>::WeightInfo::set_publish_root_contract())]
pub fn set_publish_root_contract(
origin: OriginFor<T>,
Expand Down

0 comments on commit 3a23e6a

Please sign in to comment.