I've seen this warning from time to time when working with Brownie

Event data has insufficient length

This is after I made a call to a Chainlink node, calling a function like:

 function requestUsers() public returns (bytes32 requestId) 
        Chainlink.Request memory req = buildChainlinkRequest(jobId, address(this), this.fulfill.selector);
        req.add("lat", "45.7905");
        req.add("lng", "11.9202");
        req.add("radius", "500000");
        req.add("start", "2021-01-01 20:00:00");
        req.add("end", "2021-02-21 20:30:00");
        return sendChainlinkRequestTo(oracle, req, fee);

And I'll get an output like:

Running 'scripts/request_and_read.py::main'...
Transaction sent: 0x8ff15b5e313dceb0e47c5cdb95567b611b63f4066e4e5ce14b93008f42193b86
  Gas price: 25.0 gwei   Gas limit: 143119   Nonce: 2942
Waiting for confirmation... /Users/patrick/code/brownie/brownie/network/event.py:238: UserWarning: 0x56dd6586DB0D08c6Ce7B2f2805af28616E082455: Event data has insufficient length
  warnings.warn(f"{address}: {exc}")
  GeoDB.requestUsers confirmed - Block: 24049531   Gas used: 130109 (90.91%)

What does this mean? Is an event not the right size?

  • Since Chainlink is basically a bunch or oracles, which operate based on emitted events, my guess is that some of their internal checks fails, so some event doesn't have the data it is supposed to have. But, this is only guessing – Lauri Peltonen Mar 25 at 12:08
  • Ah, so I'd want to go through the different events and find out which doesn't have data? – Patrick Collins Mar 25 at 12:35
  • Sorry, no idea. – Lauri Peltonen Mar 25 at 12:39

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.