-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: deploy gOHM/DAI otcOffer (#910)
- Loading branch information
1 parent
d389945
commit 8c3989a
Showing
4 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
...ocol/scripts/deploys/mainnet/deploymentArgs/0x2c4b131BEf9d676877Ae0b5b2B46914b07FB9272.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// mainnet: OTC_OFFER.DAI_GOHM=0x2c4b131BEf9d676877Ae0b5b2B46914b07FB9272 | ||
// yarn hardhat verify --network mainnet 0x2c4b131BEf9d676877Ae0b5b2B46914b07FB9272 --constructor-args scripts/deploys/mainnet/deploymentArgs/0x2c4b131BEf9d676877Ae0b5b2B46914b07FB9272.js | ||
module.exports = [ | ||
"0x0ab87046fBb341D058F17CBC4c1133F25a20a52f", | ||
"0x6b175474e89094c44da98b954eedeac495271d0f", | ||
"0x5C8898f8E0F9468D4A677887bC03EE2659321012", | ||
"3096000000000000000000", | ||
0, | ||
"2900000000000000000000", | ||
"3300000000000000000000" | ||
]; |
38 changes: 38 additions & 0 deletions
38
protocol/scripts/deploys/mainnet/otcOffer/03-otcOffer-dai-gohm.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import '@nomiclabs/hardhat-ethers'; | ||
import { ethers } from 'hardhat'; | ||
import { OtcOffer__factory } from '../../../../typechain'; | ||
import { | ||
deployAndMine, | ||
ensureExpectedEnvvars, | ||
} from '../../helpers'; | ||
import { getDeployedContracts } from './contract-addresses'; | ||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
const [owner] = await ethers.getSigners(); | ||
const CORE_ADDRESSES = getDeployedContracts(); | ||
|
||
const factory = new OtcOffer__factory(owner); | ||
await deployAndMine( | ||
'OTC_OFFER.DAI_GOHM', | ||
factory, | ||
factory.deploy, | ||
CORE_ADDRESSES.EXTERNAL.OLYMPUS.GOHM_TOKEN, // user sell token | ||
CORE_ADDRESSES.EXTERNAL.MAKER_DAO.DAI_TOKEN, // user buy token | ||
CORE_ADDRESSES.OTC_OFFER.FUNDS_OWNER, // fundsOwner | ||
ethers.utils.parseEther("3096"), // initial offerPrice -- always 18 dp | ||
0, // offerPricingToken == DAI (USER_BUY_TOKEN) | ||
ethers.utils.parseEther("2900"), // minOfferPrice | ||
ethers.utils.parseEther("3300"), // maxOfferPrice | ||
); | ||
|
||
} | ||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
main() | ||
.then(() => process.exit(0)) | ||
.catch(error => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters