Skip to content

Commit

Permalink
Merge pull request #9 from stabilitydao/dev
Browse files Browse the repository at this point in the history
ALM factories
  • Loading branch information
a17 authored Jun 20, 2024
2 parents 1ca9ccb + 16db3f6 commit d89903d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ import type {ApiMainReply, ApiAggSwapData} from '@stabilitydao/stability'

The Graph API query URLs for supported networks.

### Addresses

Third-party addresses.

```typescript
import {almFactories} from '@stabilitydao/stability'
```

## Develop

```shell
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stabilitydao/stability",
"version": "0.7.0",
"version": "0.7.1",
"description": "Stability Integration Library",
"main": "out/index.js",
"types": "out/index.d.ts",
Expand Down
17 changes: 17 additions & 0 deletions src/addresses.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export const almFactories: {
[chainId:string]: {
[almId:string]: {
[dexId:string]: `0x${string}`,
},
},
} = {
"137": {
ichi: {
retro: "0xb2f44D8545315cDd0bAaB4AC7233218b932a5dA7",
quickswapV3: "0x11700544C577Cb543a498B27B4F0f7018BDb6E8a",
},
defiEdge: {
quickswapV3: "0x730d158D29165C55aBF368e9608Af160DD21Bd80",
},
},
}
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
import {subgraphs} from "./subgraphs";
import type {ApiMainReply, ApiAggSwapData} from "./api.types"
import tokenlist from "./stability.tokenlist.json"
import {almFactories} from "./addresses";

export {
deployments,
Expand All @@ -39,6 +40,7 @@ export {
ApiMainReply,
ApiAggSwapData,
tokenlist,
almFactories,
getMerklStrategies,
getStrategyShortId,
getIntegrationStatus,
Expand Down
6 changes: 5 additions & 1 deletion tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
deployments,
integrations,
StrategyShortId,
tokenlist, subgraphs,
tokenlist, subgraphs, almFactories,
} from "../src";

describe('index', () => {
Expand All @@ -27,4 +27,8 @@ describe('index', () => {
test('subgraphs', () => {
expect(Object.keys(subgraphs).length).toBeGreaterThan(0)
})
test('almFactories', () => {
expect(Object.keys(almFactories).length).toBeGreaterThan(0)
expect(almFactories["137"].ichi.retro).toBe("0xb2f44D8545315cDd0bAaB4AC7233218b932a5dA7")
})
})

0 comments on commit d89903d

Please sign in to comment.