# Converting ERC20 to ICRC

The sequence diagram details the process involved in converting the wrapped ICRC on the EVM chains back to ICRC on IC is shown below:

<figure><img src="https://3272464973-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhhUZsewYScbQt71tlbi1%2Fuploads%2FwtJbBsQO586G6vE8Vpgn%2Ferc20_icrc_sequence_diagram.png?alt=media&#x26;token=20f0934d-bfcd-447d-87dc-8726fa801d66" alt=""><figcaption><p>ERC20 => ICRC sequence diagram</p></figcaption></figure>

The detailed breakdown of each step in the sequence is as follows:

1. **User Interaction**:
   * The user initiates the bridging process by calling the `bridge(target_ic, amount, recipient)` function on the BitoBridge Helper smart contract.
   * The BitoBridge Helper confirms the request by sending an 'ok' response back to the user.
2. **Event Emission**:
   * The BitoBridge Helper emits an event `Bridge(target_ic, amount, recipient, from)` which is picked up by the RPC Nodes.
3. **Event Listening and Processing**:
   * The Minter continuously listens for events from RPC nodes. This listening process runs in a loop, with checks occurring every three minutes.
   * Once an event is detected, BitoBridge Minter gets the information.
4. **BitoBridge Minter Activation**:
   * Upon receiving the event data, the BitoBridge Minter processes the details and interacts with the BitoBridge Hub to initiate the token bridging process.
5. **BitoBridge Hub to ICRC Ledger**:
   * The BitoBridge Hub sends a request to the ICRC Ledger to bridge tokens to IC specified in the initial user request.
   * This involves the BitoBridge Hub requesting the ICRC Ledger to transfer tokens to the user's account on IC.
6. **Token Transfer and Confirmation**:
   * The ICRC Ledger processes the transfer request and updates the block index, which is crucial for tracking the transaction on the blockchain.
   * The ICRC Ledger confirms the successful transfer by sending the updated block index back to the BitoBridge Hub.
