Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 7 additions & 6 deletions .github/workflows/contracts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ on:
- dev
jobs:
build:
runs-on: "SuperformCore3"
# Target the shared CI runner pool by labels, not by one runner's display name.
runs-on: [self-hosted, Linux, ARM64, arm, us-east-1, ci-v3]
steps:
- name: Mask Secrets
run: |
Expand Down Expand Up @@ -99,7 +100,7 @@ jobs:

test:
needs: ["build"]
runs-on: "SuperformCore3"
runs-on: [self-hosted, Linux, ARM64, arm, us-east-1, ci-v3]
steps:
- name: "Check out the repo"
uses: "actions/checkout@v4"
Expand Down Expand Up @@ -155,7 +156,7 @@ jobs:

smoke-test:
needs: ["build"]
runs-on: "SuperformCore3"
runs-on: [self-hosted, Linux, ARM64, arm, us-east-1, ci-v3]
steps:
- name: "Check out the repo"
uses: "actions/checkout@v4"
Expand Down Expand Up @@ -197,7 +198,7 @@ jobs:
needs: ["test"]
if:
github.event_name == 'workflow_dispatch'
runs-on: "SuperformCore3"
runs-on: [self-hosted, Linux, ARM64, arm, us-east-1, ci-v3]
outputs:
eth_mainnet_addresses: ${{ steps.get-addresses-eth.outputs.addresses }}
base_mainnet_addresses: ${{ steps.get-addresses-base.outputs.addresses }}
Expand Down Expand Up @@ -302,7 +303,7 @@ jobs:
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

coverage:
runs-on: SuperformCore3
runs-on: [self-hosted, Linux, ARM64, arm, us-east-1, ci-v3]
needs: ["test"]
steps:
- name: "Check out the repo"
Expand Down Expand Up @@ -350,4 +351,4 @@ jobs:
- name: "Add coverage summary"
run: |
echo "## Coverage result" >> $GITHUB_STEP_SUMMARY
echo "✅ Uploaded to Codecov" >> $GITHUB_STEP_SUMMARY
echo "✅ Uploaded to Codecov" >> $GITHUB_STEP_SUMMARY
72 changes: 63 additions & 9 deletions script/DeployUpOFT.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ contract DeployUpOFT is Script {
UlnConfig ulnHyperEVMToEth;
UlnConfig ulnBaseToHyperEVM;
UlnConfig ulnHyperEVMToBase;
// Receive configs (different confirmations than send for HyperEVM pathways)
UlnConfig ulnHyperEVMReceiveFromEth;
UlnConfig ulnHyperEVMReceiveFromBase;
UlnConfig ulnEthReceiveFromHyperEVM;
UlnConfig ulnBaseReceiveFromHyperEVM;

ExecutorConfig execEthToBase;
ExecutorConfig execBaseToEth;
Expand Down Expand Up @@ -153,9 +158,27 @@ contract DeployUpOFT is Script {
});

// HyperEVM pathway configs (single DVN - LayerZero Labs only)
// NOTE: LZ requires send config confirmations to match receive config confirmations on the other side.
// HL→ETH: HL send=1, ETH receive=1 (1 HL block)
// ETH→HL: ETH send=15, HL receive=15 (15 ETH blocks)
// HL→Base: HL send=1, Base receive=1 (1 HL block)
// Base→HL: Base send=10, HL receive=10 (10 Base blocks)

address[] memory dvnsHyperEVM = new address[](1);
dvnsHyperEVM[0] = DVN_LZ_HYPEREVM;

// HL→ETH send config (1 HL block, matches ETH receive)
ulnHyperEVMToEth = UlnConfig({
confirmations: 1,
requiredDVNCount: 1,
optionalDVNCount: type(uint8).max,
optionalDVNThreshold: 0,
requiredDVNs: dvnsHyperEVM,
optionalDVNs: new address[](0)
});

// HL receive from ETH config (15 ETH blocks, matches ETH send)
ulnHyperEVMReceiveFromEth = UlnConfig({
confirmations: 15,
requiredDVNCount: 1,
optionalDVNCount: type(uint8).max,
Expand All @@ -164,7 +187,7 @@ contract DeployUpOFT is Script {
optionalDVNs: new address[](0)
});

// ETH to HyperEVM uses ETH DVNs
// ETH→HL send config (15 ETH blocks)
address[] memory dvnsEthForHyperEVM = new address[](1);
dvnsEthForHyperEVM[0] = DVN1_ETH; // Only LZ Labs DVN for HyperEVM pathway
ulnEthToHyperEVM = UlnConfig({
Expand All @@ -176,6 +199,16 @@ contract DeployUpOFT is Script {
optionalDVNs: new address[](0)
});

// ETH receive from HL config (1 HL block, matches HL send)
ulnEthReceiveFromHyperEVM = UlnConfig({
confirmations: 1,
requiredDVNCount: 1,
optionalDVNCount: type(uint8).max,
optionalDVNThreshold: 0,
requiredDVNs: dvnsEthForHyperEVM,
optionalDVNs: new address[](0)
});

execEthToHyperEVM = ExecutorConfig({
maxMessageSize: 10_000,
executor: EXECUTOR_ETH
Expand All @@ -186,24 +219,45 @@ contract DeployUpOFT is Script {
executor: EXECUTOR_HYPEREVM
});

// Base to HyperEVM uses Base DVNs (only LZ Labs for HyperEVM pathway)
// Base→HL send config (10 Base blocks)
address[] memory dvnsBaseForHyperEVM = new address[](1);
dvnsBaseForHyperEVM[0] = DVN1_BASE; // Only LZ Labs DVN for HyperEVM pathway
ulnBaseToHyperEVM = UlnConfig({
confirmations: 15,
confirmations: 10,
requiredDVNCount: 1,
optionalDVNCount: type(uint8).max,
optionalDVNThreshold: 0,
requiredDVNs: dvnsBaseForHyperEVM,
optionalDVNs: new address[](0)
});

// Base receive from HL config (1 HL block, matches HL send)
ulnBaseReceiveFromHyperEVM = UlnConfig({
confirmations: 1,
requiredDVNCount: 1,
optionalDVNCount: type(uint8).max,
optionalDVNThreshold: 0,
requiredDVNs: dvnsBaseForHyperEVM,
optionalDVNs: new address[](0)
});

// HL→Base send config (1 HL block, matches Base receive)
ulnHyperEVMToBase = UlnConfig({
confirmations: 15,
confirmations: 1,
requiredDVNCount: 1,
optionalDVNCount: type(uint8).max,
optionalDVNThreshold: 0,
requiredDVNs: dvnsHyperEVM, // Already defined above
requiredDVNs: dvnsHyperEVM,
optionalDVNs: new address[](0)
});

// HL receive from Base config (10 Base blocks, matches Base send)
ulnHyperEVMReceiveFromBase = UlnConfig({
confirmations: 10,
requiredDVNCount: 1,
optionalDVNCount: type(uint8).max,
optionalDVNThreshold: 0,
requiredDVNs: dvnsHyperEVM,
optionalDVNs: new address[](0)
});

Expand Down Expand Up @@ -734,7 +788,7 @@ contract DeployUpOFT is Script {
oapp: contracts.oftHyperEVM,
remoteEid: ETH_EID,
receiveLib: RECEIVE_LIB_HYPEREVM,
uln: ulnHyperEVMToEth
uln: ulnHyperEVMReceiveFromEth
});
console2.log("[+] Receive config (ULN) set");

Expand Down Expand Up @@ -797,7 +851,7 @@ contract DeployUpOFT is Script {
oapp: contracts.adapter,
remoteEid: HYPEREVM_EID,
receiveLib: RECEIVE_LIB_ETH,
uln: ulnEthToHyperEVM
uln: ulnEthReceiveFromHyperEVM
});
console2.log("[+] Receive config (ULN) set");

Expand Down Expand Up @@ -1005,7 +1059,7 @@ contract DeployUpOFT is Script {
oapp: contracts.oftHyperEVM,
remoteEid: BASE_EID,
receiveLib: RECEIVE_LIB_HYPEREVM,
uln: ulnHyperEVMToBase
uln: ulnHyperEVMReceiveFromBase
});
console2.log("[+] Receive config (ULN) set");

Expand Down Expand Up @@ -1068,7 +1122,7 @@ contract DeployUpOFT is Script {
oapp: contracts.oft,
remoteEid: HYPEREVM_EID,
receiveLib: RECEIVE_LIB_BASE,
uln: ulnBaseToHyperEVM
uln: ulnBaseReceiveFromHyperEVM
});
console2.log("[+] Receive config (ULN) set");

Expand Down
Loading
Loading