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

Add mainnet chain #418

Merged
merged 10 commits into from
Feb 7, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix integration test via wrappedIpAddress
bonnie57 committed Feb 7, 2025

Verified

This commit was signed with the committer’s verified signature.
bonnie57 Bonnie57
commit caf9f49bcd45393a0966323c97e05e5d3def53f1
6 changes: 3 additions & 3 deletions packages/core-sdk/test/integration/dispute.test.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import { mockERC721, getStoryClient, getTokenId, aeneid } from "./utils/util";
import chaiAsPromised from "chai-as-promised";
import { Address } from "viem";
import { MockERC20 } from "./utils/mockERC20";
import { arbitrationPolicyUmaAddress, erc20TokenAddress } from "../../src/abi/generated";
import { arbitrationPolicyUmaAddress, wrappedIpAddress } from "../../src/abi/generated";
const expect = chai.expect;
chai.use(chaiAsPromised);

@@ -17,7 +17,7 @@ describe("Dispute Functions", () => {
before(async () => {
clientA = getStoryClient();
clientB = getStoryClient();
const mockERC20 = new MockERC20(erc20TokenAddress[aeneid]);
const mockERC20 = new MockERC20(wrappedIpAddress[aeneid]);
await mockERC20.approve(arbitrationPolicyUmaAddress[aeneid]);
const tokenId = await getTokenId();
ipIdB = (
@@ -65,7 +65,7 @@ describe("Dispute Functions", () => {

it("should throw error when bond exceeds maximum", async () => {
const maxBonds = await clientA.dispute.arbitrationPolicyUmaReadOnlyClient.maxBonds({
token: erc20TokenAddress[aeneid],
token: wrappedIpAddress[aeneid],
});

const raiseDisputeRequest: RaiseDisputeRequest = {
4 changes: 2 additions & 2 deletions packages/core-sdk/test/integration/group.test.ts
Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@ import { aeneid, getStoryClient, mintBySpg } from "./utils/util";
import { StoryClient } from "../../src";
import {
evenSplitGroupPoolAddress,
mockErc20Address,
piLicenseTemplateAddress,
royaltyPolicyLrpAddress,
wrappedIpAddress,
} from "../../src/abi/generated";

chai.use(chaiAsPromised);
@@ -61,7 +61,7 @@ describe("Group Functions", () => {
derivativesApproval: false,
derivativesReciprocal: true,
derivativeRevCeiling: BigInt(0),
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
uri: "test case",
},
licensingConfig: {
22 changes: 11 additions & 11 deletions packages/core-sdk/test/integration/ipAsset.test.ts
Original file line number Diff line number Diff line change
@@ -13,10 +13,10 @@ import {
import { MockERC20 } from "./utils/mockERC20";
import {
evenSplitGroupPoolAddress,
mockErc20Address,
royaltyPolicyLapAddress,
derivativeWorkflowsAddress,
royaltyTokenDistributionWorkflowsAddress,
wrappedIpAddress,
} from "../../src/abi/generated";
import { MAX_ROYALTY_TOKEN, WIP_TOKEN_ADDRESS } from "../../src/constants/common";

@@ -166,7 +166,7 @@ describe("IP Asset Functions", () => {
derivativesApproval: false,
derivativesReciprocal: true,
derivativeRevCeiling: 0n,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
uri: "",
},
licensingConfig: {
@@ -252,7 +252,7 @@ describe("IP Asset Functions", () => {
derivativesApproval: false,
derivativesReciprocal: true,
derivativeRevCeiling: 0n,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
uri: "",
},
licensingConfig: {
@@ -283,7 +283,7 @@ describe("IP Asset Functions", () => {
derivativesApproval: false,
derivativesReciprocal: true,
derivativeRevCeiling: 0n,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
uri: "test case",
},
licensingConfig: {
@@ -359,7 +359,7 @@ describe("IP Asset Functions", () => {
derivativesApproval: false,
derivativesReciprocal: true,
derivativeRevCeiling: 0n,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
uri: "",
},
licensingConfig: {
@@ -470,7 +470,7 @@ describe("IP Asset Functions", () => {
derivativesApproval: false,
derivativesReciprocal: true,
derivativeRevCeiling: 0n,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
uri: "test case",
},
licensingConfig: {
@@ -559,7 +559,7 @@ describe("IP Asset Functions", () => {
derivativesApproval: false,
derivativesReciprocal: true,
derivativeRevCeiling: 0n,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
uri: "test case",
},
licensingConfig: {
@@ -933,7 +933,7 @@ describe("IP Asset Functions", () => {
derivativesApproval: false,
derivativesReciprocal: true,
derivativeRevCeiling: 0n,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
uri: "",
},
licensingConfig: {
@@ -970,7 +970,7 @@ describe("IP Asset Functions", () => {
derivativesApproval: false,
derivativesReciprocal: true,
derivativeRevCeiling: 0n,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
uri: "",
},
licensingConfig: {
@@ -1116,7 +1116,7 @@ describe("IP Asset Functions", () => {
derivativesApproval: false,
derivativesReciprocal: true,
derivativeRevCeiling: 0n,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
uri: "",
},
licensingConfig: {
@@ -1160,7 +1160,7 @@ describe("IP Asset Functions", () => {
derivativesApproval: false,
derivativesReciprocal: true,
derivativeRevCeiling: 0n,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
uri: "test case",
},
licensingConfig: {
10 changes: 5 additions & 5 deletions packages/core-sdk/test/integration/license.test.ts
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@ import { mockERC721, getStoryClient, getTokenId, aeneid } from "./utils/util";
import { MockERC20 } from "./utils/mockERC20";
import {
licensingModuleAddress,
mockErc20Address,
piLicenseTemplateAddress,
wrappedIpAddress,
} from "../../src/abi/generated";
import { WIP_TOKEN_ADDRESS } from "../../src/constants/common";

@@ -24,7 +24,7 @@ describe("License Functions", () => {
it("should register license ", async () => {
const result = await client.license.registerPILTerms({
defaultMintingFee: 0,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
transferable: false,
royaltyPolicy: zeroAddress,
commercialUse: false,
@@ -57,7 +57,7 @@ describe("License Functions", () => {
it("should register license with commercial use", async () => {
const result = await client.license.registerCommercialUsePIL({
defaultMintingFee: "1",
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
txOptions: {
waitForTransaction: true,
},
@@ -69,7 +69,7 @@ describe("License Functions", () => {
const result = await client.license.registerCommercialRemixPIL({
defaultMintingFee: "1",
commercialRevShare: 100,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
txOptions: {
waitForTransaction: true,
},
@@ -98,7 +98,7 @@ describe("License Functions", () => {
const registerLicenseResult = await client.license.registerCommercialRemixPIL({
defaultMintingFee: 0,
commercialRevShare: 100,
currency: mockErc20Address[aeneid],
currency: wrappedIpAddress[aeneid],
txOptions: {
waitForTransaction: true,
},