# Registration Using Remix

This guide is based on the contract address and amount supplied. Take this guide as a reference and type in the exact numbers and address as told.

### MetaMask

* Networks

```json
KLAYTN : https://public-en-cypress.klaytn.net
```

* Add Network from the networks dropdown if needed

<figure><img src="https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2FiYqE3T4id4SrCJNdke9R%2Fimage.png?alt=media&#x26;token=ffae2698-e50b-45de-9507-748231c67af2" alt=""><figcaption></figcaption></figure>

* Open Networks again and select the network you added

## [Remix IDE](https://remix.ethereum.org/)

Remix IDE - an online IDE to develop smart contracts.

* [Docs](https://remix-ide.readthedocs.io/en/latest/index.html)
* Download abi files

{% file src="<https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2FaYaIIFmmQUWLjciBQBoy%2Flayer1.abi?alt=media&token=1109a53d-6bea-4e18-b15e-228bc2b13fa9>" %}
Layer 1 means original token platforms (ex. KSP's Layer 1 => KLAYTN)
{% endfile %}

{% file src="<https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2F2EtlfNtpTUL512kilKQ9%2Fft.abi?alt=media&token=0a97d9fe-3754-4793-8745-3a9c8d1a8b58>" %}
ft means Fungible Token (ERC-20, KIP-7)
{% endfile %}

* Load abi files into Remix IDE

<div align="left"><figure><img src="https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2FKXG1ps3BCjUbM1uLJJvB%2Fimage.png?alt=media&#x26;token=0c280f0f-acaa-479b-901c-a4895362d4ea" alt=""><figcaption></figcaption></figure></div>

* Select ft.abi

<div align="left"><figure><img src="https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2FQZVNThaYbCOzHHgIfd9F%2Fimage.png?alt=media&#x26;token=e2c4ba35-5406-4e08-af4e-80d5ee8e37a9" alt=""><figcaption></figcaption></figure></div>

* Approve Token
  * Select Deploy & Run Transaction on left bar
  * Select Injected Web3 for Environment&#x20;
    * For Metamask
    * Check chainID (ex. KLAYTN : 8217)
  * Put your token address and Load Contract (ex. KSP :  0xc6a2ad8cc6e4a7e08fc37cc5954be07d499e7654)
  * Put spender and the amount to be bridged&#x20;
    * In this case KLAYTN Layer 1 contract : 0x9Abc3F6c11dBd83234D6E6b2c373Dfc1893F648D
    * If your original token is on a chain other than KLAYTN, please refer to the [Layer 1 contract addresses](https://bridge-docs.orbitchain.io/token-registration-for-bridging/broken-reference)
  * Click transact button

<div><figure><img src="https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2F1dDGBe6bUFGYDCTVJT1w%2Fimage.png?alt=media&#x26;token=f760ab9f-38a7-4c08-8236-51cf90e15d24" alt=""><figcaption></figcaption></figure> <figure><img src="https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2FdowffNIfSg46RQpznrH3%2Fimage.png?alt=media&#x26;token=8b0c08c2-a19f-413e-ac68-585c344357ec" alt=""><figcaption><p>Updated dropdown menu<br>Select [Injected Provider - MetaMask]</p></figcaption></figure></div>

* Send Transaction using Metamask

<div align="left"><figure><img src="https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2FQELb7PP9lC4EyEdDlqfy%2Fimage.png?alt=media&#x26;token=3b6a123e-e833-4416-8563-15a53631c6f3" alt=""><figcaption><p>choose edit</p></figcaption></figure> <figure><img src="https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2FrwNhlTSn7q5lBv7gGdtE%2Fimage.png?alt=media&#x26;token=a463fe05-fc8a-4fb7-a367-6a819138190d" alt=""><figcaption><p>edit gas fee</p></figcaption></figure> <figure><img src="https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2FhW9ls58zZOTieeZWrDQF%2Fimage.png?alt=media&#x26;token=69503c23-3a1b-4da0-9fa4-9f8a4cd22bf2" alt=""><figcaption><p>make sure priority fee and fee to 750</p></figcaption></figure></div>

* Bridge Token
  * Load the Layer 1 contract referring to the Approve Token step
  * KLAYTN Layer 1 contract : 0x9Abc3F6c11dBd83234D6E6b2c373Dfc1893F648D
  * Get ChainId for toChain (Use MATIC for POLYGON due to predefined bridge rules)
  * Put chainId to check if toChain is a supported chain
  * Put chainId to check the bridge fee to toChain
    * If chainFee is zero, then value set 0
    * if not, you must put chainFee in VALUE. (ether = 10^18 wei)
  * Dropdown depositToken, fill params and click transact
    * token : your token address \
      (ex. KSP : 0xc6a2ad8cc6e4a7e08fc37cc5954be07d499e7654)
    * toAddr : address for receive bridged token
    * amount : 1 \
      (ex. 0.04 KSP = 40000000000000000, decimal = 18)\
      Basically, you are sending the minimum amount to register the token, 1/10^18 since the contract is based on the standard of decimal 18
  * Send Transaction referring to the Send Transaction using Metamask step
  * You can check the bridged token by searching for toAddr in toChain's explorer

<figure><img src="https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2FiTWnjyx2yWv0zLnPNk3p%2Fimage.png?alt=media&#x26;token=f0006ea1-6d89-4967-8912-bff8a36e5e8e" alt=""><figcaption></figcaption></figure>

<div align="center"><figure><img src="https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2FY6faI1Ykj247xfOd9PSd%2Fimage.png?alt=media&#x26;token=3c370bf9-2fe2-408d-8edc-0c4f6bf13a7f" alt=""><figcaption><p>If the chainFee shows any gas fee, put the same amount in the GAS FEE value</p></figcaption></figure></div>

<figure><img src="https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2FGXtEk34kToLvPHTFt9P8%2Fimage.png?alt=media&#x26;token=04997250-18aa-4c25-95c3-273119202cc8" alt=""><figcaption><p>When the transaction is completed, tochain's explorer shows the result as above</p></figcaption></figure>
