Skip to content

Commit

Permalink
Organize contract addresses (#71)
Browse files Browse the repository at this point in the history
* centralize contract addresses

* remove submodule

* move contract addresses
  • Loading branch information
DonFungible authored Feb 18, 2024
1 parent 6895294 commit 88b6f00
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 58 deletions.
46 changes: 9 additions & 37 deletions packages/core-sdk/src/abi/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,77 +10,49 @@ import PILPolicyFrameworkManagerABI from "./json/PILPolicyFrameworkManager.abi";
import RegistrationModuleABI from "./json/RegistrationModule.abi";
import TaggingModuleABI from "./json/TaggingModule.abi";
import ErrorsABI from "./json/Errors.abi";
import { sepolia } from "../utils/env";

// Sepolia
/**
{
"main": {
"AccessController": "0x31dd83a3FebB5fAD7F7bc8D4E05B623461B74a02",
"AncestorsVaultLAP": "0x9Faa4E491a211bFa415d44554120B1b31b6f4e59",
"ArbitrationPolicySP": "0x75e181d5eb307eCccf8d3b4724109eca14719A75",
"DisputeModule": "0x11dAA3F573C4d6673BBE7f2D96B4C91073A0d55d",
"Governance": "0xa18252Aa11Ff1B20b89C10109050CC46A4067b22",
"IPAccountImpl": "0x7BBaB2BD68fd3990c8dA2c26334a6DF8Acc7E96E",
"IPAccountRegistry": "0x7184bAdAdf24dc261C7C27BceFF53d7A25a06846",
"IPAssetRegistry": "0xF59adB67B7CC87436A7CC41040A7dB24AE90aDB8",
"IPAssetRenderer": "0x986d8E96b30b688FCD84e9A5A757C3d4304B47b6",
"IPMetadataProvider": "0xfcD468A72F76e89F2Df517274063ef7210a32e2A",
"IPResolver": "0xF0920314Fb4C375cdEB5b15c4e77277aCf36E3D7",
"LicenseRegistry": "0x4D6a54B467332dF675cFa689cb294A4cB9122866",
"LicensingModule": "0x0C72b24067a15994f91D92Fd9bA23eB5ebcF8378",
"MockERC20": "0xd53C2A80D24F6B3Ff009E48CF88D3b482E8E1457",
"MockERC721": "0xD3719824a768c139AAa7C5eFc8BDb5D1d13A1564",
"MockTokenGatedHook": "0x2d3ED4354eD09B0E6aa252938aEF41920aB6FC40",
"ModuleRegistry": "0x17Ad1cD06d44ae5F5480A675A4D8BD8DAED40410",
"PILPolicyFrameworkManager": "0x49cF5C5523011F8B4A0489969096Eb68C571C197",
"RegistrationModule": "0x248c8CbF469ec7CB22Dc9914E569920b93d717a3",
"RoyaltyModule": "0x512bbF310452cC96E0E9818B0870EcA557b86d4D",
"RoyaltyPolicyLAP": "0x8404061350BA0CA85c4E733B0be78c5519679003",
"TaggingModule": "0xED445f1DeE74Cf470Aab47F4b63734653C4C9537"
}
}
*/
export const IPAccountABI = [...IPAccountImplABI, ...ErrorsABI];

export const IPAssetRegistryConfig = {
abi: IPAssetRegistryABI,
address: getAddress("0xF59adB67B7CC87436A7CC41040A7dB24AE90aDB8"),
address: getAddress(sepolia.IPAssetRegistry),
};

export const AccessControllerConfig = {
abi: [...AccessControllerABI, ...ErrorsABI],
address: getAddress("0x31dd83a3FebB5fAD7F7bc8D4E05B623461B74a02"),
address: getAddress(sepolia.AccessController),
};

export const DisputeModuleConfig = {
abi: [...DisputeModuleABI, ...ErrorsABI],
address: getAddress("0x11dAA3F573C4d6673BBE7f2D96B4C91073A0d55d"),
address: getAddress(sepolia.DisputeModule),
};

export const LicenseRegistryConfig = {
abi: IERC1155ABI,
address: getAddress("0x4D6a54B467332dF675cFa689cb294A4cB9122866"),
address: getAddress(sepolia.LicenseRegistry),
};

export const LicensingModuleConfig = {
abi: LicensingModuleABI,
//abi: [...LicensingModuleABI, ...ErrorsABI],
address: getAddress("0x0C72b24067a15994f91D92Fd9bA23eB5ebcF8378"),
address: getAddress(sepolia.LicensingModule),
};

export const RegistrationModuleConfig = {
abi: RegistrationModuleABI,
//abi: [...RegistrationModuleABI, ...ErrorsABI],
address: getAddress("0x248c8CbF469ec7CB22Dc9914E569920b93d717a3"),
address: getAddress(sepolia.RegistrationModule),
};

export const TaggingModuleConfig = {
abi: [...TaggingModuleABI, ...ErrorsABI],
address: getAddress("0xED445f1DeE74Cf470Aab47F4b63734653C4C9537"),
address: getAddress(sepolia.TaggingModule),
};

export const PILPolicyFrameworkManagerConfig = {
abi: PILPolicyFrameworkManagerABI,
//abi: [...PILPolicyFrameworkManagerABI, ...ErrorsABI],
address: getAddress("0x49cF5C5523011F8B4A0489969096Eb68C571C197"),
address: getAddress(sepolia.PILPolicyFrameworkManager),
};
24 changes: 24 additions & 0 deletions packages/core-sdk/src/utils/env.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export const sepolia = {
AccessController: "0x31dd83a3FebB5fAD7F7bc8D4E05B623461B74a02",
AncestorsVaultLAP: "0x9Faa4E491a211bFa415d44554120B1b31b6f4e59",
ArbitrationPolicySP: "0x75e181d5eb307eCccf8d3b4724109eca14719A75",
DisputeModule: "0x11dAA3F573C4d6673BBE7f2D96B4C91073A0d55d",
Governance: "0xa18252Aa11Ff1B20b89C10109050CC46A4067b22",
IPAccountImpl: "0x7BBaB2BD68fd3990c8dA2c26334a6DF8Acc7E96E",
IPAccountRegistry: "0x7184bAdAdf24dc261C7C27BceFF53d7A25a06846",
IPAssetRegistry: "0xF59adB67B7CC87436A7CC41040A7dB24AE90aDB8",
IPAssetRenderer: "0x986d8E96b30b688FCD84e9A5A757C3d4304B47b6",
IPMetadataProvider: "0xfcD468A72F76e89F2Df517274063ef7210a32e2A",
IPResolver: "0xF0920314Fb4C375cdEB5b15c4e77277aCf36E3D7",
LicenseRegistry: "0x4D6a54B467332dF675cFa689cb294A4cB9122866",
LicensingModule: "0x0C72b24067a15994f91D92Fd9bA23eB5ebcF8378",
MockERC20: "0xd53C2A80D24F6B3Ff009E48CF88D3b482E8E1457",
MockERC721: "0xD3719824a768c139AAa7C5eFc8BDb5D1d13A1564",
MockTokenGatedHook: "0x2d3ED4354eD09B0E6aa252938aEF41920aB6FC40",
ModuleRegistry: "0x17Ad1cD06d44ae5F5480A675A4D8BD8DAED40410",
PILPolicyFrameworkManager: "0x49cF5C5523011F8B4A0489969096Eb68C571C197",
RegistrationModule: "0x248c8CbF469ec7CB22Dc9914E569920b93d717a3",
RoyaltyModule: "0x512bbF310452cC96E0E9818B0870EcA557b86d4D",
RoyaltyPolicyLAP: "0x8404061350BA0CA85c4E733B0be78c5519679003",
TaggingModule: "0xED445f1DeE74Cf470Aab47F4b63734653C4C9537",
};
44 changes: 23 additions & 21 deletions packages/core-sdk/test/integration/testABI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,60 +10,62 @@ import PILPolicyFrameworkManagerABI from "../../src/abi/json/PILPolicyFrameworkM
import RegistrationModuleABI from "../../src/abi/json/RegistrationModule.abi";
import TaggingModuleABI from "../../src/abi/json/TaggingModule.abi";
import ErrorsABI from "../../src/abi/json/Errors.abi";
/*
"AccessController": "0x674d6E1f7b5e2d714DBa588e9d046965225517c8",
"ArbitrationPolicySP": "0xb41BC78478878B338336C5E7a34292213779cd6F",
"DisputeModule": "0x3A96cad7b2aC783a6811c7c3e8DEF30E8a4cfcDb",
"IPAccountImpl": "0x7481a227A11860E80f69AB39d0165258f4c139f6",
"IPAccountRegistry": "0x74Cbd8CCc22290FeaaE8421D4FFc6760210B5B0C",
"IPAssetRegistry": "0xb1534826Bc9D77d818CbC596435f530778C73865",
"LicenseRegistry": "0x66f6865668F2B9213Ed05b97eE97beb97A75e243",
"LicensingModule": "0x2ac240293f12032E103458451dE8A8096c5A72E8",
"PILPolicyFrameworkManager": "0x3C30b98f56b469c0d292EFF5878e9Fb302CB13dD",
"RegistrationModule": "0x193f0Cc84d51Fc38a30658d7eFffEB2C5Cc25840",
"TaggingModule": "0x92787d8e2E5fE563A91Ee37B6e953BD0A4bAC1eD"
*/

export const tenderly = {
AccessController: "0x674d6E1f7b5e2d714DBa588e9d046965225517c8",
ArbitrationPolicySP: "0xb41BC78478878B338336C5E7a34292213779cd6F",
DisputeModule: "0x3A96cad7b2aC783a6811c7c3e8DEF30E8a4cfcDb",
IPAccountImpl: "0x7481a227A11860E80f69AB39d0165258f4c139f6",
IPAccountRegistry: "0x74Cbd8CCc22290FeaaE8421D4FFc6760210B5B0C",
IPAssetRegistry: "0xb1534826Bc9D77d818CbC596435f530778C73865",
LicenseRegistry: "0x66f6865668F2B9213Ed05b97eE97beb97A75e243",
LicensingModule: "0x2ac240293f12032E103458451dE8A8096c5A72E8",
PILPolicyFrameworkManager: "0x3C30b98f56b469c0d292EFF5878e9Fb302CB13dD",
RegistrationModule: "0x193f0Cc84d51Fc38a30658d7eFffEB2C5Cc25840",
TaggingModule: "0x92787d8e2E5fE563A91Ee37B6e953BD0A4bAC1eD",
};

export const IPAccountABI = [...IPAccountImplABI, ...ErrorsABI];

export const IPAssetRegistryConfig = {
abi: IPAssetRegistryABI,
address: getAddress("0xb1534826Bc9D77d818CbC596435f530778C73865"),
address: getAddress(tenderly.IPAssetRegistry),
};

export const AccessControllerConfig = {
abi: [...AccessControllerABI, ...ErrorsABI],
address: getAddress("0x674d6E1f7b5e2d714DBa588e9d046965225517c8"),
address: getAddress(tenderly.AccessController),
};

export const DisputeModuleConfig = {
abi: [...DisputeModuleABI, ...ErrorsABI],
address: getAddress("0x3A96cad7b2aC783a6811c7c3e8DEF30E8a4cfcDb"),
address: getAddress(tenderly.DisputeModule),
};

export const LicenseRegistryConfig = {
abi: IERC1155ABI,
address: getAddress("0x66f6865668F2B9213Ed05b97eE97beb97A75e243"),
address: getAddress(tenderly.LicenseRegistry),
};

export const LicensingModuleConfig = {
abi: LicensingModuleABI,
//abi: [...LicensingModuleABI, ...ErrorsABI],
address: getAddress("0x2ac240293f12032E103458451dE8A8096c5A72E8"),
address: getAddress(tenderly.LicensingModule),
};

export const RegistrationModuleConfig = {
abi: RegistrationModuleABI,
//abi: [...RegistrationModuleABI, ...ErrorsABI],
address: getAddress("0x193f0Cc84d51Fc38a30658d7eFffEB2C5Cc25840"),
address: getAddress(tenderly.RegistrationModule),
};

export const TaggingModuleConfig = {
abi: [...TaggingModuleABI, ...ErrorsABI],
address: getAddress("0x92787d8e2E5fE563A91Ee37B6e953BD0A4bAC1eD"),
address: getAddress(tenderly.TaggingModule),
};

export const PILPolicyFrameworkManagerConfig = {
abi: PILPolicyFrameworkManagerABI,
//abi: [...PILPolicyFrameworkManagerABI, ...ErrorsABI],
address: getAddress("0x3C30b98f56b469c0d292EFF5878e9Fb302CB13dD"),
address: getAddress(tenderly.PILPolicyFrameworkManager),
};

0 comments on commit 88b6f00

Please sign in to comment.