Skip to content

Commit 260ed61

Browse files
author
Franck
authored
OGN Staking contract upgrade (#485)
* rinkeby ousd staking upgrade * mainnet ogn staking upgrade * Show proxy implementation address in hardhat debug task
1 parent 1249fe1 commit 260ed61

12 files changed

+735
-46
lines changed

contracts/deploy/010_upgrade_single_asset_staking.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const {
1010
log,
1111
deployWithConfirmation,
1212
executeProposal,
13+
sendProposal,
1314
} = require("../utils/deploy");
1415
const { proposeArgs } = require("../utils/governor");
1516
const { getTxOpts } = require("../utils/tx");

contracts/deployments/mainnet/.migrations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"004_single_asset_staking": 1608192583,
66
"007_upgrade_single_asset_staking": 1608527258,
77
"008_ousd_reset": 1609285987,
8-
"009_ousd_fix": 1609736357
8+
"009_ousd_fix": 1609736357,
9+
"010_upgrade_single_asset_staking": 1609971639
910
}

contracts/deployments/mainnet/SingleAssetStaking.json

Lines changed: 38 additions & 20 deletions
Large diffs are not rendered by default.

contracts/deployments/mainnet/solcInputs/c7459e40fa663addef2a13f82ab72194.json

Lines changed: 287 additions & 0 deletions
Large diffs are not rendered by default.

contracts/deployments/rinkeby/.migrations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"004_single_asset_staking": 1608185799,
77
"007_upgrade_single_asset_staking": 1608526958,
88
"008_ousd_reset": 1609285987,
9-
"009_ousd_fix": 1609652662
9+
"009_ousd_fix": 1609652662,
10+
"010_upgrade_single_asset_staking": 1609968697
1011
}

contracts/deployments/rinkeby/SingleAssetStaking.json

Lines changed: 38 additions & 20 deletions
Large diffs are not rendered by default.

contracts/deployments/rinkeby/solcInputs/c7459e40fa663addef2a13f82ab72194.json

Lines changed: 287 additions & 0 deletions
Large diffs are not rendered by default.

contracts/hardhat.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,30 +209,52 @@ task(
209209

210210
const governor = await hre.ethers.getContract("Governor");
211211

212+
const ognStakingProxy = await hre.ethers.getContract("OGNStakingProxy");
213+
const ognStaking = await hre.ethers.getContract("SingleAssetStaking");
214+
212215
//
213216
// Addresses
214217
//
215218
console.log("\nContract addresses");
216219
console.log("====================");
217220
console.log(`OUSD proxy: ${ousdProxy.address}`);
221+
console.log(`OUSD impl: ${await ousdProxy.implementation()}`);
218222
console.log(`OUSD: ${cOusd.address}`);
219223
console.log(`Vault proxy: ${vaultProxy.address}`);
224+
console.log(
225+
`Vault impl: ${await vaultProxy.implementation()}`
226+
);
220227
console.log(`Vault: ${cVault.address}`);
221228
console.log(`Vault core: ${vaultCore.address}`);
222229
console.log(`Vault admin: ${vaultAdmin.address}`);
223230
console.log(`AaveStrategy proxy: ${aaveProxy.address}`);
231+
console.log(`AaveStrategy impl: ${await aaveProxy.implementation()}`);
224232
console.log(`AaveStrategy: ${cAaveStrategy.address}`);
225233
console.log(`CompoundStrategy proxy: ${compoundProxy.address}`);
234+
console.log(
235+
`CompoundStrategy impl: ${await compoundProxy.implementation()}`
236+
);
226237
console.log(`CompoundStrategy: ${cCompoundStrategy.address}`);
227238
if (!isMainnetOrRinkebyOrFork) {
228239
console.log(`CurveUSDCStrategy proxy: ${curveUSDCStrategyProxy.address}`);
240+
console.log(
241+
`CurveUSDCStrategy imply: ${await curveUSDCStrategyProxy.implementation()}`
242+
);
229243
console.log(`CurveUSDCStrategy: ${cCurveUSDCStrategy.address}`);
230244
console.log(`CurveUSDTStrategy proxy: ${curveUSDTStrategyProxy.address}`);
245+
console.log(
246+
`CurveUSDTStrategy impl: ${await curveUSDTStrategyProxy.implementation()}`
247+
);
231248
console.log(`CurveUSDTStrategy: ${cCurveUSDTStrategy.address}`);
232249
}
233250
console.log(`MixOracle: ${mixOracle.address}`);
234251
console.log(`ChainlinkOracle: ${chainlinkOracle.address}`);
235252
console.log(`Governor: ${governor.address}`);
253+
console.log(`OGNStaking proxy: ${ognStakingProxy.address}`);
254+
console.log(
255+
`OGNStaking proxy impl: ${await ognStakingProxy.implementation()}`
256+
);
257+
console.log(`OGNStaking: ${ognStaking.address}`);
236258

237259
//
238260
// Governor

contracts/utils/deploy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ const sendProposal = async (proposalArgs, description) => {
187187
const governor = await ethers.getContract("Governor");
188188

189189
log(`Submitting proposal for ${description} to governor ${governor.address}`);
190-
log(`Args: ${proposalArgs}`)
190+
log(`Args: ${JSON.stringify(proposalArgs, null, 2)}`)
191191
await withConfirmation(
192192
governor
193193
.connect(sDeployer)

dapp/network.mainnet.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7137,7 +7137,7 @@
71377137
]
71387138
},
71397139
"SingleAssetStaking": {
7140-
"address": "0xF6c1a36a200c9aCc5046A86037Ffbe4e0eCb2d6a",
7140+
"address": "0x0Ed143d1D6d98f10db7151b66D76aA3956072b5a",
71417141
"abi": [
71427142
{
71437143
"constant": true,
@@ -7749,6 +7749,18 @@
77497749
"internalType": "uint256",
77507750
"name": "amount",
77517751
"type": "uint256"
7752+
},
7753+
{
7754+
"indexed": false,
7755+
"internalType": "uint256",
7756+
"name": "duration",
7757+
"type": "uint256"
7758+
},
7759+
{
7760+
"indexed": false,
7761+
"internalType": "uint256",
7762+
"name": "rate",
7763+
"type": "uint256"
77527764
}
77537765
],
77547766
"name": "Staked",
@@ -7768,6 +7780,12 @@
77687780
"internalType": "uint256",
77697781
"name": "amount",
77707782
"type": "uint256"
7783+
},
7784+
{
7785+
"indexed": false,
7786+
"internalType": "uint256",
7787+
"name": "stakedAmount",
7788+
"type": "uint256"
77717789
}
77727790
],
77737791
"name": "Withdrawn",

dapp/network.rinkeby.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16119,7 +16119,7 @@
1611916119
]
1612016120
},
1612116121
"SingleAssetStaking": {
16122-
"address": "0x13Cce8457Bd81b6935E760599dc523a95B9527e8",
16122+
"address": "0xc21B8c7F598bD0b4e383ec8C0AAE2b8519C2Bd65",
1612316123
"abi": [
1612416124
{
1612516125
"constant": true,
@@ -16731,6 +16731,18 @@
1673116731
"internalType": "uint256",
1673216732
"name": "amount",
1673316733
"type": "uint256"
16734+
},
16735+
{
16736+
"indexed": false,
16737+
"internalType": "uint256",
16738+
"name": "duration",
16739+
"type": "uint256"
16740+
},
16741+
{
16742+
"indexed": false,
16743+
"internalType": "uint256",
16744+
"name": "rate",
16745+
"type": "uint256"
1673416746
}
1673516747
],
1673616748
"name": "Staked",
@@ -16750,6 +16762,12 @@
1675016762
"internalType": "uint256",
1675116763
"name": "amount",
1675216764
"type": "uint256"
16765+
},
16766+
{
16767+
"indexed": false,
16768+
"internalType": "uint256",
16769+
"name": "stakedAmount",
16770+
"type": "uint256"
1675316771
}
1675416772
],
1675516773
"name": "Withdrawn",

dapp/prod.network.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7137,7 +7137,7 @@
71377137
]
71387138
},
71397139
"SingleAssetStaking": {
7140-
"address": "0xF6c1a36a200c9aCc5046A86037Ffbe4e0eCb2d6a",
7140+
"address": "0x0Ed143d1D6d98f10db7151b66D76aA3956072b5a",
71417141
"abi": [
71427142
{
71437143
"constant": true,
@@ -7749,6 +7749,18 @@
77497749
"internalType": "uint256",
77507750
"name": "amount",
77517751
"type": "uint256"
7752+
},
7753+
{
7754+
"indexed": false,
7755+
"internalType": "uint256",
7756+
"name": "duration",
7757+
"type": "uint256"
7758+
},
7759+
{
7760+
"indexed": false,
7761+
"internalType": "uint256",
7762+
"name": "rate",
7763+
"type": "uint256"
77527764
}
77537765
],
77547766
"name": "Staked",
@@ -7768,6 +7780,12 @@
77687780
"internalType": "uint256",
77697781
"name": "amount",
77707782
"type": "uint256"
7783+
},
7784+
{
7785+
"indexed": false,
7786+
"internalType": "uint256",
7787+
"name": "stakedAmount",
7788+
"type": "uint256"
77717789
}
77727790
],
77737791
"name": "Withdrawn",

0 commit comments

Comments
 (0)