Skip to content

Commit

Permalink
Merge branch 'master' into npai/transfer-threshold-removal
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Sep 29, 2023
2 parents c6b4f99 + c956805 commit b95a732
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
18 changes: 18 additions & 0 deletions src/common/ContractAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,24 @@ export const CONTRACT_ADDRESSES: {
},
],
},
VotingV2: {
address: "0x004395edb43EFca9885CEdad51EC9fAf93Bd34ac",
abi: [
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "requester", type: "address" },
{ indexed: true, internalType: "uint32", name: "roundId", type: "uint32" },
{ indexed: true, internalType: "bytes32", name: "identifier", type: "bytes32" },
{ indexed: false, internalType: "uint256", name: "time", type: "uint256" },
{ indexed: false, internalType: "bytes", name: "ancillaryData", type: "bytes" },
{ indexed: false, internalType: "bool", name: "isGovernance", type: "bool" },
],
name: "RequestAdded",
type: "event",
},
],
},
},
10: {
daiOptimismBridge: {
Expand Down
11 changes: 7 additions & 4 deletions src/utils/UmaUtils.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { Contract, ethers, getBlockForTimestamp, isEventOlder, sortEventsDescending } from ".";
import * as uma from "@uma/contracts-node";
import { HubPoolClient } from "../clients";
import { CONTRACT_ADDRESSES } from "../common";
import { ProposedRootBundle, SortableEvent } from "../interfaces";
import { Contract, ethers, getBlockForTimestamp, isEventOlder, sortEventsDescending } from ".";

export async function getDvmContract(mainnetProvider: ethers.providers.Provider): Promise<Contract> {
return new Contract(await uma.getVotingV2Address(1), uma.getAbi("VotingV2"), mainnetProvider);
export async function getDvmContract(provider: ethers.providers.Provider): Promise<Contract> {
const { chainId } = await provider.getNetwork();
const { address, abi } = CONTRACT_ADDRESSES[chainId].VotingV2;
return new Contract(address, abi, provider);
}

export function getDisputedProposal(
hubPoolClient: HubPoolClient,
disputeEvent: SortableEvent
Expand Down

0 comments on commit b95a732

Please sign in to comment.