diff --git a/examples/oapp/contracts/mock/LZEndpointV2Mock.sol b/examples/oapp/contracts/mock/LZEndpointV2Mock.sol index bdf5ad26d..1586e9030 100644 --- a/examples/oapp/contracts/mock/LZEndpointV2Mock.sol +++ b/examples/oapp/contracts/mock/LZEndpointV2Mock.sol @@ -1,5 +1,4 @@ -// SPDX-License-Identifier: BUSL-1.1 - +// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.22; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; diff --git a/examples/oapp/package.json b/examples/oapp/package.json index 836005b23..c6d9e069c 100644 --- a/examples/oapp/package.json +++ b/examples/oapp/package.json @@ -17,14 +17,14 @@ }, "devDependencies": { "@babel/core": "^7.23.7", - "@layerzerolabs/eslint-config-next": "^2.0.7", - "@layerzerolabs/lz-definitions": "~2.0.7", - "@layerzerolabs/lz-evm-messagelib-v2": "~2.0.7", - "@layerzerolabs/lz-evm-oapp-v2": "~2.0.7", - "@layerzerolabs/lz-evm-protocol-v2": "~2.0.7", - "@layerzerolabs/lz-evm-v1-0.7": "~2.0.7", - "@layerzerolabs/prettier-config-next": "^2.0.7", - "@layerzerolabs/solhint-config": "^2.0.7", + "@layerzerolabs/eslint-config-next": "^2.0.14", + "@layerzerolabs/lz-definitions": "~2.0.14", + "@layerzerolabs/lz-evm-messagelib-v2": "~2.0.14", + "@layerzerolabs/lz-evm-oapp-v2": "~2.0.14", + "@layerzerolabs/lz-evm-protocol-v2": "~2.0.14", + "@layerzerolabs/lz-evm-v1-0.7": "~2.0.14", + "@layerzerolabs/prettier-config-next": "^2.0.14", + "@layerzerolabs/solhint-config": "^2.0.14", "@layerzerolabs/toolbox-foundry": "~0.0.2", "@layerzerolabs/toolbox-hardhat": "~0.0.3", "@nomicfoundation/hardhat-ethers": "^3.0.5", diff --git a/examples/oapp/test/foundry/MyOApp.t.sol b/examples/oapp/test/foundry/MyOApp.t.sol index b8dfb037a..c989cbad6 100644 --- a/examples/oapp/test/foundry/MyOApp.t.sol +++ b/examples/oapp/test/foundry/MyOApp.t.sol @@ -7,7 +7,7 @@ import { OptionsBuilder } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/lib import { MessagingFee } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/OApp.sol"; import { MessagingReceipt } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/OAppSender.sol"; import { MyOApp } from "../../contracts/MyOApp.sol"; -import { TestHelper } from "./TestHelper.sol"; +import { TestHelper } from "lz-std/TestHelper.sol"; import "forge-std/console.sol"; diff --git a/examples/oapp/test/hardhat/OApp.test.ts b/examples/oapp/test/hardhat/OApp.test.ts deleted file mode 100644 index d5c783dee..000000000 --- a/examples/oapp/test/hardhat/OApp.test.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { before, beforeEach, describe } from 'mocha' - -describe('OApp: ', function () { - before(async function () { - //TODO - }) - - beforeEach(async function () { - //TODO - }) -}) diff --git a/examples/oapp/contracts/MyOFT.sol b/examples/oft/contracts/MyOFT.sol similarity index 98% rename from examples/oapp/contracts/MyOFT.sol rename to examples/oft/contracts/MyOFT.sol index fc0204c38..2d72e4136 100644 --- a/examples/oapp/contracts/MyOFT.sol +++ b/examples/oft/contracts/MyOFT.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.0; +pragma solidity ^0.8.22; import { OFT } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/OFT.sol"; import { SendParam } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/OFTCore.sol"; diff --git a/examples/oft/contracts/YourOFT.sol b/examples/oft/contracts/YourOFT.sol deleted file mode 100644 index 5cef69fe2..000000000 --- a/examples/oft/contracts/YourOFT.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.22; - -import { OFT } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/OFT.sol"; - -contract YourOFT is OFT { - constructor( - string memory _name, - string memory _symbol, - address _lzEndpoint, - address _owner - ) OFT(_name, _symbol, _lzEndpoint, _owner) {} - - // TODO In the event you wish to add custom logic to your OFT contract, uncomment these and alter any corresponding logic... - - // @dev allows the quote functions to mock sending the actual values that would be sent in a send()/sendAndCall() - // function _debitView( - // uint256 _amountLD, - // uint256 _minAmountLD, - // uint32 /*_dstEid*/ - // ) internal view virtual override returns (uint256) { - // uint256 amountLDSend = _removeDust(_amountLD); - // if (amountLDSend < _minAmountLD) revert AmountSlippage(amountLDSend, _minAmountLD); - // - // return amountLDSend; - // } - - // @dev hook applied to debit tokens on the src chain - // function _debit( - // uint256 _amountLD, - // uint256 _minAmountLD, - // uint32 _dstEid - // ) internal virtual override returns (uint256) { - // uint256 amountLDSend = _debitView(_amountLD, _minAmountLD, _dstEid); - // - // _burn(msg.sender, amountLDSend); - // return amountLDSend; - // } - - // @dev hook applied on the receipt of tokens on the dst chain - // function _credit(address _to, uint256 _amountLD, uint32 /*_srcEid*/) internal virtual override returns (uint256) { - // _mint(_to, _amountLD); - // return _amountLD; - // } -} diff --git a/examples/oft/contracts/mock/LZEndpointV2Mock.sol b/examples/oft/contracts/mock/LZEndpointV2Mock.sol new file mode 100644 index 000000000..1586e9030 --- /dev/null +++ b/examples/oft/contracts/mock/LZEndpointV2Mock.sol @@ -0,0 +1,605 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity 0.8.22; + +import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; +import { ILayerZeroEndpointV2, MessagingParams, MessagingReceipt, MessagingFee, ExecutionState } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; +import { ILayerZeroReceiver } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol"; +import { SetConfigParam } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol"; +import { MessagingContext } from "@layerzerolabs/lz-evm-protocol-v2/contracts/MessagingContext.sol"; +import { Packet } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol"; +import { OFTMsgCodec } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/libs/OFTMsgCodec.sol"; +import { Origin } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/OAppReceiver.sol"; +import { Errors } from "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/Errors.sol"; +import { GUID } from "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/GUID.sol"; +import { ExecutorOptions } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/ExecutorOptions.sol"; +import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol"; +import { WorkerOptions } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/SendLibBase.sol"; +import { IExecutorFeeLib } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/interfaces/IExecutorFeeLib.sol"; +import { DVNOptions } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uln/libs/DVNOptions.sol"; +import { UlnOptions } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/uln/libs/UlnOptions.sol"; +import { CalldataBytesLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/libs/CalldataBytesLib.sol"; + +contract LZEndpointV2Mock is ILayerZeroEndpointV2, MessagingContext { + using ExecutorOptions for bytes; + using OFTMsgCodec for bytes; + using OFTMsgCodec for bytes32; + using OFTMsgCodec for address; + using SafeCast for uint256; + using CalldataBytesLib for bytes; + + uint32 public immutable eid; + mapping(address => address) public lzEndpointLookup; + + mapping(address receiver => mapping(uint32 srcEid => mapping(bytes32 sender => uint64 nonce))) + internal lazyInboundNonce; + mapping(address receiver => mapping(uint32 srcEid => mapping(bytes32 sender => mapping(uint64 inboundNonce => bytes32 payloadHash)))) + public inboundPayloadHash; + mapping(address sender => mapping(uint32 dstEid => mapping(bytes32 receiver => uint64 nonce))) public outboundNonce; + + RelayerFeeConfig public relayerFeeConfig; + ProtocolFeeConfig protocolFeeConfig; + uint256 public verifierFee; + + struct ProtocolFeeConfig { + uint256 zroFee; + uint256 nativeBP; + } + + struct RelayerFeeConfig { + uint128 dstPriceRatio; // 10^10 + uint128 dstGasPriceInWei; + uint128 dstNativeAmtCap; + uint64 baseGas; + uint64 gasPerByte; + } + + uint8 internal constant _NOT_ENTERED = 1; + uint8 internal constant _ENTERED = 2; + uint8 internal _receive_entered_state = 1; + modifier receiveNonReentrant() { + require(_receive_entered_state == _NOT_ENTERED, "LayerZeroMock: no receive reentrancy"); + _receive_entered_state = _ENTERED; + _; + _receive_entered_state = _NOT_ENTERED; + } + + event ValueTransferFailed(address indexed to, uint256 indexed quantity); + + constructor(uint32 _eid) { + eid = _eid; + // init config + relayerFeeConfig = RelayerFeeConfig({ + dstPriceRatio: 1e10, // 1:1, same chain, same native coin + dstGasPriceInWei: 1e10, + dstNativeAmtCap: 1e19, + baseGas: 100, + gasPerByte: 1 + }); + protocolFeeConfig = ProtocolFeeConfig({ zroFee: 1e18, nativeBP: 1000 }); // BP 0.1 + verifierFee = 1e16; + } + + function send( + MessagingParams calldata _params, + address _refundAddress + ) public payable sendContext(_params.dstEid, msg.sender) returns (MessagingReceipt memory receipt) { + if (_params.payInLzToken) revert Errors.LzTokenUnavailable(); + + address lzEndpoint = lzEndpointLookup[_params.receiver.bytes32ToAddress()]; + require(lzEndpoint != address(0), "LayerZeroMock: destination LayerZero Endpoint not found"); + + // get the correct outbound nonce + uint64 latestNonce = _outbound(msg.sender, _params.dstEid, _params.receiver); + + Packet memory packet = Packet({ + nonce: latestNonce, + srcEid: eid, + sender: msg.sender, + dstEid: _params.dstEid, + receiver: _params.receiver, + guid: GUID.generate(latestNonce, eid, msg.sender, _params.dstEid, _params.receiver), + message: _params.message + }); + receipt.guid = packet.guid; + receipt.nonce = packet.nonce; + receipt.fee = _quote(_params, msg.sender); + require(msg.value >= receipt.fee.nativeFee, "LayerZeroMock: not enough native for fees"); + + // refund if they send too much + uint256 amount = msg.value - receipt.fee.nativeFee; + if (amount > 0) { + (bool success, ) = _refundAddress.call{ value: amount }(""); + require(success, "LayerZeroMock: failed to refund"); + } + + uint256 totalGas; + uint256 dstAmount; + (totalGas, dstAmount) = executeNativeAirDropAndReturnLzGas(_params.options); + + // TODO fix + // composed calls with correct gas + + Origin memory origin = Origin({ + srcEid: packet.srcEid, + sender: packet.sender.addressToBytes32(), + nonce: packet.nonce + }); + + bytes memory payload = PacketV1Codec.encodePayload(packet); + bytes32 payloadHash = keccak256(payload); + + LZEndpointV2Mock(lzEndpoint).receivePayload{ value: dstAmount }( + origin, + packet.receiver.bytes32ToAddress(), + payloadHash, + packet.message, + totalGas, + dstAmount, + packet.guid + ); + } + + function receivePayload( + Origin calldata _origin, + address _receiver, + bytes32 _payloadHash, + bytes calldata _message, + uint256 _gas, + uint256 _msgValue, + bytes32 _guid + ) external payable receiveNonReentrant { + inboundPayloadHash[_receiver][_origin.srcEid][_origin.sender][_origin.nonce] = _payloadHash; + if (_msgValue > 0) { + try + ILayerZeroReceiver(_receiver).lzReceive{ value: _msgValue, gas: _gas }( + _origin, + _guid, + _message, + address(0), + "" + ) + {} catch (bytes memory /*reason*/) {} + } else { + try + ILayerZeroReceiver(_receiver).lzReceive{ gas: _gas }(_origin, _guid, _message, address(0), "") + {} catch (bytes memory /*reason*/) {} + } + } + + function getExecutorFee(uint256 _payloadSize, bytes calldata _options) public view returns (uint256) { + uint256 nativeFee; + // 2) get Executor fee + // a) decodeLzReceiveOption + // b) decodeNativeDropOption + // c) decodeLzComposeOption + (uint256 totalDstAmount, uint256 totalGas) = _decodeExecutorOptions(_options); + uint256 remoteGasTotal = relayerFeeConfig.dstGasPriceInWei * (relayerFeeConfig.baseGas + totalGas); + nativeFee += totalDstAmount + remoteGasTotal; + + // tokenConversionRate = dstPrice / localPrice + // basePrice = totalRemoteToken * tokenConversionRate + uint256 basePrice = (nativeFee * relayerFeeConfig.dstPriceRatio) / 10 ** 10; + + // pricePerByte = (dstGasPriceInWei * gasPerBytes) * tokenConversionRate + uint256 pricePerByte = ((relayerFeeConfig.dstGasPriceInWei * + relayerFeeConfig.gasPerByte * + relayerFeeConfig.dstPriceRatio) / 10 ** 10) * _payloadSize; + + return basePrice + pricePerByte; + } + + function _quote( + MessagingParams calldata _params, + address /*_sender*/ + ) internal view returns (MessagingFee memory messagingFee) { + (bytes memory executorOptions, ) = splitOptions(_params.options); + + // 2) get Executor fee + uint256 executorFee = this.getExecutorFee(_params.message.length, executorOptions); + + // 1) get Verifier fee + // 3) get Treasury fee + uint256 treasuryAndVerifierFee = _getTreasuryAndVerifierFees(executorFee, verifierFee); + + messagingFee.lzTokenFee = 0; + messagingFee.nativeFee = executorFee + treasuryAndVerifierFee; + } + + function _getTreasuryAndVerifierFees(uint256 _executorFee, uint256 _verifierFee) internal view returns (uint256) { + return ((_executorFee + _verifierFee) * protocolFeeConfig.nativeBP) / 10000; + } + + function _outbound(address _sender, uint32 _dstEid, bytes32 _receiver) internal returns (uint64 nonce) { + unchecked { + nonce = ++outboundNonce[_sender][_dstEid][_receiver]; + } + } + + function setDestLzEndpoint(address destAddr, address lzEndpointAddr) external { + lzEndpointLookup[destAddr] = lzEndpointAddr; + } + + function _decodeExecutorOptions( + bytes calldata _options + ) internal view returns (uint256 dstAmount, uint256 totalGas) { + if (_options.length == 0) { + revert IExecutorFeeLib.NoOptions(); + } + + uint256 cursor = 0; + totalGas = relayerFeeConfig.baseGas; + + while (cursor < _options.length) { + (uint8 optionType, bytes calldata option, uint256 newCursor) = _options.nextExecutorOption(cursor); + cursor = newCursor; + + if (optionType == ExecutorOptions.OPTION_TYPE_LZRECEIVE) { + (uint128 gas, uint128 value) = ExecutorOptions.decodeLzReceiveOption(option); + dstAmount += value; + totalGas += gas; + } else if (optionType == ExecutorOptions.OPTION_TYPE_NATIVE_DROP) { + (uint128 nativeDropAmount, ) = ExecutorOptions.decodeNativeDropOption(option); + dstAmount += nativeDropAmount; + } else if (optionType == ExecutorOptions.OPTION_TYPE_LZCOMPOSE) { + (, uint128 gas, uint128 value) = ExecutorOptions.decodeLzComposeOption(option); + dstAmount += value; + totalGas += gas; + } else { + revert IExecutorFeeLib.UnsupportedOptionType(optionType); + } + } + + if (cursor != _options.length) revert IExecutorFeeLib.InvalidExecutorOptions(cursor); + if (dstAmount > relayerFeeConfig.dstNativeAmtCap) + revert IExecutorFeeLib.NativeAmountExceedsCap(dstAmount, relayerFeeConfig.dstNativeAmtCap); + } + + function splitOptions(bytes calldata _options) internal pure returns (bytes memory, WorkerOptions[] memory) { + (bytes memory executorOpts, bytes memory dvnOpts) = decode(_options); + + if (dvnOpts.length == 0) { + return (executorOpts, new WorkerOptions[](0)); + } + + WorkerOptions[] memory workerOpts = new WorkerOptions[](1); + workerOpts[0] = WorkerOptions(DVNOptions.WORKER_ID, dvnOpts); + return (executorOpts, workerOpts); + } + + function decode( + bytes calldata _options + ) internal pure returns (bytes memory executorOptions, bytes memory dvnOptions) { + // at least 2 bytes for the option type, but can have no options + if (_options.length < 2) revert UlnOptions.InvalidWorkerOptions(0); + + uint16 optionsType = uint16(bytes2(_options[0:2])); + uint256 cursor = 2; + + // type3 options: [worker_option][worker_option]... + // worker_option: [worker_id][option_size][option] + // worker_id: uint8, option_size: uint16, option: bytes + if (optionsType == UlnOptions.TYPE_3) { + unchecked { + uint256 start = cursor; + uint8 lastWorkerId; // worker_id starts from 1, so 0 is an invalid worker_id + + // heuristic: we assume that the options are mostly EXECUTOR options only + // checking the workerID can reduce gas usage for most cases + while (cursor < _options.length) { + uint8 workerId = uint8(bytes1(_options[cursor:cursor + 1])); + if (workerId == 0) revert UlnOptions.InvalidWorkerId(0); + + // workerId must equal to the lastWorkerId for the first option + // so it is always skipped in the first option + // this operation slices out options whenever the the scan finds a different workerId + if (lastWorkerId == 0) { + lastWorkerId = workerId; + } else if (workerId != lastWorkerId) { + bytes calldata op = _options[start:cursor]; // slice out the last worker's options + (executorOptions, dvnOptions) = _insertWorkerOptions( + executorOptions, + dvnOptions, + lastWorkerId, + op + ); + + // reset the start cursor and lastWorkerId + start = cursor; + lastWorkerId = workerId; + } + + ++cursor; // for workerId + + uint16 size = uint16(bytes2(_options[cursor:cursor + 2])); + if (size == 0) revert UlnOptions.InvalidWorkerOptions(cursor); + cursor += size + 2; + } + + // the options length must be the same as the cursor at the end + if (cursor != _options.length) revert UlnOptions.InvalidWorkerOptions(cursor); + + // if we have reached the end of the options and the options are not empty + // we need to process the last worker's options + if (_options.length > 2) { + bytes calldata op = _options[start:cursor]; + (executorOptions, dvnOptions) = _insertWorkerOptions(executorOptions, dvnOptions, lastWorkerId, op); + } + } + } else { + executorOptions = decodeLegacyOptions(optionsType, _options); + } + } + + function _insertWorkerOptions( + bytes memory _executorOptions, + bytes memory _dvnOptions, + uint8 _workerId, + bytes calldata _newOptions + ) private pure returns (bytes memory, bytes memory) { + if (_workerId == ExecutorOptions.WORKER_ID) { + _executorOptions = _executorOptions.length == 0 + ? _newOptions + : abi.encodePacked(_executorOptions, _newOptions); + } else if (_workerId == DVNOptions.WORKER_ID) { + _dvnOptions = _dvnOptions.length == 0 ? _newOptions : abi.encodePacked(_dvnOptions, _newOptions); + } else { + revert UlnOptions.InvalidWorkerId(_workerId); + } + return (_executorOptions, _dvnOptions); + } + + function decodeLegacyOptions( + uint16 _optionType, + bytes calldata _options + ) internal pure returns (bytes memory executorOptions) { + if (_optionType == UlnOptions.TYPE_1) { + if (_options.length != 34) revert UlnOptions.InvalidLegacyType1Option(); + + // execution gas + uint128 executionGas = uint256(bytes32(_options[2:2 + 32])).toUint128(); + + // dont use the encode function in the ExecutorOptions lib for saving gas by calling abi.encodePacked once + // the result is a lzReceive option: [executor_id][option_size][option_type][execution_gas] + // option_type: uint8, execution_gas: uint128 + // option_size = len(option_type) + len(execution_gas) = 1 + 16 = 17 + executorOptions = abi.encodePacked( + ExecutorOptions.WORKER_ID, + uint16(17), // 16 + 1, 16 for option_length, + 1 for option_type + ExecutorOptions.OPTION_TYPE_LZRECEIVE, + executionGas + ); + } else if (_optionType == UlnOptions.TYPE_2) { + // receiver size <= 32 + if (_options.length <= 66 || _options.length > 98) revert UlnOptions.InvalidLegacyType2Option(); + + // execution gas + uint128 executionGas = uint256(bytes32(_options[2:2 + 32])).toUint128(); + + // nativeDrop (amount + receiver) + uint128 amount = uint256(bytes32(_options[34:34 + 32])).toUint128(); // offset 2 + 32 + bytes32 receiver; + unchecked { + uint256 receiverLen = _options.length - 66; // offset 2 + 32 + 32 + receiver = bytes32(_options[66:]); + receiver = receiver >> (8 * (32 - receiverLen)); // padding 0 to the left + } + + // dont use the encode function in the ExecutorOptions lib for saving gas by calling abi.encodePacked once + // the result has one lzReceive option and one nativeDrop option: + // [executor_id][lzReceive_option_size][option_type][execution_gas] + + // [executor_id][nativeDrop_option_size][option_type][nativeDrop_amount][receiver] + // option_type: uint8, execution_gas: uint128, nativeDrop_amount: uint128, receiver: bytes32 + // lzReceive_option_size = len(option_type) + len(execution_gas) = 1 + 16 = 17 + // nativeDrop_option_size = len(option_type) + len(nativeDrop_amount) + len(receiver) = 1 + 16 + 32 = 49 + executorOptions = abi.encodePacked( + ExecutorOptions.WORKER_ID, + uint16(17), // 16 + 1, 16 for option_length, + 1 for option_type + ExecutorOptions.OPTION_TYPE_LZRECEIVE, + executionGas, + ExecutorOptions.WORKER_ID, + uint16(49), // 48 + 1, 32 + 16 for option_length, + 1 for option_type + ExecutorOptions.OPTION_TYPE_NATIVE_DROP, + amount, + receiver + ); + } else { + revert UlnOptions.UnsupportedOptionType(_optionType); + } + } + + // NOT IMPLEMENTING + function burn(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external {} + + function clear(address _oapp, Origin calldata _origin, bytes32 _guid, bytes calldata _message) external {} + + mapping(address from => mapping(address to => mapping(bytes32 guid => mapping(uint16 index => bytes32 messageHash)))) + public composeQueue; + + function defaultReceiveLibrary(uint32 /*_eid*/) external pure returns (address) { + return address(0); + } + + function defaultReceiveLibraryTimeout(uint32 /*_eid*/) external pure returns (address lib, uint256 expiry) { + return (address(0), 0); + } + + function defaultSendLibrary(uint32 /*_eid*/) external pure returns (address) { + return address(0); + } + + function executable(Origin calldata /*_origin*/, address /*receiver*/) external pure returns (ExecutionState) { + return ExecutionState.NotExecutable; + } + + function getConfig( + address /*_oapp*/, + address /*_lib*/, + uint32 /*_eid*/, + uint32 /*_configType*/ + ) external pure returns (bytes memory config) { + return bytes("0x"); + } + + function getReceiveLibrary( + address /*receiver*/, + uint32 /*_eid*/ + ) external pure returns (address lib, bool isDefault) { + return (address(0), false); + } + + function getRegisteredLibraries() external pure returns (address[] memory) { + address[] memory addresses = new address[](1); + addresses[0] = address(0); + return addresses; + } + + function getSendLibrary(address /*_sender*/, uint32 /*_eid*/) external pure returns (address lib) { + return address(0); + } + + function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64) { + return lazyInboundNonce[_receiver][_srcEid][_sender]; + } + + function isDefaultSendLibrary(address /*_sender*/, uint32 /*_eid*/) external pure returns (bool) { + return false; + } + + function isRegisteredLibrary(address /*_lib*/) external pure returns (bool) { + return false; + } + + function isSupportedEid(uint32 /*_eid*/) external pure returns (bool) { + return false; + } + + function lzCompose( + address /*_from,*/, + address /*_to,*/, + bytes32 /*_guid,*/, + uint16 /*_index,*/, + bytes calldata /*_message,*/, + bytes calldata /*_extraData*/ + ) external payable {} + + function lzReceive( + Origin calldata /*_origin,*/, + address /*_receiver,*/, + bytes32 /*_guid,*/, + bytes calldata /*_message,*/, + bytes calldata /*_extraData*/ + ) external payable {} + + function lzToken() external pure returns (address) { + return address(0); + } + + function nativeToken() external pure returns (address) { + return address(0); + } + + function nextGuid( + address /*_sender,*/, + uint32 /*_dstEid,*/, + bytes32 /*_receiver*/ + ) external pure returns (bytes32) { + return 0; + } + + function nilify( + address /*_oapp,*/, + uint32 /*_srcEid,*/, + bytes32 /*_sender,*/, + uint64 /*_nonce,*/, + bytes32 /*_payloadHash*/ + ) external {} + + function quote(MessagingParams calldata _params, address _sender) external view returns (MessagingFee memory) { + return _quote(_params, _sender); + } + + mapping(address receiver => mapping(uint32 srcEid => Timeout)) public receiveLibraryTimeout; + + function registerLibrary(address /*_lib*/) public {} + + function sendCompose(address, /*_to*/ bytes32, /*_guid*/ uint16, /*_index*/ bytes calldata /*_message*/) external {} + + function setConfig(address, /*_oapp*/ address, /*_lib*/ SetConfigParam[] calldata /*_params*/) external {} + + function setDefaultReceiveLibrary(uint32 /*_eid*/, address /*_newLib*/, uint256 /*_gracePeriod*/) external {} + + function setDefaultReceiveLibraryTimeout(uint32 /*_eid*/, address /*_lib*/, uint256 /*_expiry*/) external {} + + function setDefaultSendLibrary(uint32 /*_eid*/, address /*_newLib*/) external {} + + function setDelegate(address /*_delegate*/) external {} + + function setLzToken(address /*_lzToken*/) external {} + + function setReceiveLibrary( + address, + /*_oapp*/ uint32, + /*_eid*/ address, + /*_newLib*/ uint256 /*_gracePeriod*/ + ) external {} + + function setReceiveLibraryTimeout( + address, + /*_oapp*/ uint32, + /*_eid*/ address, + /*_lib*/ uint256 /*_gracePeriod*/ + ) external {} + + function setSendLibrary(address, /*_oapp*/ uint32, /*_eid*/ address /*_newLib*/) external {} + + function skip(address, /*_oapp*/ uint32, /*_srcEid*/ bytes32, /*_sender*/ uint64 /*_nonce*/) external {} + + function verifiable( + Origin calldata /*_origin*/, + address /*_receiver*/, + address /*_receiveLib*/, + bytes32 /*_payloadHash*/ + ) external pure returns (bool) { + return false; + } + + function verify(Origin calldata /*origin*/, address /*_receiver*/, bytes32 /*_payloadHash*/) external {} + + // Helper Functions + function executeNativeAirDropAndReturnLzGas( + bytes calldata _options + ) public returns (uint256 totalGas, uint256 dstAmount) { + (bytes memory executorOpts, ) = decode(_options); + return this._executeNativeAirDropAndReturnLzGas(executorOpts); + } + + function _executeNativeAirDropAndReturnLzGas( + bytes calldata _options + ) public returns (uint256 totalGas, uint256 dstAmount) { + if (_options.length == 0) { + revert IExecutorFeeLib.NoOptions(); + } + + uint256 cursor = 0; + while (cursor < _options.length) { + (uint8 optionType, bytes calldata option, uint256 newCursor) = _options.nextExecutorOption(cursor); + cursor = newCursor; + + if (optionType == ExecutorOptions.OPTION_TYPE_LZRECEIVE) { + (uint128 gas, uint128 value) = ExecutorOptions.decodeLzReceiveOption(option); + totalGas += gas; + dstAmount += value; + } else if (optionType == ExecutorOptions.OPTION_TYPE_NATIVE_DROP) { + (uint128 nativeDropAmount, bytes32 receiver) = ExecutorOptions.decodeNativeDropOption(option); + (bool success, ) = receiver.bytes32ToAddress().call{ value: nativeDropAmount }(""); + if (!success) { + emit ValueTransferFailed(receiver.bytes32ToAddress(), nativeDropAmount); + } + } else { + revert IExecutorFeeLib.UnsupportedOptionType(optionType); + } + } + + if (cursor != _options.length) revert IExecutorFeeLib.InvalidExecutorOptions(cursor); + } +} diff --git a/examples/oft/deploy/YourOFT.ts b/examples/oft/deploy/MyOFT.ts similarity index 95% rename from examples/oft/deploy/YourOFT.ts rename to examples/oft/deploy/MyOFT.ts index 3d3ad39fa..633b2d4fe 100644 --- a/examples/oft/deploy/YourOFT.ts +++ b/examples/oft/deploy/MyOFT.ts @@ -1,7 +1,6 @@ import { type DeployFunction } from 'hardhat-deploy/types' -// TODO declare your contract name here -const contractName = 'YourOFT' +const contractName = 'MyOFT' const deploy: DeployFunction = async (hre) => { const { getNamedAccounts, deployments } = hre diff --git a/examples/oft/package.json b/examples/oft/package.json index 2a415af99..4cc9e3498 100644 --- a/examples/oft/package.json +++ b/examples/oft/package.json @@ -17,17 +17,20 @@ }, "devDependencies": { "@babel/core": "^7.23.7", - "@layerzerolabs/eslint-config-next": "^2.0.11", - "@layerzerolabs/lz-definitions": "~2.0.11", - "@layerzerolabs/lz-evm-oapp-v2": "~2.0.11", - "@layerzerolabs/lz-evm-protocol-v2": "~2.0.11", - "@layerzerolabs/prettier-config-next": "^2.0.11", - "@layerzerolabs/solhint-config": "^2.0.11", + "@layerzerolabs/eslint-config-next": "^2.0.14", + "@layerzerolabs/lz-definitions": "~2.0.14", + "@layerzerolabs/lz-evm-messagelib-v2": "~2.0.14", + "@layerzerolabs/lz-evm-oapp-v2": "~2.0.14", + "@layerzerolabs/lz-evm-protocol-v2": "~2.0.14", + "@layerzerolabs/lz-evm-v1-0.7": "~2.0.14", + "@layerzerolabs/prettier-config-next": "^2.0.14", + "@layerzerolabs/solhint-config": "^2.0.14", "@layerzerolabs/toolbox-foundry": "~0.0.2", "@layerzerolabs/toolbox-hardhat": "~0.0.3", "@nomicfoundation/hardhat-ethers": "^3.0.5", "@nomiclabs/hardhat-ethers": "^2.2.3", "@openzeppelin/contracts": "^4.9.5", + "@openzeppelin/contracts-upgradeable": "^4.9.5", "@rushstack/eslint-patch": "^1.6.1", "@types/mocha": "^10.0.6", "ethers": "^5.7.0", diff --git a/examples/oapp/test/foundry/MyOFT.t.sol b/examples/oft/test/foundry/MyOFT.t.sol similarity index 98% rename from examples/oapp/test/foundry/MyOFT.t.sol rename to examples/oft/test/foundry/MyOFT.t.sol index 694e1195d..0fa3d9550 100644 --- a/examples/oapp/test/foundry/MyOFT.t.sol +++ b/examples/oft/test/foundry/MyOFT.t.sol @@ -4,8 +4,8 @@ pragma solidity ^0.8.22; import { OptionsBuilder } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/libs/OptionsBuilder.sol"; import { MyOFT } from "../../contracts/MyOFT.sol"; import { SendParam, MessagingFee, MessagingReceipt } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/OFTCore.sol"; -import { OFTComposerMock } from "./mocks/OFTComposerMock.sol"; -import { OFTInspectorMock, IOAppMsgInspector } from "./mocks/OFTInspectorMock.sol"; +import { OFTComposerMock } from "lz-std/mocks/OFTComposerMock.sol"; +import { OFTInspectorMock, IOAppMsgInspector } from "lz-std/mocks/OFTInspectorMock.sol"; import { IOAppOptionsType3, EnforcedOptionParam } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/libs/OAppOptionsType3.sol"; import { OFTMsgCodec } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/libs/OFTMsgCodec.sol"; @@ -14,7 +14,8 @@ import { OFTComposeMsgCodec } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/ import { IOFT, SendParam, OFTReceipt } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/interfaces/IOFT.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; -import { TestHelper } from "./TestHelper.sol"; +import { TestHelper } from "lz-std/TestHelper.sol"; + contract MyOFTTest is TestHelper { using OptionsBuilder for bytes; diff --git a/examples/oft/test/foundry/OFT.t.sol b/examples/oft/test/foundry/OFT.t.sol deleted file mode 100644 index e6949f4ed..000000000 --- a/examples/oft/test/foundry/OFT.t.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: UNLICENSED - -pragma solidity ^0.8.22; - -import { Test } from "forge-std/Test.sol"; - -contract YourOApp is Test { - function setUp() public { - //TODO - } - - function test() public { - //TODO - } -} diff --git a/examples/oapp/test/hardhat/MyOFT.test.ts b/examples/oft/test/hardhat/MyOFT.test.ts similarity index 100% rename from examples/oapp/test/hardhat/MyOFT.test.ts rename to examples/oft/test/hardhat/MyOFT.test.ts diff --git a/examples/oft/test/hardhat/OFT.test.ts b/examples/oft/test/hardhat/OFT.test.ts deleted file mode 100644 index d5c783dee..000000000 --- a/examples/oft/test/hardhat/OFT.test.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { before, beforeEach, describe } from 'mocha' - -describe('OApp: ', function () { - before(async function () { - //TODO - }) - - beforeEach(async function () { - //TODO - }) -}) diff --git a/package.json b/package.json index 44ec61461..2261f41f6 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ }, "devDependencies": { "@changesets/cli": "^2.27.1", - "@layerzerolabs/prettier-config-next": "^2.0.11", + "@layerzerolabs/prettier-config-next": "^2.0.14", "@types/node": "~18.18.14", "@typescript-eslint/eslint-plugin": "^6.18.1", "@typescript-eslint/parser": "^6.18.1", diff --git a/packages/create-lz-oapp/package.json b/packages/create-lz-oapp/package.json index cd8adda9b..42303923c 100644 --- a/packages/create-lz-oapp/package.json +++ b/packages/create-lz-oapp/package.json @@ -32,7 +32,7 @@ "yoga-layout-prebuilt": "^1.10.0" }, "devDependencies": { - "@layerzerolabs/io-devtools": "~0.0.2", + "@layerzerolabs/io-devtools": "~0.0.3", "@swc/core": "^1.3.104", "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", diff --git a/packages/devtools-evm-hardhat/package.json b/packages/devtools-evm-hardhat/package.json index 22123505b..9a347da68 100644 --- a/packages/devtools-evm-hardhat/package.json +++ b/packages/devtools-evm-hardhat/package.json @@ -46,11 +46,11 @@ "@ethersproject/contracts": "^5.7.0", "@ethersproject/providers": "^5.7.2", "@ethersproject/wallet": "^5.7.0", - "@layerzerolabs/devtools": "~0.0.2", + "@layerzerolabs/devtools": "~0.0.3", "@layerzerolabs/devtools-evm": "~0.0.3", "@layerzerolabs/io-devtools": "~0.0.3", - "@layerzerolabs/lz-definitions": "~2.0.11", - "@layerzerolabs/lz-evm-sdk-v1": "~2.0.11", + "@layerzerolabs/lz-definitions": "~2.0.14", + "@layerzerolabs/lz-evm-sdk-v1": "~2.0.14", "@layerzerolabs/test-devtools": "~0.0.2", "@nomiclabs/hardhat-ethers": "^2.2.3", "@swc/core": "^1.3.104", diff --git a/packages/devtools-evm/package.json b/packages/devtools-evm/package.json index 4f40d68bd..c3c816929 100644 --- a/packages/devtools-evm/package.json +++ b/packages/devtools-evm/package.json @@ -46,9 +46,9 @@ "@ethersproject/constants": "^5.7.0", "@ethersproject/contracts": "^5.7.0", "@ethersproject/providers": "^5.7.2", - "@layerzerolabs/devtools": "~0.0.2", + "@layerzerolabs/devtools": "~0.0.3", "@layerzerolabs/io-devtools": "~0.0.3", - "@layerzerolabs/lz-definitions": "~2.0.11", + "@layerzerolabs/lz-definitions": "~2.0.14", "@layerzerolabs/test-devtools": "~0.0.2", "@swc/core": "^1.3.104", "@swc/jest": "^0.2.30", diff --git a/packages/devtools/package.json b/packages/devtools/package.json index ca006284e..528b2e9d9 100644 --- a/packages/devtools/package.json +++ b/packages/devtools/package.json @@ -30,8 +30,8 @@ "test": "jest --forceExit" }, "devDependencies": { - "@layerzerolabs/io-devtools": "~0.0.2", - "@layerzerolabs/lz-definitions": "~2.0.11", + "@layerzerolabs/io-devtools": "~0.0.3", + "@layerzerolabs/lz-definitions": "~2.0.14", "@layerzerolabs/test-devtools": "~0.0.2", "@swc/core": "^1.3.104", "@swc/jest": "^0.2.30", diff --git a/packages/omnicounter-devtools-evm/package.json b/packages/omnicounter-devtools-evm/package.json index 054af2bc3..f8c88f214 100644 --- a/packages/omnicounter-devtools-evm/package.json +++ b/packages/omnicounter-devtools-evm/package.json @@ -32,12 +32,12 @@ "p-memoize": "~4.0.4" }, "devDependencies": { - "@layerzerolabs/devtools": "~0.0.2", - "@layerzerolabs/devtools-evm": "~0.0.2", - "@layerzerolabs/lz-definitions": "~2.0.11", + "@layerzerolabs/devtools": "~0.0.3", + "@layerzerolabs/devtools-evm": "~0.0.3", + "@layerzerolabs/lz-definitions": "~2.0.14", "@layerzerolabs/omnicounter-devtools": "~0.0.2", - "@layerzerolabs/protocol-devtools": "~0.0.2", - "@layerzerolabs/protocol-devtools-evm": "~0.0.2", + "@layerzerolabs/protocol-devtools": "~0.0.3", + "@layerzerolabs/protocol-devtools-evm": "~0.0.4", "@layerzerolabs/ua-devtools": "~0.0.2", "@layerzerolabs/ua-devtools-evm": "~0.0.2", "@swc/core": "^1.3.104", diff --git a/packages/omnicounter-devtools/package.json b/packages/omnicounter-devtools/package.json index b3866cceb..8df9e8f56 100644 --- a/packages/omnicounter-devtools/package.json +++ b/packages/omnicounter-devtools/package.json @@ -30,9 +30,9 @@ "lint": "$npm_execpath eslint '**/*.{js,ts,json}'" }, "devDependencies": { - "@layerzerolabs/devtools": "~0.0.2", - "@layerzerolabs/lz-definitions": "~2.0.11", - "@layerzerolabs/protocol-devtools": "~0.0.2", + "@layerzerolabs/devtools": "~0.0.3", + "@layerzerolabs/lz-definitions": "~2.0.14", + "@layerzerolabs/protocol-devtools": "~0.0.3", "@swc/core": "^1.3.104", "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", diff --git a/packages/protocol-devtools-evm/package.json b/packages/protocol-devtools-evm/package.json index 93bd11d8c..ef43939ac 100644 --- a/packages/protocol-devtools-evm/package.json +++ b/packages/protocol-devtools-evm/package.json @@ -44,12 +44,12 @@ "@ethersproject/constants": "^5.7.0", "@ethersproject/contracts": "^5.7.0", "@ethersproject/providers": "^5.7.0", - "@layerzerolabs/devtools": "~0.0.2", + "@layerzerolabs/devtools": "~0.0.3", "@layerzerolabs/devtools-evm": "~0.0.3", "@layerzerolabs/io-devtools": "~0.0.3", - "@layerzerolabs/lz-definitions": "~2.0.11", - "@layerzerolabs/lz-evm-sdk-v2": "~2.0.11", - "@layerzerolabs/protocol-devtools": "~0.0.2", + "@layerzerolabs/lz-definitions": "~2.0.14", + "@layerzerolabs/lz-evm-sdk-v2": "~2.0.14", + "@layerzerolabs/protocol-devtools": "~0.0.3", "@layerzerolabs/test-devtools": "~0.0.2", "@swc/core": "^1.3.104", "@swc/jest": "^0.2.30", diff --git a/packages/protocol-devtools/package.json b/packages/protocol-devtools/package.json index 4f723c1ce..7cda68525 100644 --- a/packages/protocol-devtools/package.json +++ b/packages/protocol-devtools/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@layerzerolabs/devtools": "~0.0.3", - "@layerzerolabs/lz-definitions": "~2.0.11", + "@layerzerolabs/lz-definitions": "~2.0.14", "@layerzerolabs/test-devtools": "~0.0.2", "@swc/core": "^1.3.104", "@swc/jest": "^0.2.30", diff --git a/packages/toolbox-foundry/Makefile b/packages/toolbox-foundry/Makefile index 43d1983c2..37291cbf1 100644 --- a/packages/toolbox-foundry/Makefile +++ b/packages/toolbox-foundry/Makefile @@ -10,6 +10,10 @@ lib: clean node_modules git_submodules # This target will get all the libraries from node_modules # and copy them to the lib/ directory node_modules: + # + # solidity-bytes-utils + # + # First we make sure the target directory exists mkdir -p lib/solidity-bytes-utils @@ -19,14 +23,27 @@ node_modules: # And we include the licenses & package.json cp node_modules/solidity-bytes-utils/package.json node_modules/solidity-bytes-utils/LICENSE* lib/solidity-bytes-utils + # + # layerzerolabs/test-devtools-evm + # + + # First we make sure the target directory exists + mkdir -p lib/lz-std + + # We copy the contracts + cp -R node_modules/@layerzerolabs/test-devtools-evm/contracts/ lib/lz-std/ + + # And we include the licenses & package.json + cp node_modules/@layerzerolabs/test-devtools-evm/package.json node_modules/solidity-bytes-utils/LICENSE* lib/lz-std + # This target will get all the git submodules installed in src/ directory # and copy them to lib/ directory # # At this point we only have submodules in src/ so we can just copy everything git_submodules: - # + # # ds-test - # + # # First we make sure the target directory exists mkdir -p lib/ds-test diff --git a/packages/toolbox-foundry/package.json b/packages/toolbox-foundry/package.json index 4ec48991b..dc0756eda 100644 --- a/packages/toolbox-foundry/package.json +++ b/packages/toolbox-foundry/package.json @@ -23,6 +23,7 @@ }, "dependencies": {}, "devDependencies": { + "@layerzerolabs/test-devtools-evm" : "~0.0.1", "@swc/core": "^1.3.104", "@swc/jest": "^0.2.30", "@types/jest": "^29.5.11", diff --git a/packages/toolbox-hardhat/package.json b/packages/toolbox-hardhat/package.json index 243258342..529d2b542 100644 --- a/packages/toolbox-hardhat/package.json +++ b/packages/toolbox-hardhat/package.json @@ -30,15 +30,16 @@ }, "dependencies": { "@ethersproject/contracts": "^5.7.0", - "@layerzerolabs/devtools": "~0.0.2", + "@layerzerolabs/devtools": "~0.0.3", "@layerzerolabs/devtools-evm": "~0.0.3", "@layerzerolabs/devtools-evm-hardhat": "~0.0.3", "@layerzerolabs/io-devtools": "~0.0.3", - "@layerzerolabs/lz-definitions": "^2.0.11", - "@layerzerolabs/lz-evm-sdk-v1": "^2.0.11", - "@layerzerolabs/lz-evm-sdk-v2": "^2.0.11", - "@layerzerolabs/protocol-devtools": "~0.0.2", - "@layerzerolabs/protocol-devtools-evm": "~0.0.3", + "@layerzerolabs/lz-definitions": "^2.0.14", + "@layerzerolabs/lz-evm-sdk-v1": "^2.0.14", + "@layerzerolabs/lz-evm-sdk-v2": "^2.0.14", + "@layerzerolabs/protocol-devtools": "~0.0.3", + "@layerzerolabs/protocol-devtools-evm": "~0.0.4", + "@layerzerolabs/test-devtools-evm" : "~0.0.1", "@layerzerolabs/ua-devtools": "~0.0.2", "@layerzerolabs/ua-devtools-evm": "~0.0.2", "@layerzerolabs/ua-devtools-evm-hardhat": "~0.0.3", diff --git a/packages/toolbox-hardhat/src/index.ts b/packages/toolbox-hardhat/src/index.ts index ce44d8b1a..8fc13088c 100644 --- a/packages/toolbox-hardhat/src/index.ts +++ b/packages/toolbox-hardhat/src/index.ts @@ -14,7 +14,7 @@ import { OmniSDK } from '@layerzerolabs/devtools-evm' // that accept hardhat user config and return a hardhat user config with external // artifacts and deployments configured const withDeployments = withLayerZeroDeployments('@layerzerolabs/lz-evm-sdk-v2') -const withArtifacts = withLayerZeroArtifacts('@layerzerolabs/lz-evm-sdk-v2') +const withArtifacts = withLayerZeroArtifacts('@layerzerolabs/lz-evm-sdk-v2', '@layerzerolabs/test-devtools-evm') // Register a hardhat-specific error parser factory on the OmniSDK OmniSDK.registerErrorParserFactory(createErrorParser) diff --git a/packages/ua-devtools-evm-hardhat/package.json b/packages/ua-devtools-evm-hardhat/package.json index aaaaa21cc..42fd525f3 100644 --- a/packages/ua-devtools-evm-hardhat/package.json +++ b/packages/ua-devtools-evm-hardhat/package.json @@ -40,14 +40,14 @@ "devDependencies": { "@ethersproject/abi": "^5.7.0", "@ethersproject/contracts": "^5.7.0", - "@layerzerolabs/devtools": "~0.0.2", + "@layerzerolabs/devtools": "~0.0.3", "@layerzerolabs/devtools-evm": "~0.0.3", "@layerzerolabs/devtools-evm-hardhat": "~0.0.3", "@layerzerolabs/io-devtools": "~0.0.3", - "@layerzerolabs/lz-definitions": "~2.0.11", - "@layerzerolabs/lz-evm-messagelib-v2": "~2.0.11", - "@layerzerolabs/protocol-devtools": "~0.0.2", - "@layerzerolabs/protocol-devtools-evm": "~0.0.3", + "@layerzerolabs/lz-definitions": "~2.0.14", + "@layerzerolabs/lz-evm-messagelib-v2": "~2.0.14", + "@layerzerolabs/protocol-devtools": "~0.0.3", + "@layerzerolabs/protocol-devtools-evm": "~0.0.4", "@layerzerolabs/ua-devtools": "~0.0.2", "@layerzerolabs/ua-devtools-evm": "~0.0.2", "@swc/core": "^1.3.104", diff --git a/packages/ua-devtools-evm/package.json b/packages/ua-devtools-evm/package.json index 634d71ef6..08361bce1 100644 --- a/packages/ua-devtools-evm/package.json +++ b/packages/ua-devtools-evm/package.json @@ -35,12 +35,12 @@ "devDependencies": { "@ethersproject/constants": "^5.7.0", "@ethersproject/contracts": "^5.7.0", - "@layerzerolabs/devtools": "~0.0.2", - "@layerzerolabs/devtools-evm": "~0.0.2", - "@layerzerolabs/lz-definitions": "~2.0.11", - "@layerzerolabs/lz-v2-utilities": "~2.0.11", - "@layerzerolabs/protocol-devtools": "~0.0.2", - "@layerzerolabs/protocol-devtools-evm": "~0.0.2", + "@layerzerolabs/devtools": "~0.0.3", + "@layerzerolabs/devtools-evm": "~0.0.3", + "@layerzerolabs/lz-definitions": "~2.0.14", + "@layerzerolabs/lz-v2-utilities": "~2.0.14", + "@layerzerolabs/protocol-devtools": "~0.0.3", + "@layerzerolabs/protocol-devtools-evm": "~0.0.4", "@layerzerolabs/test-devtools": "~0.0.2", "@layerzerolabs/ua-devtools": "~0.0.2", "@swc/core": "^1.3.104", diff --git a/packages/ua-devtools/package.json b/packages/ua-devtools/package.json index 5411ab5ae..a262810d6 100644 --- a/packages/ua-devtools/package.json +++ b/packages/ua-devtools/package.json @@ -29,11 +29,11 @@ "lint": "$npm_execpath eslint '**/*.{js,ts,json}'" }, "devDependencies": { - "@layerzerolabs/devtools": "~0.0.2", - "@layerzerolabs/io-devtools": "~0.0.2", - "@layerzerolabs/lz-definitions": "~2.0.11", - "@layerzerolabs/lz-v2-utilities": "~2.0.11", - "@layerzerolabs/protocol-devtools": "~0.0.2", + "@layerzerolabs/devtools": "~0.0.3", + "@layerzerolabs/io-devtools": "~0.0.3", + "@layerzerolabs/lz-definitions": "~2.0.14", + "@layerzerolabs/lz-v2-utilities": "~2.0.14", + "@layerzerolabs/protocol-devtools": "~0.0.3", "@layerzerolabs/test-devtools": "~0.0.2", "@swc/core": "^1.3.104", "@swc/jest": "^0.2.30", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 865be03f6..0b2715b85 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,8 +15,8 @@ importers: specifier: ^2.27.1 version: 2.27.1 '@layerzerolabs/prettier-config-next': - specifier: ^2.0.11 - version: 2.0.11 + specifier: ^2.0.14 + version: 2.0.14 '@types/node': specifier: ~18.18.14 version: 18.18.14 @@ -75,29 +75,29 @@ importers: specifier: ^7.23.7 version: 7.23.7 '@layerzerolabs/eslint-config-next': - specifier: ^2.0.7 - version: 2.0.11(typescript@5.3.3) + specifier: ^2.0.14 + version: 2.0.14(typescript@5.3.3) '@layerzerolabs/lz-definitions': - specifier: ~2.0.7 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/lz-evm-messagelib-v2': - specifier: ~2.0.7 - version: 2.0.11(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.11)(@layerzerolabs/lz-evm-v1-0.7@2.0.11)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + specifier: ~2.0.14 + version: 2.0.14(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) '@layerzerolabs/lz-evm-oapp-v2': - specifier: ~2.0.7 - version: 2.0.11(@layerzerolabs/lz-evm-messagelib-v2@2.0.11)(@layerzerolabs/lz-evm-protocol-v2@2.0.11)(@layerzerolabs/lz-evm-v1-0.7@2.0.11)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + specifier: ~2.0.14 + version: 2.0.14(@layerzerolabs/lz-evm-messagelib-v2@2.0.14)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) '@layerzerolabs/lz-evm-protocol-v2': - specifier: ~2.0.7 - version: 2.0.11(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + specifier: ~2.0.14 + version: 2.0.14(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) '@layerzerolabs/lz-evm-v1-0.7': - specifier: ~2.0.7 - version: 2.0.11(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45) + specifier: ~2.0.14 + version: 2.0.14(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45) '@layerzerolabs/prettier-config-next': - specifier: ^2.0.7 - version: 2.0.11 + specifier: ^2.0.14 + version: 2.0.14 '@layerzerolabs/solhint-config': - specifier: ^2.0.7 - version: 2.0.11(typescript@5.3.3) + specifier: ^2.0.14 + version: 2.0.14(typescript@5.3.3) '@layerzerolabs/toolbox-foundry': specifier: ~0.0.2 version: link:../../packages/toolbox-foundry @@ -159,23 +159,29 @@ importers: specifier: ^7.23.7 version: 7.23.7 '@layerzerolabs/eslint-config-next': - specifier: ^2.0.11 - version: 2.0.11(typescript@5.3.3) + specifier: ^2.0.14 + version: 2.0.14(typescript@5.3.3) '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 + '@layerzerolabs/lz-evm-messagelib-v2': + specifier: ~2.0.14 + version: 2.0.14(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) '@layerzerolabs/lz-evm-oapp-v2': - specifier: ~2.0.11 - version: 2.0.11(@layerzerolabs/lz-evm-messagelib-v2@2.0.11)(@layerzerolabs/lz-evm-protocol-v2@2.0.11)(@layerzerolabs/lz-evm-v1-0.7@2.0.11)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + specifier: ~2.0.14 + version: 2.0.14(@layerzerolabs/lz-evm-messagelib-v2@2.0.14)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) '@layerzerolabs/lz-evm-protocol-v2': - specifier: ~2.0.11 - version: 2.0.11(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + specifier: ~2.0.14 + version: 2.0.14(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + '@layerzerolabs/lz-evm-v1-0.7': + specifier: ~2.0.14 + version: 2.0.14(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45) '@layerzerolabs/prettier-config-next': - specifier: ^2.0.11 - version: 2.0.11 + specifier: ^2.0.14 + version: 2.0.14 '@layerzerolabs/solhint-config': - specifier: ^2.0.11 - version: 2.0.11(typescript@5.3.3) + specifier: ^2.0.14 + version: 2.0.14(typescript@5.3.3) '@layerzerolabs/toolbox-foundry': specifier: ~0.0.2 version: link:../../packages/toolbox-foundry @@ -191,6 +197,9 @@ importers: '@openzeppelin/contracts': specifier: ^4.9.5 version: 4.9.5 + '@openzeppelin/contracts-upgradeable': + specifier: ^4.9.5 + version: 4.9.5 '@rushstack/eslint-patch': specifier: ^1.6.1 version: 1.6.1 @@ -235,7 +244,7 @@ importers: version: 1.10.0 devDependencies: '@layerzerolabs/io-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../io-devtools '@swc/core': specifier: ^1.3.104 @@ -307,11 +316,11 @@ importers: packages/devtools: devDependencies: '@layerzerolabs/io-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../io-devtools '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/test-devtools': specifier: ~0.0.2 version: link:../../tests/test-devtools @@ -380,14 +389,14 @@ importers: specifier: ^5.7.2 version: 5.7.2 '@layerzerolabs/devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../devtools '@layerzerolabs/io-devtools': specifier: ~0.0.3 version: link:../io-devtools '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/test-devtools': specifier: ~0.0.2 version: link:../../tests/test-devtools @@ -450,7 +459,7 @@ importers: specifier: ^5.7.0 version: 5.7.0 '@layerzerolabs/devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../devtools '@layerzerolabs/devtools-evm': specifier: ~0.0.3 @@ -459,11 +468,11 @@ importers: specifier: ~0.0.3 version: link:../io-devtools '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/lz-evm-sdk-v1': - specifier: ~2.0.11 - version: 2.0.11 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/test-devtools': specifier: ~0.0.2 version: link:../../tests/test-devtools @@ -580,13 +589,13 @@ importers: packages/omnicounter-devtools: devDependencies: '@layerzerolabs/devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../devtools '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/protocol-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../protocol-devtools '@swc/core': specifier: ^1.3.104 @@ -623,22 +632,22 @@ importers: version: 4.0.4 devDependencies: '@layerzerolabs/devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../devtools '@layerzerolabs/devtools-evm': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../devtools-evm '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/omnicounter-devtools': specifier: ~0.0.2 version: link:../omnicounter-devtools '@layerzerolabs/protocol-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../protocol-devtools '@layerzerolabs/protocol-devtools-evm': - specifier: ~0.0.2 + specifier: ~0.0.4 version: link:../protocol-devtools-evm '@layerzerolabs/ua-devtools': specifier: ~0.0.2 @@ -680,8 +689,8 @@ importers: specifier: ~0.0.3 version: link:../devtools '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/test-devtools': specifier: ~0.0.2 version: link:../../tests/test-devtools @@ -741,7 +750,7 @@ importers: specifier: ^5.7.0 version: 5.7.2 '@layerzerolabs/devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../devtools '@layerzerolabs/devtools-evm': specifier: ~0.0.3 @@ -750,13 +759,13 @@ importers: specifier: ~0.0.3 version: link:../io-devtools '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/lz-evm-sdk-v2': - specifier: ~2.0.11 - version: 2.0.11 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/protocol-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../protocol-devtools '@layerzerolabs/test-devtools': specifier: ~0.0.2 @@ -794,6 +803,9 @@ importers: packages/toolbox-foundry: devDependencies: + '@layerzerolabs/test-devtools-evm': + specifier: ~0.0.1 + version: link:../../tests/test-devtools-evm '@swc/core': specifier: ^1.3.104 version: 1.3.104 @@ -825,7 +837,7 @@ importers: specifier: ^5.7.0 version: 5.7.0 '@layerzerolabs/devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../devtools '@layerzerolabs/devtools-evm': specifier: ~0.0.3 @@ -837,20 +849,23 @@ importers: specifier: ~0.0.3 version: link:../io-devtools '@layerzerolabs/lz-definitions': - specifier: ^2.0.11 - version: 2.0.12 + specifier: ^2.0.14 + version: 2.0.14 '@layerzerolabs/lz-evm-sdk-v1': - specifier: ^2.0.11 - version: 2.0.11 + specifier: ^2.0.14 + version: 2.0.14 '@layerzerolabs/lz-evm-sdk-v2': - specifier: ^2.0.11 - version: 2.0.11 + specifier: ^2.0.14 + version: 2.0.14 '@layerzerolabs/protocol-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../protocol-devtools '@layerzerolabs/protocol-devtools-evm': - specifier: ~0.0.3 + specifier: ~0.0.4 version: link:../protocol-devtools-evm + '@layerzerolabs/test-devtools-evm': + specifier: ~0.0.1 + version: link:../../tests/test-devtools-evm '@layerzerolabs/ua-devtools': specifier: ~0.0.2 version: link:../ua-devtools @@ -916,19 +931,19 @@ importers: packages/ua-devtools: devDependencies: '@layerzerolabs/devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../devtools '@layerzerolabs/io-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../io-devtools '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/lz-v2-utilities': - specifier: ~2.0.11 - version: 2.0.11 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/protocol-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../protocol-devtools '@layerzerolabs/test-devtools': specifier: ~0.0.2 @@ -977,22 +992,22 @@ importers: specifier: ^5.7.0 version: 5.7.0 '@layerzerolabs/devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../devtools '@layerzerolabs/devtools-evm': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../devtools-evm '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/lz-v2-utilities': - specifier: ~2.0.11 - version: 2.0.11 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/protocol-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../protocol-devtools '@layerzerolabs/protocol-devtools-evm': - specifier: ~0.0.2 + specifier: ~0.0.4 version: link:../protocol-devtools-evm '@layerzerolabs/test-devtools': specifier: ~0.0.2 @@ -1044,7 +1059,7 @@ importers: specifier: ^5.7.0 version: 5.7.0 '@layerzerolabs/devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../devtools '@layerzerolabs/devtools-evm': specifier: ~0.0.3 @@ -1056,16 +1071,16 @@ importers: specifier: ~0.0.3 version: link:../io-devtools '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/lz-evm-messagelib-v2': - specifier: ~2.0.11 - version: 2.0.11(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.11)(@layerzerolabs/lz-evm-v1-0.7@2.0.11)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + specifier: ~2.0.14 + version: 2.0.14(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.2) '@layerzerolabs/protocol-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../protocol-devtools '@layerzerolabs/protocol-devtools-evm': - specifier: ~0.0.3 + specifier: ~0.0.4 version: link:../protocol-devtools-evm '@layerzerolabs/ua-devtools': specifier: ~0.0.2 @@ -1137,38 +1152,38 @@ importers: specifier: ^5.7.0 version: 5.7.0 '@layerzerolabs/devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../../packages/devtools '@layerzerolabs/devtools-evm': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../../packages/devtools-evm '@layerzerolabs/devtools-evm-hardhat': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../../packages/devtools-evm-hardhat '@layerzerolabs/io-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../../packages/io-devtools '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/lz-evm-messagelib-v2': - specifier: ~2.0.11 - version: 2.0.11(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.11)(@layerzerolabs/lz-evm-v1-0.7@2.0.11)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + specifier: ~2.0.14 + version: 2.0.14(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) '@layerzerolabs/lz-evm-oapp-v2': - specifier: ~2.0.11 - version: 2.0.11(@layerzerolabs/lz-evm-messagelib-v2@2.0.11)(@layerzerolabs/lz-evm-protocol-v2@2.0.11)(@layerzerolabs/lz-evm-v1-0.7@2.0.11)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + specifier: ~2.0.14 + version: 2.0.14(@layerzerolabs/lz-evm-messagelib-v2@2.0.14)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) '@layerzerolabs/lz-evm-protocol-v2': - specifier: ~2.0.11 - version: 2.0.11(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + specifier: ~2.0.14 + version: 2.0.14(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) '@layerzerolabs/lz-evm-sdk-v1': - specifier: ~2.0.11 - version: 2.0.11 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/lz-evm-sdk-v2': - specifier: ~2.0.11 - version: 2.0.11 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/lz-v2-utilities': - specifier: ~2.0.11 - version: 2.0.11 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/omnicounter-devtools': specifier: ~0.0.2 version: link:../../packages/omnicounter-devtools @@ -1176,10 +1191,10 @@ importers: specifier: ~0.0.2 version: link:../../packages/omnicounter-devtools-evm '@layerzerolabs/protocol-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../../packages/protocol-devtools '@layerzerolabs/protocol-devtools-evm': - specifier: ~0.0.2 + specifier: ~0.0.4 version: link:../../packages/protocol-devtools-evm '@layerzerolabs/test-devtools': specifier: ~0.0.2 @@ -1248,14 +1263,14 @@ importers: specifier: ^5.7.2 version: 5.7.2 '@layerzerolabs/devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../../packages/devtools '@layerzerolabs/devtools-evm': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../../packages/devtools-evm '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/test-devtools': specifier: ~0.0.2 version: link:../test-devtools @@ -1296,8 +1311,8 @@ importers: tests/test-devtools: devDependencies: '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 fast-check: specifier: ^3.15.0 version: 3.15.0 @@ -1314,6 +1329,39 @@ importers: specifier: ^5.3.3 version: 5.3.3 + tests/test-devtools-evm: + devDependencies: + '@layerzerolabs/lz-evm-messagelib-v2': + specifier: ~2.0.14 + version: 2.0.14(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.2) + '@layerzerolabs/lz-evm-oapp-v2': + specifier: ~2.0.14 + version: 2.0.14(@layerzerolabs/lz-evm-messagelib-v2@2.0.14)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.2) + '@layerzerolabs/lz-evm-protocol-v2': + specifier: ~2.0.14 + version: 2.0.14(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.2) + '@layerzerolabs/lz-evm-v1-0.7': + specifier: ~2.0.14 + version: 2.0.14(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45) + '@openzeppelin/contracts': + specifier: ^4.9.5 + version: 4.9.5 + '@openzeppelin/contracts-upgradeable': + specifier: ^4.9.5 + version: 4.9.5 + '@types/node': + specifier: ~18.18.14 + version: 18.18.14 + hardhat: + specifier: ^2.19.4 + version: 2.19.4(ts-node@10.9.2)(typescript@5.3.3) + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@swc/core@1.3.104)(@types/node@18.18.14)(typescript@5.3.3) + typescript: + specifier: ^5.3.3 + version: 5.3.3 + tests/test-devtools-evm-hardhat: devDependencies: hardhat: @@ -1368,7 +1416,7 @@ importers: specifier: ^5.7.0 version: 5.7.0 '@layerzerolabs/devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../../packages/devtools '@layerzerolabs/devtools-evm': specifier: ~0.0.3 @@ -1380,26 +1428,26 @@ importers: specifier: ~0.0.3 version: link:../../packages/io-devtools '@layerzerolabs/lz-definitions': - specifier: ~2.0.11 - version: 2.0.12 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/lz-evm-messagelib-v2': - specifier: ~2.0.11 - version: 2.0.11(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.11)(@layerzerolabs/lz-evm-v1-0.7@2.0.11)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + specifier: ~2.0.14 + version: 2.0.14(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) '@layerzerolabs/lz-evm-oapp-v2': - specifier: ~2.0.11 - version: 2.0.11(@layerzerolabs/lz-evm-messagelib-v2@2.0.11)(@layerzerolabs/lz-evm-protocol-v2@2.0.11)(@layerzerolabs/lz-evm-v1-0.7@2.0.11)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + specifier: ~2.0.14 + version: 2.0.14(@layerzerolabs/lz-evm-messagelib-v2@2.0.14)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) '@layerzerolabs/lz-evm-protocol-v2': - specifier: ~2.0.11 - version: 2.0.11(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + specifier: ~2.0.14 + version: 2.0.14(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) '@layerzerolabs/lz-evm-sdk-v1': - specifier: ~2.0.11 - version: 2.0.11 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/lz-evm-sdk-v2': - specifier: ~2.0.11 - version: 2.0.11 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/lz-v2-utilities': - specifier: ~2.0.11 - version: 2.0.11 + specifier: ~2.0.14 + version: 2.0.14 '@layerzerolabs/omnicounter-devtools': specifier: ~0.0.2 version: link:../../packages/omnicounter-devtools @@ -1407,10 +1455,10 @@ importers: specifier: ~0.0.2 version: link:../../packages/omnicounter-devtools-evm '@layerzerolabs/protocol-devtools': - specifier: ~0.0.2 + specifier: ~0.0.3 version: link:../../packages/protocol-devtools '@layerzerolabs/protocol-devtools-evm': - specifier: ~0.0.3 + specifier: ~0.0.4 version: link:../../packages/protocol-devtools-evm '@layerzerolabs/toolbox-hardhat': specifier: ~0.0.3 @@ -1559,6 +1607,21 @@ packages: - supports-color dev: true + /@babel/helper-define-polyfill-provider@0.5.0(@babel/core@7.23.7): + resolution: {integrity: sha512-NovQquuQLAQ5HuyjCz7WQP9MjRj7dx++yspwiyUiGl9ZyadHRSql1HZh5ogRd8W8w6YM6EQ/NTB8rgjLt5W65Q==} + peerDependencies: + '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 + dependencies: + '@babel/core': 7.23.7 + '@babel/helper-compilation-targets': 7.23.6 + '@babel/helper-plugin-utils': 7.22.5 + debug: 4.3.4(supports-color@8.1.1) + lodash.debounce: 4.0.8 + resolve: 1.22.8 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/helper-environment-visitor@7.22.20: resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} engines: {node: '>=6.9.0'} @@ -1800,9 +1863,9 @@ packages: '@babel/core': 7.23.7 '@babel/helper-module-imports': 7.22.15 '@babel/helper-plugin-utils': 7.22.5 - babel-plugin-polyfill-corejs2: 0.4.7(@babel/core@7.23.7) + babel-plugin-polyfill-corejs2: 0.4.8(@babel/core@7.23.7) babel-plugin-polyfill-corejs3: 0.8.7(@babel/core@7.23.7) - babel-plugin-polyfill-regenerator: 0.5.4(@babel/core@7.23.7) + babel-plugin-polyfill-regenerator: 0.5.5(@babel/core@7.23.7) semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -1815,6 +1878,13 @@ packages: regenerator-runtime: 0.14.1 dev: true + /@babel/runtime@7.23.8: + resolution: {integrity: sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.14.1 + dev: true + /@babel/template@7.22.15: resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} engines: {node: '>=6.9.0'} @@ -2378,7 +2448,7 @@ packages: '@ethersproject/transactions': 5.7.0 '@ethersproject/web': 5.7.1 bufio: 1.2.1 - chai: 4.3.10 + chai: 4.4.1 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -3004,8 +3074,8 @@ packages: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 - /@layerzerolabs/eslint-config-next@2.0.11(typescript@5.3.3): - resolution: {integrity: sha512-1sq9FALRvWFAqivBYkTFJMehC1tGgT4WgQuMCzSxj5ERQlszp2nMhmTq3Nm8/fge42gdJo7AOLXNMeK7HhstZA==} + /@layerzerolabs/eslint-config-next@2.0.14(typescript@5.3.3): + resolution: {integrity: sha512-F/Asx+ohIIYeSFJv3dgsS23rQNKOh+6xmz5mrTA55hBzvjdJ/dfoG9xc3K0oD6YEtC2SbJrnFJ+tZspztT5l9w==} dependencies: '@typescript-eslint/eslint-plugin': 6.18.1(@typescript-eslint/parser@6.18.1)(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/parser': 6.18.1(eslint@8.56.0)(typescript@5.3.3) @@ -3025,18 +3095,18 @@ packages: - typescript dev: true - /@layerzerolabs/lz-definitions@2.0.12: - resolution: {integrity: sha512-ClV5ez3646NYp/FyLWEGGX5QfDbnzVZ7Gw4u/5DipkeKj2CZWzHwenuzp7Ddv3Ap8yLJspvpChIvWFjS8ID1nw==} + /@layerzerolabs/lz-definitions@2.0.14: + resolution: {integrity: sha512-3qXm4a/DzrJFqmTzx+FM7LxP3TVwX7i4FIhSyZdk46ybY0hasvZkxrEEh5sLsqUHLGO67t4HDc48JfeDcb0p9w==} dependencies: tiny-invariant: 1.3.1 - /@layerzerolabs/lz-evm-messagelib-v2@2.0.11(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.11)(@layerzerolabs/lz-evm-v1-0.7@2.0.11)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1): - resolution: {integrity: sha512-i6nZvzxzH+3bMzGRxIzf6fFXTzxQIZ1vyduAoFTy3U2zK9xZUHunKFfpC+vqCY1goNzjBquX4VnClWMWlc5ZIA==} + /@layerzerolabs/lz-evm-messagelib-v2@2.0.14(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1): + resolution: {integrity: sha512-pdyw0xiClGWOPJ9JDVaxVXbpmJiL2gGvxzW5++9QGV2erYWQptVH4tKDGpD8M6QqyV3M9lh/vbqGZnTYZKLWxA==} peerDependencies: '@axelar-network/axelar-gmp-sdk-solidity': ^5.6.3 '@chainlink/contracts-ccip': ^0.7.6 - '@layerzerolabs/lz-evm-protocol-v2': ^2.0.11 - '@layerzerolabs/lz-evm-v1-0.7': ^2.0.11 + '@layerzerolabs/lz-evm-protocol-v2': ^2.0.14 + '@layerzerolabs/lz-evm-v1-0.7': ^2.0.14 '@openzeppelin/contracts': ^4.8.1 '@openzeppelin/contracts-upgradeable': ^4.8.1 hardhat-deploy: ^0.11.44 @@ -3044,36 +3114,78 @@ packages: dependencies: '@axelar-network/axelar-gmp-sdk-solidity': 5.6.4 '@chainlink/contracts-ccip': 0.7.6(ethers@5.7.2) - '@layerzerolabs/lz-evm-protocol-v2': 2.0.11(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) - '@layerzerolabs/lz-evm-v1-0.7': 2.0.11(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45) + '@layerzerolabs/lz-evm-protocol-v2': 2.0.14(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + '@layerzerolabs/lz-evm-v1-0.7': 2.0.14(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45) '@openzeppelin/contracts': 4.9.5 '@openzeppelin/contracts-upgradeable': 4.9.5 hardhat-deploy: 0.11.45 solidity-bytes-utils: 0.8.1(@babel/core@7.23.7) dev: true - /@layerzerolabs/lz-evm-oapp-v2@2.0.11(@layerzerolabs/lz-evm-messagelib-v2@2.0.11)(@layerzerolabs/lz-evm-protocol-v2@2.0.11)(@layerzerolabs/lz-evm-v1-0.7@2.0.11)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1): - resolution: {integrity: sha512-xd1TJCqYihLpH/LkbGz9hwFDwDnNSIQd5Mmb9icqV8UCTDwp6SAzt+U3PiAfA0Iu+VULvQ5KI/98BDSsVZJTHA==} + /@layerzerolabs/lz-evm-messagelib-v2@2.0.14(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.2): + resolution: {integrity: sha512-pdyw0xiClGWOPJ9JDVaxVXbpmJiL2gGvxzW5++9QGV2erYWQptVH4tKDGpD8M6QqyV3M9lh/vbqGZnTYZKLWxA==} peerDependencies: - '@layerzerolabs/lz-evm-messagelib-v2': ^2.0.11 - '@layerzerolabs/lz-evm-protocol-v2': ^2.0.11 - '@layerzerolabs/lz-evm-v1-0.7': ^2.0.11 + '@axelar-network/axelar-gmp-sdk-solidity': ^5.6.3 + '@chainlink/contracts-ccip': ^0.7.6 + '@layerzerolabs/lz-evm-protocol-v2': ^2.0.14 + '@layerzerolabs/lz-evm-v1-0.7': ^2.0.14 '@openzeppelin/contracts': ^4.8.1 '@openzeppelin/contracts-upgradeable': ^4.8.1 hardhat-deploy: ^0.11.44 solidity-bytes-utils: ^0.8.0 dependencies: - '@layerzerolabs/lz-evm-messagelib-v2': 2.0.11(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.11)(@layerzerolabs/lz-evm-v1-0.7@2.0.11)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) - '@layerzerolabs/lz-evm-protocol-v2': 2.0.11(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) - '@layerzerolabs/lz-evm-v1-0.7': 2.0.11(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45) + '@axelar-network/axelar-gmp-sdk-solidity': 5.6.4 + '@chainlink/contracts-ccip': 0.7.6(ethers@5.7.2) + '@layerzerolabs/lz-evm-protocol-v2': 2.0.14(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.2) + '@layerzerolabs/lz-evm-v1-0.7': 2.0.14(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45) + '@openzeppelin/contracts': 4.9.5 + '@openzeppelin/contracts-upgradeable': 4.9.5 + hardhat-deploy: 0.11.45 + solidity-bytes-utils: 0.8.2 + dev: true + + /@layerzerolabs/lz-evm-oapp-v2@2.0.14(@layerzerolabs/lz-evm-messagelib-v2@2.0.14)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1): + resolution: {integrity: sha512-vqHGdyygtXN4AeMMPkDnpbuSh4HOl4uAJuuv5SAvw2KV4AEiWcZm/npXGPQNApOiks0nwXuU/TclO71woSPCxQ==} + peerDependencies: + '@layerzerolabs/lz-evm-messagelib-v2': ^2.0.14 + '@layerzerolabs/lz-evm-protocol-v2': ^2.0.14 + '@layerzerolabs/lz-evm-v1-0.7': ^2.0.14 + '@openzeppelin/contracts': ^4.8.1 + '@openzeppelin/contracts-upgradeable': ^4.8.1 + hardhat-deploy: ^0.11.44 + solidity-bytes-utils: ^0.8.0 + dependencies: + '@layerzerolabs/lz-evm-messagelib-v2': 2.0.14(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + '@layerzerolabs/lz-evm-protocol-v2': 2.0.14(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1) + '@layerzerolabs/lz-evm-v1-0.7': 2.0.14(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45) '@openzeppelin/contracts': 4.9.5 '@openzeppelin/contracts-upgradeable': 4.9.5 hardhat-deploy: 0.11.45 solidity-bytes-utils: 0.8.1(@babel/core@7.23.7) dev: true - /@layerzerolabs/lz-evm-protocol-v2@2.0.11(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1): - resolution: {integrity: sha512-hkcNheUjTOYNxoAnBTSatLLzLe71Y7kcmw1+56aazezyUb6SCu330V4sJg+jsp8Ag6Sb7y1tLLYn1Sa5EWgCxg==} + /@layerzerolabs/lz-evm-oapp-v2@2.0.14(@layerzerolabs/lz-evm-messagelib-v2@2.0.14)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.2): + resolution: {integrity: sha512-vqHGdyygtXN4AeMMPkDnpbuSh4HOl4uAJuuv5SAvw2KV4AEiWcZm/npXGPQNApOiks0nwXuU/TclO71woSPCxQ==} + peerDependencies: + '@layerzerolabs/lz-evm-messagelib-v2': ^2.0.14 + '@layerzerolabs/lz-evm-protocol-v2': ^2.0.14 + '@layerzerolabs/lz-evm-v1-0.7': ^2.0.14 + '@openzeppelin/contracts': ^4.8.1 + '@openzeppelin/contracts-upgradeable': ^4.8.1 + hardhat-deploy: ^0.11.44 + solidity-bytes-utils: ^0.8.0 + dependencies: + '@layerzerolabs/lz-evm-messagelib-v2': 2.0.14(@axelar-network/axelar-gmp-sdk-solidity@5.6.4)(@chainlink/contracts-ccip@0.7.6)(@layerzerolabs/lz-evm-protocol-v2@2.0.14)(@layerzerolabs/lz-evm-v1-0.7@2.0.14)(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.2) + '@layerzerolabs/lz-evm-protocol-v2': 2.0.14(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.2) + '@layerzerolabs/lz-evm-v1-0.7': 2.0.14(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45) + '@openzeppelin/contracts': 4.9.5 + '@openzeppelin/contracts-upgradeable': 4.9.5 + hardhat-deploy: 0.11.45 + solidity-bytes-utils: 0.8.2 + dev: true + + /@layerzerolabs/lz-evm-protocol-v2@2.0.14(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.1): + resolution: {integrity: sha512-JPdOIj2m8jgZW2I/8F5xJGD6uem1wwlz8qN1SNI4s0GHzXK8JmLn5fX8k4GND8/VtIRnZlL0zpI1FS1HT/zEeQ==} peerDependencies: '@openzeppelin/contracts': ^4.8.1 hardhat-deploy: ^0.11.44 @@ -3084,8 +3196,20 @@ packages: solidity-bytes-utils: 0.8.1(@babel/core@7.23.7) dev: true - /@layerzerolabs/lz-evm-sdk-v1@2.0.11: - resolution: {integrity: sha512-XPQlgeCpVYNJPVzg4ZPw90C06DtyiFrkmEj8j5LXibOUef4wzCj0t1C5ntXt5owRshc/QfUshURcvFVxNKPi7g==} + /@layerzerolabs/lz-evm-protocol-v2@2.0.14(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45)(solidity-bytes-utils@0.8.2): + resolution: {integrity: sha512-JPdOIj2m8jgZW2I/8F5xJGD6uem1wwlz8qN1SNI4s0GHzXK8JmLn5fX8k4GND8/VtIRnZlL0zpI1FS1HT/zEeQ==} + peerDependencies: + '@openzeppelin/contracts': ^4.8.1 + hardhat-deploy: ^0.11.44 + solidity-bytes-utils: ^0.8.0 + dependencies: + '@openzeppelin/contracts': 4.9.5 + hardhat-deploy: 0.11.45 + solidity-bytes-utils: 0.8.2 + dev: true + + /@layerzerolabs/lz-evm-sdk-v1@2.0.14: + resolution: {integrity: sha512-rBeVCxgaMbFE50cNyB3L/IzlrQELuX24j82jBo8+Y1Q9jFx8uXmIDh/cBPAshtQDaIsoE/sZsPHOQ+t9M10R5g==} dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/providers': 5.7.2 @@ -3094,16 +3218,16 @@ packages: - bufferutil - utf-8-validate - /@layerzerolabs/lz-evm-sdk-v2@2.0.11: - resolution: {integrity: sha512-xPQSxiHmeiqutrAAIXeoSjBcizG7exWl5YYhEPSsf9PCFSqTyR43++l4hU8L7L55bztmBuQ6i1DTCpzfwfD0aQ==} + /@layerzerolabs/lz-evm-sdk-v2@2.0.14: + resolution: {integrity: sha512-nFDCZPb8aPHBD27RzN//wXmOm2yeYoAn8GOh7npDlSV0o+9Reph8y6YfEPZDi4uk7o9lixGQ87pXI7TpuBDJOA==} dependencies: ethers: 5.7.2 transitivePeerDependencies: - bufferutil - utf-8-validate - /@layerzerolabs/lz-evm-v1-0.7@2.0.11(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45): - resolution: {integrity: sha512-sF2CusTwSauaduNqcbrkuWQSexSKOGZcUdVvKPZkAof/KK5thgG3Fovmzj0hXvn+C2Fnf0IszTdvPQ/NXlq+wQ==} + /@layerzerolabs/lz-evm-v1-0.7@2.0.14(@openzeppelin/contracts-upgradeable@4.9.5)(@openzeppelin/contracts@4.9.5)(hardhat-deploy@0.11.45): + resolution: {integrity: sha512-CUfHxQAT3AuDiNg6DzUgRKIs9QZa0WU61yleaz3UCUJ/8kimp6Kj+ZNMyQ8fPbpNeVUVXZxCtuWFvghcKqEo2w==} peerDependencies: '@openzeppelin/contracts': 3.4.2-solc-0.7 || ^3.4.2 || ^4.0.0 '@openzeppelin/contracts-upgradeable': 3.4.2-solc-0.7 || ^3.4.2 || ^4.0.0 @@ -3114,10 +3238,10 @@ packages: hardhat-deploy: 0.11.45 dev: true - /@layerzerolabs/lz-v2-utilities@2.0.11: - resolution: {integrity: sha512-I3HBZy4RMJ2Xu2qiTU5v3CnCDwq0zp6if0lnQcNd3u+0uaQ0Ixlavn9YrNlYl0yRAl2NoIp2eHRKTsmNOg8WXg==} + /@layerzerolabs/lz-v2-utilities@2.0.14: + resolution: {integrity: sha512-ypgXd+uJO8FAHIrkWfhuEo1gtPen2LSigLB+76yb6NFg0SxgXo7Z95Xj6Phc8shSJpSXz9R/nqQ1YRC9Vb8rkA==} dependencies: - '@layerzerolabs/lz-evm-sdk-v2': 2.0.11 + '@layerzerolabs/lz-evm-sdk-v2': 2.0.14 '@solana/web3.js': 1.87.6 ethers: 5.7.2 tiny-invariant: 1.3.1 @@ -3127,16 +3251,16 @@ packages: - utf-8-validate dev: true - /@layerzerolabs/prettier-config-next@2.0.11: - resolution: {integrity: sha512-22Uitj0mL+Tn5+hTyPCyfH8kxVuDSRcunShXEsRDx5GwypuakWlXI3I/KYA+0OOhPsY8lmGZYNgVFBb/yaUh/g==} + /@layerzerolabs/prettier-config-next@2.0.14: + resolution: {integrity: sha512-T/EHuAC9Iv7Kro8+qPOyFfoEO1bwyZI+J6dPqzklenwgbxi3J0wIlngEyZXfJg381XPIKhht9Rg0Lpp2Sv+kUw==} dependencies: prettier: 3.1.1 prettier-plugin-packagejson: 2.4.8(prettier@3.1.1) prettier-plugin-solidity: 1.3.1(prettier@3.1.1) dev: true - /@layerzerolabs/solhint-config@2.0.11(typescript@5.3.3): - resolution: {integrity: sha512-/Mfnu+zufNMxn3Xh/xZuNb9Ao2ud6Dyt6Y9o/bmwk3kJrlGC7eQFer254waNQXc47k7CvOtEbMtX3w4mMDQD9Q==} + /@layerzerolabs/solhint-config@2.0.14(typescript@5.3.3): + resolution: {integrity: sha512-nF2B0yM0+g7idoIa19BNuvgxx643TbVYNNJuFBLJAF1RHLoHRlyHUQlvqq9A9AluGRoHLb+FZwS8gz+6AIXoDg==} dependencies: solhint: 4.0.0(typescript@5.3.3) transitivePeerDependencies: @@ -4862,14 +4986,14 @@ packages: '@types/babel__traverse': 7.20.5 dev: true - /babel-plugin-polyfill-corejs2@0.4.7(@babel/core@7.23.7): - resolution: {integrity: sha512-LidDk/tEGDfuHW2DWh/Hgo4rmnw3cduK6ZkOI1NPFceSK3n/yAGeOsNT7FLnSGHkXj3RHGSEVkN3FsCTY6w2CQ==} + /babel-plugin-polyfill-corejs2@0.4.8(@babel/core@7.23.7): + resolution: {integrity: sha512-OtIuQfafSzpo/LhnJaykc0R/MMnuLSSVjVYy9mHArIZ9qTCSZ6TpWCuEKZYVoN//t8HqBNScHrOtCrIK5IaGLg==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: '@babel/compat-data': 7.23.5 '@babel/core': 7.23.7 - '@babel/helper-define-polyfill-provider': 0.4.4(@babel/core@7.23.7) + '@babel/helper-define-polyfill-provider': 0.5.0(@babel/core@7.23.7) semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -4882,18 +5006,18 @@ packages: dependencies: '@babel/core': 7.23.7 '@babel/helper-define-polyfill-provider': 0.4.4(@babel/core@7.23.7) - core-js-compat: 3.35.0 + core-js-compat: 3.35.1 transitivePeerDependencies: - supports-color dev: true - /babel-plugin-polyfill-regenerator@0.5.4(@babel/core@7.23.7): - resolution: {integrity: sha512-S/x2iOCvDaCASLYsOOgWOq4bCfKYVqvO/uxjkaYyZ3rVsVE3CeAI/c84NpyuBBymEgNvHgjEot3a9/Z/kXvqsg==} + /babel-plugin-polyfill-regenerator@0.5.5(@babel/core@7.23.7): + resolution: {integrity: sha512-OJGYZlhLqBh2DDHeqAxWB1XIvr49CxiJ2gIt61/PU55CQK4Z58OzMqjDe1zwQdQk+rBYsRc+1rJmdajM3gimHg==} peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 dependencies: '@babel/core': 7.23.7 - '@babel/helper-define-polyfill-provider': 0.4.4(@babel/core@7.23.7) + '@babel/helper-define-polyfill-provider': 0.5.0(@babel/core@7.23.7) transitivePeerDependencies: - supports-color dev: true @@ -5294,8 +5418,8 @@ packages: resolution: {integrity: sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==} engines: {node: '>=6'} - /chai@4.3.10: - resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} + /chai@4.4.1: + resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} engines: {node: '>=4'} dependencies: assertion-error: 1.1.0 @@ -5649,8 +5773,8 @@ packages: engines: {node: '>= 0.6'} dev: true - /core-js-compat@3.35.0: - resolution: {integrity: sha512-5blwFAddknKeNgsjBzilkdQ0+YK8L1PfqPYq40NOYMYFSS38qj+hpTcLLWwpIwA2A5bje/x5jmVn2tzUMg9IVw==} + /core-js-compat@3.35.1: + resolution: {integrity: sha512-sftHa5qUJY3rs9Zht1WEnmkvXputCyDBczPnr7QDgL8n3qrF3CMXY4VPSYtOLLiOUJcah2WNXREd48iOl6mQIw==} dependencies: browserslist: 4.22.2 dev: true @@ -6747,7 +6871,7 @@ packages: resolution: {integrity: sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw==} dependencies: '@babel/plugin-transform-runtime': 7.23.7(@babel/core@7.23.7) - '@babel/runtime': 7.23.7 + '@babel/runtime': 7.23.8 eth-query: 2.1.2 json-rpc-random-id: 1.0.1 pify: 3.0.0 @@ -6799,7 +6923,7 @@ packages: eth-sig-util: 1.4.2 ethereumjs-util: 5.2.1 json-rpc-engine: 5.4.0 - json-stable-stringify: 1.1.0 + json-stable-stringify: 1.1.1 node-fetch: 2.7.0 pify: 3.0.0 safe-event-emitter: 1.0.1 @@ -7400,6 +7524,10 @@ packages: resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} dev: true + /forge-std@1.1.2: + resolution: {integrity: sha512-Wfb0iAS9PcfjMKtGpWQw9mXzJxrWD62kJCUqqLcyuI0+VRtJ3j20XembjF3kS20qELYdXft1vD/SPFVWVKMFOw==} + dev: true + /form-data-encoder@1.7.1: resolution: {integrity: sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==} dev: true @@ -9198,8 +9326,8 @@ packages: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true - /json-stable-stringify@1.1.0: - resolution: {integrity: sha512-zfA+5SuwYN2VWqN1/5HZaDzQKLJHaBVMZIIM+wuYjdptkaQsqzDdqjqf+lZZJUuJq1aanHiY8LhH8LmH+qBYJA==} + /json-stable-stringify@1.1.1: + resolution: {integrity: sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.5 @@ -9286,7 +9414,7 @@ packages: requiresBuild: true dependencies: node-addon-api: 2.0.2 - node-gyp-build: 4.7.1 + node-gyp-build: 4.8.0 readable-stream: 3.6.2 dev: true @@ -10064,6 +10192,11 @@ packages: resolution: {integrity: sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==} hasBin: true + /node-gyp-build@4.8.0: + resolution: {integrity: sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==} + hasBin: true + dev: true + /node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} dev: true @@ -11476,6 +11609,13 @@ packages: - utf-8-validate dev: true + /solidity-bytes-utils@0.8.2: + resolution: {integrity: sha512-cqXPYAV2auhpdKSTPuqji0CwpSceZDu95CzqSM/9tDJ2MoMaMsdHTpOIWtVw31BIqqGPNmIChCswzbw0tHaMTw==} + dependencies: + ds-test: github.com/dapphub/ds-test/e282159d5170298eb2455a6c05280ab5a73a4ef0 + forge-std: 1.1.2 + dev: true + /solidity-comments-extractor@0.0.8: resolution: {integrity: sha512-htM7Vn6LhHreR+EglVMd2s+sZhcXAirB1Zlyrv5zBuTxieCvjfnRpd7iZk75m/u6NOlEyQ94C6TWbBn2cY7w8g==} dev: true @@ -12687,7 +12827,7 @@ packages: ethereumjs-block: 1.7.1 ethereumjs-util: 5.2.1 ethereumjs-vm: 2.6.0 - json-stable-stringify: 1.1.0 + json-stable-stringify: 1.1.1 promise-to-callback: 1.0.0 readable-stream: 2.3.8 request: 2.88.2 @@ -13216,6 +13356,12 @@ packages: /zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} + github.com/dapphub/ds-test/e282159d5170298eb2455a6c05280ab5a73a4ef0: + resolution: {tarball: https://codeload.github.com/dapphub/ds-test/tar.gz/e282159d5170298eb2455a6c05280ab5a73a4ef0} + name: ds-test + version: 1.0.0 + dev: true + github.com/ethereumjs/ethereumjs-abi/ee3994657fa7a427238e6ba92a84d0b529bbcde0: resolution: {tarball: https://codeload.github.com/ethereumjs/ethereumjs-abi/tar.gz/ee3994657fa7a427238e6ba92a84d0b529bbcde0} name: ethereumjs-abi diff --git a/tests/devtools-evm-hardhat-test/package.json b/tests/devtools-evm-hardhat-test/package.json index c33003bfb..07f1e083c 100644 --- a/tests/devtools-evm-hardhat-test/package.json +++ b/tests/devtools-evm-hardhat-test/package.json @@ -23,21 +23,21 @@ "@ethersproject/contracts": "^5.7.0", "@ethersproject/providers": "^5.7.2", "@ethersproject/wallet": "^5.7.0", - "@layerzerolabs/devtools": "~0.0.2", - "@layerzerolabs/devtools-evm": "~0.0.2", - "@layerzerolabs/devtools-evm-hardhat": "~0.0.2", - "@layerzerolabs/io-devtools": "~0.0.2", - "@layerzerolabs/lz-definitions": "~2.0.11", - "@layerzerolabs/lz-evm-messagelib-v2": "~2.0.11", - "@layerzerolabs/lz-evm-oapp-v2": "~2.0.11", - "@layerzerolabs/lz-evm-protocol-v2": "~2.0.11", - "@layerzerolabs/lz-evm-sdk-v1": "~2.0.11", - "@layerzerolabs/lz-evm-sdk-v2": "~2.0.11", - "@layerzerolabs/lz-v2-utilities": "~2.0.11", + "@layerzerolabs/devtools": "~0.0.3", + "@layerzerolabs/devtools-evm": "~0.0.3", + "@layerzerolabs/devtools-evm-hardhat": "~0.0.3", + "@layerzerolabs/io-devtools": "~0.0.3", + "@layerzerolabs/lz-definitions": "~2.0.14", + "@layerzerolabs/lz-evm-messagelib-v2": "~2.0.14", + "@layerzerolabs/lz-evm-oapp-v2": "~2.0.14", + "@layerzerolabs/lz-evm-protocol-v2": "~2.0.14", + "@layerzerolabs/lz-evm-sdk-v1": "~2.0.14", + "@layerzerolabs/lz-evm-sdk-v2": "~2.0.14", + "@layerzerolabs/lz-v2-utilities": "~2.0.14", "@layerzerolabs/omnicounter-devtools": "~0.0.2", "@layerzerolabs/omnicounter-devtools-evm": "~0.0.2", - "@layerzerolabs/protocol-devtools": "~0.0.2", - "@layerzerolabs/protocol-devtools-evm": "~0.0.2", + "@layerzerolabs/protocol-devtools": "~0.0.3", + "@layerzerolabs/protocol-devtools-evm": "~0.0.4", "@layerzerolabs/test-devtools": "~0.0.2", "@layerzerolabs/toolbox-hardhat": "~0.0.3", "@nomicfoundation/hardhat-ethers": "^3.0.5", diff --git a/tests/devtools-evm-test/package.json b/tests/devtools-evm-test/package.json index 588bb82b2..4f84af2a8 100644 --- a/tests/devtools-evm-test/package.json +++ b/tests/devtools-evm-test/package.json @@ -21,9 +21,9 @@ "@ethersproject/abstract-signer": "^5.7.0", "@ethersproject/contracts": "^5.7.0", "@ethersproject/providers": "^5.7.2", - "@layerzerolabs/devtools": "~0.0.2", - "@layerzerolabs/devtools-evm": "~0.0.2", - "@layerzerolabs/lz-definitions": "~2.0.11", + "@layerzerolabs/devtools": "~0.0.3", + "@layerzerolabs/devtools-evm": "~0.0.3", + "@layerzerolabs/lz-definitions": "~2.0.14", "@layerzerolabs/test-devtools": "~0.0.2", "@nomicfoundation/hardhat-ethers": "^3.0.5", "@nomiclabs/hardhat-ethers": "^2.2.3", diff --git a/tests/test-devtools-evm/.eslintignore b/tests/test-devtools-evm/.eslintignore new file mode 100644 index 000000000..0f295f243 --- /dev/null +++ b/tests/test-devtools-evm/.eslintignore @@ -0,0 +1,3 @@ +.turbo +dist +node_modules \ No newline at end of file diff --git a/tests/test-devtools-evm/.eslintrc.json b/tests/test-devtools-evm/.eslintrc.json new file mode 100644 index 000000000..be97c53fb --- /dev/null +++ b/tests/test-devtools-evm/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "../../.eslintrc.json" +} diff --git a/tests/test-devtools-evm/README.md b/tests/test-devtools-evm/README.md new file mode 100644 index 000000000..de4dc0ef0 --- /dev/null +++ b/tests/test-devtools-evm/README.md @@ -0,0 +1,23 @@ +

+ + LayerZero + +

+ +

@layerzerolabs/ua-devtools-evm

+ + +

+ + NPM Version + + Downloads + + NPM License +

+ +## Installation + +```sh +$ npm install @layerzerolabs/ua-devtools-evm +``` diff --git a/examples/oapp/test/foundry/OptionsHelper.sol b/tests/test-devtools-evm/contracts/OptionsHelper.sol similarity index 100% rename from examples/oapp/test/foundry/OptionsHelper.sol rename to tests/test-devtools-evm/contracts/OptionsHelper.sol diff --git a/examples/oapp/test/foundry/TestHelper.sol b/tests/test-devtools-evm/contracts/TestHelper.sol similarity index 100% rename from examples/oapp/test/foundry/TestHelper.sol rename to tests/test-devtools-evm/contracts/TestHelper.sol diff --git a/examples/oapp/test/foundry/mocks/ExecutorFeeLibMock.sol b/tests/test-devtools-evm/contracts/mocks/ExecutorFeeLibMock.sol similarity index 99% rename from examples/oapp/test/foundry/mocks/ExecutorFeeLibMock.sol rename to tests/test-devtools-evm/contracts/mocks/ExecutorFeeLibMock.sol index a2be7f4ca..48e5d4898 100644 --- a/examples/oapp/test/foundry/mocks/ExecutorFeeLibMock.sol +++ b/tests/test-devtools-evm/contracts/mocks/ExecutorFeeLibMock.sol @@ -1,5 +1,4 @@ // SPDX-License-Identifier: UNLICENSED - pragma solidity ^0.8.22; import { ExecutorFeeLib } from "@layerzerolabs/lz-evm-messagelib-v2/contracts/ExecutorFeeLib.sol"; diff --git a/examples/oapp/test/foundry/mocks/OFTComposerMock.sol b/tests/test-devtools-evm/contracts/mocks/OFTComposerMock.sol similarity index 96% rename from examples/oapp/test/foundry/mocks/OFTComposerMock.sol rename to tests/test-devtools-evm/contracts/mocks/OFTComposerMock.sol index 26354d4ad..50609d4e2 100644 --- a/examples/oapp/test/foundry/mocks/OFTComposerMock.sol +++ b/tests/test-devtools-evm/contracts/mocks/OFTComposerMock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.0; +pragma solidity ^0.8.22; import { IOAppComposer } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppComposer.sol"; diff --git a/examples/oapp/test/foundry/mocks/OFTInspectorMock.sol b/tests/test-devtools-evm/contracts/mocks/OFTInspectorMock.sol similarity index 93% rename from examples/oapp/test/foundry/mocks/OFTInspectorMock.sol rename to tests/test-devtools-evm/contracts/mocks/OFTInspectorMock.sol index 63f5197a7..2784b160d 100644 --- a/examples/oapp/test/foundry/mocks/OFTInspectorMock.sol +++ b/tests/test-devtools-evm/contracts/mocks/OFTInspectorMock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.0; +pragma solidity ^0.8.22; import { IOAppMsgInspector } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oapp/interfaces/IOAppMsgInspector.sol"; diff --git a/examples/oapp/test/foundry/mocks/SendUln302Mock.sol b/tests/test-devtools-evm/contracts/mocks/SendUln302Mock.sol similarity index 97% rename from examples/oapp/test/foundry/mocks/SendUln302Mock.sol rename to tests/test-devtools-evm/contracts/mocks/SendUln302Mock.sol index 2524cfb91..5df282d69 100644 --- a/examples/oapp/test/foundry/mocks/SendUln302Mock.sol +++ b/tests/test-devtools-evm/contracts/mocks/SendUln302Mock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.0; +pragma solidity ^0.8.22; import { Packet } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol"; import { MessagingFee } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol"; diff --git a/examples/oapp/test/foundry/mocks/SimpleMessageLibMock.sol b/tests/test-devtools-evm/contracts/mocks/SimpleMessageLibMock.sol similarity index 96% rename from examples/oapp/test/foundry/mocks/SimpleMessageLibMock.sol rename to tests/test-devtools-evm/contracts/mocks/SimpleMessageLibMock.sol index 344832e01..32715d79f 100644 --- a/examples/oapp/test/foundry/mocks/SimpleMessageLibMock.sol +++ b/tests/test-devtools-evm/contracts/mocks/SimpleMessageLibMock.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.0; +pragma solidity ^0.8.22; import { SimpleMessageLib } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/SimpleMessageLib.sol"; diff --git a/tests/test-devtools-evm/package.json b/tests/test-devtools-evm/package.json new file mode 100644 index 000000000..868628eb7 --- /dev/null +++ b/tests/test-devtools-evm/package.json @@ -0,0 +1,39 @@ +{ + "name": "@layerzerolabs/test-devtools-evm", + "version": "0.0.1", + "description": "Helpers for testing LayerZero EVM contracts", + "repository": { + "type": "git", + "url": "git+https://github.com/LayerZero-Labs/devtools.git", + "directory": "packages/test-devtools-evm" + }, + "license": "MIT", + "files": [ + "contracts/" + ], + "scripts": { + "lint": "$npm_execpath eslint '**/*.{js,ts,json}'" + }, + "devDependencies": { + "@layerzerolabs/lz-evm-messagelib-v2": "~2.0.14", + "@layerzerolabs/lz-evm-oapp-v2": "~2.0.14", + "@layerzerolabs/lz-evm-protocol-v2": "~2.0.14", + "@layerzerolabs/lz-evm-v1-0.7": "~2.0.14", + "@openzeppelin/contracts": "^4.9.5", + "@openzeppelin/contracts-upgradeable": "^4.9.5", + "@types/node": "~18.18.14", + "ts-node": "^10.9.2", + "typescript": "^5.3.3" + }, + "peerDependencies": { + "@layerzerolabs/lz-evm-messagelib-v2": "~2.0.7", + "@layerzerolabs/lz-evm-oapp-v2": "~2.0.7", + "@layerzerolabs/lz-evm-protocol-v2": "~2.0.7", + "@layerzerolabs/lz-evm-v1-0.7": "~2.0.7", + "@openzeppelin/contracts": "^4.9.5", + "@openzeppelin/contracts-upgradeable": "^4.9.5" + }, + "publishConfig": { + "access": "restricted" + } +} diff --git a/tests/test-devtools/package.json b/tests/test-devtools/package.json index 090f73606..f9883c51a 100644 --- a/tests/test-devtools/package.json +++ b/tests/test-devtools/package.json @@ -29,7 +29,7 @@ "lint": "$npm_execpath eslint '**/*.{js,ts,json}'" }, "devDependencies": { - "@layerzerolabs/lz-definitions": "~2.0.11", + "@layerzerolabs/lz-definitions": "~2.0.14", "fast-check": "^3.15.0", "ts-node": "^10.9.2", "tslib": "~2.6.2", diff --git a/tests/ua-devtools-evm-hardhat-test/package.json b/tests/ua-devtools-evm-hardhat-test/package.json index d70299371..299b6cfe8 100644 --- a/tests/ua-devtools-evm-hardhat-test/package.json +++ b/tests/ua-devtools-evm-hardhat-test/package.json @@ -22,21 +22,21 @@ "@ethersproject/contracts": "^5.7.0", "@ethersproject/providers": "^5.7.2", "@ethersproject/wallet": "^5.7.0", - "@layerzerolabs/devtools": "~0.0.2", + "@layerzerolabs/devtools": "~0.0.3", "@layerzerolabs/devtools-evm": "~0.0.3", "@layerzerolabs/devtools-evm-hardhat": "~0.0.3", "@layerzerolabs/io-devtools": "~0.0.3", - "@layerzerolabs/lz-definitions": "~2.0.11", - "@layerzerolabs/lz-evm-messagelib-v2": "~2.0.11", - "@layerzerolabs/lz-evm-oapp-v2": "~2.0.11", - "@layerzerolabs/lz-evm-protocol-v2": "~2.0.11", - "@layerzerolabs/lz-evm-sdk-v1": "~2.0.11", - "@layerzerolabs/lz-evm-sdk-v2": "~2.0.11", - "@layerzerolabs/lz-v2-utilities": "~2.0.11", + "@layerzerolabs/lz-definitions": "~2.0.14", + "@layerzerolabs/lz-evm-messagelib-v2": "~2.0.14", + "@layerzerolabs/lz-evm-oapp-v2": "~2.0.14", + "@layerzerolabs/lz-evm-protocol-v2": "~2.0.14", + "@layerzerolabs/lz-evm-sdk-v1": "~2.0.14", + "@layerzerolabs/lz-evm-sdk-v2": "~2.0.14", + "@layerzerolabs/lz-v2-utilities": "~2.0.14", "@layerzerolabs/omnicounter-devtools": "~0.0.2", "@layerzerolabs/omnicounter-devtools-evm": "~0.0.2", - "@layerzerolabs/protocol-devtools": "~0.0.2", - "@layerzerolabs/protocol-devtools-evm": "~0.0.3", + "@layerzerolabs/protocol-devtools": "~0.0.3", + "@layerzerolabs/protocol-devtools-evm": "~0.0.4", "@layerzerolabs/toolbox-hardhat": "~0.0.3", "@layerzerolabs/ua-devtools": "~0.0.2", "@layerzerolabs/ua-devtools-evm": "~0.0.2",