File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,10 @@ export function formatToProofRLP(rawData: string[]): string {
1212 ) ;
1313}
1414
15- // IMPORTANT valid only for post-Dancun blocks:
15+ // IMPORTANT valid only for post-Pectra blocks:
1616// https://eips.ethereum.org/EIPS/eip-4844#header-extension
1717// https://eips.ethereum.org/EIPS/eip-4788#block-structure-and-validity
18+ // https://cantina.xyz/introduction/pectra-competition-resources/eip-7685
1819export function prepareBLockRLP ( rawBlock : any ) {
1920 const rawData = [
2021 rawBlock . parentHash ,
@@ -43,6 +44,7 @@ export function prepareBLockRLP(rawBlock: any) {
4344 ? '0x'
4445 : BigNumber . from ( rawBlock . excessBlobGas ) . toHexString ( ) ,
4546 rawBlock . parentBeaconBlockRoot ,
47+ rawBlock . requestsHash ,
4648 ] ;
4749 return ethers . utils . RLP . encode ( rawData ) ;
4850}
Original file line number Diff line number Diff line change @@ -24,11 +24,15 @@ export const formatToProofRLP = (rawData: Hex[]) => {
2424 return toRlp ( rawData . map ( ( d : Hex ) => fromRlp ( d , 'hex' ) ) ) ;
2525} ;
2626
27- // IMPORTANT valid only for post-Dancun blocks:
27+ // IMPORTANT valid only for post-Pectra blocks:
2828// https://eips.ethereum.org/EIPS/eip-4844#header-extension
2929// https://eips.ethereum.org/EIPS/eip-4788#block-structure-and-validity
30+ // https://cantina.xyz/introduction/pectra-competition-resources/eip-7685
3031export const prepareBLockRLP = (
31- rawBlock : Block & { parentBeaconBlockRoot : Hex } ,
32+ rawBlock : Block & {
33+ parentBeaconBlockRoot : Hex ;
34+ requestsHash : Hex ;
35+ } ,
3236) => {
3337 const rawData : Hex [ ] = [
3438 rawBlock . parentHash ,
@@ -53,6 +57,7 @@ export const prepareBLockRLP = (
5357 // @ts -ignore
5458 rawBlock . excessBlobGas === '0x0' ? '0x' : toHex ( rawBlock . excessBlobGas ) ,
5559 rawBlock . parentBeaconBlockRoot ,
60+ rawBlock . requestsHash ,
5661 ] ;
5762 return toRlp ( rawData ) ;
5863} ;
You can’t perform that action at this time.
0 commit comments