Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_witnetReadResult is throwing request not solved error. #76

Open
justanotherdev89 opened this issue Aug 14, 2022 · 1 comment
Open

_witnetReadResult is throwing request not solved error. #76

justanotherdev89 opened this issue Aug 14, 2022 · 1 comment

Comments

@justanotherdev89
Copy link

Hi team,

I have written code similar to the price feed example.
Using TruffleSuite and in Klaytn's Baobab network. Code is working fine until I get the requestId with
(uint256 id, ) = _witnetPostRequest(request);
However, when I try to get
Witnet.Result memory result = _witnetReadResult(_requestId);
It keeps throwing request not solved error. The following is a transaction hash in baobab network.
https://baobab.scope.klaytn.com/tx/0x06b03cd93828c6948ac9fee9e9a51257c4d416cbb877daac43df8d5c777e3e83?tabId=internalTx

I'm using baobab witnet request board which is '0x58D8ECe142c60f5707594a7C1D90e46eAE5AF431'. I checked other configs too but couldn't locate anything noticeable.

Following is my completeUpdate code. I commented out the rest except the first line.
Basically _witnetReadResult just throws me the error.

` function completeUpdate() public witnetRequestSolved(requestId) {
Witnet.Result memory result = _witnetReadResult(requestId);

    // if (witnet.isOk(result)) {
    //     string[] memory arr = witnet.asStringArray(result);
    //     Metadata memory arr2 = extractPoseMood(arr);
    // } else {
    //    string memory errorMessage;

    //     try witnet.asErrorMessage(result) returns (Witnet.ErrorCodes, string memory e) {
    //         errorMessage = e;
    //     }
    //     catch (bytes memory errorBytes){
    //         errorMessage = string(errorBytes);
    //     }
    // }
}`
@justanotherdev89
Copy link
Author

It actually just throws me error no matter what request I try to read from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant