Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions contracts/contracts/proxies/Proxies.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,10 @@ contract ConvexLUSDMetaStrategyProxy is InitializeGovernedUpgradeabilityProxy {
contract MorphoAaveStrategyProxy is InitializeGovernedUpgradeabilityProxy {

}

/**
* @notice OETHProxy delegates calls to nowhere for now
*/
contract OETHProxy is InitializeGovernedUpgradeabilityProxy {

}
11 changes: 11 additions & 0 deletions contracts/contracts/token/OETH.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.0;

/**
* @title OETH Token Contract
* @author Origin Protocol Inc
*/

contract OETH {

}
50 changes: 50 additions & 0 deletions contracts/deploy/049_oeth_proxy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
const { deploymentWithProposal } = require("../utils/deploy");
const addresses = require("../utils/addresses");

module.exports = deploymentWithProposal(
{ deployName: "049_oeth_proxy", forceDeploy: false, forceSkip: true },
async ({ deployWithConfirmation, ethers, getTxOpts, withConfirmation }) => {
const { deployerAddr, governorAddr } = await getNamedAccounts();
const sDeployer = await ethers.provider.getSigner(deployerAddr);

// Deployer Actions
// ----------------

// 1. Deploy new proxy
// New OETH proxy
const dOethProxy = await deployWithConfirmation("OETHProxy");
const cOethProxy = await ethers.getContractAt(
"OETHProxy",
dOethProxy.address
);

// 2. Deploy new implementation
const dOETHImpl = await deployWithConfirmation("OETH");

// 3. Init the proxy to point at the implementation
await withConfirmation(
cOethProxy
.connect(sDeployer)
["initialize(address,address,bytes)"](
dOETHImpl.address,
deployerAddr,
[],
await getTxOpts()
)
);

// 5. Transfer governance
await withConfirmation(
cOethProxy
.connect(sDeployer)
.transferGovernance(addresses.mainnet.Guardian, await getTxOpts())
);

// Governance Actions
// ----------------
return {
name: "Deploy an empty OETH proxy",
actions: [],
};
}
);
41 changes: 41 additions & 0 deletions contracts/deployments/mainnet/OETH.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"address": "0x84E45FDD8AC0E1Ef13Da5F78037255009842d135",
"abi": [],
"transactionHash": "0x413d8d25fbb91f65512291a66f3d1570dd86c5a62c252feddcb517e75e8c6aff",
"receipt": {
"to": null,
"from": "0xFD9E6005187F448957a0972a7d0C0A6dA2911236",
"contractAddress": "0x84E45FDD8AC0E1Ef13Da5F78037255009842d135",
"transactionIndex": 21,
"gasUsed": "67054",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xd1661fa30600d254dbacb3b8962ebcd22899af6fd312a6dd09571712f6a9170c",
"transactionHash": "0x413d8d25fbb91f65512291a66f3d1570dd86c5a62c252feddcb517e75e8c6aff",
"logs": [],
"blockNumber": 16935270,
"cumulativeGasUsed": "2734778",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "fd147e8addb65b93518dc23db070bf76",
"metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Origin Protocol Inc\",\"kind\":\"dev\",\"methods\":{},\"title\":\"OETH Token Contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/token/OETH.sol\":\"OETH\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/token/OETH.sol\":{\"content\":\"// SPDX-License-Identifier: agpl-3.0\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OETH Token Contract\\n * @author Origin Protocol Inc\\n */\\n\\ncontract OETH {\\n\\n}\\n\",\"keccak256\":\"0x669b1bbf01a735f64da3c3b8b07609bc06786118d77de161453f9b7b3b1b1f6b\",\"license\":\"agpl-3.0\"}},\"version\":1}",
"bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea26469706673582212206bb94800cdbb2edf83d59010762037cc18a1bf10a4c78d38d9deff91ec19c15e64736f6c63430008070033",
"deployedBytecode": "0x6080604052600080fdfea26469706673582212206bb94800cdbb2edf83d59010762037cc18a1bf10a4c78d38d9deff91ec19c15e64736f6c63430008070033",
"devdoc": {
"author": "Origin Protocol Inc",
"kind": "dev",
"methods": {},
"title": "OETH Token Contract",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}
284 changes: 284 additions & 0 deletions contracts/deployments/mainnet/OETHProxy.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"language": "Solidity",
"sources": {
"contracts/token/OETH.sol": {
"content": "// SPDX-License-Identifier: agpl-3.0\npragma solidity ^0.8.0;\n\n/**\n * @title OETH Token Contract\n * @author Origin Protocol Inc\n */\n\ncontract OETH {\n\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.gasEstimates"
],
"": [
"ast"
]
}
},
"metadata": {
"useLiteralContent": true
}
}
}
4 changes: 4 additions & 0 deletions contracts/storageLayout/mainnet/OETH.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"storage": [],
"types": {}
}
4 changes: 4 additions & 0 deletions contracts/storageLayout/mainnet/OETHProxy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"storage": [],
"types": {}
}
6 changes: 3 additions & 3 deletions contracts/utils/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,11 @@ const sanityCheckOgvGovernance = async () => {
);

const vaultGovernor = await VaultAdmin.governor();
const { governorFiveAddr } = await getNamedAccounts();
const { timelockAddr } = await getNamedAccounts();

if (vaultGovernor.toLowerCase() !== governorFiveAddr.toLowerCase()) {
if (vaultGovernor.toLowerCase() !== timelockAddr.toLowerCase()) {
throw new Error(
`Hardhat environment has ${governorFiveAddr} governor address configured which is different from Vault's governor: ${vaultGovernor}`
`Hardhat environment has ${timelockAddr} governor address configured which is different from Vault's governor: ${vaultGovernor}`
);
}
}
Expand Down