From f8a6ed4f5f219470f9119c47cece309df43ce025 Mon Sep 17 00:00:00 2001 From: andri lim Date: Tue, 17 Dec 2024 18:17:47 +0700 Subject: [PATCH] Replace deprecated toBytes with toBytesBE in bn256ecPairing precompile (#2944) --- 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 5635d1615..07201861c 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()