Skip to content

Commit

Permalink
stint: bump for endians (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnetheduck authored Dec 17, 2024
1 parent 2d8419d commit 6f5ba81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web3/encoding.nim
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import
stint, ./eth_api_types, stew/[assign2, byteutils]

func encode*[bits: static[int]](x: StUint[bits]): seq[byte] =
@(x.toByteArrayBE())
@(x.toBytesBE())

func encode*[bits: static[int]](x: StInt[bits]): seq[byte] =
@(x.toByteArrayBE())
@(x.toBytesBE())

func decode*(input: openArray[byte], baseOffset, offset: int, to: var StUint): int =
const meaningfulLen = to.bits div 8
Expand Down

0 comments on commit 6f5ba81

Please sign in to comment.