> For the complete documentation index, see [llms.txt](https://bridge-docs.orbitchain.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bridge-docs.orbitchain.io/token-registration-for-bridging/bridge-to-the-open-network-ton/registration-on-ton-using-remix.md).

# Registration on TON Using Remix

Bridge KIP-7 (fungible token, original token on KLAYTN) to TON

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

<figure><img src="https://516479309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJyg-Bbo5X7MHxbgayB%2Fuploads%2FnILT8HdmKi6PZNLVPns9%2Fimage.png?alt=media&amp;token=baf127ca-ff63-4a1b-a782-2328325b3ed8" 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="/files/FaKvJ0AGhH1SYTbdR09h" %}
Layer 1 means original token platforms (ex. KSP's Layer 1 => KLAYTN)
{% endfile %}

{% file src="/files/wrR9MRxlL8XiVzE8d35c" %}
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&amp;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&amp;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](broken://pages/7Xbz9zj23T8zpbmhKnd9)
  * 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&amp;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&amp;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&amp;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&amp;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&amp;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 TON for TON 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 do not need to put chainFee in VALUE. (ether = 10^18 wei)
  * Dropdown depositToken, fill params and click transact
    * token : your token address \
      (ex. KSP : 0xc6a2ad8cc6e4a7e08fc37cc5954be07d499e7654)
    * toAddr : \[Your TON based wallet address that want to receive your token]\
      TON based wallet has different type as we generally use for KIP7. Please refer to the scripts' hashPart for switching your address to 32byte address\
      <https://github.com/jaybbbb/bridge-utils>
    * amount : 1 \
      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&amp;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&amp;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&amp;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>
