Skip to content

Commit

Permalink
Deploy 4.3.0 to OP Mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
codynhat committed Feb 7, 2024
1 parent 95cf1e1 commit b6756b1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Make sure to make a `.env` file in the root of your project based off the `.env.
| Diamond | Facet | Address | Etherscan |
| -------------------------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------- | ----------------------------------------------------------------------------------- |
| [RegistryDiamond](./contracts/registry) | [GeoWebParcelFacetV2](./contracts/registry/facets/GeoWebParcelFacet.sol) | `0x53E71045CB4611374e3B28C1A996d25A4397FE45` | https://optimistic.etherscan.io//address/0x53E71045CB4611374e3B28C1A996d25A4397FE45 |
| [RegistryDiamond](./contracts/registry) | [PCOLicenseClaimerFacetV2](./contracts/registry/facets/PCOLicenseClaimerFacet.sol) | `0x41d77f5A2173ec878F33d88DC5D369f2f29d4954` | https://optimistic.etherscan.io//address/0x41d77f5A2173ec878F33d88DC5D369f2f29d4954 |
| [RegistryDiamond](./contracts/registry) | [PCOLicenseClaimerFacetV2](./contracts/registry/facets/PCOLicenseClaimerFacet.sol) | `0x455391cb23189F1Bfaae1Bf2de62718baf33d409` | https://optimistic.etherscan.io//address/0x455391cb23189F1Bfaae1Bf2de62718baf33d409 |
| [RegistryDiamond](./contracts/registry) | [PCOLicenseParamsFacet](./contracts/registry/facets/PCOLicenseParamsFacet.sol) | `0xCD3cAC9Dd1CE5f2E6cBff6De7a5f4cCB6f8207dd` | https://optimistic.etherscan.io//address/0xCD3cAC9Dd1CE5f2E6cBff6De7a5f4cCB6f8207dd |
| [RegistryDiamond](./contracts/registry) | [PCOERC721Facet](./contracts/registry/facets/PCOERC721Facet.sol) | `0xe8F5c41Fc53ea331A68E45Cdb0ee2f8849EDcaA0` | https://optimistic.etherscan.io//address/0xe8F5c41Fc53ea331A68E45Cdb0ee2f8849EDcaA0 |
| [PCOLicenseDiamond](./contracts/pco-license) | [CFABasePCOFacet](./contracts/pco-license/facets/CFABasePCOFacet.sol) | `0x845B42DEaB9f007c5a7429606CD01596ead9f77B` | https://optimistic.etherscan.io//address/0x845B42DEaB9f007c5a7429606CD01596ead9f77B |
Expand Down
42 changes: 17 additions & 25 deletions tasks/upgrades/4_3_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function deployFacets(

const newRegistryDiamondFacets = [
{
facetAddress: "0x871C2467D5832226E03853b91Cd00764985EA07C",
facetAddress: "0xBA1231785A7b4AC0E8dC9a0403938C2182cE4A4e",
functionSelectors: getSelectors(registryDiamondI, true),
},
{
Expand Down Expand Up @@ -104,18 +104,10 @@ task("upgrade:4.3.0")
},
hre
) => {
const { diamondAdmin } = await hre.getNamedAccounts();

// Create Defender client
const adminClient = new AdminClient({
apiKey: process.env.DEFENDER_API_KEY!,
apiSecret: process.env.DEFENDER_API_SECRET!,
});

// Switch network
await hre.network.provider.request({
method: "wallet_switchEthereumChain",
params: [{ chainId: 420 }],
params: [{ chainId: 10 }],
});

const registryDiamond = await hre.ethers.getContractAt(
Expand All @@ -130,15 +122,15 @@ task("upgrade:4.3.0")

const pcoLicenseParams = await hre.ethers.getContractAt(
"IPCOLicenseParamsStore",
"0x9cCE213107b9A73efe7f176D016D4d6f58B34804"
"0xCD3cAC9Dd1CE5f2E6cBff6De7a5f4cCB6f8207dd"
);
const pcoLicenseClaimer = await hre.ethers.getContractAt(
"IPCOLicenseClaimerV2",
"0xDE43e24ece29a50563A8b54D590554F77E7209f1"
"IPCOLicenseClaimer",
"0x455391cb23189F1Bfaae1Bf2de62718baf33d409"
);
const geoWebParcel = await hre.ethers.getContractAt(
"IGeoWebParcel",
"0x41cb0D0711a55403777b2a3f6eEEbDB8278f0525"
"0x53E71045CB4611374e3B28C1A996d25A4397FE45"
);

const pcoERC721 = pcoErc721Address
Expand All @@ -159,17 +151,17 @@ task("upgrade:4.3.0")

console.log(registryDiamondFacetCuts, target, data);

await diamondWritableI[
"diamondCut((address,uint8,bytes4[])[],address,bytes)"
](
registryDiamondFacetCuts.map((v) => [
v.facetAddress,
v.action,
v.functionSelectors,
]),
target,
data
);
// await diamondWritableI[
// "diamondCut((address,uint8,bytes4[])[],address,bytes)"
// ](
// registryDiamondFacetCuts.map((v) => [
// v.facetAddress,
// v.action,
// v.functionSelectors,
// ]),
// target,
// data
// );

// Cut diamond
// await adminClient.createProposal({
Expand Down

0 comments on commit b6756b1

Please sign in to comment.