Skip to content

Commit 309c520

Browse files
committed
addressing feedback: update configuration and source addresses from factory
1 parent b21548e commit 309c520

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

tasks/deploy/config/gnosis/factory.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const GNOSIS_FACTORY: HyperdriveFactoryConfig = {
4242
minFixedAPR: parseEther("0.005"),
4343
maxFixedAPR: parseEther("0.1"),
4444
minTimeStretchAPR: parseEther("0.005"),
45-
maxTimeStretchAPR: parseEther("0.1"),
45+
maxTimeStretchAPR: parseEther("0.2"),
4646
minCircuitBreakerDelta: parseEther("0.01"),
4747
maxCircuitBreakerDelta: parseEther("0.2"),
4848
minFees: {

tasks/deploy/config/gnosis/sxdai-182day.ts

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Address, keccak256, parseEther, toBytes, zeroAddress } from "viem";
1+
import { Address, keccak256, parseEther, toBytes } from "viem";
22
import {
33
HyperdriveInstanceConfig,
44
getLinkerDetails,
@@ -53,20 +53,24 @@ export const GNOSIS_SXDAI_182DAY: HyperdriveInstanceConfig<"ERC4626"> = {
5353
await pc.waitForTransactionReceipt({ hash: tx });
5454
},
5555
poolDeployConfig: async (hre) => {
56+
let factoryContract = await hre.viem.getContractAt(
57+
"HyperdriveFactory",
58+
hre.hyperdriveDeploy.deployments.byName(GNOSIS_FACTORY_NAME)
59+
.address,
60+
);
5661
return {
5762
baseToken: WXDAI_ADDRESS_GNOSIS,
5863
vaultSharesToken: SXDAI_ADDRESS_GNOSIS,
5964
circuitBreakerDelta: parseEther("0.05"),
60-
minimumShareReserves: parseEther("10"),
65+
minimumShareReserves: parseEther("0.005"),
6166
minimumTransactionAmount: parseEther("0.001"),
6267
positionDuration: parseDuration(SIX_MONTHS),
6368
checkpointDuration: parseDuration("1 day"),
6469
timeStretch: 0n,
65-
// TODO: Read from the factory.
66-
governance: (await hre.getNamedAccounts())["deployer"] as Address,
67-
feeCollector: zeroAddress,
68-
sweepCollector: zeroAddress,
69-
checkpointRewarder: zeroAddress,
70+
governance: await factoryContract.read.governance(),
71+
feeCollector: await factoryContract.read.feeCollector(),
72+
sweepCollector: await factoryContract.read.sweepCollector(),
73+
checkpointRewarder: await factoryContract.read.checkpointRewarder(),
7074
...(await getLinkerDetails(
7175
hre,
7276
hre.hyperdriveDeploy.deployments.byName(GNOSIS_FACTORY_NAME)

tasks/deploy/config/gnosis/wsteth-182day.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ export const GNOSIS_WSTETH_182DAY: HyperdriveInstanceConfig<"Chainlink"> = {
6868
await pc.waitForTransactionReceipt({ hash: tx });
6969
},
7070
poolDeployConfig: async (hre) => {
71+
let factoryContract = await hre.viem.getContractAt(
72+
"HyperdriveFactory",
73+
hre.hyperdriveDeploy.deployments.byName(GNOSIS_FACTORY_NAME)
74+
.address,
75+
);
7176
return {
7277
baseToken: zeroAddress,
7378
vaultSharesToken: WSTETH_ADDRESS_GNOSIS,
@@ -78,10 +83,10 @@ export const GNOSIS_WSTETH_182DAY: HyperdriveInstanceConfig<"Chainlink"> = {
7883
checkpointDuration: parseDuration("1 day"),
7984
timeStretch: 0n,
8085
// TODO: Read from the factory.
81-
governance: (await hre.getNamedAccounts())["deployer"] as Address,
82-
feeCollector: zeroAddress,
83-
sweepCollector: zeroAddress,
84-
checkpointRewarder: zeroAddress,
86+
governance: await factoryContract.read.governance(),
87+
feeCollector: await factoryContract.read.feeCollector(),
88+
sweepCollector: await factoryContract.read.sweepCollector(),
89+
checkpointRewarder: await factoryContract.read.checkpointRewarder(),
8590
...(await getLinkerDetails(
8691
hre,
8792
hre.hyperdriveDeploy.deployments.byName(GNOSIS_FACTORY_NAME)

0 commit comments

Comments
 (0)