Hello there!
SVOI dev team greets you and would like to present the results of created Decentralized Exchange for the FreeTON Community contest:
#23 FreeTon DEX Implementation Stage 2 Contest.
Goal of this work is to create Decentralized Exchange based on Liquidity Pool mechanism and develop instruments, such as debot and site for interacting with developed smart contracts.
Repository for smart contracts compilation and deployment - https://github.com/SVOIcom/ton-testing-suite
Used ton-solidity compiler - solidity compiler v0.39.0
Used tvm-linker - latest tvm linker
All of the instructions were tested on Ubuntu 18.04.
Set of tools for making testing smart contracts on TON easier.
This is repository containing tests and instruments for smart contract deployment and testing.
To run tests you will need to install required packages and mocha:
git clone https://github.com/SVOIcom/ton-testing-suite
cd ton-testing-suite
git submodule update --init --recursive
npm install .
npm install -g mocha
Then you need to build smart contracts (solc v0.36.0 required):
mkdir -p build
bash compile_cc.sh tonswap-SC/contracts/ build/
Or if you have downloaded compiled smart contracts from tonswap-SC release page
then you need to unzip archive and copy it's contents to build/
directory.
If you haven't created build
directory yet, create it by running:
mkdir -p build
If you wish to run tests at ton OS SE, then you need to configure network url.
It is stored in file: config/general/networkConfig.js
You need to replace tonOSSE.network
value with url to access your TON OS SE instance.
After preparations, you can run swap pair test:
mocha test/swapPairTest.js
To deploy swap pair so you can test it on local ton OS SE you need to run:
mocha test/swapPairTest.js
Try running the same command with additional flag:
mocha --allow-uncaught test/swapPairTest.js
If this will not resolve existing problem - please contact our team for further investing of your case so we can provide all help that we can :)
To deploy Swap pair debot
you will need to run following command:
node test/deployDebot.js
Result of run with debot address and used keypair will be in file debotRes.json
For testing purposes we created some accounts with finished preparation stage:
- They all have transferred TONs to swap pair contract;
- They all have transferred TIP-3 tokens to swap pair contract;
- They are fully functional :)
Keypair with addresses are in file: profile file They will totally work at our site tonswap.com too!
Please consider using them for tests. If you want to perform all of above by yourself, please check file for deploying test swap pair and contact our team in Telegram (or contact me in direct messages @pafaul) if you have any questions about full cycle of interaction with swap pair.