Closed luoxianjiao closed 6 years ago
sometimes, I use eosjs-7.1.1 to run " eos.setcode('xx', 0, 0, wast, abi)“ code,it occurs errors blow ! {"code":500,"message":"Internal Service Error","details":"0 exception: unspecified\nInvalid hex character 'O'\n {\"c\":\"O\"}\n hex.cpp:13 from_hex"} (node:22643) UnhandledPromiseRejectionWarning: {"code":500,"message":"Internal Service Error","details":"0 exception: unspecified\nInvalid hex character 'O'\n {\"c\":\"O\"}\n hex.cpp:13 from_hex"} (node:22643) 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:22643) [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.
@luoxianjiao 's error
{"code":500,"message":"Internal Service Error","details":"0 exception: unspecified\nInvalid hex character 'O'\n {\"c\":\"O\"}\n hex.cpp:13 from_hex"} (node:20012) UnhandledPromiseRejectionWarning: {"code":500,"message":"Internal Service Error","details":"0 exception: unspecified\nInvalid hex character 'O'\n {\"c\":\"O\"}\n hex.cpp:13 from_hex"} (node:20012) 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:20012) [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.
@luoxianjiao can you provide the abi and wasm you're trying to deploy?
It works for me .. Make sure wast is a buffer and abi is an object:
> Buffer.isBuffer(wast)
true
> eos.setcode('currency', 0, 0, wast)
> eos.setabi('currency', JSON.parse(abi))
when I use eosjs-7.1.1 , run " eos.setcode('xx', 0, 0, wast, abi); " to deploy contract, it occurs errors as title