Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 4538 wormhole connector #4623

Merged
merged 39 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
d951be5
feat: wormhole connector draft
liu-zhipeng Jun 28, 2023
1be9c5e
chore: contract build
liu-zhipeng Jun 28, 2023
9216f57
fix: wormhole connector deploy script
liu-zhipeng Jun 29, 2023
dc65666
chore: rebuild contracts
liu-zhipeng Jun 29, 2023
51cda18
fix: deploy wormhole connectors
liu-zhipeng Jun 29, 2023
f537a54
fix: wormhole base connector
liu-zhipeng Jun 29, 2023
5f7a977
doc: add comments
liu-zhipeng Jun 30, 2023
0ea4b80
test: forge tests for wormhole connectors
liu-zhipeng Jun 30, 2023
69ce4d6
fix: build
LayneHaber Jul 1, 2023
b3f1b12
chore: rebuild
LayneHaber Jul 1, 2023
d439161
refactor: rename the mirror chain variable
LayneHaber Jul 1, 2023
fa29ab8
fix: don't store amb twice
LayneHaber Jul 1, 2023
e6d242a
fix: minor review updates
LayneHaber Jul 1, 2023
4d63a2d
feat: add configurable refund address for fees
LayneHaber Jul 1, 2023
7c9510f
feat: use owner as the first relayer
LayneHaber Jul 1, 2023
ea8deeb
fix: forge tests for wormhole spoke connector
liu-zhipeng Jul 2, 2023
50ef681
fix: update IWormholeReceiver interface
liu-zhipeng Jul 6, 2023
8bbd58f
fix: capping gasLimit in the `quoteEvmDeliveryPrice`
liu-zhipeng Jul 6, 2023
ec9d93a
fix: renounceOwnership logic
liu-zhipeng Jul 6, 2023
396a0a8
Merge pull request #4650 from connext/macro-wormhole-q3
LayneHaber Jul 7, 2023
26591a4
Merge pull request #4648 from connext/macro-wormhole-q1
LayneHaber Jul 7, 2023
f447982
Merge pull request #4649 from connext/macro-wormhole-q2
LayneHaber Jul 7, 2023
0240f48
feat: 4545 offchainlighthouse subtasks for bnb amb (#4659)
liu-zhipeng Jul 7, 2023
f941684
feat: wormhole connector deployed
liu-zhipeng Jul 7, 2023
02288d0
Merge branch 'main' into 4538-wormhole-connector
liu-zhipeng Jul 7, 2023
73a3edf
feat: 4544 wormhole connector subgraph (#4661)
sanchaymittal Jul 7, 2023
f7a751b
fix: return init script messaging functionality
LayneHaber Jul 7, 2023
5dd193c
chore: fresh install
LayneHaber Jul 7, 2023
111383e
feat: per-chain configurable relayer fee vault
LayneHaber Jul 7, 2023
68d0ddc
feat: respect names configured if properly prefixed
LayneHaber Jul 7, 2023
6490421
refactor: only fork creation logic not execution upgrade in base
LayneHaber Jul 8, 2023
c38f077
feat: add ability to create forks from env vars
LayneHaber Jul 8, 2023
a7739fe
chore: rename helper lib to RpcLookup
LayneHaber Jul 8, 2023
a92e1ac
feat: add deployment lookup contract helper
LayneHaber Jul 8, 2023
ba9337c
feat: wormhole connectors upgrading on fork
LayneHaber Jul 8, 2023
1433659
feat: add replay test for old transfers
LayneHaber Jul 8, 2023
cf08b6f
fix: remove unused transfer examples
LayneHaber Jul 10, 2023
c6d6ca6
Merge pull request #4668 from connext/init-script-fixes
LayneHaber Jul 10, 2023
a3c11ab
Merge pull request #4671 from connext/4641-bnb-fork-tests
LayneHaber Jul 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
"error ProposedOwnable__onlyOwner_notOwner()",
"error ProposedOwnable__onlyProposed_notProposedOwner()",
"error ProposedOwnable__ownershipDelayElapsed_delayNotElapsed()",
"error ProposedOwnable__proposeNewOwner_invalidProposal()",
"error ProposedOwnable__proposeNewOwner_noOwnershipChange()",
"error ProposedOwnable__renounceOwnership_invalidProposal()",
"error ProposedOwnable__renounceOwnership_noProposal()",
"event GasCapUpdated(uint256 _previous, uint256 _updated)",
"event OwnershipProposed(address indexed proposedOwner)",
"event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
"function MIRROR_CHAIN_ID() view returns (uint16)",
"function acceptProposedOwner()",
"function delay() view returns (uint256)",
"function owner() view returns (address)",
"function processedWhMessages(bytes32) view returns (bool)",
"function proposeNewOwner(address newlyProposed)",
"function proposed() view returns (address)",
"function proposedTimestamp() view returns (uint256)",
"function receiveWormholeMessages(bytes payload, bytes[] additionalVaas, bytes32 sourceAddress, uint16 sourceChain, bytes32 deliveryHash) payable",
"function renounceOwnership()",
"function renounced() view returns (bool)",
"function setGasCap(uint256 _gasCap)"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[
"constructor(uint32 _domain, uint32 _mirrorDomain, address _amb, address _rootManager, address _mirrorConnector, uint256 _gasCap, uint16 _mirrorChainId)",
"error Connector__processMessage_notUsed()",
"error ProposedOwnable__onlyOwner_notOwner()",
"error ProposedOwnable__onlyProposed_notProposedOwner()",
"error ProposedOwnable__ownershipDelayElapsed_delayNotElapsed()",
"error ProposedOwnable__proposeNewOwner_invalidProposal()",
"error ProposedOwnable__proposeNewOwner_noOwnershipChange()",
"error ProposedOwnable__renounceOwnership_invalidProposal()",
"error ProposedOwnable__renounceOwnership_noProposal()",
"event GasCapUpdated(uint256 _previous, uint256 _updated)",
"event MessageProcessed(bytes data, address caller)",
"event MessageSent(bytes data, bytes encodedData, address caller)",
"event MirrorConnectorUpdated(address previous, address current)",
"event NewConnector(uint32 indexed domain, uint32 indexed mirrorDomain, address amb, address rootManager, address mirrorConnector)",
"event OwnershipProposed(address indexed proposedOwner)",
"event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
"function AMB() view returns (address)",
"function DOMAIN() view returns (uint32)",
"function MIRROR_CHAIN_ID() view returns (uint16)",
"function MIRROR_DOMAIN() view returns (uint32)",
"function ROOT_MANAGER() view returns (address)",
"function acceptProposedOwner()",
"function delay() view returns (uint256)",
"function mirrorConnector() view returns (address)",
"function owner() view returns (address)",
"function processMessage(bytes _data)",
"function processedWhMessages(bytes32) view returns (bool)",
"function proposeNewOwner(address newlyProposed)",
"function proposed() view returns (address)",
"function proposedTimestamp() view returns (uint256)",
"function receiveWormholeMessages(bytes payload, bytes[] additionalVaas, bytes32 sourceAddress, uint16 sourceChain, bytes32 deliveryHash) payable",
"function renounceOwnership()",
"function renounced() view returns (bool)",
"function sendMessage(bytes _data, bytes _encodedData) payable",
"function setGasCap(uint256 _gasCap)",
"function setMirrorConnector(address _mirrorConnector)",
"function verifySender(address _expected) returns (bool)"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
[
"constructor(uint32 _domain, uint32 _mirrorDomain, address _amb, address _rootManager, address _mirrorConnector, uint256 _processGas, uint256 _reserveGas, uint256 _delayBlocks, address _merkle, address _watcherManager, uint256 _gasCap, uint16 _mirrorChainId)",
"error Connector__processMessage_notUsed()",
"error ProposedOwnable__onlyOwner_notOwner()",
"error ProposedOwnable__onlyProposed_notProposedOwner()",
"error ProposedOwnable__ownershipDelayElapsed_delayNotElapsed()",
"error ProposedOwnable__proposeNewOwner_invalidProposal()",
"error ProposedOwnable__proposeNewOwner_noOwnershipChange()",
"error ProposedOwnable__renounceOwnership_invalidProposal()",
"error ProposedOwnable__renounceOwnership_noProposal()",
"error RateLimited__rateLimited_messageSendRateExceeded()",
"error TypedMemView__index_indexMoreThan32Bytes()",
"error TypedMemView__index_overrun(uint256 loc, uint256 len, uint256 index, uint256 slice)",
"error TypedMemView__unsafeCopyTo_identityOOG()",
"error TypedMemView__unsafeCopyTo_invalidPointer()",
"error TypedMemView__unsafeCopyTo_nullPointer()",
"event AggregateRootReceived(bytes32 root)",
"event AggregateRootRemoved(bytes32 root)",
"event AggregateRootVerified(bytes32 indexed root)",
"event DelayBlocksUpdated(uint256 indexed updated, address caller)",
"event Dispatch(bytes32 leaf, uint256 index, bytes32 root, bytes message)",
"event FundsWithdrawn(address indexed to, uint256 amount)",
"event GasCapUpdated(uint256 _previous, uint256 _updated)",
"event MessageProcessed(bytes data, address caller)",
"event MessageProven(bytes32 indexed leaf, bytes32 indexed aggregateRoot, uint256 aggregateIndex)",
"event MessageSent(bytes data, bytes encodedData, address caller)",
"event MirrorConnectorUpdated(address previous, address current)",
"event NewConnector(uint32 indexed domain, uint32 indexed mirrorDomain, address amb, address rootManager, address mirrorConnector)",
"event OwnershipProposed(address indexed proposedOwner)",
"event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)",
"event Paused(address account)",
"event Process(bytes32 leaf, bool success, bytes returnData)",
"event SendRateLimitUpdated(address updater, uint256 newRateLimit)",
"event SenderAdded(address sender)",
"event SenderRemoved(address sender)",
"event Unpaused(address account)",
"event WatcherManagerChanged(address watcherManager)",
"function AMB() view returns (address)",
"function DOMAIN() view returns (uint32)",
"function MERKLE() view returns (address)",
"function MIRROR_CHAIN_ID() view returns (uint16)",
"function MIRROR_DOMAIN() view returns (uint32)",
"function PROCESS_GAS() view returns (uint256)",
"function RESERVE_GAS() view returns (uint256)",
"function ROOT_MANAGER() view returns (address)",
"function acceptProposedOwner()",
"function addSender(address _sender)",
"function allowlistedSenders(address) view returns (bool)",
"function delay() view returns (uint256)",
"function delayBlocks() view returns (uint256)",
"function dispatch(uint32 _destinationDomain, bytes32 _recipientAddress, bytes _messageBody) returns (bytes32, bytes)",
"function home() view returns (address)",
"function isReplica(address _potentialReplica) view returns (bool)",
"function lastSentBlock() view returns (uint256)",
"function localDomain() view returns (uint32)",
"function messages(bytes32) view returns (uint8)",
"function mirrorConnector() view returns (address)",
"function nonces(uint32) view returns (uint32)",
"function outboundRoot() view returns (bytes32)",
"function owner() view returns (address)",
"function pause()",
"function paused() view returns (bool)",
"function pendingAggregateRoots(bytes32) view returns (uint256)",
"function processMessage(bytes _data)",
"function processedWhMessages(bytes32) view returns (bool)",
"function proposeNewOwner(address newlyProposed)",
"function proposed() view returns (address)",
"function proposedTimestamp() view returns (uint256)",
"function proveAndProcess(tuple(bytes message, bytes32[32] path, uint256 index)[] _proofs, bytes32 _aggregateRoot, bytes32[32] _aggregatePath, uint256 _aggregateIndex)",
"function provenAggregateRoots(bytes32) view returns (bool)",
"function provenMessageRoots(bytes32) view returns (bool)",
"function rateLimitBlocks() view returns (uint256)",
"function receiveWormholeMessages(bytes payload, bytes[] additionalVaas, bytes32 sourceAddress, uint16 sourceChain, bytes32 deliveryHash) payable",
"function removePendingAggregateRoot(bytes32 _fraudulentRoot)",
"function removeSender(address _sender)",
"function renounceOwnership()",
"function renounced() view returns (bool)",
"function send(bytes _encodedData) payable",
"function sentMessageRoots(bytes32) view returns (bool)",
"function setDelayBlocks(uint256 _delayBlocks)",
"function setGasCap(uint256 _gasCap)",
"function setMirrorConnector(address _mirrorConnector)",
"function setRateLimitBlocks(uint256 _rateLimit)",
"function setWatcherManager(address _watcherManager)",
"function unpause()",
"function verifySender(address _expected) returns (bool)",
"function watcherManager() view returns (address)",
"function withdrawFunds(address _to)"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
"function receiveWormholeMessages(bytes payload, bytes[] additionalVaas, bytes32 sourceAddress, uint16 sourceChain, bytes32 deliveryHash) payable"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
"event Delivery(address indexed recipientContract, uint16 indexed sourceChain, uint64 indexed sequence, bytes32 deliveryVaaHash, uint8 status, uint256 gasUsed, uint8 refundStatus, bytes additionalStatusInfo, bytes overridesInfo)",
"event SendEvent(uint64 indexed sequence, uint256 deliveryQuote, uint256 paymentForExtraReceiverValue)",
"function deliver(bytes[] encodedVMs, bytes encodedDeliveryVAA, address relayerRefundAddress, bytes deliveryOverrides) payable",
"function forward(uint16 targetChain, bytes32 targetAddress, bytes payload, uint256 receiverValue, uint256 paymentForExtraReceiverValue, bytes encodedExecutionParameters, uint16 refundChain, bytes32 refundAddress, address deliveryProviderAddress, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys, uint8 consistencyLevel) payable",
"function forwardPayloadToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 gasLimit) payable",
"function forwardToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 paymentForExtraReceiverValue, uint256 gasLimit, uint16 refundChain, address refundAddress, address deliveryProviderAddress, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys, uint8 consistencyLevel) payable",
"function forwardVaasToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 gasLimit, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys) payable",
"function getDefaultDeliveryProvider() view returns (address deliveryProvider)",
"function getRegisteredWormholeRelayerContract(uint16 chainId) view returns (bytes32)",
"function quoteDeliveryPrice(uint16 targetChain, uint256 receiverValue, bytes encodedExecutionParameters, address deliveryProviderAddress) view returns (uint256 nativePriceQuote, bytes encodedExecutionInfo)",
"function quoteEVMDeliveryPrice(uint16 targetChain, uint256 receiverValue, uint256 gasLimit, address deliveryProviderAddress) view returns (uint256 nativePriceQuote, uint256 targetChainRefundPerGasUnused)",
"function quoteEVMDeliveryPrice(uint16 targetChain, uint256 receiverValue, uint256 gasLimit) view returns (uint256 nativePriceQuote, uint256 targetChainRefundPerGasUnused)",
"function quoteNativeForChain(uint16 targetChain, uint256 currentChainAmount, address deliveryProviderAddress) view returns (uint256 targetChainAmount)",
"function resend(tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence) deliveryVaaKey, uint16 targetChain, uint256 newReceiverValue, bytes newEncodedExecutionParameters, address newDeliveryProviderAddress) payable returns (uint64 sequence)",
"function resendToEvm(tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence) deliveryVaaKey, uint16 targetChain, uint256 newReceiverValue, uint256 newGasLimit, address newDeliveryProviderAddress) payable returns (uint64 sequence)",
"function send(uint16 targetChain, bytes32 targetAddress, bytes payload, uint256 receiverValue, uint256 paymentForExtraReceiverValue, bytes encodedExecutionParameters, uint16 refundChain, bytes32 refundAddress, address deliveryProviderAddress, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys, uint8 consistencyLevel) payable returns (uint64 sequence)",
"function sendPayloadToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 gasLimit, uint16 refundChain, address refundAddress) payable returns (uint64 sequence)",
"function sendPayloadToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 gasLimit) payable returns (uint64 sequence)",
"function sendToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 paymentForExtraReceiverValue, uint256 gasLimit, uint16 refundChain, address refundAddress, address deliveryProviderAddress, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys, uint8 consistencyLevel) payable returns (uint64 sequence)",
"function sendVaasToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 gasLimit, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys) payable returns (uint64 sequence)",
"function sendVaasToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 gasLimit, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys, uint16 refundChain, address refundAddress) payable returns (uint64 sequence)"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"event SendEvent(uint64 indexed sequence, uint256 deliveryQuote, uint256 paymentForExtraReceiverValue)",
"function getRegisteredWormholeRelayerContract(uint16 chainId) view returns (bytes32)"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
"event Delivery(address indexed recipientContract, uint16 indexed sourceChain, uint64 indexed sequence, bytes32 deliveryVaaHash, uint8 status, uint256 gasUsed, uint8 refundStatus, bytes additionalStatusInfo, bytes overridesInfo)",
"event SendEvent(uint64 indexed sequence, uint256 deliveryQuote, uint256 paymentForExtraReceiverValue)",
"function deliver(bytes[] encodedVMs, bytes encodedDeliveryVAA, address relayerRefundAddress, bytes deliveryOverrides) payable",
"function getRegisteredWormholeRelayerContract(uint16 chainId) view returns (bytes32)"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[
"event SendEvent(uint64 indexed sequence, uint256 deliveryQuote, uint256 paymentForExtraReceiverValue)",
"function forward(uint16 targetChain, bytes32 targetAddress, bytes payload, uint256 receiverValue, uint256 paymentForExtraReceiverValue, bytes encodedExecutionParameters, uint16 refundChain, bytes32 refundAddress, address deliveryProviderAddress, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys, uint8 consistencyLevel) payable",
"function forwardPayloadToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 gasLimit) payable",
"function forwardToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 paymentForExtraReceiverValue, uint256 gasLimit, uint16 refundChain, address refundAddress, address deliveryProviderAddress, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys, uint8 consistencyLevel) payable",
"function forwardVaasToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 gasLimit, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys) payable",
"function getDefaultDeliveryProvider() view returns (address deliveryProvider)",
"function getRegisteredWormholeRelayerContract(uint16 chainId) view returns (bytes32)",
"function quoteDeliveryPrice(uint16 targetChain, uint256 receiverValue, bytes encodedExecutionParameters, address deliveryProviderAddress) view returns (uint256 nativePriceQuote, bytes encodedExecutionInfo)",
"function quoteEVMDeliveryPrice(uint16 targetChain, uint256 receiverValue, uint256 gasLimit, address deliveryProviderAddress) view returns (uint256 nativePriceQuote, uint256 targetChainRefundPerGasUnused)",
"function quoteEVMDeliveryPrice(uint16 targetChain, uint256 receiverValue, uint256 gasLimit) view returns (uint256 nativePriceQuote, uint256 targetChainRefundPerGasUnused)",
"function quoteNativeForChain(uint16 targetChain, uint256 currentChainAmount, address deliveryProviderAddress) view returns (uint256 targetChainAmount)",
"function resend(tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence) deliveryVaaKey, uint16 targetChain, uint256 newReceiverValue, bytes newEncodedExecutionParameters, address newDeliveryProviderAddress) payable returns (uint64 sequence)",
"function resendToEvm(tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence) deliveryVaaKey, uint16 targetChain, uint256 newReceiverValue, uint256 newGasLimit, address newDeliveryProviderAddress) payable returns (uint64 sequence)",
"function send(uint16 targetChain, bytes32 targetAddress, bytes payload, uint256 receiverValue, uint256 paymentForExtraReceiverValue, bytes encodedExecutionParameters, uint16 refundChain, bytes32 refundAddress, address deliveryProviderAddress, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys, uint8 consistencyLevel) payable returns (uint64 sequence)",
"function sendPayloadToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 gasLimit, uint16 refundChain, address refundAddress) payable returns (uint64 sequence)",
"function sendPayloadToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 gasLimit) payable returns (uint64 sequence)",
"function sendToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 paymentForExtraReceiverValue, uint256 gasLimit, uint16 refundChain, address refundAddress, address deliveryProviderAddress, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys, uint8 consistencyLevel) payable returns (uint64 sequence)",
"function sendVaasToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 gasLimit, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys) payable returns (uint64 sequence)",
"function sendVaasToEvm(uint16 targetChain, address targetAddress, bytes payload, uint256 receiverValue, uint256 gasLimit, tuple(uint16 chainId, bytes32 emitterAddress, uint64 sequence)[] vaaKeys, uint16 refundChain, address refundAddress) payable returns (uint64 sequence)"
]
Loading