Skip to content

XcmInterface


Calls


transfer_statemine_assets

See [Pallet::transfer_statemine_assets].

Attributes

Name Type
amount BalanceOf<T>
asset_id u32
dest Option<AccountIdOf<T>>

Python

call = substrate.compose_call(
    'XcmInterface', 'transfer_statemine_assets', {
    'amount': 'u128',
    'asset_id': 'u32',
    'dest': (None, 'AccountId'),
}
)

update_xcm_dest_weight_and_fee

See [Pallet::update_xcm_dest_weight_and_fee].

Attributes

Name Type
updates Vec<(CurrencyIdOf<T>, XcmOperationType, Weight, BalanceOf<T>)>

Python

call = substrate.compose_call(
    'XcmInterface', 'update_xcm_dest_weight_and_fee', {
    'updates': [
        (
            {
                'BLP': 'u32',
                'ForeignAsset': 'u32',
                'LPToken': (
                    (
                        'ASG',
                        'BNC',
                        'KUSD',
                        'DOT',
                        'KSM',
                        'ETH',
                        'KAR',
                        'ZLK',
                        'PHA',
                        'RMRK',
                        'MOVR',
                    ),
                    'u8',
                    (
                        'ASG',
                        'BNC',
                        'KUSD',
                        'DOT',
                        'KSM',
                        'ETH',
                        'KAR',
                        'ZLK',
                        'PHA',
                        'RMRK',
                        'MOVR',
                    ),
                    'u8',
                ),
                'Lend': 'u8',
                'Native': (
                    'ASG',
                    'BNC',
                    'KUSD',
                    'DOT',
                    'KSM',
                    'ETH',
                    'KAR',
                    'ZLK',
                    'PHA',
                    'RMRK',
                    'MOVR',
                ),
                'Stable': (
                    'ASG',
                    'BNC',
                    'KUSD',
                    'DOT',
                    'KSM',
                    'ETH',
                    'KAR',
                    'ZLK',
                    'PHA',
                    'RMRK',
                    'MOVR',
                ),
                'StableLpToken': 'u32',
                'Token': (
                    'ASG',
                    'BNC',
                    'KUSD',
                    'DOT',
                    'KSM',
                    'ETH',
                    'KAR',
                    'ZLK',
                    'PHA',
                    'RMRK',
                    'MOVR',
                ),
                'Token2': 'u8',
                'VSBond': (
                    (
                        'ASG',
                        'BNC',
                        'KUSD',
                        'DOT',
                        'KSM',
                        'ETH',
                        'KAR',
                        'ZLK',
                        'PHA',
                        'RMRK',
                        'MOVR',
                    ),
                    'u32',
                    'u32',
                    'u32',
                ),
                'VSBond2': (
                    'u8',
                    'u32',
                    'u32',
                    'u32',
                ),
                'VSToken': (
                    'ASG',
                    'BNC',
                    'KUSD',
                    'DOT',
                    'KSM',
                    'ETH',
                    'KAR',
                    'ZLK',
                    'PHA',
                    'RMRK',
                    'MOVR',
                ),
                'VSToken2': 'u8',
                'VToken': (
                    'ASG',
                    'BNC',
                    'KUSD',
                    'DOT',
                    'KSM',
                    'ETH',
                    'KAR',
                    'ZLK',
                    'PHA',
                    'RMRK',
                    'MOVR',
                ),
                'VToken2': 'u8',
            },
            (
                'UmpContributeTransact',
                'StatemineTransfer',
                'Bond',
                'WithdrawUnbonded',
                'BondExtra',
                'Unbond',
                'Rebond',
                'Delegate',
                'Payout',
                'Liquidize',
                'TransferBack',
                'TransferTo',
                'Chill',
                'Undelegate',
                'CancelLeave',
                'XtokensTransferBack',
                'ExecuteLeave',
                'ConvertAsset',
                'Vote',
                'RemoveVote',
                'Any',
            ),
            {
                'proof_size': 'u64',
                'ref_time': 'u64',
            },
            'u128',
        ),
    ],
}
)

Events


TransferredStatemineMultiAsset

Attributes

Name Type Composition
None AccountIdOf<T> AccountId
None BalanceOf<T> u128

XcmDestWeightAndFeeUpdated

Attributes

Name Type Composition
None XcmOperationType ('UmpContributeTransact', 'StatemineTransfer', 'Bond', 'WithdrawUnbonded', 'BondExtra', 'Unbond', 'Rebond', 'Delegate', 'Payout', 'Liquidize', 'TransferBack', 'TransferTo', 'Chill', 'Undelegate', 'CancelLeave', 'XtokensTransferBack', 'ExecuteLeave', 'ConvertAsset', 'Vote', 'RemoveVote', 'Any')
None CurrencyIdOf<T> {'Native': ('ASG', 'BNC', 'KUSD', 'DOT', 'KSM', 'ETH', 'KAR', 'ZLK', 'PHA', 'RMRK', 'MOVR'), 'VToken': ('ASG', 'BNC', 'KUSD', 'DOT', 'KSM', 'ETH', 'KAR', 'ZLK', 'PHA', 'RMRK', 'MOVR'), 'Token': ('ASG', 'BNC', 'KUSD', 'DOT', 'KSM', 'ETH', 'KAR', 'ZLK', 'PHA', 'RMRK', 'MOVR'), 'Stable': ('ASG', 'BNC', 'KUSD', 'DOT', 'KSM', 'ETH', 'KAR', 'ZLK', 'PHA', 'RMRK', 'MOVR'), 'VSToken': ('ASG', 'BNC', 'KUSD', 'DOT', 'KSM', 'ETH', 'KAR', 'ZLK', 'PHA', 'RMRK', 'MOVR'), 'VSBond': (('ASG', 'BNC', 'KUSD', 'DOT', 'KSM', 'ETH', 'KAR', 'ZLK', 'PHA', 'RMRK', 'MOVR'), 'u32', 'u32', 'u32'), 'LPToken': (('ASG', 'BNC', 'KUSD', 'DOT', 'KSM', 'ETH', 'KAR', 'ZLK', 'PHA', 'RMRK', 'MOVR'), 'u8', ('ASG', 'BNC', 'KUSD', 'DOT', 'KSM', 'ETH', 'KAR', 'ZLK', 'PHA', 'RMRK', 'MOVR'), 'u8'), 'ForeignAsset': 'u32', 'Token2': 'u8', 'VToken2': 'u8', 'VSToken2': 'u8', 'VSBond2': ('u8', 'u32', 'u32', 'u32'), 'StableLpToken': 'u32', 'BLP': 'u32', 'Lend': 'u8'}
None Weight {'ref_time': 'u64', 'proof_size': 'u64'}
None BalanceOf<T> u128

Storage functions


CurrentNonce

Python

result = substrate.query(
    'XcmInterface', 'CurrentNonce', ['u32']
)

Return value

'u32'

XcmWeightAndFee

The dest weight limit and fee for execution XCM msg sent by XcmInterface. Must be sufficient, otherwise the execution of XCM msg on relaychain will fail.

XcmWeightAndFee: map: XcmOperationType => (Weight, Balance)

Python

result = substrate.query(
    'XcmInterface', 'XcmWeightAndFee', [
    {
        'BLP': 'u32',
        'ForeignAsset': 'u32',
        'LPToken': (
            (
                'ASG',
                'BNC',
                'KUSD',
                'DOT',
                'KSM',
                'ETH',
                'KAR',
                'ZLK',
                'PHA',
                'RMRK',
                'MOVR',
            ),
            'u8',
            (
                'ASG',
                'BNC',
                'KUSD',
                'DOT',
                'KSM',
                'ETH',
                'KAR',
                'ZLK',
                'PHA',
                'RMRK',
                'MOVR',
            ),
            'u8',
        ),
        'Lend': 'u8',
        'Native': (
            'ASG',
            'BNC',
            'KUSD',
            'DOT',
            'KSM',
            'ETH',
            'KAR',
            'ZLK',
            'PHA',
            'RMRK',
            'MOVR',
        ),
        'Stable': (
            'ASG',
            'BNC',
            'KUSD',
            'DOT',
            'KSM',
            'ETH',
            'KAR',
            'ZLK',
            'PHA',
            'RMRK',
            'MOVR',
        ),
        'StableLpToken': 'u32',
        'Token': (
            'ASG',
            'BNC',
            'KUSD',
            'DOT',
            'KSM',
            'ETH',
            'KAR',
            'ZLK',
            'PHA',
            'RMRK',
            'MOVR',
        ),
        'Token2': 'u8',
        'VSBond': (
            (
                'ASG',
                'BNC',
                'KUSD',
                'DOT',
                'KSM',
                'ETH',
                'KAR',
                'ZLK',
                'PHA',
                'RMRK',
                'MOVR',
            ),
            'u32',
            'u32',
            'u32',
        ),
        'VSBond2': (
            'u8',
            'u32',
            'u32',
            'u32',
        ),
        'VSToken': (
            'ASG',
            'BNC',
            'KUSD',
            'DOT',
            'KSM',
            'ETH',
            'KAR',
            'ZLK',
            'PHA',
            'RMRK',
            'MOVR',
        ),
        'VSToken2': 'u8',
        'VToken': (
            'ASG',
            'BNC',
            'KUSD',
            'DOT',
            'KSM',
            'ETH',
            'KAR',
            'ZLK',
            'PHA',
            'RMRK',
            'MOVR',
        ),
        'VToken2': 'u8',
    },
    (
        'UmpContributeTransact',
        'StatemineTransfer',
        'Bond',
        'WithdrawUnbonded',
        'BondExtra',
        'Unbond',
        'Rebond',
        'Delegate',
        'Payout',
        'Liquidize',
        'TransferBack',
        'TransferTo',
        'Chill',
        'Undelegate',
        'CancelLeave',
        'XtokensTransferBack',
        'ExecuteLeave',
        'ConvertAsset',
        'Vote',
        'RemoveVote',
        'Any',
    ),
]
)

Return value

({'proof_size': 'u64', 'ref_time': 'u64'}, 'u128')

Constants


CallBackTimeOut

Value

10

Python

constant = substrate.get_constant('XcmInterface', 'CallBackTimeOut')

ParachainId

Value

2001

Python

constant = substrate.get_constant('XcmInterface', 'ParachainId')

ParachainSovereignAccount

The account of parachain on the relaychain.

Value

'eGJrytyJYDzMGM1uji4Bx5ntw3xF6aifJ7Xvo3mE48cgW5N'

Python

constant = substrate.get_constant('XcmInterface', 'ParachainSovereignAccount')

RelayNetwork

Value

'Kusama'

Python

constant = substrate.get_constant('XcmInterface', 'RelayNetwork')

RelaychainCurrencyId

The currency id of the RelayChain

Value

{'Token': 'KSM'}

Python

constant = substrate.get_constant('XcmInterface', 'RelaychainCurrencyId')

Errors


FailToConvert


FeeConvertFailed


OperationWeightAndFeeNotExist


XcmExecutionFailed


XcmSendFailed