Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove UMA interfaces lookup #959

Merged
merged 5 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions test/TokenClient.Approval.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { interfaceName } from "@uma/common";
import { HubPoolClient, SpokePoolClient, TokenClient } from "../src/clients";
import {
Contract,
Expand Down Expand Up @@ -49,8 +48,8 @@ describe("TokenClient: Origin token approval", async function () {
const store = await (
await getContractFactory("Store", owner)
).deploy({ rawValue: "0" }, { rawValue: "0" }, zeroAddress);
await finder.changeImplementationAddress(utf8ToHex(interfaceName.CollateralWhitelist), collateralWhitelist.address);
await finder.changeImplementationAddress(utf8ToHex(interfaceName.Store), store.address);
await finder.changeImplementationAddress(utf8ToHex("CollateralWhitelist"), collateralWhitelist.address);
await finder.changeImplementationAddress(utf8ToHex("Store"), store.address);
({ hubPool, l1Token_1 } = await deployAndConfigureHubPool(owner, [], finder.address, zeroAddress));
await collateralWhitelist.addToWhitelist(l1Token_1.address);
await hubPool.setBond(l1Token_1.address, toBNWei("5"));
Expand Down
11 changes: 5 additions & 6 deletions test/fixtures/UmaEcosystemFixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as utils from "@across-protocol/contracts-v2/dist/test-utils";
import { Contract } from "ethers";
import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers";
import { utf8ToHex, identifier, refundProposalLiveness } from "@across-protocol/contracts-v2/dist/test-utils";
import { interfaceName } from "@uma/common";

export async function setupUmaEcosystem(owner: SignerWithAddress): Promise<{
timer: Contract;
Expand All @@ -25,11 +24,11 @@ export async function setupUmaEcosystem(owner: SignerWithAddress): Promise<{
const store = await (
await utils.getContractFactory("Store", owner)
).deploy({ rawValue: "0" }, { rawValue: "0" }, timer.address);
await finder.changeImplementationAddress(utf8ToHex(interfaceName.CollateralWhitelist), collateralWhitelist.address);
await finder.changeImplementationAddress(utf8ToHex(interfaceName.IdentifierWhitelist), identifierWhitelist.address);
await finder.changeImplementationAddress(utf8ToHex(interfaceName.SkinnyOptimisticOracle), optimisticOracle.address);
await finder.changeImplementationAddress(utf8ToHex(interfaceName.Store), store.address);
await finder.changeImplementationAddress(utf8ToHex(interfaceName.Oracle), mockOracle.address);
await finder.changeImplementationAddress(utf8ToHex("CollateralWhitelist"), collateralWhitelist.address);
await finder.changeImplementationAddress(utf8ToHex("IdentifierWhitelist"), identifierWhitelist.address);
await finder.changeImplementationAddress(utf8ToHex("SkinnyOptimisticOracle"), optimisticOracle.address);
await finder.changeImplementationAddress(utf8ToHex("Store"), store.address);
await finder.changeImplementationAddress(utf8ToHex("Oracle"), mockOracle.address);
await identifierWhitelist.addSupportedIdentifier(identifier);
return {
timer,
Expand Down