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

Raise executor msg.value cap and add func to allow user configuration #4

Merged
merged 1 commit into from
Dec 21, 2023
Merged
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
13 changes: 12 additions & 1 deletion oapp/test/TestHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,20 @@ contract TestHelper is Test, OptionsHelper {

uint256 public constant TREASURY_GAS_CAP = 1000000000000;
uint256 public constant TREASURY_GAS_FOR_FEE_CAP = 100000;

uint128 public executorValueCap = 0.1 ether;

function setUp() public virtual {}

/**
* @dev set executorValueCap if more than 0.1 ether is necessary
* @dev this must be called prior to setUpEndpoints() if the value is to be used
* @param _valueCap amount executor can pass as msg.value to lzReceive()
*/
function setExecutorValueCap(uint128 _valueCap) public {
executorValueCap = _valueCap;
}

/**
* @dev setup the endpoints
* @param _endpointNum num of endpoints
Expand Down Expand Up @@ -173,7 +184,7 @@ contract TestHelper is Test, OptionsHelper {
baseGas: 5000,
multiplierBps: 10000,
floorMarginUSD: 1e10,
nativeCap: 1 gwei
nativeCap: executorValueCap
});

uint128 denominator = priceFeed.getPriceRatioDenominator();
Expand Down