# 6.2 Ethereum IBC Protocol

## Deposit <a href="#deposit" id="deposit"></a>

If you want to send ERC20 tokens to the Orbit IBC contract, you must check that the token is registered‌

`decimal(address tokenAddr)`‌

Send a deposit transaction to the Orbit IBC contract on the Ethereum MAINNET/ROPSTEN

```
// deposit ETHfunction deposit(address toAddr, address extraToAddr) payable public// deposit ERC20 TOKENfunction depositToken(address token, address toAddr, uint amount, address extraToAddr) public
```

If your transaction succeeds,

```
event Deposit(address tokenAddr, address addr, address toAddr, uint amount, uint depositId, address extraToAddr);
```

Deposit event occurs 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 events occur.

```
// EthpeggingContractevent DepositValidated(address mainAddr, address tokenAddr, address addr, address toAddr, uint amount, uint depositId, address extraToAddr)// BalanceContractevent BalanceChange(address indexed user, bytes32 indexed tokenId, uint balance);
```

## Withdrawal <a href="#withdrawal" id="withdrawal"></a>

Send a withdrawal transaction to Orbit Balancecontract.

```
function withdrawBySignature(bytes32[] memory bytes32s, uint[] memory uints, address fromAddr, bytes memory destination, bytes memory comment, uint8 v) publicfunction withdraw(bytes32 tokenId, bytes memory destination, uint amount, bytes memory comment) public
```

Then, Ethereum IBC operator and Validator begin to proceed this withdrawal‌

When withdrawal is completed in Ethereum, Withdrawal event occurs.

```
event Withdraw(address tokenAddr, address addr, address toAddr, uint amount, bytes32 whash, uint withdrawId, bytes comment);

```
