0

how can I use the indexed parameter of a triggered event as a input for a function called in response to that event triggered? This is the event:

    event LogOfferAccepted(
    uint _id,
    address indexed _buyer,
    uint _deposit,
    address indexed _seller
    );

I would like to use the _id and the _deposit parameter of the event in the response. I tried a couple of things similar to this:

function listenToEvents (){
var Offer = web3.eth.contract(offerABI);
var offerInstance = Offer.at('0x6eb2282a770E4013C2CD599eA27bc38fCd5Ea4AA');var event = offerInstance.LogOfferAccepted({_seller:"0x24210cC4ec500C2A029c65adD3270cB2878f80d3"}, {}).watch(function(error, event){
if(!error) {
  functionA(_seller, _id);

How can I use the the _deposit as a function input in the reaction to an event??

Many Thx ahead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.