Skip to content

Commit 53690d2

Browse files
committed
added gas benchmark tests
1 parent f1183f1 commit 53690d2

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

target_chains/ethereum/contracts/forge-test/GasBenchmark.t.sol

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,36 @@ contract GasBenchmark is Test, WormholeTestUtils, PythTestUtils {
240240
);
241241
}
242242

243+
function testBenchmarkParsePriceFeedUpdatesWithConfigTrue() public {
244+
bytes32[] memory ids = new bytes32[](1);
245+
ids[0] = priceIds[0];
246+
247+
pyth.parsePriceFeedUpdatesWithConfig{value: freshPricesUpdateFee[0]}(
248+
freshPricesUpdateData[0],
249+
ids,
250+
0,
251+
50,
252+
false,
253+
true, // check minimal
254+
true
255+
);
256+
}
257+
258+
function testBenchmarkParsePriceFeedUpdatesWithConfigFalse() public {
259+
bytes32[] memory ids = new bytes32[](1);
260+
ids[0] = priceIds[0];
261+
262+
pyth.parsePriceFeedUpdatesWithConfig{value: freshPricesUpdateFee[0]}(
263+
freshPricesUpdateData[0], // contains only priceIds[0]
264+
ids,
265+
0,
266+
50,
267+
false,
268+
true, // check minimal
269+
true
270+
);
271+
}
272+
243273
function testBenchmarkParsePriceFeedUpdatesUniqueFor() public {
244274
bytes32[] memory ids = new bytes32[](1);
245275
ids[0] = priceIds[0];

0 commit comments

Comments
 (0)