Skip to content

Commit

Permalink
Merge pull request #3 from SVOIcom/TonSwap2
Browse files Browse the repository at this point in the history
Ton swap2
  • Loading branch information
nedobylskiy authored Jun 18, 2021
2 parents e090f75 + d02d056 commit cac7931
Show file tree
Hide file tree
Showing 24 changed files with 852 additions and 434 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const path = require('path');

app.use(express.static('public'));

//app.disable('view cache');

app.use('/modules/freeton', express.static('node_modules/freeton/src'));
app.use('/modules/ton-client-web-js', express.static('node_modules/ton-client-web-js/'));
app.use('/ton', express.static('dist'));
Expand Down
90 changes: 37 additions & 53 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tonswap-frontend",
"version": "1.0.0",
"version": "2.0.0",
"description": "",
"main": "index.js",
"scripts": {
Expand All @@ -17,14 +17,14 @@
},
"homepage": "https://github.com/SVOIcom/tonswap-frontend#readme",
"dependencies": {
"@solidity-parser/parser": "^0.13.0-rc.7",
"@solidity-parser/parser": "^0.13.1",
"express": "^4.17.1",
"freeton": "git+https://github.com/lailune/freeton.git",
"ton-client-web-js": "^0.28.0"
},
"devDependencies": {
"copy-webpack-plugin": "^5.1.1",
"webpack": "^4.41.6",
"webpack-cli": "^4.5.0"
"webpack-cli": "^4.7.0"
}
}
88 changes: 83 additions & 5 deletions public/contracts/abi/RootSwapPairContract.abi.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@
{
"name": "constructor",
"inputs": [
{"name":"spCode","type":"cell"},
{"name":"spCodeVersion","type":"uint32"},
{"name":"minMsgValue","type":"uint256"},
{"name":"contractSP","type":"uint256"}
{"name":"contractSP","type":"uint256"},
{"name":"tip3Deployer_","type":"address"}
],
"outputs": [
]
},
{
"name": "setTIP3DeployerAddress",
"inputs": [
{"name":"tip3Deployer_","type":"address"}
],
"outputs": [
]
Expand All @@ -23,14 +30,31 @@
{"name":"cA","type":"address"}
]
},
{
"name": "getAllSwapPairsID",
"inputs": [
],
"outputs": [
{"name":"ids","type":"uint256[]"}
]
},
{
"name": "getPairInfoByID",
"inputs": [
{"name":"uniqueID","type":"uint256"}
],
"outputs": [
{"components":[{"name":"rootContract","type":"address"},{"name":"tokenRoot1","type":"address"},{"name":"tokenRoot2","type":"address"},{"name":"lpTokenRoot","type":"address"},{"name":"tokenWallet1","type":"address"},{"name":"tokenWallet2","type":"address"},{"name":"lpTokenWallet","type":"address"},{"name":"deployTimestamp","type":"uint256"},{"name":"swapPairAddress","type":"address"},{"name":"uniqueId","type":"uint256"},{"name":"swapPairCodeVersion","type":"uint32"},{"name":"swapPairLPTokenName","type":"bytes"}],"name":"swapPairInfo","type":"tuple"}
]
},
{
"name": "getPairInfo",
"inputs": [
{"name":"tokenRootContract1","type":"address"},
{"name":"tokenRootContract2","type":"address"}
],
"outputs": [
{"components":[{"name":"rootContract","type":"address"},{"name":"tokenRoot1","type":"address"},{"name":"tokenRoot2","type":"address"},{"name":"tokenWallet1","type":"address"},{"name":"tokenWallet2","type":"address"},{"name":"deployerPubkey","type":"uint256"},{"name":"deployTimestamp","type":"uint256"},{"name":"swapPairAddress","type":"address"},{"name":"uniqueId","type":"uint256"},{"name":"swapPairCodeVersion","type":"uint32"}],"name":"value0","type":"tuple"}
{"components":[{"name":"rootContract","type":"address"},{"name":"tokenRoot1","type":"address"},{"name":"tokenRoot2","type":"address"},{"name":"lpTokenRoot","type":"address"},{"name":"tokenWallet1","type":"address"},{"name":"tokenWallet2","type":"address"},{"name":"lpTokenWallet","type":"address"},{"name":"deployTimestamp","type":"uint256"},{"name":"swapPairAddress","type":"address"},{"name":"uniqueId","type":"uint256"},{"name":"swapPairCodeVersion","type":"uint32"},{"name":"swapPairLPTokenName","type":"bytes"}],"name":"value0","type":"tuple"}
]
},
{
Expand All @@ -51,6 +75,24 @@
{"name":"value0","type":"bool"}
]
},
{
"name": "getFutureSwapPairAddress",
"inputs": [
{"name":"tokenRootContract1","type":"address"},
{"name":"tokenRootContract2","type":"address"}
],
"outputs": [
{"name":"value0","type":"address"}
]
},
{
"name": "swapPairInitializedCallback",
"inputs": [
{"components":[{"name":"rootContract","type":"address"},{"name":"tokenRoot1","type":"address"},{"name":"tokenRoot2","type":"address"},{"name":"lpTokenRoot","type":"address"},{"name":"tokenWallet1","type":"address"},{"name":"tokenWallet2","type":"address"},{"name":"lpTokenWallet","type":"address"},{"name":"deployTimestamp","type":"uint256"},{"name":"swapPairAddress","type":"address"},{"name":"uniqueId","type":"uint256"},{"name":"swapPairCodeVersion","type":"uint32"},{"name":"swapPairLPTokenName","type":"bytes"}],"name":"spi","type":"tuple"}
],
"outputs": [
]
},
{
"name": "setSwapPairCode",
"inputs": [
Expand All @@ -63,7 +105,8 @@
{
"name": "upgradeSwapPair",
"inputs": [
{"name":"uniqueID","type":"uint256"}
{"name":"tokenRootContract1","type":"address"},
{"name":"tokenRootContract2","type":"address"}
],
"outputs": [
]
Expand All @@ -74,5 +117,40 @@
{"key":2,"name":"ownerPubkey","type":"uint256"}
],
"events": [
{
"name": "DeploySwapPair",
"inputs": [
{"name":"swapPairAddress","type":"address"},
{"name":"tokenRootContract1","type":"address"},
{"name":"tokenRootContract2","type":"address"}
],
"outputs": [
]
},
{
"name": "SwapPairInitialized",
"inputs": [
{"name":"swapPairAddress","type":"address"}
],
"outputs": [
]
},
{
"name": "SetSwapPairCode",
"inputs": [
{"name":"codeVersion","type":"uint32"}
],
"outputs": [
]
},
{
"name": "UpgradeSwapPair",
"inputs": [
{"name":"uniqueID","type":"uint256"},
{"name":"codeVersion","type":"uint32"}
],
"outputs": [
]
}
]
}
Loading

0 comments on commit cac7931

Please sign in to comment.