# 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-node-api.klaytnapi.com/v1/cypress
```

* Add Network from the networks dropdown if needed

<img src="https://1278909119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjXzSdnsqu8hThNVH3A%2Fuploads%2FZMXsQWmacheNpRaiwOBq%2Fimage.png?alt=media&#x26;token=077a7dba-a54a-4e5a-af44-44ecf63fbdd4" alt="" data-size="original">

* 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://1278909119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjXzSdnsqu8hThNVH3A%2Fuploads%2FaBQutkpmhVi8sIaVx0ZP%2Flayer1.abi?alt=media&token=12c765cf-daa9-4441-9cce-13ad284a95bf>" %}
Layer 1 means original token platforms (ex. KSP's Layer 1 => KLAYTN)
{% endfile %}

{% file src="<https://1278909119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjXzSdnsqu8hThNVH3A%2Fuploads%2F6SQgW2RCPwTitUQ4GcZE%2Fft.abi?alt=media&token=db7462d9-6a50-4e61-abcb-23a882717570>" %}
ft means Fungible Token (ERC-20, KIP-7)
{% endfile %}

* Load abi files into Remix IDE

<img src="https://1278909119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjXzSdnsqu8hThNVH3A%2Fuploads%2FkAqo2tmU40dwVW61AiQ6%2Fimage.png?alt=media&#x26;token=1e57bf19-6cab-4138-8d0c-8a099da6fb00" alt="" data-size="original">

* Select ft.abi

<img src="https://1278909119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjXzSdnsqu8hThNVH3A%2Fuploads%2FcLdgWTfI11LQ0SgHuyf6%2Fimage.png?alt=media&#x26;token=aea3fc25-f414-4297-84b7-d77ae7dcf282" alt="" data-size="original">

* 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://orbit-1.gitbook.io/bridgedocs/token-registration-for-bridging/reference-layer-1-contracts)
  * Click transact button

![](https://1278909119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjXzSdnsqu8hThNVH3A%2Fuploads%2FTkyB9c61zQmhn3RfyUav%2Fimage.png?alt=media\&token=edea90d6-9e00-40c0-b8a4-9376b1f9c3a1)

* Send Transaction using Metamask

![choose edit](https://1278909119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjXzSdnsqu8hThNVH3A%2Fuploads%2FSPkK2tGzDN8LwJKr1yXt%2Fimage.png?alt=media\&token=7a5f4707-7e62-41c7-8460-b1a61f552228) ![edit gas fee](https://1278909119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjXzSdnsqu8hThNVH3A%2Fuploads%2F0Rw27mX2nSctGO0unbTL%2Fimage.png?alt=media\&token=9208d4a5-ed52-4f8e-9b76-2e7dda268f8e) ![make sure priority fee and fee to 750](https://1278909119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjXzSdnsqu8hThNVH3A%2Fuploads%2Fcsqu2VJkatg47CLBPXrU%2Fimage.png?alt=media\&token=d0dc6b52-ecbb-413f-b0d7-18a547239c22)

* 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 : amount for bridging (ex. 0.04 KSP = 40000000000000000, 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

<div align="left"><img src="https://1278909119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjXzSdnsqu8hThNVH3A%2Fuploads%2FboOgSm1PtZYuZpsDN13m%2Fimage.png?alt=media&#x26;token=5ef71c56-e58c-48b5-93da-ccaaaaa73ce0" alt=""></div>

<div align="left"><img src="https://1278909119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjXzSdnsqu8hThNVH3A%2Fuploads%2FHDN1TduKOh8quBzzrVoi%2Fimage.png?alt=media&#x26;token=de5b0a5e-cfc7-4403-b342-dbfc378d717f" alt=""></div>

![](https://1278909119-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjXzSdnsqu8hThNVH3A%2Fuploads%2FepYhkQ8myGncyXZfLC4C%2Fimage.png?alt=media\&token=d9a2a1d6-8a03-49ee-ae1a-ca6fb213ffca)
