Skip to content

Commit

Permalink
fix address references for ts filler
Browse files Browse the repository at this point in the history
  • Loading branch information
jackchuma committed Dec 2, 2024
1 parent 412ea5c commit 6549004
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions services/ts-filler/src/chain/chain.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default class ChainService {
// 1. Get latest node from Rollup contract
const nodeIndex: bigint = await exponentialBackoff(async () => {
return await this.activeChains.l1.publicClient.readContract({
address: this.activeChains.l1.contracts.arbRollup,
address: this.activeChains.dst.l2Oracle,
abi: ArbitrumRollup,
functionName: "latestConfirmed",
});
Expand Down Expand Up @@ -160,7 +160,7 @@ export default class ChainService {
private async getLogs(index: bigint): Promise<Log[]> {
const etherscanApiKey = this.configService.getOrThrow("ETHERSCAN_API_KEY");
const url = `https://api-sepolia.etherscan.io/api?module=logs&action=getLogs&address=${
this.activeChains.l1.contracts.arbRollup
this.activeChains.dst.l2Oracle
}&topic0=0x4f4caa9e67fb994e349dd35d1ad0ce23053d4323f83ce11dc817b5435031d096&topic0_1_opr=and&topic1=${toHex(
index,
{ size: 32 }
Expand Down
4 changes: 1 addition & 3 deletions services/ts-filler/src/prover/prover.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,13 @@ export default class ProverService {
l1BlockNumber: bigint,
nodeIndex?: bigint
): { address: Address; storageKeys: Address[]; blockNumber: bigint } {
const l1Config = this.activeChains.l1;
let address = this.activeChains.dst.l2Oracle;
const address = this.activeChains.dst.l2Oracle;
let storageKeys = [constants.slots.anchorStateRegistrySlot];

if (this.activeChains.dst.chainId === SupportedChains.ArbitrumSepolia) {
if (!nodeIndex) {
throw new Error("Node index is required for Arbitrum proofs");
}
address = l1Config.contracts.arbRollup;
const slot = 118n;
const offset = 2n; // confirmData is offset by 2 slots in Node struct
const derivedSlotStart = keccak256(
Expand Down

0 comments on commit 6549004

Please sign in to comment.