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 passing one parameter in f64 type. but when i call that function with float value, i am getting one exception: "ExecutionError":"Smart contract panicked: Value with Key: parameter with type f64 is not a Float.
`ServerTransactionError: {"index":0,"kind":{"ExecutionError":"Smart contract panicked: Value with Key: deposit with type f64 is not a Float, filename: "~lib/near-sdk-bindgen/index.ts" line: 249 col: 5"}}
at Object.parseResultError (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/node_modules/near-api-js/lib/utils/rpc_errors.js:48:29)
at Account.signAndSendTransaction (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:129:36)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async scheduleFunctionCall (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/commands/call.js:44:34)
at async Object.handler (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/utils/exit-on-error.js:39:9) { [stack]: 'Error: {"index":0,"kind":{"ExecutionError":"Smart contract panicked: Value with Key: deposit with type f64 is not a Float, filename: \"~lib/near-sdk-bindgen/index.ts
" line: 249 col: 5"}}\n' +
' at Object.parseResultError (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/node_modules/near-api-js/lib/utils/rpc_errors.js:48:29)\n' +
' at Account.signAndSendTransaction (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:129:36)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:94:5)\n' +
' at async scheduleFunctionCall (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/commands/call.js:44:34)\n' +
' at async Object.handler (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/utils/exit-on-error.js:39:9)',
type: 'FunctionCallError',
context: undefined,
index: 0,
kind:
{ ExecutionError: 'Smart contract panicked: Value with Key: deposit with type f64 is not a Float, filename: "~lib/near-sdk-bindgen/index.ts" line: 249 col: 5' }
,
message: '{"index":0,"kind":{"ExecutionError":"Smart contract panicked: Value with Key: deposit with type f64 is not a Float, filename: \"~lib/near-sdk-bindgen/index.ts
" line: 249 col: 5"}}',
transaction_outcome: {
proof: [ [length]: 0 ],
block_hash: 'HzCksqhVg9BZt13nVgt1Xu6RhWe47nH38dUZhHHcH1C5',
id: '8FRfRiTfXKwwMuD1sqmgENuzpRKNzQbP3ujTJPgcaCfi',
outcome: {`
The text was updated successfully, but these errors were encountered:
What version of AS are you using? What is the final JSON sent to the contract?
My guess is that you are encoding the f64 as a string, when js already treats all numbers as f64. E.g. { "parameter": "64.2" } vs { "parameter": 64.2 }
Hi,
I am passing one parameter in f64 type. but when i call that function with float value, i am getting one exception:
"ExecutionError":"Smart contract panicked: Value with Key: parameter with type f64 is not a Float
.`ServerTransactionError: {"index":0,"kind":{"ExecutionError":"Smart contract panicked: Value with Key: deposit with type f64 is not a Float, filename: "~lib/near-sdk-bindgen/index.ts" line: 249 col: 5"}}
at Object.parseResultError (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/node_modules/near-api-js/lib/utils/rpc_errors.js:48:29)
at Account.signAndSendTransaction (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:129:36)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async scheduleFunctionCall (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/commands/call.js:44:34)
at async Object.handler (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/utils/exit-on-error.js:39:9) {
[stack]: 'Error: {"index":0,"kind":{"ExecutionError":"Smart contract panicked: Value with Key: deposit with type f64 is not a Float, filename: \"~lib/near-sdk-bindgen/index.ts
" line: 249 col: 5"}}\n' +
' at Object.parseResultError (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/node_modules/near-api-js/lib/utils/rpc_errors.js:48:29)\n' +
' at Account.signAndSendTransaction (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:129:36)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:94:5)\n' +
' at async scheduleFunctionCall (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/commands/call.js:44:34)\n' +
' at async Object.handler (/home/phinelipy/.config/versions/node/v12.14.1/lib/node_modules/near-cli/utils/exit-on-error.js:39:9)',
type: 'FunctionCallError',
context: undefined,
index: 0,
kind:
{ ExecutionError: 'Smart contract panicked: Value with Key: deposit with type f64 is not a Float, filename: "~lib/near-sdk-bindgen/index.ts" line: 249 col: 5' }
,
message: '{"index":0,"kind":{"ExecutionError":"Smart contract panicked: Value with Key: deposit with type f64 is not a Float, filename: \"~lib/near-sdk-bindgen/index.ts
" line: 249 col: 5"}}',
transaction_outcome: {
proof: [ [length]: 0 ],
block_hash: 'HzCksqhVg9BZt13nVgt1Xu6RhWe47nH38dUZhHHcH1C5',
id: '8FRfRiTfXKwwMuD1sqmgENuzpRKNzQbP3ujTJPgcaCfi',
outcome: {`
The text was updated successfully, but these errors were encountered: