DataTypes

Git Source

A standard library of data types.

Structs

MappedToken

struct MappedToken {
    address token;
    uint8 decimals;
}

DepositEntry

A struct containing deposit data.

struct DepositEntry {
    uint256 chainId;
    address recipient;
    address token;
    uint256 amount;
}

Properties

NameTypeDescription
chainIduint256The ChainId of mainchain network.
recipientaddressThe address of account to receive the deposit.
tokenaddressThe address of token to deposit.
amountuint256The amount of token to deposit.

WithdrawalEntry

A struct containing withdrawal data.

struct WithdrawalEntry {
    uint256 chainId;
    address recipient;
    address token;
    uint256 amount;
    uint256 fee;
}

Properties

NameTypeDescription
chainIduint256The ChainId of mainchain network.
recipientaddressThe address of account to receive the withdrawal.
tokenaddressThe address of token to withdraw.
amountuint256The amount of token to be withdrawn on mainchain network. Note that validator should use this `amount' for submitting signature
feeuint256The fee amount to pay for the withdrawal tx sender on mainchain network.

Signature

A struct containing a validator signature for the withdrawal.

struct Signature {
    uint8 v;
    bytes32 r;
    bytes32 s;
}

Enums

Status

Acknowledge status, once the acknowledgements reach the threshold the 1st time, it can take effect to the system. Acknowledgments after that should not have any effects.

enum Status {
    NotApproved,
    FirstApproved,
    AlreadyApproved
}