@instadapp/interop-x 0.0.0-dev.f0a6281 → 0.0.0-dev.fabee70

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 (36) hide show
  1. package/dist/package.json +2 -2
  2. package/dist/src/abi/interopBridgeToken.json +9 -21
  3. package/dist/src/abi/interopXGateway.json +11 -11
  4. package/dist/src/config/index.js +1 -10
  5. package/dist/src/constants/addresses.js +1 -1
  6. package/dist/src/constants/itokens.js +1 -1
  7. package/dist/src/index.js +5 -28
  8. package/dist/src/net/protocol/dial/{TransactionStatusDialProtocol.js → SignatureDialProtocol.1.js} +0 -0
  9. package/dist/src/net/protocol/index.js +2 -2
  10. package/dist/src/tasks/AutoUpdateTask.js +7 -20
  11. package/dist/src/tasks/BaseTask.js +0 -4
  12. package/dist/src/tasks/InteropBridge/SyncWithdrawEvents.js +5 -7
  13. package/dist/src/tasks/InteropXGateway/ProcessDepositEvents.js +1 -13
  14. package/dist/src/tasks/InteropXGateway/SyncDepositEvents.js +2 -2
  15. package/dist/src/typechain/factories/InteropBridgeToken__factory.js +11 -23
  16. package/dist/src/typechain/factories/InteropXGateway__factory.js +14 -14
  17. package/dist/src/utils/index.js +6 -6
  18. package/package.json +2 -2
  19. package/src/abi/interopBridgeToken.json +9 -21
  20. package/src/abi/interopXGateway.json +11 -11
  21. package/src/config/index.ts +1 -9
  22. package/src/constants/addresses.ts +1 -1
  23. package/src/constants/itokens.ts +1 -1
  24. package/src/index.ts +9 -41
  25. package/src/net/protocol/dial/{TransactionStatusDialProtocol.ts → SignatureDialProtocol.1.ts} +0 -0
  26. package/src/net/protocol/index.ts +1 -1
  27. package/src/tasks/AutoUpdateTask.ts +15 -24
  28. package/src/tasks/BaseTask.ts +0 -5
  29. package/src/tasks/InteropBridge/SyncWithdrawEvents.ts +5 -7
  30. package/src/tasks/InteropXGateway/ProcessDepositEvents.ts +4 -17
  31. package/src/tasks/InteropXGateway/SyncDepositEvents.ts +2 -2
  32. package/src/typechain/InteropBridgeToken.ts +17 -23
  33. package/src/typechain/InteropXGateway.ts +13 -13
  34. package/src/typechain/factories/InteropBridgeToken__factory.ts +11 -23
  35. package/src/typechain/factories/InteropXGateway__factory.ts +14 -14
  36. package/src/utils/index.ts +6 -6
@@ -46,17 +46,11 @@
46
46
  "name": "amount",
47
47
  "type": "uint256"
48
48
  },
49
- {
50
- "indexed": false,
51
- "internalType": "uint32",
52
- "name": "sourceChainId",
53
- "type": "uint32"
54
- },
55
49
  {
56
50
  "indexed": true,
57
- "internalType": "uint32",
58
- "name": "targetChainId",
59
- "type": "uint32"
51
+ "internalType": "uint256",
52
+ "name": "chainId",
53
+ "type": "uint256"
60
54
  }
61
55
  ],
62
56
  "name": "Burn",
@@ -79,20 +73,14 @@
79
73
  },
80
74
  {
81
75
  "indexed": true,
82
- "internalType": "uint32",
83
- "name": "sourceChainId",
84
- "type": "uint32"
85
- },
86
- {
87
- "indexed": false,
88
- "internalType": "uint32",
89
- "name": "targetChainId",
90
- "type": "uint32"
76
+ "internalType": "uint256",
77
+ "name": "chainId",
78
+ "type": "uint256"
91
79
  },
92
80
  {
93
81
  "indexed": true,
94
82
  "internalType": "bytes32",
95
- "name": "submitTransactionHash",
83
+ "name": "transactionHash",
96
84
  "type": "bytes32"
97
85
  }
98
86
  ],
@@ -176,7 +164,7 @@
176
164
  "inputs": [
177
165
  { "internalType": "address", "name": "to", "type": "address" },
178
166
  { "internalType": "uint256", "name": "amount", "type": "uint256" },
179
- { "internalType": "uint32", "name": "chainId", "type": "uint32" }
167
+ { "internalType": "uint256", "name": "chainId", "type": "uint256" }
180
168
  ],
181
169
  "name": "burn",
182
170
  "outputs": [],
@@ -218,7 +206,7 @@
218
206
  "inputs": [
219
207
  { "internalType": "address", "name": "to", "type": "address" },
220
208
  { "internalType": "uint256", "name": "amount", "type": "uint256" },
221
- { "internalType": "uint32", "name": "chainId", "type": "uint32" },
209
+ { "internalType": "uint256", "name": "chainId", "type": "uint256" },
222
210
  {
223
211
  "internalType": "bytes32",
224
212
  "name": "transactionHash",
@@ -35,15 +35,15 @@
35
35
  },
36
36
  {
37
37
  "indexed": false,
38
- "internalType": "uint32",
38
+ "internalType": "uint256",
39
39
  "name": "sourceChainId",
40
- "type": "uint32"
40
+ "type": "uint256"
41
41
  },
42
42
  {
43
43
  "indexed": true,
44
- "internalType": "uint32",
44
+ "internalType": "uint256",
45
45
  "name": "targetChainId",
46
- "type": "uint32"
46
+ "type": "uint256"
47
47
  }
48
48
  ],
49
49
  "name": "LogGatewayDeposit",
@@ -72,15 +72,15 @@
72
72
  },
73
73
  {
74
74
  "indexed": true,
75
- "internalType": "uint32",
75
+ "internalType": "uint256",
76
76
  "name": "sourceChainId",
77
- "type": "uint32"
77
+ "type": "uint256"
78
78
  },
79
79
  {
80
80
  "indexed": false,
81
- "internalType": "uint32",
81
+ "internalType": "uint256",
82
82
  "name": "targetChainId",
83
- "type": "uint32"
83
+ "type": "uint256"
84
84
  },
85
85
  {
86
86
  "indexed": true,
@@ -122,7 +122,7 @@
122
122
  "inputs": [
123
123
  { "internalType": "address", "name": "token_", "type": "address" },
124
124
  { "internalType": "uint256", "name": "amount_", "type": "uint256" },
125
- { "internalType": "uint32", "name": "chainId_", "type": "uint32" }
125
+ { "internalType": "uint256", "name": "chainId_", "type": "uint256" }
126
126
  ],
127
127
  "name": "deposit",
128
128
  "outputs": [],
@@ -134,7 +134,7 @@
134
134
  { "internalType": "address", "name": "to_", "type": "address" },
135
135
  { "internalType": "address", "name": "token_", "type": "address" },
136
136
  { "internalType": "uint256", "name": "amount_", "type": "uint256" },
137
- { "internalType": "uint32", "name": "chainId_", "type": "uint32" }
137
+ { "internalType": "uint256", "name": "chainId_", "type": "uint256" }
138
138
  ],
139
139
  "name": "depositFor",
140
140
  "outputs": [],
@@ -160,7 +160,7 @@
160
160
  { "internalType": "uint256", "name": "amount_", "type": "uint256" },
161
161
  { "internalType": "address", "name": "user_", "type": "address" },
162
162
  { "internalType": "address", "name": "token_", "type": "address" },
163
- { "internalType": "uint32", "name": "chainId_", "type": "uint32" },
163
+ { "internalType": "uint256", "name": "chainId_", "type": "uint256" },
164
164
  {
165
165
  "internalType": "bytes32",
166
166
  "name": "transactionHash_",
@@ -1,7 +1,5 @@
1
1
  import { ethers, Wallet } from "ethers"
2
2
  import { EventBus, EventBusType } from "@/types"
3
- import fs from 'fs-extra'
4
- import expandHomeDir from "expand-home-dir";
5
3
 
6
4
  class Config {
7
5
  public readonly events: EventBusType
@@ -11,17 +9,15 @@ class Config {
11
9
  public readonly wallet: Wallet
12
10
  public readonly staging: boolean
13
11
  public readonly autoUpdate: boolean
14
- public readonly baseConfigPath: string
15
12
 
16
13
  constructor() {
17
14
  this.events = new EventBus() as EventBusType
18
- this.maxPeers = 20
15
+ this.maxPeers = 10
19
16
  this.privateKey = process.env.PRIVATE_KEY as string;
20
17
  this.staging = !! process.env.STAGING && process.env.STAGING === 'true';
21
18
  this.autoUpdate = !! process.env.AUTO_UPDATE && process.env.AUTO_UPDATE === 'true';
22
19
  this.wallet = new Wallet(this.privateKey);
23
20
  this.leadNodeAddress = '0x910E413DBF3F6276Fe8213fF656726bDc142E08E'
24
- this.baseConfigPath = expandHomeDir(`~/.interop-x`);
25
21
  }
26
22
 
27
23
  get publicAddress(){
@@ -31,10 +27,6 @@ class Config {
31
27
  isLeadNode() {
32
28
  return ethers.utils.getAddress(this.leadNodeAddress) === ethers.utils.getAddress(this.wallet.address)
33
29
  }
34
-
35
- isMaintenanceMode(){
36
- return fs.existsSync(this.baseConfigPath + '/maintenance')
37
- }
38
30
  }
39
31
 
40
32
  export default new Config()
@@ -12,6 +12,6 @@ export const addresses = {
12
12
  43114: {
13
13
  gnosisSafe: '0x31d7a5194Fe60AC209Cf1Ce2d539C9A60662Ed6b',
14
14
  multisend: '0x998739BFdAAdde7C933B942a68053933098f9EDa',
15
- interopXGateway: '0xF0317C5Bc206F2291dd2f3eE9C4cDB5Bbb25418d',
15
+ interopXGateway: '0x8D27758751BA488690974B6Ccfcda771D462945f',
16
16
  }
17
17
  }
@@ -2,7 +2,7 @@ export const itokens = {
2
2
  1: [],
3
3
  137: [
4
4
  {
5
- address: '0x62C0045f3277E7067cAcad3c8038eEaBB1Bd92D1',
5
+ address: '0xEab02fe1F016eE3e4106c1C6aad35FeEe657268E',
6
6
  symbol: 'USDC',
7
7
  }
8
8
  ],
package/src/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import moduleAlias from 'module-alias';
2
- import expandHomeDir from "expand-home-dir";
3
- import fs from 'fs-extra'
2
+
4
3
  moduleAlias.addAliases({
5
4
  "@/": __dirname + "/",
6
5
  "@/logger": __dirname + "/logger",
@@ -26,30 +25,12 @@ dotenv.config();
26
25
  import Logger from "@/logger";
27
26
  const logger = new Logger('Process')
28
27
 
29
- const GIT_SHORT_HASH = '@GIT_SHORT_HASH@';
30
-
31
28
  const printUsage = () => {
32
- console.log()
33
- console.log(`Interop X Node (v${packageJson.version} - rev.${GIT_SHORT_HASH})`)
34
- console.log()
35
-
36
29
  console.log('Usage:')
37
- console.log(' interop-x help Show this message')
38
- console.log(' interop-x version Print out the installed version of Interop X')
39
-
40
- console.log()
41
-
42
- console.log(' interop-x down Put the node into maintenance mode')
43
- console.log(' interop-x up Take the node out of maintenance mode')
44
-
45
- console.log()
46
-
47
- console.log(' PRIVATE_KEY=abcd1234 interop-x Start the node with the given private key')
48
- console.log(' PRIVATE_KEY=abcd1234 STAGING=true interop-x Start the node in staging mode')
49
- console.log(' PRIVATE_KEY=abcd1234 AUTO_UPDATE=true interop-x Start the node in auto update mode')
50
- console.log(' PRIVATE_KEY=abcd1234 API_HOST=0.0.0.0 API_PORT=8080 interop-x Start the node with custom API host and port')
51
- console.log()
52
-
30
+ console.log(' PRIVATE_KEY=abcd1234 interop-x')
31
+ console.log(' PRIVATE_KEY=abcd1234 STAGING=true interop-x')
32
+ console.log(' PRIVATE_KEY=abcd1234 AUTO_UPDATE=true interop-x')
33
+ console.log(' PRIVATE_KEY=abcd1234 API_HOST=0.0.0.0 API_PORT=8080 interop-x')
53
34
  }
54
35
 
55
36
  if (process.argv.at(-1) === 'help') {
@@ -57,27 +38,14 @@ if (process.argv.at(-1) === 'help') {
57
38
  process.exit(0)
58
39
  }
59
40
 
60
- const basePath = expandHomeDir(`~/.interop-x`);
61
-
62
- if (process.argv.at(-1) === 'down') {
63
- fs.outputFileSync(basePath + '/maintenance', Date.now().toString())
64
- console.log(chalk.red('Maintenance mode enabled'))
65
- process.exit(0)
66
- }
67
-
68
- if (process.argv.at(-1) === 'up') {
69
- fs.removeSync(basePath + '/maintenance')
70
- console.log(chalk.green('Maintenance mode disabled'))
71
- process.exit(0)
72
- }
73
-
41
+ const GIT_SHORT_HASH = '@GIT_SHORT_HASH@';
74
42
 
75
43
  if (process.argv.at(-1) === 'version') {
76
44
  console.log(`Interop X Node (v${packageJson.version} - rev.${GIT_SHORT_HASH})`)
77
45
  process.exit(0)
78
46
  }
79
47
 
80
- if (!process.env.PRIVATE_KEY) {
48
+ if(! process.env.PRIVATE_KEY) {
81
49
  console.error(chalk.bgRed.white.bold('Please provide a private key\n'))
82
50
  printUsage()
83
51
  process.exit(1)
@@ -112,10 +80,10 @@ async function main() {
112
80
  if (!peerPool.isLeadNode(payload.peerId)) {
113
81
  const peer = peerPool.getPeer(payload.peerId)
114
82
 
115
- if (!peer) {
83
+ if(! peer) {
116
84
  return;
117
85
  }
118
-
86
+
119
87
  logger.info(`ignored transaction status from ${payload.peerId} ${shortenHash(peer.publicAddress)} `)
120
88
  return;
121
89
  }
@@ -6,7 +6,7 @@ import { IPeerInfo, peerPool } from "..";
6
6
  import config from "@/config";
7
7
  import { Event } from "@/types";
8
8
  import { Transaction } from "@/db";
9
- import { TransactionStatusDialProtocol } from "./dial/TransactionStatusDialProtocol";
9
+ import { TransactionStatusDialProtocol } from "./dial/SignatureDialProtocol.1";
10
10
 
11
11
  export interface ProtocolOptions {
12
12
  /* Handshake timeout in ms (default: 8000) */
@@ -1,16 +1,15 @@
1
1
  import { BaseTask } from "./BaseTask";
2
2
  import Logger from '@/logger';
3
- import spawnAsync from 'await-spawn';
4
- import { spawn } from 'child_process'
3
+ import { http } from "@/utils";
4
+ import spawn from 'await-spawn';
5
5
  import config from "@/config";
6
6
  import wait from "waait";
7
7
  import packageJson from "../../package.json";
8
8
 
9
9
  const currentVersion = packageJson.version;
10
- const tag = config.staging ? 'dev' : 'latest';
11
10
 
12
11
  class AutoUpdateTask extends BaseTask {
13
- pollIntervalMs: number = 60 * 10 * 1000
12
+ pollIntervalMs: number = 60 * 5 * 1000
14
13
 
15
14
  constructor() {
16
15
  super({
@@ -24,26 +23,22 @@ class AutoUpdateTask extends BaseTask {
24
23
 
25
24
  async getInstalledVersion() {
26
25
  try {
27
- const stdout = await spawnAsync('npm', ['-g', 'ls', '--depth=0', '--json'])
28
- return JSON.parse(stdout.toString()).dependencies[packageJson.name].version
29
- } catch (error) {
30
- this.logger.error(error)
31
- return currentVersion
32
- }
33
- }
26
+ const stdout = await spawn('npm', ['-g', 'ls', '--depth=0', '--json'])
34
27
 
35
- async getLatestVersion() {
36
- try {
37
- const stdout = await spawnAsync('npm', ['view', `${packageJson.name}@${tag}`, 'version'])
38
- return stdout.toString().trim()
28
+
29
+ return JSON.parse(stdout.toString()).dependencies[packageJson.name].version
39
30
  } catch (error) {
40
31
  this.logger.error(error)
32
+
41
33
  return currentVersion
42
34
  }
43
35
  }
44
36
 
45
37
  async pollHandler() {
46
- const version = await this.getLatestVersion()
38
+
39
+ const { data } = await http.get('https://registry.npmjs.org/@instadapp/interop-x')
40
+
41
+ const version = data['dist-tags'].latest
47
42
 
48
43
  if (version === currentVersion) {
49
44
  return;
@@ -51,9 +46,10 @@ class AutoUpdateTask extends BaseTask {
51
46
 
52
47
  this.logger.warn(`New version ${version} available.`)
53
48
 
49
+
54
50
  this.logger.info('Updating...')
55
51
 
56
- await spawnAsync('npm', ['-g', 'install', `@instadapp/interop-x@${tag}`, '-f']);
52
+ await spawn('npm', ['-g', 'install', '@instadapp/interop-x', '-f']);
57
53
 
58
54
  await wait(5000)
59
55
 
@@ -65,16 +61,11 @@ class AutoUpdateTask extends BaseTask {
65
61
  this.logger.warn(`Installed version ${version}`)
66
62
  this.logger.warn(`Restarting...`)
67
63
 
68
-
69
- // TODO: its restarting in the bg, but it should be in the fg
70
- const subprocess = spawn(process.argv[0], process.argv.slice(1), {
64
+ spawn(process.argv[0], process.argv.slice(1), {
71
65
  cwd: process.cwd(),
72
- stdio: "inherit",
73
- // shell: process.env.SHELL,
66
+ stdio: "inherit"
74
67
  });
75
68
 
76
- subprocess.unref();
77
-
78
69
  process.exit()
79
70
  }
80
71
  }
@@ -46,11 +46,6 @@ export class BaseTask extends EventEmitter implements IBaseTask {
46
46
  }
47
47
 
48
48
  prePollHandler(): boolean {
49
- if(config.isMaintenanceMode()){
50
- this.logger.warn('Maintenance mode is enabled. Skipping task.')
51
- return false
52
- }
53
-
54
49
  if (this.exceptLeadNode) {
55
50
  return !config.isLeadNode();
56
51
  }
@@ -41,13 +41,13 @@ class SyncWithdrawEvents extends BaseTask {
41
41
  continue;
42
42
  }
43
43
 
44
- const { to, amount, sourceChainId, targetChainId } = event.args;
44
+ const { to, amount, chainId } = event.args;
45
45
 
46
46
  const uniqueIdentifier = {
47
47
  action: 'withdraw',
48
48
  submitTransactionHash: event.transactionHash,
49
- sourceChainId: sourceChainId,
50
- targetChainId: targetChainId,
49
+ sourceChainId:this.chainId,
50
+ targetChainId: chainId.toNumber(),
51
51
  }
52
52
 
53
53
  if (await Transaction.findOne({ where: uniqueIdentifier })) {
@@ -77,16 +77,14 @@ class SyncWithdrawEvents extends BaseTask {
77
77
  to,
78
78
  amount: amount.toString(),
79
79
  itoken: this.itokenAddress,
80
- sourceChainId: sourceChainId,
81
- targetChainId: targetChainId,
80
+ chainId: chainId.toString()
82
81
  },
83
82
 
84
83
  sourceEvent: {
85
84
  to,
86
85
  amount: amount.toString(),
87
86
  itoken: this.itokenAddress,
88
- sourceChainId: sourceChainId,
89
- targetChainId: targetChainId,
87
+ chainId: chainId.toString(),
90
88
  },
91
89
  status: "pending",
92
90
  })
@@ -15,7 +15,7 @@ import { LogDescription } from "ethers/lib/utils";
15
15
 
16
16
  const generateGnosisTransaction = async (transactionData: any, safeContract: GnosisSafe) => {
17
17
  console.log(transactionData);
18
-
18
+
19
19
  let isExecuted = await safeContract.dataHashes(
20
20
  await safeContract.getTransactionHash(
21
21
  transactionData.to,
@@ -97,7 +97,7 @@ class ProcessDepositEvents extends BaseTask {
97
97
  }
98
98
 
99
99
  console.log(`Processing transaction ${transaction.transactionHash}`);
100
-
100
+
101
101
  transaction.targetStatus = 'pending';
102
102
  await transaction.save();
103
103
 
@@ -121,22 +121,9 @@ class ProcessDepositEvents extends BaseTask {
121
121
  const ownersThreshold = await safeContract.getThreshold();
122
122
  await wait(10000);
123
123
 
124
- let data;
125
-
126
- try {
127
- data = await buildDataForTransaction(transaction);
128
- } catch (error) {
129
- console.log(error);
130
- transaction.targetStatus = 'failed';
131
- transaction.targetErrors = [error.message];
132
- await transaction.save();
133
- protocol.sendTransaction(transaction)
134
- return;
135
- }
136
-
137
124
  let gnosisTx = await generateGnosisTransaction({
138
125
  baseGas: "0",
139
- data,
126
+ data: await buildDataForTransaction(transaction),
140
127
  gasPrice: "0",
141
128
  gasToken: "0x0000000000000000000000000000000000000000",
142
129
  nonce: '0',
@@ -155,7 +142,7 @@ class ProcessDepositEvents extends BaseTask {
155
142
  console.log(`Collecting signatures for execution ${transaction.transactionHash}`)
156
143
 
157
144
  console.log(ownerPeerIds);
158
-
145
+
159
146
  const signatures = await protocol.requestSignatures({
160
147
  type: 'source',
161
148
  transactionHash: transaction.transactionHash,
@@ -45,8 +45,8 @@ class SyncDepositEvents extends BaseTask {
45
45
  const uniqueIdentifier = {
46
46
  action: 'deposit',
47
47
  submitTransactionHash: event.transactionHash,
48
- sourceChainId: sourceChainId,
49
- targetChainId: targetChainId,
48
+ sourceChainId: sourceChainId.toNumber(),
49
+ targetChainId: targetChainId.toNumber(),
50
50
  }
51
51
 
52
52
  if (await Transaction.findOne({ where: uniqueIdentifier })) {
@@ -31,11 +31,11 @@ export interface InteropBridgeTokenInterface extends utils.Interface {
31
31
  "allowance(address,address)": FunctionFragment;
32
32
  "approve(address,uint256)": FunctionFragment;
33
33
  "balanceOf(address)": FunctionFragment;
34
- "burn(address,uint256,uint32)": FunctionFragment;
34
+ "burn(address,uint256,uint256)": FunctionFragment;
35
35
  "decimals()": FunctionFragment;
36
36
  "decreaseAllowance(address,uint256)": FunctionFragment;
37
37
  "increaseAllowance(address,uint256)": FunctionFragment;
38
- "mint(address,uint256,uint32,bytes32)": FunctionFragment;
38
+ "mint(address,uint256,uint256,bytes32)": FunctionFragment;
39
39
  "name()": FunctionFragment;
40
40
  "owner()": FunctionFragment;
41
41
  "renounceOwnership()": FunctionFragment;
@@ -153,8 +153,8 @@ export interface InteropBridgeTokenInterface extends utils.Interface {
153
153
 
154
154
  events: {
155
155
  "Approval(address,address,uint256)": EventFragment;
156
- "Burn(address,uint256,uint32,uint32)": EventFragment;
157
- "Mint(address,uint256,uint32,uint32,bytes32)": EventFragment;
156
+ "Burn(address,uint256,uint256)": EventFragment;
157
+ "Mint(address,uint256,uint256,bytes32)": EventFragment;
158
158
  "OwnershipTransferred(address,address)": EventFragment;
159
159
  "Transfer(address,address,uint256)": EventFragment;
160
160
  };
@@ -181,11 +181,10 @@ export type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;
181
181
  export interface BurnEventObject {
182
182
  to: string;
183
183
  amount: BigNumber;
184
- sourceChainId: number;
185
- targetChainId: number;
184
+ chainId: BigNumber;
186
185
  }
187
186
  export type BurnEvent = TypedEvent<
188
- [string, BigNumber, number, number],
187
+ [string, BigNumber, BigNumber],
189
188
  BurnEventObject
190
189
  >;
191
190
 
@@ -194,12 +193,11 @@ export type BurnEventFilter = TypedEventFilter<BurnEvent>;
194
193
  export interface MintEventObject {
195
194
  to: string;
196
195
  amount: BigNumber;
197
- sourceChainId: number;
198
- targetChainId: number;
199
- submitTransactionHash: string;
196
+ chainId: BigNumber;
197
+ transactionHash: string;
200
198
  }
201
199
  export type MintEvent = TypedEvent<
202
- [string, BigNumber, number, number, string],
200
+ [string, BigNumber, BigNumber, string],
203
201
  MintEventObject
204
202
  >;
205
203
 
@@ -488,32 +486,28 @@ export interface InteropBridgeToken extends BaseContract {
488
486
  value?: null
489
487
  ): ApprovalEventFilter;
490
488
 
491
- "Burn(address,uint256,uint32,uint32)"(
489
+ "Burn(address,uint256,uint256)"(
492
490
  to?: string | null,
493
491
  amount?: null,
494
- sourceChainId?: null,
495
- targetChainId?: BigNumberish | null
492
+ chainId?: BigNumberish | null
496
493
  ): BurnEventFilter;
497
494
  Burn(
498
495
  to?: string | null,
499
496
  amount?: null,
500
- sourceChainId?: null,
501
- targetChainId?: BigNumberish | null
497
+ chainId?: BigNumberish | null
502
498
  ): BurnEventFilter;
503
499
 
504
- "Mint(address,uint256,uint32,uint32,bytes32)"(
500
+ "Mint(address,uint256,uint256,bytes32)"(
505
501
  to?: string | null,
506
502
  amount?: null,
507
- sourceChainId?: BigNumberish | null,
508
- targetChainId?: null,
509
- submitTransactionHash?: BytesLike | null
503
+ chainId?: BigNumberish | null,
504
+ transactionHash?: BytesLike | null
510
505
  ): MintEventFilter;
511
506
  Mint(
512
507
  to?: string | null,
513
508
  amount?: null,
514
- sourceChainId?: BigNumberish | null,
515
- targetChainId?: null,
516
- submitTransactionHash?: BytesLike | null
509
+ chainId?: BigNumberish | null,
510
+ transactionHash?: BytesLike | null
517
511
  ): MintEventFilter;
518
512
 
519
513
  "OwnershipTransferred(address,address)"(
@@ -29,11 +29,11 @@ import type {
29
29
  export interface InteropXGatewayInterface extends utils.Interface {
30
30
  functions: {
31
31
  "_vnonce()": FunctionFragment;
32
- "deposit(address,uint256,uint32)": FunctionFragment;
33
- "depositFor(address,address,uint256,uint32)": FunctionFragment;
32
+ "deposit(address,uint256,uint256)": FunctionFragment;
33
+ "depositFor(address,address,uint256,uint256)": FunctionFragment;
34
34
  "owner()": FunctionFragment;
35
35
  "renounceOwnership()": FunctionFragment;
36
- "systemWithdraw(uint256,address,address,uint32,bytes32)": FunctionFragment;
36
+ "systemWithdraw(uint256,address,address,uint256,bytes32)": FunctionFragment;
37
37
  "transferOwnership(address)": FunctionFragment;
38
38
  };
39
39
 
@@ -89,8 +89,8 @@ export interface InteropXGatewayInterface extends utils.Interface {
89
89
  ): Result;
90
90
 
91
91
  events: {
92
- "LogGatewayDeposit(address,address,uint256,uint256,uint32,uint32)": EventFragment;
93
- "LogGatewayWithdraw(address,address,uint256,uint32,uint32,bytes32)": EventFragment;
92
+ "LogGatewayDeposit(address,address,uint256,uint256,uint256,uint256)": EventFragment;
93
+ "LogGatewayWithdraw(address,address,uint256,uint256,uint256,bytes32)": EventFragment;
94
94
  "OwnershipTransferred(address,address)": EventFragment;
95
95
  };
96
96
 
@@ -104,11 +104,11 @@ export interface LogGatewayDepositEventObject {
104
104
  token: string;
105
105
  amount: BigNumber;
106
106
  vnonce: BigNumber;
107
- sourceChainId: number;
108
- targetChainId: number;
107
+ sourceChainId: BigNumber;
108
+ targetChainId: BigNumber;
109
109
  }
110
110
  export type LogGatewayDepositEvent = TypedEvent<
111
- [string, string, BigNumber, BigNumber, number, number],
111
+ [string, string, BigNumber, BigNumber, BigNumber, BigNumber],
112
112
  LogGatewayDepositEventObject
113
113
  >;
114
114
 
@@ -119,12 +119,12 @@ export interface LogGatewayWithdrawEventObject {
119
119
  user: string;
120
120
  token: string;
121
121
  amount: BigNumber;
122
- sourceChainId: number;
123
- targetChainId: number;
122
+ sourceChainId: BigNumber;
123
+ targetChainId: BigNumber;
124
124
  transactionHash: string;
125
125
  }
126
126
  export type LogGatewayWithdrawEvent = TypedEvent<
127
- [string, string, BigNumber, number, number, string],
127
+ [string, string, BigNumber, BigNumber, BigNumber, string],
128
128
  LogGatewayWithdrawEventObject
129
129
  >;
130
130
 
@@ -283,7 +283,7 @@ export interface InteropXGateway extends BaseContract {
283
283
  };
284
284
 
285
285
  filters: {
286
- "LogGatewayDeposit(address,address,uint256,uint256,uint32,uint32)"(
286
+ "LogGatewayDeposit(address,address,uint256,uint256,uint256,uint256)"(
287
287
  user?: null,
288
288
  token?: string | null,
289
289
  amount?: null,
@@ -300,7 +300,7 @@ export interface InteropXGateway extends BaseContract {
300
300
  targetChainId?: BigNumberish | null
301
301
  ): LogGatewayDepositEventFilter;
302
302
 
303
- "LogGatewayWithdraw(address,address,uint256,uint32,uint32,bytes32)"(
303
+ "LogGatewayWithdraw(address,address,uint256,uint256,uint256,bytes32)"(
304
304
  user?: null,
305
305
  token?: string | null,
306
306
  amount?: null,