Skip to content

feat: Add LayerZero Support (SC-1050)#37

Merged
lucas-manuel merged 8 commits intomasterfrom
sc-1050-add-lz-support
Aug 22, 2025
Merged

feat: Add LayerZero Support (SC-1050)#37
lucas-manuel merged 8 commits intomasterfrom
sc-1050-add-lz-support

Conversation

@supercontracts
Copy link
Contributor

No description provided.

Comment on lines 115 to 136
assertEq(receiver.allowInitializePath(Origin({
srcEid: srcEid,
sender: bytes32(uint256(uint160(sourceAuthority))),
nonce: 1
})), true);

// Should return false when origin.srcEid != srcEid
assertEq(receiver.allowInitializePath(Origin({
srcEid: srcEid + 1,
sender: bytes32(uint256(uint160(sourceAuthority))),
nonce: 1
})), false);

// Should return false when origin.sender != sourceAuthority
assertEq(receiver.allowInitializePath(Origin({
srcEid: srcEid,
sender: bytes32(uint256(uint160(randomAddress))),
nonce: 1
})), false);

// Should return false when origin.srcEid != srcEid and origin.sender != sourceAuthority
assertEq(receiver.allowInitializePath(Origin({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convert all of these to just use assertTrue and assertFalse

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

converted

@github-actions
Copy link

Coverage after merging sc-1050-add-lz-support into master will be

100.00%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src/forwarders
   AMBForwarder.sol100%100%100%100%
   ArbitrumForwarder.sol100%100%100%100%
   CCTPForwarder.sol100%100%100%100%
   LZForwarder.sol100%100%100%100%
   OptimismForwarder.sol100%100%100%100%
src/receivers
   AMBReceiver.sol100%100%100%100%
   ArbitrumReceiver.sol100%100%100%100%
   CCTPReceiver.sol100%100%100%100%
   LZReceiver.sol100%100%100%100%
   OptimismReceiver.sol100%100%100%100%

@lucas-manuel lucas-manuel merged commit 610cede into master Aug 22, 2025
3 checks passed
@lucas-manuel lucas-manuel deleted the sc-1050-add-lz-support branch August 22, 2025 13:43
barrutko added a commit to grove-labs/xchain-helpers that referenced this pull request Oct 14, 2025
* feat: Add LayerZero Support (SC-1050) (sparkdotfi#37)

* intial commit

* fix: tests
add: binance chain

* add: init

* fix

* Update LZReceiver.sol

* fix: receiver

* add: LZReceiver.t.sol

* fix: review

* fix: LZForwarder refund correct payer (SC-1127) (sparkdotfi#39)

* fix: Use address(this) as sender in quote in LZForwarder (SC-1126) (sparkdotfi#38)

Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>

* fix: `LZReceiver` implement full OApp (SC-1124, SC-1125) (sparkdotfi#40)

* save

* fix: review

* fix: review

* fix: comment

* fix: Pay in LZToken (SC-1152) (sparkdotfi#41)

* fix

* add: param

* add: tests

* fix: review

* feat: Add Avalanche to lz (SC-1178) (sparkdotfi#43)

---------

Co-authored-by: supercontracts <bonjour.tabish@gmail.com>
Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>
barrutko added a commit to grove-labs/xchain-helpers that referenced this pull request Oct 14, 2025
* feat: Add LayerZero Support (SC-1050) (sparkdotfi#37)

* intial commit

* fix: tests
add: binance chain

* add: init

* fix

* Update LZReceiver.sol

* fix: receiver

* add: LZReceiver.t.sol

* fix: review

* fix: LZForwarder refund correct payer (SC-1127) (sparkdotfi#39)

* fix: Use address(this) as sender in quote in LZForwarder (SC-1126) (sparkdotfi#38)



* fix: `LZReceiver` implement full OApp (SC-1124, SC-1125) (sparkdotfi#40)

* save

* fix: review

* fix: review

* fix: comment

* fix: Pay in LZToken (SC-1152) (sparkdotfi#41)

* fix

* add: param

* add: tests

* fix: review

* feat: Add Avalanche to lz (SC-1178) (sparkdotfi#43)

---------

Co-authored-by: supercontracts <bonjour.tabish@gmail.com>
Co-authored-by: Lucas Manuel <lucasmanuel.tech@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants