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

Replace deprecated toBytes with toBytesBE in bn256ecPairing precompile #2944

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nimbus/evm/precompiles.nim
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func bn256ecPairing(c: Computation, fork: EVMFork = FkByzantium): EvmResultVoid
c.output.setLen(32)
if msglen == 0:
# we can discard here because we supply buffer of proper size
discard BNU256.one().toBytes(c.output)
discard BNU256.one().toBytesBE(c.output)
else:
# Calculate number of pairing pairs
let count = msglen div 192
Expand All @@ -365,7 +365,7 @@ func bn256ecPairing(c: Computation, fork: EVMFork = FkByzantium): EvmResultVoid

if acc == FQ12.one():
# we can discard here because we supply buffer of proper size
discard BNU256.one().toBytes(c.output)
discard BNU256.one().toBytesBE(c.output)

ok()

Expand Down
Loading