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 testing burrow and snak with your given example of a calculator. The error i am getting is that when i give it a function name that is in the contract it gives me an toUpperCase error.
Type error.
danyal@danyal-HP-EliteBook-8470p:~/burrow $ snak call Calculator Mul 5,5
(node:9383) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toUpperCase' of undefined
at /home/danyal/.nvm/versions/node/v8.15.0/lib/node_modules/snak/node_modules/burrow-contracts/lib/pipes/dev_pipe.js:124:34
at target.(anonymous function).then (/home/danyal/.nvm/versions/node/v8.15.0/lib/node_modules/snak/node_modules/burrow-db/lib/server.js:49:20)
at <anonymous>
(node:9383) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9383) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The text was updated successfully, but these errors were encountered:
I fixed the error myslef. Inside your snak Node_modlues in
DevPipe.prototype.call = function (txPayload, callback) { var address = txPayload.to var from = txPayload.from if (!from) { from = this._accountData.default } var data = txPayload.data if (data.length > 1 && data.slice(0, 2) === '0x') { data = data.slice(2) } this._burrow.txs().call(from, address, data, function (error, data) { if (error) { callback(error) } else { callback(null, data.return.toUpperCase()) } }) }
In the callback you were the data.returns with a small 'r' while the data was return like .
I am testing burrow and snak with your given example of a calculator. The error i am getting is that when i give it a function name that is in the contract it gives me an toUpperCase error.
Type error.
The text was updated successfully, but these errors were encountered: