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

chore(logging): decimal stint values #548

Closed
wants to merge 1 commit into from
Closed

chore(logging): decimal stint values #548

wants to merge 1 commit into from

Conversation

AuHau
Copy link
Member

@AuHau AuHau commented Sep 7, 2023

If the normal "to-string" operator ($) or default conversion is used on StInt values in logging, then hex encoded values are returned. This changes it to decimal values, but only for one entry 😳

Is there some way to say chronicles to use the stint's toString function (which by default returns decimal values) on StInt types?

@emizzle
Copy link
Contributor

emizzle commented Sep 7, 2023

Yes there is. You need to create and/or import a nim-serialization writeValue that produces decimals (can use $ to achieve this). There is one in nim-eth that can be imported for convenience or we can roll our own.

@jessiebroke jessiebroke added Marketplace See https://miro.com/app/board/uXjVNZ03E-c=/ for details Client See https://miro.com/app/board/uXjVNZ03E-c=/ for details and removed Marketplace See https://miro.com/app/board/uXjVNZ03E-c=/ for details labels Dec 6, 2023
@AuHau AuHau closed this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client See https://miro.com/app/board/uXjVNZ03E-c=/ for details
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants