Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Metroxe committed Jan 31, 2024
2 parents edb9a2c + 4403455 commit eff8c1c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/challenger/isCheckingAssertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getProvider } from "../utils/getProvider.js";
* @returns The value of isCheckingAssertions.
*/
export async function getIsCheckingAssertions(): Promise<boolean> {
const provider = getProvider("https://icy-thrilling-frog.arbitrum-goerli.quiknode.pro/4d27f3253823ff8ec0afbabc49cbe924bfc9acdb/"); // goerli for now
const provider = getProvider(config.arbitrumOneJsonRpcUrl);
const rollupContract = new ethers.Contract(config.rollupAddress, RollupAdminLogicAbi, provider);
const isCheckingAssertions = await rollupContract.isCheckingAssertions();
return isCheckingAssertions;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/challenger/listenForAssertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function listenForAssertions(callback: (nodeNum: any, blockHash: any, sen

// listen for the NodeConfirmed event
const listener = resilientEventListener({
rpcUrl: "wss://arb-goerli.g.alchemy.com/v2/WNOJEZxrhn3a0PzKUVEZgeRJqxOL7brv",
rpcUrl: config.arbitrumOneWebSocketUrl,
contractAddress: config.rollupAddress,
abi: RollupAdminLogicAbi,
eventName: "NodeConfirmed",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export let config = {
"refereeAddress": "0xfD41041180571C5D371BEA3D9550E55653671198",
"refereeDeployedBlockNumber": 157193676,
"refereeImplementationAddress": "0x29a7b907fdf4a9235f46d891b7aa1e7d3d35a3b6",
"rollupAddress": "0x082742561295f6e1b43c4f5d1e2d52d7FfE082f1",
"rollupAddress": "0xC47DacFbAa80Bd9D8112F4e8069482c2A3221336",
"xaiAddress": "0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66",
"xaiDeployedBlockNumber": 157193610,
"xaiImplementationAddress": "0x3fb787101dc6be47cfe18aeee15404dcc842e6af",
Expand Down
8 changes: 7 additions & 1 deletion packages/core/src/operator/listenForChallenges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ export function listenForChallenges(callback: (challengeNumber: bigint, challeng
abi: RefereeAbi,
eventName: "ChallengeSubmitted",
log: console.info,
callback: async (log) => {
callback: async (log, error) => {

if(error){
//TODO hanlde on error
return;
}

const challengeNumber = BigInt(log?.args[0]);

// if the challengeNumber has not been seen before, call the callback and add it to the map
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/utils/getAssertion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface AssertionNode {
* @returns The node.
*/
export async function getAssertion(assertionId: number): Promise<AssertionNode> {
const provider = getProvider("https://icy-thrilling-frog.arbitrum-goerli.quiknode.pro/4d27f3253823ff8ec0afbabc49cbe924bfc9acdb/"); // goerli for now
const provider = getProvider(config.arbitrumOneJsonRpcUrl);
const rollupContract = new ethers.Contract(config.rollupAddress, RollupAdminLogicAbi, provider);
const [
stateHash,
Expand Down

0 comments on commit eff8c1c

Please sign in to comment.