Skip to content

Commit

Permalink
Merge pull request #117 from clober-dex/feat/export-strategy-type
Browse files Browse the repository at this point in the history
feat: export get strategy return type
  • Loading branch information
Dorvin authored Oct 2, 2024
2 parents a0eb7bc + e718274 commit cd5a844
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clober/v2-sdk",
"version": "0.0.73",
"version": "0.0.74",
"description": "🛠 An SDK for building applications on top of Clober V2",
"files": [
"dist"
Expand Down
3 changes: 1 addition & 2 deletions src/apis/strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { PublicClient } from 'viem'

import { CHAIN_IDS } from '../constants/chain'
import { CONTRACT_ADDRESSES } from '../constants/addresses'
import { StrategyPrice } from '../model/strategy'
import { Market, StrategyPrice } from '../type'
import { STRATEGY_ABI } from '../abis/rebalancer/strategy-abi'
import { Market } from '../type'
import { toPoolKey } from '../utils/pool-key'

import { fetchPool } from './pool'
Expand Down
5 changes: 0 additions & 5 deletions src/model/strategy.ts

This file was deleted.

6 changes: 6 additions & 0 deletions src/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ export type Book = {
isOpened: boolean
}

export type StrategyPrice = {
oraclePrice: bigint
bidTick: bigint
askTick: bigint
}

export type Market = {
chainId: CHAIN_IDS
quote: Currency
Expand Down
2 changes: 1 addition & 1 deletion src/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type {
DefaultReadContractOptions,
Market,
Pool,
StrategyPrice,
} from './type'
import { CHART_LOG_INTERVALS } from './type'
import { formatPrice, parsePrice } from './utils/prices'
Expand All @@ -27,7 +28,6 @@ import { invertTick, toPrice } from './utils/tick'
import { MAX_TICK, MIN_TICK } from './constants/tick'
import { fetchPool } from './apis/pool'
import { fetchStrategyPrice } from './apis/strategy'
import { StrategyPrice } from './model/strategy'
import { Subgraph } from './constants/subgraph'

/**
Expand Down

0 comments on commit cd5a844

Please sign in to comment.