@@ -340,7 +340,7 @@ contract LayerZeroSendEUL is ScriptUtils {
340340 {
341341 ERC20 eul = ERC20 (tokenAddresses.EUL);
342342 (address oftAdapter , uint256 value , SendParam memory sendParam , MessagingFee memory fee , address refundAddress )
343- = getSendInputs (dstChainId, dstAddress, amount, 0 );
343+ = getSendInputs (getDeployer (), dstChainId, dstAddress, amount, 0 );
344344
345345 startBroadcast ();
346346 eul.approve (oftAdapter, amount);
@@ -351,7 +351,13 @@ contract LayerZeroSendEUL is ScriptUtils {
351351 return (receipt, oftReceipt);
352352 }
353353
354- function getSendInputs (uint256 dstChainId , address dstAddress , uint256 amount , uint256 nativeFeeMultiplierBps )
354+ function getSendInputs (
355+ address srcAddress ,
356+ uint256 dstChainId ,
357+ address dstAddress ,
358+ uint256 amount ,
359+ uint256 nativeFeeMultiplierBps
360+ )
355361 public
356362 returns (address to , uint256 value , SendParam memory sendParam , MessagingFee memory fee , address refundAddress )
357363 {
@@ -367,19 +373,22 @@ contract LayerZeroSendEUL is ScriptUtils {
367373 fee = IOFT (bridgeAddresses.oftAdapter).quoteSend (sendParam, false );
368374 fee.nativeFee = fee.nativeFee * ((1e4 + nativeFeeMultiplierBps) / 1e4 );
369375
370- return (bridgeAddresses.oftAdapter, fee.nativeFee, sendParam, fee, dstAddress );
376+ return (bridgeAddresses.oftAdapter, fee.nativeFee, sendParam, fee, srcAddress );
371377 }
372378
373- function getSendCalldata (uint256 dstChainId , address dstAddress , uint256 amount , uint256 nativeFeeMultiplierBps )
374- public
375- returns (address to , uint256 value , bytes memory rawCalldata )
376- {
379+ function getSendCalldata (
380+ address srcAddress ,
381+ uint256 dstChainId ,
382+ address dstAddress ,
383+ uint256 amount ,
384+ uint256 nativeFeeMultiplierBps
385+ ) public returns (address to , uint256 value , bytes memory rawCalldata ) {
377386 SendParam memory sendParam;
378387 MessagingFee memory fee;
379388 address refundAddress;
380389
381390 (to, value, sendParam, fee, refundAddress) =
382- getSendInputs (dstChainId, dstAddress, amount, nativeFeeMultiplierBps);
391+ getSendInputs (srcAddress, dstChainId, dstAddress, amount, nativeFeeMultiplierBps);
383392 rawCalldata = abi.encodeCall (IOFT.send, (sendParam, fee, refundAddress));
384393 }
385394}
0 commit comments