From 5e1abfbad86dca41d6f6d9b52b11335ffdf85d63 Mon Sep 17 00:00:00 2001 From: jangko Date: Tue, 17 Dec 2024 14:05:47 +0700 Subject: [PATCH] Replace deprecated toBytes with toBytesBE in bn256ecPairing precompile --- nimbus/evm/precompiles.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nimbus/evm/precompiles.nim b/nimbus/evm/precompiles.nim index 5635d16151..07201861c5 100644 --- a/nimbus/evm/precompiles.nim +++ b/nimbus/evm/precompiles.nim @@ -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 @@ -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()