Open LorenzoZaccagnini opened 4 years ago
Thanks for the detailed write up and repo @LorenzoZaccagnini!
Thanks for reporting the problem @LorenzoZaccagnini . I had this same problem and I'm not sure I would have found it but for your issue. It wasn't feasible for me to roll back oz-contracts and, unfortunately, this situation makes react-components ContractForm method calling capabilities unusable (or at least less useful). Therefore, I had to replumb certain components to use .send instead of .cacheSend.
Thanks for reporting the problem @LorenzoZaccagnini . I had this same problem and I'm not sure I would have found it but for your issue. It wasn't feasible for me to roll back oz-contracts and, unfortunately, this situation makes react-components ContractForm method calling capabilities unusable (or at least less useful). Therefore, I had to replumb certain components to use .send instead of .cacheSend.
It's such a loss, I would like to use the oz CLI smart contract upgradeability features but I've to do it manually if I'm using Drizzle. I really don't know if the compatibility issue is a problem of drizzle or something the lastest oz.
My 2 cents bet is on the lastest oz ABI json generation, I guess we can solve this issue tweaking how Drizzle loads the ABI or how OZ exports the ABI.
@KLM-GIT did you experienced this issue when using an upgradeable smart contract structure?
Hi @LorenzoZaccagnini - as you suggested, it looks like a drizzle incompatibility with solc 0.6+ ABI rather than upgradeability in OZ (the latest version of which upgrades to 0.6). It appears that others have submitted issues and that @cds-amal is working on it in #74
Hi everyone,
Was wondering if anyone here know if there is a some work-around to mitigate this issue? Our project has requirements from OpenZeppeplin but that dependencies are in 3.0 which is using solc-0.6.0 So we're getting 'cacheSend is not a functio' error too.
Was wondering if there is a workaround to mitigate this issue ? or downgrade solc version back to 0.5.0 is the only option here?
@LorenzoZaccagnini Thanks for your description of the issue. I ran into the same thing trying to use Drizzle with an ERC-20 token from OpenZeppelin 3.1.0. I am using drizzleReactHooks, and it leads to an error that says useCacheSend is not a function.
@KLM-GIT I may end up going with your solution of using send instead of cacheSend/useCacheSend, though that kind of seems to defeat the purpose of using Drizzle. It's either that or re-writing some contracts to accommodate OpenZeppelin 2.5.0 (solc 0.5.0).
@LorenzoZaccagnini Thanks for your description of the issue. I have the same bug in my project.
Hello! I don't understand if the issue is solved or not. I tried to use solc 0.5.0 and openzeppelin/contracts@2.5.1 but I still get the "cacheSend is not a function" error
Hello! I don't understand if the issue is solved or not. I tried to use solc 0.5.0 and openzeppelin/contracts@2.5.1 but I still get the "cacheSend is not a function" error
Not solved, Alessandro tieni duro!
Still having the error, using "call()" works for me, but I dont know what really changes in usability in that case. Also found nothing in the docs
I'm using Drizzle, react-hooks and the lastest openzeppelin-solidity in my new open source project, but cacheSend outputs always "cacheSend is not a function"
This line of code with send works as expected
Instead using cacheSend returns an error "cacheSend is not a function"
The issue does not appear using @openzeppelin/contracts@2.5.1 (pragma 0.5.0) instead of the lastest openzeppelin-solidity package (pragma 0.6.0)
Every time I use cacheSend in this project I get the "cacheSend is not a function" error (with the lastest the lastest openzeppelin-solidity )
My index.js where I set the Drizzle options
This is my App.js where I load my components
My component
The github repo is available here
Thank you for your time