@pendle/core-v2 6.4.2-swaphubtest → 6.4.2-swaphubtest2

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 (131) hide show
  1. package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
  2. package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.json +2 -2
  3. package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.dbg.json +1 -1
  4. package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.json +2 -2
  5. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  6. package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.dbg.json +1 -1
  7. package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.json +2 -2
  8. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  9. package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  10. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  11. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.dbg.json +1 -1
  12. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.json +2 -2
  13. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  14. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
  15. package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
  16. package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.dbg.json +1 -1
  17. package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.json +2 -2
  18. package/build/artifacts/contracts/cross-chain/deposit-box/DepositBox.sol/DepositBox.dbg.json +4 -0
  19. package/build/artifacts/contracts/cross-chain/deposit-box/DepositBox.sol/DepositBox.json +170 -0
  20. package/build/artifacts/contracts/cross-chain/deposit-box/DepositBoxFactory.sol/DepositBoxFactory.dbg.json +4 -0
  21. package/build/artifacts/contracts/cross-chain/deposit-box/DepositBoxFactory.sol/DepositBoxFactory.json +124 -0
  22. package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.dbg.json +1 -1
  23. package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.json +200 -433
  24. package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.dbg.json +1 -1
  25. package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.json +199 -423
  26. package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
  27. package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
  28. package/build/artifacts/contracts/interfaces/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.dbg.json +1 -1
  29. package/build/artifacts/contracts/interfaces/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.json +161 -398
  30. package/build/artifacts/contracts/interfaces/IPDepositBoxFactory.sol/IPDepositBoxFactory.dbg.json +4 -0
  31. package/build/artifacts/contracts/interfaces/IPDepositBoxFactory.sol/IPDepositBoxFactory.json +108 -0
  32. package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
  33. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
  34. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +2 -2
  35. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
  36. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
  37. package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.dbg.json +1 -1
  38. package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.json +2 -2
  39. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.dbg.json +1 -1
  40. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.json +2 -2
  41. package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.dbg.json +1 -1
  42. package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.json +2 -2
  43. package/build/artifacts/contracts/offchain-helpers/PendleAPIFeeDepositor.sol/PendleAPIFeeDepositor.dbg.json +1 -1
  44. package/build/artifacts/contracts/offchain-helpers/PendleAPIFeeDepositor.sol/PendleAPIFeeDepositor.json +2 -2
  45. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
  46. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.json +2 -2
  47. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.dbg.json +1 -1
  48. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.json +2 -2
  49. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +1 -1
  50. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.json +2 -2
  51. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
  52. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.json +2 -2
  53. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.dbg.json +1 -1
  54. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.json +2 -2
  55. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
  56. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2 -2
  57. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +1 -1
  58. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +2 -2
  59. package/build/artifacts/contracts/router/ActionCrossChain.sol/ActionCrossChain.dbg.json +1 -1
  60. package/build/artifacts/contracts/router/ActionCrossChain.sol/ActionCrossChain.json +2 -2
  61. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
  62. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +2 -2
  63. package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.dbg.json +1 -1
  64. package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.json +2 -2
  65. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
  66. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +2 -2
  67. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
  68. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +2 -2
  69. package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
  70. package/build/artifacts/contracts/router/Reflector.sol/Reflector.json +2 -2
  71. package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
  72. package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.dbg.json +1 -1
  73. package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.json +2 -2
  74. package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.dbg.json +1 -1
  75. package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/OKXScaleHelper.dbg.json +1 -1
  76. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IKyberScalingHelper.dbg.json +1 -1
  77. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.dbg.json +1 -1
  78. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
  79. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
  80. package/contracts/core/libraries/TokenHelper.sol +5 -1
  81. package/contracts/cross-chain/deposit-box/DepositBoxFactory.sol +44 -0
  82. package/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol +14 -102
  83. package/contracts/cross-chain/swap-hub/SwapHubBase.sol +73 -150
  84. package/contracts/interfaces/IPCrossChainSwapHub.sol +35 -66
  85. package/contracts/interfaces/IPDepositBoxFactory.sol +19 -0
  86. package/deployments/130-core.json +2 -1
  87. package/deployments/9745-core.json +3 -2
  88. package/package.json +1 -1
  89. package/typechain-types/DepositBoxFactory.ts +226 -0
  90. package/typechain-types/IPCrossChainSwapHub.ts +192 -383
  91. package/typechain-types/IPDepositBoxFactory.ts +226 -0
  92. package/typechain-types/PendleCrossChainSwapHub.ts +217 -390
  93. package/typechain-types/SwapHubBase.ts +216 -389
  94. package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
  95. package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
  96. package/typechain-types/factories/ActionCrossChain__factory.ts +1 -1
  97. package/typechain-types/factories/ActionMiscV3__factory.ts +1 -1
  98. package/typechain-types/factories/ActionSimple__factory.ts +1 -1
  99. package/typechain-types/factories/ActionSwapPTV3__factory.ts +1 -1
  100. package/typechain-types/factories/ActionSwapYTV3__factory.ts +1 -1
  101. package/typechain-types/factories/Broadcaster__factory.ts +1 -1
  102. package/typechain-types/factories/DepositBoxFactory__factory.ts +189 -0
  103. package/typechain-types/factories/DepositBox__factory.ts +1 -1
  104. package/typechain-types/factories/ExpiredLpPtRedeemer__factory.ts +1 -1
  105. package/typechain-types/factories/FixedPricePTAMM__factory.ts +1 -1
  106. package/typechain-types/factories/IPCrossChainSwapHub__factory.ts +161 -398
  107. package/typechain-types/factories/IPDepositBoxFactory__factory.ts +123 -0
  108. package/typechain-types/factories/LimitBackendHelperV2__factory.ts +1 -1
  109. package/typechain-types/factories/MarketSweed__factory.ts +1 -1
  110. package/typechain-types/factories/PendleAPIFeeDepositor__factory.ts +1 -1
  111. package/typechain-types/factories/PendleCommonPoolDeployHelperV2__factory.ts +1 -1
  112. package/typechain-types/factories/PendleCrossChainSwapHub__factory.ts +203 -440
  113. package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
  114. package/typechain-types/factories/PendleLPWrapperFactory__factory.ts +1 -1
  115. package/typechain-types/factories/PendleLPWrapper__factory.ts +1 -1
  116. package/typechain-types/factories/PendleLimitRouter__factory.ts +1 -1
  117. package/typechain-types/factories/PendleMarketV6__factory.ts +1 -1
  118. package/typechain-types/factories/PendleMerkleDistributor__factory.ts +1 -1
  119. package/typechain-types/factories/PendleMultiTokenMerkleDistributor__factory.ts +1 -1
  120. package/typechain-types/factories/PendlePoolDeployHelperV2__factory.ts +1 -1
  121. package/typechain-types/factories/PendlePoolDeployHelper__factory.ts +1 -1
  122. package/typechain-types/factories/PendleSwap__factory.ts +1 -1
  123. package/typechain-types/factories/PendleYieldContractFactoryUpg__factory.ts +1 -1
  124. package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
  125. package/typechain-types/factories/Reflector__factory.ts +1 -1
  126. package/typechain-types/factories/SwapHubBase__factory.ts +199 -423
  127. package/typechain-types/hardhat.d.ts +27 -9
  128. package/typechain-types/index.ts +6 -2
  129. package/build/artifacts/contracts/cross-chain/swap-hub/DepositBox.sol/DepositBox.dbg.json +0 -4
  130. package/build/artifacts/contracts/cross-chain/swap-hub/DepositBox.sol/DepositBox.json +0 -170
  131. /package/contracts/cross-chain/{swap-hub → deposit-box}/DepositBox.sol +0 -0
@@ -31,57 +31,20 @@
31
31
  {
32
32
  "anonymous": false,
33
33
  "inputs": [
34
- {
35
- "indexed": true,
36
- "internalType": "address",
37
- "name": "owner",
38
- "type": "address"
39
- },
40
- {
41
- "indexed": false,
42
- "internalType": "uint32",
43
- "name": "boxId",
44
- "type": "uint32"
45
- },
46
- {
47
- "indexed": false,
48
- "internalType": "address",
49
- "name": "bridgeExtRouter",
50
- "type": "address"
51
- },
52
- {
53
- "indexed": false,
54
- "internalType": "address",
55
- "name": "token",
56
- "type": "address"
57
- },
58
34
  {
59
35
  "indexed": false,
60
36
  "internalType": "uint256",
61
- "name": "amountBridge",
37
+ "name": "requestId",
62
38
  "type": "uint256"
63
39
  },
64
40
  {
65
41
  "indexed": false,
66
42
  "internalType": "uint256",
67
- "name": "amountFee",
43
+ "name": "nonce",
68
44
  "type": "uint256"
69
45
  },
70
46
  {
71
47
  "indexed": false,
72
- "internalType": "bool",
73
- "name": "pullFromOwner",
74
- "type": "bool"
75
- }
76
- ],
77
- "name": "BridgeToken",
78
- "type": "event"
79
- },
80
- {
81
- "anonymous": false,
82
- "inputs": [
83
- {
84
- "indexed": true,
85
48
  "internalType": "address",
86
49
  "name": "owner",
87
50
  "type": "address"
@@ -95,47 +58,29 @@
95
58
  {
96
59
  "indexed": false,
97
60
  "internalType": "address",
98
- "name": "tokenSpent",
99
- "type": "address"
100
- },
101
- {
102
- "indexed": false,
103
- "internalType": "uint256",
104
- "name": "amountSpent",
105
- "type": "uint256"
106
- },
107
- {
108
- "indexed": false,
109
- "internalType": "uint256",
110
- "name": "amountFee",
111
- "type": "uint256"
112
- },
113
- {
114
- "indexed": false,
115
- "internalType": "address",
116
- "name": "ptAdapter",
61
+ "name": "bridgeExtRouter",
117
62
  "type": "address"
118
63
  },
119
64
  {
120
65
  "indexed": false,
121
66
  "internalType": "address",
122
- "name": "pt",
67
+ "name": "token",
123
68
  "type": "address"
124
69
  },
125
70
  {
126
71
  "indexed": false,
127
72
  "internalType": "uint256",
128
- "name": "netPtReceived",
73
+ "name": "amountBridge",
129
74
  "type": "uint256"
130
75
  },
131
76
  {
132
77
  "indexed": false,
133
- "internalType": "bool",
134
- "name": "pullFromOwner",
135
- "type": "bool"
78
+ "internalType": "uint256",
79
+ "name": "amountFee",
80
+ "type": "uint256"
136
81
  }
137
82
  ],
138
- "name": "BuyCrossChainPt",
83
+ "name": "BridgeToken",
139
84
  "type": "event"
140
85
  },
141
86
  {
@@ -201,6 +146,37 @@
201
146
  {
202
147
  "indexed": true,
203
148
  "internalType": "address",
149
+ "name": "proposer",
150
+ "type": "address"
151
+ },
152
+ {
153
+ "indexed": false,
154
+ "internalType": "bool",
155
+ "name": "isProposer",
156
+ "type": "bool"
157
+ }
158
+ ],
159
+ "name": "SetProposer",
160
+ "type": "event"
161
+ },
162
+ {
163
+ "anonymous": false,
164
+ "inputs": [
165
+ {
166
+ "indexed": false,
167
+ "internalType": "uint256",
168
+ "name": "requestId",
169
+ "type": "uint256"
170
+ },
171
+ {
172
+ "indexed": false,
173
+ "internalType": "uint256",
174
+ "name": "nonce",
175
+ "type": "uint256"
176
+ },
177
+ {
178
+ "indexed": false,
179
+ "internalType": "address",
204
180
  "name": "owner",
205
181
  "type": "address"
206
182
  },
@@ -222,12 +198,6 @@
222
198
  "name": "amountSpent",
223
199
  "type": "uint256"
224
200
  },
225
- {
226
- "indexed": false,
227
- "internalType": "uint256",
228
- "name": "amountFee",
229
- "type": "uint256"
230
- },
231
201
  {
232
202
  "indexed": false,
233
203
  "internalType": "address",
@@ -239,18 +209,6 @@
239
209
  "internalType": "uint256",
240
210
  "name": "netTokenReceived",
241
211
  "type": "uint256"
242
- },
243
- {
244
- "indexed": false,
245
- "internalType": "bool",
246
- "name": "pullFromOwner",
247
- "type": "bool"
248
- },
249
- {
250
- "indexed": false,
251
- "internalType": "bool",
252
- "name": "sendToOwner",
253
- "type": "bool"
254
212
  }
255
213
  ],
256
214
  "name": "SwapToken",
@@ -260,7 +218,19 @@
260
218
  "anonymous": false,
261
219
  "inputs": [
262
220
  {
263
- "indexed": true,
221
+ "indexed": false,
222
+ "internalType": "uint256",
223
+ "name": "requestId",
224
+ "type": "uint256"
225
+ },
226
+ {
227
+ "indexed": false,
228
+ "internalType": "uint256",
229
+ "name": "nonce",
230
+ "type": "uint256"
231
+ },
232
+ {
233
+ "indexed": false,
264
234
  "internalType": "address",
265
235
  "name": "owner",
266
236
  "type": "address"
@@ -295,10 +265,10 @@
295
265
  },
296
266
  {
297
267
  "inputs": [],
298
- "name": "BEACON_PROXY_CODE_CONTRACT",
268
+ "name": "DEPOSIT_BOX_FACTORY",
299
269
  "outputs": [
300
270
  {
301
- "internalType": "address",
271
+ "internalType": "contract IPDepositBoxFactory",
302
272
  "name": "",
303
273
  "type": "address"
304
274
  }
@@ -306,32 +276,6 @@
306
276
  "stateMutability": "view",
307
277
  "type": "function"
308
278
  },
309
- {
310
- "inputs": [],
311
- "name": "DEPOSIT_BOX_BEACON",
312
- "outputs": [
313
- {
314
- "internalType": "address",
315
- "name": "",
316
- "type": "address"
317
- }
318
- ],
319
- "stateMutability": "view",
320
- "type": "function"
321
- },
322
- {
323
- "inputs": [],
324
- "name": "DEPOSIT_BOX_CODE_HASH",
325
- "outputs": [
326
- {
327
- "internalType": "bytes32",
328
- "name": "",
329
- "type": "bytes32"
330
- }
331
- ],
332
- "stateMutability": "view",
333
- "type": "function"
334
- },
335
279
  {
336
280
  "inputs": [],
337
281
  "name": "TREASURY",
@@ -351,14 +295,9 @@
351
295
  "components": [
352
296
  {
353
297
  "internalType": "address",
354
- "name": "owner",
298
+ "name": "proposer",
355
299
  "type": "address"
356
300
  },
357
- {
358
- "internalType": "uint32",
359
- "name": "boxId",
360
- "type": "uint32"
361
- },
362
301
  {
363
302
  "internalType": "uint256",
364
303
  "name": "expiry",
@@ -366,64 +305,14 @@
366
305
  },
367
306
  {
368
307
  "internalType": "uint256",
369
- "name": "nonce",
370
- "type": "uint256"
371
- },
372
- {
373
- "internalType": "address",
374
- "name": "token",
375
- "type": "address"
376
- },
377
- {
378
- "internalType": "uint256",
379
- "name": "amountBridge",
308
+ "name": "requestId",
380
309
  "type": "uint256"
381
310
  },
382
311
  {
383
312
  "internalType": "uint256",
384
- "name": "amountFee",
313
+ "name": "nonce",
385
314
  "type": "uint256"
386
315
  },
387
- {
388
- "internalType": "bool",
389
- "name": "pullFromOwner",
390
- "type": "bool"
391
- },
392
- {
393
- "internalType": "address",
394
- "name": "bridgeExtRouter",
395
- "type": "address"
396
- },
397
- {
398
- "internalType": "address",
399
- "name": "bridgeApprove",
400
- "type": "address"
401
- },
402
- {
403
- "internalType": "bytes",
404
- "name": "bridgeCalldata",
405
- "type": "bytes"
406
- }
407
- ],
408
- "internalType": "struct IPCrossChainSwapHub.BridgeTokenMessage",
409
- "name": "message",
410
- "type": "tuple"
411
- },
412
- {
413
- "internalType": "bytes",
414
- "name": "signature",
415
- "type": "bytes"
416
- }
417
- ],
418
- "name": "bridgeToken",
419
- "outputs": [],
420
- "stateMutability": "payable",
421
- "type": "function"
422
- },
423
- {
424
- "inputs": [
425
- {
426
- "components": [
427
316
  {
428
317
  "internalType": "address",
429
318
  "name": "owner",
@@ -434,24 +323,14 @@
434
323
  "name": "boxId",
435
324
  "type": "uint32"
436
325
  },
437
- {
438
- "internalType": "uint256",
439
- "name": "expiry",
440
- "type": "uint256"
441
- },
442
- {
443
- "internalType": "uint256",
444
- "name": "nonce",
445
- "type": "uint256"
446
- },
447
326
  {
448
327
  "internalType": "address",
449
- "name": "tokenSpent",
328
+ "name": "token",
450
329
  "type": "address"
451
330
  },
452
331
  {
453
332
  "internalType": "uint256",
454
- "name": "amountSpent",
333
+ "name": "amountBridge",
455
334
  "type": "uint256"
456
335
  },
457
336
  {
@@ -461,99 +340,40 @@
461
340
  },
462
341
  {
463
342
  "internalType": "address",
464
- "name": "ptAdapter",
465
- "type": "address"
466
- },
467
- {
468
- "internalType": "uint256",
469
- "name": "minPtReceived",
470
- "type": "uint256"
471
- },
472
- {
473
- "internalType": "uint32",
474
- "name": "dstEid",
475
- "type": "uint32"
476
- },
477
- {
478
- "internalType": "bytes32",
479
- "name": "receiver",
480
- "type": "bytes32"
481
- },
482
- {
483
- "internalType": "bool",
484
- "name": "pullFromOwner",
485
- "type": "bool"
486
- },
487
- {
488
- "internalType": "address",
489
- "name": "swapExtRouter",
343
+ "name": "bridgeExtRouter",
490
344
  "type": "address"
491
345
  },
492
346
  {
493
347
  "internalType": "address",
494
- "name": "swapApprove",
348
+ "name": "bridgeApprove",
495
349
  "type": "address"
496
350
  },
497
351
  {
498
352
  "internalType": "bytes",
499
- "name": "swapCalldata",
353
+ "name": "bridgeCalldata",
500
354
  "type": "bytes"
501
355
  }
502
356
  ],
503
- "internalType": "struct IPCrossChainSwapHub.BuyCrossChainPtMessage",
357
+ "internalType": "struct IPCrossChainSwapHub.BridgeTokenMessage",
504
358
  "name": "message",
505
359
  "type": "tuple"
506
360
  },
507
361
  {
508
- "internalType": "bytes",
509
- "name": "signature",
510
- "type": "bytes"
511
- }
512
- ],
513
- "name": "buyCrossChainPt",
514
- "outputs": [],
515
- "stateMutability": "payable",
516
- "type": "function"
517
- },
518
- {
519
- "inputs": [],
520
- "name": "claimOwnership",
521
- "outputs": [],
522
- "stateMutability": "nonpayable",
523
- "type": "function"
524
- },
525
- {
526
- "inputs": [
527
- {
528
- "internalType": "address",
529
- "name": "owner",
530
- "type": "address"
531
- },
532
- {
533
- "internalType": "uint32",
534
- "name": "boxId",
535
- "type": "uint32"
536
- }
537
- ],
538
- "name": "computeDepositBox",
539
- "outputs": [
540
- {
541
- "internalType": "address",
542
- "name": "box",
543
- "type": "address"
544
- },
545
- {
546
- "internalType": "bytes32",
547
- "name": "salt",
548
- "type": "bytes32"
549
- },
550
- {
551
- "internalType": "bool",
552
- "name": "deployed",
553
- "type": "bool"
362
+ "internalType": "bytes",
363
+ "name": "signature",
364
+ "type": "bytes"
554
365
  }
555
366
  ],
556
- "stateMutability": "view",
367
+ "name": "bridgeToken",
368
+ "outputs": [],
369
+ "stateMutability": "payable",
370
+ "type": "function"
371
+ },
372
+ {
373
+ "inputs": [],
374
+ "name": "claimOwnership",
375
+ "outputs": [],
376
+ "stateMutability": "nonpayable",
557
377
  "type": "function"
558
378
  },
559
379
  {
@@ -605,17 +425,17 @@
605
425
  "components": [
606
426
  {
607
427
  "internalType": "address",
608
- "name": "owner",
428
+ "name": "proposer",
609
429
  "type": "address"
610
430
  },
611
431
  {
612
- "internalType": "uint32",
613
- "name": "boxId",
614
- "type": "uint32"
432
+ "internalType": "uint256",
433
+ "name": "expiry",
434
+ "type": "uint256"
615
435
  },
616
436
  {
617
437
  "internalType": "uint256",
618
- "name": "expiry",
438
+ "name": "requestId",
619
439
  "type": "uint256"
620
440
  },
621
441
  {
@@ -625,57 +445,47 @@
625
445
  },
626
446
  {
627
447
  "internalType": "address",
628
- "name": "tokenSpent",
448
+ "name": "owner",
629
449
  "type": "address"
630
450
  },
631
451
  {
632
- "internalType": "uint256",
633
- "name": "amountSpent",
634
- "type": "uint256"
635
- },
636
- {
637
- "internalType": "uint256",
638
- "name": "amountFee",
639
- "type": "uint256"
452
+ "internalType": "uint32",
453
+ "name": "boxId",
454
+ "type": "uint32"
640
455
  },
641
456
  {
642
457
  "internalType": "address",
643
- "name": "tokenReceived",
458
+ "name": "token",
644
459
  "type": "address"
645
460
  },
646
461
  {
647
462
  "internalType": "uint256",
648
- "name": "minReceived",
463
+ "name": "amountBridge",
649
464
  "type": "uint256"
650
465
  },
651
466
  {
652
- "internalType": "bool",
653
- "name": "pullFromOwner",
654
- "type": "bool"
655
- },
656
- {
657
- "internalType": "bool",
658
- "name": "sendToOwner",
659
- "type": "bool"
467
+ "internalType": "uint256",
468
+ "name": "amountFee",
469
+ "type": "uint256"
660
470
  },
661
471
  {
662
472
  "internalType": "address",
663
- "name": "swapExtRouter",
473
+ "name": "bridgeExtRouter",
664
474
  "type": "address"
665
475
  },
666
476
  {
667
477
  "internalType": "address",
668
- "name": "swapApprove",
478
+ "name": "bridgeApprove",
669
479
  "type": "address"
670
480
  },
671
481
  {
672
482
  "internalType": "bytes",
673
- "name": "swapCalldata",
483
+ "name": "bridgeCalldata",
674
484
  "type": "bytes"
675
485
  }
676
486
  ],
677
- "internalType": "struct IPCrossChainSwapHub.SwapTokenMessage",
678
- "name": "message",
487
+ "internalType": "struct IPCrossChainSwapHub.BridgeTokenMessage",
488
+ "name": "ms",
679
489
  "type": "tuple"
680
490
  }
681
491
  ],
@@ -696,14 +506,9 @@
696
506
  "components": [
697
507
  {
698
508
  "internalType": "address",
699
- "name": "owner",
509
+ "name": "proposer",
700
510
  "type": "address"
701
511
  },
702
- {
703
- "internalType": "uint32",
704
- "name": "boxId",
705
- "type": "uint32"
706
- },
707
512
  {
708
513
  "internalType": "uint256",
709
514
  "name": "expiry",
@@ -711,45 +516,14 @@
711
516
  },
712
517
  {
713
518
  "internalType": "uint256",
714
- "name": "nonce",
519
+ "name": "requestId",
715
520
  "type": "uint256"
716
521
  },
717
- {
718
- "internalType": "address",
719
- "name": "token",
720
- "type": "address"
721
- },
722
522
  {
723
523
  "internalType": "uint256",
724
- "name": "amountWithdraw",
524
+ "name": "nonce",
725
525
  "type": "uint256"
726
526
  },
727
- {
728
- "internalType": "uint256",
729
- "name": "amountFee",
730
- "type": "uint256"
731
- }
732
- ],
733
- "internalType": "struct IPCrossChainSwapHub.WithdrawTokenMessage",
734
- "name": "message",
735
- "type": "tuple"
736
- }
737
- ],
738
- "name": "hashTypedData",
739
- "outputs": [
740
- {
741
- "internalType": "bytes32",
742
- "name": "",
743
- "type": "bytes32"
744
- }
745
- ],
746
- "stateMutability": "view",
747
- "type": "function"
748
- },
749
- {
750
- "inputs": [
751
- {
752
- "components": [
753
527
  {
754
528
  "internalType": "address",
755
529
  "name": "owner",
@@ -760,16 +534,6 @@
760
534
  "name": "boxId",
761
535
  "type": "uint32"
762
536
  },
763
- {
764
- "internalType": "uint256",
765
- "name": "expiry",
766
- "type": "uint256"
767
- },
768
- {
769
- "internalType": "uint256",
770
- "name": "nonce",
771
- "type": "uint256"
772
- },
773
537
  {
774
538
  "internalType": "address",
775
539
  "name": "tokenSpent",
@@ -780,36 +544,16 @@
780
544
  "name": "amountSpent",
781
545
  "type": "uint256"
782
546
  },
783
- {
784
- "internalType": "uint256",
785
- "name": "amountFee",
786
- "type": "uint256"
787
- },
788
547
  {
789
548
  "internalType": "address",
790
- "name": "ptAdapter",
549
+ "name": "tokenReceived",
791
550
  "type": "address"
792
551
  },
793
552
  {
794
553
  "internalType": "uint256",
795
- "name": "minPtReceived",
554
+ "name": "minReceived",
796
555
  "type": "uint256"
797
556
  },
798
- {
799
- "internalType": "uint32",
800
- "name": "dstEid",
801
- "type": "uint32"
802
- },
803
- {
804
- "internalType": "bytes32",
805
- "name": "receiver",
806
- "type": "bytes32"
807
- },
808
- {
809
- "internalType": "bool",
810
- "name": "pullFromOwner",
811
- "type": "bool"
812
- },
813
557
  {
814
558
  "internalType": "address",
815
559
  "name": "swapExtRouter",
@@ -826,8 +570,8 @@
826
570
  "type": "bytes"
827
571
  }
828
572
  ],
829
- "internalType": "struct IPCrossChainSwapHub.BuyCrossChainPtMessage",
830
- "name": "message",
573
+ "internalType": "struct IPCrossChainSwapHub.SwapTokenMessage",
574
+ "name": "ms",
831
575
  "type": "tuple"
832
576
  }
833
577
  ],
@@ -848,14 +592,9 @@
848
592
  "components": [
849
593
  {
850
594
  "internalType": "address",
851
- "name": "owner",
595
+ "name": "proposer",
852
596
  "type": "address"
853
597
  },
854
- {
855
- "internalType": "uint32",
856
- "name": "boxId",
857
- "type": "uint32"
858
- },
859
598
  {
860
599
  "internalType": "uint256",
861
600
  "name": "expiry",
@@ -863,47 +602,42 @@
863
602
  },
864
603
  {
865
604
  "internalType": "uint256",
866
- "name": "nonce",
605
+ "name": "requestId",
867
606
  "type": "uint256"
868
607
  },
869
- {
870
- "internalType": "address",
871
- "name": "token",
872
- "type": "address"
873
- },
874
608
  {
875
609
  "internalType": "uint256",
876
- "name": "amountBridge",
610
+ "name": "nonce",
877
611
  "type": "uint256"
878
612
  },
879
613
  {
880
- "internalType": "uint256",
881
- "name": "amountFee",
882
- "type": "uint256"
614
+ "internalType": "address",
615
+ "name": "owner",
616
+ "type": "address"
883
617
  },
884
618
  {
885
- "internalType": "bool",
886
- "name": "pullFromOwner",
887
- "type": "bool"
619
+ "internalType": "uint32",
620
+ "name": "boxId",
621
+ "type": "uint32"
888
622
  },
889
623
  {
890
624
  "internalType": "address",
891
- "name": "bridgeExtRouter",
625
+ "name": "token",
892
626
  "type": "address"
893
627
  },
894
628
  {
895
- "internalType": "address",
896
- "name": "bridgeApprove",
897
- "type": "address"
629
+ "internalType": "uint256",
630
+ "name": "amountWithdraw",
631
+ "type": "uint256"
898
632
  },
899
633
  {
900
- "internalType": "bytes",
901
- "name": "bridgeCalldata",
902
- "type": "bytes"
634
+ "internalType": "uint256",
635
+ "name": "amountFee",
636
+ "type": "uint256"
903
637
  }
904
638
  ],
905
- "internalType": "struct IPCrossChainSwapHub.BridgeTokenMessage",
906
- "name": "message",
639
+ "internalType": "struct IPCrossChainSwapHub.WithdrawTokenMessage",
640
+ "name": "ms",
907
641
  "type": "tuple"
908
642
  }
909
643
  ],
@@ -937,6 +671,25 @@
937
671
  "stateMutability": "view",
938
672
  "type": "function"
939
673
  },
674
+ {
675
+ "inputs": [
676
+ {
677
+ "internalType": "address",
678
+ "name": "proposer",
679
+ "type": "address"
680
+ }
681
+ ],
682
+ "name": "isProposer",
683
+ "outputs": [
684
+ {
685
+ "internalType": "bool",
686
+ "name": "",
687
+ "type": "bool"
688
+ }
689
+ ],
690
+ "stateMutability": "view",
691
+ "type": "function"
692
+ },
940
693
  {
941
694
  "inputs": [],
942
695
  "name": "owner",
@@ -951,14 +704,27 @@
951
704
  "type": "function"
952
705
  },
953
706
  {
954
- "inputs": [
707
+ "inputs": [],
708
+ "name": "pendingOwner",
709
+ "outputs": [
955
710
  {
956
711
  "internalType": "address",
957
- "name": "owner",
712
+ "name": "",
958
713
  "type": "address"
959
714
  }
960
715
  ],
961
- "name": "ownerNonce",
716
+ "stateMutability": "view",
717
+ "type": "function"
718
+ },
719
+ {
720
+ "inputs": [
721
+ {
722
+ "internalType": "uint256",
723
+ "name": "requestId",
724
+ "type": "uint256"
725
+ }
726
+ ],
727
+ "name": "requestNonce",
962
728
  "outputs": [
963
729
  {
964
730
  "internalType": "uint256",
@@ -970,32 +736,37 @@
970
736
  "type": "function"
971
737
  },
972
738
  {
973
- "inputs": [],
974
- "name": "pendingOwner",
975
- "outputs": [
739
+ "inputs": [
976
740
  {
977
741
  "internalType": "address",
978
- "name": "",
742
+ "name": "executor",
979
743
  "type": "address"
744
+ },
745
+ {
746
+ "internalType": "bool",
747
+ "name": "isExecutor_",
748
+ "type": "bool"
980
749
  }
981
750
  ],
982
- "stateMutability": "view",
751
+ "name": "setExecutor",
752
+ "outputs": [],
753
+ "stateMutability": "nonpayable",
983
754
  "type": "function"
984
755
  },
985
756
  {
986
757
  "inputs": [
987
758
  {
988
759
  "internalType": "address",
989
- "name": "executor",
760
+ "name": "proposer",
990
761
  "type": "address"
991
762
  },
992
763
  {
993
764
  "internalType": "bool",
994
- "name": "isExecutor_",
765
+ "name": "isProposer_",
995
766
  "type": "bool"
996
767
  }
997
768
  ],
998
- "name": "setExecutor",
769
+ "name": "setProposer",
999
770
  "outputs": [],
1000
771
  "stateMutability": "nonpayable",
1001
772
  "type": "function"
@@ -1006,17 +777,17 @@
1006
777
  "components": [
1007
778
  {
1008
779
  "internalType": "address",
1009
- "name": "owner",
780
+ "name": "proposer",
1010
781
  "type": "address"
1011
782
  },
1012
783
  {
1013
- "internalType": "uint32",
1014
- "name": "boxId",
1015
- "type": "uint32"
784
+ "internalType": "uint256",
785
+ "name": "expiry",
786
+ "type": "uint256"
1016
787
  },
1017
788
  {
1018
789
  "internalType": "uint256",
1019
- "name": "expiry",
790
+ "name": "requestId",
1020
791
  "type": "uint256"
1021
792
  },
1022
793
  {
@@ -1026,17 +797,22 @@
1026
797
  },
1027
798
  {
1028
799
  "internalType": "address",
1029
- "name": "tokenSpent",
800
+ "name": "owner",
1030
801
  "type": "address"
1031
802
  },
1032
803
  {
1033
- "internalType": "uint256",
1034
- "name": "amountSpent",
1035
- "type": "uint256"
804
+ "internalType": "uint32",
805
+ "name": "boxId",
806
+ "type": "uint32"
807
+ },
808
+ {
809
+ "internalType": "address",
810
+ "name": "tokenSpent",
811
+ "type": "address"
1036
812
  },
1037
813
  {
1038
814
  "internalType": "uint256",
1039
- "name": "amountFee",
815
+ "name": "amountSpent",
1040
816
  "type": "uint256"
1041
817
  },
1042
818
  {
@@ -1049,16 +825,6 @@
1049
825
  "name": "minReceived",
1050
826
  "type": "uint256"
1051
827
  },
1052
- {
1053
- "internalType": "bool",
1054
- "name": "pullFromOwner",
1055
- "type": "bool"
1056
- },
1057
- {
1058
- "internalType": "bool",
1059
- "name": "sendToOwner",
1060
- "type": "bool"
1061
- },
1062
828
  {
1063
829
  "internalType": "address",
1064
830
  "name": "swapExtRouter",
@@ -1119,17 +885,17 @@
1119
885
  "components": [
1120
886
  {
1121
887
  "internalType": "address",
1122
- "name": "owner",
888
+ "name": "proposer",
1123
889
  "type": "address"
1124
890
  },
1125
891
  {
1126
- "internalType": "uint32",
1127
- "name": "boxId",
1128
- "type": "uint32"
892
+ "internalType": "uint256",
893
+ "name": "expiry",
894
+ "type": "uint256"
1129
895
  },
1130
896
  {
1131
897
  "internalType": "uint256",
1132
- "name": "expiry",
898
+ "name": "requestId",
1133
899
  "type": "uint256"
1134
900
  },
1135
901
  {
@@ -1137,6 +903,16 @@
1137
903
  "name": "nonce",
1138
904
  "type": "uint256"
1139
905
  },
906
+ {
907
+ "internalType": "address",
908
+ "name": "owner",
909
+ "type": "address"
910
+ },
911
+ {
912
+ "internalType": "uint32",
913
+ "name": "boxId",
914
+ "type": "uint32"
915
+ },
1140
916
  {
1141
917
  "internalType": "address",
1142
918
  "name": "token",