Skip to content
ICONSwap is a generic SCORE for trading ICX and IRC2 Tokens on ICON.
Python Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ICONSwap
calls
config
scripts
.gitignore
LICENSE
README.md
install.sh
start_tbears.sh

README.md

ICONation logo

ICONSwap

License

Introduction

ICONSwap is a fully open source, free (excluding ICON transaction fees) service that allows any ICONist to trade safely any of their IRC2 tokens against any amount of ICX or IRC2 tokens.

For doing so, this service implements a simple Atomic swap algorithm on ICON.

It is an alternative to the Over-The-Counter (OTC) trading method taking place on few unlisted tokens on ICON. This method is insecure as the trade isn't atomic.

Alternatively, ICONSwap may be used by other SCORE developers willing to implement an atomic swap in their contract : the ICONSwap SCORE contract may be called from another SCORE.

You can read and review the open source code here :

SCORE GitHub : https://github.com/iconation/ICONSwap

GUI GitHub : https://github.com/iconation/ICONSwap-UI

Table of Contents

Developers Quick Start

Here is a checklist you will need to follow in order to deploy ICONSwap to the Yeouido testnet:

  • Install prerequisites:
    • python3 -m venv ./venv && source ./venv/bin/activate
    • pip install tbears
    • sudo apt install jq
  • Clone the ICONSwap repository:
    • git clone https://github.com/iconation/ICONSwap.git && cd ICONSwap
  • Start tbears using the start_tbears.sh script located at the root folder of the ICONSwap repository
    • ./start_tbears.sh
  • Install the operator wallets:
    • ./install.sh
    • It will generate 3 operator wallets :
      • A first one on the Yeouido network in ./config/yeouido/keystores/operator.icx
      • A second one on the Euljiro network in ./config/euljiro/keystores/operator.icx
      • A last one on the Mainnet network in ./config/mainnet/keystores/operator.icx
    • Input a password for each network
  • Send few ICX (20 ICX should be enough) to the Yeouido wallet (the newly generated address is displayed after executing the install.sh script)
    • If you don't have some testnet ICX, use the faucet or contact @Spl3en
  • Deploy your SCORE to the testnet:
    • ./scripts/score/deploy_score.sh -n yeouido

Deploy ICONSwap SCORE to localhost, testnet or mainnet

  • In the root folder of the project, run the following command:
./scripts/score/deploy_score.sh
  • It should display the following usage:
> Usage:
 `-> ./scripts/score/deploy_score.sh [options]

> Options:
 -n <network> : Network to use (localhost, yeouido, euljiro or mainnet)
  • Fill the -n option corresponding to the network you want to deploy to: localhost, yeouido, euljiro or mainnet.
  • Example :
$ ./scripts/score/deploy_score.sh -n localhost

Update an already deployed ICONSwap to localhost, testnet or mainnet

  • If you modified the ICONSwap SCORE source code, you may need to update it.

  • In the root folder of the project, run the following command:

$ ./scripts/score/update_score.sh
  • It should display the following usage:
> Usage:
 `-> ./scripts/score/update_score.sh [options]

> Options:
 -n <network> : Network to use (localhost, yeouido, euljiro or mainnet)
  • Fill the -n option corresponding to the network where your SCORE is deployed to: localhost, yeouido, euljiro or mainnet.

  • Example :

$ ./scripts/score/update_score.sh -n localhost
You can’t perform that action at this time.