Skip to content

Commit

Permalink
Scripts for deploying factory and pools w/ readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mcclurejt committed Apr 20, 2024
1 parent 198a29f commit 24263e0
Show file tree
Hide file tree
Showing 25 changed files with 1,509 additions and 1,722 deletions.
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ forge-cache/
node_modules/
out/
coverage_report/
*.toml
1 change: 1 addition & 0 deletions crates/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ reqwest = { version = "0.11", features = ["json"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1", features = ["full"] }
toml = {version = "0.8.12", features = ["display", "parse", "preserve_order"]}
tracing = "0.1"

# Workspace dependencies.
Expand Down
66 changes: 66 additions & 0 deletions crates/test-utils/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#:schema ../schema/schema.json

rpc_name = "sepolia"
chainId = 11155111
[factory]
address = "0xd94a3A0BfC798b98a700a785D5C610E8a2d5DBD8"
[factory.access]
admin = "0xd94a3A0BfC798b98a700a785D5C610E8a2d5DBD8"
governance = "0xc187a246Ee5A4Fe4395a8f6C0f9F2AA3A5a06e9b"
defaultPausers = ["0x0000000000000000000000000000000000000000"]
feeCollector = "0xc187a246Ee5A4Fe4395a8f6C0f9F2AA3A5a06e9b"
sweepCollector = "0xc187a246Ee5A4Fe4395a8f6C0f9F2AA3A5a06e9b"
[factory.bounds]
[factory.bounds.checkpointDuration]
resolution = { value = 8, unit = "hours" }
min = { value = 24, unit = "hours" }
max = { value = 24, unit = "hours" }
[factory.bounds.positionDuration]
min = { value = 7, unit = "days" }
max = { value = 30, unit = "days" }
[factory.bounds.fixedAPR]
min = { value = 100, unit = "bips" }
max = { value = 6000, unit = "bips" }
[factory.bounds.timeStretchAPR]
min = { value = 100, unit = "bips" }
max = { value = 6000, unit = "bips" }
[factory.bounds.fees]
[factory.bounds.fees.curve]
min = { value = 10, unit = "bips" }
max = { value = 100, unit = "bips" }
[factory.bounds.fees.flat]
min = { value = 1, unit = "bips" }
max = { value = 10, unit = "bips" }
[factory.bounds.fees.governanceLP]
min = { value = 1500, unit = "bips" }
max = { value = 1500, unit = "bips" }
[factory.bounds.fees.governanceZombie]
min = { value = 300, unit = "bips" }
max = { value = 300, unit = "bips" }


[[pools]]
name = "dai"
poolType = "ERC4626"
deploymentId = "0xAbbabab"
salt = "0x69420"
contribution = { value = 100, unit = "ether" }
fixedAPR = { value = 5000, unit = "bips" }
timeStretchAPR = { value = 5000, unit = "bips" }
[pools.tokens]
base = "0x552ceaDf3B47609897279F42D3B3309B604896f3"
shares = "0xECa45b0391E81c311F1b390808a3BA3214d35eAA"
[pools.bounds]
minimumShareReserves = { value = 10, unit = "bips" }
minimumTransactionAmount = { value = 1000000, unit = "gwei" }
positionDuration = { value = 30, unit = "days" }
checkpointDuration = { value = 1, unit = "days" }
timeStretch = 0
[pools.fees]
curve = { value = 100, unit = "bips" }
flat = { value = 5, unit = "bips" } # will be multiplied by (position_duration / 365 )
governanceLP = { value = 1500, unit = "bips" }
governanceZombie = { value = 300, unit = "bips" }
[pools.options]
asBase = true
extraData = "0x00"
4 changes: 3 additions & 1 deletion crates/test-utils/src/bin/testnet_deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ async fn testnet_deployment(
),
erc20_forwarder_factory.address(),
erc20_forwarder_factory.erc20link_hash().await?,
),),
),
"hyperdrive_factory".to_string(),
),
)?
.send()
.await?
Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,9 @@
"solhint": "^4.5.2",
"solhint-plugin-prettier": "^0.1.0",
"typescript-json-schema": "^0.63.0",
"viem": "^2.9.16"
"viem": "^2.7.6"
},
"dependencies": {
"yarn": "^1.22.19"
},
"module": "index.ts",
"type": "module",
"peerDependencies": {
"typescript": "^5.0.0"
}
}
157 changes: 0 additions & 157 deletions script/PoolDeployment.s.sol

This file was deleted.

Loading

0 comments on commit 24263e0

Please sign in to comment.