@across-protocol/contracts 5.0.26 → 6.0.0-beta.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.
- package/README.md +6 -0
- package/contracts/chain-adapters/CrossDomainEnabled.sol +1 -1
- package/contracts/chain-adapters/Solana_Adapter.sol +29 -12
- package/contracts/external/interfaces/CCTPInterfaces.sol +19 -0
- package/contracts/external/interfaces/IAcrossV5Executor.sol +14 -0
- package/contracts/external/interfaces/IAcrossV5ExecutorAdapter.sol +14 -0
- package/contracts/external/interfaces/IGateway.sol +25 -0
- package/contracts/interfaces/ICounterfactualBeacon.sol +25 -16
- package/contracts/interfaces/ICounterfactualBeaconBase.sol +30 -0
- package/contracts/interfaces/ICounterfactualDeposit.sol +30 -0
- package/contracts/interfaces/ICounterfactualDepositFactory.sol +33 -54
- package/contracts/interfaces/V5SpokePoolInterface.sol +71 -0
- package/contracts/libraries/HyperCoreLib.sol +5 -14
- package/contracts/libraries/SafeTransferERC20.sol +4 -0
- package/contracts/periphery/SpokePoolPeriphery.sol +23 -9
- package/contracts/periphery/Tron_SpokePoolPeriphery.sol +52 -0
- package/contracts/periphery/counterfactual/AdminWithdrawManager.sol +12 -4
- package/contracts/periphery/counterfactual/CounterfactualBeacon.sol +28 -1
- package/contracts/periphery/counterfactual/CounterfactualBeaconBase.sol +11 -11
- package/contracts/periphery/counterfactual/CounterfactualDeposit.sol +6 -16
- package/contracts/periphery/counterfactual/CounterfactualDepositCCTP.sol +9 -5
- package/contracts/periphery/counterfactual/CounterfactualDepositFactory.sol +3 -5
- package/contracts/periphery/counterfactual/CounterfactualDepositOFT.sol +6 -3
- package/contracts/periphery/counterfactual/CounterfactualDepositSpokePool.sol +24 -8
- package/contracts/periphery/counterfactual/CounterfactualDepositVanillaCCTP.sol +28 -12
- package/contracts/periphery/counterfactual/CounterfactualImplementationBase.sol +8 -7
- package/contracts/periphery/counterfactual/CounterfactualNonces.sol +52 -0
- package/contracts/periphery/mintburn/HyperCoreFlowExecutor.sol +7 -1
- package/contracts/periphery/mintburn/SwapHandler.sol +8 -7
- package/contracts/spoke-pools/Arbitrum_SpokePool.sol +10 -2
- package/contracts/spoke-pools/Cher_SpokePool.sol +4 -2
- package/contracts/spoke-pools/Ethereum_SpokePool.sol +4 -2
- package/contracts/spoke-pools/Lens_SpokePool.sol +7 -2
- package/contracts/spoke-pools/Linea_SpokePool.sol +4 -2
- package/contracts/spoke-pools/Lisk_SpokePool.sol +4 -2
- package/contracts/spoke-pools/OP_SpokePool.sol +4 -2
- package/contracts/spoke-pools/Ovm_SpokePool.sol +7 -5
- package/contracts/spoke-pools/Polygon_SpokePool.sol +10 -2
- package/contracts/spoke-pools/SpokePool.sol +181 -25
- package/contracts/spoke-pools/Tron_SpokePool.sol +4 -2
- package/contracts/spoke-pools/Universal_SpokePool.sol +10 -2
- package/contracts/spoke-pools/ZkSync_SpokePool.sol +7 -2
- package/contracts/test/MockCCTP.sol +49 -1
- package/contracts/test/MockGateway.sol +33 -0
- package/contracts/test/MockSpokePool.sol +4 -1
- package/contracts/test/MockSpokePoolV2.sol +1 -1
- package/contracts/tron/TronCounterfactualImports.sol +2 -0
- package/contracts/tron/TronPeripheryImports.sol +5 -2
- package/dist/broadcast/deployed-addresses.json +587 -447
- package/dist/evm/artifacts/AcrossConfigStore.sol/AcrossConfigStore.json +1 -1
- package/dist/evm/artifacts/AcrossEventEmitter.sol/AcrossEventEmitter.json +1 -1
- package/dist/evm/artifacts/AcrossMerkleDistributor.sol/AcrossMerkleDistributor.json +1 -1
- package/dist/evm/artifacts/AcrossMessageHandlerMock.sol/AcrossMessageHandlerMock.json +1 -1
- package/dist/evm/artifacts/AdapterStore.sol/AdapterStore.json +1 -1
- package/dist/evm/artifacts/AdapterStore.sol/MessengerTypes.json +1 -1
- package/dist/evm/artifacts/Address.sol/Address.json +1 -1
- package/dist/evm/artifacts/AddressConverters.sol/Bytes32ToAddress.json +1 -1
- package/dist/evm/artifacts/AdminRelayTokensAdapter.sol/AdminRelayTokensAdapter.json +1 -1
- package/dist/evm/artifacts/AdminWithdrawManager.sol/AdminWithdrawManager.json +1 -1
- package/dist/evm/artifacts/ArbitrumMocks.sol/ArbitrumMockErc20GatewayRouter.json +1 -1
- package/dist/evm/artifacts/ArbitrumMocks.sol/Inbox.json +1 -1
- package/dist/evm/artifacts/ArbitrumMocks.sol/L2GatewayRouter.json +1 -1
- package/dist/evm/artifacts/Arbitrum_Adapter.sol/Arbitrum_Adapter.json +1 -1
- package/dist/evm/artifacts/Arbitrum_CustomGasToken_Adapter.sol/Arbitrum_CustomGasToken_Adapter.json +1 -1
- package/dist/evm/artifacts/Arbitrum_Forwarder.sol/Arbitrum_Forwarder.json +1 -1
- package/dist/evm/artifacts/Arbitrum_RescueAdapter.sol/Arbitrum_RescueAdapter.json +1 -1
- package/dist/evm/artifacts/Arbitrum_SendTokensAdapter.sol/Arbitrum_SendTokensAdapter.json +1 -1
- package/dist/evm/artifacts/Arbitrum_SpokePool.sol/Arbitrum_SpokePool.json +1 -1
- package/dist/evm/artifacts/Arbitrum_WithdrawalHelper.sol/Arbitrum_WithdrawalHelper.json +1 -1
- package/dist/evm/artifacts/Base_Adapter.sol/Base_Adapter.json +1 -1
- package/dist/evm/artifacts/BeaconProxy.sol/BeaconProxy.json +1 -1
- package/dist/evm/artifacts/BondToken.sol/BondToken.json +1 -1
- package/dist/evm/artifacts/BytesLib.sol/BytesLib.json +1 -1
- package/dist/evm/artifacts/CCTPInterfaces.sol/IMessageTransmitterV2.json +1 -1
- package/dist/evm/artifacts/Cher_SpokePool.sol/Cher_SpokePool.json +1 -1
- package/dist/evm/artifacts/CircleCCTPAdapter.sol/CircleDomainIds.json +1 -1
- package/dist/evm/artifacts/Constants.sol/Constants.json +1 -1
- package/dist/evm/artifacts/Constants.sol/OptimisticOracleConstraints.json +1 -1
- package/dist/evm/artifacts/Constants.sol/OracleInterfaces.json +1 -1
- package/dist/evm/artifacts/CoreExecution.sol/CoreExecution.json +1 -1
- package/dist/evm/artifacts/CoreSimulatorLib.sol/HypeSystemContract.json +1 -1
- package/dist/evm/artifacts/CoreState.sol/CoreState.json +1 -1
- package/dist/evm/artifacts/CoreView.sol/CoreView.json +1 -1
- package/dist/evm/artifacts/CoreWriterLib.sol/CoreWriterLib.json +1 -1
- package/dist/evm/artifacts/CoreWriterSim.sol/CoreWriterSim.json +1 -1
- package/dist/evm/artifacts/CounterfactualBeacon.sol/CounterfactualBeacon.json +1 -1
- package/dist/evm/artifacts/CounterfactualBeaconBase.sol/CounterfactualBeaconBase.json +1 -1
- package/dist/evm/artifacts/CounterfactualBeaconBootstrap.sol/CounterfactualBeaconBootstrap.json +1 -1
- package/dist/evm/artifacts/CounterfactualConfig.sol/CounterfactualConfig.json +1 -1
- package/dist/evm/artifacts/CounterfactualDeposit.sol/CounterfactualDeposit.json +1 -1
- package/dist/evm/artifacts/CounterfactualDepositCCTP.sol/CounterfactualDepositCCTP.json +1 -1
- package/dist/evm/artifacts/CounterfactualDepositFactory.sol/CounterfactualDepositFactory.json +1 -1
- package/dist/evm/artifacts/CounterfactualDepositFactoryTron.sol/CounterfactualDepositFactoryTron.json +1 -1
- package/dist/evm/artifacts/CounterfactualDepositOFT.sol/CounterfactualDepositOFT.json +1 -1
- package/dist/evm/artifacts/CounterfactualDepositSpokePool.sol/CounterfactualDepositSpokePool.json +1 -1
- package/dist/evm/artifacts/CounterfactualDepositSpokePoolTr.sol/CounterfactualDepositSpokePoolTr.json +1 -1
- package/dist/evm/artifacts/CounterfactualDepositVanillaCCTP.sol/CounterfactualDepositVanillaCCTP.json +1 -1
- package/dist/evm/artifacts/CounterfactualNonces.sol/CounterfactualNonces.json +1 -0
- package/dist/evm/artifacts/Create2.sol/Create2.json +1 -1
- package/dist/evm/artifacts/CrossDomainEnabled.sol/CrossDomainEnabled.json +1 -1
- package/dist/evm/artifacts/DeployedAddresses.sol/DeployedAddresses.json +1 -1
- package/dist/evm/artifacts/DeploymentUtils.sol/DeploymentUtils.json +1 -1
- package/dist/evm/artifacts/DoctorWho_Adapter.sol/DoctorWho_Adapter.json +1 -1
- package/dist/evm/artifacts/DonationBox.sol/DonationBox.json +1 -1
- package/dist/evm/artifacts/DstOFTHandler.sol/DstOFTHandler.json +1 -1
- package/dist/evm/artifacts/ECDSA.sol/ECDSA.json +1 -1
- package/dist/evm/artifacts/ERC1155.sol/ERC1155.json +1 -1
- package/dist/evm/artifacts/ERC1967Proxy.sol/ERC1967Proxy.json +1 -1
- package/dist/evm/artifacts/ERC1967Utils.sol/ERC1967Utils.json +1 -1
- package/dist/evm/artifacts/ERC20.sol/ERC20.json +1 -1
- package/dist/evm/artifacts/Errors.sol/Errors.json +1 -1
- package/dist/evm/artifacts/Ethereum_Adapter.sol/Ethereum_Adapter.json +1 -1
- package/dist/evm/artifacts/Ethereum_RescueAdapter.sol/Ethereum_RescueAdapter.json +1 -1
- package/dist/evm/artifacts/Ethereum_SpokePool.sol/Ethereum_SpokePool.json +1 -1
- package/dist/evm/artifacts/ExpandedERC20.sol/ExpandedERC20.json +1 -1
- package/dist/evm/artifacts/ExpandedERC20WithBlacklist.sol/ExpandedERC20WithBlacklist.json +1 -1
- package/dist/evm/artifacts/HLConstants.sol/HLConstants.json +1 -1
- package/dist/evm/artifacts/HLConversions.sol/HLConversions.json +1 -1
- package/dist/evm/artifacts/HubPool.sol/HubPool.json +1 -1
- package/dist/evm/artifacts/HubPoolStore.sol/HubPoolStore.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/HubPoolTestBase.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/MockAddressWhitelist.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/MockFinder.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/MockIdentifierWhitelist.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/MockLpTokenFactory.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/MockOptimisticOracle.json +1 -1
- package/dist/evm/artifacts/HubPoolTestBase.sol/MockStore.json +1 -1
- package/dist/evm/artifacts/HyperCore.sol/HyperCore.json +1 -1
- package/dist/evm/artifacts/HyperCoreFlowExecutor.sol/HyperCoreFlowExecutor.json +1 -1
- package/dist/evm/artifacts/HyperCoreLib.sol/HyperCoreLib.json +1 -1
- package/dist/evm/artifacts/HyperliquidDepositHandler.sol/HyperliquidDepositHandler.json +1 -1
- package/dist/evm/artifacts/IAcrossV5Executor.sol/IAcrossV5Executor.json +1 -0
- package/dist/evm/artifacts/IAcrossV5ExecutorAdapter.sol/IAcrossV5ExecutorAdapter.json +1 -0
- package/dist/evm/artifacts/ICounterfactualBeacon.sol/ICounterfactualBeacon.json +1 -1
- package/dist/evm/artifacts/ICounterfactualBeaconBase.sol/ICounterfactualBeaconBase.json +1 -0
- package/dist/evm/artifacts/ICounterfactualDeposit.sol/ICounterfactualDeposit.json +1 -1
- package/dist/evm/artifacts/ICounterfactualDepositFactory.sol/ICounterfactualDepositFactory.json +1 -1
- package/dist/evm/artifacts/IGateway.sol/IGateway.json +1 -0
- package/dist/evm/artifacts/Lens_SpokePool.sol/Lens_SpokePool.json +1 -1
- package/dist/evm/artifacts/LibVariable.sol/LibVariable.json +1 -1
- package/dist/evm/artifacts/LineaMocks.sol/MockL2MessageService.json +1 -1
- package/dist/evm/artifacts/LineaMocks.sol/MockL2TokenBridge.json +1 -1
- package/dist/evm/artifacts/Linea_Adapter.sol/Linea_Adapter.json +1 -1
- package/dist/evm/artifacts/Linea_SpokePool.sol/Linea_SpokePool.json +1 -1
- package/dist/evm/artifacts/Lisk_Adapter.sol/Lisk_Adapter.json +1 -1
- package/dist/evm/artifacts/Lisk_SpokePool.sol/Lisk_SpokePool.json +1 -1
- package/dist/evm/artifacts/Lockable.sol/Lockable.json +1 -1
- package/dist/evm/artifacts/LpTokenFactory.sol/LpTokenFactory.json +1 -1
- package/dist/evm/artifacts/Merkle.sol/Merkle.json +1 -1
- package/dist/evm/artifacts/MerkleDistributor.sol/MerkleDistributor.json +1 -1
- package/dist/evm/artifacts/MerkleLibTest.sol/MerkleLibTest.json +1 -1
- package/dist/evm/artifacts/MerkleProof.sol/MerkleProof.json +1 -1
- package/dist/evm/artifacts/MinimalLZOptions.sol/MinimalLZOptions.json +1 -1
- package/dist/evm/artifacts/MintableERC1155.sol/MintableERC1155.json +1 -1
- package/dist/evm/artifacts/MockBedrockStandardBridge.sol/MockBedrockCrossDomainMessenger.json +1 -1
- package/dist/evm/artifacts/MockBedrockStandardBridge.sol/MockBedrockL1StandardBridge.json +1 -1
- package/dist/evm/artifacts/MockBedrockStandardBridge.sol/MockBedrockL2StandardBridge.json +1 -1
- package/dist/evm/artifacts/MockCCTP.sol/MockCCTPMessageTransmitter.json +1 -1
- package/dist/evm/artifacts/MockCCTP.sol/MockCCTPMessageTransmitterV2.json +1 -0
- package/dist/evm/artifacts/MockCCTP.sol/MockCCTPMessenger.json +1 -1
- package/dist/evm/artifacts/MockCCTP.sol/MockCCTPMessengerV2.json +1 -1
- package/dist/evm/artifacts/MockCCTP.sol/MockCCTPMinter.json +1 -1
- package/dist/evm/artifacts/MockCaller.sol/MockCaller.json +1 -1
- package/dist/evm/artifacts/MockERC1271.sol/MockERC1271.json +1 -1
- package/dist/evm/artifacts/MockERC20.sol/MintableERC20.json +1 -1
- package/dist/evm/artifacts/MockERC20.sol/MockERC20.json +1 -1
- package/dist/evm/artifacts/MockEndpoint.sol/MockEndpoint.json +1 -1
- package/dist/evm/artifacts/MockGateway.sol/MockGateway.json +1 -0
- package/dist/evm/artifacts/MockHubPool.sol/MockHubPool.json +1 -1
- package/dist/evm/artifacts/MockOFTMessenger.sol/MockOFTMessenger.json +1 -1
- package/dist/evm/artifacts/MockPermit2.sol/MockPermit2.json +1 -1
- package/dist/evm/artifacts/MockPermit2.sol/Permit2EIP712.json +1 -1
- package/dist/evm/artifacts/MockPermit2.sol/SignatureVerification.json +1 -1
- package/dist/evm/artifacts/MockSpokePool.sol/MockSpokePool.json +1 -1
- package/dist/evm/artifacts/MockSpokePoolV2.sol/MockSpokePoolV2.json +1 -1
- package/dist/evm/artifacts/MockTronUSDT.sol/MockTronUSDT.json +1 -1
- package/dist/evm/artifacts/MockZkStackBridgeHub.sol/MockBridgeHub.json +1 -1
- package/dist/evm/artifacts/Mock_Adapter.sol/Mock_Adapter.json +1 -1
- package/dist/evm/artifacts/Mock_Adapter.sol/Mock_Bridge.json +1 -1
- package/dist/evm/artifacts/Mode_Adapter.sol/Mode_Adapter.json +1 -1
- package/dist/evm/artifacts/MultiCaller.sol/MultiCaller.json +1 -1
- package/dist/evm/artifacts/MultiCallerUpgradeable.sol/MultiCallerUpgradeable.json +1 -1
- package/dist/evm/artifacts/Multicall3.sol/Multicall3.json +1 -1
- package/dist/evm/artifacts/MulticallHandler.sol/MulticallHandler.json +1 -1
- package/dist/evm/artifacts/OFTTransportAdapter.sol/OFTTransportAdapter.json +1 -1
- package/dist/evm/artifacts/OFTTransportAdapterWithStore.sol/OFTTransportAdapterWithStore.json +1 -1
- package/dist/evm/artifacts/OP_Adapter.sol/OP_Adapter.json +1 -1
- package/dist/evm/artifacts/OP_SpokePool.sol/OP_SpokePool.json +1 -1
- package/dist/evm/artifacts/Ovm_Forwarder.sol/Ovm_Forwarder.json +1 -1
- package/dist/evm/artifacts/Ovm_SpokePool.sol/Ovm_SpokePool.json +1 -1
- package/dist/evm/artifacts/Ovm_WithdrawalHelper.sol/Ovm_WithdrawalHelper.json +1 -1
- package/dist/evm/artifacts/PeripherySigningLib.sol/PeripherySigningLib.json +1 -1
- package/dist/evm/artifacts/PermissionedMulticallHandler.sol/PermissionedMulticallHandler.json +1 -1
- package/dist/evm/artifacts/PolygonERC20Test.sol/PolygonERC20Test.json +1 -1
- package/dist/evm/artifacts/PolygonMocks.sol/DepositManagerMock.json +1 -1
- package/dist/evm/artifacts/PolygonMocks.sol/FxStateSenderMock.json +1 -1
- package/dist/evm/artifacts/PolygonMocks.sol/PolygonERC20Mock.json +1 -1
- package/dist/evm/artifacts/PolygonMocks.sol/PolygonERC20PredicateMock.json +1 -1
- package/dist/evm/artifacts/PolygonMocks.sol/PolygonRegistryMock.json +1 -1
- package/dist/evm/artifacts/PolygonMocks.sol/RootChainManagerMock.json +1 -1
- package/dist/evm/artifacts/PolygonTokenBridger.sol/PolygonTokenBridger.json +1 -1
- package/dist/evm/artifacts/Polygon_Adapter.sol/Polygon_Adapter.json +1 -1
- package/dist/evm/artifacts/Polygon_SpokePool.sol/Polygon_SpokePool.json +1 -1
- package/dist/evm/artifacts/PrecompileLib.sol/PrecompileLib.json +1 -1
- package/dist/evm/artifacts/PrecompileSim.sol/PrecompileSim.json +1 -1
- package/dist/evm/artifacts/ProxyAdmin.sol/ProxyAdmin.json +1 -1
- package/dist/evm/artifacts/Router_Adapter.sol/Router_Adapter.json +1 -1
- package/dist/evm/artifacts/SP1AutoVerifier.sol/SP1AutoVerifier.json +1 -1
- package/dist/evm/artifacts/SP1Helios.sol/SP1Helios.json +1 -1
- package/dist/evm/artifacts/SP1MockVerifier.sol/SP1MockVerifier.json +1 -1
- package/dist/evm/artifacts/SafeCast.sol/SafeCast.json +1 -1
- package/dist/evm/artifacts/SafeERC20.sol/SafeERC20.json +1 -1
- package/dist/evm/artifacts/ShortStrings.sol/ShortStrings.json +1 -1
- package/dist/evm/artifacts/Solana_Adapter.sol/Solana_Adapter.json +1 -1
- package/dist/evm/artifacts/SpokePool.sol/SpokePool.json +1 -1
- package/dist/evm/artifacts/SpokePoolPeriphery.sol/SpokePoolPeriphery.json +1 -1
- package/dist/evm/artifacts/SpokePoolPeriphery.sol/SwapProxy.json +1 -1
- package/dist/evm/artifacts/SpokePoolVerifier.sol/SpokePoolVerifier.json +1 -1
- package/dist/evm/artifacts/SponsoredCCTPDstPeriphery.sol/SponsoredCCTPDstPeriphery.json +1 -1
- package/dist/evm/artifacts/SponsoredCCTPSrcPeriphery.sol/SponsoredCCTPSrcPeriphery.json +1 -1
- package/dist/evm/artifacts/SponsoredOFTSrcPeriphery.sol/SponsoredOFTSrcPeriphery.json +1 -1
- package/dist/evm/artifacts/StdConfig.sol/StdConfig.json +1 -1
- package/dist/evm/artifacts/Strings.sol/Strings.json +1 -1
- package/dist/evm/artifacts/SwapHandler.sol/SwapHandler.json +1 -1
- package/dist/evm/artifacts/Timer.sol/Timer.json +1 -1
- package/dist/evm/artifacts/TransferProxy.sol/TransferProxy.json +1 -1
- package/dist/evm/artifacts/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json +1 -1
- package/dist/evm/artifacts/TronMulticallHandler.sol/TronMulticallHandler.json +1 -1
- package/dist/evm/artifacts/TronTransferLib.sol/TronTransferLib.json +1 -1
- package/dist/evm/artifacts/Tron_SpokePool.sol/Tron_SpokePool.json +1 -1
- package/dist/evm/artifacts/Tron_SpokePoolPeriphery.sol/Tron_SpokePoolPeriphery.json +1 -0
- package/dist/evm/artifacts/Tron_SpokePoolPeriphery.sol/Tron_SwapProxy.json +1 -0
- package/dist/evm/artifacts/Universal_Adapter.sol/Universal_Adapter.json +1 -1
- package/dist/evm/artifacts/Universal_SpokePool.sol/Universal_SpokePool.json +1 -1
- package/dist/evm/artifacts/UpgradeableBeacon.sol/UpgradeableBeacon.json +1 -1
- package/dist/evm/artifacts/V5SpokePoolInterface.sol/V5SpokePoolInterface.json +1 -0
- package/dist/evm/artifacts/WETH9.sol/WETH9.json +1 -1
- package/dist/evm/artifacts/WithdrawImplementation.sol/WithdrawImplementation.json +1 -1
- package/dist/evm/artifacts/WithdrawImplementationTron.sol/WithdrawImplementationTron.json +1 -1
- package/dist/evm/artifacts/ZkStack_Adapter.sol/ZkStack_Adapter.json +1 -1
- package/dist/evm/artifacts/ZkStack_CustomGasToken_Adapter.sol/ZkStack_CustomGasToken_Adapter.json +1 -1
- package/dist/evm/artifacts/ZkSyncMocks.sol/MockL2Eth.json +1 -1
- package/dist/evm/artifacts/ZkSyncMocks.sol/MockZkBridge.json +1 -1
- package/dist/evm/artifacts/ZkSync_SpokePool.sol/ZkSync_SpokePool.json +1 -1
- package/dist/evm/artifacts/Zora_Adapter.sol/Zora_Adapter.json +1 -1
- package/dist/evm/artifacts/eraVM_EIP7702.sol/SimpleContract.json +1 -1
- package/dist/evm/artifacts/eraVM_EIP7702.sol/SpokePoolEIP7702Test.json +1 -1
- package/dist/evm/artifacts/eraVM_EIP7702.sol/TestableMockSpokePool.json +1 -1
- package/dist/src/consts.d.ts +2 -0
- package/dist/src/consts.js +20 -47
- package/dist/src/svm/assets/idl/index.d.ts +1 -3
- package/dist/src/svm/assets/idl/index.js +1 -5
- package/dist/src/svm/assets/idl/svm_spoke.json +62 -468
- package/dist/src/svm/assets/index.d.ts +0 -2
- package/dist/src/svm/assets/svm_spoke.d.ts +62 -468
- package/dist/src/svm/clients/SvmSpoke/accounts/index.d.ts +0 -1
- package/dist/src/svm/clients/SvmSpoke/accounts/index.js +0 -1
- package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.d.ts +5 -3
- package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.js +7 -4
- package/dist/src/svm/clients/SvmSpoke/instructions/executeRelayerRefundLeaf.d.ts +11 -15
- package/dist/src/svm/clients/SvmSpoke/instructions/executeRelayerRefundLeaf.js +1 -24
- package/dist/src/svm/clients/SvmSpoke/instructions/executeRelayerRefundLeafDeferred.d.ts +11 -15
- package/dist/src/svm/clients/SvmSpoke/instructions/executeRelayerRefundLeafDeferred.js +1 -24
- package/dist/src/svm/clients/SvmSpoke/instructions/handleReceiveFinalizedMessage.d.ts +75 -0
- package/dist/src/svm/clients/SvmSpoke/instructions/{handleReceiveMessage.js → handleReceiveFinalizedMessage.js} +26 -24
- package/dist/src/svm/clients/SvmSpoke/instructions/index.d.ts +1 -2
- package/dist/src/svm/clients/SvmSpoke/instructions/index.js +1 -2
- package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.d.ts +30 -34
- package/dist/src/svm/clients/SvmSpoke/programs/svmSpoke.js +28 -36
- package/dist/src/svm/clients/SvmSpoke/types/index.d.ts +0 -2
- package/dist/src/svm/clients/SvmSpoke/types/index.js +0 -2
- package/dist/src/svm/clients/index.d.ts +1 -3
- package/dist/src/svm/clients/index.js +1 -5
- package/dist/src/svm/web3-v1/cctpV2Helpers.d.ts +18 -7
- package/dist/src/svm/web3-v1/cctpV2Helpers.js +40 -1
- package/dist/src/svm/web3-v1/constants.d.ts +3 -2
- package/dist/src/svm/web3-v1/constants.js +5 -3
- package/dist/src/svm/web3-v1/index.d.ts +0 -1
- package/dist/src/svm/web3-v1/index.js +0 -1
- package/dist/src/svm/web3-v1/programConnectors.d.ts +1 -3
- package/dist/src/svm/web3-v1/programConnectors.js +0 -10
- package/dist/src/types/svm.d.ts +44 -0
- package/dist/target/types/svm_spoke.d.ts +62 -468
- package/package.json +12 -6
- package/contracts/chain-adapters/Blast_Adapter.sol +0 -127
- package/contracts/chain-adapters/Blast_RescueAdapter.sol +0 -47
- package/contracts/chain-adapters/Boba_Adapter.sol +0 -78
- package/contracts/chain-adapters/Optimism_Adapter.sol +0 -118
- package/contracts/chain-adapters/PolygonZkEVM_Adapter.sol +0 -75
- package/contracts/chain-adapters/Scroll_Adapter.sol +0 -144
- package/contracts/external/interfaces/IPolygonZkEVMBridge.sol +0 -40
- package/contracts/hub-pool/Blast_DaiRetriever.sol +0 -59
- package/contracts/hub-pool/PermissionSplitterProxy.sol +0 -128
- package/contracts/spoke-pools/Blast_SpokePool.sol +0 -161
- package/contracts/spoke-pools/Boba_SpokePool.sol +0 -45
- package/contracts/spoke-pools/Ink_SpokePool.sol +0 -72
- package/contracts/spoke-pools/Optimism_SpokePool.sol +0 -66
- package/contracts/spoke-pools/PolygonZkEVM_SpokePool.sol +0 -217
- package/contracts/spoke-pools/Scroll_SpokePool.sol +0 -153
- package/contracts/spoke-pools/WorldChain_SpokePool.sol +0 -72
- package/contracts/test/MockBlastUsdYieldManager.sol +0 -20
- package/contracts/test/MockOptimism_SpokePool.sol +0 -22
- package/contracts/test/PolygonZkEVMMocks.sol +0 -72
- package/contracts/test/ScrollMocks.sol +0 -109
- package/dist/evm/artifacts/Blast_Adapter.sol/Blast_Adapter.json +0 -1
- package/dist/evm/artifacts/Blast_Adapter.sol/IL1ERC20Bridge.json +0 -1
- package/dist/evm/artifacts/Blast_DaiRetriever.sol/Blast_DaiRetriever.json +0 -1
- package/dist/evm/artifacts/Blast_DaiRetriever.sol/USDYieldManager.json +0 -1
- package/dist/evm/artifacts/Blast_RescueAdapter.sol/Blast_RescueAdapter.json +0 -1
- package/dist/evm/artifacts/Blast_SpokePool.sol/Blast_SpokePool.json +0 -1
- package/dist/evm/artifacts/Blast_SpokePool.sol/IBlast.json +0 -1
- package/dist/evm/artifacts/Blast_SpokePool.sol/IERC20Rebasing.json +0 -1
- package/dist/evm/artifacts/Blast_SpokePool.sol/IUSDBL2Bridge.json +0 -1
- package/dist/evm/artifacts/Boba_Adapter.sol/Boba_Adapter.json +0 -1
- package/dist/evm/artifacts/Boba_SpokePool.sol/Boba_SpokePool.json +0 -1
- package/dist/evm/artifacts/IL1ERC20Gateway.sol/IL1ERC20Gateway.json +0 -1
- package/dist/evm/artifacts/IL1ETHGateway.sol/IL1ETHGateway.json +0 -1
- package/dist/evm/artifacts/IL1GatewayRouter.sol/IL1GatewayRouter.json +0 -1
- package/dist/evm/artifacts/IL1ScrollMessenger.sol/IL1ScrollMessenger.json +0 -1
- package/dist/evm/artifacts/IL2ERC20Gateway.sol/IL2ERC20Gateway.json +0 -1
- package/dist/evm/artifacts/IL2ETHGateway.sol/IL2ETHGateway.json +0 -1
- package/dist/evm/artifacts/IL2GasPriceOracle.sol/IL2GasPriceOracle.json +0 -1
- package/dist/evm/artifacts/IL2GatewayRouter.sol/IL2GatewayRouter.json +0 -1
- package/dist/evm/artifacts/IPolygonZkEVMBridge.sol/IPolygonZkEVMBridge.json +0 -1
- package/dist/evm/artifacts/IScrollMessenger.sol/IScrollMessenger.json +0 -1
- package/dist/evm/artifacts/Ink_SpokePool.sol/Ink_SpokePool.json +0 -1
- package/dist/evm/artifacts/MockBlastUsdYieldManager.sol/MockBlastUsdYieldManager.json +0 -1
- package/dist/evm/artifacts/MockOptimism_SpokePool.sol/MockOptimism_SpokePool.json +0 -1
- package/dist/evm/artifacts/Optimism_Adapter.sol/Optimism_Adapter.json +0 -1
- package/dist/evm/artifacts/Optimism_Adapter.sol/SynthetixBridgeToOptimism.json +0 -1
- package/dist/evm/artifacts/Optimism_SpokePool.sol/Optimism_SpokePool.json +0 -1
- package/dist/evm/artifacts/Optimism_SpokePool.sol/SynthetixBridgeToBase.json +0 -1
- package/dist/evm/artifacts/PermissionSplitterProxy.sol/PermissionSplitterProxy.json +0 -1
- package/dist/evm/artifacts/PolygonZkEVMMocks.sol/MockPolygonZkEVMBridge.json +0 -1
- package/dist/evm/artifacts/PolygonZkEVM_Adapter.sol/PolygonZkEVM_Adapter.json +0 -1
- package/dist/evm/artifacts/PolygonZkEVM_SpokePool.sol/IBridgeMessageReceiver.json +0 -1
- package/dist/evm/artifacts/PolygonZkEVM_SpokePool.sol/PolygonZkEVM_SpokePool.json +0 -1
- package/dist/evm/artifacts/ScrollMocks.sol/MockScrollL2GatewayRouter.json +0 -1
- package/dist/evm/artifacts/ScrollMocks.sol/MockScrollMessenger.json +0 -1
- package/dist/evm/artifacts/Scroll_Adapter.sol/Scroll_Adapter.json +0 -1
- package/dist/evm/artifacts/Scroll_SpokePool.sol/IL2GatewayRouterExtended.json +0 -1
- package/dist/evm/artifacts/Scroll_SpokePool.sol/Scroll_SpokePool.json +0 -1
- package/dist/evm/artifacts/WorldChain_SpokePool.sol/WorldChain_SpokePool.json +0 -1
- package/dist/src/svm/assets/idl/message_transmitter.json +0 -1675
- package/dist/src/svm/assets/idl/token_messenger_minter.json +0 -2049
- package/dist/src/svm/assets/message_transmitter.d.ts +0 -1681
- package/dist/src/svm/assets/message_transmitter.js +0 -2
- package/dist/src/svm/assets/token_messenger_minter.d.ts +0 -2055
- package/dist/src/svm/assets/token_messenger_minter.js +0 -2
- package/dist/src/svm/clients/MessageTransmitter/accounts/index.d.ts +0 -10
- package/dist/src/svm/clients/MessageTransmitter/accounts/index.js +0 -26
- package/dist/src/svm/clients/MessageTransmitter/accounts/messageSent.d.ts +0 -28
- package/dist/src/svm/clients/MessageTransmitter/accounts/messageSent.js +0 -64
- package/dist/src/svm/clients/MessageTransmitter/accounts/messageTransmitter.d.ts +0 -46
- package/dist/src/svm/clients/MessageTransmitter/accounts/messageTransmitter.js +0 -82
- package/dist/src/svm/clients/MessageTransmitter/accounts/usedNonces.d.ts +0 -31
- package/dist/src/svm/clients/MessageTransmitter/accounts/usedNonces.js +0 -70
- package/dist/src/svm/clients/MessageTransmitter/errors/index.d.ts +0 -8
- package/dist/src/svm/clients/MessageTransmitter/errors/index.js +0 -24
- package/dist/src/svm/clients/MessageTransmitter/errors/messageTransmitter.d.ts +0 -83
- package/dist/src/svm/clients/MessageTransmitter/errors/messageTransmitter.js +0 -124
- package/dist/src/svm/clients/MessageTransmitter/index.d.ts +0 -12
- package/dist/src/svm/clients/MessageTransmitter/index.js +0 -28
- package/dist/src/svm/clients/MessageTransmitter/instructions/acceptOwnership.d.ts +0 -45
- package/dist/src/svm/clients/MessageTransmitter/instructions/acceptOwnership.js +0 -85
- package/dist/src/svm/clients/MessageTransmitter/instructions/disableAttester.d.ts +0 -55
- package/dist/src/svm/clients/MessageTransmitter/instructions/disableAttester.js +0 -105
- package/dist/src/svm/clients/MessageTransmitter/instructions/enableAttester.d.ts +0 -55
- package/dist/src/svm/clients/MessageTransmitter/instructions/enableAttester.js +0 -105
- package/dist/src/svm/clients/MessageTransmitter/instructions/getNoncePda.d.ts +0 -43
- package/dist/src/svm/clients/MessageTransmitter/instructions/getNoncePda.js +0 -82
- package/dist/src/svm/clients/MessageTransmitter/instructions/index.d.ts +0 -25
- package/dist/src/svm/clients/MessageTransmitter/instructions/index.js +0 -41
- package/dist/src/svm/clients/MessageTransmitter/instructions/initialize.d.ts +0 -70
- package/dist/src/svm/clients/MessageTransmitter/instructions/initialize.js +0 -123
- package/dist/src/svm/clients/MessageTransmitter/instructions/isNonceUsed.d.ts +0 -42
- package/dist/src/svm/clients/MessageTransmitter/instructions/isNonceUsed.js +0 -77
- package/dist/src/svm/clients/MessageTransmitter/instructions/pause.d.ts +0 -45
- package/dist/src/svm/clients/MessageTransmitter/instructions/pause.js +0 -85
- package/dist/src/svm/clients/MessageTransmitter/instructions/receiveMessage.d.ts +0 -67
- package/dist/src/svm/clients/MessageTransmitter/instructions/receiveMessage.js +0 -113
- package/dist/src/svm/clients/MessageTransmitter/instructions/reclaimEventAccount.d.ts +0 -48
- package/dist/src/svm/clients/MessageTransmitter/instructions/reclaimEventAccount.js +0 -94
- package/dist/src/svm/clients/MessageTransmitter/instructions/replaceMessage.d.ts +0 -64
- package/dist/src/svm/clients/MessageTransmitter/instructions/replaceMessage.js +0 -132
- package/dist/src/svm/clients/MessageTransmitter/instructions/sendMessage.d.ts +0 -61
- package/dist/src/svm/clients/MessageTransmitter/instructions/sendMessage.js +0 -112
- package/dist/src/svm/clients/MessageTransmitter/instructions/sendMessageWithCaller.d.ts +0 -64
- package/dist/src/svm/clients/MessageTransmitter/instructions/sendMessageWithCaller.js +0 -117
- package/dist/src/svm/clients/MessageTransmitter/instructions/setMaxMessageBodySize.d.ts +0 -49
- package/dist/src/svm/clients/MessageTransmitter/instructions/setMaxMessageBodySize.js +0 -94
- package/dist/src/svm/clients/MessageTransmitter/instructions/setSignatureThreshold.d.ts +0 -49
- package/dist/src/svm/clients/MessageTransmitter/instructions/setSignatureThreshold.js +0 -97
- package/dist/src/svm/clients/MessageTransmitter/instructions/transferOwnership.d.ts +0 -49
- package/dist/src/svm/clients/MessageTransmitter/instructions/transferOwnership.js +0 -91
- package/dist/src/svm/clients/MessageTransmitter/instructions/unpause.d.ts +0 -45
- package/dist/src/svm/clients/MessageTransmitter/instructions/unpause.js +0 -85
- package/dist/src/svm/clients/MessageTransmitter/instructions/updateAttesterManager.d.ts +0 -49
- package/dist/src/svm/clients/MessageTransmitter/instructions/updateAttesterManager.js +0 -94
- package/dist/src/svm/clients/MessageTransmitter/instructions/updatePauser.d.ts +0 -49
- package/dist/src/svm/clients/MessageTransmitter/instructions/updatePauser.js +0 -91
- package/dist/src/svm/clients/MessageTransmitter/programs/index.d.ts +0 -8
- package/dist/src/svm/clients/MessageTransmitter/programs/index.js +0 -24
- package/dist/src/svm/clients/MessageTransmitter/programs/messageTransmitter.d.ts +0 -78
- package/dist/src/svm/clients/MessageTransmitter/programs/messageTransmitter.js +0 -112
- package/dist/src/svm/clients/MessageTransmitter/shared/index.d.ts +0 -49
- package/dist/src/svm/clients/MessageTransmitter/shared/index.js +0 -94
- package/dist/src/svm/clients/MessageTransmitter/types/attesterDisabled.d.ts +0 -15
- package/dist/src/svm/clients/MessageTransmitter/types/attesterDisabled.js +0 -22
- package/dist/src/svm/clients/MessageTransmitter/types/attesterEnabled.d.ts +0 -15
- package/dist/src/svm/clients/MessageTransmitter/types/attesterEnabled.js +0 -22
- package/dist/src/svm/clients/MessageTransmitter/types/attesterManagerUpdated.d.ts +0 -16
- package/dist/src/svm/clients/MessageTransmitter/types/attesterManagerUpdated.js +0 -28
- package/dist/src/svm/clients/MessageTransmitter/types/handleReceiveMessageParams.d.ts +0 -18
- package/dist/src/svm/clients/MessageTransmitter/types/handleReceiveMessageParams.js +0 -32
- package/dist/src/svm/clients/MessageTransmitter/types/index.d.ts +0 -20
- package/dist/src/svm/clients/MessageTransmitter/types/index.js +0 -36
- package/dist/src/svm/clients/MessageTransmitter/types/mathError.d.ts +0 -17
- package/dist/src/svm/clients/MessageTransmitter/types/mathError.js +0 -29
- package/dist/src/svm/clients/MessageTransmitter/types/maxMessageBodySizeUpdated.d.ts +0 -17
- package/dist/src/svm/clients/MessageTransmitter/types/maxMessageBodySizeUpdated.js +0 -22
- package/dist/src/svm/clients/MessageTransmitter/types/messageReceived.d.ts +0 -25
- package/dist/src/svm/clients/MessageTransmitter/types/messageReceived.js +0 -34
- package/dist/src/svm/clients/MessageTransmitter/types/ownershipTransferStarted.d.ts +0 -16
- package/dist/src/svm/clients/MessageTransmitter/types/ownershipTransferStarted.js +0 -28
- package/dist/src/svm/clients/MessageTransmitter/types/ownershipTransferred.d.ts +0 -16
- package/dist/src/svm/clients/MessageTransmitter/types/ownershipTransferred.js +0 -28
- package/dist/src/svm/clients/MessageTransmitter/types/pause.d.ts +0 -13
- package/dist/src/svm/clients/MessageTransmitter/types/pause.js +0 -22
- package/dist/src/svm/clients/MessageTransmitter/types/pauserChanged.d.ts +0 -15
- package/dist/src/svm/clients/MessageTransmitter/types/pauserChanged.js +0 -22
- package/dist/src/svm/clients/MessageTransmitter/types/signatureThresholdUpdated.d.ts +0 -16
- package/dist/src/svm/clients/MessageTransmitter/types/signatureThresholdUpdated.js +0 -28
- package/dist/src/svm/clients/MessageTransmitter/types/unpause.d.ts +0 -13
- package/dist/src/svm/clients/MessageTransmitter/types/unpause.js +0 -22
- package/dist/src/svm/clients/SvmSpoke/accounts/transferLiability.d.ts +0 -27
- package/dist/src/svm/clients/SvmSpoke/accounts/transferLiability.js +0 -66
- package/dist/src/svm/clients/SvmSpoke/instructions/bridgeTokensToHubPool.d.ts +0 -123
- package/dist/src/svm/clients/SvmSpoke/instructions/bridgeTokensToHubPool.js +0 -313
- package/dist/src/svm/clients/SvmSpoke/instructions/handleReceiveMessage.d.ts +0 -71
- package/dist/src/svm/clients/SvmSpoke/types/bridgedToHubPool.d.ts +0 -19
- package/dist/src/svm/clients/SvmSpoke/types/bridgedToHubPool.js +0 -28
- package/dist/src/svm/clients/SvmSpoke/types/tokensBridged.d.ts +0 -25
- package/dist/src/svm/clients/SvmSpoke/types/tokensBridged.js +0 -34
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/index.d.ts +0 -12
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/index.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/localToken.d.ts +0 -43
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/localToken.js +0 -82
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/remoteTokenMessenger.d.ts +0 -29
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/remoteTokenMessenger.js +0 -71
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenMessenger.d.ts +0 -35
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenMessenger.js +0 -74
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenMinter.d.ts +0 -33
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenMinter.js +0 -72
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenPair.d.ts +0 -33
- package/dist/src/svm/clients/TokenMessengerMinter/accounts/tokenPair.js +0 -72
- package/dist/src/svm/clients/TokenMessengerMinter/errors/index.d.ts +0 -8
- package/dist/src/svm/clients/TokenMessengerMinter/errors/index.js +0 -24
- package/dist/src/svm/clients/TokenMessengerMinter/errors/tokenMessengerMinter.d.ts +0 -45
- package/dist/src/svm/clients/TokenMessengerMinter/errors/tokenMessengerMinter.js +0 -67
- package/dist/src/svm/clients/TokenMessengerMinter/index.d.ts +0 -12
- package/dist/src/svm/clients/TokenMessengerMinter/index.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/acceptOwnership.d.ts +0 -45
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/acceptOwnership.js +0 -82
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/addLocalToken.d.ts +0 -63
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/addLocalToken.js +0 -115
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/addRemoteTokenMessenger.d.ts +0 -61
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/addRemoteTokenMessenger.js +0 -110
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/burnTokenCustody.d.ts +0 -64
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/burnTokenCustody.js +0 -117
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/depositForBurn.d.ts +0 -94
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/depositForBurn.js +0 -161
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/depositForBurnWithCaller.d.ts +0 -97
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/depositForBurnWithCaller.js +0 -166
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/handleReceiveMessage.d.ts +0 -79
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/handleReceiveMessage.js +0 -132
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/index.d.ts +0 -26
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/index.js +0 -42
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/initialize.d.ts +0 -73
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/initialize.js +0 -124
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/linkTokenPair.d.ts +0 -64
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/linkTokenPair.js +0 -109
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/pause.d.ts +0 -45
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/pause.js +0 -82
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/removeLocalToken.d.ts +0 -57
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/removeLocalToken.js +0 -105
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/removeRemoteTokenMessenger.d.ts +0 -51
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/removeRemoteTokenMessenger.js +0 -94
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/replaceDepositForBurn.d.ts +0 -79
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/replaceDepositForBurn.js +0 -150
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/setMaxBurnAmountPerMessage.d.ts +0 -52
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/setMaxBurnAmountPerMessage.js +0 -97
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/setTokenController.d.ts +0 -52
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/setTokenController.js +0 -91
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/transferOwnership.d.ts +0 -49
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/transferOwnership.js +0 -88
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/unlinkTokenPair.d.ts +0 -51
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/unlinkTokenPair.js +0 -91
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/unpause.d.ts +0 -45
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/unpause.js +0 -82
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/updatePauser.d.ts +0 -52
- package/dist/src/svm/clients/TokenMessengerMinter/instructions/updatePauser.js +0 -91
- package/dist/src/svm/clients/TokenMessengerMinter/programs/index.d.ts +0 -8
- package/dist/src/svm/clients/TokenMessengerMinter/programs/index.js +0 -24
- package/dist/src/svm/clients/TokenMessengerMinter/programs/tokenMessengerMinter.d.ts +0 -83
- package/dist/src/svm/clients/TokenMessengerMinter/programs/tokenMessengerMinter.js +0 -124
- package/dist/src/svm/clients/TokenMessengerMinter/shared/index.d.ts +0 -49
- package/dist/src/svm/clients/TokenMessengerMinter/shared/index.js +0 -94
- package/dist/src/svm/clients/TokenMessengerMinter/types/depositForBurn.d.ts +0 -31
- package/dist/src/svm/clients/TokenMessengerMinter/types/depositForBurn.js +0 -40
- package/dist/src/svm/clients/TokenMessengerMinter/types/index.d.ts +0 -24
- package/dist/src/svm/clients/TokenMessengerMinter/types/index.js +0 -40
- package/dist/src/svm/clients/TokenMessengerMinter/types/localTokenAdded.d.ts +0 -16
- package/dist/src/svm/clients/TokenMessengerMinter/types/localTokenAdded.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/localTokenRemoved.d.ts +0 -16
- package/dist/src/svm/clients/TokenMessengerMinter/types/localTokenRemoved.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/mintAndWithdraw.d.ts +0 -21
- package/dist/src/svm/clients/TokenMessengerMinter/types/mintAndWithdraw.js +0 -30
- package/dist/src/svm/clients/TokenMessengerMinter/types/ownershipTransferStarted.d.ts +0 -16
- package/dist/src/svm/clients/TokenMessengerMinter/types/ownershipTransferStarted.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/ownershipTransferred.d.ts +0 -16
- package/dist/src/svm/clients/TokenMessengerMinter/types/ownershipTransferred.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/pause.d.ts +0 -13
- package/dist/src/svm/clients/TokenMessengerMinter/types/pause.js +0 -22
- package/dist/src/svm/clients/TokenMessengerMinter/types/pauserChanged.d.ts +0 -15
- package/dist/src/svm/clients/TokenMessengerMinter/types/pauserChanged.js +0 -22
- package/dist/src/svm/clients/TokenMessengerMinter/types/remoteTokenMessengerAdded.d.ts +0 -16
- package/dist/src/svm/clients/TokenMessengerMinter/types/remoteTokenMessengerAdded.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/remoteTokenMessengerRemoved.d.ts +0 -16
- package/dist/src/svm/clients/TokenMessengerMinter/types/remoteTokenMessengerRemoved.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/setBurnLimitPerMessage.d.ts +0 -19
- package/dist/src/svm/clients/TokenMessengerMinter/types/setBurnLimitPerMessage.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/setTokenController.d.ts +0 -15
- package/dist/src/svm/clients/TokenMessengerMinter/types/setTokenController.js +0 -22
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenCustodyBurned.d.ts +0 -19
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenCustodyBurned.js +0 -28
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenMinterError.d.ts +0 -23
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenMinterError.js +0 -35
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenPairLinked.d.ts +0 -17
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenPairLinked.js +0 -30
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenPairUnlinked.d.ts +0 -17
- package/dist/src/svm/clients/TokenMessengerMinter/types/tokenPairUnlinked.js +0 -30
- package/dist/src/svm/clients/TokenMessengerMinter/types/unpause.d.ts +0 -13
- package/dist/src/svm/clients/TokenMessengerMinter/types/unpause.js +0 -22
- package/dist/src/svm/web3-v1/cctpHelpers.d.ts +0 -65
- package/dist/src/svm/web3-v1/cctpHelpers.js +0 -148
|
@@ -6,8 +6,10 @@ import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.s
|
|
|
6
6
|
import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
|
|
7
7
|
import { EIP712 } from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
|
|
8
8
|
import { ITokenMessengerV2 } from "../../external/interfaces/CCTPInterfaces.sol";
|
|
9
|
+
import { ICounterfactualBeacon } from "../../interfaces/ICounterfactualBeacon.sol";
|
|
9
10
|
import { ICounterfactualImplementation } from "../../interfaces/ICounterfactualImplementation.sol";
|
|
10
11
|
import { CounterfactualImplementationBase } from "./CounterfactualImplementationBase.sol";
|
|
12
|
+
import { CounterfactualNonces } from "./CounterfactualNonces.sol";
|
|
11
13
|
import { BPS_SCALAR } from "./CounterfactualConstants.sol";
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -37,6 +39,7 @@ struct VanillaCCTPRouteParams {
|
|
|
37
39
|
struct VanillaCCTPSubmitterData {
|
|
38
40
|
uint256 amount;
|
|
39
41
|
address executionFeeRecipient;
|
|
42
|
+
bytes32 nonce;
|
|
40
43
|
uint256 executionFee;
|
|
41
44
|
/// @dev Circle fast-transfer `maxFee` passed to the TokenMessenger (0 ⇒ standard transfer), capped at
|
|
42
45
|
/// the beacon's `<cctpMaxFeeBpsGetter>` bps of the burned amount.
|
|
@@ -55,23 +58,26 @@ struct VanillaCCTPSubmitterData {
|
|
|
55
58
|
* the beacon, so the impl holds no chain-specific values and has one address per chain.
|
|
56
59
|
*
|
|
57
60
|
* With no periphery quote signature, the local EIP-712 fee signature binds the full route
|
|
58
|
-
* (`routeParamsHash`), `amount`, `executionFee`, `maxFeeCctp`, `minFinalityThreshold` and
|
|
59
|
-
* `signatureDeadline`. Replay protection is the
|
|
61
|
+
* (`routeParamsHash`), `nonce`, `amount`, `executionFee`, `maxFeeCctp`, `minFinalityThreshold` and
|
|
62
|
+
* `signatureDeadline`. Replay protection is the signed single-use `nonce` consumed in the proxy's
|
|
63
|
+
* storage (`CounterfactualNonces`), bounded further by the short `signatureDeadline`. ERC-20 only.
|
|
60
64
|
* @custom:security-contact bugs@across.to
|
|
61
65
|
*/
|
|
62
|
-
contract CounterfactualDepositVanillaCCTP is CounterfactualImplementationBase, EIP712 {
|
|
66
|
+
contract CounterfactualDepositVanillaCCTP is CounterfactualImplementationBase, CounterfactualNonces, EIP712 {
|
|
63
67
|
using SafeERC20 for IERC20;
|
|
64
68
|
|
|
65
69
|
/**
|
|
66
70
|
* @notice Emitted after a vanilla CCTP deposit is successfully executed.
|
|
67
71
|
* @param amount Total input amount (including execution fee).
|
|
68
72
|
* @param executionFeeRecipient Address that received the execution fee.
|
|
73
|
+
* @param nonce Single-use nonce consumed by this execution.
|
|
69
74
|
* @param executionFee Execution fee paid to the executor (in input token).
|
|
70
75
|
* @param depositAmount Amount burned via CCTP (`amount - executionFee`).
|
|
71
76
|
*/
|
|
72
77
|
event VanillaCCTPDepositExecuted(
|
|
73
78
|
uint256 amount,
|
|
74
79
|
address indexed executionFeeRecipient,
|
|
80
|
+
bytes32 nonce,
|
|
75
81
|
uint256 executionFee,
|
|
76
82
|
uint256 depositAmount
|
|
77
83
|
);
|
|
@@ -81,14 +87,18 @@ contract CounterfactualDepositVanillaCCTP is CounterfactualImplementationBase, E
|
|
|
81
87
|
error MaxExecutionFee();
|
|
82
88
|
error MaxCctpFee();
|
|
83
89
|
|
|
84
|
-
/// @notice EIP-712 typehash binding the fee signature to the route, amount, runtime fees
|
|
85
|
-
/// Circle), finality threshold, and deadline.
|
|
90
|
+
/// @notice EIP-712 typehash binding the fee signature to the route, nonce, amount, runtime fees
|
|
91
|
+
/// (executor + Circle), finality threshold, and deadline.
|
|
86
92
|
bytes32 public constant EXECUTE_VANILLA_CCTP_TYPEHASH =
|
|
87
93
|
keccak256(
|
|
88
|
-
"ExecuteVanillaCCTP(bytes32 routeParamsHash,uint256 amount,uint256 executionFee,uint256 maxFeeCctp,uint32 minFinalityThreshold,uint32 signatureDeadline)"
|
|
94
|
+
"ExecuteVanillaCCTP(bytes32 routeParamsHash,bytes32 nonce,uint256 amount,uint256 executionFee,uint256 maxFeeCctp,uint32 minFinalityThreshold,uint32 signatureDeadline)"
|
|
89
95
|
);
|
|
90
96
|
|
|
91
|
-
|
|
97
|
+
/// @dev The domain name is intentionally shorter than the contract name: EIP-712 name/version strings
|
|
98
|
+
/// must stay <= 31 bytes so OpenZeppelin packs them into immutables. At 32+ bytes they'd go to a
|
|
99
|
+
/// ShortStrings storage fallback, which under the dispatcher's delegatecall would resolve against
|
|
100
|
+
/// the clone's (uninitialized) storage in `_EIP712Name()`/`_EIP712Version()`.
|
|
101
|
+
constructor() EIP712("CounterfactualVanillaCCTP", "v2.0.0") {}
|
|
92
102
|
|
|
93
103
|
/**
|
|
94
104
|
* @inheritdoc ICounterfactualImplementation
|
|
@@ -99,8 +109,9 @@ contract CounterfactualDepositVanillaCCTP is CounterfactualImplementationBase, E
|
|
|
99
109
|
VanillaCCTPRouteParams memory routeParams = abi.decode(routeParamsEncoded, (VanillaCCTPRouteParams));
|
|
100
110
|
VanillaCCTPSubmitterData memory submitterData = abi.decode(submitterDataEncoded, (VanillaCCTPSubmitterData));
|
|
101
111
|
|
|
102
|
-
// Sole authorization (no periphery sig): binds the exact leaf params, amount, and fee.
|
|
112
|
+
// Sole authorization (no periphery sig): binds the exact leaf params, nonce, amount, and fee.
|
|
103
113
|
_verifySignature(keccak256(routeParamsEncoded), submitterData);
|
|
114
|
+
_useNonce(submitterData.nonce);
|
|
104
115
|
|
|
105
116
|
// Each fee is capped independently against the beacon getter its leaf names.
|
|
106
117
|
if (submitterData.executionFee > _resolveBeaconUint(routeParams.maxExecutionFeeGetter))
|
|
@@ -111,8 +122,9 @@ contract CounterfactualDepositVanillaCCTP is CounterfactualImplementationBase, E
|
|
|
111
122
|
(depositAmount * _resolveBeaconUint(routeParams.cctpMaxFeeBpsGetter)) / BPS_SCALAR
|
|
112
123
|
) revert MaxCctpFee();
|
|
113
124
|
|
|
114
|
-
|
|
115
|
-
|
|
125
|
+
ICounterfactualBeacon beacon = ICounterfactualBeacon(_beacon());
|
|
126
|
+
ITokenMessengerV2 tokenMessenger = ITokenMessengerV2(_requireConfigured(beacon.cctpTokenMessenger()));
|
|
127
|
+
address inputToken = _requireConfigured(beacon.usdc());
|
|
116
128
|
|
|
117
129
|
if (submitterData.executionFee > 0)
|
|
118
130
|
IERC20(inputToken).safeTransfer(submitterData.executionFeeRecipient, submitterData.executionFee);
|
|
@@ -146,6 +158,7 @@ contract CounterfactualDepositVanillaCCTP is CounterfactualImplementationBase, E
|
|
|
146
158
|
emit VanillaCCTPDepositExecuted(
|
|
147
159
|
submitterData.amount,
|
|
148
160
|
submitterData.executionFeeRecipient,
|
|
161
|
+
submitterData.nonce,
|
|
149
162
|
submitterData.executionFee,
|
|
150
163
|
depositAmount
|
|
151
164
|
);
|
|
@@ -157,6 +170,7 @@ contract CounterfactualDepositVanillaCCTP is CounterfactualImplementationBase, E
|
|
|
157
170
|
abi.encode(
|
|
158
171
|
EXECUTE_VANILLA_CCTP_TYPEHASH,
|
|
159
172
|
routeParamsHash,
|
|
173
|
+
submitterData.nonce,
|
|
160
174
|
submitterData.amount,
|
|
161
175
|
submitterData.executionFee,
|
|
162
176
|
submitterData.maxFeeCctp,
|
|
@@ -164,7 +178,9 @@ contract CounterfactualDepositVanillaCCTP is CounterfactualImplementationBase, E
|
|
|
164
178
|
submitterData.signatureDeadline
|
|
165
179
|
)
|
|
166
180
|
);
|
|
167
|
-
if (
|
|
168
|
-
|
|
181
|
+
if (
|
|
182
|
+
ECDSA.recover(_hashTypedDataV4(structHash), submitterData.counterfactualSignature) !=
|
|
183
|
+
ICounterfactualBeacon(_beacon()).signer()
|
|
184
|
+
) revert InvalidSignature();
|
|
169
185
|
}
|
|
170
186
|
}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
4
|
import { ERC1967Utils } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol";
|
|
5
|
-
import { ICounterfactualBeacon } from "../../interfaces/ICounterfactualBeacon.sol";
|
|
6
5
|
import { ICounterfactualImplementation } from "../../interfaces/ICounterfactualImplementation.sol";
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* @title CounterfactualImplementationBase
|
|
10
|
-
* @notice Shared base for leaf implementations: resolves the per-chain
|
|
11
|
-
* chain-specific config (endpoints, fee signer, tokens) at runtime.
|
|
9
|
+
* @notice Shared base for leaf implementations: resolves the per-chain registry/beacon that leaves read
|
|
10
|
+
* chain-specific config (endpoints, fee signer, tokens) from at runtime. Config-agnostic — it
|
|
11
|
+
* hands back a plain `address`, so each leaf views the beacon through whichever config interface
|
|
12
|
+
* it needs.
|
|
12
13
|
* @dev Leaves run under delegatecall from the `BeaconProxy`, so `address(this)` is the proxy and the beacon
|
|
13
14
|
* sits in its ERC-1967 beacon slot. Reading config there means a leaf holds **no immutables of its
|
|
14
15
|
* own** and is byte-identical across chains (one CREATE2 address everywhere).
|
|
@@ -20,8 +21,8 @@ abstract contract CounterfactualImplementationBase is ICounterfactualImplementat
|
|
|
20
21
|
error RouteNotConfigured();
|
|
21
22
|
|
|
22
23
|
/// @dev The per-chain registry that anchors this proxy (resolved from the ERC-1967 beacon slot).
|
|
23
|
-
function _beacon() internal view returns (
|
|
24
|
-
return
|
|
24
|
+
function _beacon() internal view returns (address) {
|
|
25
|
+
return ERC1967Utils.getBeacon();
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
/// @dev Resolve an address from a no-arg `() -> address` beacon getter named by `getter`'s selector
|
|
@@ -29,7 +30,7 @@ abstract contract CounterfactualImplementationBase is ICounterfactualImplementat
|
|
|
29
30
|
/// `address(0)`, which callers treat as `RouteNotConfigured`. The selector is merkle-committed (and
|
|
30
31
|
/// where applicable signature-bound), so trusted; a bad selector can only revert here or downstream.
|
|
31
32
|
function _resolveBeaconAddress(bytes4 getter) internal view returns (address) {
|
|
32
|
-
(bool ok, bytes memory ret) =
|
|
33
|
+
(bool ok, bytes memory ret) = _beacon().staticcall(abi.encodeWithSelector(getter));
|
|
33
34
|
if (!ok || ret.length != 32) return address(0);
|
|
34
35
|
return abi.decode(ret, (address));
|
|
35
36
|
}
|
|
@@ -38,7 +39,7 @@ abstract contract CounterfactualImplementationBase is ICounterfactualImplementat
|
|
|
38
39
|
/// in the leaf, e.g. `beacon.usdcCctpMaxExecutionFee.selector`). Reverts `RouteNotConfigured` if the
|
|
39
40
|
/// getter doesn't exist; a configured value of 0 is valid and returned as-is. Merkle/signature-bound.
|
|
40
41
|
function _resolveBeaconUint(bytes4 getter) internal view returns (uint256) {
|
|
41
|
-
(bool ok, bytes memory ret) =
|
|
42
|
+
(bool ok, bytes memory ret) = _beacon().staticcall(abi.encodeWithSelector(getter));
|
|
42
43
|
if (!ok || ret.length != 32) revert RouteNotConfigured();
|
|
43
44
|
return abi.decode(ret, (uint256));
|
|
44
45
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @title CounterfactualNonces
|
|
6
|
+
* @notice Shared single-use nonce tracking for counterfactual signatures that nothing else consumes:
|
|
7
|
+
* the SpokePool and Vanilla CCTP leaf implementations (no periphery) and `AdminWithdrawManager`
|
|
8
|
+
* signed withdrawals.
|
|
9
|
+
* @dev The mapping lives in `address(this)`'s storage under an ERC-7201 namespaced slot. For leaf
|
|
10
|
+
* implementations that is **each proxy's storage** (they run under the proxy's delegatecall, so
|
|
11
|
+
* nonces are per-clone, like the dispatcher's `activeRoot`); for a singleton like
|
|
12
|
+
* `AdminWithdrawManager` it is the contract's own storage. The namespace is shared by every
|
|
13
|
+
* contract using this mixin, so within one storage context a nonce is single-use across all of
|
|
14
|
+
* them — nonces are random 32 bytes chosen by the off-chain signer, so collisions are a non-issue.
|
|
15
|
+
* The namespace cannot collide with the dispatcher's.
|
|
16
|
+
*
|
|
17
|
+
* Deliberately exposes NO `usedNonces` getter: inherited by a leaf implementation it would enter
|
|
18
|
+
* the impl's public ABI but read the impl's own, never-written storage (always false) — a
|
|
19
|
+
* misleading ABI entry. Off-chain, check consumption via
|
|
20
|
+
* `eth_getStorageAt(target, keccak256(abi.encode(nonce, NONCES_STORAGE_LOCATION)))` (target = the
|
|
21
|
+
* proxy for leaf-impl nonces, the manager for withdraw nonces), or simulate and look for
|
|
22
|
+
* `InvalidNonce`.
|
|
23
|
+
* **Every future implementation version MUST preserve this ERC-7201 storage layout.**
|
|
24
|
+
* @custom:security-contact bugs@across.to
|
|
25
|
+
*/
|
|
26
|
+
abstract contract CounterfactualNonces {
|
|
27
|
+
/// @custom:storage-location erc7201:across.counterfactual.nonces.storage
|
|
28
|
+
struct NoncesStorage {
|
|
29
|
+
mapping(bytes32 => bool) usedNonces;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// keccak256(abi.encode(uint256(keccak256("across.counterfactual.nonces.storage")) - 1)) & ~bytes32(uint256(0xff))
|
|
33
|
+
bytes32 private constant NONCES_STORAGE_LOCATION =
|
|
34
|
+
0x6620ce368f04f685aa0153e5e3347c828611b4776c1dc36e5c44b4db1be22600;
|
|
35
|
+
|
|
36
|
+
/// @dev The signature's nonce was already consumed in this storage context (replay).
|
|
37
|
+
error InvalidNonce();
|
|
38
|
+
|
|
39
|
+
/// @dev Consume `nonce` on this proxy; reverts `InvalidNonce` if already used. Call after signature
|
|
40
|
+
/// verification and before any external interaction.
|
|
41
|
+
function _useNonce(bytes32 nonce) internal {
|
|
42
|
+
NoncesStorage storage $ = _getNoncesStorage();
|
|
43
|
+
if ($.usedNonces[nonce]) revert InvalidNonce();
|
|
44
|
+
$.usedNonces[nonce] = true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function _getNoncesStorage() private pure returns (NoncesStorage storage $) {
|
|
48
|
+
assembly {
|
|
49
|
+
$.slot := NONCES_STORAGE_LOCATION
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -992,7 +992,13 @@ contract HyperCoreFlowExecutor is AccessControlUpgradeable, AuthorizedFundedFlow
|
|
|
992
992
|
uint128 cloid
|
|
993
993
|
) external onlyRole(PERMISSIONED_BOT_ROLE) {
|
|
994
994
|
FinalTokenInfo memory finalTokenInfo = _getExistingFinalTokenInfo(finalToken);
|
|
995
|
-
finalTokenInfo.swapHandler.submitSpotLimitOrder(
|
|
995
|
+
finalTokenInfo.swapHandler.submitSpotLimitOrder(
|
|
996
|
+
finalTokenInfo.spotIndex,
|
|
997
|
+
finalTokenInfo.isBuy,
|
|
998
|
+
priceX1e8,
|
|
999
|
+
sizeX1e8,
|
|
1000
|
+
cloid
|
|
1001
|
+
);
|
|
996
1002
|
|
|
997
1003
|
emit SubmittedLimitOrder(finalToken, priceX1e8, sizeX1e8, cloid);
|
|
998
1004
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
//SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
import {
|
|
3
|
+
|
|
4
|
+
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
5
|
+
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
5
6
|
import { HyperCoreLib } from "../../libraries/HyperCoreLib.sol";
|
|
6
|
-
import { FinalTokenInfo } from "./Structs.sol";
|
|
7
7
|
|
|
8
8
|
contract SwapHandler {
|
|
9
9
|
// See https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#asset
|
|
@@ -46,14 +46,15 @@ contract SwapHandler {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
function submitSpotLimitOrder(
|
|
49
|
-
|
|
49
|
+
uint32 spotIndex,
|
|
50
|
+
bool isBuy,
|
|
50
51
|
uint64 limitPriceX1e8,
|
|
51
52
|
uint64 sizeX1e8,
|
|
52
53
|
uint128 cloid
|
|
53
54
|
) external onlyParentHandler {
|
|
54
55
|
HyperCoreLib.submitLimitOrder(
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
spotIndex + SPOT_MARKET_INDEX_OFFSET,
|
|
57
|
+
isBuy,
|
|
57
58
|
limitPriceX1e8,
|
|
58
59
|
sizeX1e8,
|
|
59
60
|
false,
|
|
@@ -29,9 +29,17 @@ contract Arbitrum_SpokePool is SpokePool, CircleCCTPAdapter {
|
|
|
29
29
|
IERC20 _l2Usdc,
|
|
30
30
|
ITokenMessenger _cctpTokenMessenger,
|
|
31
31
|
uint32 _oftDstEid,
|
|
32
|
-
uint256 _oftFeeCap
|
|
32
|
+
uint256 _oftFeeCap,
|
|
33
|
+
address _gateway
|
|
33
34
|
)
|
|
34
|
-
SpokePool(
|
|
35
|
+
SpokePool(
|
|
36
|
+
_wrappedNativeTokenAddress,
|
|
37
|
+
_depositQuoteTimeBuffer,
|
|
38
|
+
_fillDeadlineBuffer,
|
|
39
|
+
_oftDstEid,
|
|
40
|
+
_oftFeeCap,
|
|
41
|
+
_gateway
|
|
42
|
+
)
|
|
35
43
|
CircleCCTPAdapter(_l2Usdc, _cctpTokenMessenger, CircleDomainIds.Ethereum)
|
|
36
44
|
{} // solhint-disable-line no-empty-blocks
|
|
37
45
|
|
|
@@ -22,14 +22,16 @@ contract Cher_SpokePool is Ovm_SpokePool {
|
|
|
22
22
|
uint32 _depositQuoteTimeBuffer,
|
|
23
23
|
uint32 _fillDeadlineBuffer,
|
|
24
24
|
IERC20 _l2Usdc,
|
|
25
|
-
ITokenMessenger _cctpTokenMessenger
|
|
25
|
+
ITokenMessenger _cctpTokenMessenger,
|
|
26
|
+
address _gateway
|
|
26
27
|
)
|
|
27
28
|
Ovm_SpokePool(
|
|
28
29
|
_wrappedNativeTokenAddress,
|
|
29
30
|
_depositQuoteTimeBuffer,
|
|
30
31
|
_fillDeadlineBuffer,
|
|
31
32
|
_l2Usdc,
|
|
32
|
-
_cctpTokenMessenger
|
|
33
|
+
_cctpTokenMessenger,
|
|
34
|
+
_gateway
|
|
33
35
|
)
|
|
34
36
|
{} // solhint-disable-line no-empty-blocks
|
|
35
37
|
|
|
@@ -15,7 +15,8 @@ contract Ethereum_SpokePool is SpokePool, OwnableUpgradeable {
|
|
|
15
15
|
constructor(
|
|
16
16
|
address _wrappedNativeTokenAddress,
|
|
17
17
|
uint32 _depositQuoteTimeBuffer,
|
|
18
|
-
uint32 _fillDeadlineBuffer
|
|
18
|
+
uint32 _fillDeadlineBuffer,
|
|
19
|
+
address _gateway
|
|
19
20
|
)
|
|
20
21
|
SpokePool(
|
|
21
22
|
_wrappedNativeTokenAddress,
|
|
@@ -23,7 +24,8 @@ contract Ethereum_SpokePool is SpokePool, OwnableUpgradeable {
|
|
|
23
24
|
_fillDeadlineBuffer,
|
|
24
25
|
// Ethereum_SpokePool does not use OFT messaging; setting destination eid and fee cap to 0
|
|
25
26
|
0,
|
|
26
|
-
0
|
|
27
|
+
0,
|
|
28
|
+
_gateway
|
|
27
29
|
)
|
|
28
30
|
{} // solhint-disable-line no-empty-blocks
|
|
29
31
|
|
|
@@ -7,6 +7,9 @@ import "./ZkSync_SpokePool.sol";
|
|
|
7
7
|
* @notice Lens specific SpokePool. Wrapper around the ZkSync_SpokePool contract.
|
|
8
8
|
* @dev Resources for compiling and deploying ZkSync contracts: https://docs.zksync.io/build/tooling/foundry/overview
|
|
9
9
|
* @custom:security-contact bugs@across.to
|
|
10
|
+
* @dev This contract intentionally has no initializer of its own. Proxies are initialized via the
|
|
11
|
+
* inherited ZkSync_SpokePool.initialize, which the OZ missing-initializer heuristic does not recognize.
|
|
12
|
+
* @custom:oz-upgrades-unsafe-allow missing-initializer
|
|
10
13
|
*/
|
|
11
14
|
contract Lens_SpokePool is ZkSync_SpokePool {
|
|
12
15
|
/// @custom:oz-upgrades-unsafe-allow constructor
|
|
@@ -17,7 +20,8 @@ contract Lens_SpokePool is ZkSync_SpokePool {
|
|
|
17
20
|
uint256 _l1ChainId,
|
|
18
21
|
ITokenMessenger _cctpTokenMessenger,
|
|
19
22
|
uint32 _depositQuoteTimeBuffer,
|
|
20
|
-
uint32 _fillDeadlineBuffer
|
|
23
|
+
uint32 _fillDeadlineBuffer,
|
|
24
|
+
address _gateway
|
|
21
25
|
)
|
|
22
26
|
ZkSync_SpokePool(
|
|
23
27
|
_wrappedNativeTokenAddress,
|
|
@@ -26,7 +30,8 @@ contract Lens_SpokePool is ZkSync_SpokePool {
|
|
|
26
30
|
_l1ChainId,
|
|
27
31
|
_cctpTokenMessenger,
|
|
28
32
|
_depositQuoteTimeBuffer,
|
|
29
|
-
_fillDeadlineBuffer
|
|
33
|
+
_fillDeadlineBuffer,
|
|
34
|
+
_gateway
|
|
30
35
|
)
|
|
31
36
|
{}
|
|
32
37
|
}
|
|
@@ -52,7 +52,8 @@ contract Linea_SpokePool is SpokePool, CircleCCTPAdapter {
|
|
|
52
52
|
uint32 _depositQuoteTimeBuffer,
|
|
53
53
|
uint32 _fillDeadlineBuffer,
|
|
54
54
|
IERC20 _l2Usdc,
|
|
55
|
-
ITokenMessenger _cctpTokenMessenger
|
|
55
|
+
ITokenMessenger _cctpTokenMessenger,
|
|
56
|
+
address _gateway
|
|
56
57
|
)
|
|
57
58
|
SpokePool(
|
|
58
59
|
_wrappedNativeTokenAddress,
|
|
@@ -60,7 +61,8 @@ contract Linea_SpokePool is SpokePool, CircleCCTPAdapter {
|
|
|
60
61
|
_fillDeadlineBuffer,
|
|
61
62
|
// Linea_SpokePool does not use OFT messaging; setting destination eid and fee cap to 0
|
|
62
63
|
0,
|
|
63
|
-
0
|
|
64
|
+
0,
|
|
65
|
+
_gateway
|
|
64
66
|
)
|
|
65
67
|
CircleCCTPAdapter(_l2Usdc, _cctpTokenMessenger, CircleDomainIds.Ethereum)
|
|
66
68
|
{} // solhint-disable-line no-empty-blocks
|
|
@@ -22,14 +22,16 @@ contract Lisk_SpokePool is Ovm_SpokePool {
|
|
|
22
22
|
uint32 _depositQuoteTimeBuffer,
|
|
23
23
|
uint32 _fillDeadlineBuffer,
|
|
24
24
|
IERC20 _l2Usdc,
|
|
25
|
-
ITokenMessenger _cctpTokenMessenger
|
|
25
|
+
ITokenMessenger _cctpTokenMessenger,
|
|
26
|
+
address _gateway
|
|
26
27
|
)
|
|
27
28
|
Ovm_SpokePool(
|
|
28
29
|
_wrappedNativeTokenAddress,
|
|
29
30
|
_depositQuoteTimeBuffer,
|
|
30
31
|
_fillDeadlineBuffer,
|
|
31
32
|
_l2Usdc,
|
|
32
|
-
_cctpTokenMessenger
|
|
33
|
+
_cctpTokenMessenger,
|
|
34
|
+
_gateway
|
|
33
35
|
)
|
|
34
36
|
{} // solhint-disable-line no-empty-blocks
|
|
35
37
|
|
|
@@ -16,14 +16,16 @@ contract OP_SpokePool is Ovm_SpokePool {
|
|
|
16
16
|
uint32 _depositQuoteTimeBuffer,
|
|
17
17
|
uint32 _fillDeadlineBuffer,
|
|
18
18
|
IERC20 _l2Usdc,
|
|
19
|
-
ITokenMessenger _cctpTokenMessenger
|
|
19
|
+
ITokenMessenger _cctpTokenMessenger,
|
|
20
|
+
address _gateway
|
|
20
21
|
)
|
|
21
22
|
Ovm_SpokePool(
|
|
22
23
|
_wrappedNativeTokenAddress,
|
|
23
24
|
_depositQuoteTimeBuffer,
|
|
24
25
|
_fillDeadlineBuffer,
|
|
25
26
|
_l2Usdc,
|
|
26
|
-
_cctpTokenMessenger
|
|
27
|
+
_cctpTokenMessenger,
|
|
28
|
+
_gateway
|
|
27
29
|
)
|
|
28
30
|
{} // solhint-disable-line no-empty-blocks
|
|
29
31
|
|
|
@@ -29,7 +29,8 @@ interface IL2ERC20Bridge {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* @notice OVM specific SpokePool. Uses OVM cross-domain-enabled logic to implement admin only access to functions.
|
|
32
|
+
* @notice OVM specific SpokePool. Uses OVM cross-domain-enabled logic to implement admin only access to functions.
|
|
33
|
+
* OP stack chains each implement this spoke pool and set their chain specific contract addresses for l2Eth and l2Weth.
|
|
33
34
|
* @custom:security-contact bugs@across.to
|
|
34
35
|
*/
|
|
35
36
|
contract Ovm_SpokePool is SpokePool, CircleCCTPAdapter {
|
|
@@ -70,7 +71,8 @@ contract Ovm_SpokePool is SpokePool, CircleCCTPAdapter {
|
|
|
70
71
|
uint32 _depositQuoteTimeBuffer,
|
|
71
72
|
uint32 _fillDeadlineBuffer,
|
|
72
73
|
IERC20 _l2Usdc,
|
|
73
|
-
ITokenMessenger _cctpTokenMessenger
|
|
74
|
+
ITokenMessenger _cctpTokenMessenger,
|
|
75
|
+
address _gateway
|
|
74
76
|
)
|
|
75
77
|
SpokePool(
|
|
76
78
|
_wrappedNativeTokenAddress,
|
|
@@ -78,7 +80,8 @@ contract Ovm_SpokePool is SpokePool, CircleCCTPAdapter {
|
|
|
78
80
|
_fillDeadlineBuffer,
|
|
79
81
|
// Ovm_SpokePool does not use OFT messaging; setting destination eid and fee cap to 0
|
|
80
82
|
0,
|
|
81
|
-
0
|
|
83
|
+
0,
|
|
84
|
+
_gateway
|
|
82
85
|
)
|
|
83
86
|
CircleCCTPAdapter(_l2Usdc, _cctpTokenMessenger, CircleDomainIds.Ethereum)
|
|
84
87
|
{} // solhint-disable-line no-empty-blocks
|
|
@@ -90,8 +93,7 @@ contract Ovm_SpokePool is SpokePool, CircleCCTPAdapter {
|
|
|
90
93
|
* @param _crossDomainAdmin Cross domain admin to set. Can be changed by admin.
|
|
91
94
|
* @param _withdrawalRecipient Address which receives token withdrawals. Can be changed by admin. For Spoke Pools on L2, this will
|
|
92
95
|
* likely be the hub pool.
|
|
93
|
-
* @param _l2Eth Address of L2 ETH token
|
|
94
|
-
* be different, like with Boba which flips the WETH and OVM_ETH addresses.
|
|
96
|
+
* @param _l2Eth Address of L2 ETH token, typically Lib_PredeployAddresses.OVM_ETH.
|
|
95
97
|
*/
|
|
96
98
|
function __OvmSpokePool_init(
|
|
97
99
|
uint32 _initialDepositId,
|
|
@@ -84,9 +84,17 @@ contract Polygon_SpokePool is IFxMessageProcessor, SpokePool, CircleCCTPAdapter
|
|
|
84
84
|
IERC20 _l2Usdc,
|
|
85
85
|
ITokenMessenger _cctpTokenMessenger,
|
|
86
86
|
uint32 _oftDstEid,
|
|
87
|
-
uint256 _oftFeeCap
|
|
87
|
+
uint256 _oftFeeCap,
|
|
88
|
+
address _gateway
|
|
88
89
|
)
|
|
89
|
-
SpokePool(
|
|
90
|
+
SpokePool(
|
|
91
|
+
_wrappedNativeTokenAddress,
|
|
92
|
+
_depositQuoteTimeBuffer,
|
|
93
|
+
_fillDeadlineBuffer,
|
|
94
|
+
_oftDstEid,
|
|
95
|
+
_oftFeeCap,
|
|
96
|
+
_gateway
|
|
97
|
+
)
|
|
90
98
|
CircleCCTPAdapter(_l2Usdc, _cctpTokenMessenger, CircleDomainIds.Ethereum)
|
|
91
99
|
{} // solhint-disable-line no-empty-blocks
|
|
92
100
|
|