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
1answer
117 views

Pending transactions logs issue

I am trying to get the pending transactions logs to identify specifics topics before the next block was mined (ERC20 transfers, Uniswap swaps, ..). I run a Geth (1.9.22) full node, mining is enabled (...
1
vote
1answer
39 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); ...
1
vote
0answers
6 views

Get number of logs in block

Given logs are streamed to a client via the eth_subscribe(“logs”) rpc method with a logIndex, is there a way to tell the number of total logs in a block from its header?
0
votes
1answer
24 views

Recording Event Logs in a DB from a Smart-Contract

I have created a smart-contract and deployed to the Rinkeby Network, it has a client-side application which has been established with React. Now, I would like to observe and audit every transaction or ...
0
votes
0answers
10 views

How to display formatted transaction information in Remix IDE from web3.eth.getTransactionReceipt()?

tl,dr: Remix shows a formatted transaction summary for transactions that are initiated within the Remix IDE. Is it possible to display the same output for an arbitrary transaction hash? Sorry if this ...
0
votes
1answer
49 views

ethers.js Why aren't logs filtering? (query returned more than 10000 results)

I'm building an API to scrape events from a contract suite deployed to Rinkeby. Here's an example function with some context: const network = getNetwork(parseInt(`${process.env.CHAIN_ID}`)); const ...
0
votes
1answer
17 views

Why some contract addresses show 0 supply and 0 holders on Etherscan

I have a an old list from December 2019 which showed the holders, supply and transfers in last 24h from Etherscan like here . Howvever while I was revisiting the addresses on Etherscan, there were a ...
1
vote
2answers
49 views

Is Ethereum fast sync feasible to get logs

I want to get the logs of an contract address by filtering the even with transfer Event. I cant use Infura for its restrictions and limits. So i want to sync my own ethereum node for myself. Since my ...
0
votes
1answer
24 views

Is there some possibility to listen MakerDAO's LogNote events?

I wonder is there some possibility to listen MakerDAO's LogNote events, like we able to do with standard events. What I managed to research: I saw that LogNote was listed as an event from contract ...
0
votes
0answers
22 views

What is logIndex and logsBloom in ethereum transaction

The web3.eth.getTransactionReceipt() returns a logIndex field along with a logs array and a logsBloom field. I have read many articles but somehow still confused as to what is logIndex and logsBloom.
0
votes
1answer
22 views

Functions that are used for token transfers for ERC20 and ERC721 tokens

Let's suppose there is a contract address A of an erc721 token B. If I want to monitor all of its transfers from A to another address say C then should I only filter the Transfer function or should I ...
0
votes
2answers
63 views

web3js getPastLogs function returns error: query returned more than 10000 results

I have a local ethereum node and I am trying to filter an event for a contract address between a range of blocks. However it throws the following error: node:15689) UnhandledPromiseRejectionWarning: ...
1
vote
1answer
48 views

Infura getFilterLogs api returns empty array

I am trying to filter transfer events using node.js for a contract address between a range of blocks. I am trying to filter the latest 7 transactions which can be shown in etherscan here. My code is ...
0
votes
1answer
58 views

Sending ETH from contract to EOA

OK, I'm baffled guys. maybe it's the amount of gas the function is using up that is causing this not to work. when I call the function: I get the following in response but no movement of Eth from my ...
0
votes
0answers
31 views

decode a transaction receipt which does not have an event log

Is there a way to decode a transaction receipt which does not have an event log? In the case of an event log we have topics which we can decode, but what about the case when an event isn't triggered ...
0
votes
1answer
33 views

Decoding input paramters throws invalidity error

Using the abi for a smart contract that I got, I was trying to decode the input parameters for a transaction receipt using web3.eth.abi.decodeParameters function. The logs.json file is as below: { &...
1
vote
1answer
40 views

eth_getLogs was only return erc20 tokens

i have used below command to get every logs on the special blocks but its only return erc20 token logs and ethereum transactions was not listed. my geth command: curl --data '{"method":"eth_getLogs",...
0
votes
1answer
34 views

Why eth_getLogs returns empty result for Ethereum account address?

I'm developing an Ethereum platform and need to fetch the events log of a desired address. I found a code like this: curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"topics":...
0
votes
0answers
42 views

How to log an event which emits state of the contract in nethereum?

I am logging a specific event from a specific contract using nethereum. However, my event emits contract state (enum in solidity). My log processor shows 0 events instead of 2. Solidity code snippet:...
0
votes
1answer
32 views

How to retrieve the logs of transactions on one contract and multiple addresses

I have an application which should work as an exchange. Customers have their own Ethereum addresses on my Geth server, and they might receive ERC20 Tokens on them. I need to fetch the incoming ...
0
votes
0answers
20 views

How unique are the event log ids?

I am using log_ids of events to keep track of which events I've processed. Log ids are formed using the word log followed by 8 hexadecimal characters i.e. log_d758eda8 The possible combinations of ...
1
vote
1answer
140 views

Infura getLogs returns an empty result

I'm writing a crypto based system with PHP on Infura, and now I am coding a script to retrieve logs for a specific address. This is my code: $ch = curl_init($my_server_url); $data = array( '...
2
votes
1answer
58 views

Unique identification of transfers

https://github.com/ethereum/go-ethereum/blob/master/core/types/log.go#L40 // Derived fields. These fields are filled in by the node // but not secured by consensus. ... // index of the log in the ...
2
votes
0answers
89 views

Web3 Ethereum log subscriptions - removed field?

I am trying to subscribe to Ethereum events (via Infura) but I'm a bit confused. I am following this documentation: https://web3js.readthedocs.io/en/v1.2.0/web3-eth-subscribe.html#subscribe-logs ...
1
vote
1answer
160 views

What data is in 'calldataload'?

I want to parse event logs that are generated by the contract shown below, which assigns different sections of calldataload to the 4 Topics, and the Data section, of the event logs. Topic 0 receives ...
0
votes
1answer
76 views

Smart Contract Transfer Event Log Data & transfer _value [Rust]

I'd like to have a better understanding of events and logs data, more specifically when it comes to interacting with ERC20 tokens smart contracts and their Transfer events. I'm looking for a way to ...
0
votes
2answers
63 views

what is the transferfrom event signature?

I am currently writing a code that list all types of transactions in a given contract . my plan is to just check for all logs whether the topics[0] == an event signature of a function. and now i am ...
1
vote
1answer
200 views

Solidity: Raise events via Assembly using log3

I want to raise events from inside a piece of assembly code. I've extended the answer here with the function AssemblyEvent() which currently causes a runtime error. Working example: pragma ...
0
votes
1answer
68 views

Is it possible to get duplicates of the log events on Ethereum when we have a fork of the chain?

Let's suppose we have 2 chains of ethereum blockchain. When I fetching contract's log events from x block to getBlockNumber(). Will i get two or one the same log events from each block? Or ...
1
vote
0answers
46 views

Handling EOF when subscribing to Event Logs

I'm trying to subscribe to events logs to handle Transfer(address,address,uint64) events. I've followed this example. https://github.com/miguelmota/ethereum-development-with-go-book/blob/master/en/...
0
votes
1answer
97 views

Converting Log Topics to int64 correctly in Go

I currently use the code below to extract the ERC721 Token ID from Transfer Event Logs: txHash := newLog.TxHash.Hex() hexString := common.BytesToAddress(newLog.Topics[3].Bytes()).Hex() flowerNum, _ :=...
1
vote
1answer
208 views

How to handle events using drizzle?

strange that after much searching, i havent found even one piece of info out there which clearly elaborates on how the events are manipulated in drizzle. From what i understand, the event names (and ...
1
vote
0answers
36 views

Error deploying the subgraph: Internal error: Could not pick index node

I'm playing with "The Graph" example counter project. If all I do is change the contract address in the mapping.ts to the same Counter contract on Rinkeby, then try to deploy, I get this error: ...
0
votes
1answer
62 views

Who is “from” in case of inheritance in solidity?

I have the following code: // Test.sol pragma solidity ^0.5.2; import "./TestBase.sol"; contract Test is TestBase{ string[] name ; constructor() public payable { name.push("sheep"); ...
0
votes
1answer
156 views

How to interact with events from a smart contract?

can we get access to watch the event and get logged data from them and use it for processing in a smart contract? Like matching an state variable with the data logged by an event .
0
votes
1answer
56 views

Logs and events: How are arguments of “watch” defined?

In order to watch an event we can use: var temp; eventx.watch (function(error, result){ temp = result.args.val.toNumber();}); Question 1: What is the role of: function(error, result){ temp = result....
1
vote
1answer
499 views

Emit event while require statement fails

I would like to be able to log a result of a condition: if(time > 5) { emit Result("time is larger than 5"); } else { emit Result("time is less than 5"); } This will work just fine, but ...
4
votes
2answers
2k views

Truffle test, logs do not include an emitted event

I am calling a contract function which emits an event in a transaction. This transaction should include the event and is typically visible via: const receipt = await contractInstance.someFunction() ...
1
vote
0answers
54 views

Read args object from particular block transaction in truffle console.

Hi I have question on how to read args from specific block transaction that are passed when event was called. I have triggered an event, my block is created and i got transaction tx. In the ' Logs: ' ...
3
votes
3answers
314 views

How to setup 'topics' for function getPastLogs ()?

Sir, I want to read the past event log by using getPastLogs(),but I got the whole log.I hope I can filter some log. I find I can setup the 'topics' in getPastLogs(),but it always fails. How ...
1
vote
1answer
312 views

About getPastLogs usage

"getPastLogs" can get past event log. I check the web3 documentation: fromBlock - Number|String: The number of the earliest block ("latest" may be given to mean the most recent and "pending" ...
3
votes
0answers
211 views

Bloom Filters - is the blockchain filtered block by block?

I understand that bloom filters are used to quickly scan for log topics and corresponding contract addresses. I also understand that an 2048-bit bloom filter is stored in the block header. Question: ...
0
votes
1answer
30 views

Should I route forwarding contracts through a second forwarding contract?

This is more of a question of filter events, I guess. If I have 500k deposit addresses and they are all forwarding to one account and emitting event logs with address(this) and msg.value, would it be ...
2
votes
2answers
224 views

How to maintain history of changes in mapping?

I have a mapping variable in my solidity code which maps address to name. I want to maintain the history/log of every change that happens in this mapping. What is the best possible solution to it?
3
votes
1answer
2k views

How do I decode the transaction's log with Web3.py?

I can filter my events (please see), but instead of that if I know only the transaction hash and if its already deployed, is it possible to obtain and parse the transaction's log data using Web3.py? ...
1
vote
2answers
1k views

How to decode data parameter under logs in transaction receipt?

I went through many questions but I couldn't get my answer. web3 version -- 0.20.6 According to documentation event's parameters which are not indexed store in data parameter under logs. I want to ...
0
votes
0answers
42 views

How to read ALL logs of a certain event

When I read event logs like this: myContract.getPastEvents('myEventLogName', { fromBlock: 0, toBlock: 'latest' }) .then(function(events){ console.log(events) // same results as the ...
2
votes
1answer
40 views

Can ethereum logs be present while transaction is being mined, then disappear later?

Question about the ethereum blockchain: If I walk the blockchain like so: for block in blockchain: for transaction in block: receipt = getTransactionReceipt(transaction) for log ...
1
vote
0answers
62 views

Why do are the 'type' & 'removed' fields in receipt logs different between Ganache and Geth?

When I run a particular transaction and log the receipt, I am getting different results depending on if my EVM is Geth or Ganache. Specifically, Ganache returns receipt.logs[0].type: 'mined' while in ...
1
vote
1answer
54 views

What does the logger's address mean in Ethereum yellow paper?

In the Ethereum yellow paper Page 5 says that the log entry O consists of (O_a,(O_{t0}, O_{t1},...),O_d). And O_a means the logger's address. What's the meaning of logger's address? Does it mean the ...