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
The smart contract has a function
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
I expect the SDK to return an error "caller is not the owner" if user != owner, but If there was an error in the smart contract, it is not returned.
abi_parser.parse_output(fn_name, output) function returns empty result.
status in transaction = 16 - RevertInstruction.
How can I read an error from a smart contract?
The text was updated successfully, but these errors were encountered:
cause when error only string message return ,use sample code:
if str(status) is not '0':
outputbody = output[10:] #去掉0x[func_sig]共10个字符
errmsg = decode_single("(string)", decode_hex(outputbody))
cause when error only string message return ,use sample code: if str(status) is not '0': outputbody = output[10:] #去掉0x[func_sig]共10个字符 errmsg = decode_single("(string)", decode_hex(outputbody))
The smart contract has a function
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
I expect the SDK to return an error "caller is not the owner" if user != owner, but If there was an error in the smart contract, it is not returned.
abi_parser.parse_output(fn_name, output) function returns empty result.
status in transaction = 16 - RevertInstruction.
How can I read an error from a smart contract?
The text was updated successfully, but these errors were encountered: