I am using truffle-contract for connecting between frontend and smart contract. Currently, I can call method on smart contract and can consume ether successfully.
const result = await instance.adoptCreeptomas(
aquaQuantity,
firaQuantity,
aetherQuantity,
gaiaQuantity,
referrer,
{ from: accountAddress, value: ether(sendingEther) }
);
But before that, I want to test method first. So I move to this method:
const data = await instance.adoptCreeptomas.call(
aquaQuantity,
firaQuantity,
aetherQuantity,
gaiaQuantity,
referrer,
{ from: accountAddress, value: ether(sendingEther) }
);
But when calling this, I meet following exception:
errors.js:38 Uncaught (in promise) Error: Invalid JSON RPC response: {"id":6,"jsonrpc":"2.0","error":{"code":-32603}}
I am using ganache for local blockchain and metamask for provider. Please help me figure out why.
Thanks