Skip to content

Commit

Permalink
stint: bump for endians
Browse files Browse the repository at this point in the history
  • Loading branch information
arnetheduck committed Dec 4, 2024
1 parent c8f36f5 commit de874e8
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 de874e8

Please sign in to comment.