@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
|
@@ -14,6 +14,10 @@ import "../libraries/AddressConverters.sol";
|
|
|
14
14
|
import { SafeTransferERC20 } from "../libraries/SafeTransferERC20.sol";
|
|
15
15
|
import { IOFT, SendParam, MessagingFee } from "../interfaces/IOFT.sol";
|
|
16
16
|
import { OFTTransportAdapter } from "../libraries/OFTTransportAdapter.sol";
|
|
17
|
+
import { V5SpokePoolInterface } from "../interfaces/V5SpokePoolInterface.sol";
|
|
18
|
+
import { IGateway } from "../external/interfaces/IGateway.sol";
|
|
19
|
+
import { IAcrossV5Executor } from "../external/interfaces/IAcrossV5Executor.sol";
|
|
20
|
+
import { IAcrossV5ExecutorAdapter } from "../external/interfaces/IAcrossV5ExecutorAdapter.sol";
|
|
17
21
|
|
|
18
22
|
import "@openzeppelin/contracts-upgradeable-v4/token/ERC20/IERC20Upgradeable.sol";
|
|
19
23
|
import "@openzeppelin/contracts-upgradeable-v4/token/ERC20/utils/SafeERC20Upgradeable.sol";
|
|
@@ -34,6 +38,7 @@ import "@openzeppelin/contracts-v4/utils/math/SignedMath.sol";
|
|
|
34
38
|
*/
|
|
35
39
|
abstract contract SpokePool is
|
|
36
40
|
V3SpokePoolInterface,
|
|
41
|
+
V5SpokePoolInterface,
|
|
37
42
|
SpokePoolInterface,
|
|
38
43
|
UUPSUpgradeable,
|
|
39
44
|
ReentrancyGuardUpgradeable,
|
|
@@ -41,6 +46,8 @@ abstract contract SpokePool is
|
|
|
41
46
|
EIP712CrossChainUpgradeable,
|
|
42
47
|
IDestinationSettler,
|
|
43
48
|
OFTTransportAdapter,
|
|
49
|
+
IAcrossV5Executor,
|
|
50
|
+
IAcrossV5ExecutorAdapter,
|
|
44
51
|
SafeTransferERC20
|
|
45
52
|
{
|
|
46
53
|
// Restrict the `using` attachment to `safeTransferFrom` only. All `safeTransfer` calls must go
|
|
@@ -145,6 +152,10 @@ abstract contract SpokePool is
|
|
|
145
152
|
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
|
|
146
153
|
uint32 public immutable fillDeadlineBuffer;
|
|
147
154
|
|
|
155
|
+
// Across V5 Gateway whose live execution context authenticates and parameterizes V5 fills.
|
|
156
|
+
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
|
|
157
|
+
IGateway public immutable gateway;
|
|
158
|
+
|
|
148
159
|
uint256 public constant MAX_TRANSFER_SIZE = 1e36;
|
|
149
160
|
|
|
150
161
|
bytes32 public constant UPDATE_BYTES32_DEPOSIT_DETAILS_HASH =
|
|
@@ -172,6 +183,11 @@ abstract contract SpokePool is
|
|
|
172
183
|
// EIP-7702 prefix for delegated wallets.
|
|
173
184
|
bytes3 internal constant EIP7702_PREFIX = 0xef0100;
|
|
174
185
|
|
|
186
|
+
// Magic prefix tagging a deposit message as an Across V5 witness: `message = V5_MAGIC_PREFIX || stepId`,
|
|
187
|
+
// where stepId is the Merkle root of the Gateway execution allowed to consume the deposit. V5-tagged
|
|
188
|
+
// deposits are only consumable through the Gateway-context-checked V5 fill entrypoints.
|
|
189
|
+
bytes32 public constant V5_MAGIC_PREFIX = keccak256("AcrossV5MessagePrefix.V1");
|
|
190
|
+
|
|
175
191
|
/****************************************
|
|
176
192
|
* EVENTS *
|
|
177
193
|
****************************************/
|
|
@@ -229,6 +245,7 @@ abstract contract SpokePool is
|
|
|
229
245
|
* into the future from the block time of the deposit.
|
|
230
246
|
* @param _oftDstEid destination endpoint id for OFT messaging
|
|
231
247
|
* @param _oftFeeCap fee cap in native token when paying for cross-chain OFT transfers
|
|
248
|
+
* @param _gateway Across V5 Gateway address. Set to address(0) to deploy with V5 fills disabled.
|
|
232
249
|
*/
|
|
233
250
|
/// @custom:oz-upgrades-unsafe-allow constructor
|
|
234
251
|
constructor(
|
|
@@ -236,11 +253,13 @@ abstract contract SpokePool is
|
|
|
236
253
|
uint32 _depositQuoteTimeBuffer,
|
|
237
254
|
uint32 _fillDeadlineBuffer,
|
|
238
255
|
uint32 _oftDstEid,
|
|
239
|
-
uint256 _oftFeeCap
|
|
256
|
+
uint256 _oftFeeCap,
|
|
257
|
+
address _gateway
|
|
240
258
|
) OFTTransportAdapter(_oftDstEid, _oftFeeCap) {
|
|
241
259
|
wrappedNativeToken = WETH9Interface(_wrappedNativeTokenAddress);
|
|
242
260
|
depositQuoteTimeBuffer = _depositQuoteTimeBuffer;
|
|
243
261
|
fillDeadlineBuffer = _fillDeadlineBuffer;
|
|
262
|
+
gateway = IGateway(_gateway);
|
|
244
263
|
_disableInitializers();
|
|
245
264
|
}
|
|
246
265
|
|
|
@@ -289,6 +308,15 @@ abstract contract SpokePool is
|
|
|
289
308
|
_;
|
|
290
309
|
}
|
|
291
310
|
|
|
311
|
+
// Quarantines V5-tagged deposits from non-V5 settlement paths (regular fills, updated fills, slow-fill
|
|
312
|
+
// requests and executions). V5 deposits commit to a Gateway execution witness in `message` and are only
|
|
313
|
+
// consumable through the V5 entrypoints that check it; without this guard the witness binding would be
|
|
314
|
+
// bypassable.
|
|
315
|
+
modifier nonV5Fill(bytes memory message) {
|
|
316
|
+
if (_isV5Message(message)) revert V5FillOnly();
|
|
317
|
+
_;
|
|
318
|
+
}
|
|
319
|
+
|
|
292
320
|
/**************************************
|
|
293
321
|
* ADMIN FUNCTIONS *
|
|
294
322
|
**************************************/
|
|
@@ -959,15 +987,8 @@ abstract contract SpokePool is
|
|
|
959
987
|
V3RelayData memory relayData,
|
|
960
988
|
uint256 repaymentChainId,
|
|
961
989
|
bytes32 repaymentAddress
|
|
962
|
-
) public override nonReentrant unpausedFills {
|
|
963
|
-
|
|
964
|
-
// to fill the relay.
|
|
965
|
-
if (
|
|
966
|
-
_fillIsExclusive(relayData.exclusivityDeadline, uint32(getCurrentTime())) &&
|
|
967
|
-
relayData.exclusiveRelayer.toAddress() != msg.sender
|
|
968
|
-
) {
|
|
969
|
-
revert NotExclusiveRelayer();
|
|
970
|
-
}
|
|
990
|
+
) public override nonReentrant unpausedFills nonV5Fill(relayData.message) {
|
|
991
|
+
_requireExclusiveFiller(relayData.exclusivityDeadline, relayData.exclusiveRelayer, msg.sender);
|
|
971
992
|
|
|
972
993
|
V3RelayExecutionParams memory relayExecution = V3RelayExecutionParams({
|
|
973
994
|
relay: relayData,
|
|
@@ -1003,6 +1024,69 @@ abstract contract SpokePool is
|
|
|
1003
1024
|
fillRelay(convertedRelayData, repaymentChainId, msg.sender.toBytes32());
|
|
1004
1025
|
}
|
|
1005
1026
|
|
|
1027
|
+
/**
|
|
1028
|
+
* @notice Fills a V5 deposit as the entire Across V5 Gateway execution (spoke-as-executor mode: the user's
|
|
1029
|
+
* path commits the SpokePool itself as the executor, so the Gateway calls this entrypoint directly).
|
|
1030
|
+
* @dev Because the committed input is a fixed struct — a submitter can parse the complete execution
|
|
1031
|
+
* semantics before calling `Gateway.execute()` — this mode (and only this mode) pulls the output tokens
|
|
1032
|
+
* from the Gateway's current submitter, using the same standing approval relayers already hold for
|
|
1033
|
+
* `fillRelay`. The fill is terminal: after delivering to the committed recipient, a committed callback
|
|
1034
|
+
* message (if any) triggers the contract recipient's `handleV3AcrossMessage` hook with the submitter
|
|
1035
|
+
* reported as relayer, and nothing else runs.
|
|
1036
|
+
* @param message Path-committed `abi.encode(V5FillInput)`: the user's acceptance bounds (recipient, output
|
|
1037
|
+
* token, minimum output amount, callback message).
|
|
1038
|
+
* @param executorMessage Submitter-supplied `abi.encode(V5FillJit)`: the deposit's relay data, passed
|
|
1039
|
+
* verbatim, and repayment fields.
|
|
1040
|
+
*/
|
|
1041
|
+
function executeAcrossV5(
|
|
1042
|
+
bytes calldata message,
|
|
1043
|
+
bytes calldata executorMessage
|
|
1044
|
+
) external payable override nonReentrant {
|
|
1045
|
+
if (msg.sender != address(gateway)) revert V5NotGateway();
|
|
1046
|
+
// Fills never accept native value — the V3 fill entrypoints are not even payable. This entrypoint is
|
|
1047
|
+
// payable only because the V5 executor interface requires it, so reject any value rather than strand it.
|
|
1048
|
+
if (msg.value > 0) revert V5UnusedMsgValue();
|
|
1049
|
+
|
|
1050
|
+
_fillV5(
|
|
1051
|
+
abi.decode(message, (V5FillInput)),
|
|
1052
|
+
abi.decode(executorMessage, (V5FillJit)),
|
|
1053
|
+
gateway.currentSubmitter()
|
|
1054
|
+
);
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* @notice Fills a V5 deposit as one step inside an Across V5 Gateway execution (spoke-as-adapter mode: the
|
|
1059
|
+
* SpokePool is a funding-adapter target invoked mid-sequence by the executor running the user's committed
|
|
1060
|
+
* commands).
|
|
1061
|
+
* @dev Callable only by the committed executor of the live Gateway execution. Output tokens are always
|
|
1062
|
+
* pulled from `msg.sender` — the executing contract's own balance, funded by the Gateway or by earlier
|
|
1063
|
+
* steps — never from a standing submitter allowance, so a submitter executing a command sequence they
|
|
1064
|
+
* don't fully understand risks only what that execution was explicitly funded with. The fill has no
|
|
1065
|
+
* trailing call after delivery: anything that should happen next is expressed as later steps of the
|
|
1066
|
+
* committed sequence.
|
|
1067
|
+
* @param input Tape-committed `abi.encode(V5FillInput)`: the user's acceptance bounds (recipient, output
|
|
1068
|
+
* token, minimum output amount; no callback message may be committed).
|
|
1069
|
+
* @param jitData Submitter-supplied `abi.encode(V5FillJit)`: the deposit's relay data, passed verbatim,
|
|
1070
|
+
* and repayment fields.
|
|
1071
|
+
*/
|
|
1072
|
+
function adapterExecuteAcrossV5(
|
|
1073
|
+
bytes calldata input,
|
|
1074
|
+
bytes calldata jitData
|
|
1075
|
+
) external payable override nonReentrant {
|
|
1076
|
+
// Check that a Gateway execution is active and that the caller is its committed executor, directly.
|
|
1077
|
+
// For closed executors (only callable through the Gateway), this means `input` is committed in the
|
|
1078
|
+
// user's path rather than chosen by whoever gained control mid-execution.
|
|
1079
|
+
if (msg.sender != gateway.currentExecutor()) revert V5NotCurrentExecutor();
|
|
1080
|
+
// Fills never accept native value — the V3 fill entrypoints are not even payable. This entrypoint is
|
|
1081
|
+
// payable only because the V5 adapter interface requires it, so reject any value rather than strand it.
|
|
1082
|
+
if (msg.value > 0) revert V5UnusedMsgValue();
|
|
1083
|
+
|
|
1084
|
+
V5FillInput memory fillInput = abi.decode(input, (V5FillInput));
|
|
1085
|
+
if (fillInput.message.length != 0) revert V5CallbackNotAllowed();
|
|
1086
|
+
|
|
1087
|
+
_fillV5(fillInput, abi.decode(jitData, (V5FillJit)), msg.sender);
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1006
1090
|
/**
|
|
1007
1091
|
* @notice Identical to fillV3Relay except that the relayer wants to use a depositor's updated output amount,
|
|
1008
1092
|
* recipient, and/or message. The relayer should only use this function if they can supply a message signed
|
|
@@ -1029,15 +1113,8 @@ abstract contract SpokePool is
|
|
|
1029
1113
|
bytes32 updatedRecipient,
|
|
1030
1114
|
bytes calldata updatedMessage,
|
|
1031
1115
|
bytes calldata depositorSignature
|
|
1032
|
-
) public override nonReentrant unpausedFills {
|
|
1033
|
-
|
|
1034
|
-
// to fill the relay.
|
|
1035
|
-
if (
|
|
1036
|
-
_fillIsExclusive(relayData.exclusivityDeadline, uint32(getCurrentTime())) &&
|
|
1037
|
-
relayData.exclusiveRelayer.toAddress() != msg.sender
|
|
1038
|
-
) {
|
|
1039
|
-
revert NotExclusiveRelayer();
|
|
1040
|
-
}
|
|
1116
|
+
) public override nonReentrant unpausedFills nonV5Fill(relayData.message) {
|
|
1117
|
+
_requireExclusiveFiller(relayData.exclusivityDeadline, relayData.exclusiveRelayer, msg.sender);
|
|
1041
1118
|
|
|
1042
1119
|
V3RelayExecutionParams memory relayExecution = V3RelayExecutionParams({
|
|
1043
1120
|
relay: relayData,
|
|
@@ -1077,7 +1154,9 @@ abstract contract SpokePool is
|
|
|
1077
1154
|
* slow filled. If any of the params are missing or different from the origin chain deposit,
|
|
1078
1155
|
* then Across will not include a slow fill for the intended deposit.
|
|
1079
1156
|
*/
|
|
1080
|
-
function requestSlowFill(
|
|
1157
|
+
function requestSlowFill(
|
|
1158
|
+
V3RelayData calldata relayData
|
|
1159
|
+
) public override nonReentrant unpausedFills nonV5Fill(relayData.message) {
|
|
1081
1160
|
uint32 currentTime = uint32(getCurrentTime());
|
|
1082
1161
|
// If a depositor has set an exclusivity deadline, then only the exclusive relayer should be able to
|
|
1083
1162
|
// fast fill within this deadline. Moreover, the depositor should expect to get *fast* filled within
|
|
@@ -1164,7 +1243,7 @@ abstract contract SpokePool is
|
|
|
1164
1243
|
V3SlowFill calldata slowFillLeaf,
|
|
1165
1244
|
uint32 rootBundleId,
|
|
1166
1245
|
bytes32[] calldata proof
|
|
1167
|
-
) public override nonReentrant {
|
|
1246
|
+
) public override nonReentrant nonV5Fill(slowFillLeaf.relayData.message) {
|
|
1168
1247
|
V3RelayData memory relayData = slowFillLeaf.relayData;
|
|
1169
1248
|
|
|
1170
1249
|
_preExecuteLeafHook(relayData.outputToken.toAddress());
|
|
@@ -1566,9 +1645,71 @@ abstract contract SpokePool is
|
|
|
1566
1645
|
return bytes3(account.code) == EIP7702_PREFIX;
|
|
1567
1646
|
}
|
|
1568
1647
|
|
|
1648
|
+
// Exclusivity deadline is inclusive and is the latest timestamp that the exclusive relayer has sole right
|
|
1649
|
+
// to fill the relay. `filler` is msg.sender for V3 fills and the Gateway's current submitter for V5 fills.
|
|
1650
|
+
function _requireExclusiveFiller(
|
|
1651
|
+
uint32 exclusivityDeadline,
|
|
1652
|
+
bytes32 exclusiveRelayer,
|
|
1653
|
+
address filler
|
|
1654
|
+
) internal view {
|
|
1655
|
+
if (_fillIsExclusive(exclusivityDeadline, uint32(getCurrentTime())) && exclusiveRelayer.toAddress() != filler) {
|
|
1656
|
+
revert NotExclusiveRelayer();
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
/**
|
|
1661
|
+
* @notice Shared core of both V5 fill modes: validates the committed acceptance bounds against the
|
|
1662
|
+
* submitter-supplied relay data, binds the fill to the live Gateway execution, and settles it through the
|
|
1663
|
+
* standard fill pipeline (fill-status ledger, FilledRelay event, token transfer, optional callback).
|
|
1664
|
+
* @dev The supplied relay data is hashed verbatim, so every `V5FillInput` commitment must be explicitly
|
|
1665
|
+
* checked against it here — recipient, output token, the output-amount floor, and the witness
|
|
1666
|
+
* `message == V5_MAGIC_PREFIX || gateway.currentStepId()`. The witness check makes the relay hash only
|
|
1667
|
+
* match a real deposit if that deposit committed to the root being executed; marking that hash filled is
|
|
1668
|
+
* the replay protection. The unchecked relay-data fields are competition parameters the submitter proves
|
|
1669
|
+
* by paying: a wrong value yields a hash matching no real deposit, forfeiting the refund. Exclusivity is
|
|
1670
|
+
* judged against the Gateway's current submitter in both modes: identity for relayer competition is
|
|
1671
|
+
* decoupled from where funds are pulled.
|
|
1672
|
+
* @param fillInput Deposit-committed acceptance bounds.
|
|
1673
|
+
* @param fillJit Submitter-supplied relay data and repayment fields.
|
|
1674
|
+
* @param payer Address the output tokens are pulled from: the Gateway's current submitter (executor mode)
|
|
1675
|
+
* or msg.sender, the executing tape's own balance (adapter mode).
|
|
1676
|
+
*/
|
|
1677
|
+
function _fillV5(V5FillInput memory fillInput, V5FillJit memory fillJit, address payer) internal unpausedFills {
|
|
1678
|
+
V3RelayData memory relayData = fillJit.relayData;
|
|
1679
|
+
if (
|
|
1680
|
+
relayData.recipient != fillInput.recipient ||
|
|
1681
|
+
relayData.outputToken != fillInput.outputToken ||
|
|
1682
|
+
keccak256(relayData.message) != keccak256(abi.encodePacked(V5_MAGIC_PREFIX, gateway.currentStepId()))
|
|
1683
|
+
) revert V5CommitmentMismatch();
|
|
1684
|
+
if (relayData.outputAmount < fillInput.minOutputAmount) revert V5OutputAmountTooLow();
|
|
1685
|
+
_requireExclusiveFiller(relayData.exclusivityDeadline, relayData.exclusiveRelayer, gateway.currentSubmitter());
|
|
1686
|
+
|
|
1687
|
+
V3RelayExecutionParams memory relayExecution = V3RelayExecutionParams({
|
|
1688
|
+
relay: relayData,
|
|
1689
|
+
relayHash: getV3RelayHash(relayData),
|
|
1690
|
+
updatedOutputAmount: relayData.outputAmount,
|
|
1691
|
+
updatedRecipient: relayData.recipient,
|
|
1692
|
+
updatedMessage: fillInput.message,
|
|
1693
|
+
repaymentChainId: fillJit.repaymentChainId
|
|
1694
|
+
});
|
|
1695
|
+
|
|
1696
|
+
_fillRelay(relayExecution, fillJit.repaymentAddress, false, payer);
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1569
1699
|
// @param relayer: relayer who is actually credited as filling this deposit. Can be different from
|
|
1570
1700
|
// exclusiveRelayer if passed exclusivityDeadline or if slow fill.
|
|
1571
1701
|
function _fillRelayV3(V3RelayExecutionParams memory relayExecution, bytes32 relayer, bool isSlowFill) internal {
|
|
1702
|
+
_fillRelay(relayExecution, relayer, isSlowFill, msg.sender);
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
// @param payer: address that fast-fill output tokens are pulled from. Always msg.sender for V3 fills; V5
|
|
1706
|
+
// fills pull from the Gateway's current submitter (executor mode) or the executing tape (adapter mode).
|
|
1707
|
+
function _fillRelay(
|
|
1708
|
+
V3RelayExecutionParams memory relayExecution,
|
|
1709
|
+
bytes32 relayer,
|
|
1710
|
+
bool isSlowFill,
|
|
1711
|
+
address payer
|
|
1712
|
+
) internal {
|
|
1572
1713
|
V3RelayData memory relayData = relayExecution.relay;
|
|
1573
1714
|
|
|
1574
1715
|
if (relayData.fillDeadline < getCurrentTime()) revert ExpiredFillDeadline();
|
|
@@ -1599,7 +1740,7 @@ abstract contract SpokePool is
|
|
|
1599
1740
|
fillStatuses[relayHash] = uint256(FillStatus.Filled);
|
|
1600
1741
|
|
|
1601
1742
|
_emitFilledRelayEvent(relayExecution, relayData, relayer, fillType);
|
|
1602
|
-
_transferTokensToRecipient(relayExecution, relayData, isSlowFill);
|
|
1743
|
+
_transferTokensToRecipient(relayExecution, relayData, payer, isSlowFill);
|
|
1603
1744
|
}
|
|
1604
1745
|
|
|
1605
1746
|
/**
|
|
@@ -1643,11 +1784,14 @@ abstract contract SpokePool is
|
|
|
1643
1784
|
* @notice Transfers tokens to the recipient based on the relay execution parameters.
|
|
1644
1785
|
* @param relayExecution The relay execution parameters.
|
|
1645
1786
|
* @param relayData The relay data.
|
|
1787
|
+
* @param payer Address fast-fill output tokens are pulled from; also reported as the relayer to the
|
|
1788
|
+
* recipient's handleV3AcrossMessage hook. Unused for the slow-fill transfer, which pays out of reserves.
|
|
1646
1789
|
* @param isSlowFill Whether this is a slow fill execution.
|
|
1647
1790
|
*/
|
|
1648
1791
|
function _transferTokensToRecipient(
|
|
1649
1792
|
V3RelayExecutionParams memory relayExecution,
|
|
1650
1793
|
V3RelayData memory relayData,
|
|
1794
|
+
address payer,
|
|
1651
1795
|
bool isSlowFill
|
|
1652
1796
|
) internal {
|
|
1653
1797
|
address outputToken = relayData.outputToken.toAddress();
|
|
@@ -1661,12 +1805,12 @@ abstract contract SpokePool is
|
|
|
1661
1805
|
// recipient wants wrappedNativeToken, then we can assume that wrappedNativeToken is already in the
|
|
1662
1806
|
// contract, otherwise we'll need the user to send wrappedNativeToken to this contract. Regardless, we'll
|
|
1663
1807
|
// need to unwrap it to native token before sending to the user.
|
|
1664
|
-
if (!isSlowFill) IERC20Upgradeable(outputToken).safeTransferFrom(
|
|
1808
|
+
if (!isSlowFill) IERC20Upgradeable(outputToken).safeTransferFrom(payer, address(this), amountToSend);
|
|
1665
1809
|
_unwrapwrappedNativeTokenTo(payable(recipientToSend), amountToSend);
|
|
1666
1810
|
// Else, this is a normal ERC20 token. Send to recipient.
|
|
1667
1811
|
} else {
|
|
1668
1812
|
// Note: Similar to note above, send token directly from the contract to the user in the slow relay case.
|
|
1669
|
-
if (!isSlowFill) IERC20Upgradeable(outputToken).safeTransferFrom(
|
|
1813
|
+
if (!isSlowFill) IERC20Upgradeable(outputToken).safeTransferFrom(payer, recipientToSend, amountToSend);
|
|
1670
1814
|
else _safeTransfer(outputToken, recipientToSend, amountToSend);
|
|
1671
1815
|
}
|
|
1672
1816
|
|
|
@@ -1675,7 +1819,7 @@ abstract contract SpokePool is
|
|
|
1675
1819
|
AcrossMessageHandler(recipientToSend).handleV3AcrossMessage(
|
|
1676
1820
|
outputToken,
|
|
1677
1821
|
amountToSend,
|
|
1678
|
-
|
|
1822
|
+
payer,
|
|
1679
1823
|
updatedMessage
|
|
1680
1824
|
);
|
|
1681
1825
|
}
|
|
@@ -1686,6 +1830,18 @@ abstract contract SpokePool is
|
|
|
1686
1830
|
return exclusivityDeadline >= currentTime;
|
|
1687
1831
|
}
|
|
1688
1832
|
|
|
1833
|
+
// Returns true if `message` is V5-tagged (starts with V5_MAGIC_PREFIX), meaning the deposit is consumable
|
|
1834
|
+
// only through the V5 fill entrypoints.
|
|
1835
|
+
function _isV5Message(bytes memory message) internal pure returns (bool) {
|
|
1836
|
+
if (message.length < 32) return false;
|
|
1837
|
+
bytes32 header;
|
|
1838
|
+
// solhint-disable-next-line no-inline-assembly
|
|
1839
|
+
assembly {
|
|
1840
|
+
header := mload(add(message, 32))
|
|
1841
|
+
}
|
|
1842
|
+
return header == V5_MAGIC_PREFIX;
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1689
1845
|
// Helper for emitting message hash. For easier easier human readability we return bytes32(0) for empty message.
|
|
1690
1846
|
function _hashNonEmptyMessage(bytes memory message) internal pure returns (bytes32) {
|
|
1691
1847
|
if (message.length == 0) return bytes32(0);
|
|
@@ -32,7 +32,8 @@ contract Tron_SpokePool is Universal_SpokePool {
|
|
|
32
32
|
IERC20 _l2Usdc,
|
|
33
33
|
ITokenMessenger _cctpTokenMessenger,
|
|
34
34
|
uint32 _oftDstEid,
|
|
35
|
-
uint256 _oftFeeCap
|
|
35
|
+
uint256 _oftFeeCap,
|
|
36
|
+
address _gateway
|
|
36
37
|
)
|
|
37
38
|
Universal_SpokePool(
|
|
38
39
|
_adminUpdateBufferSeconds,
|
|
@@ -44,7 +45,8 @@ contract Tron_SpokePool is Universal_SpokePool {
|
|
|
44
45
|
_l2Usdc,
|
|
45
46
|
_cctpTokenMessenger,
|
|
46
47
|
_oftDstEid,
|
|
47
|
-
_oftFeeCap
|
|
48
|
+
_oftFeeCap,
|
|
49
|
+
_gateway
|
|
48
50
|
)
|
|
49
51
|
{} // solhint-disable-line no-empty-blocks
|
|
50
52
|
|
|
@@ -88,9 +88,17 @@ contract Universal_SpokePool is OwnableUpgradeable, SpokePool, CircleCCTPAdapter
|
|
|
88
88
|
IERC20 _l2Usdc,
|
|
89
89
|
ITokenMessenger _cctpTokenMessenger,
|
|
90
90
|
uint32 _oftDstEid,
|
|
91
|
-
uint256 _oftFeeCap
|
|
91
|
+
uint256 _oftFeeCap,
|
|
92
|
+
address _gateway
|
|
92
93
|
)
|
|
93
|
-
SpokePool(
|
|
94
|
+
SpokePool(
|
|
95
|
+
_wrappedNativeTokenAddress,
|
|
96
|
+
_depositQuoteTimeBuffer,
|
|
97
|
+
_fillDeadlineBuffer,
|
|
98
|
+
_oftDstEid,
|
|
99
|
+
_oftFeeCap,
|
|
100
|
+
_gateway
|
|
101
|
+
)
|
|
94
102
|
CircleCCTPAdapter(_l2Usdc, _cctpTokenMessenger, CircleDomainIds.Ethereum)
|
|
95
103
|
{
|
|
96
104
|
ADMIN_UPDATE_BUFFER = _adminUpdateBufferSeconds;
|
|
@@ -91,7 +91,8 @@ contract ZkSync_SpokePool is SpokePool, CircleCCTPAdapter {
|
|
|
91
91
|
uint256 _l1ChainId,
|
|
92
92
|
ITokenMessenger _cctpTokenMessenger,
|
|
93
93
|
uint32 _depositQuoteTimeBuffer,
|
|
94
|
-
uint32 _fillDeadlineBuffer
|
|
94
|
+
uint32 _fillDeadlineBuffer,
|
|
95
|
+
address _gateway
|
|
95
96
|
)
|
|
96
97
|
SpokePool(
|
|
97
98
|
_wrappedNativeTokenAddress,
|
|
@@ -99,7 +100,8 @@ contract ZkSync_SpokePool is SpokePool, CircleCCTPAdapter {
|
|
|
99
100
|
_fillDeadlineBuffer,
|
|
100
101
|
// ZkSync_SpokePool does not use OFT messaging; setting destination eid and fee cap to 0
|
|
101
102
|
0,
|
|
102
|
-
0
|
|
103
|
+
0,
|
|
104
|
+
_gateway
|
|
103
105
|
)
|
|
104
106
|
CircleCCTPAdapter(_circleUSDC, _cctpTokenMessenger, CircleDomainIds.Ethereum)
|
|
105
107
|
{
|
|
@@ -124,6 +126,9 @@ contract ZkSync_SpokePool is SpokePool, CircleCCTPAdapter {
|
|
|
124
126
|
* @param _crossDomainAdmin Cross domain admin to set. Can be changed by admin.
|
|
125
127
|
* @param _withdrawalRecipient Address which receives token withdrawals. Can be changed by admin. For Spoke Pools on L2, this will
|
|
126
128
|
* likely be the hub pool.
|
|
129
|
+
* @dev The incorrect-initializer-order heuristic (upgrades-core 1.44) misfires on our standard pattern of
|
|
130
|
+
* delegating all parent setup to __SpokePool_init; each nested init is guarded by onlyInitializing.
|
|
131
|
+
* @custom:oz-upgrades-unsafe-allow incorrect-initializer-order
|
|
127
132
|
*/
|
|
128
133
|
function initialize(
|
|
129
134
|
uint32 _initialDepositId,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
4
|
import "../libraries/CircleCCTPAdapter.sol";
|
|
5
|
-
import { IMessageTransmitter } from "../external/interfaces/CCTPInterfaces.sol";
|
|
5
|
+
import { IMessageTransmitter, IMessageTransmitterV2 } from "../external/interfaces/CCTPInterfaces.sol";
|
|
6
6
|
|
|
7
7
|
contract MockCCTPMinter is ITokenMinter {
|
|
8
8
|
uint256 private _burnLimit = type(uint256).max;
|
|
@@ -103,6 +103,54 @@ contract MockCCTPMessageTransmitter is IMessageTransmitter {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
/**
|
|
107
|
+
* @notice Mock CCTP V2 MessageTransmitter that records the V2 sendMessage parameters.
|
|
108
|
+
*/
|
|
109
|
+
contract MockCCTPMessageTransmitterV2 is IMessageTransmitterV2 {
|
|
110
|
+
uint256 public sendMessageCallCount;
|
|
111
|
+
|
|
112
|
+
// Event for vm.expectEmit compatibility
|
|
113
|
+
event SendMessageCalled(
|
|
114
|
+
uint32 destinationDomain,
|
|
115
|
+
bytes32 recipient,
|
|
116
|
+
bytes32 destinationCaller,
|
|
117
|
+
uint32 minFinalityThreshold,
|
|
118
|
+
bytes messageBody
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
// Last call parameters (similar to smock's calledWith behavior)
|
|
122
|
+
struct SendMessageCall {
|
|
123
|
+
uint32 destinationDomain;
|
|
124
|
+
bytes32 recipient;
|
|
125
|
+
bytes32 destinationCaller;
|
|
126
|
+
uint32 minFinalityThreshold;
|
|
127
|
+
bytes messageBody;
|
|
128
|
+
}
|
|
129
|
+
SendMessageCall public lastSendMessageCall;
|
|
130
|
+
|
|
131
|
+
function sendMessage(
|
|
132
|
+
uint32 _destinationDomain,
|
|
133
|
+
bytes32 _recipient,
|
|
134
|
+
bytes32 _destinationCaller,
|
|
135
|
+
uint32 _minFinalityThreshold,
|
|
136
|
+
bytes calldata _messageBody
|
|
137
|
+
) external {
|
|
138
|
+
sendMessageCallCount++;
|
|
139
|
+
lastSendMessageCall = SendMessageCall(
|
|
140
|
+
_destinationDomain,
|
|
141
|
+
_recipient,
|
|
142
|
+
_destinationCaller,
|
|
143
|
+
_minFinalityThreshold,
|
|
144
|
+
_messageBody
|
|
145
|
+
);
|
|
146
|
+
emit SendMessageCalled(_destinationDomain, _recipient, _destinationCaller, _minFinalityThreshold, _messageBody);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function receiveMessage(bytes calldata, bytes calldata) external pure returns (bool) {
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
106
154
|
/**
|
|
107
155
|
* @notice Mock CCTP V2 TokenMessenger that implements the V2 depositForBurn interface.
|
|
108
156
|
* @dev V2 has a different depositForBurn signature with additional parameters (destinationCaller, maxFee, minFinalityThreshold).
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @title MockGateway
|
|
6
|
+
* @notice Minimal IGateway stand-in for tests. Exposes settable execution-context fields so a SpokePool wired
|
|
7
|
+
* to this gateway can exercise its V5 deposit/fill paths. The auto-generated getters for the public state
|
|
8
|
+
* variables match the IGateway view selectors that SpokePool calls. On the real Gateway, `currentExecutor` is
|
|
9
|
+
* populated only for the duration of the committed executor's call (zero while idle and during the funding
|
|
10
|
+
* loop), while the other fields are live for the whole execution.
|
|
11
|
+
*/
|
|
12
|
+
contract MockGateway {
|
|
13
|
+
address public currentSubmitter;
|
|
14
|
+
address public currentExecutor;
|
|
15
|
+
bytes32 public currentStepId;
|
|
16
|
+
bytes32 public currentPathId;
|
|
17
|
+
|
|
18
|
+
function setSubmitter(address submitter) external {
|
|
19
|
+
currentSubmitter = submitter;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function setExecutor(address executor) external {
|
|
23
|
+
currentExecutor = executor;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function setStepId(bytes32 stepId) external {
|
|
27
|
+
currentStepId = stepId;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function setPathId(bytes32 pathId) external {
|
|
31
|
+
currentPathId = pathId;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -31,7 +31,10 @@ contract MockSpokePool is SpokePool, MockV2SpokePoolInterface, OwnableUpgradeabl
|
|
|
31
31
|
event PreLeafExecuteHook(bytes32 token);
|
|
32
32
|
|
|
33
33
|
/// @custom:oz-upgrades-unsafe-allow constructor
|
|
34
|
-
constructor(
|
|
34
|
+
constructor(
|
|
35
|
+
address _wrappedNativeTokenAddress,
|
|
36
|
+
address _gateway
|
|
37
|
+
) SpokePool(_wrappedNativeTokenAddress, 1 hours, 9 hours, 0, 0, _gateway) {} // solhint-disable-line no-empty-blocks
|
|
35
38
|
|
|
36
39
|
function initialize(uint32 _initialDepositId, address _crossDomainAdmin, address _hubPool) public initializer {
|
|
37
40
|
__Ownable_init();
|
|
@@ -12,7 +12,7 @@ contract MockSpokePoolV2 is MockSpokePool {
|
|
|
12
12
|
event NewEvent(bool value);
|
|
13
13
|
|
|
14
14
|
/// @custom:oz-upgrades-unsafe-allow constructor
|
|
15
|
-
constructor(address _wrappedNativeTokenAddress) MockSpokePool(_wrappedNativeTokenAddress) {} // solhint-disable-line no-empty-blocks
|
|
15
|
+
constructor(address _wrappedNativeTokenAddress) MockSpokePool(_wrappedNativeTokenAddress, address(0)) {} // solhint-disable-line no-empty-blocks
|
|
16
16
|
|
|
17
17
|
// Demonstrative of how we could reset state variables in a V2 contract conveniently while initializing new
|
|
18
18
|
// modules. The `reinitializer` modifier is required to create new Initializable contracts.
|
|
@@ -3,7 +3,9 @@ pragma solidity ^0.8.0;
|
|
|
3
3
|
|
|
4
4
|
// Entry point for counterfactual contracts in the tron Foundry profile. These use OZ v4 and must
|
|
5
5
|
// be in a separate file from SP1Helios/Tron_SpokePool (OZ v5) to avoid name collisions.
|
|
6
|
+
import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
|
|
6
7
|
import "../periphery/counterfactual/AdminWithdrawManager.sol";
|
|
8
|
+
import "../periphery/counterfactual/CounterfactualBeacon.sol";
|
|
7
9
|
import "../periphery/counterfactual/CounterfactualConstants.sol";
|
|
8
10
|
import "../periphery/counterfactual/CounterfactualDeposit.sol";
|
|
9
11
|
import "../periphery/counterfactual/CounterfactualDepositCCTP.sol";
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
// SPDX-License-Identifier: BUSL-1.1
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
|
-
// Entry point for SpokePoolPeriphery and SwapProxy in the tron Foundry
|
|
5
|
-
//
|
|
4
|
+
// Entry point for SpokePoolPeriphery and SwapProxy (and their Tron variants) in the tron Foundry
|
|
5
|
+
// profile. These use OZ v4, except the `_safeTransfer` hook: OZ v5 in the mainline contracts (see
|
|
6
|
+
// `SafeTransferERC20`), overridden with `TronTransferLib` errors in the Tron variants. Kept in a
|
|
7
|
+
// separate file from SP1Helios/Tron_SpokePool (OZ v5) to avoid name collisions.
|
|
6
8
|
import "../periphery/SpokePoolPeriphery.sol";
|
|
9
|
+
import "../periphery/Tron_SpokePoolPeriphery.sol";
|
|
7
10
|
import "../periphery/AcrossEventEmitter.sol";
|
|
8
11
|
import "../handlers/TronMulticallHandler.sol";
|