@instadapp/interop-x 0.0.0-dev.14afa72 → 0.0.0-dev.1dc43c9

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 (79) hide show
  1. package/.github/workflows/ci.yml +19 -0
  2. package/dist/package.json +13 -12
  3. package/dist/src/abi/index.js +2 -4
  4. package/dist/src/abi/interopX.json +1436 -0
  5. package/dist/src/alias.js +10 -0
  6. package/dist/src/api/index.js +1 -1
  7. package/dist/src/constants/addresses.js +2 -7
  8. package/dist/src/constants/index.js +0 -1
  9. package/dist/src/constants/tokens.js +62 -39
  10. package/dist/src/db/models/transaction.js +21 -11
  11. package/dist/src/gnosis/actions/index.js +0 -2
  12. package/dist/src/gnosis/actions/withdraw/index.js +114 -0
  13. package/dist/src/gnosis/index.js +4 -4
  14. package/dist/src/index.js +7 -19
  15. package/dist/src/net/protocol/dial/SignatureDialProtocol.js +6 -2
  16. package/dist/src/net/protocol/dial/TransactionStatusDialProtocol.js +2 -0
  17. package/dist/src/net/protocol/index.js +11 -1
  18. package/dist/src/tasks/InteropX/SyncLogSubmitEvents.js +84 -0
  19. package/dist/src/tasks/Transactions/SyncTransactionStatusTask.js +6 -2
  20. package/dist/src/tasks/index.js +8 -29
  21. package/dist/src/typechain/{InteropBridgeToken.js → InteropX.js} +0 -0
  22. package/dist/src/typechain/factories/InteropX__factory.js +1928 -0
  23. package/dist/src/typechain/factories/index.js +3 -5
  24. package/dist/src/typechain/index.js +3 -5
  25. package/dist/src/utils/index.js +46 -8
  26. package/package.json +13 -12
  27. package/src/abi/index.ts +2 -4
  28. package/src/abi/interopX.json +1436 -0
  29. package/src/alias.ts +6 -0
  30. package/src/api/index.ts +1 -1
  31. package/src/constants/addresses.ts +3 -8
  32. package/src/constants/index.ts +0 -1
  33. package/src/constants/tokens.ts +63 -40
  34. package/src/db/models/transaction.ts +55 -25
  35. package/src/gnosis/actions/index.ts +0 -2
  36. package/src/gnosis/actions/withdraw/index.ts +155 -0
  37. package/src/gnosis/index.ts +5 -5
  38. package/src/index.ts +6 -18
  39. package/src/net/protocol/dial/SignatureDialProtocol.ts +6 -2
  40. package/src/net/protocol/dial/TransactionStatusDialProtocol.ts +3 -1
  41. package/src/net/protocol/index.ts +13 -3
  42. package/src/tasks/InteropX/SyncLogSubmitEvents.ts +136 -0
  43. package/src/tasks/Transactions/SyncTransactionStatusTask.ts +6 -2
  44. package/src/tasks/index.ts +10 -39
  45. package/src/typechain/InteropX.ts +1216 -0
  46. package/src/typechain/factories/InteropX__factory.ts +1932 -0
  47. package/src/typechain/factories/index.ts +1 -2
  48. package/src/typechain/index.ts +2 -4
  49. package/src/utils/index.ts +102 -11
  50. package/tsconfig.json +7 -2
  51. package/dist/src/abi/interopBridgeToken.json +0 -298
  52. package/dist/src/abi/interopXGateway.json +0 -184
  53. package/dist/src/constants/itokens.js +0 -13
  54. package/dist/src/gnosis/actions/deposit.js +0 -48
  55. package/dist/src/gnosis/actions/withdraw.js +0 -50
  56. package/dist/src/tasks/InteropBridge/ProcessWithdrawEvents.js +0 -162
  57. package/dist/src/tasks/InteropBridge/SyncBurnEvents.js +0 -71
  58. package/dist/src/tasks/InteropBridge/SyncMintEvents.js +0 -67
  59. package/dist/src/tasks/InteropXGateway/ProcessDepositEvents.js +0 -164
  60. package/dist/src/tasks/InteropXGateway/SyncDepositEvents.js +0 -74
  61. package/dist/src/tasks/InteropXGateway/SyncWithdrawtEvents.js +0 -72
  62. package/dist/src/typechain/InteropXGateway.js +0 -2
  63. package/dist/src/typechain/factories/InteropBridgeToken__factory.js +0 -471
  64. package/dist/src/typechain/factories/InteropXGateway__factory.js +0 -265
  65. package/src/abi/interopBridgeToken.json +0 -298
  66. package/src/abi/interopXGateway.json +0 -184
  67. package/src/constants/itokens.ts +0 -10
  68. package/src/gnosis/actions/deposit.ts +0 -63
  69. package/src/gnosis/actions/withdraw.ts +0 -67
  70. package/src/tasks/InteropBridge/ProcessWithdrawEvents.ts +0 -249
  71. package/src/tasks/InteropBridge/SyncBurnEvents.ts +0 -119
  72. package/src/tasks/InteropBridge/SyncMintEvents.ts +0 -99
  73. package/src/tasks/InteropXGateway/ProcessDepositEvents.ts +0 -260
  74. package/src/tasks/InteropXGateway/SyncDepositEvents.ts +0 -124
  75. package/src/tasks/InteropXGateway/SyncWithdrawtEvents.ts +0 -105
  76. package/src/typechain/InteropBridgeToken.ts +0 -692
  77. package/src/typechain/InteropXGateway.ts +0 -407
  78. package/src/typechain/factories/InteropBridgeToken__factory.ts +0 -478
  79. package/src/typechain/factories/InteropXGateway__factory.ts +0 -272
@@ -4,47 +4,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Tasks = void 0;
7
- const ProcessDepositEvents_1 = __importDefault(require("./InteropXGateway/ProcessDepositEvents"));
8
- const SyncDepositEvents_1 = __importDefault(require("./InteropXGateway/SyncDepositEvents"));
9
- const SyncWithdrawtEvents_1 = __importDefault(require("./InteropXGateway/SyncWithdrawtEvents"));
10
- const ProcessWithdrawEvents_1 = __importDefault(require("./InteropBridge/ProcessWithdrawEvents"));
11
- const SyncBurnEvents_1 = __importDefault(require("./InteropBridge/SyncBurnEvents"));
12
- const SyncMintEvents_1 = __importDefault(require("./InteropBridge/SyncMintEvents"));
7
+ const waait_1 = __importDefault(require("waait"));
13
8
  const SyncTransactionStatusTask_1 = __importDefault(require("./Transactions/SyncTransactionStatusTask"));
14
9
  const AutoUpdateTask_1 = __importDefault(require("./AutoUpdateTask"));
10
+ const SyncLogSubmitEvents_1 = __importDefault(require("./InteropX/SyncLogSubmitEvents"));
15
11
  class Tasks {
16
12
  constructor() {
17
13
  this.tasks = [
18
- new SyncTransactionStatusTask_1.default(),
14
+ // new SyncTransactionStatusTask(),
19
15
  new AutoUpdateTask_1.default(),
20
- // InteropXGateway
21
- new SyncDepositEvents_1.default({
22
- chainId: 43114
23
- }),
24
- new ProcessDepositEvents_1.default({
25
- chainId: 43114
26
- }),
27
- new SyncWithdrawtEvents_1.default({
28
- chainId: 43114
29
- }),
30
- // InteropBridge
31
- new ProcessWithdrawEvents_1.default({
32
- chainId: 137,
33
- }),
34
- new SyncMintEvents_1.default({
35
- chainId: 137,
36
- itokenAddress: '0x62c0045f3277e7067cacad3c8038eeabb1bd92d1',
37
- }),
38
- new SyncBurnEvents_1.default({
39
- chainId: 137,
40
- itokenAddress: '0x62c0045f3277e7067cacad3c8038eeabb1bd92d1',
41
- })
16
+ // InteropX
17
+ new SyncLogSubmitEvents_1.default({ chainId: 137 }),
18
+ new SyncLogSubmitEvents_1.default({ chainId: 43114 }),
19
+ new SyncTransactionStatusTask_1.default(),
42
20
  ];
43
21
  }
44
22
  async start() {
45
23
  for (const task of this.tasks) {
46
24
  try {
47
25
  task.start();
26
+ await (0, waait_1.default)(1000);
48
27
  }
49
28
  catch (error) {
50
29
  console.error(`Error starting task: ${task.constructor.name}`);