Questions tagged [events]

Solidity events and logging problems. Events allow the convenient usage of the EVM logging facilities, which in turn can be used to “call” JavaScript callbacks in the user interface of a dapp, which listen for these events.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Is it possible to retrieve event logs from an eth_call?

When using eth_call is it possible to get event log data, or does it not exist?
user avatar
0 votes
0 answers
15 views

Staging test is getting timeout error on rinkeby network: Chainlink VRF and Keeper Issue

I am following Patrick Collins course. At chapter 9, when we do a testnet test on rinkeby. The event is not firing. I am using chainlink Keeper and VRF to run the the code as detailed below. Console ...
user avatar
0 votes
0 answers
11 views

Geth javascript console how to subscribe using JSON RPC

I am running an go-ethereum client in light mode. I have connected to my node with ./geth attach /home/user/.ethereum/geth.ipc and have my geth console. I want to use real-time subscriptions mentioned ...
user avatar
0 votes
0 answers
8 views

Solidity event doesn't include args

I'm emitting an event from a Market.sol contract with three indexed args but they aren't showing up in my frontend after calling the contract function. Contract code: event MarketTokenEvent ( ...
user avatar
0 votes
0 answers
13 views

fetch the event data in the console

please what should I put inside the console.log() to fetch the 2 returned addresses of the event(args[0], args[1])? and thank you! const filter = { address: '0xbc4...', topics: [ ...
user avatar
  • 3
0 votes
0 answers
22 views

Question about using events as smart contract storage

This question is a development of related questions from existing sources (https://media.consensys.net/technical-introduction-to-events-and-logs-in-ethereum-a074d65dd61e) and prior threads (Do logs/...
user avatar
  • 1
0 votes
1 answer
31 views

How I can retrieve event logs generated by a contract?

I'm trying to build a MERN app with a web3 part, I have a typical authentication step in the beginning (centrelized), then the user will connect his wallet and send a transaction to the smart contract ...
user avatar
  • 3
1 vote
1 answer
10 views

I cannot see a single event in NEthereum

Say I have this code: private async void LaunchEventRetrievalLoop() { try { Debug.Log("Creating event filter"); ...
user avatar
0 votes
0 answers
14 views

Having trouble with ethers.js queryfilter --> TypeError: contract.queryFilter is not a function

Trying to use queryFilter to find the value, sender and destination for a transaction event but im completely unable to, instead it is erroring out and telling me that queryFilter is not a function. ...
user avatar
0 votes
0 answers
16 views

Can't read a single event

I am using web3: ^1.7.3 and have an event as follows: event ChannelOpened( address indexed consumer, address indexed channelId, uint256 indexed expiration, address ...
user avatar
  • 1
0 votes
1 answer
14 views

Emit an Event when no transaction

Can I emit an event in case a transaction doesn't take place? For example, I have a function checking whether the wallet is allowed to buy the token. If yes, the transaction takes place and an event ...
user avatar
  • 113
1 vote
1 answer
10 views

Are there off-the-shelf solutions/services for receiving events from smart contracts on the server?

am working on a project where I need to catch events from smart contracts on the backend. Are there any solutions or services that help to catch events and pass them to the backend? The main ...
user avatar
  • 11
0 votes
2 answers
37 views

Hardhat Node Stops Emitting Events to Web3js

I'm running a hardhat node and a nodejs backend using web3js to capture events (code) and for some reason the events stop getting caught by web3js. The transactions seem to be firing just fine as I ...
user avatar
  • 113
0 votes
0 answers
23 views

How can I subscribe to smart contract event properly?

I'm using React Js to subscribe to events in my smart contract, and I want to get the subscription values only once. The syntax: mySmartContract.on('MyEvent', (value) => { console.log(value); }); ...
user avatar
0 votes
0 answers
14 views

transferFrom doesn't emit an event

I use OpenZeppelin ERC20 contract and want to emit event when transferFrom is called. import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract TST is ERC20 { event diff(string ...
user avatar
  • 945
0 votes
0 answers
5 views

Can Data of TX With Contract Be Tracked If No Event Is Emitted?

Given I interact with a smart contract and provide data. All transactions on the blockchain are recorded, but is unindexed data which is never emitted as event also readable to all (e.g. on scanners)? ...
user avatar
  • 11
0 votes
0 answers
22 views

Filter Ethereum events by number range

Is it possible, using web3 or ethers to filter events by a number range, e.g. indexing the amount in an event and then filter events with amount > a number.
user avatar
  • 199
0 votes
2 answers
44 views

How to get the returned values in Solidity functions? [duplicate]

Imagine I'm developing a simple function as the following: uint256 state; event Addition(uint256 result); function addition(uint256 a, uint256 b) public ...
user avatar
  • 646
0 votes
0 answers
6 views

Get Limit Price from thegraph limit price order

Trying to get price from limit order that was been summited to contract but when call theGraph query: https://api.thegraph.com/subgraphs/name/gelatodigital/limit-orders-fantom-ii/graphql, I getting ...
user avatar
  • 111
0 votes
1 answer
63 views

Etherscan API get transaction status from getLogs api call

I am using the Etherscan API to get a list of ERC20 transfer events for a contract, that are relevant to my address: https://api.etherscan.io/api?module=logs&action=getLogs https://api.etherscan....
user avatar
2 votes
1 answer
36 views

Use cases of anonymous events

What are the practical use cases of anonymous events in Solidity? In which situations they might be helpful?
user avatar
  • 204
0 votes
1 answer
44 views

events can cause state change?

I am doing a simple HelloWorld class trying out several things including emitting events. My contract code is below: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract HelloWorld { ...
user avatar
0 votes
1 answer
21 views

Reading Contract Events

i have an promlem readen a Hash from ethereum logs. When a user Mints a token, i fire a mint event: event Mint(address indexed _to, string indexed _hash, uint256 _tokenId); Example for _hash = ...
user avatar
0 votes
2 answers
30 views

What characters are allowed in event names?

I'm having trouble locating any documentation on which characters are allowed in Ethereum event names. For example, can I put cyrillic characters in them? Can I put emojis? What is allowed and ...
user avatar
0 votes
0 answers
36 views

Can I combine Brownie to view events and contracts on Ganache?

It seems that ganache can only work for truffle-config file , if i want to see the events and smart contracts on my local ganache blockchain? I am developing an app where i want to locally test the ...
user avatar
0 votes
1 answer
49 views

Is it possible to retrieve events later on?

The scenario is : There are two participants A and B. A sends a transaction to a Smart Contract and an event (X) is emitted as a result of the transaction. The event is caught (listened to ? ) by B ...
user avatar
1 vote
1 answer
35 views

Best way to get notified when fallback arrived

When you request random number, the Chainlink VRF2 returns it by calling following function. function fulfillRandomWords( uint256, /* requestId */ uint256[] memory randomWords ) ...
user avatar
  • 945
0 votes
1 answer
30 views

Events in Chained Fallback Function Cause VirtualMachineError

I’m working on an upgradeable contract that uses fallback functions with inline assembly delegatecall and call calls (using calldatacopy and returndatacopy) to route internal and external function ...
user avatar
  • 101
0 votes
1 answer
104 views

How to listen for events without a websocket RPC?

Based on the docs of ethersjs, I could use the provider.on() function to listen for events and perform some actions. However, would it still work if I don't have a websocket RPC URL? If it still does ...
user avatar
  • 255
1 vote
0 answers
160 views

How do I listen for Events starting at a previous block number in Golang?

I'm writing an Event listener for my smart contract using the go-ethereum library. I'm trying to figure out how to listen for all SubmitProof events and have successfully been able to use the builtin ...
user avatar
0 votes
1 answer
33 views

contract.getPastEvents() take too much time

I have configured a private blockchain with some solidity smartcontract inside a docker container on my AWS VPS. When I connect to the blockchain with truffle console --network besu and test the ...
user avatar
0 votes
1 answer
30 views

Is it possible to analyze how frequent the ERC721/1155 `tokenURI` method is called?

The ERC721/1155 method tokenURI is a public variable and has a getter for retrieving the data itself (e.g., often returns the ipfs://Qm... CID). Let's assume the tokenURI method itself isn't emitting ...
user avatar
  • 1
1 vote
0 answers
57 views

How the bscscan Dex Trades works?

I'm trying to get transaction logs of a token on all Dex Exchange (.e.g Pancakeswap) like below. I captured it from https://bscscan.com/token/0x78a499a998bdd5a84cf8b5abe49100d82de12f1c#tokenTrade ** ...
user avatar
  • 11
0 votes
0 answers
45 views

How can you listen for certain events to have real-time updating on your front-end?

For example, if using ERC721A there is a _totalMinted() function that returns the current amount of minted tokens. Can you listen for a successful mint and then have your front-end display that value ...
user avatar
0 votes
1 answer
70 views

Default options for getPastEvents in web3js

I am trying to get the specific past events for my contract, named 'Transfer'; when I try to simply use the following code, it gives empty result. myContract.getPastEvents("Transfer").then(...
user avatar
0 votes
1 answer
25 views

Can the graph only index indexed parameters?

I have an event that looks like this: event ItemListed( address indexed seller, address indexed nftAddress, uint256 indexed tokenId, uint256 price ); And I'd ...
user avatar
1 vote
0 answers
17 views

Is it wrong to read or trust historical information from logs in client side?

I noticed one thing while learning Events/Logs from some sources. If I understand these sources correctly nodes can remove logs for effective memory usage. If my client tries to read logs that do not ...
user avatar
0 votes
0 answers
14 views

How to find input parameters' position in the customized emitted event

In receipt, there is a kind of event in which Etherscan only shows its topics and data in hexadecimal, without event name and input parameters being shown. Like the first event log in this tx. By ...
user avatar
  • 1
0 votes
1 answer
62 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
0 answers
540 views

How can I get pending transaction of contract address using web3.py?

I want to get pending transaction of a contract address, I have tried many ways but didn't work method 1: this seems to be good at sorting pending transaction but I can't get any transaction from my ...
user avatar
  • 1
0 votes
2 answers
358 views

Retrieve erc20 and erc721 transfer information from a transaction hash

I want to retrieve the following information from a transaction hash: If that transaction is an ERC-20 transfer: if yes what erc20 was transferred, what amount and to who If that transaction is an ...
user avatar
0 votes
0 answers
118 views

Why does my event listener not see pending transactions in ethers.js?

I have 2 event listeners below, the contract listener is working as expected. The provider listener right below that does not appear to be working at all. The behavior I am expecting is that when I ...
user avatar
1 vote
2 answers
508 views

How can I decode the event log I receive in my txn where there more than 1 smart contract involved and the emitted event cannot be found in ABI

I'm trying to build a dapp using the lens protocol and I'm struggling to find the right way to decode the event logs. Scenario: I'm trying to publish the post using the POST method in the proxy ...
user avatar
0 votes
0 answers
134 views

How to work event listener in EVM?

I didn't understand contract event listener works style. I guess, It doesn't work like to socket streaming. Because, When I am listening previous logs show to me too with new logs. I wonder, is there ...
user avatar
0 votes
1 answer
53 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
0 votes
0 answers
13 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
0 answers
30 views

How do you decide whether or not to mark event properties as indexed?

This is from the UniswapV2Factory: event PairCreated(address indexed token0, address indexed token1, address pair, uint); address pair could have been marked as indexed since up to three indexed ...
user avatar
1 vote
1 answer
111 views

brownie.exceptions.EventLookupError: Event 'xxx' did not fire

I am testing my contracts with brownie on local ganache and hit an issue where my events are not firing. When I call tx.events['xxx']['param1'] I get error: brownie.exceptions.EventLookupError: ...
user avatar
1 vote
0 answers
13 views

Should events be tightly packed for gas savings?

Is there any gas benefit to tightly packing events? Ex. event(uint128, uint128, uint256) instead of event(uint128, uint256, uint128) saves storage slots when storing, is it similar in events are ...
user avatar
  • 46

1
2 3 4 5
16