New answers tagged events
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 ...
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 ...
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.
...
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 = ...
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 ...
Top 50 recent answers are included
Related Tags
events × 869solidity × 264
web3js × 252
logs × 114
go-ethereum × 76
contract-development × 73
ethers.js × 59
transactions × 48
truffle × 44
javascript × 43
contract-design × 37
web3.py × 37
filters × 36
contract-invocation × 28
etherscan × 27
blockchain × 25
remix × 22
nodejs × 21
websocket × 21
dapp-development × 20
event-handling × 20
infura × 19
hardhat × 19
erc-20 × 18
storage × 18