Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: init mock ulnOptions in setUp() #21

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion oapp/test/OptionsHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract UlnOptionsMock {
}

contract OptionsHelper {
UlnOptionsMock ulnOptions = new UlnOptionsMock();
UlnOptionsMock ulnOptions;

function _parseExecutorLzReceiveOption(bytes memory _options) internal view returns (uint256 gas, uint256 value) {
(bool exist, bytes memory option) = _getExecutorOptionByOptionType(
Expand Down
6 changes: 4 additions & 2 deletions oapp/test/TestHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/I
import { OApp } from "../contracts/oapp/OApp.sol";
import { OptionsBuilder } from "../contracts/oapp/libs/OptionsBuilder.sol";

import { OptionsHelper } from "./OptionsHelper.sol";
import { OptionsHelper, UlnOptionsMock } from "./OptionsHelper.sol";
import { SendUln302Mock as SendUln302 } from "./mocks/SendUln302Mock.sol";
import { SimpleMessageLibMock } from "./mocks/SimpleMessageLibMock.sol";
import "./mocks/ExecutorFeeLibMock.sol";
Expand All @@ -53,7 +53,9 @@ contract TestHelper is Test, OptionsHelper {

uint128 public executorValueCap = 0.1 ether;

function setUp() public virtual {}
function setUp() public virtual {
ulnOptions = new UlnOptionsMock();
}

/**
* @dev set executorValueCap if more than 0.1 ether is necessary
Expand Down