Skip to main content

New answers tagged

1 vote

Why does an emitted event with "good ordering" consume more gas in Solidity, and how does argument order affect gas costs?

Based on my testing of the ordering behavior of static and dynamic fields in events, it’s not behaving as expected. To ensure a guaranteed reduction in the gas cost of event emissions, you can avoid ...
SYED ASAD KAZMI's user avatar
1 vote
Accepted

How to reconstruct UnivswapV3 pool TVL and liquidity via ordered events?

It's possible to track the evolution both values via events. (Stress on the "evolution" bit, if you only need just the latest state, this answer is more relevant.) The following events ...
kfx's user avatar
  • 1,750
0 votes

How to expect a function call to not emit an event in foundry

It can be achieved with a combination of both vm.recordLogs and vm.getRecordedLogs. function test_myFunction_NoLogs() public { // Start recording logs. vm.recordLogs(); // Execute logic. ...
tinom9's user avatar
  • 256
1 vote
Accepted

Create/set "subId" by createSubscription() and get "subId" vrfCoordinatorV2_5Mock calling by javascript in hardhat environment

Instead of events, it should be the logs array, inside the createSubIdReceipt object. So, replace this line: subscriptionId = createSubIdReceipt.events[0].args.subId with: subscriptionId = ...
SYED ASAD KAZMI's user avatar
0 votes

how can i send a transaction in spesific block numbers with web3Js?

To send a transaction at a specific block (like 11008804) and skip the high-tax blocks (11008801 to 11008803), you should avoid relying on time-based delays. The reason is that block times on Ethereum ...
DevSavyy's user avatar

Top 50 recent answers are included