Erc20Peg
Calls
activateDeposits
Activate/deactivate deposits (root only)
Namespace
api.tx.erc20Peg.activateDepositsType
function activateDeposits(
activate: bool
)activateWithdrawals
Activate/deactivate withdrawals (root only)
Namespace
api.tx.erc20Peg.activateWithdrawalsType
function activateWithdrawals(
activate: bool
)setErc20AssetMap
Namespace
api.tx.erc20Peg.setErc20AssetMapType
function setErc20AssetMap(
asset_id: u32,
eth_address: H160
)setErc20Meta
Namespace
api.tx.erc20Peg.setErc20MetaType
function setErc20Meta(
details: Vec<(H160,Bytes,u8)>
)setErc20PegAddress
Namespace
api.tx.erc20Peg.setErc20PegAddressType
function setErc20PegAddress(
eth_address: H160
)setPaymentDelay
Namespace
api.tx.erc20Peg.setPaymentDelayType
function setPaymentDelay(
asset_id: u32,
min_balance: u128,
delay: u32
)setRootPegAddress
Namespace
api.tx.erc20Peg.setRootPegAddressType
function setRootPegAddress(
eth_address: H160
)withdraw
Namespace
api.tx.erc20Peg.withdrawType
function withdraw(
asset_id: u32,
amount: u128,
beneficiary: H160
)Storage
assetIdToErc20
Map GA asset Id to ERC20 address
Namespace
api.query.erc20Peg.assetIdToErc20Type
function assetIdToErc20(
u32
): Option<H160>contractAddress
The peg contract address on Ethereum
Namespace
api.query.erc20Peg.contractAddressType
function contractAddress(
): H160delayedPayments
Map from DelayedPaymentId to PendingPayment
Namespace
api.query.erc20Peg.delayedPaymentsType
function delayedPayments(
u64
): Option<PalletErc20PegPendingPayment>delayedPaymentSchedule
Map from block number to DelayedPaymentIds scheduled for that block
Namespace
api.query.erc20Peg.delayedPaymentScheduleType
function delayedPaymentSchedule(
u32
): Vec<u64>depositsActive
Whether deposit are active
Namespace
api.query.erc20Peg.depositsActiveType
function depositsActive(
): boolerc20Meta
Metadata for well-known erc20 tokens (symbol, decimals)
Namespace
api.query.erc20Peg.erc20MetaType
function erc20Meta(
H160
): Option<(Bytes,u8)>erc20ToAssetId
Map ERC20 address to GA asset Id
Namespace
api.query.erc20Peg.erc20ToAssetIdType
function erc20ToAssetId(
H160
): Option<u32>nextDelayedPaymentId
The next available payment id for withdrawals and deposits
Namespace
api.query.erc20Peg.nextDelayedPaymentIdType
function nextDelayedPaymentId(
): u64paymentDelay
Map from asset_id to minimum amount and delay
Namespace
api.query.erc20Peg.paymentDelayType
function paymentDelay(
u32
): Option<(u128,u32)>readyBlocks
The blocks with payments that are ready to be processed
Namespace
api.query.erc20Peg.readyBlocksType
function readyBlocks(
): Vec<u32>rootPegContractAddress
The ROOT peg contract address on Ethereum
Namespace
api.query.erc20Peg.rootPegContractAddressType
function rootPegContractAddress(
): H160withdrawalsActive
Whether withdrawals are active
Namespace
api.query.erc20Peg.withdrawalsActiveType
function withdrawalsActive(
): boolEvents
DelayedErc20DepositFailed
A delayed erc20 deposit has failed (payment_id, beneficiary)
Namespace
api.events.erc20Peg.DelayedErc20DepositFailedType
type DelayedErc20DepositFailed = {
param0: u64,
param1: SeedPrimitivesSignatureAccountId20
}DelayedErc20WithdrawalFailed
A delayed erc20 withdrawal has failed (asset_id, beneficiary)
Namespace
api.events.erc20Peg.DelayedErc20WithdrawalFailedType
type DelayedErc20WithdrawalFailed = {
param0: u32,
param1: H160
}Erc20Deposit
A bridged erc20 deposit succeeded. (asset, amount, beneficiary)
Namespace
api.events.erc20Peg.Erc20DepositType
type Erc20Deposit = {
param0: u32,
param1: u128,
param2: SeedPrimitivesSignatureAccountId20
}Erc20DepositDelayed
An erc20 deposit has been delayed.(payment_id, scheduled block, amount, beneficiary)
Namespace
api.events.erc20Peg.Erc20DepositDelayedType
type Erc20DepositDelayed = {
param0: u64,
param1: u32,
param2: u128,
param3: SeedPrimitivesSignatureAccountId20
}Erc20DepositFail
A bridged erc20 deposit failed. (source address, abi data)
Namespace
api.events.erc20Peg.Erc20DepositFailType
type Erc20DepositFail = {
param0: H160,
param1: Bytes
}Erc20Withdraw
Tokens were burnt for withdrawal on Ethereum as ERC20s (asset, amount, beneficiary)
Namespace
api.events.erc20Peg.Erc20WithdrawType
type Erc20Withdraw = {
param0: u32,
param1: u128,
param2: H160
}Erc20WithdrawalDelayed
A withdrawal has been delayed.(payment_id, scheduled block, amount, beneficiary)
Namespace
api.events.erc20Peg.Erc20WithdrawalDelayedType
type Erc20WithdrawalDelayed = {
param0: u64,
param1: u32,
param2: u128,
param3: H160
}NoAvailableDelayedPaymentIds
There are no more payment ids available, they've been exhausted
Namespace
api.events.erc20Peg.NoAvailableDelayedPaymentIdsType
type NoAvailableDelayedPaymentIds = {
}PaymentDelaySet
A delay was added for an asset_id (asset_id, min_balance, delay)
Namespace
api.events.erc20Peg.PaymentDelaySetType
type PaymentDelaySet = {
param0: u32,
param1: u128,
param2: u32
}SetContractAddress
The peg contract address has been set
Namespace
api.events.erc20Peg.SetContractAddressType
type SetContractAddress = {
param0: H160
}SetRootPegContract
The ROOT peg contract address has been set
Namespace
api.events.erc20Peg.SetRootPegContractType
type SetRootPegContract = {
param0: H160
}Errors
CreateAssetFailed
Could not create the bridged asset
Namespace
api.errors.erc20Peg.CreateAssetFailedDepositsPaused
Deposits are inactive
Namespace
api.errors.erc20Peg.DepositsPausedEvmWithdrawalFailed
Withdrawals over the set payment delay for EVM calls are disabled
Namespace
api.errors.erc20Peg.EvmWithdrawalFailedInvalidAbiEncoding
The abi received does not match the encoding scheme
Namespace
api.errors.erc20Peg.InvalidAbiEncodingInvalidAmount
Deposit has bad amount
Namespace
api.errors.erc20Peg.InvalidAmountInvalidPalletId
Could not convert pallet id to account
Namespace
api.errors.erc20Peg.InvalidPalletIdInvalidSourceAddress
The peg source address is incorrect for the token being bridged
Namespace
api.errors.erc20Peg.InvalidSourceAddressUnsupportedAsset
Withdrawals of this asset are not supported
Namespace
api.errors.erc20Peg.UnsupportedAssetWithdrawalsPaused
Withdrawals are inactive
Namespace
api.errors.erc20Peg.WithdrawalsPausedundefined