Skip to content

Commit 21d1acc

Browse files
committed
rm: mm
1 parent a875ce6 commit 21d1acc

File tree

3 files changed

+10
-50
lines changed

3 files changed

+10
-50
lines changed

README.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Objective
44

5-
Provide an execution framework and proof-of-concept (PoC) service for [Wormhole](https://github.com/wormhole-foundation/wormhole), [Modular Messaging](https://github.com/wormholelabs-xyz/example-messaging-endpoint), and potentially other protocols that is permissionless, extensible, and low-overhead.
5+
Provide an execution framework for [Wormhole](https://github.com/wormhole-foundation/wormhole) and potentially other protocols that is permissionless, extensible, and low-overhead.
66

77
## Runtime Support
88

@@ -11,6 +11,13 @@ Provide an execution framework and proof-of-concept (PoC) service for [Wormhole]
1111
- [x] [Sui Move](./sui/)
1212
- [x] [Aptos Move](./aptos/)
1313

14+
## Protocol Support
15+
16+
- [x] [CCTP v1](https://developers.circle.com/cctp)
17+
- [x] [CCTP v2](https://developers.circle.com/cctp)
18+
- [x] [NTT v1](https://github.com/wormhole-foundation/native-token-transfers)
19+
- [x] [VAA v1](https://wormhole.com/docs/products/messaging/overview/)
20+
1421
## Background
1522

1623
Wormhole integrators rely on [various relayers](https://wormhole.com/docs/learn/infrastructure/relayer/) to complete cross-chain actions on behalf of users. The existing systems have some drawbacks however. [Wormhole Relayers](https://wormhole.com/docs/build/contract-integrations/wormhole-relayers/) introduce a significant cost overhead to achieve their goals while custom relayers introduce significant bespoke work for integrators aiming to avoid that overhead.
@@ -93,7 +100,7 @@ Executor Contract - The shared, on-chain contract/program used to make Execution
93100

94101
Execution Quote - A quote for execution for a given source and destination chain. Quotes are signed by the Quoter.
95102

96-
Execution Request - A request generated on-chain or off-chain for a given message (e.g. Modular Message, VAA v1, etc) to be executed on another chain.
103+
Execution Request - A request generated on-chain or off-chain for a given message (e.g. NTT, VAA v1, etc) to be executed on another chain.
97104

98105
Quoter - An off-chain service which provides pricing for execution. A Relay Provider is uniquely identified by their Quoter’s EVM public key.
99106

@@ -145,7 +152,7 @@ The Executor Contract MUST support the following methods
145152

146153
In order to minimize cost, this contract MUST NOT verify the signature on the Quote. The Quote SHOULD be verified by the submitting client code before being used in a transaction.
147154

148-
In order to be extensible, this contract MUST NOT construct or validate the message-specific request details (e.g. Modular Message, VAA v1, etc). It is up to the client to select an Executor which services the specific message types required.
155+
In order to be extensible, this contract MUST NOT construct or validate the message-specific request details (e.g. NTT, VAA v1, etc). It is up to the client to select an Executor which services the specific message types required.
149156

150157
Similarly, this contract MUST NOT check the payment amount against the quote and relay instructions. It is up to the client to accurately estimate the required payment and the relayer to enforce it.
151158

@@ -194,17 +201,6 @@ bytes32 emitterAddress
194201
uint64 sequence
195202
```
196203

197-
##### Modular Message Request [WIP]
198-
199-
```solidity
200-
bytes4 prefix = b"ERM1" // 4-byte prefix for this struct
201-
uint16 sourceChainId // Source chain
202-
bytes32 sourceAddress // Source address
203-
uint64 sequence // Sequence number returned by `endpoint.sendMessage`
204-
uint32 payloadLen // Length of the payload
205-
bytes payload // The full payload, the keccak of which was sent to `endpoint.sendMessage`
206-
```
207-
208204
##### NTT v1 Request
209205

210206
```solidity

evm/src/libraries/ExecutorMessages.sol

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,6 @@ library ExecutorMessages {
1212
/// @dev Selector: 492f620d.
1313
error PayloadTooLarge();
1414

15-
/// @notice Encodes a modular messaging request payload.
16-
/// @param srcChain The source chain for the message (usually this chain).
17-
/// @param srcAddr The source address for the message.
18-
/// @param sequence The sequence number returned by `endpoint.sendMessage`.
19-
/// @param payload The full payload, the keccak of which was sent to `endpoint.sendMessage`.
20-
/// @return bytes The encoded request.
21-
function makeMMRequest(uint16 srcChain, address srcAddr, uint64 sequence, bytes memory payload)
22-
internal
23-
pure
24-
returns (bytes memory)
25-
{
26-
if (payload.length > type(uint32).max) {
27-
revert PayloadTooLarge();
28-
}
29-
return abi.encodePacked(
30-
REQ_MM, srcChain, bytes32(uint256(uint160(srcAddr))), sequence, uint32(payload.length), payload
31-
);
32-
}
33-
3415
/// @notice Encodes a version 1 VAA request payload.
3516
/// @param emitterChain The emitter chain from the VAA.
3617
/// @param emitterAddress The emitter address from the VAA.

evm/test/ExecutorMessages.t.sol

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,6 @@ import {Test, console} from "forge-std/Test.sol";
55
import {ExecutorMessages} from "../src/libraries/ExecutorMessages.sol";
66

77
contract ExecutorMessagesTest is Test {
8-
function test_makeMMRequest() public pure {
9-
address srcAddr = address(0xdeadbeef);
10-
uint16 srcChain = 2;
11-
uint64 sequence = 42;
12-
bytes memory payload = "Hello, World";
13-
bytes memory expected = abi.encodePacked(
14-
"ERM1", // prefix
15-
srcChain, // sourceChainId
16-
bytes32(uint256(uint160(srcAddr))), // sourceAddress
17-
sequence, // sequence
18-
uint32(payload.length), // payloadLen
19-
payload // payload
20-
);
21-
bytes memory buf = ExecutorMessages.makeMMRequest(srcChain, srcAddr, sequence, payload);
22-
assertEq(keccak256(expected), keccak256(buf));
23-
}
24-
258
function test_makeVAAv1Request() public pure {
269
uint16 emitterChain = 7;
2710
bytes32 emitterAddress = bytes32(uint256(uint160(0xdeadbeef)));

0 commit comments

Comments
 (0)