Keydonix/uniswap-oracle

support of london hardfork

pumpurum2 opened this issue · 2 comments

need to add baseFeePerGas from block to the proof.block

  • in getBlockByNumberFactory add baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null
  • in rlpEncodeBlock add to the end ...(block.baseFeePerGas ? [stripLeadingZeros(unsignedIntegerToUint8Array(block.baseFeePerGas, 32))] : []),

PR for this is welcome. I'm not currently in a position to validate this change (compile locally), but the changes you have recommended here do look correct to me (and necessary for this to continue working in London). Once I'm back in a position to be able to build/test locally I'll try to apply this, but no idea on the ETA.

I took a stab at implementing this. Unfortunately it led down a rabbit hole of getting a bunch of dependency libraries updated to support EIP-1559, which ended up being quite a bit of work. 😖 One could hack in a solution like you have proposed here, though I'm generally not a fan of hacks like that. That being said, I don't know when I'll get around to updating all of the dependencies so that may be the most prudent solution.