Skip to main content

Questions tagged [logs]

Questions dealing with the contracts or clients logs. The tag "events" may be more appropriate, see https://ethereum.stackexchange.com/questions/tagged/events

Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

How to export logs in foundry fuzz tests?

I am trying to visualise how often each (logic) branch of the fuzz code is reached. I did not know how to keep a tracker inside a forge .sol test file that undergoes multiple fuzz test calls (because ...
a.t.'s user avatar
  • 79
0 votes
1 answer
10 views

What search filter value use to find hexadecimal indexed events logs?

I am trying to retrieve logs per topic, but I am having trouble retrieving the values. I have the following event defined in the SC: event Log( uint256 indexed dHash, uint256 timestamp ); ...
UnexpectedCharacter's user avatar
0 votes
0 answers
20 views

Smart Contract version update doubts

It is possible to update smart contracts using unstructured storage. But I have some doubts. Would it keep the same address as the first SC? Would it keep the persistence of the log information, or ...
UnexpectedCharacter's user avatar
0 votes
0 answers
8 views

eth_getBlockByNumber loop in truffle genache

When writing contracts and testing them with truffle develop, I like to have two terminals: truffle develop --log truffle develop One is for logs so I see what is happening and in another one I test. ...
user680891's user avatar
2 votes
0 answers
27 views

Where is EVM state and transaction journal stored?

The question of where and how special data structures are stored (and appear!) on the node: the state of the EVM (where the current values of all variables of all smart contracts are stored) and the ...
Sergey Ivanow's user avatar
0 votes
1 answer
17 views

Displaying terminal logs while calling a function from a specific wallet in Forge test?

Context As part of a test I would like to assert the funds from wallet investorWallet are reduced with the investmentAmount after an investment is made (by calling the receiveInvestment function in ...
a.t.'s user avatar
  • 79
2 votes
3 answers
69 views

How does Etherscan decode unverified contracts events?

Etherscan is able to decode event data from unverified contracts, even without an exposed ABI. Below is an example screenshot. No signature available for this event. I've been able to replicate the ...
user130657's user avatar
2 votes
1 answer
82 views

Foundry Logging no longer working for contracts in lib folder?

My fuzz tests are calling Smart Contracts in my lib/ folder. In these tests, I'm trying to log variables, but nothing is logged. Yes, I'm using -vv. I even increased verbosity (all the way up to -...
António Gonçalves's user avatar
2 votes
1 answer
43 views

How to correctly pack Log data in Go

Using go-ethereum, I want to convert a struct containing my log fields into a types.Log{} object containing the data bytes and topics. Essentially, I want to do the opposite of the Parse<EventName&...
Ryan Collingham's user avatar
0 votes
1 answer
202 views

Disconnected from ETH websocket after timeout error [Python]

i'm trying to listen to eth websocket using python's web3 library, particularly listening to log events. async def ws_v2_subscription_context_manager_example(): while True: try: async with ...
germor197's user avatar
0 votes
1 answer
144 views

ethers js queryFilter for ERC20 list of addresses

Is there a way to get the list of transferred ERC20 tokens to a list of addresses in one call. Right now I am running const events = await contract.queryFilter(erc20Contract.filters.Transfer, ...
klugjo's user avatar
  • 113
0 votes
1 answer
14 views

Are errors emitted as logs on the blockchain?

Say if an error is caused due to a revert statement will it be emitted as an event so front end application will be aware or not?
davidastro's user avatar
1 vote
1 answer
194 views

How to fetch events emitted in a deployment transaction using ethers JS?

The newest Transparent Proxy from Openzeppelin deploys the admin contract by itself and emits an event from where we can find the admin contract's address. This event is emitted during the deployment ...
Zartaj Afser's user avatar
  • 4,529
0 votes
1 answer
124 views

Solidity Event String parameter decoding

The value of aggregatorId in the event emitted by the below tx is not equal to value “oneInchV5FeeDynamic” in the tx? Also, I can’t decode the value emitted in the event “...
Waiz Khan's user avatar
0 votes
1 answer
307 views

Querying events using ethersjs provides logs with unrelated contract addresses

The UniswapV2Factory contract has the following event: event PairCreated(address indexed token0, address indexed token1, address pair, uint) I am using etherjs to detect all events on chain in the ...
RamanSB's user avatar
  • 103
1 vote
0 answers
53 views

Transaction involving contract and ETH

I have a problem in Web3. I'm trying to obtain data from an ETH transaction but it involves a contract (Coinbase 10). From what I understand of the transaction, it looks a lot like token transactions (...
Alison Silva's user avatar
2 votes
1 answer
85 views

Prove that an Event didn't happen in the Blockchain

I'm working on a Solidity token-vesting contract that allows users to claim tokens based on how long they met certain conditions. To illustrate, let's assume holders of a specific NFT can claim 100 ...
Ernani's user avatar
  • 121
0 votes
2 answers
230 views

Get multiple ETH transactions

I'm a little new to Web3, and in NodeJS I'm trying to create a deposit-aware system. Today I'm doing the following: ETH Transactions: Get it through getBlock, and check whether the "to" of ...
Alison Silva's user avatar
0 votes
0 answers
63 views

How to parse multi-transfer transactions

Ok, I know how to parse the 'input' field of a transaction: we look for '0xa9059cbb' or '0x23b872dd' bytes at the beginning, if found: we split the rest of the 'input' field by 64-length strings ...
remort's user avatar
  • 101
2 votes
0 answers
247 views

console.log results in Anvil output

I am using the library forge-std/console.sol in a contract for debugging purposes and execute the corresponding functions on a local Anvil network. I use Cast to send the transaction to the network. ...
Sebastian Dine's user avatar
1 vote
1 answer
245 views

Using web3.py to filter previous transactions by swap, returns empty array

I am using the web3 python package to filter transactions using the transfer function. The issue is no matter what I try to do, w3.filter.get_all_entries() returns an empty array. Any ideas as to why ...
stooks's user avatar
  • 11
0 votes
1 answer
14 views

Why we use 'log' in Vyper?

What is the usage of the log? I want to get some examples of why 'log' is used in vyper
Wonjae Choi's user avatar
1 vote
1 answer
74 views

How do I search and audit the transaction logs I submit through QuickNode?

I'm using QuickNode to submit transaction logs, does anybody know how to search and audit these logs? - elchuo160
Jesus Silva's user avatar
1 vote
0 answers
28 views

What is wrong with this function that is supposed to listen to an event from a smart contract?

I am essentially just trying to create a simple API that listens to this one event on a smart contract I created but for some reason the function doesn't output anything. I am pretty sure it has ...
Naander's user avatar
  • 11
2 votes
1 answer
88 views

What is the meaning of transfer logs originating from the address "0x00...00"?

Some Ethereum transfer event logs have the address 0x000..00 in their from field. such as the log in the image, from tx with hash 0x60085d9f157a8426b3d2795de6cebbd4b50d541445be08e23f2b458d4bd0e60e ...
M. Azyoksul's user avatar
0 votes
1 answer
174 views

Why is dangerous to share metamask logs?

Sorry for the noob question, but if the Metamask logs don't contain a secret phrase, why is it dangerous to share it online? Also, can hackers get hold of my Metamask wallet logs without hacking my ...
Alder's user avatar
  • 1
2 votes
1 answer
29 views

Why do events with arguments of custom types appear fully-encoded in Tx Logs?

You can observe the behavior via the following contract which I've deployed to Polygon Mumbai at 0x33c059160280a45725d9509c120c6b30a44a61a4: pragma solidity ^0.8.19; contract EventWithCustomTypeArg { ...
Iaroslav's user avatar
  • 365
0 votes
1 answer
50 views

Is there a way to enable logs for graph commands?

I am running the following version of graph-cli: @graphprotocol/graph-cli/0.42.4 linux-x64 node-v18.15.0 Is there a way to setup a log or have more details after each command gets executed?
Falcon Stakepool's user avatar
1 vote
1 answer
630 views

Decoding logs of Approval event with web3js results in error

I am trying to decode the Approval event of an ERC721 contract. I fetch the logs for the contract with the alchemy API and then try to decode them with web3js. The code looks like this: const logs = ...
rajohs's user avatar
  • 179
0 votes
1 answer
52 views

Could not find corresponding event log from 0x aggregator contract

Looking at the event log from the 0x Protocol aggregator contract ("0xdef1c0ded9bec7f1a1670819833240f027b25eff"), I could not find corresponding event to the following log topics0 "...
Shigami's user avatar
  • 26
1 vote
0 answers
39 views

How to identify where coin/token value is changed

I'd like to build an algorithm that analyzes value creation, transfer and destruction on a blockchain (such as new ETH minted, ETH gas burned, ERC-20 tokens transferred, etc.). Assuming I have a ...
Michael C's user avatar
0 votes
2 answers
515 views

How can I parse an Ethereum block-level logsBloom?

I have been downloading blocks from EVM-based blockchains via the JSON-RPC API via eth_getBlockByNumber. In the block there is a logsBloom element which, if I understand this correctly, is an ...
Michael C's user avatar
1 vote
1 answer
251 views

How to identify contracts created using deployer contracts from the logs?

I am interested in keeping track of each new contract created on Ethereum. So far, I have been looking at the transaction logs, there is a field to if this field has no value, that means it is a ...
Crypto Man's user avatar
0 votes
1 answer
229 views

How to get events pushed instead of polling in Ethereum?

I am trying to see how I can subscribe to an events on the Ethereum blockchain and I can only see polling mechanism and no push mechansim I am look at the documentation for the JSON RPC endpoints here ...
Finlay Weber's user avatar
1 vote
1 answer
178 views

web3.eth.subscribe with logs does not return transactions for some wallets

I have given logs = [] as a setting and this works for the tether wallet: 0xdAC17F958D2ee523a2206206994597C13D831ec7 but does not work for the bybit exchange wallet: ...
ripbozo's user avatar
  • 23
1 vote
1 answer
370 views

web3py get_logs() can't find my log

I'm trying to retrieve Uniswap logs via web3py. Why doesn't my get_logs query match the last log of txn 0xb576ab12c999e20737f478044cd5b0e22c2b324c4125f88404de656f16cd8da4? Same result for Quicknode ...
tba's user avatar
  • 111
0 votes
1 answer
138 views

How to make sense of the Etherscan logs API?

I'm trying to practice making api calls to etherscan using python, and I built a function that calls the Get Event Logs endpoint for the staked aave address: 0x4da27a545c0c5B758a6BA100e3a049001de870f5....
LT41's user avatar
  • 1
5 votes
1 answer
749 views

Is it possible to read event logs on-chain?

I'm integrating with a 3rd party contract, and I need a memory variable that they emit. Is it possible to read logs on-chain?
Ryan Sea's user avatar
  • 638
0 votes
1 answer
53 views

How to show transaction logs message on frontend to user as alert message?

I want to show condition in require as a message on frontend to user as alert message like 'wait for 5 minutes or wait while transaction is being processed'. In console.log, I can see this message but ...
vishal's user avatar
  • 23
1 vote
1 answer
55 views

Is it possible to determine how many logs a block contains from the newHeader logsBloom?

given this block header example: { parentHash: '0x3fb321ef847c655e0a3bac64e6bac1a2d3d479c602dab0523e48dc94533e80c8', sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347'...
Tom's user avatar
  • 11
0 votes
1 answer
2k views

Values from ethers.utils.defaultAbiCoder.decode() and web3.eth.abi.decodeLog() are different than expected

After submitting a transaction. I'd like to get information from the event generated. event GameCreated(uint256 gameId, uint256 wager, address Player1); We tried this with both Ethers Library and ...
Royce Duong's user avatar
0 votes
1 answer
52 views

Ethereum Undecodable logs

I have encountered this transaction where all of its logs were undecodable. If you see the value of topic0 in events logs, it is function signature but ideally it should be the event signature. From ...
shadow's user avatar
  • 25
0 votes
1 answer
332 views

How to log / trace method calls in Solidity

Is there a way to know which methods were called/triggered during a run? Sometimes a chain of methods are called within the smart contract (implicitly or explicitly) and it would be beneficial to know ...
Pedro's user avatar
  • 1
0 votes
1 answer
349 views

eth_subscribe for logs on alchemy

I am trying to subscribe to log events on ETH mainnet using alchemy provider as explained here The subscription request returns successful response but I am not receiving any notifications at all Here ...
Tim Denisenko's user avatar
0 votes
1 answer
580 views

eth_getLogs request works for Eth Mainnet, but not polygon mumbai. Error -32602, missing value for required argument 0

I'm trying to get do a eth_getLogs call, but I'm having problems getting a response with the Polygon chains. Strangely, I make the request with Polygon Mainnet data that I know exists, but when I do I ...
flutterisbae's user avatar
0 votes
2 answers
107 views

Suppress smart contract console.log output

Is there a good, clean and easy way to suppress console.log() output from smart contracts without removing the log statements from the source code? i.e. I don't want to see the smart contract log ...
sola24's user avatar
  • 1,238
11 votes
1 answer
9k views

from solidity: TypeError: Member "log" not found or not visible after argument-dependent lookup in type(library console)

from solidity: TypeError: Member "log" not found or not visible after argument-dependent lookup in type(library console). Im using hardhats lib "hardhat/console.sol"; I want to ...
Syed Murtaza Ali Shah's user avatar
0 votes
1 answer
495 views

Differenciate logs entry Approval between ERC20 and ERC721

For a dapp, I'm currently focused on the Approval event to track and list the tokens approvals for a given address. ERC20 and ERC721 are quite similar. They offer Approval events : ERC20 : Approval(...
antonio-fr's user avatar
1 vote
0 answers
615 views

How to know that logs for a block are available

Following code snippet: const latestBlock = await provider.getBlockNumber() const logs = await provider.getLogs({ fromBlock: latestBlock, toBlock: latestBlock, }) if (logs....
vertti's user avatar
  • 111
0 votes
2 answers
266 views

Can I get more specific metadata for a certain transaction hash from a basic RPC connection (e.g. Infura)

I am trying to deploy a "verifyTx(tx_hash){}" function that takes a hash and tells me the state (succ vs. fail vs. pending), but I was hoping to get more advanced information on the hash if ...
jdero's user avatar
  • 101

1
2 3 4 5