CallIndicesLookup class

Helper to look up pallet and call indices from chain metadata.

This utility class provides convenient methods for resolving pallet and call indices needed when constructing RuntimeCall objects.

Example:

final lookup = CallIndicesLookup(chainInfo);
final indices = lookup.getPalletAndCallIndex(
  palletName: 'Balances',
  callName: 'transfer_keep_alive',
);
print('Pallet: ${indices.palletIndex}, Call: ${indices.callIndex}');

Constructors

CallIndicesLookup(ChainInfo chainInfo)
const

Properties

chainInfo → ChainInfo
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

getCallIndex(String palletName, String callName) → int
Get the call index for a specific call within a pallet.
getPalletAndCallIndex({required String palletName, required String callName}) → ({int callIndex, int palletIndex})
Get both pallet and call indices in a single lookup.
getPalletIndex(String palletName) → int
Get the pallet index by name.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited