Skip to content

Commit

Permalink
Update deployed version
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed Jun 23, 2023
2 parents 78e5db8 + 804312e commit 23dcddc
Show file tree
Hide file tree
Showing 8 changed files with 1,799 additions and 14 deletions.
1,755 changes: 1,755 additions & 0 deletions proxy/.openzeppelin/mainnet.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion proxy/DEPLOYED
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.0-stable.0
1.5.0-stable.0
22 changes: 19 additions & 3 deletions proxy/migrations/upgradeMainnet.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
import chalk from "chalk";
import { ethers } from "hardhat";
import { promises as fs } from "fs";
import { Upgrader } from "@skalenetwork/upgrade-tools";
import { AutoSubmitter, Upgrader } from "@skalenetwork/upgrade-tools";
import { SkaleABIFile } from "@skalenetwork/upgrade-tools/dist/src/types/SkaleABIFile";
import { contracts } from "./deployMainnet";
import { manifestSetup } from "./generateManifest";
import { MessageProxyForMainnet } from "../typechain";

class ImaMainnetUpgrader extends Upgrader {

constructor(
targetVersion: string,
abi: SkaleABIFile,
contractNamesToUpgrade: string[],
submitter = new AutoSubmitter()) {
super(
"proxyMainnet",
targetVersion,
abi,
contractNamesToUpgrade,
submitter);
}

async getMessageProxyForMainnet() {
return await ethers.getContractAt("MessageProxyForMainnet", this.abi.message_proxy_mainnet_address as string) as MessageProxyForMainnet;
}
Expand All @@ -30,6 +43,10 @@ class ImaMainnetUpgrader extends Upgrader {
});
}

// deployNewContracts = () => { };

// initialize = async () => { };

_getContractKeyInAbiFile(contract: string) {
if (contract === "MessageProxyForMainnet") {
return "message_proxy_mainnet";
Expand All @@ -51,8 +68,7 @@ async function main() {
const pathToManifest: string = process.env.MANIFEST || "";
await manifestSetup(pathToManifest);
const upgrader = new ImaMainnetUpgrader(
"proxyMainnet",
"1.4.0",
"1.5.0",
await getImaMainnetAbiAndAddress(),
contracts
);
Expand Down
20 changes: 17 additions & 3 deletions proxy/migrations/upgradeSchain.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chalk from "chalk";
import { ethers } from "hardhat";
import { promises as fs } from "fs";
import { Upgrader } from "@skalenetwork/upgrade-tools";
import { AutoSubmitter, Upgrader } from "@skalenetwork/upgrade-tools";
import { SkaleABIFile } from "@skalenetwork/upgrade-tools/dist/src/types/SkaleABIFile";
import { contracts, getContractKeyInAbiFile } from "./deploySchain";
import { manifestSetup } from "./generateManifest";
Expand All @@ -10,6 +10,19 @@ import { MessageProxyForSchain } from "../typechain";

class ImaSchainUpgrader extends Upgrader {

constructor(
targetVersion: string,
abi: SkaleABIFile,
contractNamesToUpgrade: string[],
submitter = new AutoSubmitter()) {
super(
"proxySchain",
targetVersion,
abi,
contractNamesToUpgrade,
submitter);
}

async getMessageProxyForSchain() {
return await ethers.getContractAt("MessageProxyForSchain", this.abi.message_proxy_chain_address as string) as MessageProxyForSchain;
}
Expand All @@ -31,6 +44,8 @@ class ImaSchainUpgrader extends Upgrader {
});
}

// deployNewContracts = () => { };

initialize = async () => {
const communityLockerName = "CommunityLocker";
const communityLockerFactory = await ethers.getContractFactory(communityLockerName);
Expand Down Expand Up @@ -71,8 +86,7 @@ async function main() {
const pathToManifest: string = process.env.MANIFEST || "";
await manifestSetup(pathToManifest);
const upgrader = new ImaSchainUpgrader(
"proxySchain",
"1.4.0",
"1.5.0",
await getImaSchainAbiAndAddress(),
contracts
);
Expand Down
2 changes: 1 addition & 1 deletion proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@openzeppelin/contracts-upgradeable": "^4.7.1",
"@openzeppelin/hardhat-upgrades": "^1.9.0",
"@skalenetwork/etherbase-interfaces": "^0.0.1-develop.20",
"@skalenetwork/ima-interfaces": "^2.0.0-beta.0",
"@skalenetwork/ima-interfaces": "2.0.0",
"@skalenetwork/skale-manager-interfaces": "1.0.0-develop.1",
"@skalenetwork/upgrade-tools": "2.0.0-refactor.15",
"axios": "^0.21.4",
Expand Down
2 changes: 1 addition & 1 deletion proxy/predeployed/test/base_genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
"balance": "1000000000000000000"
}
}
}
}
2 changes: 1 addition & 1 deletion proxy/predeployed/test/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
predeployed-generator>=1.1.0
predeployed-generator>=1.1.0
8 changes: 4 additions & 4 deletions proxy/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -762,10 +762,10 @@
resolved "https://registry.yarnpkg.com/@skalenetwork/etherbase-interfaces/-/etherbase-interfaces-0.0.1-develop.20.tgz#33f61e18d695fd47063aa39dce4df335d26b9528"
integrity sha512-j3xnuQtOtjvjAoUMJgSUFxRa9/Egkg1RyA8r6PjcEb33VksE4LWLBy0PNFUFehLZv48595JROTcViGeXXwg5HQ==

"@skalenetwork/ima-interfaces@^2.0.0-beta.0":
version "2.0.0-develop.0"
resolved "https://registry.yarnpkg.com/@skalenetwork/ima-interfaces/-/ima-interfaces-2.0.0-develop.0.tgz#2db130e63278f7a00bd848a4f2e10dda61e353fb"
integrity sha512-vSDY3vcuuUUBDMM3fifU++HPl2W9c2VSjkFK68r5Hc1Sc0VMYWcdfpx9yRwvp5NKY/B78+k80661GJHn+vuCCQ==
"@skalenetwork/ima-interfaces@2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@skalenetwork/ima-interfaces/-/ima-interfaces-2.0.0.tgz#93cb73a5200f7d9753a44c1be3e15156e7ceaf9c"
integrity sha512-Kqm45GHQl56H4pqdWHIcTUfFrE60LAUKI3j2CecebN0T9rKa0DDokvE42VDa3PfK2z6XIJxh7SkF+i6NsLbpjA==
dependencies:
"@skalenetwork/skale-manager-interfaces" "^0.1.2"

Expand Down

0 comments on commit 23dcddc

Please sign in to comment.