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

How to parse the return value of read transaction #284

Closed
DarcyLau opened this issue Oct 18, 2020 · 3 comments
Closed

How to parse the return value of read transaction #284

DarcyLau opened this issue Oct 18, 2020 · 3 comments

Comments

@DarcyLau
Copy link

DarcyLau commented Oct 18, 2020

Here is the return value of the transaction, but how can I parse it into Double or BigUInt
image
result: Optional(["0": 0])

and the abi file says the return value is UInt256

@dangell7
Copy link

import BigInt
let result = try? tokenBalanceTx?.call()
guard let tokenWei = result?["0"] as? BigUInt else {
    print("FAILED ON PARSE RESULT")
    return nil
}

@Iysbaera
Copy link
Collaborator

@DarcyLau Did the solution provided by dangell7 helped your or you still experience this issue?

@Iysbaera
Copy link
Collaborator

Iysbaera commented Nov 5, 2021

The authour of this issues didn't replied, so I supposed it was resolved and closing this issue.

To anyone still experiencing similar problems, feel free to reopen it.

@Iysbaera Iysbaera closed this as completed Nov 5, 2021
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

3 participants