DataTypes
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
Name | Type | Description |
---|---|---|
chainId | uint256 | The ChainId of mainchain network. |
recipient | address | The address of account to receive the deposit. |
token | address | The address of token to deposit. |
amount | uint256 | The amount of token to deposit. |
WithdrawalEntry
A struct containing withdrawal data.
struct WithdrawalEntry {
uint256 chainId;
address recipient;
address token;
uint256 amount;
uint256 fee;
}
Properties
Name | Type | Description |
---|---|---|
chainId | uint256 | The ChainId of mainchain network. |
recipient | address | The address of account to receive the withdrawal. |
token | address | The address of token to withdraw. |
amount | uint256 | The amount of token to be withdrawn on mainchain network. Note that validator should use this `amount' for submitting signature |
fee | uint256 | The 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
}