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
1 vote
1 answer
57 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
16 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
70 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
34 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
12 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
2 votes
1 answer
79 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
  • 3,239
0 votes
1 answer
95 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
63 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
  • 101
1 vote
0 answers
50 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
78 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
170 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
49 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
175 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
143 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
11 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
64 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
0 votes
0 answers
52 views

GETH // Stopping work on payload reason=timeout // is this standard behaviour?

I am currently running a node via the rocketpool docker, with geth and Prysm as my clients. I noticed relatively recently, perhaps since Shapella, that all my 'Stopping work on payload' notifications ...
Gutbeer's user avatar
0 votes
0 answers
57 views

Scalable way to listen dynamically added contracts in web3j

Consider I need to listen to the event logs for a Uniswap's Swap method, which works perfect for a single CA, or even to many if they are known to the time of creation of filter: web3j.ethLogFlowable(...
0xMixer's user avatar
1 vote
0 answers
27 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
0 votes
0 answers
84 views

How to visualize swaps? Lack of data from ethereum-etl

I try to visualize Ethereum transactions (e.g. swaps). For example, transaction: 0x1baabee4222c06f4772c4655e3e8bb7c57659ba7d47f04c73a10fcc454a4eb54. I used ethereum-etl to download data about this ...
kris's user avatar
  • 1
2 votes
1 answer
68 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
141 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
28 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
  • 299
0 votes
1 answer
26 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
519 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
51 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
38 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
399 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
217 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
182 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
146 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
320 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
127 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
687 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
  • 618
0 votes
1 answer
51 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
52 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
48 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
313 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
304 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 ...
user2899257's user avatar
0 votes
1 answer
548 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
88 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,228
10 votes
1 answer
8k 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
447 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
591 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
253 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 vote
1 answer
597 views

How to differentiate between topics and data in an event ABI?

I'm trying to recreate the ABI of an event function (that I don't have the ABI for). I have looked at event ABIs in other contracts of the same project and they all look like this: {"anonymous&...
uzumaki's user avatar
  • 133
0 votes
0 answers
24 views

What is main reason Events/Logs exist in solidity [duplicate]

When I started learning Solidity I saw Event/Log functionality. After a little bit of research, it got me a little confused. As far as I understand Event/Log (I use these words interchangeably because ...
Murad Sofi's user avatar
0 votes
1 answer
256 views

How can I get returnValues from method getPastEvents?

// This is where I get the event information. const myEvent = myContract.getPastEvents('nftCreated', {fromBlock: 10230636}) // Then the log is something like this: Promise { ...
SDX21's user avatar
  • 3
3 votes
1 answer
806 views

Get logs for a transaction without actually sending the transaction

I'm trying to simulate a transaction without actually sending the transaction. The trace_call method (on Alchemy) returns 3 types of traces - vmTrace, trace, stateDiff. The trace object returns all ...
pbsh's user avatar
  • 2,411

1
2 3 4 5