Skip to content

Commit

Permalink
Release v1.0.1 (ETH-1063) (#228)
Browse files Browse the repository at this point in the history
* chore(deploy): deploy v1.0.1 on Goerli

* chore(deploy): deploy v1.0.1 to mainnet

* doc(RELEASE): update RELEASE.md

* doc(CHANGELOG): add v1.0.1 section to changelog

* chore(deploy): uncomment block
  • Loading branch information
nmvalera committed Jul 20, 2023
1 parent b9819c0 commit e903886
Show file tree
Hide file tree
Showing 15 changed files with 11,127 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Staking Contracts changelog

## v1.0.1 (July 18th 2023)

- [[contracts] deposit by multiples of 32 ETH](https://github.com/liquid-collective/liquid-collective-protocol/pull/222)
- [[contracts] minor fixes following Spearbit review](https://github.com/liquid-collective/liquid-collective-protocol/pull/219)


## v1.0.0 (May 30th 2023)

- [[contracts] add requested exit catchup upon stopped validator count update at oracle report time](https://github.com/liquid-collective/liquid-collective-protocol/pull/211)
Expand Down
20 changes: 12 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@

1. Create a release branch `release/x.y.z` from the commit we want in `main`
2. Input the parameter in the [deployment scripts](deploy)
3. Deploy the contracts with `yarn hardhat deploy`
4. Commit the generated artifacts in the [deployment folders](deployments)
5. Merge `release/x.y.z` into `main`
6. Create the GitHub Release with the relevant `x.y.z` tag
7. Create the upgrade proposal in Defender
8. Get the necessary approvals
9. Execute the upgrade proposal in Defender
10. We're done !
3. Set environment variables for the deployer account of the network to deploy on `export PRIVATE_KEY=<private_key>`
4. Set environment variables for the RPC url the network to deploy on `export RPC_URL=<rpc_url>`
5. Deploy the contracts with `yarn hardhat deploy --network <network> --deploy-scripts ./deploy/<network>`
6. Generate meta artifacts `yarn hh run --network <network> ./hardhat_scripts/gen_root_artifacts.ts` & `yarn hh run --network <network> ./hardhat_scripts/gen_meta_artifacts.ts`
7. Commit the generated artifacts in the [deployment folders](deployments)
8. Complete [CHANGELOG](CHANGELOG.md)
8. Merge `release/x.y.z` into `main`
9. Create the GitHub Release with the relevant `x.y.z` tag
10. Create the upgrade proposal in Defender
11. Get the necessary approvals
12. Execute the upgrade proposal in Defender
13. We're done !
42 changes: 42 additions & 0 deletions deploy/goerli/12_deploy_v1.0.1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { DeployFunction } from "hardhat-deploy/dist/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { isDeployed, logStep, logStepEnd } from "../../ts-utils/helpers/index";

const func: DeployFunction = async function ({ deployments, network, getNamedAccounts }: HardhatRuntimeEnvironment) {
if (!["goerli", "hardhat"].includes(network.name)) {
throw new Error("Invalid network for devGoerli deployment");
}

const { deployer } = await getNamedAccounts();

await deployments.deploy("RiverV1_Implementation_1_0_1", {
contract: "RiverV1",
from: deployer,
log: true,
});

await deployments.deploy("OperatorsRegistryV1_Implementation_1_0_1", {
contract: "OperatorsRegistryV1",
from: deployer,
log: true,
});

// migration and upgrade steps
// 1. upgradeTo OperatorsRegistry
// 2. upgradeToAndCall RiverContract + RiverContract.initRiverV1_2()
logStepEnd(__filename);
};

func.skip = async function ({ deployments, ethers }: HardhatRuntimeEnvironment): Promise<boolean> {
logStep(__filename);
const shouldSkip =
(await isDeployed("OperatorsRegistryV1_Implementation_1_0_1", deployments, __filename)) &&
(await isDeployed("RiverV1_Implementation_1_0_1", deployments, __filename))
if (shouldSkip) {
console.log("Skipped");
logStepEnd(__filename);
}
return shouldSkip;
};

export default func;
42 changes: 42 additions & 0 deletions deploy/mainnet/11_deploy_v1.0.1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { DeployFunction } from "hardhat-deploy/dist/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { isDeployed, logStep, logStepEnd } from "../../ts-utils/helpers/index";

const func: DeployFunction = async function ({ deployments, network, getNamedAccounts }: HardhatRuntimeEnvironment) {
if (!["mainnet", "hardhat"].includes(network.name)) {
throw new Error("Invalid network for mainnet deployment");
}

const { deployer } = await getNamedAccounts();

await deployments.deploy("RiverV1_Implementation_1_0_1", {
contract: "RiverV1",
from: deployer,
log: true,
});

await deployments.deploy("OperatorsRegistryV1_Implementation_1_0_1", {
contract: "OperatorsRegistryV1",
from: deployer,
log: true,
});

// migration and upgrade steps
// 1. upgradeTo OperatorsRegistry
// 2. upgradeToAndCall RiverContract + RiverContract.initRiverV1_2()
logStepEnd(__filename);
};

func.skip = async function ({ deployments, ethers }: HardhatRuntimeEnvironment): Promise<boolean> {
logStep(__filename);
const shouldSkip =
(await isDeployed("OperatorsRegistryV1_Implementation_1_0_1", deployments, __filename)) &&
(await isDeployed("RiverV1_Implementation_1_0_1", deployments, __filename))
if (shouldSkip) {
console.log("Skipped");
logStepEnd(__filename);
}
return shouldSkip;
};

export default func;
2 changes: 2 additions & 0 deletions deployment.goerli.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
"OperatorsRegistryV1_Implementation_0_4_0": "0x3511C69084dCb4EC806E538CA0676054820FfF7f",
"OperatorsRegistryV1_Implementation_0_6_0_rc2": "0xeF534eeA85Cc23A79f7082F25CEa20D9FcaEb7E7",
"OperatorsRegistryV1_Implementation_1_0_0": "0x1591414AF80eAcC9D920bb53c6a7131A9BFADB63",
"OperatorsRegistryV1_Implementation_1_0_1": "0x05dAA8115Cf42BF4eA6b842f80Cfd6E701180db7",
"OperatorsRegistry_Proxy": {
"address": "0xf06BEd337f29CB856b072dc8d57A2c22FB2eC2CB",
"deploymentParams": {
Expand Down Expand Up @@ -306,6 +307,7 @@
"RiverV1_Implementation_0_5_0": "0x7C0C0ab9032413ffB1982c937A62B6997Eae8304",
"RiverV1_Implementation_0_6_0_rc2": "0x1B375a15D0b5fbB215bD2678C362350AA0f40142",
"RiverV1_Implementation_1_0_0": "0x6db53718021e1e818e9286e541a30f45b5416d20",
"RiverV1_Implementation_1_0_1": "0xF32fC26C9604a380c311e7eC0c5E545917e7934f",
"River_Proxy": {
"address": "0x3ecCAdA3e11c1Cc3e9B5a53176A67cc3ABDD3E46",
"deploymentParams": {
Expand Down
2 changes: 2 additions & 0 deletions deployment.mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
},
"OperatorsRegistryV1_Implementation_0_4_0": "0xC92a612eC60a8E948d6677cD0E6F836145679705",
"OperatorsRegistryV1_Implementation_1_0_0": "0x7ADbc0BD23aB71b1dC8C946C0550fF87c9841008",
"OperatorsRegistryV1_Implementation_1_0_1": "0xb54cdb51e2b86c7f37b35558eed87e6206457a98",
"OperatorsRegistry_Proxy": {
"address": "0x1235f1b60df026B2620e48E735C422425E06b725",
"deploymentParams": {
Expand Down Expand Up @@ -310,6 +311,7 @@
"RiverV1_Implementation_0_4_0": "0x660bD93e6C149E2e0Af1963E2bDF362087792824",
"RiverV1_Implementation_0_5_0": "0x179D669aC78896f970040E57cb297582b50DE4F2",
"RiverV1_Implementation_1_0_0": "0xeB6e193B9b9f0D677890F7B614283e45adf37874",
"RiverV1_Implementation_1_0_1": "0x48D93d8C45Fb25125F13cdd40529BbeaA97A6565",
"River_Proxy": {
"address": "0x8c1BEd5b9a0928467c9B1341Da1D7BD5e10b6549",
"deploymentParams": {
Expand Down
Loading

0 comments on commit e903886

Please sign in to comment.