Skip to content

Commit

Permalink
Merge branch 'main' into jalextowle/instance/sgyd
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhea authored Nov 14, 2024
2 parents e668100 + 7cfaaf0 commit 9066048
Show file tree
Hide file tree
Showing 10 changed files with 116 additions and 38 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build_hyperdrivetypes.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
name: build and upload hyperdrivetypes wheel

on:
workflow_call:
push:
branches:
- "main"

jobs:
detect-changes:
uses: ./.github/workflows/check_diff.yaml
with:
pattern: ^python/hyperdrivetypes/pyproject.toml$

build-wheel:
name: build hyperdrivetypes wheel
needs: detect-changes
runs-on: ubuntu-latest
if: needs.detect-changes.outputs.changed == 'true'
steps:
- name: checkout hyperdrive
uses: actions/checkout@v4
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/build_types_on_change.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/workflows/build_types_on_tag.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/test_hyperdrivetypes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Test Hyperdrivetypes

on:
push:
branches:
- "main"
pull_request:

jobs:
Expand Down
70 changes: 70 additions & 0 deletions deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -1732,6 +1732,76 @@
"contract": "ERC4626Hyperdrive",
"address": "0xD9b66D9a819B36ECEfC26B043eF3B422d5A6123a",
"timestamp": "2024-10-22T00:18:26.463Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator_AerodromeLpHyperdriveCoreDeployer": {
"contract": "AerodromeLpHyperdriveCoreDeployer",
"address": "0x248ba8bfc1e4a4dc092de7e50c3c299775e85f3a",
"timestamp": "2024-10-30T18:11:09.249Z"
},
"AerodromeLpConversions": {
"contract": "AerodromeLpConversions",
"address": "0x4f3e88e6dc6d6a68fcfdc5d6e4ba4681c8704140",
"timestamp": "2024-10-30T18:11:14.246Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator_AerodromeLpTarget0Deployer": {
"contract": "AerodromeLpTarget0Deployer",
"address": "0x746887d49347292e2089449552bb2d25475b344a",
"timestamp": "2024-10-30T18:11:18.889Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator_AerodromeLpTarget1Deployer": {
"contract": "AerodromeLpTarget1Deployer",
"address": "0xd4bc07dee13b6b300643e20c1a4b8736feacd9ec",
"timestamp": "2024-10-30T18:11:23.374Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator_AerodromeLpTarget2Deployer": {
"contract": "AerodromeLpTarget2Deployer",
"address": "0x22e80a035558e4a18a04fa52c92e20d86c8411b5",
"timestamp": "2024-10-30T18:11:26.525Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator_AerodromeLpTarget3Deployer": {
"contract": "AerodromeLpTarget3Deployer",
"address": "0x805677e1536591c84c534df00b4909af7b002dac",
"timestamp": "2024-10-30T18:11:31.265Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator_AerodromeLpTarget4Deployer": {
"contract": "AerodromeLpTarget4Deployer",
"address": "0x39c701f3659b6029672ee18433b3c32d184933b9",
"timestamp": "2024-10-30T18:11:34.313Z"
},
"ElementDAO Aerodrome LP Hyperdrive Deployer Coordinator": {
"contract": "AerodromeLpHyperdriveDeployerCoordinator",
"address": "0xc49731384c0c4dbbfff8dae727eb001caffcb107",
"timestamp": "2024-10-30T18:11:39.034Z"
},
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive_AerodromeLpTarget0": {
"contract": "AerodromeLpTarget0",
"address": "0xf49D1f422a7661541033C566f358E944a2bFb976",
"timestamp": "2024-10-30T18:12:24.774Z"
},
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive_AerodromeLpTarget1": {
"contract": "AerodromeLpTarget1",
"address": "0x77EB47d666F3D8A89085335B12C5ef29956516E5",
"timestamp": "2024-10-30T18:12:07.450Z"
},
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive_AerodromeLpTarget2": {
"contract": "AerodromeLpTarget2",
"address": "0x02715A4223B02681c2d5936B75c516cEa51Db2a0",
"timestamp": "2024-10-30T18:12:12.432Z"
},
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive_AerodromeLpTarget3": {
"contract": "AerodromeLpTarget3",
"address": "0x5341D9A9935beAbF06F3904fe3601984EFDDc420",
"timestamp": "2024-10-30T18:12:17.045Z"
},
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive_AerodromeLpTarget4": {
"contract": "AerodromeLpTarget4",
"address": "0x9927F9c74e5AD5579c4C5ad2Ca4eaEFBADF6F5dC",
"timestamp": "2024-10-30T18:12:21.688Z"
},
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive": {
"contract": "AerodromeLpHyperdrive",
"address": "0x9bAdB6A21FbA04EE94fde3E85F7d170E90394c89",
"timestamp": "2024-10-30T18:12:24.607Z"
}
}
}
2 changes: 1 addition & 1 deletion python/hyperdrivetypes/prerequisite.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pypechain == 0.0.46
pypechain == 0.0.47
5 changes: 3 additions & 2 deletions python/hyperdrivetypes/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[project]
name = "hyperdrivetypes"
version = "1.0.20.9"
version = "1.0.20.11"

# Authors are the current, primary stewards of the repo
# contributors can be found on github
authors = [
{ name = "Dylan Paiton", email = "dylan@delv.tech" },
{ name = "Matthew Brown", email = "matt@delv.tech" },
{ name = "Sheng Lundquist", email = "sheng@delv.tech" },
]
description = "Python type definitions for the Hyperdrive smart contracts and integrations."
readme = "README.md"
Expand All @@ -19,7 +20,7 @@ classifiers = [
"Natural Language :: English",
]

dependencies = ["pypechain==0.0.46", "fixedpointmath"]
dependencies = ["pypechain==0.0.47", "fixedpointmath"]

[project.optional-dependencies]
dev = ["pyright>=1.1.384", "pytest"]
Expand Down
20 changes: 15 additions & 5 deletions tasks/deploy/config/base/aerodrome-lp-aero-usdc-91day.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { Address, keccak256, parseEther, toBytes, zeroAddress } from "viem";
import {
Address,
encodeAbiParameters,
keccak256,
parseAbiParameters,
parseEther,
toBytes,
zeroAddress,
} from "viem";
import {
HyperdriveInstanceConfig,
getLinkerDetails,
Expand All @@ -19,7 +27,7 @@ import { BASE_FACTORY_NAME } from "./factory";
export const BASE_AERODROME_LP_AERO_USDC_91DAY_NAME =
"ElementDAO 91 Day Aerodrome LP AERO-USDC Hyperdrive";

const CONTRIBUTION = parseEther("100"); // 1e20
const CONTRIBUTION = BigInt(500000000000); // 500 GWEI

export const BASE_AERODROME_LP_AERO_USDC_91DAY: HyperdriveInstanceConfig<"AerodromeLp"> =
{
Expand All @@ -33,12 +41,14 @@ export const BASE_AERODROME_LP_AERO_USDC_91DAY: HyperdriveInstanceConfig<"Aerodr
toBytes(BASE_AERODROME_LP_AERO_USDC_91DAY_NAME),
),
salt: toBytes32("0x69420"),
extraData: AERO_USDC_GAUGE_ADDRESS_BASE,
extraData: encodeAbiParameters(parseAbiParameters("address"), [
AERO_USDC_GAUGE_ADDRESS_BASE,
]),
contribution: CONTRIBUTION,
// The emissions APR can be found here:
// https://aerodrome.finance/deposit?token0=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&token1=0x940181a94A35A4569E4529A3CDfB74e38FD98631&type=-1
fixedAPR: parseEther("0.5468"),
timestretchAPR: parseEther("0.075"),
fixedAPR: parseEther("0.1"),
timestretchAPR: parseEther("0.2"),
options: async (hre: HardhatRuntimeEnvironment) => ({
extraData: "0x",
asBase: true,
Expand Down
2 changes: 1 addition & 1 deletion tasks/deploy/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const SEPOLIA_USDE_ADDRESS =
export const AERO_USDC_LP_ADDRESS_BASE =
"0x6cDcb1C4A4D1C3C6d054b27AC5B77e89eAFb971d" as Address;

export const AERO_USDC_GAUGE =
export const AERO_USDC_GAUGE_ADDRESS_BASE =
"0x4F09bAb2f0E15e2A078A227FE1537665F55b8360" as Address;

export const CBETH_ADDRESS_BASE =
Expand Down
15 changes: 14 additions & 1 deletion tasks/deploy/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,15 @@ task(
aggregator,
BigInt(decimals),
];
} else if (kind == "AerodromeLpHyperdrive") {
const [gauge] = decodeAbiParameters(
parseAbiParameters("address"),
instanceConfig.extraData,
);
targetArgs = [poolConfig, factoryAddress, gauge];
} else if (extras) {
targetArgs = [poolConfig, factoryAddress, ...extras];
} else {
console.log("got here");
targetArgs = [poolConfig, factoryAddress];
}

Expand Down Expand Up @@ -313,6 +318,12 @@ task(
instanceConfig.extraData,
);
args.push(...[aggregator, BigInt(decimals)]);
} else if (kind == "AerodromeLpHyperdrive") {
const [gauge] = decodeAbiParameters(
parseAbiParameters("address"),
instanceConfig.extraData,
);
args.push(...[gauge]);
} else if (extras) {
args.push(...extras);
}
Expand All @@ -327,6 +338,8 @@ task(
pathName = "rseth-linea";
} else if (kind == "StkWellHyperdrive") {
pathName = "stk-well";
} else if (kind == "AerodromeLpHyperdrive") {
pathName = "aerodrome-lp";
} else {
pathName = instanceConfig.prefix.toLowerCase();
}
Expand Down

0 comments on commit 9066048

Please sign in to comment.