You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on unit tests and the following one is failing:
it("assigns the initial total supply to the owner",async()=>{const[owner]=accounts;consttotalSupply=awaitthis.token.totalSupply();constownerBalance=awaitthis.token.balanceOf(owner);expect(ownerBalance).to.be.bignumber.equal(totalSupply);awaitexpectEvent.inConstruction(this.token,"Transfer",{from: ZERO_ADDRESS,to: owner,value: totalSupply,});});
Here is the associated stack trace:
1) Contract: Initial State
assigns the initial total supply to the owner:
Error: Returned error: Returned error: invalid argument 0: json: cannot unmarshal non-string into Go value of type common.Hash
at Object.ErrorResponse (node_modules\web3-core-helpers\lib\errors.js:28:19)
at C:\Users\ateyar\Documents\GitHub\erc20-deflationary\node_modules\web3-core-requestmanager\lib\index.js:303:36
at C:\Users\ateyar\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\provider\wrapper.js:107:1
at XMLHttpRequest.request.onreadystatechange (C:\Users\ateyar\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\web3\node_modules\web3-providers-http\lib\index.js:98:1)
at XMLHttpRequestEventTarget.dispatchEvent (C:\Users\ateyar\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\xhr2-cookies\dist\xml-http-request-event-target.js:34:1)
at XMLHttpRequest.exports.modules.996763.XMLHttpRequest._setReadyState (C:\Users\ateyar\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\xhr2-cookies\dist\xml-http-request.js:208:1)
at XMLHttpRequest.exports.modules.996763.XMLHttpRequest._onHttpResponseEnd (C:\Users\ateyar\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\xhr2-cookies\dist\xml-http-request.js:318:1)
at IncomingMessage.<anonymous> (C:\Users\ateyar\AppData\Roaming\npm\node_modules\truffle\build\webpack:\node_modules\xhr2-cookies\dist\xml-http-request.js:289:47)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Anyone who can please make sense of this issue?
The text was updated successfully, but these errors were encountered:
How are you running your tests, is it just truffle test? What network are you running against? This is a weird error that I haven't seen before so as much data as you can provide to reproduce it, would help.
Yeah, just using npx truffle test --network development and in local I run npx ganache-cli --fork https://ropsten.infura.io/v3/10cc02d0eec842c99af1653c011badc9.
I am working on unit tests and the following one is failing:
Here is the associated
stack trace
:Anyone who can please make sense of this issue?
The text was updated successfully, but these errors were encountered: