Skip to content
Merged
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
2 changes: 1 addition & 1 deletion script/SendFromArbitrumToEthereum.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ contract SendTokensFromArbitrumToEthereum is Script {
// Get the fee for the transfer
MessagingFee memory fee = iexecLayerZeroBridge.quoteSend(sendParam, false);
console.log("Fee amount: ", fee.nativeFee);

vm.startBroadcast();
Copy link

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

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

[nitpick] After broadcasting, consider calling vm.stopBroadcast() once the send call completes to clearly delimit the broadcast session and prevent unintended subsequent transactions.

Copilot uses AI. Check for mistakes.
// Execute the cross-chain transfer
iexecLayerZeroBridge.send{value: fee.nativeFee}(sendParam, fee, msg.sender);

Expand Down
5 changes: 3 additions & 2 deletions script/bridges/layerZero/IexecLayerZeroBridge.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ contract Configure is Script {
sourceBridge.setPeer(
targetParams.lzChainId, bytes32(uint256(uint160(targetParams.iexecLayerZeroBridgeAddress)))
);
EnforcedOptionParam[] memory enforcedOptions = new EnforcedOptionParam[](1);
EnforcedOptionParam[] memory enforcedOptions = new EnforcedOptionParam[](2);
bytes memory _extraOptions = OptionsBuilder.newOptions().addExecutorLzReceiveOption(70_000, 0); // 70_000 gas limit for the receiving executor and 0 for the executor's value
enforcedOptions[0] = EnforcedOptionParam(targetParams.lzChainId, 2, _extraOptions);
enforcedOptions[0] = EnforcedOptionParam(targetParams.lzChainId, 1, _extraOptions); // lzReceive
enforcedOptions[1] = EnforcedOptionParam(targetParams.lzChainId, 2, _extraOptions); // lzCompose
sourceBridge.setEnforcedOptions(enforcedOptions);
// Authorize bridge in the relevant contract.
if (sourceParams.approvalRequired) {
Expand Down