@across-protocol/contracts 5.0.6-alpha.0 → 5.0.6-alpha.2

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 (377) hide show
  1. package/contracts/test/AcrossMessageHandlerMock.sol +14 -0
  2. package/contracts/test/ArbitrumMocks.sol +169 -0
  3. package/contracts/test/ExpandedERC20WithBlacklist.sol +19 -0
  4. package/contracts/test/LineaMocks.sol +83 -0
  5. package/contracts/test/MerkleLibTest.sol +65 -0
  6. package/contracts/test/MockBedrockStandardBridge.sol +115 -0
  7. package/contracts/test/MockBlastUsdYieldManager.sol +20 -0
  8. package/contracts/test/MockCCTP.sol +212 -0
  9. package/contracts/test/MockCaller.sol +20 -0
  10. package/contracts/test/MockERC1271.sol +21 -0
  11. package/contracts/test/MockERC20.sol +87 -0
  12. package/contracts/test/MockEndpoint.sol +16 -0
  13. package/contracts/test/MockHubPool.sol +100 -0
  14. package/contracts/test/MockOFTMessenger.sol +88 -0
  15. package/contracts/test/MockOptimism_SpokePool.sol +22 -0
  16. package/contracts/test/MockPermit2.sol +188 -0
  17. package/contracts/test/MockSpokePool.sol +263 -0
  18. package/contracts/test/MockSpokePoolV2.sol +27 -0
  19. package/contracts/test/MockZkStackBridgeHub.sol +43 -0
  20. package/contracts/test/PolygonERC20Test.sol +16 -0
  21. package/contracts/test/PolygonMocks.sol +82 -0
  22. package/contracts/test/PolygonZkEVMMocks.sol +72 -0
  23. package/contracts/test/ScrollMocks.sol +109 -0
  24. package/contracts/test/V2MerkleLib.sol +18 -0
  25. package/contracts/test/ZkSyncMocks.sol +78 -0
  26. package/contracts/test/interfaces/IHyperCoreFlowExecutor.sol +189 -0
  27. package/contracts/test/interfaces/MockV2SpokePoolInterface.sol +38 -0
  28. package/dist/abi/AccessControl.sol/AccessControl.json +1 -1
  29. package/dist/abi/AccessControlEnumerable.sol/AccessControlEnumerable.json +1 -1
  30. package/dist/abi/AccessControlUpgradeable.sol/AccessControlUpgradeable.json +1 -1
  31. package/dist/abi/AcrossConfigStore.sol/AcrossConfigStore.json +1 -1
  32. package/dist/abi/AcrossEventEmitter.sol/AcrossEventEmitter.json +1 -1
  33. package/dist/abi/AcrossMerkleDistributor.sol/AcrossMerkleDistributor.json +1 -1
  34. package/dist/abi/AcrossMessageHandlerMock.sol/AcrossMessageHandlerMock.json +1 -0
  35. package/dist/abi/AdapterInterface.sol/AdapterInterface.json +1 -1
  36. package/dist/abi/AdapterStore.sol/AdapterStore.json +1 -1
  37. package/dist/abi/AdapterStore.sol/MessengerTypes.json +1 -1
  38. package/dist/abi/Address.sol/Address.json +1 -1
  39. package/dist/abi/AddressConverters.sol/Bytes32ToAddress.json +1 -1
  40. package/dist/abi/AddressWhitelistInterface.sol/AddressWhitelistInterface.json +1 -1
  41. package/dist/abi/AdminRelayTokensAdapter.sol/AdminRelayTokensAdapter.json +1 -1
  42. package/dist/abi/AdminWithdrawManager.sol/AdminWithdrawManager.json +1 -1
  43. package/dist/abi/ArbitraryEVMFlowExecutor.sol/ArbitraryEVMFlowExecutor.json +1 -1
  44. package/dist/abi/ArbitrumBridge.sol/ArbitrumCustomGasTokenInbox.json +1 -1
  45. package/dist/abi/ArbitrumBridge.sol/ArbitrumERC20Bridge.json +1 -1
  46. package/dist/abi/ArbitrumBridge.sol/ArbitrumInboxLike.json +1 -1
  47. package/dist/abi/ArbitrumBridge.sol/ArbitrumL1ERC20GatewayLike.json +1 -1
  48. package/dist/abi/ArbitrumBridge.sol/ArbitrumL2ERC20GatewayLike.json +1 -1
  49. package/dist/abi/ArbitrumMocks.sol/ArbitrumMockErc20GatewayRouter.json +1 -0
  50. package/dist/abi/ArbitrumMocks.sol/Inbox.json +1 -0
  51. package/dist/abi/ArbitrumMocks.sol/L2GatewayRouter.json +1 -0
  52. package/dist/abi/Arbitrum_Adapter.sol/Arbitrum_Adapter.json +1 -1
  53. package/dist/abi/Arbitrum_CustomGasToken_Adapter.sol/Arbitrum_CustomGasToken_Adapter.json +1 -1
  54. package/dist/abi/Arbitrum_CustomGasToken_Adapter.sol/FunderInterface.json +1 -1
  55. package/dist/abi/Arbitrum_Forwarder.sol/Arbitrum_Forwarder.json +1 -1
  56. package/dist/abi/Arbitrum_RescueAdapter.sol/Arbitrum_RescueAdapter.json +1 -1
  57. package/dist/abi/Arbitrum_SendTokensAdapter.sol/Arbitrum_SendTokensAdapter.json +1 -1
  58. package/dist/abi/Arbitrum_SpokePool.sol/Arbitrum_SpokePool.json +1 -1
  59. package/dist/abi/Arbitrum_WithdrawalHelper.sol/Arbitrum_WithdrawalHelper.json +1 -1
  60. package/dist/abi/AuthorizedFundedFlow.sol/AuthorizedFundedFlow.json +1 -1
  61. package/dist/abi/BaseModuleHandler.sol/BaseModuleHandler.json +1 -1
  62. package/dist/abi/BaseSimulatorTest.sol/BaseSimulatorTest.json +1 -1
  63. package/dist/abi/Base_Adapter.sol/Base_Adapter.json +1 -1
  64. package/dist/abi/BeaconProxy.sol/BeaconProxy.json +1 -1
  65. package/dist/abi/Blast_Adapter.sol/Blast_Adapter.json +1 -1
  66. package/dist/abi/Blast_Adapter.sol/IL1ERC20Bridge.json +1 -1
  67. package/dist/abi/Blast_DaiRetriever.sol/Blast_DaiRetriever.json +1 -1
  68. package/dist/abi/Blast_DaiRetriever.sol/USDYieldManager.json +1 -1
  69. package/dist/abi/Blast_RescueAdapter.sol/Blast_RescueAdapter.json +1 -1
  70. package/dist/abi/Blast_SpokePool.sol/Blast_SpokePool.json +1 -1
  71. package/dist/abi/Blast_SpokePool.sol/IBlast.json +1 -1
  72. package/dist/abi/Blast_SpokePool.sol/IERC20Rebasing.json +1 -1
  73. package/dist/abi/Blast_SpokePool.sol/IUSDBL2Bridge.json +1 -1
  74. package/dist/abi/Boba_Adapter.sol/Boba_Adapter.json +1 -1
  75. package/dist/abi/Boba_SpokePool.sol/Boba_SpokePool.json +1 -1
  76. package/dist/abi/BondToken.sol/BondToken.json +1 -1
  77. package/dist/abi/BondToken.sol/ExtendedHubPoolInterface.json +1 -1
  78. package/dist/abi/BytesLib.sol/BytesLib.json +1 -1
  79. package/dist/abi/CCTPInterfaces.sol/IMessageTransmitter.json +1 -1
  80. package/dist/abi/CCTPInterfaces.sol/IMessageTransmitterV2.json +1 -1
  81. package/dist/abi/CCTPInterfaces.sol/ITokenMessenger.json +1 -1
  82. package/dist/abi/CCTPInterfaces.sol/ITokenMessengerV2.json +1 -1
  83. package/dist/abi/CCTPInterfaces.sol/ITokenMinter.json +1 -1
  84. package/dist/abi/Cher_SpokePool.sol/Cher_SpokePool.json +1 -1
  85. package/dist/abi/CircleCCTPAdapter.sol/CircleCCTPAdapter.json +1 -1
  86. package/dist/abi/CircleCCTPAdapter.sol/CircleDomainIds.json +1 -1
  87. package/dist/abi/Clones.sol/Clones.json +1 -1
  88. package/dist/abi/Constants.sol/Constants.json +1 -1
  89. package/dist/abi/Constants.sol/OptimisticOracleConstraints.json +1 -1
  90. package/dist/abi/Constants.sol/OracleInterfaces.json +1 -1
  91. package/dist/abi/ContextUpgradeable.sol/ContextUpgradeable.json +1 -1
  92. package/dist/abi/CoreExecution.sol/CoreExecution.json +1 -1
  93. package/dist/abi/CoreSimulatorLib.sol/HypeSystemContract.json +1 -1
  94. package/dist/abi/CoreState.sol/CoreState.json +1 -1
  95. package/dist/abi/CoreView.sol/CoreView.json +1 -1
  96. package/dist/abi/CoreWriterLib.sol/CoreWriterLib.json +1 -1
  97. package/dist/abi/CoreWriterSim.sol/CoreWriterSim.json +1 -1
  98. package/dist/abi/CounterfactualDeposit.sol/CounterfactualDeposit.json +1 -1
  99. package/dist/abi/CounterfactualDepositCCTP.sol/CounterfactualDepositCCTP.json +1 -1
  100. package/dist/abi/CounterfactualDepositCCTP.sol/ISponsoredCCTPSrcPeriphery.json +1 -1
  101. package/dist/abi/CounterfactualDepositFactory.sol/CounterfactualDepositFactory.json +1 -1
  102. package/dist/abi/CounterfactualDepositFactoryTron.sol/CounterfactualDepositFactoryTron.json +1 -1
  103. package/dist/abi/CounterfactualDepositOFT.sol/CounterfactualDepositOFT.json +1 -1
  104. package/dist/abi/CounterfactualDepositOFT.sol/ISponsoredOFTSrcPeriphery.json +1 -1
  105. package/dist/abi/CounterfactualDepositSpokePool.sol/CounterfactualDepositSpokePool.json +1 -1
  106. package/dist/abi/Create2.sol/Create2.json +1 -1
  107. package/dist/abi/CrossDomainEnabled.sol/CrossDomainEnabled.json +1 -1
  108. package/dist/abi/DeployedAddresses.sol/DeployedAddresses.json +1 -1
  109. package/dist/abi/DeploymentUtils.sol/DeploymentUtils.json +1 -1
  110. package/dist/abi/DoctorWho_Adapter.sol/DoctorWho_Adapter.json +1 -1
  111. package/dist/abi/DonationBox.sol/DonationBox.json +1 -1
  112. package/dist/abi/DstOFTHandler.sol/DstOFTHandler.json +1 -1
  113. package/dist/abi/ECDSA.sol/ECDSA.json +1 -1
  114. package/dist/abi/EIP712.sol/EIP712.json +1 -1
  115. package/dist/abi/EIP712CrossChainUpgradeable.sol/EIP712CrossChainUpgradeable.json +1 -1
  116. package/dist/abi/ERC1155.sol/ERC1155.json +1 -1
  117. package/dist/abi/ERC165.sol/ERC165.json +1 -1
  118. package/dist/abi/ERC165Upgradeable.sol/ERC165Upgradeable.json +1 -1
  119. package/dist/abi/ERC1967Proxy.sol/ERC1967Proxy.json +1 -1
  120. package/dist/abi/ERC1967Upgrade.sol/ERC1967Upgrade.json +1 -1
  121. package/dist/abi/ERC1967UpgradeUpgradeable.sol/ERC1967UpgradeUpgradeable.json +1 -1
  122. package/dist/abi/ERC1967Utils.sol/ERC1967Utils.json +1 -1
  123. package/dist/abi/ERC20.sol/ERC20.json +1 -1
  124. package/dist/abi/ERC20Permit.sol/ERC20Permit.json +1 -1
  125. package/dist/abi/ERC7683.sol/IDestinationSettler.json +1 -1
  126. package/dist/abi/Errors.sol/Errors.json +1 -1
  127. package/dist/abi/Ethereum_Adapter.sol/Ethereum_Adapter.json +1 -1
  128. package/dist/abi/Ethereum_RescueAdapter.sol/Ethereum_RescueAdapter.json +1 -1
  129. package/dist/abi/Ethereum_SpokePool.sol/Ethereum_SpokePool.json +1 -1
  130. package/dist/abi/ExpandedERC20.sol/ExpandedERC20.json +1 -1
  131. package/dist/abi/ExpandedERC20WithBlacklist.sol/ExpandedERC20WithBlacklist.json +1 -1
  132. package/dist/abi/ExpandedIERC20.sol/ExpandedIERC20.json +1 -1
  133. package/dist/abi/FinderInterface.sol/FinderInterface.json +1 -1
  134. package/dist/abi/ForwarderBase.sol/ForwarderBase.json +1 -1
  135. package/dist/abi/ForwarderInterface.sol/ForwarderInterface.json +1 -1
  136. package/dist/abi/HLConstants.sol/HLConstants.json +1 -1
  137. package/dist/abi/HLConversions.sol/HLConversions.json +1 -1
  138. package/dist/abi/HubPool.sol/HubPool.json +1 -1
  139. package/dist/abi/HubPoolInterface.sol/HubPoolInterface.json +1 -1
  140. package/dist/abi/HubPoolStore.sol/HubPoolStore.json +1 -1
  141. package/dist/abi/HubPoolStore.sol/IHubPool.json +1 -1
  142. package/dist/abi/HubPoolTestBase.sol/HubPoolTestBase.json +1 -1
  143. package/dist/abi/HubPoolTestBase.sol/MockAddressWhitelist.json +1 -1
  144. package/dist/abi/HubPoolTestBase.sol/MockFinder.json +1 -1
  145. package/dist/abi/HubPoolTestBase.sol/MockIdentifierWhitelist.json +1 -1
  146. package/dist/abi/HubPoolTestBase.sol/MockLpTokenFactory.json +1 -1
  147. package/dist/abi/HubPoolTestBase.sol/MockOptimisticOracle.json +1 -1
  148. package/dist/abi/HubPoolTestBase.sol/MockStore.json +1 -1
  149. package/dist/abi/HyperCore.sol/HyperCore.json +1 -1
  150. package/dist/abi/HyperCoreFlowExecutor.sol/HyperCoreFlowExecutor.json +1 -1
  151. package/dist/abi/HyperCoreFlowRoles.sol/HyperCoreFlowRoles.json +1 -1
  152. package/dist/abi/HyperCoreLib.sol/HyperCoreLib.json +1 -1
  153. package/dist/abi/HyperCoreLib.sol/ICoreWriter.json +1 -1
  154. package/dist/abi/HyperCoreMockHelper.sol/HyperCoreMockHelper.json +1 -0
  155. package/dist/abi/HyperliquidDepositHandler.sol/HyperliquidDepositHandler.json +1 -1
  156. package/dist/abi/IAccessControl.sol/IAccessControl.json +1 -1
  157. package/dist/abi/IAccessControlEnumerable.sol/IAccessControlEnumerable.json +1 -1
  158. package/dist/abi/IBeacon.sol/IBeacon.json +1 -1
  159. package/dist/abi/IBeaconUpgradeable.sol/IBeaconUpgradeable.json +1 -1
  160. package/dist/abi/ICoreDepositWallet.sol/ICoreDepositWallet.json +1 -1
  161. package/dist/abi/ICoreDepositWallet.sol/IForwardDepositReceiver.json +1 -1
  162. package/dist/abi/ICoreWriter.sol/ICoreWriter.json +1 -1
  163. package/dist/abi/ICounterfactualDeposit.sol/ICounterfactualDeposit.json +1 -1
  164. package/dist/abi/ICounterfactualDepositFactory.sol/ICounterfactualDepositFactory.json +1 -1
  165. package/dist/abi/ICounterfactualImplementation.sol/ICounterfactualImplementation.json +1 -1
  166. package/dist/abi/ICrossDomainMessenger.sol/ICrossDomainMessenger.json +1 -1
  167. package/dist/abi/ICrossDomainMessengerUpgradeable.sol/ICrossDomainMessengerUpgradeable.json +1 -1
  168. package/dist/abi/IERC1155.sol/IERC1155.json +1 -1
  169. package/dist/abi/IERC1155MetadataURI.sol/IERC1155MetadataURI.json +1 -1
  170. package/dist/abi/IERC1155Receiver.sol/IERC1155Receiver.json +1 -1
  171. package/dist/abi/IERC1271.sol/IERC1271.json +1 -1
  172. package/dist/abi/IERC1363.sol/IERC1363.json +1 -1
  173. package/dist/abi/IERC165.sol/IERC165.json +1 -1
  174. package/dist/abi/IERC1967.sol/IERC1967.json +1 -1
  175. package/dist/abi/IERC1967Upgradeable.sol/IERC1967Upgradeable.json +1 -1
  176. package/dist/abi/IERC20.sol/IERC20.json +1 -1
  177. package/dist/abi/IERC20Auth.sol/IERC20Auth.json +1 -1
  178. package/dist/abi/IERC20Metadata.sol/IERC20Metadata.json +1 -1
  179. package/dist/abi/IERC20Permit.sol/IERC20Permit.json +1 -1
  180. package/dist/abi/IERC20PermitUpgradeable.sol/IERC20PermitUpgradeable.json +1 -1
  181. package/dist/abi/IERC20Upgradeable.sol/IERC20Upgradeable.json +1 -1
  182. package/dist/abi/IERC5267.sol/IERC5267.json +1 -1
  183. package/dist/abi/IHelios.sol/IHelios.json +1 -1
  184. package/dist/abi/IHypXERC20Router.sol/IHypXERC20Router.json +1 -1
  185. package/dist/abi/IHyperCoreFlowExecutor.sol/IHyperCoreFlowExecutor.json +1 -1
  186. package/dist/abi/IL1ERC20Bridge.sol/IL1ERC20Bridge.json +1 -1
  187. package/dist/abi/IL1ERC20Gateway.sol/IL1ERC20Gateway.json +1 -1
  188. package/dist/abi/IL1ETHGateway.sol/IL1ETHGateway.json +1 -1
  189. package/dist/abi/IL1GatewayRouter.sol/IL1GatewayRouter.json +1 -1
  190. package/dist/abi/IL1ScrollMessenger.sol/IL1ScrollMessenger.json +1 -1
  191. package/dist/abi/IL1StandardBridge.sol/IL1StandardBridge.json +1 -1
  192. package/dist/abi/IL2ERC20Gateway.sol/IL2ERC20Gateway.json +1 -1
  193. package/dist/abi/IL2ETHGateway.sol/IL2ETHGateway.json +1 -1
  194. package/dist/abi/IL2GasPriceOracle.sol/IL2GasPriceOracle.json +1 -1
  195. package/dist/abi/IL2GatewayRouter.sol/IL2GatewayRouter.json +1 -1
  196. package/dist/abi/ILayerZeroComposer.sol/ILayerZeroComposer.json +1 -1
  197. package/dist/abi/IMulticall3.sol/IMulticall3.json +1 -1
  198. package/dist/abi/IOFT.sol/IEndpoint.json +1 -1
  199. package/dist/abi/IOFT.sol/IOAppCore.json +1 -1
  200. package/dist/abi/IOFT.sol/IOFT.json +1 -1
  201. package/dist/abi/IOpUSDCBridgeAdapter.sol/IOpUSDCBridgeAdapter.json +1 -1
  202. package/dist/abi/IPermit2.sol/IPermit2.json +1 -1
  203. package/dist/abi/IPolygonZkEVMBridge.sol/IPolygonZkEVMBridge.json +1 -1
  204. package/dist/abi/IProxyAdmin.sol/IProxyAdmin.json +1 -1
  205. package/dist/abi/ISP1Verifier.sol/ISP1Verifier.json +1 -1
  206. package/dist/abi/ISP1Verifier.sol/ISP1VerifierWithHash.json +1 -1
  207. package/dist/abi/IScrollMessenger.sol/IScrollMessenger.json +1 -1
  208. package/dist/abi/ISpokePool.sol/ISpokePool.json +1 -1
  209. package/dist/abi/ITokenRegistry.sol/ITokenRegistry.json +1 -1
  210. package/dist/abi/IUpgradeableBeacon.sol/IUpgradeableBeacon.json +1 -1
  211. package/dist/abi/IUpgradeableProxy.sol/IUpgradeableProxy.json +1 -1
  212. package/dist/abi/IdentifierWhitelistInterface.sol/IdentifierWhitelistInterface.json +1 -1
  213. package/dist/abi/Initializable.sol/Initializable.json +1 -1
  214. package/dist/abi/Ink_SpokePool.sol/Ink_SpokePool.json +1 -1
  215. package/dist/abi/Lens_SpokePool.sol/Lens_SpokePool.json +1 -1
  216. package/dist/abi/LibVariable.sol/LibVariable.json +1 -1
  217. package/dist/abi/LineaInterfaces.sol/IMessageService.json +1 -1
  218. package/dist/abi/LineaInterfaces.sol/ITokenBridge.json +1 -1
  219. package/dist/abi/LineaInterfaces.sol/IUSDCBridge.json +1 -1
  220. package/dist/abi/LineaMocks.sol/MockL2MessageService.json +1 -0
  221. package/dist/abi/LineaMocks.sol/MockL2TokenBridge.json +1 -0
  222. package/dist/abi/Linea_Adapter.sol/Linea_Adapter.json +1 -1
  223. package/dist/abi/Linea_SpokePool.sol/Linea_SpokePool.json +1 -1
  224. package/dist/abi/Lisk_Adapter.sol/Lisk_Adapter.json +1 -1
  225. package/dist/abi/Lisk_SpokePool.sol/Lisk_SpokePool.json +1 -1
  226. package/dist/abi/Lockable.sol/Lockable.json +1 -1
  227. package/dist/abi/LpTokenFactory.sol/LpTokenFactory.json +1 -1
  228. package/dist/abi/LpTokenFactoryInterface.sol/LpTokenFactoryInterface.json +1 -1
  229. package/dist/abi/Merkle.sol/Merkle.json +1 -1
  230. package/dist/abi/MerkleDistributor.sol/MerkleDistributor.json +1 -1
  231. package/dist/abi/MerkleDistributorInterface.sol/MerkleDistributorInterface.json +1 -1
  232. package/dist/abi/MerkleLibTest.sol/MerkleLibTest.json +1 -1
  233. package/dist/abi/MerkleProof.sol/MerkleProof.json +1 -1
  234. package/dist/abi/MinimalLZOptions.sol/MinimalLZOptions.json +1 -1
  235. package/dist/abi/MintableERC1155.sol/MintableERC1155.json +1 -1
  236. package/dist/abi/MockBedrockStandardBridge.sol/MockBedrockCrossDomainMessenger.json +1 -0
  237. package/dist/abi/MockBedrockStandardBridge.sol/MockBedrockL1StandardBridge.json +1 -0
  238. package/dist/abi/MockBedrockStandardBridge.sol/MockBedrockL2StandardBridge.json +1 -0
  239. package/dist/abi/MockBlastUsdYieldManager.sol/MockBlastUsdYieldManager.json +1 -0
  240. package/dist/abi/MockCCTP.sol/MockCCTPMessageTransmitter.json +1 -0
  241. package/dist/abi/MockCCTP.sol/MockCCTPMessenger.json +1 -0
  242. package/dist/abi/MockCCTP.sol/MockCCTPMessengerV2.json +1 -0
  243. package/dist/abi/MockCCTP.sol/MockCCTPMinter.json +1 -0
  244. package/dist/abi/MockCaller.sol/MockCaller.json +1 -0
  245. package/dist/abi/MockERC1271.sol/MockERC1271.json +1 -0
  246. package/dist/abi/MockERC20.sol/MintableERC20.json +1 -0
  247. package/dist/abi/MockERC20.sol/MockERC20.json +1 -0
  248. package/dist/abi/MockEndpoint.sol/MockEndpoint.json +1 -0
  249. package/dist/abi/MockHubPool.sol/MockHubPool.json +1 -0
  250. package/dist/abi/MockOFTMessenger.sol/MockOFTMessenger.json +1 -0
  251. package/dist/abi/MockOptimism_SpokePool.sol/MockOptimism_SpokePool.json +1 -0
  252. package/dist/abi/MockPermit2.sol/MockPermit2.json +1 -0
  253. package/dist/abi/MockPermit2.sol/Permit2EIP712.json +1 -0
  254. package/dist/abi/MockPermit2.sol/SignatureVerification.json +1 -0
  255. package/dist/abi/MockSpokePool.sol/MockSpokePool.json +1 -0
  256. package/dist/abi/MockSpokePoolV2.sol/MockSpokePoolV2.json +1 -0
  257. package/dist/abi/MockZkStackBridgeHub.sol/MockBridgeHub.json +1 -0
  258. package/dist/abi/Mock_Adapter.sol/Mock_Adapter.json +1 -0
  259. package/dist/abi/Mock_Adapter.sol/Mock_Bridge.json +1 -0
  260. package/dist/abi/Mode_Adapter.sol/Mode_Adapter.json +1 -1
  261. package/dist/abi/MultiCaller.sol/MultiCaller.json +1 -1
  262. package/dist/abi/MultiCallerUpgradeable.sol/MultiCallerUpgradeable.json +1 -1
  263. package/dist/abi/MultiRole.sol/MultiRole.json +1 -1
  264. package/dist/abi/Multicall3.sol/Multicall3.json +1 -1
  265. package/dist/abi/MulticallHandler.sol/MulticallHandler.json +1 -1
  266. package/dist/abi/MurkyBase.sol/MurkyBase.json +1 -1
  267. package/dist/abi/OFTCoreMath.sol/OFTCoreMath.json +1 -1
  268. package/dist/abi/OFTTransportAdapter.sol/OFTTransportAdapter.json +1 -1
  269. package/dist/abi/OFTTransportAdapterWithStore.sol/OFTTransportAdapterWithStore.json +1 -1
  270. package/dist/abi/OP_Adapter.sol/OP_Adapter.json +1 -1
  271. package/dist/abi/OP_SpokePool.sol/OP_SpokePool.json +1 -1
  272. package/dist/abi/Optimism_Adapter.sol/Optimism_Adapter.json +1 -1
  273. package/dist/abi/Optimism_Adapter.sol/SynthetixBridgeToOptimism.json +1 -1
  274. package/dist/abi/Optimism_SpokePool.sol/Optimism_SpokePool.json +1 -1
  275. package/dist/abi/Optimism_SpokePool.sol/SynthetixBridgeToBase.json +1 -1
  276. package/dist/abi/OptimisticOracleInterface.sol/OptimisticOracleInterface.json +1 -1
  277. package/dist/abi/Ovm_Forwarder.sol/Ovm_Forwarder.json +1 -1
  278. package/dist/abi/Ovm_SpokePool.sol/IL2ERC20Bridge.json +1 -1
  279. package/dist/abi/Ovm_SpokePool.sol/Ovm_SpokePool.json +1 -1
  280. package/dist/abi/Ovm_WithdrawalHelper.sol/IOvm_SpokePool.json +1 -1
  281. package/dist/abi/Ovm_WithdrawalHelper.sol/Ovm_WithdrawalHelper.json +1 -1
  282. package/dist/abi/Ownable.sol/Ownable.json +1 -1
  283. package/dist/abi/OwnableUpgradeable.sol/OwnableUpgradeable.json +1 -1
  284. package/dist/abi/PeripherySigningLib.sol/PeripherySigningLib.json +1 -1
  285. package/dist/abi/PermissionSplitterProxy.sol/PermissionSplitterProxy.json +1 -1
  286. package/dist/abi/PermissionedMulticallHandler.sol/PermissionedMulticallHandler.json +1 -1
  287. package/dist/abi/PolygonERC20Test.sol/PolygonERC20Test.json +1 -1
  288. package/dist/abi/PolygonMocks.sol/DepositManagerMock.json +1 -0
  289. package/dist/abi/PolygonMocks.sol/FxStateSenderMock.json +1 -0
  290. package/dist/abi/PolygonMocks.sol/PolygonERC20Mock.json +1 -0
  291. package/dist/abi/PolygonMocks.sol/PolygonERC20PredicateMock.json +1 -0
  292. package/dist/abi/PolygonMocks.sol/PolygonRegistryMock.json +1 -0
  293. package/dist/abi/PolygonMocks.sol/RootChainManagerMock.json +1 -0
  294. package/dist/abi/PolygonTokenBridger.sol/MaticToken.json +1 -1
  295. package/dist/abi/PolygonTokenBridger.sol/PolygonERC20Predicate.json +1 -1
  296. package/dist/abi/PolygonTokenBridger.sol/PolygonIERC20Upgradeable.json +1 -1
  297. package/dist/abi/PolygonTokenBridger.sol/PolygonRegistry.json +1 -1
  298. package/dist/abi/PolygonTokenBridger.sol/PolygonTokenBridger.json +1 -1
  299. package/dist/abi/PolygonZkEVMMocks.sol/MockPolygonZkEVMBridge.json +1 -0
  300. package/dist/abi/PolygonZkEVM_Adapter.sol/PolygonZkEVM_Adapter.json +1 -1
  301. package/dist/abi/PolygonZkEVM_SpokePool.sol/IBridgeMessageReceiver.json +1 -1
  302. package/dist/abi/PolygonZkEVM_SpokePool.sol/PolygonZkEVM_SpokePool.json +1 -1
  303. package/dist/abi/Polygon_Adapter.sol/DepositManager.json +1 -1
  304. package/dist/abi/Polygon_Adapter.sol/IFxStateSender.json +1 -1
  305. package/dist/abi/Polygon_Adapter.sol/IRootChainManager.json +1 -1
  306. package/dist/abi/Polygon_Adapter.sol/Polygon_Adapter.json +1 -1
  307. package/dist/abi/Polygon_SpokePool.sol/IFxMessageProcessor.json +1 -1
  308. package/dist/abi/Polygon_SpokePool.sol/Polygon_SpokePool.json +1 -1
  309. package/dist/abi/PrecompileLib.sol/PrecompileLib.json +1 -1
  310. package/dist/abi/PrecompileSim.sol/PrecompileSim.json +1 -1
  311. package/dist/abi/Proxy.sol/Proxy.json +1 -1
  312. package/dist/abi/ProxyAdmin.sol/ProxyAdmin.json +1 -1
  313. package/dist/abi/ReentrancyGuard.sol/ReentrancyGuard.json +1 -1
  314. package/dist/abi/ReentrancyGuardUpgradeable.sol/ReentrancyGuardUpgradeable.json +1 -1
  315. package/dist/abi/Router_Adapter.sol/Router_Adapter.json +1 -1
  316. package/dist/abi/SP1AutoVerifier.sol/SP1AutoVerifier.json +1 -1
  317. package/dist/abi/SP1Helios.sol/SP1Helios.json +1 -1
  318. package/dist/abi/SP1MockVerifier.sol/SP1MockVerifier.json +1 -0
  319. package/dist/abi/SafeCast.sol/SafeCast.json +1 -1
  320. package/dist/abi/SafeERC20.sol/SafeERC20.json +1 -1
  321. package/dist/abi/ScrollMocks.sol/MockScrollL2GatewayRouter.json +1 -0
  322. package/dist/abi/ScrollMocks.sol/MockScrollMessenger.json +1 -0
  323. package/dist/abi/Scroll_Adapter.sol/Scroll_Adapter.json +1 -1
  324. package/dist/abi/Scroll_SpokePool.sol/IL2GatewayRouterExtended.json +1 -1
  325. package/dist/abi/Scroll_SpokePool.sol/Scroll_SpokePool.json +1 -1
  326. package/dist/abi/ShortStrings.sol/ShortStrings.json +1 -1
  327. package/dist/abi/SkinnyOptimisticOracleInterface.sol/SkinnyOptimisticOracleInterface.json +1 -1
  328. package/dist/abi/Solana_Adapter.sol/Solana_Adapter.json +1 -1
  329. package/dist/abi/SpokePool.sol/SpokePool.json +1 -1
  330. package/dist/abi/SpokePoolInterface.sol/SpokePoolInterface.json +1 -1
  331. package/dist/abi/SpokePoolMessageHandler.sol/AcrossMessageHandler.json +1 -1
  332. package/dist/abi/SpokePoolPeriphery.sol/SpokePoolPeriphery.json +1 -1
  333. package/dist/abi/SpokePoolPeriphery.sol/SwapProxy.json +1 -1
  334. package/dist/abi/SpokePoolPeripheryInterface.sol/SpokePoolPeripheryInterface.json +1 -1
  335. package/dist/abi/SpokePoolVerifier.sol/SpokePoolVerifier.json +1 -1
  336. package/dist/abi/SponsoredCCTPDstPeriphery.sol/SponsoredCCTPDstPeriphery.json +1 -1
  337. package/dist/abi/SponsoredCCTPInterface.sol/SponsoredCCTPInterface.json +1 -1
  338. package/dist/abi/SponsoredCCTPSrcPeriphery.sol/SponsoredCCTPSrcPeriphery.json +1 -1
  339. package/dist/abi/SponsoredOFTInterface.sol/SponsoredOFTInterface.json +1 -1
  340. package/dist/abi/SponsoredOFTSrcPeriphery.sol/SponsoredOFTSrcPeriphery.json +1 -1
  341. package/dist/abi/StdConfig.sol/StdConfig.json +1 -1
  342. package/dist/abi/StoreInterface.sol/StoreInterface.json +1 -1
  343. package/dist/abi/Strings.sol/Strings.json +1 -1
  344. package/dist/abi/SwapHandler.sol/SwapHandler.json +1 -1
  345. package/dist/abi/Testable.sol/Testable.json +1 -1
  346. package/dist/abi/Timer.sol/Timer.json +1 -1
  347. package/dist/abi/TransferProxy.sol/TransferProxy.json +1 -1
  348. package/dist/abi/TransparentUpgradeableProxy.sol/ITransparentUpgradeableProxy.json +1 -1
  349. package/dist/abi/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json +1 -1
  350. package/dist/abi/UUPSUpgradeable.sol/UUPSUpgradeable.json +1 -1
  351. package/dist/abi/Universal_Adapter.sol/IOwnable.json +1 -1
  352. package/dist/abi/Universal_Adapter.sol/Universal_Adapter.json +1 -1
  353. package/dist/abi/Universal_SpokePool.sol/Universal_SpokePool.json +1 -1
  354. package/dist/abi/UpgradeableBeacon.sol/UpgradeableBeacon.json +1 -1
  355. package/dist/abi/V3SpokePoolInterface.sol/V3SpokePoolInterface.json +1 -1
  356. package/dist/abi/WETH9.sol/WETH9.json +1 -1
  357. package/dist/abi/WETH9Interface.sol/WETH9Interface.json +1 -1
  358. package/dist/abi/WithdrawImplementation.sol/WithdrawImplementation.json +1 -1
  359. package/dist/abi/WithdrawalHelperBase.sol/WithdrawalHelperBase.json +1 -1
  360. package/dist/abi/WorldChain_SpokePool.sol/WorldChain_SpokePool.json +1 -1
  361. package/dist/abi/ZkStackBridgeHub.sol/BridgeHubInterface.json +1 -1
  362. package/dist/abi/ZkStack_Adapter.sol/ZkStack_Adapter.json +1 -1
  363. package/dist/abi/ZkStack_CustomGasToken_Adapter.sol/FunderInterface.json +1 -1
  364. package/dist/abi/ZkStack_CustomGasToken_Adapter.sol/ZkStack_CustomGasToken_Adapter.json +1 -1
  365. package/dist/abi/ZkSyncMocks.sol/MockL2Eth.json +1 -0
  366. package/dist/abi/ZkSyncMocks.sol/MockZkBridge.json +1 -0
  367. package/dist/abi/ZkSync_SpokePool.sol/IL2AssetRouter.json +1 -1
  368. package/dist/abi/ZkSync_SpokePool.sol/IL2ETH.json +1 -1
  369. package/dist/abi/ZkSync_SpokePool.sol/ZkBridgeLike.json +1 -1
  370. package/dist/abi/ZkSync_SpokePool.sol/ZkSync_SpokePool.json +1 -1
  371. package/dist/abi/Zora_Adapter.sol/Zora_Adapter.json +1 -1
  372. package/dist/abi/draft-IERC1822.sol/IERC1822Proxiable.json +1 -1
  373. package/dist/abi/draft-IERC1822Upgradeable.sol/IERC1822ProxiableUpgradeable.json +1 -1
  374. package/dist/abi/eraVM_EIP7702.sol/SimpleContract.json +1 -1
  375. package/dist/abi/eraVM_EIP7702.sol/SpokePoolEIP7702Test.json +1 -1
  376. package/dist/abi/eraVM_EIP7702.sol/TestableMockSpokePool.json +1 -1
  377. package/package.json +3 -3
@@ -0,0 +1,14 @@
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ pragma solidity ^0.8.0;
3
+
4
+ import "../spoke-pools/SpokePool.sol";
5
+ import "../interfaces/V3SpokePoolInterface.sol";
6
+
7
+ contract AcrossMessageHandlerMock is AcrossMessageHandler {
8
+ function handleV3AcrossMessage(
9
+ address tokenSent,
10
+ uint256 amount,
11
+ address relayer,
12
+ bytes memory message
13
+ ) external override {}
14
+ }
@@ -0,0 +1,169 @@
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ pragma solidity ^0.8.0;
3
+
4
+ contract ArbitrumMockErc20GatewayRouter {
5
+ address public gateway;
6
+
7
+ event OutboundTransferCalled(
8
+ address l1Token,
9
+ address to,
10
+ uint256 amount,
11
+ uint256 maxGas,
12
+ uint256 gasPriceBid,
13
+ bytes data
14
+ );
15
+
16
+ event OutboundTransferCustomRefundCalled(
17
+ address l1Token,
18
+ address refundTo,
19
+ address to,
20
+ uint256 amount,
21
+ uint256 maxGas,
22
+ uint256 gasPriceBid,
23
+ bytes data
24
+ );
25
+
26
+ // Call tracking for test assertions (smock-like behavior)
27
+ uint256 public outboundTransferCustomRefundCallCount;
28
+
29
+ struct OutboundTransferCustomRefundCall {
30
+ address l1Token;
31
+ address refundTo;
32
+ address to;
33
+ uint256 amount;
34
+ uint256 maxGas;
35
+ uint256 gasPriceBid;
36
+ bytes data;
37
+ }
38
+ OutboundTransferCustomRefundCall public lastOutboundTransferCustomRefundCall;
39
+
40
+ function setGateway(address _gateway) external {
41
+ gateway = _gateway;
42
+ }
43
+
44
+ function outboundTransferCustomRefund(
45
+ address _l1Token,
46
+ address _refundTo,
47
+ address _to,
48
+ uint256 _amount,
49
+ uint256 _maxGas,
50
+ uint256 _gasPriceBid,
51
+ bytes calldata _data
52
+ ) external payable returns (bytes memory) {
53
+ outboundTransferCustomRefundCallCount++;
54
+ lastOutboundTransferCustomRefundCall = OutboundTransferCustomRefundCall(
55
+ _l1Token,
56
+ _refundTo,
57
+ _to,
58
+ _amount,
59
+ _maxGas,
60
+ _gasPriceBid,
61
+ _data
62
+ );
63
+ emit OutboundTransferCustomRefundCalled(_l1Token, _refundTo, _to, _amount, _maxGas, _gasPriceBid, _data);
64
+ return _data;
65
+ }
66
+
67
+ function outboundTransfer(
68
+ address _l1Token,
69
+ address _to,
70
+ uint256 _amount,
71
+ uint256 _maxGas,
72
+ uint256 _gasPriceBid,
73
+ bytes calldata _data
74
+ ) external payable returns (bytes memory) {
75
+ emit OutboundTransferCalled(_l1Token, _to, _amount, _maxGas, _gasPriceBid, _data);
76
+ return _data;
77
+ }
78
+
79
+ function getGateway(address) external view returns (address) {
80
+ // Return custom gateway if set, otherwise return self (original behavior)
81
+ return gateway != address(0) ? gateway : address(this);
82
+ }
83
+ }
84
+
85
+ contract Inbox {
86
+ event RetryableTicketCreated(
87
+ address destAddr,
88
+ uint256 l2CallValue,
89
+ uint256 maxSubmissionCost,
90
+ address excessFeeRefundAddress,
91
+ address callValueRefundAddress,
92
+ uint256 maxGas,
93
+ uint256 gasPriceBid,
94
+ bytes data
95
+ );
96
+
97
+ // Call tracking for test assertions (smock-like behavior)
98
+ uint256 public createRetryableTicketCallCount;
99
+
100
+ struct CreateRetryableTicketCall {
101
+ address destAddr;
102
+ uint256 l2CallValue;
103
+ uint256 maxSubmissionCost;
104
+ address excessFeeRefundAddress;
105
+ address callValueRefundAddress;
106
+ uint256 maxGas;
107
+ uint256 gasPriceBid;
108
+ bytes data;
109
+ }
110
+ CreateRetryableTicketCall public lastCreateRetryableTicketCall;
111
+
112
+ function createRetryableTicket(
113
+ address _destAddr,
114
+ uint256 _l2CallValue,
115
+ uint256 _maxSubmissionCost,
116
+ address _excessFeeRefundAddress,
117
+ address _callValueRefundAddress,
118
+ uint256 _maxGas,
119
+ uint256 _gasPriceBid,
120
+ bytes memory _data
121
+ ) external payable returns (uint256) {
122
+ createRetryableTicketCallCount++;
123
+ lastCreateRetryableTicketCall = CreateRetryableTicketCall(
124
+ _destAddr,
125
+ _l2CallValue,
126
+ _maxSubmissionCost,
127
+ _excessFeeRefundAddress,
128
+ _callValueRefundAddress,
129
+ _maxGas,
130
+ _gasPriceBid,
131
+ _data
132
+ );
133
+ emit RetryableTicketCreated(
134
+ _destAddr,
135
+ _l2CallValue,
136
+ _maxSubmissionCost,
137
+ _excessFeeRefundAddress,
138
+ _callValueRefundAddress,
139
+ _maxGas,
140
+ _gasPriceBid,
141
+ _data
142
+ );
143
+ return 0;
144
+ }
145
+ }
146
+
147
+ contract L2GatewayRouter {
148
+ mapping(address => address) l2Tokens;
149
+
150
+ event OutboundTransfer(address indexed l1Token, address indexed to, uint256 amount);
151
+
152
+ function outboundTransfer(
153
+ address l1Token,
154
+ address to,
155
+ uint256 amount,
156
+ bytes memory
157
+ ) public payable returns (bytes memory) {
158
+ emit OutboundTransfer(l1Token, to, amount);
159
+ return "";
160
+ }
161
+
162
+ function calculateL2TokenAddress(address l1Token) external view returns (address) {
163
+ return l2Tokens[l1Token];
164
+ }
165
+
166
+ function setL2TokenAddress(address l1Token, address l2Token) external {
167
+ l2Tokens[l1Token] = l2Token;
168
+ }
169
+ }
@@ -0,0 +1,19 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.0;
3
+
4
+ import "../external/uma/core/contracts/common/implementation/ExpandedERC20.sol";
5
+
6
+ contract ExpandedERC20WithBlacklist is ExpandedERC20 {
7
+ mapping(address => bool) public isBlackListed;
8
+
9
+ constructor(string memory name, string memory symbol, uint8 decimals) ExpandedERC20(name, symbol, decimals) {}
10
+
11
+ function setBlacklistStatus(address account, bool status) external {
12
+ isBlackListed[account] = status;
13
+ }
14
+
15
+ function _beforeTokenTransfer(address from, address to, uint256 amount) internal override {
16
+ require(!isBlackListed[to], "Recipient is blacklisted");
17
+ super._beforeTokenTransfer(from, to, amount);
18
+ }
19
+ }
@@ -0,0 +1,83 @@
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ pragma solidity ^0.8.0;
3
+
4
+ import { IMessageService, ITokenBridge } from "../external/interfaces/LineaInterfaces.sol";
5
+
6
+ /**
7
+ * @notice Mock implementation of Linea's L2 Message Service.
8
+ * @dev Used for testing Linea_SpokePool functionality.
9
+ */
10
+ contract MockL2MessageService is IMessageService {
11
+ address private _sender;
12
+ uint256 private _minimumFeeInWei;
13
+
14
+ // Track sendMessage calls
15
+ uint256 public sendMessageCallCount;
16
+
17
+ event SendMessageCalled(address indexed to, uint256 fee, bytes calldata_);
18
+
19
+ struct SendMessageCall {
20
+ address to;
21
+ uint256 fee;
22
+ bytes calldata_;
23
+ uint256 value;
24
+ }
25
+ SendMessageCall public lastSendMessageCall;
26
+
27
+ function setSender(address sender_) external {
28
+ _sender = sender_;
29
+ }
30
+
31
+ function setMinimumFeeInWei(uint256 fee) external {
32
+ _minimumFeeInWei = fee;
33
+ }
34
+
35
+ function sendMessage(address _to, uint256 _fee, bytes calldata _calldata) external payable override {
36
+ sendMessageCallCount++;
37
+ lastSendMessageCall = SendMessageCall({ to: _to, fee: _fee, calldata_: _calldata, value: msg.value });
38
+ emit SendMessageCalled(_to, _fee, _calldata);
39
+ }
40
+
41
+ function sender() external view override returns (address) {
42
+ return _sender;
43
+ }
44
+
45
+ function minimumFeeInWei() external view override returns (uint256) {
46
+ return _minimumFeeInWei;
47
+ }
48
+
49
+ // Allow receiving ETH
50
+ receive() external payable {}
51
+ }
52
+
53
+ /**
54
+ * @notice Mock implementation of Linea's L2 Token Bridge.
55
+ * @dev Used for testing Linea_SpokePool functionality.
56
+ */
57
+ contract MockL2TokenBridge is ITokenBridge {
58
+ uint256 public bridgeTokenCallCount;
59
+
60
+ event BridgeTokenCalled(address indexed token, uint256 amount, address indexed recipient, uint256 value);
61
+
62
+ struct BridgeTokenCall {
63
+ address token;
64
+ uint256 amount;
65
+ address recipient;
66
+ uint256 value;
67
+ }
68
+ BridgeTokenCall public lastBridgeTokenCall;
69
+
70
+ function bridgeToken(address _token, uint256 _amount, address _recipient) external payable override {
71
+ bridgeTokenCallCount++;
72
+ lastBridgeTokenCall = BridgeTokenCall({
73
+ token: _token,
74
+ amount: _amount,
75
+ recipient: _recipient,
76
+ value: msg.value
77
+ });
78
+ emit BridgeTokenCalled(_token, _amount, _recipient, msg.value);
79
+ }
80
+
81
+ // Allow receiving ETH
82
+ receive() external payable {}
83
+ }
@@ -0,0 +1,65 @@
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ pragma solidity ^0.8.0;
3
+
4
+ import "../libraries/MerkleLib.sol";
5
+ import "../interfaces/HubPoolInterface.sol";
6
+ import "../interfaces/SpokePoolInterface.sol";
7
+ import "./interfaces/MockV2SpokePoolInterface.sol";
8
+ import "./V2MerkleLib.sol";
9
+
10
+ /**
11
+ * @notice Contract to test the MerkleLib.
12
+ */
13
+ contract MerkleLibTest {
14
+ mapping(uint256 => uint256) public claimedBitMap;
15
+
16
+ uint256 public claimedBitMap1D;
17
+
18
+ function verifyPoolRebalance(
19
+ bytes32 root,
20
+ HubPoolInterface.PoolRebalanceLeaf memory rebalance,
21
+ bytes32[] memory proof
22
+ ) public pure returns (bool) {
23
+ return MerkleLib.verifyPoolRebalance(root, rebalance, proof);
24
+ }
25
+
26
+ function verifyRelayerRefund(
27
+ bytes32 root,
28
+ SpokePoolInterface.RelayerRefundLeaf memory refund,
29
+ bytes32[] memory proof
30
+ ) public pure returns (bool) {
31
+ return MerkleLib.verifyRelayerRefund(root, refund, proof);
32
+ }
33
+
34
+ function verifySlowRelayFulfillment(
35
+ bytes32 root,
36
+ MockV2SpokePoolInterface.SlowFill memory slowFill,
37
+ bytes32[] memory proof
38
+ ) public pure returns (bool) {
39
+ return V2MerkleLib.verifySlowRelayFulfillment(root, slowFill, proof);
40
+ }
41
+
42
+ function verifyV3SlowRelayFulfillment(
43
+ bytes32 root,
44
+ V3SpokePoolInterface.V3SlowFill memory slowFill,
45
+ bytes32[] memory proof
46
+ ) public pure returns (bool) {
47
+ return MerkleLib.verifyV3SlowRelayFulfillment(root, slowFill, proof);
48
+ }
49
+
50
+ function isClaimed(uint256 index) public view returns (bool) {
51
+ return MerkleLib.isClaimed(claimedBitMap, index);
52
+ }
53
+
54
+ function setClaimed(uint256 index) public {
55
+ MerkleLib.setClaimed(claimedBitMap, index);
56
+ }
57
+
58
+ function isClaimed1D(uint8 index) public view returns (bool) {
59
+ return MerkleLib.isClaimed1D(claimedBitMap1D, index);
60
+ }
61
+
62
+ function setClaimed1D(uint8 index) public {
63
+ claimedBitMap1D = MerkleLib.setClaimed1D(claimedBitMap1D, index);
64
+ }
65
+ }
@@ -0,0 +1,115 @@
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ pragma solidity ^0.8.0;
3
+
4
+ import "../spoke-pools/Ovm_SpokePool.sol";
5
+
6
+ // Provides payable withdrawTo interface introduced on Bedrock
7
+ contract MockBedrockL2StandardBridge is IL2ERC20Bridge {
8
+ event ERC20WithdrawalInitiated(address indexed l2Token, address indexed to, uint256 amount);
9
+
10
+ function withdrawTo(address _l2Token, address _to, uint256 _amount, uint32, bytes calldata) external payable {
11
+ emit ERC20WithdrawalInitiated(_l2Token, _to, _amount);
12
+ }
13
+
14
+ function bridgeERC20To(
15
+ address _localToken,
16
+ address _remoteToken,
17
+ address _to,
18
+ uint256 _amount,
19
+ uint32,
20
+ bytes calldata
21
+ ) external {
22
+ // Check that caller has approved this contract to pull funds, mirroring mainnet's behavior
23
+ IERC20(_localToken).transferFrom(msg.sender, address(this), _amount);
24
+ IERC20(_remoteToken).transfer(_to, _amount);
25
+ }
26
+ }
27
+
28
+ contract MockBedrockL1StandardBridge {
29
+ event ETHDepositInitiated(address indexed to, uint256 amount);
30
+ event ERC20DepositInitiated(address indexed to, address l1Token, address l2Token, uint256 amount);
31
+
32
+ // Call counters for test assertions
33
+ uint256 public depositERC20ToCallCount;
34
+ uint256 public depositETHToCallCount;
35
+
36
+ // Last call parameters (similar to smock's calledWith behavior)
37
+ struct DepositERC20ToCall {
38
+ address l1Token;
39
+ address l2Token;
40
+ address to;
41
+ uint256 amount;
42
+ uint32 l2Gas;
43
+ bytes data;
44
+ }
45
+ DepositERC20ToCall public lastDepositERC20ToCall;
46
+
47
+ struct DepositETHToCall {
48
+ address to;
49
+ uint256 value;
50
+ uint32 l2Gas;
51
+ bytes data;
52
+ }
53
+ DepositETHToCall public lastDepositETHToCall;
54
+
55
+ function depositERC20To(
56
+ address l1Token,
57
+ address l2Token,
58
+ address to,
59
+ uint256 amount,
60
+ uint32 l2Gas,
61
+ bytes calldata data
62
+ ) external {
63
+ depositERC20ToCallCount++;
64
+ lastDepositERC20ToCall = DepositERC20ToCall(l1Token, l2Token, to, amount, l2Gas, data);
65
+ IERC20(l1Token).transferFrom(msg.sender, address(this), amount);
66
+ emit ERC20DepositInitiated(to, l1Token, l2Token, amount);
67
+ }
68
+
69
+ function depositETHTo(address to, uint32 l2Gas, bytes calldata data) external payable {
70
+ depositETHToCallCount++;
71
+ lastDepositETHToCall = DepositETHToCall(to, msg.value, l2Gas, data);
72
+ emit ETHDepositInitiated(to, msg.value);
73
+ }
74
+ }
75
+
76
+ contract MockBedrockCrossDomainMessenger {
77
+ event MessageSent(address indexed target);
78
+
79
+ // Call counter for test assertions
80
+ uint256 public sendMessageCallCount;
81
+
82
+ // Last call parameters (similar to smock's calledWith behavior)
83
+ struct SendMessageCall {
84
+ address target;
85
+ bytes message;
86
+ uint32 l2Gas;
87
+ }
88
+ SendMessageCall public lastSendMessageCall;
89
+
90
+ address private msgSender;
91
+
92
+ function sendMessage(address target, bytes calldata message, uint32 l2Gas) external {
93
+ sendMessageCallCount++;
94
+ lastSendMessageCall = SendMessageCall(target, message, l2Gas);
95
+ emit MessageSent(target);
96
+ }
97
+
98
+ // Impersonates making a call on L2 from L1.
99
+ function impersonateCall(address target, bytes memory data) external payable returns (bytes memory) {
100
+ msgSender = msg.sender;
101
+ (bool success, bytes memory returnData) = target.call{ value: msg.value }(data);
102
+
103
+ // Revert if call reverted.
104
+ if (!success) {
105
+ assembly {
106
+ revert(add(32, returnData), mload(returnData))
107
+ }
108
+ }
109
+ return returnData;
110
+ }
111
+
112
+ function xDomainMessageSender() external view returns (address) {
113
+ return msgSender;
114
+ }
115
+ }
@@ -0,0 +1,20 @@
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ pragma solidity ^0.8.0;
3
+
4
+ import { USDYieldManager } from "../hub-pool/Blast_DaiRetriever.sol";
5
+
6
+ contract MockBlastUsdYieldManager is USDYieldManager {
7
+ bool public shouldFail;
8
+
9
+ constructor() {
10
+ shouldFail = false;
11
+ }
12
+
13
+ function setShouldFail(bool _shouldFail) external {
14
+ shouldFail = _shouldFail;
15
+ }
16
+
17
+ function claimWithdrawal(uint256 _requestId, uint256 _hintId) external returns (bool success) {
18
+ success = !shouldFail;
19
+ }
20
+ }
@@ -0,0 +1,212 @@
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ pragma solidity ^0.8.0;
3
+
4
+ import "../libraries/CircleCCTPAdapter.sol";
5
+ import { IMessageTransmitter } from "../external/interfaces/CCTPInterfaces.sol";
6
+
7
+ contract MockCCTPMinter is ITokenMinter {
8
+ uint256 private _burnLimit = type(uint256).max;
9
+
10
+ function setBurnLimit(uint256 limit) external {
11
+ _burnLimit = limit;
12
+ }
13
+
14
+ function burnLimitsPerMessage(address) external view returns (uint256) {
15
+ return _burnLimit;
16
+ }
17
+ }
18
+
19
+ contract MockCCTPMessenger is ITokenMessenger {
20
+ ITokenMinter private minter;
21
+ uint256 public depositForBurnCallCount;
22
+
23
+ // Event for vm.expectEmit compatibility
24
+ event DepositForBurnCalled(uint256 amount, uint32 destinationDomain, bytes32 mintRecipient, address burnToken);
25
+
26
+ // Last call parameters (similar to smock's calledWith behavior)
27
+ struct DepositForBurnCall {
28
+ uint256 amount;
29
+ uint32 destinationDomain;
30
+ bytes32 mintRecipient;
31
+ address burnToken;
32
+ }
33
+ DepositForBurnCall public lastDepositForBurnCall;
34
+
35
+ // Store all calls for multi-call verification (smock's atCall behavior)
36
+ DepositForBurnCall[] public depositForBurnCalls;
37
+
38
+ constructor(ITokenMinter _minter) {
39
+ minter = _minter;
40
+ }
41
+
42
+ function depositForBurn(
43
+ uint256 _amount,
44
+ uint32 _destinationDomain,
45
+ bytes32 _mintRecipient,
46
+ address _burnToken
47
+ ) external returns (uint64 _nonce) {
48
+ depositForBurnCallCount++;
49
+ lastDepositForBurnCall = DepositForBurnCall(_amount, _destinationDomain, _mintRecipient, _burnToken);
50
+ depositForBurnCalls.push(lastDepositForBurnCall);
51
+ emit DepositForBurnCalled(_amount, _destinationDomain, _mintRecipient, _burnToken);
52
+ return 0;
53
+ }
54
+
55
+ function localMinter() external view returns (ITokenMinter) {
56
+ return minter;
57
+ }
58
+
59
+ /**
60
+ * @notice Get a specific depositForBurn call by index (smock's atCall behavior).
61
+ */
62
+ function getDepositForBurnCall(
63
+ uint256 index
64
+ ) external view returns (uint256 amount, uint32 destinationDomain, bytes32 mintRecipient, address burnToken) {
65
+ DepositForBurnCall memory call = depositForBurnCalls[index];
66
+ return (call.amount, call.destinationDomain, call.mintRecipient, call.burnToken);
67
+ }
68
+ }
69
+
70
+ contract MockCCTPMessageTransmitter is IMessageTransmitter {
71
+ uint256 public sendMessageCallCount;
72
+
73
+ // Event for vm.expectEmit compatibility
74
+ event SendMessageCalled(uint32 destinationDomain, bytes32 recipient, bytes messageBody);
75
+
76
+ // Last call parameters (similar to smock's calledWith behavior)
77
+ struct SendMessageCall {
78
+ uint32 destinationDomain;
79
+ bytes32 recipient;
80
+ bytes messageBody;
81
+ }
82
+ SendMessageCall public lastSendMessageCall;
83
+
84
+ function sendMessage(
85
+ uint32 _destinationDomain,
86
+ bytes32 _recipient,
87
+ bytes calldata _messageBody
88
+ ) external returns (uint64) {
89
+ sendMessageCallCount++;
90
+ lastSendMessageCall = SendMessageCall(_destinationDomain, _recipient, _messageBody);
91
+ emit SendMessageCalled(_destinationDomain, _recipient, _messageBody);
92
+ return 0;
93
+ }
94
+ }
95
+
96
+ /**
97
+ * @notice Mock CCTP V2 TokenMessenger that implements the V2 depositForBurn interface.
98
+ * @dev V2 has a different depositForBurn signature with additional parameters (destinationCaller, maxFee, minFinalityThreshold).
99
+ * The V2 contract is detected by the CircleCCTPAdapter via the feeRecipient() function.
100
+ */
101
+ contract MockCCTPMessengerV2 {
102
+ ITokenMinter private minter;
103
+ address private _feeRecipient;
104
+ uint256 public depositForBurnCallCount;
105
+
106
+ // Event for vm.expectEmit compatibility
107
+ event DepositForBurnCalled(
108
+ uint256 amount,
109
+ uint32 destinationDomain,
110
+ bytes32 mintRecipient,
111
+ address burnToken,
112
+ bytes32 destinationCaller,
113
+ uint256 maxFee,
114
+ uint32 minFinalityThreshold
115
+ );
116
+
117
+ // Last call parameters (similar to smock's calledWith behavior)
118
+ struct DepositForBurnV2Call {
119
+ uint256 amount;
120
+ uint32 destinationDomain;
121
+ bytes32 mintRecipient;
122
+ address burnToken;
123
+ bytes32 destinationCaller;
124
+ uint256 maxFee;
125
+ uint32 minFinalityThreshold;
126
+ }
127
+ DepositForBurnV2Call public lastDepositForBurnCall;
128
+
129
+ // Store all calls for multi-call verification
130
+ DepositForBurnV2Call[] public depositForBurnCalls;
131
+
132
+ constructor(ITokenMinter _minter, address feeRecipient_) {
133
+ minter = _minter;
134
+ _feeRecipient = feeRecipient_;
135
+ }
136
+
137
+ /**
138
+ * @notice CCTP V2 depositForBurn function.
139
+ */
140
+ function depositForBurn(
141
+ uint256 _amount,
142
+ uint32 _destinationDomain,
143
+ bytes32 _mintRecipient,
144
+ address _burnToken,
145
+ bytes32 _destinationCaller,
146
+ uint256 _maxFee,
147
+ uint32 _minFinalityThreshold
148
+ ) external {
149
+ depositForBurnCallCount++;
150
+ lastDepositForBurnCall = DepositForBurnV2Call(
151
+ _amount,
152
+ _destinationDomain,
153
+ _mintRecipient,
154
+ _burnToken,
155
+ _destinationCaller,
156
+ _maxFee,
157
+ _minFinalityThreshold
158
+ );
159
+ depositForBurnCalls.push(lastDepositForBurnCall);
160
+ emit DepositForBurnCalled(
161
+ _amount,
162
+ _destinationDomain,
163
+ _mintRecipient,
164
+ _burnToken,
165
+ _destinationCaller,
166
+ _maxFee,
167
+ _minFinalityThreshold
168
+ );
169
+ }
170
+
171
+ /**
172
+ * @notice Returns the fee recipient address - used by CircleCCTPAdapter to detect V2.
173
+ * @dev Must return a non-zero address for V2 detection to work.
174
+ */
175
+ function feeRecipient() external view returns (address) {
176
+ return _feeRecipient;
177
+ }
178
+
179
+ function localMinter() external view returns (ITokenMinter) {
180
+ return minter;
181
+ }
182
+
183
+ /**
184
+ * @notice Get a specific depositForBurn call by index.
185
+ */
186
+ function getDepositForBurnCall(
187
+ uint256 index
188
+ )
189
+ external
190
+ view
191
+ returns (
192
+ uint256 amount,
193
+ uint32 destinationDomain,
194
+ bytes32 mintRecipient,
195
+ address burnToken,
196
+ bytes32 destinationCaller,
197
+ uint256 maxFee,
198
+ uint32 minFinalityThreshold
199
+ )
200
+ {
201
+ DepositForBurnV2Call memory call = depositForBurnCalls[index];
202
+ return (
203
+ call.amount,
204
+ call.destinationDomain,
205
+ call.mintRecipient,
206
+ call.burnToken,
207
+ call.destinationCaller,
208
+ call.maxFee,
209
+ call.minFinalityThreshold
210
+ );
211
+ }
212
+ }