@instadapp/interop-x 0.0.0-dev.0b0cc3f

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.
Files changed (78) hide show
  1. package/.env.example +1 -0
  2. package/.github/workflows/publish-dev.yml +30 -0
  3. package/README.md +21 -0
  4. package/bin/interop-x +2 -0
  5. package/dist/abi/erc20.json +350 -0
  6. package/dist/abi/gnosisSafe.json +747 -0
  7. package/dist/abi/index.js +15 -0
  8. package/dist/abi/interopBridgeToken.json +286 -0
  9. package/dist/abi/interopXGateway.json +184 -0
  10. package/dist/config/index.js +17 -0
  11. package/dist/constants/addresses.js +28 -0
  12. package/dist/constants/index.js +17 -0
  13. package/dist/db/index.js +17 -0
  14. package/dist/db/models/index.js +17 -0
  15. package/dist/db/models/transaction.js +52 -0
  16. package/dist/db/sequelize.js +22 -0
  17. package/dist/index.js +43 -0
  18. package/dist/logger/index.js +138 -0
  19. package/dist/net/index.js +19 -0
  20. package/dist/net/peer/index.js +104 -0
  21. package/dist/net/pool/index.js +107 -0
  22. package/dist/net/protocol/dial/BaseDialProtocol.js +106 -0
  23. package/dist/net/protocol/dial/SignatureDialProtocol.js +46 -0
  24. package/dist/net/protocol/index.js +92 -0
  25. package/dist/tasks/BaseTask.js +61 -0
  26. package/dist/tasks/InteropXGateway/SyncDepositEvents.js +79 -0
  27. package/dist/tasks/index.js +27 -0
  28. package/dist/typechain/Erc20.js +2 -0
  29. package/dist/typechain/GnosisSafe.js +2 -0
  30. package/dist/typechain/InteropBridgeToken.js +2 -0
  31. package/dist/typechain/InteropXGateway.js +2 -0
  32. package/dist/typechain/common.js +2 -0
  33. package/dist/typechain/factories/Erc20__factory.js +367 -0
  34. package/dist/typechain/factories/GnosisSafe__factory.js +1174 -0
  35. package/dist/typechain/factories/InteropBridgeToken__factory.js +459 -0
  36. package/dist/typechain/factories/InteropXGateway__factory.js +265 -0
  37. package/dist/typechain/factories/index.js +14 -0
  38. package/dist/typechain/index.js +35 -0
  39. package/dist/types.js +21 -0
  40. package/dist/utils/index.js +101 -0
  41. package/package.json +79 -0
  42. package/src/abi/erc20.json +350 -0
  43. package/src/abi/gnosisSafe.json +747 -0
  44. package/src/abi/index.ts +11 -0
  45. package/src/abi/interopBridgeToken.json +286 -0
  46. package/src/abi/interopXGateway.json +184 -0
  47. package/src/config/index.ts +24 -0
  48. package/src/constants/addresses.ts +25 -0
  49. package/src/constants/index.ts +1 -0
  50. package/src/db/index.ts +1 -0
  51. package/src/db/models/index.ts +1 -0
  52. package/src/db/models/transaction.ts +92 -0
  53. package/src/db/sequelize.ts +21 -0
  54. package/src/index.ts +50 -0
  55. package/src/logger/index.ts +157 -0
  56. package/src/net/index.ts +3 -0
  57. package/src/net/peer/index.ts +119 -0
  58. package/src/net/pool/index.ts +128 -0
  59. package/src/net/protocol/dial/BaseDialProtocol.ts +104 -0
  60. package/src/net/protocol/dial/SignatureDialProtocol.ts +59 -0
  61. package/src/net/protocol/index.ts +138 -0
  62. package/src/tasks/BaseTask.ts +75 -0
  63. package/src/tasks/InteropXGateway/SyncDepositEvents.ts +114 -0
  64. package/src/tasks/index.ts +21 -0
  65. package/src/typechain/Erc20.ts +491 -0
  66. package/src/typechain/GnosisSafe.ts +1728 -0
  67. package/src/typechain/InteropBridgeToken.ts +686 -0
  68. package/src/typechain/InteropXGateway.ts +407 -0
  69. package/src/typechain/common.ts +44 -0
  70. package/src/typechain/factories/Erc20__factory.ts +368 -0
  71. package/src/typechain/factories/GnosisSafe__factory.ts +1178 -0
  72. package/src/typechain/factories/InteropBridgeToken__factory.ts +466 -0
  73. package/src/typechain/factories/InteropXGateway__factory.ts +272 -0
  74. package/src/typechain/factories/index.ts +7 -0
  75. package/src/typechain/index.ts +12 -0
  76. package/src/types.ts +39 -0
  77. package/src/utils/index.ts +129 -0
  78. package/tsconfig.json +30 -0
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InteropXGateway__factory = exports.InteropBridgeToken__factory = exports.GnosisSafe__factory = exports.Erc20__factory = void 0;
4
+ /* Autogenerated file. Do not edit manually. */
5
+ /* tslint:disable */
6
+ /* eslint-disable */
7
+ var Erc20__factory_1 = require("./Erc20__factory");
8
+ Object.defineProperty(exports, "Erc20__factory", { enumerable: true, get: function () { return Erc20__factory_1.Erc20__factory; } });
9
+ var GnosisSafe__factory_1 = require("./GnosisSafe__factory");
10
+ Object.defineProperty(exports, "GnosisSafe__factory", { enumerable: true, get: function () { return GnosisSafe__factory_1.GnosisSafe__factory; } });
11
+ var InteropBridgeToken__factory_1 = require("./InteropBridgeToken__factory");
12
+ Object.defineProperty(exports, "InteropBridgeToken__factory", { enumerable: true, get: function () { return InteropBridgeToken__factory_1.InteropBridgeToken__factory; } });
13
+ var InteropXGateway__factory_1 = require("./InteropXGateway__factory");
14
+ Object.defineProperty(exports, "InteropXGateway__factory", { enumerable: true, get: function () { return InteropXGateway__factory_1.InteropXGateway__factory; } });
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.InteropXGateway__factory = exports.InteropBridgeToken__factory = exports.GnosisSafe__factory = exports.Erc20__factory = exports.factories = void 0;
27
+ exports.factories = __importStar(require("./factories"));
28
+ var Erc20__factory_1 = require("./factories/Erc20__factory");
29
+ Object.defineProperty(exports, "Erc20__factory", { enumerable: true, get: function () { return Erc20__factory_1.Erc20__factory; } });
30
+ var GnosisSafe__factory_1 = require("./factories/GnosisSafe__factory");
31
+ Object.defineProperty(exports, "GnosisSafe__factory", { enumerable: true, get: function () { return GnosisSafe__factory_1.GnosisSafe__factory; } });
32
+ var InteropBridgeToken__factory_1 = require("./factories/InteropBridgeToken__factory");
33
+ Object.defineProperty(exports, "InteropBridgeToken__factory", { enumerable: true, get: function () { return InteropBridgeToken__factory_1.InteropBridgeToken__factory; } });
34
+ var InteropXGateway__factory_1 = require("./factories/InteropXGateway__factory");
35
+ Object.defineProperty(exports, "InteropXGateway__factory", { enumerable: true, get: function () { return InteropXGateway__factory_1.InteropXGateway__factory; } });
package/dist/types.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventBus = exports.Event = void 0;
4
+ const events_1 = require("events");
5
+ /**
6
+ * Types for the central event bus, emitted
7
+ * by different components of the client.
8
+ */
9
+ var Event;
10
+ (function (Event) {
11
+ Event["PEER_CONNECTED"] = "peer:connected";
12
+ Event["PEER_DISCONNECTED"] = "peer:disconnected";
13
+ Event["PEER_ERROR"] = "peer:error";
14
+ Event["POOL_PEER_ADDED"] = "pool:peer:added";
15
+ Event["POOL_PEER_REMOVED"] = "pool:peer:removed";
16
+ Event["POOL_PEER_BANNED"] = "pool:peer:banned";
17
+ })(Event = exports.Event || (exports.Event = {}));
18
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
19
+ class EventBus extends events_1.EventEmitter {
20
+ }
21
+ exports.EventBus = EventBus;
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.generateInteropTransactionHash = exports.asyncCallWithTimeout = exports.buildSignatureBytes = exports.getRpcProviderUrl = exports.signGnosisSafeTx = exports.short = exports.http = void 0;
7
+ /**
8
+ * @module util
9
+ */
10
+ const axios_1 = __importDefault(require("axios"));
11
+ const axios_retry_1 = __importDefault(require("axios-retry"));
12
+ const constants_1 = require("@/constants");
13
+ const ethers_1 = require("ethers");
14
+ exports.http = axios_1.default.create();
15
+ (0, axios_retry_1.default)(exports.http, { retries: 3, retryDelay: axios_retry_1.default.exponentialDelay });
16
+ function short(buffer) {
17
+ return buffer.toString('hex').slice(0, 8) + '...';
18
+ }
19
+ exports.short = short;
20
+ const signGnosisSafeTx = async ({ to, data = null, value = '0', operation = '1', baseGas = '0', gasPrice = "0", gasToken = "0x0000000000000000000000000000000000000000", refundReceiver = "0x0000000000000000000000000000000000000000", safeTxGas = "79668", nonce = "0", chainId = 137, }, { signer }) => {
21
+ const gnosisSafe = constants_1.addresses[chainId].gnosisSafe;
22
+ const domain = {
23
+ verifyingContract: gnosisSafe,
24
+ chainId,
25
+ };
26
+ const types = {
27
+ SafeTx: [
28
+ { type: 'address', name: 'to' },
29
+ { type: 'uint256', name: 'value' },
30
+ { type: 'bytes', name: 'data' },
31
+ { type: 'uint8', name: 'operation' },
32
+ { type: 'uint256', name: 'safeTxGas' },
33
+ { type: 'uint256', name: 'baseGas' },
34
+ { type: 'uint256', name: 'gasPrice' },
35
+ { type: 'address', name: 'gasToken' },
36
+ { type: 'address', name: 'refundReceiver' },
37
+ { type: 'uint256', name: 'nonce' },
38
+ ],
39
+ };
40
+ const message = {
41
+ baseGas,
42
+ data,
43
+ gasPrice,
44
+ gasToken,
45
+ nonce: Number(nonce),
46
+ operation,
47
+ refundReceiver,
48
+ safeAddress: gnosisSafe,
49
+ safeTxGas: String(safeTxGas),
50
+ to,
51
+ value,
52
+ };
53
+ return await signer._signTypedData(domain, types, message);
54
+ };
55
+ exports.signGnosisSafeTx = signGnosisSafeTx;
56
+ const getRpcProviderUrl = (chainId) => {
57
+ switch (chainId) {
58
+ case 1:
59
+ return 'https://rpc.instadapp.io/mainnet';
60
+ case 137:
61
+ return 'https://rpc.instadapp.io/polygon';
62
+ case 43114:
63
+ return 'https://rpc.instadapp.io/avalanche';
64
+ default:
65
+ throw new Error(`Unknown chainId: ${chainId}`);
66
+ }
67
+ };
68
+ exports.getRpcProviderUrl = getRpcProviderUrl;
69
+ const buildSignatureBytes = (signatures) => {
70
+ signatures.sort((left, right) => left.signer.toLowerCase().localeCompare(right.signer.toLowerCase()));
71
+ let signatureBytes = "0x";
72
+ for (const sig of signatures) {
73
+ signatureBytes += sig.data.slice(2);
74
+ }
75
+ return signatureBytes;
76
+ };
77
+ exports.buildSignatureBytes = buildSignatureBytes;
78
+ /**
79
+ * Call an async function with a maximum time limit (in milliseconds) for the timeout
80
+ * Resolved promise for async function call, or an error if time limit reached
81
+ */
82
+ const asyncCallWithTimeout = async (asyncPromise, timeout) => {
83
+ let timeoutHandle;
84
+ const timeoutPromise = new Promise((_resolve, reject) => {
85
+ timeoutHandle = setTimeout(() => reject(new Error('Async call timeout limit reached')), timeout);
86
+ });
87
+ return Promise.race([asyncPromise, timeoutPromise]).then(result => {
88
+ clearTimeout(timeoutHandle);
89
+ return result;
90
+ });
91
+ };
92
+ exports.asyncCallWithTimeout = asyncCallWithTimeout;
93
+ const generateInteropTransactionHash = (data) => {
94
+ return ethers_1.ethers.utils.solidityKeccak256(['string', 'string', 'string', 'string'], [
95
+ String(data.type),
96
+ String(data.sourceTransactionHash),
97
+ String(data.sourceChainId),
98
+ String(data.targetChainId),
99
+ ]);
100
+ };
101
+ exports.generateInteropTransactionHash = generateInteropTransactionHash;
package/package.json ADDED
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "@instadapp/interop-x",
3
+ "version": "0.0.0-dev.0b0cc3f",
4
+ "license": "MIT",
5
+ "main": "dist/index.js",
6
+ "engines": {
7
+ "node": ">=16",
8
+ "yarn": "^1.22.0"
9
+ },
10
+ "scripts": {
11
+ "start": "yarn build && node bin/interop-x",
12
+ "build": "yarn generate-abi-types && export GIT_REF=$(git rev-parse --short HEAD) && rimraf ./dist && tsc -p tsconfig.json && replace-in-file '@GIT_SHORT_HASH@' $GIT_REF ./dist/**/*.js",
13
+ "dev": "yarn generate-abi-types && NODE_ENV=development nodemon",
14
+ "generate-abi-types": "typechain --target=ethers-v5 'src/abi/*.json' --out-dir 'src/typechain'",
15
+ "prepublishOnly": "yarn build"
16
+ },
17
+ "nodemonConfig": {
18
+ "watch": [
19
+ "src"
20
+ ],
21
+ "ext": "ts",
22
+ "exec": "./node_modules/.bin/ts-node --files -r tsconfig-paths/register ./src/index.ts"
23
+ },
24
+ "dependencies": {
25
+ "@achingbrain/libp2p-gossipsub": "^0.12.2",
26
+ "axios": "^0.27.1",
27
+ "axios-retry": "^3.2.4",
28
+ "bignumber.js": "^9.0.2",
29
+ "chalk": "4.1.2",
30
+ "dotenv": "^16.0.0",
31
+ "ethereumjs-util": "^7.1.4",
32
+ "ethers": "^5.6.4",
33
+ "ethers-multisend": "^2.1.1",
34
+ "expand-home-dir": "^0.0.3",
35
+ "libp2p": "^0.36.2",
36
+ "libp2p-bootstrap": "^0.14.0",
37
+ "libp2p-kad-dht": "^0.28.6",
38
+ "libp2p-mdns": "^0.18.0",
39
+ "libp2p-mplex": "^0.10.7",
40
+ "libp2p-noise": "^4.0.0",
41
+ "libp2p-pubsub-peer-discovery": "^4.0.0",
42
+ "libp2p-tcp": "^0.17.2",
43
+ "libp2p-websockets": "^0.16.2",
44
+ "luxon": "^2.3.2",
45
+ "module-alias": "^2.2.2",
46
+ "sequelize": "^6.19.0",
47
+ "sqlite3": "^5.0.5",
48
+ "waait": "^1.0.5"
49
+ },
50
+ "bin": {
51
+ "interop-node": "bin/interop-x"
52
+ },
53
+ "devDependencies": {
54
+ "@typechain/ethers-v5": "^10.0.0",
55
+ "@types/bn.js": "^5.1.0",
56
+ "@types/fs-extra": "^9.0.13",
57
+ "@types/node": "^17.0.17",
58
+ "nodemon": "^2.0.15",
59
+ "replace-in-file": "^6.3.2",
60
+ "rimraf": "^3.0.2",
61
+ "ts-node": "^10.5.0",
62
+ "tsconfig-paths": "^3.12.0",
63
+ "typechain": "^8.0.0",
64
+ "typescript": "^4.5.5"
65
+ },
66
+ "_moduleAliases": {
67
+ "@/": "./dist",
68
+ "@/logger": "./dist/logger",
69
+ "@/tasks": "./dist/tasks",
70
+ "@/utils": "./dist/utils",
71
+ "@/net": "./dist/net",
72
+ "@/db": "./dist/db",
73
+ "@/config": "./dist/config",
74
+ "@/types": "./dist/types",
75
+ "@/abi": "./dist/abi",
76
+ "@/constants": "./dist/constants",
77
+ "@/typechain": "./dist/typechain"
78
+ }
79
+ }
@@ -0,0 +1,350 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "uint256",
6
+ "name": "_totalSupply",
7
+ "type": "uint256"
8
+ }
9
+ ],
10
+ "payable": false,
11
+ "stateMutability": "nonpayable",
12
+ "type": "constructor"
13
+ },
14
+ {
15
+ "anonymous": false,
16
+ "inputs": [
17
+ {
18
+ "indexed": true,
19
+ "internalType": "address",
20
+ "name": "owner",
21
+ "type": "address"
22
+ },
23
+ {
24
+ "indexed": true,
25
+ "internalType": "address",
26
+ "name": "spender",
27
+ "type": "address"
28
+ },
29
+ {
30
+ "indexed": false,
31
+ "internalType": "uint256",
32
+ "name": "value",
33
+ "type": "uint256"
34
+ }
35
+ ],
36
+ "name": "Approval",
37
+ "type": "event"
38
+ },
39
+ {
40
+ "anonymous": false,
41
+ "inputs": [
42
+ {
43
+ "indexed": true,
44
+ "internalType": "address",
45
+ "name": "from",
46
+ "type": "address"
47
+ },
48
+ {
49
+ "indexed": true,
50
+ "internalType": "address",
51
+ "name": "to",
52
+ "type": "address"
53
+ },
54
+ {
55
+ "indexed": false,
56
+ "internalType": "uint256",
57
+ "name": "value",
58
+ "type": "uint256"
59
+ }
60
+ ],
61
+ "name": "Transfer",
62
+ "type": "event"
63
+ },
64
+ {
65
+ "constant": true,
66
+ "inputs": [],
67
+ "name": "DOMAIN_SEPARATOR",
68
+ "outputs": [
69
+ {
70
+ "internalType": "bytes32",
71
+ "name": "",
72
+ "type": "bytes32"
73
+ }
74
+ ],
75
+ "payable": false,
76
+ "stateMutability": "view",
77
+ "type": "function"
78
+ },
79
+ {
80
+ "constant": true,
81
+ "inputs": [],
82
+ "name": "PERMIT_TYPEHASH",
83
+ "outputs": [
84
+ {
85
+ "internalType": "bytes32",
86
+ "name": "",
87
+ "type": "bytes32"
88
+ }
89
+ ],
90
+ "payable": false,
91
+ "stateMutability": "view",
92
+ "type": "function"
93
+ },
94
+ {
95
+ "constant": true,
96
+ "inputs": [
97
+ {
98
+ "internalType": "address",
99
+ "name": "",
100
+ "type": "address"
101
+ },
102
+ {
103
+ "internalType": "address",
104
+ "name": "",
105
+ "type": "address"
106
+ }
107
+ ],
108
+ "name": "allowance",
109
+ "outputs": [
110
+ {
111
+ "internalType": "uint256",
112
+ "name": "",
113
+ "type": "uint256"
114
+ }
115
+ ],
116
+ "payable": false,
117
+ "stateMutability": "view",
118
+ "type": "function"
119
+ },
120
+ {
121
+ "constant": false,
122
+ "inputs": [
123
+ {
124
+ "internalType": "address",
125
+ "name": "spender",
126
+ "type": "address"
127
+ },
128
+ {
129
+ "internalType": "uint256",
130
+ "name": "value",
131
+ "type": "uint256"
132
+ }
133
+ ],
134
+ "name": "approve",
135
+ "outputs": [
136
+ {
137
+ "internalType": "bool",
138
+ "name": "",
139
+ "type": "bool"
140
+ }
141
+ ],
142
+ "payable": false,
143
+ "stateMutability": "nonpayable",
144
+ "type": "function"
145
+ },
146
+ {
147
+ "constant": true,
148
+ "inputs": [
149
+ {
150
+ "internalType": "address",
151
+ "name": "",
152
+ "type": "address"
153
+ }
154
+ ],
155
+ "name": "balanceOf",
156
+ "outputs": [
157
+ {
158
+ "internalType": "uint256",
159
+ "name": "",
160
+ "type": "uint256"
161
+ }
162
+ ],
163
+ "payable": false,
164
+ "stateMutability": "view",
165
+ "type": "function"
166
+ },
167
+ {
168
+ "constant": true,
169
+ "inputs": [],
170
+ "name": "decimals",
171
+ "outputs": [
172
+ {
173
+ "internalType": "uint8",
174
+ "name": "",
175
+ "type": "uint8"
176
+ }
177
+ ],
178
+ "payable": false,
179
+ "stateMutability": "view",
180
+ "type": "function"
181
+ },
182
+ {
183
+ "constant": true,
184
+ "inputs": [],
185
+ "name": "name",
186
+ "outputs": [
187
+ {
188
+ "internalType": "string",
189
+ "name": "",
190
+ "type": "string"
191
+ }
192
+ ],
193
+ "payable": false,
194
+ "stateMutability": "view",
195
+ "type": "function"
196
+ },
197
+ {
198
+ "constant": true,
199
+ "inputs": [
200
+ {
201
+ "internalType": "address",
202
+ "name": "",
203
+ "type": "address"
204
+ }
205
+ ],
206
+ "name": "nonces",
207
+ "outputs": [
208
+ {
209
+ "internalType": "uint256",
210
+ "name": "",
211
+ "type": "uint256"
212
+ }
213
+ ],
214
+ "payable": false,
215
+ "stateMutability": "view",
216
+ "type": "function"
217
+ },
218
+ {
219
+ "constant": false,
220
+ "inputs": [
221
+ {
222
+ "internalType": "address",
223
+ "name": "owner",
224
+ "type": "address"
225
+ },
226
+ {
227
+ "internalType": "address",
228
+ "name": "spender",
229
+ "type": "address"
230
+ },
231
+ {
232
+ "internalType": "uint256",
233
+ "name": "value",
234
+ "type": "uint256"
235
+ },
236
+ {
237
+ "internalType": "uint256",
238
+ "name": "deadline",
239
+ "type": "uint256"
240
+ },
241
+ {
242
+ "internalType": "uint8",
243
+ "name": "v",
244
+ "type": "uint8"
245
+ },
246
+ {
247
+ "internalType": "bytes32",
248
+ "name": "r",
249
+ "type": "bytes32"
250
+ },
251
+ {
252
+ "internalType": "bytes32",
253
+ "name": "s",
254
+ "type": "bytes32"
255
+ }
256
+ ],
257
+ "name": "permit",
258
+ "outputs": [],
259
+ "payable": false,
260
+ "stateMutability": "nonpayable",
261
+ "type": "function"
262
+ },
263
+ {
264
+ "constant": true,
265
+ "inputs": [],
266
+ "name": "symbol",
267
+ "outputs": [
268
+ {
269
+ "internalType": "string",
270
+ "name": "",
271
+ "type": "string"
272
+ }
273
+ ],
274
+ "payable": false,
275
+ "stateMutability": "view",
276
+ "type": "function"
277
+ },
278
+ {
279
+ "constant": true,
280
+ "inputs": [],
281
+ "name": "totalSupply",
282
+ "outputs": [
283
+ {
284
+ "internalType": "uint256",
285
+ "name": "",
286
+ "type": "uint256"
287
+ }
288
+ ],
289
+ "payable": false,
290
+ "stateMutability": "view",
291
+ "type": "function"
292
+ },
293
+ {
294
+ "constant": false,
295
+ "inputs": [
296
+ {
297
+ "internalType": "address",
298
+ "name": "to",
299
+ "type": "address"
300
+ },
301
+ {
302
+ "internalType": "uint256",
303
+ "name": "value",
304
+ "type": "uint256"
305
+ }
306
+ ],
307
+ "name": "transfer",
308
+ "outputs": [
309
+ {
310
+ "internalType": "bool",
311
+ "name": "",
312
+ "type": "bool"
313
+ }
314
+ ],
315
+ "payable": false,
316
+ "stateMutability": "nonpayable",
317
+ "type": "function"
318
+ },
319
+ {
320
+ "constant": false,
321
+ "inputs": [
322
+ {
323
+ "internalType": "address",
324
+ "name": "from",
325
+ "type": "address"
326
+ },
327
+ {
328
+ "internalType": "address",
329
+ "name": "to",
330
+ "type": "address"
331
+ },
332
+ {
333
+ "internalType": "uint256",
334
+ "name": "value",
335
+ "type": "uint256"
336
+ }
337
+ ],
338
+ "name": "transferFrom",
339
+ "outputs": [
340
+ {
341
+ "internalType": "bool",
342
+ "name": "",
343
+ "type": "bool"
344
+ }
345
+ ],
346
+ "payable": false,
347
+ "stateMutability": "nonpayable",
348
+ "type": "function"
349
+ }
350
+ ]