-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added json chronicles logging support
for some eth, web3 and confutils types
- Loading branch information
Pedro Miranda
committed
Jan 24, 2025
1 parent
0310cbf
commit 1ab736e
Showing
6 changed files
with
47 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Nimbus | ||
# Copyright (c) 2025 Status Research & Development GmbH | ||
# Licensed under either of | ||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) | ||
# * MIT license ([LICENSE-MIT](LICENSE-MIT)) | ||
# at your option. | ||
# This file may not be copied, modified, or distributed except according to | ||
# those terms. | ||
|
||
import | ||
std/[typetraits, net], | ||
json_serialization, | ||
web3/primitives, | ||
confutils/defs, | ||
eth/common/eth_types_json_serialization | ||
|
||
# nim-eth | ||
proc writeValue*( | ||
w: var JsonWriter, v: EthTime | NetworkId | ChainId | ||
) {.inline, raises: [IOError].} = | ||
w.writeValue distinctBase(v) | ||
|
||
# nim-web3 | ||
proc writeValue*(w: var JsonWriter, v: Quantity) {.inline, raises: [IOError].} = | ||
w.writeValue distinctBase(v) | ||
|
||
# nim-confutils | ||
proc writeValue*( | ||
w: var JsonWriter, v: InputFile | OutDir | OutFile | RestOfCmdLine | OutPath | ||
) {.inline, raises: [IOError].} = | ||
w.writeValue distinctBase(v) | ||
|
||
# build-system | ||
proc writeValue*(w: var JsonWriter, v: Port) {.inline, raises: [IOError].} = | ||
w.writeValue distinctBase(v) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters