Skip to content

ArgoBridge


Calls


finalize_inbound_transfer

Attributes

Name Type
remote_transfer RemoteTransfer
dest_account T::AccountId
amount BalanceOf<T>

Python

call = substrate.compose_call(
    'ArgoBridge', 'finalize_inbound_transfer', {
    'amount': 'u128',
    'dest_account': 'AccountId',
    'remote_transfer': {
        'chain_id': 'u32',
        'id': 'u64',
    },
}
)

finish_unpause_bridge

Attributes

No attributes

Python

call = substrate.compose_call(
    'ArgoBridge', 'finish_unpause_bridge', {}
)

init_unpause_bridge

Attributes

No attributes

Python

call = substrate.compose_call(
    'ArgoBridge', 'init_unpause_bridge', {}
)

pause_bridge

Attributes

No attributes

Python

call = substrate.compose_call(
    'ArgoBridge', 'pause_bridge', {}
)

request_outbound_transfer

Attributes

Name Type
dest_account RemoteAccount
amount BalanceOf<T>
expected_fee BalanceOf<T>

Python

call = substrate.compose_call(
    'ArgoBridge', 'request_outbound_transfer', {
    'amount': 'u128',
    'dest_account': {
        'account': '[u8; 32]',
        'chain_id': 'u32',
    },
    'expected_fee': 'u128',
}
)

revert_outbound_transfer

Attributes

Name Type
transfer_id TransferId
revert_account T::AccountId
revert_amount BalanceOf<T>
rationale BoundedVec<u8, ConstU32<MAX_BYTES_RATIONALE>>

Python

call = substrate.compose_call(
    'ArgoBridge', 'revert_outbound_transfer', {
    'rationale': 'Bytes',
    'revert_account': 'AccountId',
    'revert_amount': 'u128',
    'transfer_id': 'u64',
}
)

update_bridge_constrains

Allow Governance to Set constraints Preconditions: - origin is signed by root PostConditions: - governance parameters storage value set to the provided values <weight>

## Weight O (1) # </weight>

Attributes

Name Type
parameters BridgeConstraintsOf<T>

Python

call = substrate.compose_call(
    'ArgoBridge', 'update_bridge_constrains', {
    'parameters': {
        'bridging_fee': (None, 'u128'),
        'operator_account': (
            None,
            'AccountId',
        ),
        'pauser_accounts': (
            None,
            ['AccountId'],
        ),
        'remote_chains': (
            None,
            ['u32'],
        ),
        'thawn_duration': (
            None,
            'u32',
        ),
    },
}
)

Events


BridgeConfigUpdated

Attributes

Name Type Composition
None BridgeConstraints {'operator_account': (None, 'AccountId'), 'pauser_accounts': (None, ['AccountId']), 'bridging_fee': (None, 'u128'), 'thawn_duration': (None, 'u32'), 'remote_chains': (None, ['u32'])}

BridgePaused

Attributes

Name Type Composition
None AccountId AccountId

BridgeThawnFinished

Attributes

No attributes


BridgeThawnStarted

Attributes

Name Type Composition
None AccountId AccountId
None BlockNumber u32

InboundTransferFinalized

Attributes

Name Type Composition
None RemoteTransfer {'id': 'u64', 'chain_id': 'u32'}
None AccountId AccountId
None Balance u128

OutboundTransferRequested

Attributes

Name Type Composition
None TransferId u64
None AccountId AccountId
None RemoteAccount {'account': '[u8; 32]', 'chain_id': 'u32'}
None Balance u128
None Balance u128

OutboundTransferReverted

Attributes

Name Type Composition
None TransferId u64
None AccountId AccountId
None Balance u128
None BoundedVec<u8, ConstU32<MAX_BYTES_RATIONALE>> Bytes

Storage functions


BridgingFee

Amount of JOY burned as a fee for each transfer

Python

result = substrate.query(
    'ArgoBridge', 'BridgingFee', []
)

Return value

'u128'

MintAllowance

Number of tokens that the bridge pallet is able to mint

Python

result = substrate.query(
    'ArgoBridge', 'MintAllowance', []
)

Return value

'u128'

NextTransferId

Python

result = substrate.query(
    'ArgoBridge', 'NextTransferId', []
)

Return value

'u64'

OperatorAccount

Account ID that operates the bridge

Python

result = substrate.query(
    'ArgoBridge', 'OperatorAccount', []
)

Return value

'AccountId'

PauserAccounts

List of account IDs with permission to pause the bridge operations

Python

result = substrate.query(
    'ArgoBridge', 'PauserAccounts', []
)

Return value

['AccountId']

RemoteChains

Python

result = substrate.query(
    'ArgoBridge', 'RemoteChains', []
)

Return value

['u32']

Status

Python

result = substrate.query(
    'ArgoBridge', 'Status', []
)

Return value

{'Active': None, 'Paused': None, 'Thawn': {'thawn_ends_at': 'u32'}}

ThawnDuration

Number of blocks needed before bridge unpause can be finalised

Python

result = substrate.query(
    'ArgoBridge', 'ThawnDuration', []
)

Return value

'u32'