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
0 answers
9 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 ...
user avatar
0 votes
0 answers
11 views

Smart contract logs problem

Im studing some marketplace of nft smart contract, I not understand about logs use. In particular, when post a nft for selling, the smart contract assign an order number, this order number can find in ...
user avatar
0 votes
0 answers
11 views

How to get the transactions that have logs from a getBlockByNumber call?

I am interested in getting all the transactions from an Ethereum block that have emitted events. Would it be possible to get this information from the individual transaction from a getBlockByNumber ...
user avatar
  • 111
0 votes
1 answer
36 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(...
user avatar
1 vote
0 answers
34 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....
user avatar
  • 111
0 votes
0 answers
18 views

How can I retrive status "message" of a (failed) transaction through web3.js?

Having a tx hash of a failed transaction, I need to have its status message through web3.js (as shown in red in the below image): Where does block explorer get the status message from?
user avatar
0 votes
2 answers
37 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 ...
user avatar
  • 101
0 votes
1 answer
25 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&...
user avatar
  • 113
0 votes
0 answers
21 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 ...
user avatar
0 votes
1 answer
36 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 { ...
user avatar
  • 3
1 vote
0 answers
62 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 ...
user avatar
  • 1,790
0 votes
0 answers
9 views

Why no event data in transaction data if call from other contract, direct call is ok

The problem with event OnTargetRun emited in run() interface ITarget { event OnTargetRun(address sender,uint256); function run()external; } contract Target is ITarget{ uint256 public ...
user avatar
0 votes
1 answer
156 views

ganache extract logs from reverted transaction?

Is it possible to extract logs from reverted transactions in Ganache? Of course, the public blockchain won't keep logs for reverted transactions. However, I'm wondering is there a way in ganache (...
user avatar
0 votes
2 answers
42 views

Is it possible to get the log data of a smart contract?

I would like to know if it's possible to get the log data of a smart contract. The thing is that I need to get the adress, the tokenId and a couple more variables, but I don't know how to get that ...
user avatar
0 votes
0 answers
14 views

Send fixed Event using assembly on Solidity

Is it possible to send an event in hex format? I mean, I want to send the event to the EMV from an Smart Contract without using the function log/event. I want to send a raw chain of bytes directly to ...
user avatar
  • 1
0 votes
1 answer
134 views

Get contract method from transaction logs

On etherscan.io, when looking at the Events tab, we can see the logs, and also the method name. Using web3js, I can get the logs without problem (with getPastEvents). I cannot figure out how to get ...
user avatar
  • 103
1 vote
1 answer
193 views

How to get a contracts emitted events in brownie?

Say I have a contract that emits multiple events, how do I to get a list of all events emitted in brownie and sort them by event type? contract SimpleContract { event Deposit(address indexed ...
user avatar
  • 168
0 votes
0 answers
43 views

How is Etherscan Token Tracker Feature Built

How is the Etherscan ERC-20 Token Address page built (different from address Page)? My understanding is that ERC-20 only logs (emits) the events 'Transfer' and 'Aprove', so we are limited to these ...
user avatar
1 vote
1 answer
193 views

Recognizing anonymous events in logs

Is there any way to recognize if a log contains an anonymous topic? From what I can tell is that anonymous events are represented in a log without the signature on the first index. Giving the option ...
user avatar
0 votes
1 answer
121 views

Monitoring uniswap pair buy and sell transactions via the logs filtering

Can anybody suggests the way to retrieve an Uniswap pair sell or buy transactions, filtering the events logs. I know, it's possible to monitor an token transfers continuously scanning token Transfer ...
user avatar
0 votes
0 answers
42 views

console.log fails transaction

Let's say I have a system made up of four different sections with contracts, proxies, node files, etc: 1--------- | | | 2--------- | | | 3---...
user avatar
  • 265
0 votes
1 answer
1k views

Decoding transaction logs of Pancakeswap's router by web3.py

I saw this question, but there are contracts like the pcs's router which have no event defined in the contract, see this transaction for example. How can I decode the logs in such transactions?
user avatar
0 votes
2 answers
70 views

newHeads: does logsBloom contain all addresses?

Looking at newHeads and the docs say: Fires a notification each time a new header is appended to the chain, including chain reorganizations. Users can use the bloom filter to determine if the block ...
user avatar
0 votes
0 answers
29 views

how to remove stacktrace in console log

how to remove this stack trace in console log?
user avatar
  • 1
0 votes
0 answers
167 views

web3 filter event logs on multiple topics

I have a SmartContract with event: event TransferRecorded(uint _timestamp, string from, address indexed _from, string to, address indexed _to, string _hash, string _name, uint _size, string ...
user avatar
  • 209
0 votes
0 answers
79 views

why I get <unknown> in my mining log and what is the meaning of all the log items?

My log has in it. I wired my ethminer with Trezor hardware wallet. I can't find anywhere the meaning of all these i / m and <unknown> and Mh -cu0 2.xx all I have no idea and my google search ...
user avatar
0 votes
1 answer
465 views

How to decode log data from bscscan API using PHP?

I'm pulling fight logs from a BSC contract via bscscan API. The data record, which should be a set 6 different values, looks like this: ...
user avatar
  • 101
1 vote
0 answers
59 views

BSC chunking log files

I have a BSC full node running and I have bsc logs being created on /bsc/logs/bsc.log. What's bothering me is that it's chunking the log files in too small pieces of around 350K each, see output below ...
user avatar
  • 11
0 votes
1 answer
78 views

Can you filter an indexed event parameters?

Can you filter an indexed event parameters? Does indexing make filtering more efficient or does indexing make filtering possible?
user avatar
  • 1,243
0 votes
1 answer
391 views

Indexed events not returning values when decoded

I had asked this question but I omitted some info as I (wrongly) assumed that the omitted info was not part of my problem. When you emit an event like so: event ChildCreated(address indexed creator, ...
user avatar
  • 1,243
0 votes
0 answers
90 views

Event not returning indexed parameters when decoded [duplicate]

EDIT: I had omitted some data from my code as I thought it was not the one causing the error turns out I was wrong. Here is the question with the appropriate data and solution. ..... Ignore the text ...
user avatar
  • 1,243
0 votes
0 answers
84 views

How to Decode Anonymous MakerDAO LogNote Events using Ethers

I'm trying to decode (anonymous LogNote) transaction logs created by the MakerDAO vat contract (https://etherscan.io/address/0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B#code). // --- Logs --- event ...
user avatar
  • 131
0 votes
2 answers
129 views

What's the maximum number of logs per transaction?

I am trying to determine what data type to use for indexing transaction logs. At least in the case of transactions per block, there is a hard limit. Is it a fixed number and is there a maximum number?
user avatar
  • 553
1 vote
0 answers
154 views

What comes first: pendingTransactions, logs, newBlockHeaders?

I am trying to understand the order in which the data propagates. My understanding at the moment is: Assuming someone just made sendTransaction call, then... First we would receive ...
user avatar
  • 553
0 votes
0 answers
27 views

How to print logs such as peer.Log().Debug("") in geth?

I want to check logs such as peer.Log().Debug() in geth.But I haven't find it in my log.txt .It seems that Geth does not log this in log.txt.Only log.logger (), log.dubug ().... are logged in log.txt....
user avatar
5 votes
1 answer
970 views

How do I determine the ABI to use for web3.eth.abi.decodeLog?

This is a follow up from How to identify token transfers looking at a transaction?. I have transaction that results in a transfer of tokens. From PancakeSwap: Router v2 To ...
user avatar
  • 553
1 vote
1 answer
2k views

Is there a way to listen to log events via websocket with web3py

i am trying to listen to log events via my node's websocket server but i can't seem to find a way to do that using the web3Py lib. the asynchronous implementation of the docs is basically a threaded ...
user avatar
1 vote
0 answers
414 views

How to manually interpret balance change after custom Events using web3.py

Context I am trying to build my own Ethereum explorer. I know this already exists on Etherscan out-of-the-box but the features that I want are either rate-limited or not even provided via its API. To ...
user avatar
  • 113
5 votes
1 answer
754 views

What's the meaning of "dirty" in Geth's INFO logs "Importing new chain segment..."

I am trying to understand the logs I see when I journalctl -fu my Geth service, which I restarted after it was offline for two days. This is less a troubleshooting question and more an extension to ...
user avatar
  • 53
0 votes
0 answers
74 views

How to get data from earlier blocks in ethereum BC via web3.py?

I am trying to get data from earlier blocks/transactions. I have created events and emitted them. I can see the logs in the Remix IDE. However, I cannot get the logs in web3.py. It only returns empty. ...
user avatar
0 votes
1 answer
3k views

Understanding the Phoenix miner log

I am running a phoenix miner for solo mining in my private network. I want to understand the logs of the miner. Can any one help me to understand the following more in depth especially the shares and ...
user avatar
  • 359
5 votes
1 answer
2k views

How to understand uniswaps events?

I could not find any explanation about this so I'm reverse engineering it, the 3rd tx is the most interesting, If you look at this transaction https://etherscan.io/tx/...
user avatar
  • 161
4 votes
0 answers
134 views

What are best practices for monitoring the OpenEthereum (Parity) logging?

Monitoring of the logging output of the Ethereum clients is essential for stable blockchain operation. Do you have recommendations, experiences and/or lessons learned concerning the logging of ...
user avatar
2 votes
1 answer
55 views

can I trust transactions in blocks with just 1 block confirmation?

In my application, I am using events/logs to capture and display information. So, to decrease the response time, I am returning the result as soon as the block is mined and not waiting for 5-6 block ...
user avatar
  • 43
0 votes
1 answer
148 views

How to reduce time for block confirmation in the Ethereum blockchain and also time to listen to logs emitted?

I am designing an application in which I am emitting logs through transactions in the Ethereum blockchain. I also created an event listener to listen to the new logs emitted. But I want time from ...
user avatar
  • 43
0 votes
0 answers
350 views

Programmatically convert log data (hexadecimal) into negative decimal value

I'm having some trouble converting negative numbers in the log data of an Ethereum transaction. In this transaction, log index 192, topic 3 is listed as "...
user avatar
3 votes
1 answer
4k views

myContract.events.MyEvent() vs web3.eth.subscribe('logs', ...);

I'm confused about the difference between myContract.events.MyEvent() and web3.eth.subscribe('logs', ...); Both are subscriptions to events, correct?
user avatar
0 votes
1 answer
145 views

Method's parameters: a way to know a uint256 is a token amount and its number of decimals?

When decoding transaction actions or logs, I never know how to human-read uint256 values when they are token amounts and, if so, how to know how many decimals they are. For the decimals, do I always ...
user avatar
  • 101
1 vote
0 answers
126 views

mempool transactions' logs

Is it possible to see the logs of the mempool transactions somehow? What can I do in order to achieve the goal? FYI eth_getLogs does not return logs of the mempool transactions.
user avatar
3 votes
1 answer
6k views

how to decode log event of my transaction log?

I receive a transaction event in my log of my Ethereum transaction. .on('receipt', function(receipt){ console.log("address: " + receipt.logs[0].address); console.log(&...
user avatar