Update to use blockNumber instead

ltyu/sp1-lightclient-ism
Le Yu 1 month ago
parent 69cafaafb2
commit 4d2957cd5a
  1. 3
      typescript/ccip-server/src/services/ProofsService.ts

@ -22,6 +22,7 @@ class ProofsService {
storageKey: string,
slot: string,
): Promise<Array<[string[], string[]]>> {
// Get current head in LightClient smart contract
const blockNumber = await this.consensusService.getOriginBlockNumberBySlot(
slot,
);
@ -29,7 +30,7 @@ class ProofsService {
await this.rpcService.getProofs(
target,
[storageKey],
`0x` + new Number(blockNumber).toString(16), // Converts to hexstring
blockNumber, // Converts to hexstring
);
return [[accountProof, storageProof[0].proof]]; // Since we only expect one storage key, we only return the first proof
}

Loading…
Cancel
Save