Ethereum IBC protocol
Deposit
If you want to send ERC20 token to the Orbit IBC contract, you should check that the token is registered
decimal(address tokenAddr)
Send a deposit transaction to the Orbit IBC contract on the Ethereum MAINNET/ROPSTEN
If your transaction succeed,
Deposit event occur in your transaction
Then, Ethereum IBC operator and Validator begin to proceed this deposit
When deposit is completed in the Orbit chain, DepositValidated and BalanceChange event occur
Withdrawal
Send a withdrawal transaction to OrbitChain BalanceContract
Then, Ethereum IBC operator and Validator begin to proceed this withdrawal
When withdrawal is completed in Ethereum, Withdrawal event occur
Contract Methods
addToken
Only owner address can execute this function.
Parameter | Type | Description |
tokenAddress | address | Token address to append |
removeToken
Only owner address can execute this function.
Parameter | Type | Description |
tokenAddress | address | Token address to remove |
relayDepositToken
Parameter | Type | Description |
mainAddr | address | Ethereum reserve contract address on main network |
fromAddr | address | Address of sender |
toAddr | address | Receiver address on OrbitChain |
token | address | Address of token |
amount | uint256 | Amount of token |
depositId | uint256 | Identifier of deposit |
extraToAddr | address | Extra receiver address on OrbitChain |
validateDepositToken
You should hash following parameters to sign or validate deposit request.
Parameter | Type | Description |
mainAddr | address | Ethereum reserve contract address on main network |
fromAddr | address | Address of sender |
toAddr | address | Receiver address on OrbitChain |
token | address | Address of token |
amount | uint256 | Amount of token |
depositId | uint256 | Identifier of deposit |
extraToAddr | address | Extra receiver address on OrbitChain |
validator | address | Address of signer/validator |
v | uint8 | v of signature |
r | bytes32 | r of signature |
s | bytes32 | s of signature |
checkValidateDepositToken
Parameter | Type | Description |
mainAddr | address | Ethereum reserve contract address on main network |
fromAddr | address | Address of sender |
toAddr | address | Receiver address on OrbitChain |
token | address | Address of token |
amount | uint256 | Amount of token |
depositId | uint256 | Identifier of deposit |
extraToAddr | address | Extra receiver address on OrbitChain |
withdraw
Only BalanceContract can execute this function.
Parameter | Type | Description |
withdrawId | uint256 | Identifier of BalanceContract withdrawal |
user | address | Sender address on OrbitChain |
tokenSummary | bytes32 | Token summary |
destination | bytes | Address of withdrawal destination |
uint256 | amount | Amount of withdrawal |
bytes | comment | Extra data |
withdraw
Only BalanceContract can execute this function.
Parameter | Type | Description |
withdrawId | uint256 | Identifier of BalanceContract withdrawal |
user | address | Sender address on OrbitChain |
extraUser | address | Extra sender address on OrbitChain (for Giveback) |
tokenSummary | bytes32 | Token summary |
destination | bytes | Address of withdrawal destination |
uint256 | amount | Amount of withdrawal |
bytes | comment | Extra data |
relayWithdraw
Parameter | Type | Description |
withdrawId | uint256 | Withdraw ID |
validateWithdraw
Parameter | Type | Description |
withdrawId | uint256 | Withdraw ID |
validator | address | Address of signer/validator |
checkValidateWithdraw
Parameter | Type | Description |
withdrawId | uint256 | Withdraw ID |
_
Parameter | Type | Description |
Last updated