diff --git a/v2/scripts/localnet/EvmCall.s.sol b/v2/scripts/localnet/EvmCall.s.sol index ac10e967..7dec1ac5 100644 --- a/v2/scripts/localnet/EvmCall.s.sol +++ b/v2/scripts/localnet/EvmCall.s.sol @@ -23,8 +23,11 @@ contract EvmCallScript is Script { // Encode the message bytes memory message = abi.encode("hello"); + RevertOptions memory revertOptions = + RevertOptions({ revertAddress: address(0x321), callOnRevert: true, abortAddress: address(0x321) }); + // Call the function on GatewayEVM - try gatewayEVM.call(universalContractAddress, message) { + try gatewayEVM.call(universalContractAddress, message, revertOptions) { console.log("TestUniversalContract called from EVM."); } catch (bytes memory err) { console.log("Error calling TestUniversalContract:"); diff --git a/v2/scripts/localnet/EvmDepositAndCall.s.sol b/v2/scripts/localnet/EvmDepositAndCall.s.sol index 0c2132ec..f144963a 100644 --- a/v2/scripts/localnet/EvmDepositAndCall.s.sol +++ b/v2/scripts/localnet/EvmDepositAndCall.s.sol @@ -33,12 +33,16 @@ contract EvmDepositAndCallScript is Script { // Encode the payload bytes memory payload = abi.encode("hello"); + RevertOptions memory revertOptions = + RevertOptions({ revertAddress: address(0x321), callOnRevert: true, abortAddress: address(0x321) }); + // Call the depositAndCall function on GatewayEVM try gatewayEVM.depositAndCall( universalContractAddress, amount, erc20Address, - payload + payload, + revertOptions ) { console.log("TestUniversalContract called from EVM."); } catch (bytes memory err) { diff --git a/v2/scripts/localnet/ZevmCall.s.sol b/v2/scripts/localnet/ZevmCall.s.sol index 977c4646..c779ebe5 100644 --- a/v2/scripts/localnet/ZevmCall.s.sol +++ b/v2/scripts/localnet/ZevmCall.s.sol @@ -33,8 +33,11 @@ contract ZevmCallScript is Script { flag ); + RevertOptions memory revertOptions = + RevertOptions({ revertAddress: address(0x321), callOnRevert: true, abortAddress: address(0x321) }); + // Call the function on GatewayZEVM - try gatewayZEVM.call(abi.encodePacked(address(receiverEVM)), chainId, message) { + try gatewayZEVM.call(abi.encodePacked(address(receiverEVM)), chainId, message, revertOptions) { console.log("ReceiverEVM called from ZEVM."); } catch (bytes memory err) { console.log("Error calling ReceiverEVM:"); diff --git a/v2/scripts/localnet/ZevmWithdrawAndCall.s.sol b/v2/scripts/localnet/ZevmWithdrawAndCall.s.sol index 4170b465..67ba1219 100644 --- a/v2/scripts/localnet/ZevmWithdrawAndCall.s.sol +++ b/v2/scripts/localnet/ZevmWithdrawAndCall.s.sol @@ -36,11 +36,15 @@ contract ZevmWithdrawAndCallScript is Script { flag ); + RevertOptions memory revertOptions = + RevertOptions({ revertAddress: address(0x321), callOnRevert: true, abortAddress: address(0x321) }); + try gatewayZEVM.withdrawAndCall( abi.encodePacked(receiverEVMAddress), amount, address(zrc20), - message + message, + revertOptions ) { console.log("ReceiverEVM called from ZEVM."); } catch (bytes memory err) {