Erc20Peg pallet
Derived from live runtime metadata on TRN root (pallet index 29, captured 2026-05-02). For prose-style documentation see Erc20Peg on the curated reference side.
- Pallet index
29- Calls
- 11
- Events
- 16
- Errors
- 10
- Storage items
- 14
- Constants
- 4
Calls (extrinsics)
Erc20Peg.activate_deposits
See [
Pallet::activate_deposits].
api.tx.erc20Peg.activate_deposits(activate: bool)| Argument | Type | Doc |
|---|---|---|
activate | bool | bool |
Call index: 0
Erc20Peg.activate_withdrawals
See [
Pallet::activate_withdrawals].
api.tx.erc20Peg.activate_withdrawals(activate: bool)| Argument | Type | Doc |
|---|---|---|
activate | bool | bool |
Call index: 1
Erc20Peg.activate_deposits_delay
See [
Pallet::activate_deposits_delay].
api.tx.erc20Peg.activate_deposits_delay(activate: bool)| Argument | Type | Doc |
|---|---|---|
activate | bool | bool |
Call index: 2
Erc20Peg.activate_withdrawals_delay
See [
Pallet::activate_withdrawals_delay].
api.tx.erc20Peg.activate_withdrawals_delay(activate: bool)| Argument | Type | Doc |
|---|---|---|
activate | bool | bool |
Call index: 3
Erc20Peg.withdraw
See [
Pallet::withdraw].
api.tx.erc20Peg.withdraw(asset_id: u32, amount: u128, beneficiary: H160)| Argument | Type | Doc |
|---|---|---|
asset_id | u32 | AssetId |
amount | u128 | Balance |
beneficiary | H160 | EthAddress |
Call index: 4
Erc20Peg.set_erc20_peg_address
See [
Pallet::set_erc20_peg_address].
api.tx.erc20Peg.set_erc20_peg_address(eth_address: H160)| Argument | Type | Doc |
|---|---|---|
eth_address | H160 | EthAddress |
Call index: 5
Erc20Peg.set_root_peg_address
See [
Pallet::set_root_peg_address].
api.tx.erc20Peg.set_root_peg_address(eth_address: H160)| Argument | Type | Doc |
|---|---|---|
eth_address | H160 | EthAddress |
Call index: 6
Erc20Peg.set_erc20_meta
See [
Pallet::set_erc20_meta].
api.tx.erc20Peg.set_erc20_meta(details: Vec<(H160,Bytes,u8)>)| Argument | Type | Doc |
|---|---|---|
details | Vec<(H160,Bytes,u8)> | Vec<(EthAddress, BoundedVec<u8, T::StringLimit>, u8)> |
Call index: 7
Erc20Peg.set_erc20_asset_map
See [
Pallet::set_erc20_asset_map].
api.tx.erc20Peg.set_erc20_asset_map(asset_id: u32, eth_address: H160)| Argument | Type | Doc |
|---|---|---|
asset_id | u32 | AssetId |
eth_address | H160 | EthAddress |
Call index: 8
Erc20Peg.set_payment_delay
See [
Pallet::set_payment_delay].
api.tx.erc20Peg.set_payment_delay(asset_id: u32, min_balance: u128, delay: u32)| Argument | Type | Doc |
|---|---|---|
asset_id | u32 | AssetId |
min_balance | u128 | Balance |
delay | u32 | BlockNumberFor<T> |
Call index: 9
Erc20Peg.claim_delayed_payment
See [
Pallet::claim_delayed_payment].
api.tx.erc20Peg.claim_delayed_payment(block_number: u32, payment_id: u64)| Argument | Type | Doc |
|---|---|---|
block_number | u32 | BlockNumberFor<T> |
payment_id | u64 | DelayedPaymentId |
Call index: 10
Events
Erc20Peg.Erc20DepositDelayed
An erc20 deposit has been delayed.
| Field | Type | Doc |
|---|---|---|
payment_id | u64 | |
scheduled_block | u32 | |
amount | u128 | |
beneficiary | [u8;20] | |
asset_id | u32 |
Erc20Peg.Erc20WithdrawalDelayed
A withdrawal has been delayed.
| Field | Type | Doc |
|---|---|---|
payment_id | u64 | |
scheduled_block | u32 | |
amount | u128 | |
beneficiary | H160 | |
asset_id | u32 | |
source | [u8;20] |
Erc20Peg.Erc20DelayFailed
An ERC20 delay has failed due to storage bounds.
| Field | Type | Doc |
|---|---|---|
payment_id | u64 | |
scheduled_block | u32 | |
asset_id | u32 | |
source | [u8;20] |
Erc20Peg.DelayedErc20DepositFailed
A delayed erc20 deposit has failed.
| Field | Type | Doc |
|---|---|---|
payment_id | u64 | |
beneficiary | [u8;20] |
Erc20Peg.DelayedErc20WithdrawalFailed
A delayed erc20 withdrawal has failed.
| Field | Type | Doc |
|---|---|---|
asset_id | u32 | |
beneficiary | H160 |
Erc20Peg.Erc20Deposit
A bridged erc20 deposit succeeded.
| Field | Type | Doc |
|---|---|---|
asset_id | u32 | |
amount | u128 | |
beneficiary | [u8;20] |
Erc20Peg.Erc20Withdraw
Tokens were burnt for withdrawal on Ethereum as ERC20s
| Field | Type | Doc |
|---|---|---|
asset_id | u32 | |
amount | u128 | |
beneficiary | H160 | |
source | [u8;20] |
Erc20Peg.Erc20DepositFail
A bridged erc20 deposit failed.
| Field | Type | Doc |
|---|---|---|
source | H160 | |
abi_data | Bytes |
Erc20Peg.SetContractAddress
The peg contract address has been set.
| Field | Type | Doc |
|---|---|---|
address | H160 |
Erc20Peg.SetRootPegContract
The ROOT peg contract address has been set.
| Field | Type | Doc |
|---|---|---|
address | H160 |
Erc20Peg.PaymentDelaySet
A delay was added for an asset_id.
| Field | Type | Doc |
|---|---|---|
asset_id | u32 | |
min_balance | u128 | |
delay | u32 |
Erc20Peg.NoAvailableDelayedPaymentIds
There are no more payment ids available, they've been exhausted.
No payload.
Erc20Peg.ActivateDepositDelay
Toggle deposit delay.
| Field | Type | Doc |
|---|---|---|
active | bool |
Erc20Peg.ActivateWithdrawalDelay
Toggle withdrawal delay.
| Field | Type | Doc |
|---|---|---|
active | bool |
Erc20Peg.ActivateDeposits
Toggle deposits.
| Field | Type | Doc |
|---|---|---|
active | bool |
Erc20Peg.ActivateWithdrawals
Toggle withdrawals.
| Field | Type | Doc |
|---|---|---|
active | bool |
Errors
Erc20Peg.CreateAssetFailed
Could not create the bridged asset
Erc20Peg.InvalidAmount
Deposit has bad amount
Erc20Peg.InvalidPalletId
Could not convert pallet id to account
Erc20Peg.InvalidSourceAddress
The peg source address is incorrect for the token being bridged
Erc20Peg.DepositsPaused
Deposits are inactive
Erc20Peg.WithdrawalsPaused
Withdrawals are inactive
Erc20Peg.UnsupportedAsset
Withdrawals of this asset are not supported
Erc20Peg.EvmWithdrawalFailed
Withdrawals over the set payment delay for EVM calls are disabled
Erc20Peg.InvalidAbiEncoding
The abi received does not match the encoding scheme
Erc20Peg.PaymentIdNotFound
Supplied payment id not in storage
Storage
Erc20Peg.DepositsActive
Whether deposit are active
await api.query.erc20Peg.depositsActive()Returns: bool
Modifier: Default
Erc20Peg.WithdrawalsActive
Whether withdrawals are active
await api.query.erc20Peg.withdrawalsActive()Returns: bool
Modifier: Default
Erc20Peg.DepositsDelayActive
Whether deposit delays are active, default is set to true
await api.query.erc20Peg.depositsDelayActive()Returns: bool
Modifier: Default
Erc20Peg.WithdrawalsDelayActive
Whether withdrawals delays are active, default is set to true
await api.query.erc20Peg.withdrawalsDelayActive()Returns: bool
Modifier: Default
Erc20Peg.Erc20ToAssetId
Map ERC20 address to GA asset Id
await api.query.erc20Peg.erc20ToAssetId(key1)- Key:
H160(hasher: Twox64Concat) - Returns:
u32
Modifier: Optional
Erc20Peg.AssetIdToErc20
Map GA asset Id to ERC20 address
await api.query.erc20Peg.assetIdToErc20(key1)- Key:
u32(hasher: Twox64Concat) - Returns:
H160
Modifier: Optional
Erc20Peg.Erc20Meta
Metadata for well-known erc20 tokens (symbol, decimals)
await api.query.erc20Peg.erc20Meta(key1)- Key:
H160(hasher: Twox64Concat) - Returns:
(Bytes,u8)
Modifier: Optional
Erc20Peg.PaymentDelay
Map from asset_id to minimum amount and delay
await api.query.erc20Peg.paymentDelay(key1)- Key:
u32(hasher: Twox64Concat) - Returns:
(u128,u32)
Modifier: Optional
Erc20Peg.DelayedPayments
Map from DelayedPaymentId to PendingPayment
await api.query.erc20Peg.delayedPayments(key1)- Key:
u64(hasher: Twox64Concat) - Returns:
{"_enum":{"Deposit":"PalletErc20PegErc20DepositEvent","Withdrawal":"(SeedPrimitivesSignatureAccountId20,PalletErc20PegWithdrawMessage)"}}
Modifier: Optional
Erc20Peg.DelayedPaymentSchedule
Map from block number to DelayedPaymentIds scheduled for that block
await api.query.erc20Peg.delayedPaymentSchedule(key1)- Key:
u32(hasher: Twox64Concat) - Returns:
Vec<u64>
Modifier: Default
Erc20Peg.ReadyBlocks
The blocks with payments that are ready to be processed
await api.query.erc20Peg.readyBlocks()Returns: Vec<u32>
Modifier: Default
Erc20Peg.NextDelayedPaymentId
The next available payment id for withdrawals and deposits
await api.query.erc20Peg.nextDelayedPaymentId()Returns: u64
Modifier: Default
Erc20Peg.ContractAddress
The peg contract address on Ethereum
await api.query.erc20Peg.contractAddress()Returns: H160
Modifier: Default
Erc20Peg.RootPegContractAddress
The ROOT peg contract address on Ethereum
await api.query.erc20Peg.rootPegContractAddress()Returns: H160
Modifier: Default
Constants
Erc20Peg.NativeAssetId
The native token asset Id (managed by pallet-balances)
Type: u32
SCALE-encoded value: 0x01000000
Erc20Peg.StringLimit
The maximum length of an ERC20 token symbol
Type: u32
SCALE-encoded value: 0x32000000
Erc20Peg.MaxDelaysPerBlock
The maximum number of delayed payments allowed per block
Type: u32
SCALE-encoded value: 0xf4010000
Erc20Peg.MaxReadyBlocks
The maximum number of ready blocks allowed per storage
Type: u32
SCALE-encoded value: 0xa0860100
wss://root.rootnet.live/archive/ws · captured 2026-05-02