@across-protocol/contracts 5.0.25 → 5.0.27
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 +4 -0
- package/contracts/chain-adapters/CrossDomainEnabled.sol +1 -1
- 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/SpokePoolPeripheryInterface.sol +16 -4
- package/contracts/interfaces/V5SpokePoolInterface.sol +71 -0
- package/contracts/libraries/HyperCoreLib.sol +114 -30
- package/contracts/libraries/PeripherySigningLib.sol +56 -0
- package/contracts/libraries/SafeTransferERC20.sol +4 -0
- package/contracts/periphery/SpokePoolPeriphery.sol +81 -19
- 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/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 +611 -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/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/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 +21 -47
- package/dist/src/svm/assets/idl/svm_spoke.json +9 -4
- package/dist/src/svm/assets/svm_spoke.d.ts +9 -4
- package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.d.ts +3 -1
- package/dist/src/svm/clients/SvmSpoke/errors/svmSpoke.js +4 -1
- package/dist/src/types/svm.d.ts +44 -0
- package/dist/target/types/svm_spoke.d.ts +9 -4
- 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/consts.js
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OFT_EIDs = exports.CIRCLE_DOMAIN_IDs = exports.POLYGON_CHAIN_IDS = exports.L2_ADDRESS_MAP = exports.OP_STACK_ADDRESS_MAP = exports.L1_ADDRESS_MAP = exports.ZK_MAX_GASPRICE = exports.ZK_L2_GAS_LIMIT = exports.ZK_L1_GAS_TO_L2_GAS_PER_PUBDATA_LIMIT = exports.CIRCLE_UNINITIALIZED_DOMAIN_ID = exports.ARBITRUM_MAX_SUBMISSION_COST = exports.FILL_DEADLINE_BUFFER = exports.QUOTE_TIME_BUFFER = exports.WGHO = exports.WGRASS = exports.WMATIC = exports.WETH = exports.USDCe = exports.USDC = exports.ZERO_ADDRESS = void 0;
|
|
3
|
+
exports.OFT_EIDs = exports.CIRCLE_DOMAIN_IDs = exports.POLYGON_CHAIN_IDS = exports.L2_ADDRESS_MAP = exports.OP_STACK_ADDRESS_MAP = exports.L1_ADDRESS_MAP = exports.ZK_MAX_GASPRICE = exports.ZK_L2_GAS_LIMIT = exports.ZK_L1_GAS_TO_L2_GAS_PER_PUBDATA_LIMIT = exports.CIRCLE_UNINITIALIZED_DOMAIN_ID = exports.ARBITRUM_MAX_SUBMISSION_COST = exports.FILL_DEADLINE_BUFFER = exports.QUOTE_TIME_BUFFER = exports.WGHO = exports.WGRASS = exports.WMATIC = exports.WETH = exports.WBTC = exports.USDT = exports.USDCe = exports.USDC = exports.ZERO_ADDRESS = void 0;
|
|
4
4
|
const utils_1 = require("../utils");
|
|
5
5
|
exports.ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
6
|
-
|
|
6
|
+
// BSC's canonical stablecoins live under separate symbols in TOKEN_SYMBOLS_MAP (Binance-Peg, 18 decimals);
|
|
7
|
+
// merge them in so `.USDC.56` / `.USDT.56` resolve like every other chain.
|
|
8
|
+
exports.USDC = {
|
|
9
|
+
...utils_1.TOKEN_SYMBOLS_MAP.USDC.addresses,
|
|
10
|
+
[utils_1.CHAIN_IDs.BSC]: utils_1.TOKEN_SYMBOLS_MAP["USDC-BNB"].addresses[utils_1.CHAIN_IDs.BSC],
|
|
11
|
+
};
|
|
7
12
|
exports.USDCe = utils_1.TOKEN_SYMBOLS_MAP["USDC.e"].addresses;
|
|
13
|
+
exports.USDT = {
|
|
14
|
+
...utils_1.TOKEN_SYMBOLS_MAP.USDT.addresses,
|
|
15
|
+
[utils_1.CHAIN_IDs.BSC]: utils_1.TOKEN_SYMBOLS_MAP["USDT-BNB"].addresses[utils_1.CHAIN_IDs.BSC],
|
|
16
|
+
};
|
|
17
|
+
exports.WBTC = {
|
|
18
|
+
...utils_1.TOKEN_SYMBOLS_MAP.WBTC.addresses,
|
|
19
|
+
[utils_1.CHAIN_IDs.BSC]: utils_1.TOKEN_SYMBOLS_MAP["WBTC-BNB"].addresses[utils_1.CHAIN_IDs.BSC],
|
|
20
|
+
};
|
|
8
21
|
exports.WETH = utils_1.TOKEN_SYMBOLS_MAP.WETH.addresses;
|
|
9
22
|
exports.WMATIC = utils_1.TOKEN_SYMBOLS_MAP.WMATIC.addresses;
|
|
10
23
|
exports.WGRASS = utils_1.TOKEN_SYMBOLS_MAP.WGRASS.addresses;
|
|
@@ -31,11 +44,6 @@ exports.L1_ADDRESS_MAP = {
|
|
|
31
44
|
cctpMessageTransmitter: "0x0a992d191deec32afe36203ad87d7d289a738f81",
|
|
32
45
|
lineaMessageService: "0xd19d4B5d358258f05D7B411E21A1460D11B0876F",
|
|
33
46
|
lineaTokenBridge: "0x051F1D88f0aF5763fB888eC4378b4D8B29ea3319",
|
|
34
|
-
scrollERC20GatewayRouter: "0xF8B1378579659D8F7EE5f3C929c2f3E332E41Fd6",
|
|
35
|
-
scrollMessengerRelay: "0x6774Bcbd5ceCeF1336b5300fb5186a12DDD8b367",
|
|
36
|
-
scrollGasPriceOracle: "0x56971da63A3C0205184FEF096E9ddFc7A8C2D18a",
|
|
37
|
-
blastYieldManager: "0xa230285d5683C74935aD14c446e137c8c8828438",
|
|
38
|
-
blastDaiRetriever: "0x98Dd57048d7d5337e92D9102743528ea4Fea64aB",
|
|
39
47
|
donationBox: "0x0d57392895Db5aF3280e9223323e20F3951E81B1",
|
|
40
48
|
adapterStore: "0x42df4D71f35ffBD28ae217d52E83C1DA0007D63b",
|
|
41
49
|
hubPoolStore: "0x1Ace3BbD69b63063F859514Eca29C9BDd8310E61",
|
|
@@ -53,9 +61,6 @@ exports.L1_ADDRESS_MAP = {
|
|
|
53
61
|
usdc: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
|
|
54
62
|
lineaMessageService: "0xd19d4B5d358258f05D7B411E21A1460D11B0876F", // No sepolia deploy address
|
|
55
63
|
lineaTokenBridge: "0x051F1D88f0aF5763fB888eC4378b4D8B29ea3319", // No sepolia deploy address
|
|
56
|
-
scrollERC20GatewayRouter: "0x13FBE0D0e5552b8c9c4AE9e2435F38f37355998a",
|
|
57
|
-
scrollMessengerRelay: "0x50c7d3e7f7c656493D1D76aaa1a836CedfCBB16A",
|
|
58
|
-
scrollGasPriceOracle: "0x247969F4fad93a33d4826046bc3eAE0D36BdE548",
|
|
59
64
|
donationBox: "0x74f00724075443Cbbf55129F17CbAB0F77bA0722",
|
|
60
65
|
// https://github.com/maticnetwork/static/blob/master/network/testnet/amoy/index.json
|
|
61
66
|
polygonRootChainManager: "0x34F5A25B627f50Bb3f5cAb72807c4D4F405a9232",
|
|
@@ -70,22 +75,11 @@ exports.L1_ADDRESS_MAP = {
|
|
|
70
75
|
exports.OP_STACK_ADDRESS_MAP = {
|
|
71
76
|
[utils_1.CHAIN_IDs.MAINNET]: {
|
|
72
77
|
[utils_1.CHAIN_IDs.BASE]: {
|
|
73
|
-
L1BlastBridge: exports.ZERO_ADDRESS,
|
|
74
78
|
L1OpUSDCBridgeAdapter: exports.ZERO_ADDRESS,
|
|
75
79
|
L1CrossDomainMessenger: "0x866E82a600A1414e583f7F13623F1aC5d58b0Afa",
|
|
76
80
|
L1StandardBridge: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35",
|
|
77
81
|
},
|
|
78
|
-
[utils_1.CHAIN_IDs.BOBA]: {
|
|
79
|
-
L1CrossDomainMessenger: "0x6D4528d192dB72E282265D6092F4B872f9Dff69e",
|
|
80
|
-
L1StandardBridge: "0xdc1664458d2f0B6090bEa60A8793A4E66c2F1c00",
|
|
81
|
-
},
|
|
82
|
-
[utils_1.CHAIN_IDs.BLAST]: {
|
|
83
|
-
L1BlastBridge: "0x3a05E5d33d7Ab3864D53aaEc93c8301C1Fa49115",
|
|
84
|
-
L1CrossDomainMessenger: "0x5D4472f31Bd9385709ec61305AFc749F0fA8e9d0",
|
|
85
|
-
L1StandardBridge: "0x697402166Fbf2F22E970df8a6486Ef171dbfc524",
|
|
86
|
-
},
|
|
87
82
|
[utils_1.CHAIN_IDs.UNICHAIN]: {
|
|
88
|
-
L1BlastBridge: exports.ZERO_ADDRESS,
|
|
89
83
|
L1OpUSDCBridgeAdapter: exports.ZERO_ADDRESS,
|
|
90
84
|
L1CrossDomainMessenger: "0x9A3D64E386C18Cb1d6d5179a9596A4B5736e98A6",
|
|
91
85
|
L1StandardBridge: "0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA",
|
|
@@ -104,14 +98,12 @@ exports.OP_STACK_ADDRESS_MAP = {
|
|
|
104
98
|
L1CrossDomainMessenger: "0x6C7198250087B29A8040eC63903Bc130f4831Cc9",
|
|
105
99
|
L1StandardBridge: "0x0CA3A2FBC3D770b578223FBB6b062fa875a2eE75",
|
|
106
100
|
L1OpUSDCBridgeAdapter: exports.ZERO_ADDRESS,
|
|
107
|
-
L1BlastBridge: exports.ZERO_ADDRESS,
|
|
108
101
|
},
|
|
109
102
|
[utils_1.CHAIN_IDs.MODE]: {
|
|
110
103
|
L1CrossDomainMessenger: "0x95bDCA6c8EdEB69C98Bd5bd17660BaCef1298A6f",
|
|
111
104
|
L1StandardBridge: "0x735aDBbE72226BD52e818E7181953f42E3b0FF21",
|
|
112
105
|
},
|
|
113
106
|
[utils_1.CHAIN_IDs.OPTIMISM]: {
|
|
114
|
-
L1BlastBridge: exports.ZERO_ADDRESS,
|
|
115
107
|
L1OpUSDCBridgeAdapter: exports.ZERO_ADDRESS,
|
|
116
108
|
L1CrossDomainMessenger: "0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1", // Source: https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts/deployments
|
|
117
109
|
L1StandardBridge: "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1",
|
|
@@ -136,11 +128,6 @@ exports.OP_STACK_ADDRESS_MAP = {
|
|
|
136
128
|
L1CrossDomainMessenger: "0xC34855F4De64F1840e5686e64278da901e261f20",
|
|
137
129
|
L1StandardBridge: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120",
|
|
138
130
|
},
|
|
139
|
-
[utils_1.CHAIN_IDs.BLAST_SEPOLIA]: {
|
|
140
|
-
L1BlastBridge: "0xc644cc19d2A9388b71dd1dEde07cFFC73237Dca8",
|
|
141
|
-
L1CrossDomainMessenger: "0x9338F298F29D3918D5D1Feb209aeB9915CC96333",
|
|
142
|
-
L1StandardBridge: "0xDeDa8D3CCf044fE2A16217846B6e1f1cfD8e122f",
|
|
143
|
-
},
|
|
144
131
|
[utils_1.CHAIN_IDs.LISK_SEPOLIA]: {
|
|
145
132
|
L1CrossDomainMessenger: "0x857824E6234f7733ecA4e9A76804fd1afa1A3A2C",
|
|
146
133
|
L1StandardBridge: "0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5",
|
|
@@ -179,6 +166,7 @@ exports.L2_ADDRESS_MAP = {
|
|
|
179
166
|
[utils_1.CHAIN_IDs.ARC]: {
|
|
180
167
|
cctpV2TokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
|
|
181
168
|
cctpV2MessageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
|
|
169
|
+
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
182
170
|
},
|
|
183
171
|
[utils_1.CHAIN_IDs.AVALANCHE]: {
|
|
184
172
|
cctpV2TokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
|
|
@@ -280,22 +268,6 @@ exports.L2_ADDRESS_MAP = {
|
|
|
280
268
|
lineaTokenBridge: "0x353012dc4a9A6cF55c941bADC267f82004A8ceB9",
|
|
281
269
|
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
282
270
|
},
|
|
283
|
-
[utils_1.CHAIN_IDs.SCROLL_SEPOLIA]: {
|
|
284
|
-
scrollERC20GatewayRouter: "0x9aD3c5617eCAa556d6E166787A97081907171230",
|
|
285
|
-
scrollGasPriceOracle: "0x5300000000000000000000000000000000000002",
|
|
286
|
-
scrollMessenger: "0xba50f5340fb9f3bd074bd638c9be13ecb36e603d",
|
|
287
|
-
},
|
|
288
|
-
[utils_1.CHAIN_IDs.SCROLL]: {
|
|
289
|
-
scrollERC20GatewayRouter: "0x4C0926FF5252A435FD19e10ED15e5a249Ba19d79",
|
|
290
|
-
scrollGasPriceOracle: "0x5300000000000000000000000000000000000002",
|
|
291
|
-
scrollMessenger: "0x781e90f1c8Fc4611c9b7497C3B47F99Ef6969CbC",
|
|
292
|
-
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
293
|
-
},
|
|
294
|
-
1442: {
|
|
295
|
-
// Custom WETH for testing because there is no "official" WETH
|
|
296
|
-
l2Weth: "0x3ab6C7AEb93A1CFC64AEEa8BF0f00c176EE42A2C",
|
|
297
|
-
polygonZkEvmBridge: "0xF6BEEeBB578e214CA9E23B0e9683454Ff88Ed2A7",
|
|
298
|
-
},
|
|
299
271
|
[utils_1.CHAIN_IDs.UNICHAIN]: {
|
|
300
272
|
cctpV2TokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
|
|
301
273
|
cctpV2MessageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
|
|
@@ -305,14 +277,13 @@ exports.L2_ADDRESS_MAP = {
|
|
|
305
277
|
cctpTokenMessenger: "0x8ed94B8dAd2Dc5453862ea5e316A8e71AAed9782",
|
|
306
278
|
cctpMessageTransmitter: "0xbc498c326533d675cf571B90A2Ced265ACb7d086",
|
|
307
279
|
},
|
|
308
|
-
[utils_1.CHAIN_IDs.BLAST]: {
|
|
309
|
-
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
310
|
-
},
|
|
311
280
|
[utils_1.CHAIN_IDs.ZORA]: {
|
|
312
281
|
cctpV2TokenMessenger: "0x0000000000000000000000000000000000000000",
|
|
313
282
|
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
314
283
|
},
|
|
315
284
|
[utils_1.CHAIN_IDs.WORLD_CHAIN]: {
|
|
285
|
+
cctpV2TokenMessenger: "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d",
|
|
286
|
+
cctpV2MessageTransmitter: "0x81D40F21F12A8F0E3252Bccb954D722d4c464B64",
|
|
316
287
|
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
317
288
|
},
|
|
318
289
|
[utils_1.CHAIN_IDs.INK]: {
|
|
@@ -338,6 +309,9 @@ exports.L2_ADDRESS_MAP = {
|
|
|
338
309
|
cctpV2TokenMessenger: "0x0000000000000000000000000000000000000000",
|
|
339
310
|
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
340
311
|
},
|
|
312
|
+
[utils_1.CHAIN_IDs.ROBINHOOD]: {
|
|
313
|
+
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
314
|
+
},
|
|
341
315
|
[utils_1.CHAIN_IDs.MODE_SEPOLIA]: {
|
|
342
316
|
cctpV2TokenMessenger: "0x0000000000000000000000000000000000000000",
|
|
343
317
|
},
|
|
@@ -1982,8 +1982,8 @@
|
|
|
1982
1982
|
"this will be set higher to reimburse the recipient for waiting for the slow fill.",
|
|
1983
1983
|
"- _root_bundle_id: Unique ID of root bundle containing slow relay root that this leaf is contained in.",
|
|
1984
1984
|
"- proof: Inclusion proof for this leaf in slow relay root in root bundle.",
|
|
1985
|
-
"Note: slow_fill_leaf, _root_bundle_id, and proof are optional parameters
|
|
1986
|
-
"the caller must load them via the instruction_params account.",
|
|
1985
|
+
"Note: slow_fill_leaf, _root_bundle_id, and proof are optional parameters, but their presence must be consistent.",
|
|
1986
|
+
"If None for these parameters is passed, the caller must load them via the instruction_params account.",
|
|
1987
1987
|
"Note: When verifying the slow fill leaf, the relay data is hashed using AnchorSerialize::serialize that encodes",
|
|
1988
1988
|
"output token amounts to little-endian format while input token amount preserves its big-endian encoding as it",
|
|
1989
1989
|
"is passed as [u8; 32] array."
|
|
@@ -2366,8 +2366,8 @@
|
|
|
2366
2366
|
"- repayment_chain_id: Chain of SpokePool where relayer wants to be refunded after the challenge window has",
|
|
2367
2367
|
"passed. Will receive input_amount of the equivalent token to input_token on the repayment chain.",
|
|
2368
2368
|
"- repayment_address: The address of the recipient on the repayment chain that they want to be refunded to.",
|
|
2369
|
-
"Note: relay_data, repayment_chain_id, and repayment_address are optional parameters
|
|
2370
|
-
"is passed, the caller must load them via the instruction_params account."
|
|
2369
|
+
"Note: relay_data, repayment_chain_id, and repayment_address are optional parameters, but their presence must be",
|
|
2370
|
+
"consistent. If None for these is passed, the caller must load them via the instruction_params account."
|
|
2371
2371
|
],
|
|
2372
2372
|
"discriminator": [
|
|
2373
2373
|
100,
|
|
@@ -4612,6 +4612,11 @@
|
|
|
4612
4612
|
"code": 6017,
|
|
4613
4613
|
"name": "InvalidDelegatePda",
|
|
4614
4614
|
"msg": "Invalid delegate PDA!"
|
|
4615
|
+
},
|
|
4616
|
+
{
|
|
4617
|
+
"code": 6018,
|
|
4618
|
+
"name": "InconsistentOptionalParameters",
|
|
4619
|
+
"msg": "Inconsistent optional parameters!"
|
|
4615
4620
|
}
|
|
4616
4621
|
],
|
|
4617
4622
|
"types": [
|
|
@@ -1988,8 +1988,8 @@ export type SvmSpoke = {
|
|
|
1988
1988
|
"this will be set higher to reimburse the recipient for waiting for the slow fill.",
|
|
1989
1989
|
"- _root_bundle_id: Unique ID of root bundle containing slow relay root that this leaf is contained in.",
|
|
1990
1990
|
"- proof: Inclusion proof for this leaf in slow relay root in root bundle.",
|
|
1991
|
-
"Note: slow_fill_leaf, _root_bundle_id, and proof are optional parameters
|
|
1992
|
-
"the caller must load them via the instruction_params account.",
|
|
1991
|
+
"Note: slow_fill_leaf, _root_bundle_id, and proof are optional parameters, but their presence must be consistent.",
|
|
1992
|
+
"If None for these parameters is passed, the caller must load them via the instruction_params account.",
|
|
1993
1993
|
"Note: When verifying the slow fill leaf, the relay data is hashed using AnchorSerialize::serialize that encodes",
|
|
1994
1994
|
"output token amounts to little-endian format while input token amount preserves its big-endian encoding as it",
|
|
1995
1995
|
"is passed as [u8; 32] array."
|
|
@@ -2372,8 +2372,8 @@ export type SvmSpoke = {
|
|
|
2372
2372
|
"- repayment_chain_id: Chain of SpokePool where relayer wants to be refunded after the challenge window has",
|
|
2373
2373
|
"passed. Will receive input_amount of the equivalent token to input_token on the repayment chain.",
|
|
2374
2374
|
"- repayment_address: The address of the recipient on the repayment chain that they want to be refunded to.",
|
|
2375
|
-
"Note: relay_data, repayment_chain_id, and repayment_address are optional parameters
|
|
2376
|
-
"is passed, the caller must load them via the instruction_params account."
|
|
2375
|
+
"Note: relay_data, repayment_chain_id, and repayment_address are optional parameters, but their presence must be",
|
|
2376
|
+
"consistent. If None for these is passed, the caller must load them via the instruction_params account."
|
|
2377
2377
|
];
|
|
2378
2378
|
"discriminator": [
|
|
2379
2379
|
100,
|
|
@@ -4618,6 +4618,11 @@ export type SvmSpoke = {
|
|
|
4618
4618
|
"code": 6017;
|
|
4619
4619
|
"name": "invalidDelegatePda";
|
|
4620
4620
|
"msg": "Invalid delegate PDA!";
|
|
4621
|
+
},
|
|
4622
|
+
{
|
|
4623
|
+
"code": 6018;
|
|
4624
|
+
"name": "inconsistentOptionalParameters";
|
|
4625
|
+
"msg": "Inconsistent optional parameters!";
|
|
4621
4626
|
}
|
|
4622
4627
|
];
|
|
4623
4628
|
"types": [
|
|
@@ -42,7 +42,9 @@ export declare const SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = 6015;
|
|
|
42
42
|
export declare const SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = 6016;
|
|
43
43
|
/** InvalidDelegatePda: Invalid delegate PDA! */
|
|
44
44
|
export declare const SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = 6017;
|
|
45
|
-
|
|
45
|
+
/** InconsistentOptionalParameters: Inconsistent optional parameters! */
|
|
46
|
+
export declare const SVM_SPOKE_ERROR__INCONSISTENT_OPTIONAL_PARAMETERS = 6018;
|
|
47
|
+
export type SvmSpokeError = typeof SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME | typeof SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED | typeof SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT | typeof SVM_SPOKE_ERROR__INCONSISTENT_OPTIONAL_PARAMETERS | typeof SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS | typeof SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER | typeof SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA | typeof SVM_SPOKE_ERROR__INVALID_MINT | typeof SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED | typeof SVM_SPOKE_ERROR__INVALID_REFUND | typeof SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT | typeof SVM_SPOKE_ERROR__INVALID_RELAY_HASH | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN | typeof SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER | typeof SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM | typeof SVM_SPOKE_ERROR__NOT_OWNER | typeof SVM_SPOKE_ERROR__NOT_RELAYER | typeof SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW | typeof SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM;
|
|
46
48
|
export declare function getSvmSpokeErrorMessage(code: SvmSpokeError): string;
|
|
47
49
|
export declare function isSvmSpokeError<TProgramErrorCode extends SvmSpokeError>(error: unknown, transactionMessage: {
|
|
48
50
|
instructions: Record<number, {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @see https://github.com/codama-idl/codama
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__INVALID_REFUND = exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT = exports.SVM_SPOKE_ERROR__INVALID_MINT = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = exports.SVM_SPOKE_ERROR__NOT_RELAYER = exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = exports.SVM_SPOKE_ERROR__INVALID_RELAY_HASH = exports.SVM_SPOKE_ERROR__NOT_OWNER = void 0;
|
|
10
|
+
exports.SVM_SPOKE_ERROR__INCONSISTENT_OPTIONAL_PARAMETERS = exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = exports.SVM_SPOKE_ERROR__INVALID_REFUND_TOKEN_ACCOUNT = exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER = exports.SVM_SPOKE_ERROR__NON_ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__ZERO_REFUND_CLAIM = exports.SVM_SPOKE_ERROR__INVALID_REFUND = exports.SVM_SPOKE_ERROR__PARAMS_WRITE_OVERFLOW = exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT = exports.SVM_SPOKE_ERROR__INVALID_MINT = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_SENDER = exports.SVM_SPOKE_ERROR__INVALID_REMOTE_DOMAIN = exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME = exports.SVM_SPOKE_ERROR__NOT_RELAYER = exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED = exports.SVM_SPOKE_ERROR__INVALID_RELAY_HASH = exports.SVM_SPOKE_ERROR__NOT_OWNER = void 0;
|
|
11
11
|
exports.getSvmSpokeErrorMessage = getSvmSpokeErrorMessage;
|
|
12
12
|
exports.isSvmSpokeError = isSvmSpokeError;
|
|
13
13
|
const kit_1 = require("@solana/kit");
|
|
@@ -48,12 +48,15 @@ exports.SVM_SPOKE_ERROR__INVALID_PRODUCTION_SEED = 0x177f; // 6015
|
|
|
48
48
|
exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS = 0x1780; // 6016
|
|
49
49
|
/** InvalidDelegatePda: Invalid delegate PDA! */
|
|
50
50
|
exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA = 0x1781; // 6017
|
|
51
|
+
/** InconsistentOptionalParameters: Inconsistent optional parameters! */
|
|
52
|
+
exports.SVM_SPOKE_ERROR__INCONSISTENT_OPTIONAL_PARAMETERS = 0x1782; // 6018
|
|
51
53
|
let svmSpokeErrorMessages;
|
|
52
54
|
if (process.env.NODE_ENV !== 'production') {
|
|
53
55
|
svmSpokeErrorMessages = {
|
|
54
56
|
[exports.SVM_SPOKE_ERROR__CANNOT_SET_CURRENT_TIME]: `Cannot set time if not in test mode!`,
|
|
55
57
|
[exports.SVM_SPOKE_ERROR__CAN_ONLY_CLOSE_FILL_STATUS_PDA_IF_FILL_DEADLINE_PASSED]: `The fill deadline has not passed!`,
|
|
56
58
|
[exports.SVM_SPOKE_ERROR__EXCEEDED_PENDING_BRIDGE_AMOUNT]: `Exceeded pending bridge amount to HubPool!`,
|
|
59
|
+
[exports.SVM_SPOKE_ERROR__INCONSISTENT_OPTIONAL_PARAMETERS]: `Inconsistent optional parameters!`,
|
|
57
60
|
[exports.SVM_SPOKE_ERROR__INVALID_A_T_A_CREATION_ACCOUNTS]: `Invalid remaining accounts for ATA creation!`,
|
|
58
61
|
[exports.SVM_SPOKE_ERROR__INVALID_CLAIM_INITIALIZER]: `Invalid claim initializer!`,
|
|
59
62
|
[exports.SVM_SPOKE_ERROR__INVALID_DELEGATE_PDA]: `Invalid delegate PDA!`,
|
package/dist/src/types/svm.d.ts
CHANGED
|
@@ -120,3 +120,47 @@ export interface EventType {
|
|
|
120
120
|
* Supported Networks
|
|
121
121
|
*/
|
|
122
122
|
export type SupportedNetworks = "mainnet" | "devnet";
|
|
123
|
+
/**
|
|
124
|
+
* Fill instruction accounts
|
|
125
|
+
*/
|
|
126
|
+
export type FillAccounts = {
|
|
127
|
+
signer: PublicKey;
|
|
128
|
+
instructionParams: PublicKey;
|
|
129
|
+
state: PublicKey;
|
|
130
|
+
delegate: PublicKey;
|
|
131
|
+
mint: PublicKey;
|
|
132
|
+
relayerTokenAccount: PublicKey;
|
|
133
|
+
recipientTokenAccount: PublicKey;
|
|
134
|
+
fillStatus: PublicKey;
|
|
135
|
+
tokenProgram: PublicKey;
|
|
136
|
+
associatedTokenProgram: PublicKey;
|
|
137
|
+
systemProgram: PublicKey;
|
|
138
|
+
program: PublicKey;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Request Slow Fill Accounts
|
|
142
|
+
*/
|
|
143
|
+
export type RequestSlowFillAccounts = {
|
|
144
|
+
signer: PublicKey;
|
|
145
|
+
instructionParams: PublicKey;
|
|
146
|
+
state: PublicKey;
|
|
147
|
+
fillStatus: PublicKey;
|
|
148
|
+
systemProgram: PublicKey;
|
|
149
|
+
program: PublicKey;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Execute Slow Relay Leaf Accounts
|
|
153
|
+
*/
|
|
154
|
+
export type ExecuteSlowRelayLeafAccounts = {
|
|
155
|
+
signer: PublicKey;
|
|
156
|
+
instructionParams: PublicKey;
|
|
157
|
+
state: PublicKey;
|
|
158
|
+
rootBundle: PublicKey;
|
|
159
|
+
fillStatus: PublicKey;
|
|
160
|
+
mint: PublicKey;
|
|
161
|
+
recipientTokenAccount: PublicKey;
|
|
162
|
+
vault: PublicKey;
|
|
163
|
+
tokenProgram: PublicKey;
|
|
164
|
+
systemProgram: PublicKey;
|
|
165
|
+
program: PublicKey;
|
|
166
|
+
};
|
|
@@ -1988,8 +1988,8 @@ export type SvmSpoke = {
|
|
|
1988
1988
|
"this will be set higher to reimburse the recipient for waiting for the slow fill.",
|
|
1989
1989
|
"- _root_bundle_id: Unique ID of root bundle containing slow relay root that this leaf is contained in.",
|
|
1990
1990
|
"- proof: Inclusion proof for this leaf in slow relay root in root bundle.",
|
|
1991
|
-
"Note: slow_fill_leaf, _root_bundle_id, and proof are optional parameters
|
|
1992
|
-
"the caller must load them via the instruction_params account.",
|
|
1991
|
+
"Note: slow_fill_leaf, _root_bundle_id, and proof are optional parameters, but their presence must be consistent.",
|
|
1992
|
+
"If None for these parameters is passed, the caller must load them via the instruction_params account.",
|
|
1993
1993
|
"Note: When verifying the slow fill leaf, the relay data is hashed using AnchorSerialize::serialize that encodes",
|
|
1994
1994
|
"output token amounts to little-endian format while input token amount preserves its big-endian encoding as it",
|
|
1995
1995
|
"is passed as [u8; 32] array."
|
|
@@ -2372,8 +2372,8 @@ export type SvmSpoke = {
|
|
|
2372
2372
|
"- repayment_chain_id: Chain of SpokePool where relayer wants to be refunded after the challenge window has",
|
|
2373
2373
|
"passed. Will receive input_amount of the equivalent token to input_token on the repayment chain.",
|
|
2374
2374
|
"- repayment_address: The address of the recipient on the repayment chain that they want to be refunded to.",
|
|
2375
|
-
"Note: relay_data, repayment_chain_id, and repayment_address are optional parameters
|
|
2376
|
-
"is passed, the caller must load them via the instruction_params account."
|
|
2375
|
+
"Note: relay_data, repayment_chain_id, and repayment_address are optional parameters, but their presence must be",
|
|
2376
|
+
"consistent. If None for these is passed, the caller must load them via the instruction_params account."
|
|
2377
2377
|
];
|
|
2378
2378
|
"discriminator": [
|
|
2379
2379
|
100,
|
|
@@ -4618,6 +4618,11 @@ export type SvmSpoke = {
|
|
|
4618
4618
|
"code": 6017;
|
|
4619
4619
|
"name": "invalidDelegatePda";
|
|
4620
4620
|
"msg": "Invalid delegate PDA!";
|
|
4621
|
+
},
|
|
4622
|
+
{
|
|
4623
|
+
"code": 6018;
|
|
4624
|
+
"name": "inconsistentOptionalParameters";
|
|
4625
|
+
"msg": "Inconsistent optional parameters!";
|
|
4621
4626
|
}
|
|
4622
4627
|
];
|
|
4623
4628
|
"types": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@across-protocol/contracts",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.27",
|
|
4
4
|
"author": "UMA Team",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -17,9 +17,12 @@
|
|
|
17
17
|
"types": "dist/index.d.ts",
|
|
18
18
|
"main": "dist/index.js",
|
|
19
19
|
"scripts": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"forge-
|
|
20
|
+
"check-foundry-zksync": "forge --version | grep -q foundry-zksync-v0.1.9 || (echo 'zksync builds require foundry-zksync v0.1.9 (current: '\"$(forge --version | head -1)\"'). Install: https://foundry-book.zksync.io/getting-started/installation' && exit 1)",
|
|
21
|
+
"preforge-script-zksync": "yarn -s check-foundry-zksync",
|
|
22
|
+
"forge-script-zksync": " FOUNDRY_PROFILE=zksync forge script --zksync --skip test --skip '**/contracts/test/**' --suppress-errors sendtransfer",
|
|
23
|
+
"preforge-build-zksync": "yarn -s check-foundry-zksync",
|
|
24
|
+
"forge-build-zksync": "FOUNDRY_PROFILE=zksync forge build --zksync --suppress-errors sendtransfer --skip test --skip script --skip '**/contracts/test/**'",
|
|
25
|
+
"forge-verify-zksync": "FOUNDRY_PROFILE=zksync forge verify-contract --zksync",
|
|
23
26
|
"lint": "yarn lint-solidity && yarn lint-js && yarn lint-rust",
|
|
24
27
|
"lint-solidity": "yarn solhint ./contracts/**/*.sol",
|
|
25
28
|
"lint-js": "yarn prettier --list-different **/*.js **/*.ts",
|
|
@@ -39,6 +42,7 @@
|
|
|
39
42
|
"prepublishOnly": "yarn build-ts && yarn export-idl && yarn export-evm-artifacts",
|
|
40
43
|
"build": "yarn build-evm-foundry && yarn build-svm && yarn generate-svm-artifacts && yarn build-ts",
|
|
41
44
|
"build-verified": "yarn build-evm-foundry && yarn build-svm-solana-verify && yarn generate-svm-artifacts && yarn build-ts",
|
|
45
|
+
"pin-foundry": "sh scripts/foundry-version.sh pin",
|
|
42
46
|
"build-evm-foundry": "forge build",
|
|
43
47
|
"test-evm": "yarn test-evm-foundry",
|
|
44
48
|
"test-evm-foundry": "FOUNDRY_PROFILE=local-test forge test",
|
|
@@ -56,6 +60,9 @@
|
|
|
56
60
|
"tron-deploy-sp1-auto-verifier": "ts-node script/tron/universal/tron-deploy-sp1-auto-verifier.ts",
|
|
57
61
|
"tron-deploy-sp1-helios": "ts-node script/tron/universal/tron-deploy-sp1-helios.ts",
|
|
58
62
|
"tron-deploy-universal-spokepool": "ts-node script/tron/universal/tron-deploy-universal-spokepool.ts",
|
|
63
|
+
"tron-deploy-counterfactual-beacon-impl": "ts-node script/tron/counterfactual/tron-deploy-counterfactual-beacon-impl.ts",
|
|
64
|
+
"tron-deploy-counterfactual-beacon": "ts-node script/tron/counterfactual/tron-deploy-counterfactual-beacon.ts",
|
|
65
|
+
"tron-upgrade-counterfactual-beacon": "ts-node script/tron/counterfactual/tron-upgrade-counterfactual-beacon.ts",
|
|
59
66
|
"tron-deploy-counterfactual-factory": "ts-node script/tron/counterfactual/tron-deploy-counterfactual-factory.ts",
|
|
60
67
|
"tron-deploy-counterfactual-deposit": "ts-node script/tron/counterfactual/tron-deploy-counterfactual-deposit.ts",
|
|
61
68
|
"tron-deploy-counterfactual-deposit-spokepool-tron": "ts-node script/tron/counterfactual/tron-deploy-counterfactual-deposit-spokepool-tron.ts",
|
|
@@ -69,7 +76,7 @@
|
|
|
69
76
|
"tron-deploy-swap-proxy": "ts-node script/tron/periphery/tron-deploy-swap-proxy.ts"
|
|
70
77
|
},
|
|
71
78
|
"dependencies": {
|
|
72
|
-
"@across-protocol/constants": "^3.1.
|
|
79
|
+
"@across-protocol/constants": "^3.1.124",
|
|
73
80
|
"@coral-xyz/anchor": "^0.31.1",
|
|
74
81
|
"@eth-optimism/contracts": "^0.5.40",
|
|
75
82
|
"@ethersproject/bignumber": "5.7.0",
|
|
@@ -79,7 +86,6 @@
|
|
|
79
86
|
"@openzeppelin/contracts-upgradeable": "5.5.0",
|
|
80
87
|
"@openzeppelin/contracts-upgradeable-v4": "npm:@openzeppelin/contracts-upgradeable@4.9.6",
|
|
81
88
|
"@openzeppelin/contracts-v4": "npm:@openzeppelin/contracts@4.9.6",
|
|
82
|
-
"@scroll-tech/contracts": "^0.1.0",
|
|
83
89
|
"@solana-program/address-lookup-table": "0.10.0",
|
|
84
90
|
"@solana/kit": "^5.4.0",
|
|
85
91
|
"@solana/web3.js": "1.98.2",
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
-
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
import "./interfaces/AdapterInterface.sol";
|
|
5
|
-
import "../external/interfaces/WETH9Interface.sol";
|
|
6
|
-
|
|
7
|
-
// @dev Use local modified CrossDomainEnabled contract instead of one exported by eth-optimism because we need
|
|
8
|
-
// this contract's state variables to be `immutable` because of the delegateCall call.
|
|
9
|
-
import "./CrossDomainEnabled.sol";
|
|
10
|
-
import { IL1StandardBridge } from "@eth-optimism/contracts/L1/messaging/IL1StandardBridge.sol";
|
|
11
|
-
|
|
12
|
-
import "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol";
|
|
13
|
-
import "@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol";
|
|
14
|
-
|
|
15
|
-
import "../libraries/CircleCCTPAdapter.sol";
|
|
16
|
-
import "../external/interfaces/CCTPInterfaces.sol";
|
|
17
|
-
|
|
18
|
-
interface IL1ERC20Bridge {
|
|
19
|
-
/// @notice Sends ERC20 tokens to a receiver's address on the other chain. Note that if the
|
|
20
|
-
/// ERC20 token on the other chain does not recognize the local token as the correct
|
|
21
|
-
/// pair token, the ERC20 bridge will fail and the tokens will be returned to sender on
|
|
22
|
-
/// this chain.
|
|
23
|
-
/// @param _localToken Address of the ERC20 on this chain.
|
|
24
|
-
/// @param _remoteToken Address of the corresponding token on the remote chain.
|
|
25
|
-
/// @param _to Address of the receiver.
|
|
26
|
-
/// @param _amount Amount of local tokens to deposit.
|
|
27
|
-
/// @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.
|
|
28
|
-
/// @param _extraData Extra data to be sent with the transaction. Note that the recipient will
|
|
29
|
-
/// not be triggered with this data, but it will be emitted and can be used
|
|
30
|
-
/// to identify the transaction.
|
|
31
|
-
function bridgeERC20To(
|
|
32
|
-
address _localToken,
|
|
33
|
-
address _remoteToken,
|
|
34
|
-
address _to,
|
|
35
|
-
uint256 _amount,
|
|
36
|
-
uint32 _minGasLimit,
|
|
37
|
-
bytes calldata _extraData
|
|
38
|
-
) external;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @notice Contract containing logic to send messages from L1 to Blast. This is a modified version of the Optimism adapter
|
|
43
|
-
* that excludes the custom bridging logic. It differs from the Base Adapter in that it uses a special
|
|
44
|
-
* Blast contract to bridge WETH and DAI, which are yielding rebasing tokens on L2, WETH and USDB.
|
|
45
|
-
* @custom:security-contact bugs@across.to
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
// solhint-disable-next-line contract-name-camelcase
|
|
49
|
-
contract Blast_Adapter is CrossDomainEnabled, AdapterInterface, CircleCCTPAdapter {
|
|
50
|
-
using SafeERC20 for IERC20;
|
|
51
|
-
uint32 public immutable L2_GAS_LIMIT; // 200,000 is a reasonable default.
|
|
52
|
-
|
|
53
|
-
WETH9Interface public immutable L1_WETH;
|
|
54
|
-
|
|
55
|
-
IL1StandardBridge public immutable L1_STANDARD_BRIDGE; // 0x697402166Fbf2F22E970df8a6486Ef171dbfc524
|
|
56
|
-
|
|
57
|
-
// Bridge used to get yielding version of ERC20's on L2.
|
|
58
|
-
IL1ERC20Bridge public immutable L1_BLAST_BRIDGE; // 0x3a05E5d33d7Ab3864D53aaEc93c8301C1Fa49115 on mainnet.
|
|
59
|
-
address public immutable L1_DAI; // 0x6B175474E89094C44Da98b954EedeAC495271d0F on mainnet.
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @notice Constructs new Adapter.
|
|
63
|
-
* @param _l1Weth WETH address on L1.
|
|
64
|
-
* @param _crossDomainMessenger XDomainMessenger Blast system contract.
|
|
65
|
-
* @param _l1StandardBridge Standard bridge contract.
|
|
66
|
-
* @param _l1Usdc USDC address on L1.
|
|
67
|
-
*/
|
|
68
|
-
constructor(
|
|
69
|
-
WETH9Interface _l1Weth,
|
|
70
|
-
address _crossDomainMessenger,
|
|
71
|
-
IL1StandardBridge _l1StandardBridge,
|
|
72
|
-
IERC20 _l1Usdc,
|
|
73
|
-
IL1ERC20Bridge l1BlastBridge,
|
|
74
|
-
address l1Dai,
|
|
75
|
-
uint32 l2GasLimit
|
|
76
|
-
)
|
|
77
|
-
CrossDomainEnabled(_crossDomainMessenger)
|
|
78
|
-
// Hardcode cctp messenger to 0x0 to disable CCTP bridging.
|
|
79
|
-
CircleCCTPAdapter(_l1Usdc, ITokenMessenger(address(0)), CircleDomainIds.UNINITIALIZED)
|
|
80
|
-
{
|
|
81
|
-
L1_WETH = _l1Weth;
|
|
82
|
-
L1_STANDARD_BRIDGE = _l1StandardBridge;
|
|
83
|
-
L1_BLAST_BRIDGE = l1BlastBridge;
|
|
84
|
-
L1_DAI = l1Dai;
|
|
85
|
-
L2_GAS_LIMIT = l2GasLimit;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* @notice Send cross-chain message to target on Blast.
|
|
90
|
-
* @param target Contract on Blast that will receive message.
|
|
91
|
-
* @param message Data to send to target.
|
|
92
|
-
*/
|
|
93
|
-
function relayMessage(address target, bytes calldata message) external payable override {
|
|
94
|
-
sendCrossDomainMessage(target, L2_GAS_LIMIT, message);
|
|
95
|
-
emit MessageRelayed(target, message);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @notice Bridge tokens to Blast.
|
|
100
|
-
* @param l1Token L1 token to deposit.
|
|
101
|
-
* @param l2Token L2 token to receive.
|
|
102
|
-
* @param amount Amount of L1 tokens to deposit and L2 tokens to receive.
|
|
103
|
-
* @param to Bridge recipient.
|
|
104
|
-
*/
|
|
105
|
-
function relayTokens(address l1Token, address l2Token, uint256 amount, address to) external payable override {
|
|
106
|
-
// If token can be bridged into yield-ing version of ERC20 on L2 side, then use Blast Bridge, otherwise
|
|
107
|
-
// use standard bridge.
|
|
108
|
-
|
|
109
|
-
// If the l1Token is weth then unwrap it to ETH then send the ETH to the standard bridge.
|
|
110
|
-
if (l1Token == address(L1_WETH)) {
|
|
111
|
-
L1_WETH.withdraw(amount);
|
|
112
|
-
// @dev: we can use the standard or the blast bridge to deposit ETH here:
|
|
113
|
-
L1_STANDARD_BRIDGE.depositETHTo{ value: amount }(to, L2_GAS_LIMIT, "");
|
|
114
|
-
}
|
|
115
|
-
// Check if this token is DAI, then use the L1 Blast Bridge
|
|
116
|
-
else if (l1Token == L1_DAI) {
|
|
117
|
-
IERC20(l1Token).safeIncreaseAllowance(address(L1_BLAST_BRIDGE), amount);
|
|
118
|
-
L1_BLAST_BRIDGE.bridgeERC20To(l1Token, l2Token, to, amount, L2_GAS_LIMIT, "");
|
|
119
|
-
} else {
|
|
120
|
-
IL1StandardBridge _l1StandardBridge = L1_STANDARD_BRIDGE;
|
|
121
|
-
|
|
122
|
-
IERC20(l1Token).safeIncreaseAllowance(address(_l1StandardBridge), amount);
|
|
123
|
-
_l1StandardBridge.depositERC20To(l1Token, l2Token, to, amount, L2_GAS_LIMIT, "");
|
|
124
|
-
}
|
|
125
|
-
emit TokensRelayed(l1Token, l2Token, amount, to);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
-
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
import "./interfaces/AdapterInterface.sol";
|
|
5
|
-
import { USDYieldManager } from "../hub-pool/Blast_DaiRetriever.sol";
|
|
6
|
-
|
|
7
|
-
import "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol";
|
|
8
|
-
import "@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @notice This adapter is built to retrieve Blast USDB from the USDBYieldManager contract on Ethereum that was
|
|
12
|
-
* sent to the HubPool as the `recipient`. These funds should ideally be sent to the BlastRetriever address on
|
|
13
|
-
* Ethereum. This contract can be used to retrieve these funds.
|
|
14
|
-
*/
|
|
15
|
-
// solhint-disable-next-line contract-name-camelcase
|
|
16
|
-
contract Blast_RescueAdapter is AdapterInterface {
|
|
17
|
-
using SafeERC20 for IERC20;
|
|
18
|
-
|
|
19
|
-
address public immutable rescueAddress;
|
|
20
|
-
|
|
21
|
-
USDYieldManager public immutable usdYieldManager;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @notice Constructs new Adapter.
|
|
25
|
-
* @param _rescueAddress Rescue address to send funds to.
|
|
26
|
-
*/
|
|
27
|
-
constructor(address _rescueAddress, USDYieldManager _usdYieldManager) {
|
|
28
|
-
rescueAddress = _rescueAddress;
|
|
29
|
-
usdYieldManager = _usdYieldManager;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @notice Rescues the tokens from the calling contract.
|
|
34
|
-
* @param message The encoded address of the ERC20 to send to the rescue address.
|
|
35
|
-
*/
|
|
36
|
-
function relayMessage(address, bytes memory message) external payable override {
|
|
37
|
-
(uint256 requestId, uint256 hintId) = abi.decode(message, (uint256, uint256));
|
|
38
|
-
require(usdYieldManager.claimWithdrawal(requestId, hintId), "claim failed");
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @notice Should never be called.
|
|
43
|
-
*/
|
|
44
|
-
function relayTokens(address, address, uint256, address) external payable override {
|
|
45
|
-
revert("relayTokens disabled");
|
|
46
|
-
}
|
|
47
|
-
}
|