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.

Files changed (65) hide show
  1. package/.editorconfig +13 -0
  2. package/.eslintrc.js +16 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.yaml +108 -0
  4. package/.nvmrc +1 -0
  5. package/.prettierrc +4 -0
  6. package/@types/global.d.ts +1 -0
  7. package/@types/params.d.ts +24 -0
  8. package/@types/tonweb.d.ts +44 -0
  9. package/LICENSE +674 -0
  10. package/README.md +71 -5
  11. package/assets/WTON.json +1 -0
  12. package/assets/pics/arrow.svg +44 -0
  13. package/assets/pics/done.svg +38 -0
  14. package/assets/pics/link.svg +15 -0
  15. package/assets/pics/swap.svg +331 -0
  16. package/assets/styles/reboot.css +163 -0
  17. package/components/BridgeProcessor.vue +977 -0
  18. package/docs/.nojekyll +0 -0
  19. package/docs/200.html +9 -0
  20. package/docs/_nuxt/1f2ac62.js +1 -0
  21. package/docs/_nuxt/1f2ac62.js.br +0 -0
  22. package/docs/_nuxt/1f2ac62.js.gz +0 -0
  23. package/docs/_nuxt/5cc51a5.js +1 -0
  24. package/docs/_nuxt/5cc51a5.js.br +0 -0
  25. package/docs/_nuxt/5cc51a5.js.gz +0 -0
  26. package/docs/_nuxt/7767db0.js +2 -0
  27. package/docs/_nuxt/7767db0.js.br +0 -0
  28. package/docs/_nuxt/7767db0.js.gz +0 -0
  29. package/docs/_nuxt/9ead974.js +2 -0
  30. package/docs/_nuxt/9ead974.js.br +0 -0
  31. package/docs/_nuxt/9ead974.js.gz +0 -0
  32. package/docs/_nuxt/LICENSES +98 -0
  33. package/docs/_nuxt/a46cdc5.js +1 -0
  34. package/docs/_nuxt/a46cdc5.js.br +0 -0
  35. package/docs/_nuxt/a46cdc5.js.gz +0 -0
  36. package/docs/_nuxt/b3f7827.js +1 -0
  37. package/docs/_nuxt/b3f7827.js.br +0 -0
  38. package/docs/_nuxt/b3f7827.js.gz +0 -0
  39. package/docs/_nuxt/b5d388d.js +1 -0
  40. package/docs/_nuxt/b5d388d.js.br +0 -0
  41. package/docs/_nuxt/b5d388d.js.gz +0 -0
  42. package/docs/_nuxt/fe8ca79.js +2 -0
  43. package/docs/_nuxt/fe8ca79.js.br +0 -0
  44. package/docs/_nuxt/fe8ca79.js.gz +0 -0
  45. package/docs/_nuxt/img/arrow.69e1e70.svg +44 -0
  46. package/docs/_nuxt/img/arrow.69e1e70.svg.br +0 -0
  47. package/docs/_nuxt/img/arrow.69e1e70.svg.gz +0 -0
  48. package/docs/_nuxt/img/swap.b8b4b2f.svg +331 -0
  49. package/docs/_nuxt/img/swap.b8b4b2f.svg.br +0 -0
  50. package/docs/_nuxt/img/swap.b8b4b2f.svg.gz +0 -0
  51. package/docs/favicon.ico +0 -0
  52. package/docs/index.html +9 -0
  53. package/index.js +66 -0
  54. package/lang/en/bridge.json +105 -0
  55. package/lang/en-US.js +7 -0
  56. package/layouts/default.vue +53 -0
  57. package/modules/i18n.js +44 -0
  58. package/nuxt.config.js +73 -0
  59. package/package.json +61 -6
  60. package/pages/index.vue +635 -0
  61. package/static/favicon.ico +0 -0
  62. package/tsconfig.json +39 -0
  63. package/utils/constants.ts +65 -0
  64. package/utils/helpers.ts +37 -0
  65. 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
+ };
@@ -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
@@ -0,0 +1,4 @@
1
+ declare module "*.vue" {
2
+ import Vue from 'vue'
3
+ export default Vue
4
+ }