|
| 1 | +import { Address, parseEther, zeroAddress } from "viem"; |
| 2 | +import { HyperdriveFactoryConfig, parseDuration } from "../../lib"; |
| 3 | + |
| 4 | +// The name of the factory. |
| 5 | +export const GNOSIS_FACTORY_NAME = "ElementDAO Hyperdrive Factory"; |
| 6 | + |
| 7 | +// The name of the forwarder factory. |
| 8 | +export const GNOSIS_FACTORY_FORWARDER_NAME = |
| 9 | + "ElementDAO ERC20 Factory Forwarder"; |
| 10 | + |
| 11 | +export const GNOSIS_FACTORY: HyperdriveFactoryConfig = { |
| 12 | + name: GNOSIS_FACTORY_NAME, |
| 13 | + prepare: async (hre, options) => { |
| 14 | + await hre.hyperdriveDeploy.ensureDeployed( |
| 15 | + GNOSIS_FACTORY_FORWARDER_NAME, |
| 16 | + "ERC20ForwarderFactory", |
| 17 | + [GNOSIS_FACTORY_FORWARDER_NAME], |
| 18 | + options, |
| 19 | + ); |
| 20 | + }, |
| 21 | + constructorArguments: async (hre) => [ |
| 22 | + { |
| 23 | + governance: (await hre.getNamedAccounts())["deployer"] as Address, |
| 24 | + deployerCoordinatorManager: (await hre.getNamedAccounts())[ |
| 25 | + "deployer" |
| 26 | + ] as Address, |
| 27 | + hyperdriveGovernance: (await hre.getNamedAccounts())[ |
| 28 | + "deployer" |
| 29 | + ] as Address, |
| 30 | + defaultPausers: [ |
| 31 | + (await hre.getNamedAccounts())["deployer"] as Address, |
| 32 | + (await hre.getNamedAccounts())["pauser"] as Address, |
| 33 | + ], |
| 34 | + feeCollector: zeroAddress, |
| 35 | + sweepCollector: zeroAddress, |
| 36 | + checkpointRewarder: zeroAddress, |
| 37 | + checkpointDurationResolution: parseDuration("1 hours"), |
| 38 | + minCheckpointDuration: parseDuration("24 hours"), |
| 39 | + maxCheckpointDuration: parseDuration("24 hours"), |
| 40 | + minPositionDuration: parseDuration("7 days"), |
| 41 | + maxPositionDuration: parseDuration("730 days"), |
| 42 | + minFixedAPR: parseEther("0.005"), |
| 43 | + maxFixedAPR: parseEther("0.1"), |
| 44 | + minTimeStretchAPR: parseEther("0.005"), |
| 45 | + maxTimeStretchAPR: parseEther("0.2"), |
| 46 | + minCircuitBreakerDelta: parseEther("0.01"), |
| 47 | + maxCircuitBreakerDelta: parseEther("0.2"), |
| 48 | + minFees: { |
| 49 | + curve: parseEther("0.001"), |
| 50 | + flat: parseEther("0.0001"), |
| 51 | + governanceLP: parseEther("0.15"), |
| 52 | + governanceZombie: parseEther("0.03"), |
| 53 | + }, |
| 54 | + maxFees: { |
| 55 | + curve: parseEther("0.05"), |
| 56 | + flat: parseEther("0.005"), |
| 57 | + governanceLP: parseEther("0.15"), |
| 58 | + governanceZombie: parseEther("0.03"), |
| 59 | + }, |
| 60 | + linkerFactory: hre.hyperdriveDeploy.deployments.byName( |
| 61 | + GNOSIS_FACTORY_FORWARDER_NAME, |
| 62 | + ).address, |
| 63 | + linkerCodeHash: await ( |
| 64 | + await hre.viem.getContractAt( |
| 65 | + "ERC20ForwarderFactory", |
| 66 | + hre.hyperdriveDeploy.deployments.byName( |
| 67 | + GNOSIS_FACTORY_FORWARDER_NAME, |
| 68 | + ).address, |
| 69 | + ) |
| 70 | + ).read.ERC20LINK_HASH(), |
| 71 | + }, |
| 72 | + GNOSIS_FACTORY_NAME, |
| 73 | + ], |
| 74 | +}; |
0 commit comments