Closed ijxy closed 5 years ago
So I don't think it has anything to do with whether storedData
is public or not as I've tried it both ways and get
still fails with the same error.
I was able to get the truffle react-box (no drizzle) working with the same contract
pragma solidity ^0.5.0;
contract SimpleStorage {
uint storedData;
function set(uint x) public {
storedData = x;
}
function get() public view returns (uint) {
return storedData;
}
}
so I'm definitely inclined to think that this is a drizzle issue, specifically with cacheCall
.
Hey thanks for reporting this issue. Do you think you can throw up a reproduction repo so we can run it ourselves and figure out he problem?
Hey thanks for reporting this issue. Do you think you can throw up a reproduction repo so we can run it ourselves and figure out he problem?
Fortunately, after many hours, I was able to figure it out. Eventually, I realised from the JS console logs that the getter methods were becoming objects with cacheSend
methods inside drizzle instead of cacheCall
. It was at that point that I realised that I'd forgotten to add view
to the signature. Once added, the problem was no more. Facepalm.
After making the below changes to the 'test-app':
launching the frontend causes an error:
(text version in full below)