Skip to content

Commit c9a81ca

Browse files
committed
final cleanup
1 parent 6e85db9 commit c9a81ca

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

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

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,29 +1492,6 @@ contract EntropyTest is Test, EntropyTestUtils, EntropyEvents {
14921492
assertEq(req.gasLimit10k, 10);
14931493
}
14941494

1495-
function testRequestWithCallbackAndCustomGasLimit() public {
1496-
uint32 defaultGasLimit = 100000;
1497-
uint32 customGasLimit = 200000;
1498-
1499-
vm.prank(provider1);
1500-
random.setDefaultGasLimit(defaultGasLimit);
1501-
1502-
bytes32 userRandomNumber = bytes32(uint(42));
1503-
uint fee = random.getFeeForGas(provider1, customGasLimit);
1504-
1505-
vm.deal(user1, fee);
1506-
vm.prank(user1);
1507-
uint64 sequenceNumber = random.requestWithCallbackAndGasLimit{
1508-
value: fee
1509-
}(provider1, userRandomNumber, customGasLimit);
1510-
1511-
EntropyStructs.Request memory req = random.getRequest(
1512-
provider1,
1513-
sequenceNumber
1514-
);
1515-
assertEq(req.gasLimit10k, 20);
1516-
}
1517-
15181495
function testGasLimitsAndFeeRounding() public {
15191496
vm.prank(provider1);
15201497
random.setDefaultGasLimit(20000);
@@ -1768,7 +1745,8 @@ contract EntropyConsumer is IEntropyConsumer {
17681745
bytes32 _randomness
17691746
) internal override {
17701747
uint256 startGas = gasleft();
1771-
1748+
// These seemingly innocuous instructions are actually quite expensive
1749+
// (~60k gas) because they're writes to contract storage.
17721750
sequence = _sequence;
17731751
provider = _provider;
17741752
randomness = _randomness;

0 commit comments

Comments
 (0)