LayerZero-Labs / LayerZero-v2

Other
542 stars 327 forks source link

Fix packet delivery in mock test suite by adjusting TX expiry. #5

Closed Zodomo closed 9 months ago

Zodomo commented 9 months ago

The packet expiry timestamp enforced by the DVN was set to 1000. Setting it to block.timestamp + 1000 fixed my issues with using TestHelper locally in an integrating project. Many thanks to @carmenjiawenc from the L0 team for helping us track down this issue.

Willisplayed commented 9 months ago

// SPDX-License-Identifier: MIT pragma solidity ^0.8.22;

import { IOApp, ILayerZeroEndpointV2 } from "./interfaces/IOApp.sol"; import { OAppSender } from "./OAppSender.sol"; // @dev import the origin so its exposed to OApp implementers import { OAppReceiver, Origin } from "./OAppReceiver.sol";

abstract contract OApp is IOApp, OAppSender, OAppReceiver { constructor(address _endpoint, address _owner) { _transferOwnership(_owner); endpoint = ILayerZeroEndpointV2(_endpoint); }

function oAppVersion() public pure virtual returns (uint64 senderVersion, uint64 receiverVersion) {
    senderVersion = SENDER_VERSION;
    receiverVersion = RECEIVER_VERSION;
}

}