ton-evm-bridge 0.0.1-security → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ton-evm-bridge might be problematic. Click here for more details.
- package/.editorconfig +13 -0
- package/.eslintrc.js +16 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yaml +108 -0
- package/.nvmrc +1 -0
- package/.prettierrc +4 -0
- package/@types/global.d.ts +1 -0
- package/@types/params.d.ts +24 -0
- package/@types/tonweb.d.ts +44 -0
- package/LICENSE +674 -0
- package/README.md +71 -5
- package/assets/WTON.json +1 -0
- package/assets/pics/arrow.svg +44 -0
- package/assets/pics/done.svg +38 -0
- package/assets/pics/link.svg +15 -0
- package/assets/pics/swap.svg +331 -0
- package/assets/styles/reboot.css +163 -0
- package/components/BridgeProcessor.vue +977 -0
- package/docs/.nojekyll +0 -0
- package/docs/200.html +9 -0
- package/docs/_nuxt/1f2ac62.js +1 -0
- package/docs/_nuxt/1f2ac62.js.br +0 -0
- package/docs/_nuxt/1f2ac62.js.gz +0 -0
- package/docs/_nuxt/5cc51a5.js +1 -0
- package/docs/_nuxt/5cc51a5.js.br +0 -0
- package/docs/_nuxt/5cc51a5.js.gz +0 -0
- package/docs/_nuxt/7767db0.js +2 -0
- package/docs/_nuxt/7767db0.js.br +0 -0
- package/docs/_nuxt/7767db0.js.gz +0 -0
- package/docs/_nuxt/9ead974.js +2 -0
- package/docs/_nuxt/9ead974.js.br +0 -0
- package/docs/_nuxt/9ead974.js.gz +0 -0
- package/docs/_nuxt/LICENSES +98 -0
- package/docs/_nuxt/a46cdc5.js +1 -0
- package/docs/_nuxt/a46cdc5.js.br +0 -0
- package/docs/_nuxt/a46cdc5.js.gz +0 -0
- package/docs/_nuxt/b3f7827.js +1 -0
- package/docs/_nuxt/b3f7827.js.br +0 -0
- package/docs/_nuxt/b3f7827.js.gz +0 -0
- package/docs/_nuxt/b5d388d.js +1 -0
- package/docs/_nuxt/b5d388d.js.br +0 -0
- package/docs/_nuxt/b5d388d.js.gz +0 -0
- package/docs/_nuxt/fe8ca79.js +2 -0
- package/docs/_nuxt/fe8ca79.js.br +0 -0
- package/docs/_nuxt/fe8ca79.js.gz +0 -0
- package/docs/_nuxt/img/arrow.69e1e70.svg +44 -0
- package/docs/_nuxt/img/arrow.69e1e70.svg.br +0 -0
- package/docs/_nuxt/img/arrow.69e1e70.svg.gz +0 -0
- package/docs/_nuxt/img/swap.b8b4b2f.svg +331 -0
- package/docs/_nuxt/img/swap.b8b4b2f.svg.br +0 -0
- package/docs/_nuxt/img/swap.b8b4b2f.svg.gz +0 -0
- package/docs/favicon.ico +0 -0
- package/docs/index.html +9 -0
- package/index.js +66 -0
- package/lang/en/bridge.json +105 -0
- package/lang/en-US.js +7 -0
- package/layouts/default.vue +53 -0
- package/modules/i18n.js +44 -0
- package/nuxt.config.js +73 -0
- package/package.json +61 -6
- package/pages/index.vue +635 -0
- package/static/favicon.ico +0 -0
- package/tsconfig.json +39 -0
- package/utils/constants.ts +65 -0
- package/utils/helpers.ts +37 -0
- package/vue-shim.d.ts +4 -0
@@ -0,0 +1,65 @@
|
|
1
|
+
export const PARAMS: IParams = {
|
2
|
+
"tonTransferUrl": "ton://transfer/<BRIDGE_ADDRESS>?amount=<AMOUNT>&text=swapTo%23<TO_ADDRESS>",
|
3
|
+
"networks": {
|
4
|
+
"eth": {
|
5
|
+
"main": {
|
6
|
+
"getGasUrl": "https://ethereumgas.toncenter.com",
|
7
|
+
"explorerUrl": "https://etherscan.io/token/<ADDRESS>",
|
8
|
+
"wTonAddress": "0x582d872a1b094fc48f5de31d3b73f2d9be47def1",
|
9
|
+
"tonBridgeAddress": "Ef_dJMSh8riPi3BTUTtcxsWjG8RLKnLctNjAM4rw8NN-xWdr",
|
10
|
+
"tonCollectorAddress": "EQCuzvIOXLjH2tv35gY4tzhIvXCqZWDuK9kUhFGXKLImgxT5",
|
11
|
+
"tonMultisigAddress": "kf87m7_QrVM4uXAPCDM4DuF9Rj5Rwa5nHubwiQG96JmyAo-S",
|
12
|
+
"tonCenterUrl": "https://wallet.toncenter.com/api/v2/jsonRPC",
|
13
|
+
"chainId": 1,
|
14
|
+
"blocksConfirmations": 12,
|
15
|
+
"defaultGwei": 25,
|
16
|
+
"coinsPerGweiTo": 0.004,
|
17
|
+
"coinsPerGweiFrom": 0.001
|
18
|
+
},
|
19
|
+
"test": {
|
20
|
+
"getGasUrl": "https://ethereumgas.toncenter.com",
|
21
|
+
"explorerUrl": "https://goerli.etherscan.io/token/<ADDRESS>",
|
22
|
+
"wTonAddress": "0xDB15ffaf2c88F2d89Db9365a5160D5b8c9448Ea6",
|
23
|
+
"tonBridgeAddress": "Ef-56ZiqKUbtp_Ax2Qg4Vwh7yXXJCO8cNJAb229J6XXe4-aC",
|
24
|
+
"tonCollectorAddress": "EQCA1W_I267-luVo9CzV7iCcrA1OO5vVeXD0QHACvBn1jIVU",
|
25
|
+
"tonMultisigAddress": "kf-OV1dpgFVEzEmyvAETT8gnhqZ1IqHn8RzT6dmEmvnze-9n",
|
26
|
+
"tonCenterUrl": "https://testnet.toncenter.com/api/v2/jsonRPC",
|
27
|
+
"chainId": 5,
|
28
|
+
"blocksConfirmations": 12,
|
29
|
+
"defaultGwei": 25,
|
30
|
+
"coinsPerGweiTo": 0.004,
|
31
|
+
"coinsPerGweiFrom": 0.001
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"bsc": {
|
35
|
+
"main": {
|
36
|
+
"getGasUrl": "https://gbsc.blockscan.com/gasapi.ashx?apikey=key&method=gasoracle",
|
37
|
+
"explorerUrl": "https://bscscan.com/token/<ADDRESS>",
|
38
|
+
"wTonAddress": "0x76A797A59Ba2C17726896976B7B3747BfD1d220f",
|
39
|
+
"tonBridgeAddress": "Ef9NXAIQs12t2qIZ-sRZ26D977H65Ol6DQeXc5_gUNaUys5r",
|
40
|
+
"tonCollectorAddress": "EQAHI1vGuw7d4WG-CtfDrWqEPNtmUuKjKFEFeJmZaqqfWTvW",
|
41
|
+
"tonMultisigAddress": "kf8OvX_5ynDgbp4iqJIvWudSEanWo0qAlOjhWHtga9u2Yo7j",
|
42
|
+
"tonCenterUrl": "https://wallet.toncenter.com/api/v2/jsonRPC",
|
43
|
+
"chainId": 56,
|
44
|
+
"blocksConfirmations": 12,
|
45
|
+
"defaultGwei": 5,
|
46
|
+
"coinsPerGweiTo": 0.0008,
|
47
|
+
"coinsPerGweiFrom": 0.0002
|
48
|
+
},
|
49
|
+
"test": {
|
50
|
+
"getGasUrl": "https://gbsc.blockscan.com/gasapi.ashx?apikey=key&method=gasoracle",
|
51
|
+
"explorerUrl": "https://testnet.bscscan.com/token/<ADDRESS>",
|
52
|
+
"wTonAddress": "0xdb15ffaf2c88f2d89db9365a5160d5b8c9448ea6",
|
53
|
+
"tonBridgeAddress": "Ef_GmJntTDokxfhLGF1jRvMGC8Jav2V5keoNj4El2jzhHsID",
|
54
|
+
"tonCollectorAddress": "EQDBNfV4DQzSyzNMw6BCTSZSoUi-CzWcYNsfhKxoDqfrwFtS",
|
55
|
+
"tonMultisigAddress": "kf83VnnXuaqQV1Ts2qvUr6agacM0ydOux5NNa1mcU-cEO693",
|
56
|
+
"tonCenterUrl": "https://testnet.toncenter.com/api/v2/jsonRPC",
|
57
|
+
"chainId": 97,
|
58
|
+
"blocksConfirmations": 12,
|
59
|
+
"defaultGwei": 5,
|
60
|
+
"coinsPerGweiTo": 0.0008,
|
61
|
+
"coinsPerGweiFrom": 0.0002
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
};
|
package/utils/helpers.ts
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
import TonWeb from 'tonweb';
|
2
|
+
|
3
|
+
export { toUnit, fromUnit, getNumber, getBool, decToHex, parseAddressFromDec, supportsLocalStorage };
|
4
|
+
|
5
|
+
function supportsLocalStorage(): boolean {
|
6
|
+
try {
|
7
|
+
return 'localStorage' in window && window['localStorage'] !== null;
|
8
|
+
} catch(e) {
|
9
|
+
return false;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
|
14
|
+
function toUnit(n: number): number {
|
15
|
+
return n * 1e9; // todo: BN
|
16
|
+
}
|
17
|
+
|
18
|
+
function fromUnit(n: number): number {
|
19
|
+
return n / 1e9; // todo: BN
|
20
|
+
}
|
21
|
+
|
22
|
+
function getNumber(pair: Array<string>): number {
|
23
|
+
return parseInt(pair[1], 16);
|
24
|
+
}
|
25
|
+
|
26
|
+
function getBool(pair: Array<string>): boolean {
|
27
|
+
return getNumber(pair) === 1;
|
28
|
+
}
|
29
|
+
|
30
|
+
function decToHex(dec: number): string {
|
31
|
+
return '0x' + new TonWeb.utils.BN(dec).toString(16);
|
32
|
+
}
|
33
|
+
|
34
|
+
function parseAddressFromDec(data: any): string {
|
35
|
+
return decToHex(data.number.number);
|
36
|
+
}
|
37
|
+
|
package/vue-shim.d.ts
ADDED