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
1
vote
1answer
15 views

Watching for events

How come sometimes events show up on block explorers in hex and sometimes to you can see the actual string name of the event in the logs. I ask because my event watchers on my front end only pick up ...
0
votes
0answers
11 views

0x event extra data fields

I'm looking at events on the exchange contract address: https://etherscan.io/address/0x61935cbdd02287b511119ddb11aeb42f1593b7ef#events with a topic_0 equal to ...
1
vote
1answer
22 views

Garbage in string parameters of events

I have an event defined like this: event Created( address indexed target, string indexed name ); I do emit Created(..., _name); // called function with _name = "comment" which gives ...
0
votes
1answer
18 views

Stop watching events

I have activated watching events with Contract.events.events_name(filter, lastBlock), now I need to stop watching this event. I can't find the command in web3 docs. I'm using Web3 version: 1.2.1. How ...
2
votes
1answer
32 views

Error trying to get events in web3.py via Infura

I was trying to get all events from my smart contract (in Ropsten) via Infura node. The problem is that I know that Infura does no support creating filters, but I don't know how to get events by ...
0
votes
0answers
12 views

How do I get the value from the event to be displayed on the webpage? [duplicate]

I can connect and console.log the event. But can't bring the value to display on the webpage. I don't know what to do. Front-end import React from 'react'; import logo from './logo.svg'; import './...
0
votes
1answer
14 views

Event propagation from imported contracts

Im implementing a contract with imported subcontracts of my own. I'm trying to understand if I can receive the events emitted by the imported contracts, but since contracts can be inherit other ones ...
1
vote
1answer
47 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 ...
2
votes
2answers
51 views

dYdX event log signature hash

dYdX has an event called LogDeposit(address indexed accountOwner, uint256 accountNumber, uint256 market, BalanceUpdate update, address from) within their SoloMargin contract. I am trying to get the ...
0
votes
1answer
29 views

List of ALL Ethereum Contract Events, for ex: Transfer, Mint, etc

A very simple question, yet couldn't find a simple answer. Where can I find a list of all event types such as Transfer, Mint, etc? Is this stored anywhere, for ex: online database or historically ...
0
votes
0answers
4 views

Nethreum CreateFilterInput Block Number boundary issue

I obtained the latest block number by using: var Latest = web3.Eth.Blocks.GetBlockNumber.SendRequestAsync().Result; Assume Latest = 400000 I create a filter even from block number 390000 to (the ...
0
votes
1answer
71 views

Web3js - Internal Transaction Data (Event Logs): Token Transfers, Contract Creations, & Internal ETH Transfers

I'm currently recording transaction data via Web3js, while directly connected to a local Geth full archive node via IPC, and I was wondering if there was a more elegant way to record internal ...
1
vote
0answers
43 views

Ganache is not showing any events

I have a contract method which emits events but ganache seems not to catch any events. I say this because when I deploy my contract on ropsten the events are being caught fine but only in ganache I ...
0
votes
1answer
24 views

getPastEvents on localhost is not a function error

Now, I'm working on an Ethereum Blockchain project to transfer the ownership of stored devices by using local web3 provider at the truffle environment. Truffle v5.0.27 (core: 5.0.27) Solidity v0.5....
0
votes
1answer
29 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
0answers
24 views

getPastEvents undefined(please help)

I had asked this question before. I looked carefully at the exchange section, which I advised, and I think there is no problem with the exchange section. At least in my opinion there is no problem and ...
0
votes
1answer
29 views

TypeError: market.FileViewed is not a function while trying to watch event

I want to watch for fileViewed event and it throws TypeError: market.FileViewed is not a function in marketplace.FileViewed{ ^ My solidity contract: pragma solidity ^0.5.0; contract ...
1
vote
0answers
21 views

How a contract on Ropsten (deployed after fork) emit 3/5 events on the shorter chain while same contract on longer chain emits 5/5 of the events

General info: We have a full-node, which broadcast our txs. We have a EventSource contract which contains 5 events types. The eventSource contract deployed only after Istanbul fork. Our node was ...
0
votes
0answers
47 views

Events using Infura websockets on rinkeby Web3 1.2.1. Returned values aren't valid, did it run Out of Gas?

I am trying to do a simple event listener with NodeJS and Web3 using an Infura endpoint. I have the correct project-id const Web3 = require('web3'); let web3 = new Web3( // Replace YOUR-PROJECT-ID ...
0
votes
1answer
20 views

If for each setter I can get the blockchain state at the moment and make it queryable, will I still need events?

That question came as part of understanding better the role of events in Ethereum. Can the mechanism which index the blockchain state at each setter and makes it queryable for all parties can ...
0
votes
1answer
30 views

Way to create an event?

As soon as a function is called this other function should also be called!! Example: As soon as ether is deposited it should transfer funds into employees wallet. I already have functions deposit() ...
0
votes
0answers
30 views

Error: invalid number/address values

Having trouble with the submitOracleResponse inside the callback below: flightSuretyApp.events.OracleRequest({ fromBlock: 0 }, function (error, event) { if (error) console.log(error); ...
0
votes
0answers
32 views

Problem accessing variables stored in event log

I have succesfully implemented an event in my contract Portfolio: // Define eventlog for myEvent event myEvent(uint indexed eventDate, address indexed sender, myArray[] eventList, uint eventBalance); ...
0
votes
1answer
33 views

Emited Solidity Events not being watched at frontend truffle contract instance

So, I have been reading through A LOT of pages about events in Solidity and how to interact with them on frontend but I am still pretty new to this and it seems like there have been multiple changes, ...
0
votes
0answers
13 views

Listening events

I have a problem I want to solve with watchevent function. I am building a daemon script that submit a transaction when a particular event is emitted. Let's suppose the node that run the script goes ...
0
votes
0answers
30 views

Getting empty events in response of receipt. I am using Infura+web3.js+ropsten

JS code contract.methods .myFunction( "data1", 1568545262, 1568631662, 1568718062, "0xD4496dA2a4b376fC8s4d786EB6B71483436077c4" ) .send({ from: "...
1
vote
1answer
29 views

Event Names not showing up on Etherscan

For some reason Event Names associated with transactions to my contracts aren't being shown in their Event Logs on Etherscan. Worth noting, this event in particular is not indexed. Any thoughts as to ...
0
votes
0answers
30 views

web3 update monitoring

Inside a DAPP, I have been using web3.currentProvider.publicConfigStore.on('update',... to monitoring Metamask activity. But in the new metamask-mobile such method does not exists. There is a ...
0
votes
1answer
160 views

Filters object not working for web3.eth.contract getPastEvents() method

I have referred, Web3 Events, but filters object is not working for me, I've got the same result for events before and after applying filter object. Here's the code: instance.getPastEvents( "...
0
votes
1answer
97 views

How to connect with WebSocket with Web3?

Already referred web3 documentations and other Q-A for web socket connection. Currently using infura as provider.
0
votes
1answer
33 views

Not getting getPastEvents or once function using contract instance

I have followed Web3 documentation to subscribe an evnet, I have created Instance of web3 using infura url as argument. Created contract object using, const contract = web3.eth.contract(abi, ...
0
votes
1answer
48 views

Truffle: 'func.call()' retrieves the return-value of a non-constant function

I've just learned that one can easily obtain the return-value of a non-constant function, by using myContract.func.call() (instead of myContract.func(), which retrieves a response object). Up until ...
0
votes
1answer
41 views

getPastEvents cannot handle multiple requests?

When I send about 100-120 requests in async, it is fine, the event will give me a response. But above 150 or so, I get "Invalid JSON RPC response: "" Web3JS 1.2.1 Geth Info: Version: 1.8.12-stable ...
0
votes
1answer
19 views

Subscribe to events using local geth in light mode?

I've followed this guide to subscribe to events. I succesfully subscribed to the new block headers using Infura provider. But when I try to use local geth node syncing in light mode, it connects, but ...
0
votes
1answer
28 views

Can I use string(or any type) list as an argument of an event?

It`s my event. event Transfer(address sender, address receiver, string[] denoms, uint256[] amounts); And I view an Transfer event with watch() function, It`s the result. { address: "...
0
votes
0answers
27 views

How to filter by string parameter , web3 2.0.0-alpha.1 Solidity events?

I'm trying to filter some events , and I noticed since I updated the web3 to version 2.0.0-alpha 1 the event catch is a little bit different. I have a Smart Contract with this event : event ...
0
votes
0answers
29 views

No Events After Deploying Another Contract in Remix

I am trying to write an upgradable smart contract in Remix. This involves a Proxy contract, a Logic_0_1_0 contract, and a Logic_0_2_0 contract. I uploaded Proxy and Logic_0_1_0 only, and the ...
0
votes
2answers
50 views

Why is storing via sstore more expensive than via events mechanism?

I just do not understand why emit Event(...) is cheaper than a = b. The only difference I noted between events and storage variables is that event logs is not accessible from Solidity. But both of ...
0
votes
1answer
90 views

Solidity event not showing up from Web3.js

I'm trying to set up an event in Solidity and listen to it from Web3 but I keep getting a null response. Here's my code: The relevant part of the contract: event NewUser(string userid); function ...
1
vote
1answer
108 views

How to get timestamp of an event log in emitted event from smart contract

I want to get the timestamp of an event. How can I get time of event fired, if the event data does not contain any time value?
0
votes
1answer
37 views

Solidity Events

I'm using Solidity events to interact with my html page, once a change is done in the contract or page the watch function from html reflects back to the contract. My question here is, while checking ...
0
votes
0answers
37 views

Cannot access myContract.events in web3.js version 0.20.7 [duplicate]

It seems that I do not have access to certain tools in web3js that allow me to subscribe to events. When I tried to use contractInstance.once('allEvents', callback) after instantiating a contract, I ...
1
vote
1answer
41 views

Can you emit events in a contract constructor?

I have a constructor that is emitting an event, but cannot seem to see/catch/filter that event after deployment.
1
vote
0answers
19 views

How I can get parity logs for non-mainchain blocks?

There's no much info on how parity event log works. What happens to event logs that correspond to block which is not mainchain anymore? Are they unrecoverably lost? For such an occasion, is there any ...
0
votes
0answers
28 views

Web3.js doesn't fire event callbacks anymore

I have a small dapp that uses web3.js to interact with a contract. I have one event listener: let activateEvent = nexusContract.events.Activate({ _member: defaultAccount }) activateEvent.watch((...
0
votes
1answer
34 views

Deposit event is not call while contract get token

My contract pragma solidity ^0.5.0; contract Transfereventaction { event Deposit( address indexed _from, bytes32 indexed _id, uint _value ); function deposit(...
1
vote
1answer
83 views

How can I send an Anonymous event (In ABI, anonymous==true) in Solidity?

Here's my contract code, now in the ABI I have an anonymous entry and I'm not sure what is that and how can I emit anonymous event. pragma solidity ^0.4.24; contract TestContract { event Start(...
0
votes
1answer
23 views

Is it possible to create a trigger when a state variable contract is i.e. 10?

Let's supose this is my contract: Contract MyContract{ uint a = 0; function myFunction(){ a = 0; } } I want "myFunction" to fire up when "a" value is 10. Thanks.
0
votes
1answer
74 views

Failed to load events from Block 0 on page refresh in Vue app

I'm trying to get event data from the web3 API using events method. In my Vue app methods, I have a method, newDsoValue, that will watch for the events from the beginning and also for every newly ...
0
votes
1answer
45 views

Return an array of structs using events?

I wan’t my function to spit out an array of structs. I know this is not straightforwardly possible. What is the best way for me to proceed? Should I loop through my array in my function and trigger ...