Skip to content

Commit

Permalink
Feat: Token Wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
piesrtasty authored Jan 8, 2025
2 parents cff184a + 36011e1 commit 456dac7
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hai-on-op/sdk",
"version": "1.2.18",
"version": "1.2.19",
"description": "Javascript client for HAI",
"license": "MIT",
"main": "lib",
Expand All @@ -21,7 +21,7 @@
"**/*": "prettier --write --ignore-unknown"
},
"dependencies": {
"@hai-on-op/abis": "0.0.0-785e0b4c",
"@hai-on-op/abis": "1.0.7",
"ethers": "5.4.7"
},
"devDependencies": {
Expand Down
4 changes: 4 additions & 0 deletions src/api/contract-apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export class ContractApis {
public rateSetter: types.IPIDRateSetter
public piCalculator: types.IPIDController

public wrappedTokenHaiVelo: types.IWrappedToken

public merkleDistributorFactoryKite: types.MerkleDistributorFactory
public merkleDistributorFactoryOp: types.MerkleDistributorFactory
public merkleDistributorFactoryDinero: types.MerkleDistributorFactory
Expand Down Expand Up @@ -64,6 +66,8 @@ export class ContractApis {
this.rateSetter = types.IPIDRateSetter__factory.connect(addressList.GEB_RRFM_SETTER, signerOrProvider)
this.piCalculator = types.IPIDController__factory.connect(addressList.GEB_RRFM_CALCULATOR, signerOrProvider)

this.wrappedTokenHaiVelo = types.IWrappedToken__factory.connect(addressList.WRAPPED_TOKEN_HAI_VELO, signerOrProvider)

this.merkleDistributorFactoryKite = types.MerkleDistributorFactory__factory.connect(addressList.MERKLE_DISTRIBUTOR_FACTORY_KITE, signerOrProvider)
this.merkleDistributorFactoryOp = types.MerkleDistributorFactory__factory.connect(addressList.MERKLE_DISTRIBUTOR_FACTORY_OP, signerOrProvider)
this.merkleDistributorFactoryDinero = types.MerkleDistributorFactory__factory.connect(addressList.MERKLE_DISTRIBUTOR_FACTORY_DINERO, signerOrProvider)
Expand Down
27 changes: 27 additions & 0 deletions src/contracts/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
LDO,
UNI,
VELO,
HAIVELO,
FRXETH,
SFRXETH,
PENDLE,
Expand Down Expand Up @@ -55,6 +56,7 @@ export type ContractKey =
| 'JOB_ACCOUNTING'
| 'JOB_LIQUIDATION'
| 'JOB_ORACLES'
| 'WRAPPED_TOKEN_HAI_VELO'
| 'MERKLE_DISTRIBUTOR_FACTORY_KITE'
| 'MERKLE_DISTRIBUTOR_FACTORY_OP'
| 'MERKLE_DISTRIBUTOR_FACTORY_DINERO'
Expand Down Expand Up @@ -99,6 +101,7 @@ const addresses: Record<GebDeployment, ContractList> = {
JOB_ACCOUNTING: '0xc256C3aa404Ab74cE050Bcf8A05256B6A1729EF0',
JOB_LIQUIDATION: '0x5EF15750b5672CD6217E4E184cEAD440cB1b3638',
JOB_ORACLES: '0xF4F18205D8D46638489865e42c0a71a3d4F9FC22',
WRAPPED_TOKEN_HAI_VELO: '0x1C0541cB726007c3eB917bA4a9e84BFFBA511c3c',
MERKLE_DISTRIBUTOR_FACTORY_KITE: '0x3975Ff822aF38552fAC62A975D4D4e0Ea5Ac5980',
MERKLE_DISTRIBUTOR_FACTORY_OP: '0x524fE171e80173C15381bB50034033dA282abCc6',
MERKLE_DISTRIBUTOR_FACTORY_DINERO: '0xFC4fD07b8CbA6b008952656a3d16A25da012EA56',
Expand Down Expand Up @@ -136,6 +139,7 @@ const addresses: Record<GebDeployment, ContractList> = {
JOB_ACCOUNTING: '0xCeCc0253fA03786031A4df8DB940728543D01Fb6',
JOB_LIQUIDATION: '0x1Bea51CDcc5E5713A7b5eca4F1B27D90b3F0ddB5',
JOB_ORACLES: '0x1F517889F899A3792c4ED0D6Ae8f1A69e89E3d40',
WRAPPED_TOKEN_HAI_VELO: '0x1C0541cB726007c3eB917bA4a9e84BFFBA511c3c',
MERKLE_DISTRIBUTOR_FACTORY_KITE: '0x3975Ff822aF38552fAC62A975D4D4e0Ea5Ac5980',
MERKLE_DISTRIBUTOR_FACTORY_OP: '0x524fE171e80173C15381bB50034033dA282abCc6',
MERKLE_DISTRIBUTOR_FACTORY_DINERO: '0xFC4fD07b8CbA6b008952656a3d16A25da012EA56',
Expand Down Expand Up @@ -173,6 +177,7 @@ const addresses: Record<GebDeployment, ContractList> = {
JOB_ACCOUNTING: '0x4fcd90ee6a041c631b6b93a52b4d94e0cedcb1ad',
JOB_LIQUIDATION: '0x50d758e014c972e73166ea87a6a7d96868bf2859',
JOB_ORACLES: '0xaacc036c505370918e4a89567a636d561833bd21',
WRAPPED_TOKEN_HAI_VELO: '0x1C0541cB726007c3eB917bA4a9e84BFFBA511c3c',
MERKLE_DISTRIBUTOR_FACTORY_KITE: '0x3975Ff822aF38552fAC62A975D4D4e0Ea5Ac5980',
MERKLE_DISTRIBUTOR_FACTORY_OP: '0x524fE171e80173C15381bB50034033dA282abCc6',
MERKLE_DISTRIBUTOR_FACTORY_DINERO: '0xFC4fD07b8CbA6b008952656a3d16A25da012EA56',
Expand Down Expand Up @@ -599,6 +604,28 @@ const tokens: Record<GebDeployment, TokenList> = {
isCollateral: false,
hasRewards: false,
},
VELO: {
address: '0x1be428e1265d28194b44ac28d5728a1cf81c3469',
decimals: 18,
symbol: 'VELO',
label: 'VELO',
bytes32String: VELO,
collateralJoin: '',
collateralAuctionHouse: '',
isCollateral: false,
hasRewards: false,
},
HAIVELO: {
address: '0x1c0541cb726007c3eb917ba4a9e84bffba511c3c',
decimals: 18,
symbol: 'HAIVELO',
label: 'HAIVELO',
bytes32String: HAIVELO,
collateralJoin: '',
collateralAuctionHouse: '',
isCollateral: false,
hasRewards: false,
},
},
}

Expand Down
5 changes: 5 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ const UNI = '0x554e490000000000000000000000000000000000000000000000000000000000'
* byte32 value for the "VELO" collateral
*/
const VELO = '0x56454c4f00000000000000000000000000000000000000000000000000000000'
/**
* byte32 value for the "HAIVELO" collateral
*/
const HAIVELO = '0x48414956454c4f00000000000000000000000000000000000000000000000000'
/**
* byte32 value for the "APXETH" collateral
*/
Expand Down Expand Up @@ -193,6 +197,7 @@ export {
LDO,
UNI,
VELO,
HAIVELO,
APXETH,
MOO_VELO_V2_OP_VELO,
FRXETH,
Expand Down
9 changes: 4 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -828,10 +828,10 @@
"@ethersproject/properties" "^5.7.0"
"@ethersproject/strings" "^5.7.0"

"@hai-on-op/abis@0.0.0-785e0b4c":
version "0.0.0-785e0b4c"
resolved "https://registry.yarnpkg.com/@hai-on-op/abis/-/abis-0.0.0-785e0b4c.tgz#4cf67055c6237a41c0eb04e4a9fd804a3d2251df"
integrity sha512-CO4jbahHz/AXo2v84UPN/qoXNLlqly5kbJ+nHP27Mw/2jAg5Tky20TmJk93EuMAWdH3wZgKi2uxP9hDH+kKPpw==
"@hai-on-op/abis@1.0.7":
version "1.0.7"
resolved "https://registry.yarnpkg.com/@hai-on-op/abis/-/abis-1.0.7.tgz#ec7b50ae8d20f0457f963f18a33f338c7ec675e1"
integrity sha512-9KDSTiNixQxi5srn5+t0kGckyL1HbZ6ronu+ZnBV7WS10pSxhj8j4O5u9CMQKAxySSWU+oZo/89F8JSCKwg3Kw==
dependencies:
"@defi-wonderland/solidity-utils" "0.0.0-4298c6c6"
"@ethersproject/abi" "5.7.0"
Expand Down Expand Up @@ -1456,7 +1456,6 @@ dot-prop@^5.1.0:

"ds-test@git+https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0":
version "1.0.0"
uid e282159d5170298eb2455a6c05280ab5a73a4ef0
resolved "git+https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0"

"ds-test@https://github.com/dapphub/ds-test":
Expand Down

0 comments on commit 456dac7

Please sign in to comment.