@clober/v2-sdk 0.0.5 → 0.0.6-0.dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -4
- package/dist/cjs/abis/core/book-manager-abi.js +112 -0
- package/dist/cjs/abis/core/book-manager-abi.js.map +1 -0
- package/dist/cjs/abis/core/book-viewer-abi.js +137 -5
- package/dist/cjs/abis/core/book-viewer-abi.js.map +1 -1
- package/dist/cjs/abis/core/controller-abi.js +29 -24
- package/dist/cjs/abis/core/controller-abi.js.map +1 -1
- package/dist/cjs/abis/rebalancer/minter-abi.js +262 -0
- package/dist/cjs/abis/rebalancer/minter-abi.js.map +1 -0
- package/dist/cjs/abis/rebalancer/mock-swap-abi.js +95 -0
- package/dist/cjs/abis/rebalancer/mock-swap-abi.js.map +1 -0
- package/dist/cjs/abis/rebalancer/operator-abi.js +370 -0
- package/dist/cjs/abis/rebalancer/operator-abi.js.map +1 -0
- package/dist/cjs/abis/rebalancer/rebalancer-abi.js +1235 -0
- package/dist/cjs/abis/rebalancer/rebalancer-abi.js.map +1 -0
- package/dist/cjs/abis/rebalancer/strategy-abi.js +633 -0
- package/dist/cjs/abis/rebalancer/strategy-abi.js.map +1 -0
- package/dist/cjs/apis/chart-logs.js +163 -0
- package/dist/cjs/apis/chart-logs.js.map +1 -0
- package/dist/cjs/apis/market.js +40 -21
- package/dist/cjs/apis/market.js.map +1 -1
- package/dist/cjs/apis/odos.js +100 -0
- package/dist/cjs/apis/odos.js.map +1 -0
- package/dist/cjs/apis/open-order.js +60 -28
- package/dist/cjs/apis/open-order.js.map +1 -1
- package/dist/cjs/apis/pool.js +61 -0
- package/dist/cjs/apis/pool.js.map +1 -0
- package/dist/cjs/apis/strategy.js +23 -0
- package/dist/cjs/apis/strategy.js.map +1 -0
- package/dist/cjs/approval.js +85 -31
- package/dist/cjs/approval.js.map +1 -1
- package/dist/cjs/call.js +672 -155
- package/dist/cjs/call.js.map +1 -1
- package/dist/cjs/constants/addresses.js +41 -1
- package/dist/cjs/constants/addresses.js.map +1 -1
- package/dist/cjs/constants/chain.js +22 -2
- package/dist/cjs/constants/chain.js.map +1 -1
- package/dist/cjs/constants/currency.js +27 -2
- package/dist/cjs/constants/currency.js.map +1 -1
- package/dist/cjs/constants/fee.js +15 -2
- package/dist/cjs/constants/fee.js.map +1 -1
- package/dist/cjs/constants/permit.js +13 -0
- package/dist/cjs/constants/permit.js.map +1 -0
- package/dist/cjs/constants/price.js +2 -1
- package/dist/cjs/constants/price.js.map +1 -1
- package/dist/cjs/constants/subgraph.js +38 -0
- package/dist/cjs/constants/subgraph.js.map +1 -0
- package/dist/cjs/constants/test-chain.js +27 -0
- package/dist/cjs/constants/test-chain.js.map +1 -0
- package/dist/cjs/constants/tick.js +6 -0
- package/dist/cjs/constants/tick.js.map +1 -0
- package/dist/cjs/index.js +20 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/model/book.js +62 -35
- package/dist/cjs/model/book.js.map +1 -1
- package/dist/cjs/model/chart-log.js +3 -0
- package/dist/cjs/model/chart-log.js.map +1 -0
- package/dist/cjs/model/market.js +61 -26
- package/dist/cjs/model/market.js.map +1 -1
- package/dist/cjs/model/pool.js +136 -0
- package/dist/cjs/model/pool.js.map +1 -0
- package/dist/cjs/model/strategy.js +3 -0
- package/dist/cjs/model/strategy.js.map +1 -0
- package/dist/cjs/signature.js +28 -20
- package/dist/cjs/signature.js.map +1 -1
- package/dist/cjs/type.js +16 -1
- package/dist/cjs/type.js.map +1 -1
- package/dist/cjs/utils/allowance.js +39 -0
- package/dist/cjs/utils/allowance.js.map +1 -0
- package/dist/cjs/utils/approval.js +2 -3
- package/dist/cjs/utils/approval.js.map +1 -1
- package/dist/cjs/utils/bigint.js +13 -0
- package/dist/cjs/utils/bigint.js.map +1 -0
- package/dist/cjs/utils/book-id.js +7 -7
- package/dist/cjs/utils/book-id.js.map +1 -1
- package/dist/cjs/utils/build-transaction.js +9 -9
- package/dist/cjs/utils/build-transaction.js.map +1 -1
- package/dist/cjs/utils/currency.js +87 -5
- package/dist/cjs/utils/currency.js.map +1 -1
- package/dist/cjs/utils/market.js +1 -1
- package/dist/cjs/utils/market.js.map +1 -1
- package/dist/cjs/utils/math.js +3 -1
- package/dist/cjs/utils/math.js.map +1 -1
- package/dist/cjs/utils/open.js +35 -25
- package/dist/cjs/utils/open.js.map +1 -1
- package/dist/cjs/utils/order.js +100 -0
- package/dist/cjs/utils/order.js.map +1 -0
- package/dist/cjs/utils/pool-key.js +17 -0
- package/dist/cjs/utils/pool-key.js.map +1 -0
- package/dist/cjs/utils/pool.js +88 -0
- package/dist/cjs/utils/pool.js.map +1 -0
- package/dist/cjs/utils/prices.js +40 -5
- package/dist/cjs/utils/prices.js.map +1 -1
- package/dist/cjs/utils/tick.js +12 -1
- package/dist/cjs/utils/tick.js.map +1 -1
- package/dist/cjs/utils/unit-size.js +48 -0
- package/dist/cjs/utils/unit-size.js.map +1 -0
- package/dist/cjs/utils.js +16 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/cjs/view.js +229 -40
- package/dist/cjs/view.js.map +1 -1
- package/dist/esm/abis/core/book-manager-abi.js +109 -0
- package/dist/esm/abis/core/book-manager-abi.js.map +1 -0
- package/dist/esm/abis/core/book-viewer-abi.js +137 -5
- package/dist/esm/abis/core/book-viewer-abi.js.map +1 -1
- package/dist/esm/abis/core/controller-abi.js +29 -24
- package/dist/esm/abis/core/controller-abi.js.map +1 -1
- package/dist/esm/abis/rebalancer/minter-abi.js +259 -0
- package/dist/esm/abis/rebalancer/minter-abi.js.map +1 -0
- package/dist/esm/abis/rebalancer/mock-swap-abi.js +92 -0
- package/dist/esm/abis/rebalancer/mock-swap-abi.js.map +1 -0
- package/dist/esm/abis/rebalancer/operator-abi.js +367 -0
- package/dist/esm/abis/rebalancer/operator-abi.js.map +1 -0
- package/dist/esm/abis/rebalancer/rebalancer-abi.js +1232 -0
- package/dist/esm/abis/rebalancer/rebalancer-abi.js.map +1 -0
- package/dist/esm/abis/rebalancer/strategy-abi.js +630 -0
- package/dist/esm/abis/rebalancer/strategy-abi.js.map +1 -0
- package/dist/esm/apis/chart-logs.js +159 -0
- package/dist/esm/apis/chart-logs.js.map +1 -0
- package/dist/esm/apis/market.js +41 -22
- package/dist/esm/apis/market.js.map +1 -1
- package/dist/esm/apis/odos.js +94 -0
- package/dist/esm/apis/odos.js.map +1 -0
- package/dist/esm/apis/open-order.js +61 -28
- package/dist/esm/apis/open-order.js.map +1 -1
- package/dist/esm/apis/pool.js +57 -0
- package/dist/esm/apis/pool.js.map +1 -0
- package/dist/esm/apis/strategy.js +19 -0
- package/dist/esm/apis/strategy.js.map +1 -0
- package/dist/esm/approval.js +122 -45
- package/dist/esm/approval.js.map +1 -1
- package/dist/esm/call.js +789 -265
- package/dist/esm/call.js.map +1 -1
- package/dist/esm/constants/addresses.js +42 -2
- package/dist/esm/constants/addresses.js.map +1 -1
- package/dist/esm/constants/chain.js +21 -2
- package/dist/esm/constants/chain.js.map +1 -1
- package/dist/esm/constants/currency.js +29 -2
- package/dist/esm/constants/currency.js.map +1 -1
- package/dist/esm/constants/fee.js +15 -2
- package/dist/esm/constants/fee.js.map +1 -1
- package/dist/esm/constants/permit.js +10 -0
- package/dist/esm/constants/permit.js.map +1 -0
- package/dist/esm/constants/price.js +1 -0
- package/dist/esm/constants/price.js.map +1 -1
- package/dist/esm/constants/subgraph.js +34 -0
- package/dist/esm/constants/subgraph.js.map +1 -0
- package/dist/esm/constants/test-chain.js +24 -0
- package/dist/esm/constants/test-chain.js.map +1 -0
- package/dist/esm/constants/tick.js +3 -0
- package/dist/esm/constants/tick.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/model/book.js +62 -35
- package/dist/esm/model/book.js.map +1 -1
- package/dist/esm/model/chart-log.js +2 -0
- package/dist/esm/model/chart-log.js.map +1 -0
- package/dist/esm/model/market.js +63 -28
- package/dist/esm/model/market.js.map +1 -1
- package/dist/esm/model/pool.js +133 -0
- package/dist/esm/model/pool.js.map +1 -0
- package/dist/esm/model/strategy.js +2 -0
- package/dist/esm/model/strategy.js.map +1 -0
- package/dist/esm/signature.js +42 -41
- package/dist/esm/signature.js.map +1 -1
- package/dist/esm/type.js +15 -0
- package/dist/esm/type.js.map +1 -1
- package/dist/esm/utils/allowance.js +35 -0
- package/dist/esm/utils/allowance.js.map +1 -0
- package/dist/esm/utils/approval.js +2 -3
- package/dist/esm/utils/approval.js.map +1 -1
- package/dist/esm/utils/bigint.js +7 -0
- package/dist/esm/utils/bigint.js.map +1 -0
- package/dist/esm/utils/book-id.js +7 -7
- package/dist/esm/utils/book-id.js.map +1 -1
- package/dist/esm/utils/build-transaction.js +9 -9
- package/dist/esm/utils/build-transaction.js.map +1 -1
- package/dist/esm/utils/currency.js +85 -4
- package/dist/esm/utils/currency.js.map +1 -1
- package/dist/esm/utils/market.js +1 -1
- package/dist/esm/utils/market.js.map +1 -1
- package/dist/esm/utils/math.js +1 -0
- package/dist/esm/utils/math.js.map +1 -1
- package/dist/esm/utils/open.js +33 -23
- package/dist/esm/utils/open.js.map +1 -1
- package/dist/esm/utils/order.js +96 -0
- package/dist/esm/utils/order.js.map +1 -0
- package/dist/esm/utils/pool-key.js +12 -0
- package/dist/esm/utils/pool-key.js.map +1 -0
- package/dist/esm/utils/pool.js +84 -0
- package/dist/esm/utils/pool.js.map +1 -0
- package/dist/esm/utils/prices.js +39 -5
- package/dist/esm/utils/prices.js.map +1 -1
- package/dist/esm/utils/tick.js +11 -1
- package/dist/esm/utils/tick.js.map +1 -1
- package/dist/esm/utils/unit-size.js +44 -0
- package/dist/esm/utils/unit-size.js.map +1 -0
- package/dist/esm/utils.js +4 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/esm/view.js +367 -79
- package/dist/esm/view.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/abis/core/book-manager-abi.d.ts +82 -0
- package/dist/types/abis/core/book-manager-abi.d.ts.map +1 -0
- package/dist/types/abis/core/book-viewer-abi.d.ts +107 -5
- package/dist/types/abis/core/book-viewer-abi.d.ts.map +1 -1
- package/dist/types/abis/core/controller-abi.d.ts +23 -19
- package/dist/types/abis/core/controller-abi.d.ts.map +1 -1
- package/dist/types/abis/rebalancer/minter-abi.d.ts +198 -0
- package/dist/types/abis/rebalancer/minter-abi.d.ts.map +1 -0
- package/dist/types/abis/rebalancer/mock-swap-abi.d.ts +70 -0
- package/dist/types/abis/rebalancer/mock-swap-abi.d.ts.map +1 -0
- package/dist/types/abis/rebalancer/operator-abi.d.ts +283 -0
- package/dist/types/abis/rebalancer/operator-abi.d.ts.map +1 -0
- package/dist/types/abis/rebalancer/rebalancer-abi.d.ts +952 -0
- package/dist/types/abis/rebalancer/rebalancer-abi.d.ts.map +1 -0
- package/dist/types/abis/rebalancer/strategy-abi.d.ts +487 -0
- package/dist/types/abis/rebalancer/strategy-abi.d.ts.map +1 -0
- package/dist/types/apis/chart-logs.d.ts +5 -0
- package/dist/types/apis/chart-logs.d.ts.map +1 -0
- package/dist/types/apis/market.d.ts +2 -1
- package/dist/types/apis/market.d.ts.map +1 -1
- package/dist/types/apis/odos.d.ts +28 -0
- package/dist/types/apis/odos.d.ts.map +1 -0
- package/dist/types/apis/open-order.d.ts +4 -2
- package/dist/types/apis/open-order.d.ts.map +1 -1
- package/dist/types/apis/pool.d.ts +5 -0
- package/dist/types/apis/pool.d.ts.map +1 -0
- package/dist/types/apis/strategy.d.ts +5 -0
- package/dist/types/apis/strategy.d.ts.map +1 -0
- package/dist/types/approval.d.ts +47 -15
- package/dist/types/approval.d.ts.map +1 -1
- package/dist/types/call.d.ts +250 -122
- package/dist/types/call.d.ts.map +1 -1
- package/dist/types/constants/addresses.d.ts +4 -0
- package/dist/types/constants/addresses.d.ts.map +1 -1
- package/dist/types/constants/chain.d.ts +6 -2
- package/dist/types/constants/chain.d.ts.map +1 -1
- package/dist/types/constants/currency.d.ts.map +1 -1
- package/dist/types/constants/fee.d.ts +7 -2
- package/dist/types/constants/fee.d.ts.map +1 -1
- package/dist/types/constants/permit.d.ts +10 -0
- package/dist/types/constants/permit.d.ts.map +1 -0
- package/dist/types/constants/price.d.ts +1 -0
- package/dist/types/constants/price.d.ts.map +1 -1
- package/dist/types/constants/subgraph.d.ts +5 -0
- package/dist/types/constants/subgraph.d.ts.map +1 -0
- package/dist/types/constants/test-chain.d.ts +3 -0
- package/dist/types/constants/test-chain.d.ts.map +1 -0
- package/dist/types/constants/tick.d.ts +3 -0
- package/dist/types/constants/tick.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/model/book.d.ts +25 -33
- package/dist/types/model/book.d.ts.map +1 -1
- package/dist/types/model/chart-log.d.ts +9 -0
- package/dist/types/model/chart-log.d.ts.map +1 -0
- package/dist/types/model/currency.d.ts +7 -0
- package/dist/types/model/currency.d.ts.map +1 -1
- package/dist/types/model/depth.d.ts +4 -3
- package/dist/types/model/depth.d.ts.map +1 -1
- package/dist/types/model/market.d.ts +24 -13
- package/dist/types/model/market.d.ts.map +1 -1
- package/dist/types/model/open-order.d.ts +11 -6
- package/dist/types/model/open-order.d.ts.map +1 -1
- package/dist/types/model/pool.d.ts +38 -0
- package/dist/types/model/pool.d.ts.map +1 -0
- package/dist/types/model/strategy.d.ts +6 -0
- package/dist/types/model/strategy.d.ts.map +1 -0
- package/dist/types/signature.d.ts +19 -25
- package/dist/types/signature.d.ts.map +1 -1
- package/dist/types/type.d.ts +63 -5
- package/dist/types/type.d.ts.map +1 -1
- package/dist/types/utils/allowance.d.ts +3 -0
- package/dist/types/utils/allowance.d.ts.map +1 -0
- package/dist/types/utils/approval.d.ts +2 -1
- package/dist/types/utils/approval.d.ts.map +1 -1
- package/dist/types/utils/bigint.d.ts +4 -0
- package/dist/types/utils/bigint.d.ts.map +1 -0
- package/dist/types/utils/book-id.d.ts +2 -1
- package/dist/types/utils/book-id.d.ts.map +1 -1
- package/dist/types/utils/build-transaction.d.ts +3 -3
- package/dist/types/utils/build-transaction.d.ts.map +1 -1
- package/dist/types/utils/currency.d.ts +5 -1
- package/dist/types/utils/currency.d.ts.map +1 -1
- package/dist/types/utils/math.d.ts +1 -0
- package/dist/types/utils/math.d.ts.map +1 -1
- package/dist/types/utils/open.d.ts +2 -1
- package/dist/types/utils/open.d.ts.map +1 -1
- package/dist/types/utils/order.d.ts +9 -0
- package/dist/types/utils/order.d.ts.map +1 -0
- package/dist/types/utils/pool-key.d.ts +3 -0
- package/dist/types/utils/pool-key.d.ts.map +1 -0
- package/dist/types/utils/pool.d.ts +11 -0
- package/dist/types/utils/pool.d.ts.map +1 -0
- package/dist/types/utils/prices.d.ts +13 -2
- package/dist/types/utils/prices.d.ts.map +1 -1
- package/dist/types/utils/tick.d.ts +1 -0
- package/dist/types/utils/tick.d.ts.map +1 -1
- package/dist/types/utils/unit-size.d.ts +5 -0
- package/dist/types/utils/unit-size.d.ts.map +1 -0
- package/dist/types/utils.d.ts +4 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/view.d.ts +283 -46
- package/dist/types/view.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/abis/core/params-abi.js +0 -62
- package/dist/cjs/abis/core/params-abi.js.map +0 -1
- package/dist/cjs/apis/subgraph.js +0 -26
- package/dist/cjs/apis/subgraph.js.map +0 -1
- package/dist/cjs/constants/client.js +0 -14
- package/dist/cjs/constants/client.js.map +0 -1
- package/dist/cjs/constants/subgraph-url.js +0 -8
- package/dist/cjs/constants/subgraph-url.js.map +0 -1
- package/dist/cjs/utils/decorator.js +0 -13
- package/dist/cjs/utils/decorator.js.map +0 -1
- package/dist/cjs/utils/unit.js +0 -34
- package/dist/cjs/utils/unit.js.map +0 -1
- package/dist/esm/abis/core/params-abi.js +0 -59
- package/dist/esm/abis/core/params-abi.js.map +0 -1
- package/dist/esm/apis/subgraph.js +0 -22
- package/dist/esm/apis/subgraph.js.map +0 -1
- package/dist/esm/constants/client.js +0 -10
- package/dist/esm/constants/client.js.map +0 -1
- package/dist/esm/constants/subgraph-url.js +0 -5
- package/dist/esm/constants/subgraph-url.js.map +0 -1
- package/dist/esm/utils/decorator.js +0 -9
- package/dist/esm/utils/decorator.js.map +0 -1
- package/dist/esm/utils/unit.js +0 -30
- package/dist/esm/utils/unit.js.map +0 -1
- package/dist/types/abis/core/params-abi.d.ts +0 -21
- package/dist/types/abis/core/params-abi.d.ts.map +0 -1
- package/dist/types/apis/subgraph.d.ts +0 -3
- package/dist/types/apis/subgraph.d.ts.map +0 -1
- package/dist/types/constants/client.d.ts +0 -5
- package/dist/types/constants/client.d.ts.map +0 -1
- package/dist/types/constants/subgraph-url.d.ts +0 -5
- package/dist/types/constants/subgraph-url.d.ts.map +0 -1
- package/dist/types/utils/decorator.d.ts +0 -6
- package/dist/types/utils/decorator.d.ts.map +0 -1
- package/dist/types/utils/unit.d.ts +0 -4
- package/dist/types/utils/unit.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rebalancer-abi.d.ts","sourceRoot":"","sources":["../../../../src/abis/rebalancer/rebalancer-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8sCjB,CAAA"}
|
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
export declare const STRATEGY_ABI: readonly [{
|
|
2
|
+
readonly inputs: readonly [{
|
|
3
|
+
readonly internalType: "contract IOracle";
|
|
4
|
+
readonly name: "referenceOracle_";
|
|
5
|
+
readonly type: "address";
|
|
6
|
+
}, {
|
|
7
|
+
readonly internalType: "contract IPoolStorage";
|
|
8
|
+
readonly name: "poolStorage_";
|
|
9
|
+
readonly type: "address";
|
|
10
|
+
}, {
|
|
11
|
+
readonly internalType: "contract IBookManager";
|
|
12
|
+
readonly name: "bookManager_";
|
|
13
|
+
readonly type: "address";
|
|
14
|
+
}, {
|
|
15
|
+
readonly internalType: "address";
|
|
16
|
+
readonly name: "initialOwner";
|
|
17
|
+
readonly type: "address";
|
|
18
|
+
}];
|
|
19
|
+
readonly stateMutability: "nonpayable";
|
|
20
|
+
readonly type: "constructor";
|
|
21
|
+
}, {
|
|
22
|
+
readonly inputs: readonly [];
|
|
23
|
+
readonly name: "ExceedsThreshold";
|
|
24
|
+
readonly type: "error";
|
|
25
|
+
}, {
|
|
26
|
+
readonly inputs: readonly [];
|
|
27
|
+
readonly name: "InvalidConfig";
|
|
28
|
+
readonly type: "error";
|
|
29
|
+
}, {
|
|
30
|
+
readonly inputs: readonly [];
|
|
31
|
+
readonly name: "InvalidPrice";
|
|
32
|
+
readonly type: "error";
|
|
33
|
+
}, {
|
|
34
|
+
readonly inputs: readonly [];
|
|
35
|
+
readonly name: "InvalidTick";
|
|
36
|
+
readonly type: "error";
|
|
37
|
+
}, {
|
|
38
|
+
readonly inputs: readonly [];
|
|
39
|
+
readonly name: "NotOperator";
|
|
40
|
+
readonly type: "error";
|
|
41
|
+
}, {
|
|
42
|
+
readonly inputs: readonly [{
|
|
43
|
+
readonly internalType: "address";
|
|
44
|
+
readonly name: "owner";
|
|
45
|
+
readonly type: "address";
|
|
46
|
+
}];
|
|
47
|
+
readonly name: "OwnableInvalidOwner";
|
|
48
|
+
readonly type: "error";
|
|
49
|
+
}, {
|
|
50
|
+
readonly inputs: readonly [{
|
|
51
|
+
readonly internalType: "address";
|
|
52
|
+
readonly name: "account";
|
|
53
|
+
readonly type: "address";
|
|
54
|
+
}];
|
|
55
|
+
readonly name: "OwnableUnauthorizedAccount";
|
|
56
|
+
readonly type: "error";
|
|
57
|
+
}, {
|
|
58
|
+
readonly inputs: readonly [{
|
|
59
|
+
readonly internalType: "uint8";
|
|
60
|
+
readonly name: "bits";
|
|
61
|
+
readonly type: "uint8";
|
|
62
|
+
}, {
|
|
63
|
+
readonly internalType: "uint256";
|
|
64
|
+
readonly name: "value";
|
|
65
|
+
readonly type: "uint256";
|
|
66
|
+
}];
|
|
67
|
+
readonly name: "SafeCastOverflowedUintDowncast";
|
|
68
|
+
readonly type: "error";
|
|
69
|
+
}, {
|
|
70
|
+
readonly anonymous: false;
|
|
71
|
+
readonly inputs: readonly [{
|
|
72
|
+
readonly indexed: true;
|
|
73
|
+
readonly internalType: "address";
|
|
74
|
+
readonly name: "previousOwner";
|
|
75
|
+
readonly type: "address";
|
|
76
|
+
}, {
|
|
77
|
+
readonly indexed: true;
|
|
78
|
+
readonly internalType: "address";
|
|
79
|
+
readonly name: "newOwner";
|
|
80
|
+
readonly type: "address";
|
|
81
|
+
}];
|
|
82
|
+
readonly name: "OwnershipTransferStarted";
|
|
83
|
+
readonly type: "event";
|
|
84
|
+
}, {
|
|
85
|
+
readonly anonymous: false;
|
|
86
|
+
readonly inputs: readonly [{
|
|
87
|
+
readonly indexed: true;
|
|
88
|
+
readonly internalType: "address";
|
|
89
|
+
readonly name: "previousOwner";
|
|
90
|
+
readonly type: "address";
|
|
91
|
+
}, {
|
|
92
|
+
readonly indexed: true;
|
|
93
|
+
readonly internalType: "address";
|
|
94
|
+
readonly name: "newOwner";
|
|
95
|
+
readonly type: "address";
|
|
96
|
+
}];
|
|
97
|
+
readonly name: "OwnershipTransferred";
|
|
98
|
+
readonly type: "event";
|
|
99
|
+
}, {
|
|
100
|
+
readonly anonymous: false;
|
|
101
|
+
readonly inputs: readonly [{
|
|
102
|
+
readonly indexed: true;
|
|
103
|
+
readonly internalType: "address";
|
|
104
|
+
readonly name: "operator";
|
|
105
|
+
readonly type: "address";
|
|
106
|
+
}, {
|
|
107
|
+
readonly indexed: false;
|
|
108
|
+
readonly internalType: "bool";
|
|
109
|
+
readonly name: "status";
|
|
110
|
+
readonly type: "bool";
|
|
111
|
+
}];
|
|
112
|
+
readonly name: "SetOperator";
|
|
113
|
+
readonly type: "event";
|
|
114
|
+
}, {
|
|
115
|
+
readonly anonymous: false;
|
|
116
|
+
readonly inputs: readonly [{
|
|
117
|
+
readonly indexed: true;
|
|
118
|
+
readonly internalType: "bytes32";
|
|
119
|
+
readonly name: "key";
|
|
120
|
+
readonly type: "bytes32";
|
|
121
|
+
}, {
|
|
122
|
+
readonly components: readonly [{
|
|
123
|
+
readonly internalType: "uint24";
|
|
124
|
+
readonly name: "referenceThreshold";
|
|
125
|
+
readonly type: "uint24";
|
|
126
|
+
}, {
|
|
127
|
+
readonly internalType: "uint24";
|
|
128
|
+
readonly name: "rateA";
|
|
129
|
+
readonly type: "uint24";
|
|
130
|
+
}, {
|
|
131
|
+
readonly internalType: "uint24";
|
|
132
|
+
readonly name: "rateB";
|
|
133
|
+
readonly type: "uint24";
|
|
134
|
+
}, {
|
|
135
|
+
readonly internalType: "uint24";
|
|
136
|
+
readonly name: "minRateA";
|
|
137
|
+
readonly type: "uint24";
|
|
138
|
+
}, {
|
|
139
|
+
readonly internalType: "uint24";
|
|
140
|
+
readonly name: "minRateB";
|
|
141
|
+
readonly type: "uint24";
|
|
142
|
+
}, {
|
|
143
|
+
readonly internalType: "uint24";
|
|
144
|
+
readonly name: "priceThresholdA";
|
|
145
|
+
readonly type: "uint24";
|
|
146
|
+
}, {
|
|
147
|
+
readonly internalType: "uint24";
|
|
148
|
+
readonly name: "priceThresholdB";
|
|
149
|
+
readonly type: "uint24";
|
|
150
|
+
}];
|
|
151
|
+
readonly indexed: false;
|
|
152
|
+
readonly internalType: "struct ISimpleOracleStrategy.Config";
|
|
153
|
+
readonly name: "config";
|
|
154
|
+
readonly type: "tuple";
|
|
155
|
+
}];
|
|
156
|
+
readonly name: "UpdateConfig";
|
|
157
|
+
readonly type: "event";
|
|
158
|
+
}, {
|
|
159
|
+
readonly anonymous: false;
|
|
160
|
+
readonly inputs: readonly [{
|
|
161
|
+
readonly indexed: true;
|
|
162
|
+
readonly internalType: "bytes32";
|
|
163
|
+
readonly name: "key";
|
|
164
|
+
readonly type: "bytes32";
|
|
165
|
+
}, {
|
|
166
|
+
readonly indexed: false;
|
|
167
|
+
readonly internalType: "uint256";
|
|
168
|
+
readonly name: "oraclePrice";
|
|
169
|
+
readonly type: "uint256";
|
|
170
|
+
}, {
|
|
171
|
+
readonly indexed: false;
|
|
172
|
+
readonly internalType: "Tick";
|
|
173
|
+
readonly name: "tickA";
|
|
174
|
+
readonly type: "int24";
|
|
175
|
+
}, {
|
|
176
|
+
readonly indexed: false;
|
|
177
|
+
readonly internalType: "Tick";
|
|
178
|
+
readonly name: "tickB";
|
|
179
|
+
readonly type: "int24";
|
|
180
|
+
}];
|
|
181
|
+
readonly name: "UpdatePrice";
|
|
182
|
+
readonly type: "event";
|
|
183
|
+
}, {
|
|
184
|
+
readonly inputs: readonly [];
|
|
185
|
+
readonly name: "RATE_PRECISION";
|
|
186
|
+
readonly outputs: readonly [{
|
|
187
|
+
readonly internalType: "uint256";
|
|
188
|
+
readonly name: "";
|
|
189
|
+
readonly type: "uint256";
|
|
190
|
+
}];
|
|
191
|
+
readonly stateMutability: "view";
|
|
192
|
+
readonly type: "function";
|
|
193
|
+
}, {
|
|
194
|
+
readonly inputs: readonly [];
|
|
195
|
+
readonly name: "acceptOwnership";
|
|
196
|
+
readonly outputs: readonly [];
|
|
197
|
+
readonly stateMutability: "nonpayable";
|
|
198
|
+
readonly type: "function";
|
|
199
|
+
}, {
|
|
200
|
+
readonly inputs: readonly [];
|
|
201
|
+
readonly name: "bookManager";
|
|
202
|
+
readonly outputs: readonly [{
|
|
203
|
+
readonly internalType: "contract IBookManager";
|
|
204
|
+
readonly name: "";
|
|
205
|
+
readonly type: "address";
|
|
206
|
+
}];
|
|
207
|
+
readonly stateMutability: "view";
|
|
208
|
+
readonly type: "function";
|
|
209
|
+
}, {
|
|
210
|
+
readonly inputs: readonly [{
|
|
211
|
+
readonly internalType: "bytes32";
|
|
212
|
+
readonly name: "key";
|
|
213
|
+
readonly type: "bytes32";
|
|
214
|
+
}, {
|
|
215
|
+
readonly internalType: "uint256";
|
|
216
|
+
readonly name: "amountA";
|
|
217
|
+
readonly type: "uint256";
|
|
218
|
+
}, {
|
|
219
|
+
readonly internalType: "uint256";
|
|
220
|
+
readonly name: "amountB";
|
|
221
|
+
readonly type: "uint256";
|
|
222
|
+
}];
|
|
223
|
+
readonly name: "computeOrders";
|
|
224
|
+
readonly outputs: readonly [{
|
|
225
|
+
readonly components: readonly [{
|
|
226
|
+
readonly internalType: "Tick";
|
|
227
|
+
readonly name: "tick";
|
|
228
|
+
readonly type: "int24";
|
|
229
|
+
}, {
|
|
230
|
+
readonly internalType: "uint64";
|
|
231
|
+
readonly name: "rawAmount";
|
|
232
|
+
readonly type: "uint64";
|
|
233
|
+
}];
|
|
234
|
+
readonly internalType: "struct IStrategy.Order[]";
|
|
235
|
+
readonly name: "ordersA";
|
|
236
|
+
readonly type: "tuple[]";
|
|
237
|
+
}, {
|
|
238
|
+
readonly components: readonly [{
|
|
239
|
+
readonly internalType: "Tick";
|
|
240
|
+
readonly name: "tick";
|
|
241
|
+
readonly type: "int24";
|
|
242
|
+
}, {
|
|
243
|
+
readonly internalType: "uint64";
|
|
244
|
+
readonly name: "rawAmount";
|
|
245
|
+
readonly type: "uint64";
|
|
246
|
+
}];
|
|
247
|
+
readonly internalType: "struct IStrategy.Order[]";
|
|
248
|
+
readonly name: "ordersB";
|
|
249
|
+
readonly type: "tuple[]";
|
|
250
|
+
}];
|
|
251
|
+
readonly stateMutability: "view";
|
|
252
|
+
readonly type: "function";
|
|
253
|
+
}, {
|
|
254
|
+
readonly inputs: readonly [{
|
|
255
|
+
readonly internalType: "bytes32";
|
|
256
|
+
readonly name: "key";
|
|
257
|
+
readonly type: "bytes32";
|
|
258
|
+
}];
|
|
259
|
+
readonly name: "getConfig";
|
|
260
|
+
readonly outputs: readonly [{
|
|
261
|
+
readonly components: readonly [{
|
|
262
|
+
readonly internalType: "uint24";
|
|
263
|
+
readonly name: "referenceThreshold";
|
|
264
|
+
readonly type: "uint24";
|
|
265
|
+
}, {
|
|
266
|
+
readonly internalType: "uint24";
|
|
267
|
+
readonly name: "rateA";
|
|
268
|
+
readonly type: "uint24";
|
|
269
|
+
}, {
|
|
270
|
+
readonly internalType: "uint24";
|
|
271
|
+
readonly name: "rateB";
|
|
272
|
+
readonly type: "uint24";
|
|
273
|
+
}, {
|
|
274
|
+
readonly internalType: "uint24";
|
|
275
|
+
readonly name: "minRateA";
|
|
276
|
+
readonly type: "uint24";
|
|
277
|
+
}, {
|
|
278
|
+
readonly internalType: "uint24";
|
|
279
|
+
readonly name: "minRateB";
|
|
280
|
+
readonly type: "uint24";
|
|
281
|
+
}, {
|
|
282
|
+
readonly internalType: "uint24";
|
|
283
|
+
readonly name: "priceThresholdA";
|
|
284
|
+
readonly type: "uint24";
|
|
285
|
+
}, {
|
|
286
|
+
readonly internalType: "uint24";
|
|
287
|
+
readonly name: "priceThresholdB";
|
|
288
|
+
readonly type: "uint24";
|
|
289
|
+
}];
|
|
290
|
+
readonly internalType: "struct ISimpleOracleStrategy.Config";
|
|
291
|
+
readonly name: "";
|
|
292
|
+
readonly type: "tuple";
|
|
293
|
+
}];
|
|
294
|
+
readonly stateMutability: "view";
|
|
295
|
+
readonly type: "function";
|
|
296
|
+
}, {
|
|
297
|
+
readonly inputs: readonly [{
|
|
298
|
+
readonly internalType: "bytes32";
|
|
299
|
+
readonly name: "key";
|
|
300
|
+
readonly type: "bytes32";
|
|
301
|
+
}];
|
|
302
|
+
readonly name: "getPrice";
|
|
303
|
+
readonly outputs: readonly [{
|
|
304
|
+
readonly components: readonly [{
|
|
305
|
+
readonly internalType: "uint208";
|
|
306
|
+
readonly name: "oraclePrice";
|
|
307
|
+
readonly type: "uint208";
|
|
308
|
+
}, {
|
|
309
|
+
readonly internalType: "Tick";
|
|
310
|
+
readonly name: "tickA";
|
|
311
|
+
readonly type: "int24";
|
|
312
|
+
}, {
|
|
313
|
+
readonly internalType: "Tick";
|
|
314
|
+
readonly name: "tickB";
|
|
315
|
+
readonly type: "int24";
|
|
316
|
+
}];
|
|
317
|
+
readonly internalType: "struct ISimpleOracleStrategy.Price";
|
|
318
|
+
readonly name: "";
|
|
319
|
+
readonly type: "tuple";
|
|
320
|
+
}];
|
|
321
|
+
readonly stateMutability: "view";
|
|
322
|
+
readonly type: "function";
|
|
323
|
+
}, {
|
|
324
|
+
readonly inputs: readonly [{
|
|
325
|
+
readonly internalType: "address";
|
|
326
|
+
readonly name: "";
|
|
327
|
+
readonly type: "address";
|
|
328
|
+
}];
|
|
329
|
+
readonly name: "isOperator";
|
|
330
|
+
readonly outputs: readonly [{
|
|
331
|
+
readonly internalType: "bool";
|
|
332
|
+
readonly name: "";
|
|
333
|
+
readonly type: "bool";
|
|
334
|
+
}];
|
|
335
|
+
readonly stateMutability: "view";
|
|
336
|
+
readonly type: "function";
|
|
337
|
+
}, {
|
|
338
|
+
readonly inputs: readonly [{
|
|
339
|
+
readonly internalType: "bytes32";
|
|
340
|
+
readonly name: "key";
|
|
341
|
+
readonly type: "bytes32";
|
|
342
|
+
}];
|
|
343
|
+
readonly name: "isOraclePriceValid";
|
|
344
|
+
readonly outputs: readonly [{
|
|
345
|
+
readonly internalType: "bool";
|
|
346
|
+
readonly name: "";
|
|
347
|
+
readonly type: "bool";
|
|
348
|
+
}];
|
|
349
|
+
readonly stateMutability: "view";
|
|
350
|
+
readonly type: "function";
|
|
351
|
+
}, {
|
|
352
|
+
readonly inputs: readonly [];
|
|
353
|
+
readonly name: "owner";
|
|
354
|
+
readonly outputs: readonly [{
|
|
355
|
+
readonly internalType: "address";
|
|
356
|
+
readonly name: "";
|
|
357
|
+
readonly type: "address";
|
|
358
|
+
}];
|
|
359
|
+
readonly stateMutability: "view";
|
|
360
|
+
readonly type: "function";
|
|
361
|
+
}, {
|
|
362
|
+
readonly inputs: readonly [];
|
|
363
|
+
readonly name: "pendingOwner";
|
|
364
|
+
readonly outputs: readonly [{
|
|
365
|
+
readonly internalType: "address";
|
|
366
|
+
readonly name: "";
|
|
367
|
+
readonly type: "address";
|
|
368
|
+
}];
|
|
369
|
+
readonly stateMutability: "view";
|
|
370
|
+
readonly type: "function";
|
|
371
|
+
}, {
|
|
372
|
+
readonly inputs: readonly [];
|
|
373
|
+
readonly name: "poolStorage";
|
|
374
|
+
readonly outputs: readonly [{
|
|
375
|
+
readonly internalType: "contract IPoolStorage";
|
|
376
|
+
readonly name: "";
|
|
377
|
+
readonly type: "address";
|
|
378
|
+
}];
|
|
379
|
+
readonly stateMutability: "view";
|
|
380
|
+
readonly type: "function";
|
|
381
|
+
}, {
|
|
382
|
+
readonly inputs: readonly [];
|
|
383
|
+
readonly name: "referenceOracle";
|
|
384
|
+
readonly outputs: readonly [{
|
|
385
|
+
readonly internalType: "contract IOracle";
|
|
386
|
+
readonly name: "";
|
|
387
|
+
readonly type: "address";
|
|
388
|
+
}];
|
|
389
|
+
readonly stateMutability: "view";
|
|
390
|
+
readonly type: "function";
|
|
391
|
+
}, {
|
|
392
|
+
readonly inputs: readonly [];
|
|
393
|
+
readonly name: "renounceOwnership";
|
|
394
|
+
readonly outputs: readonly [];
|
|
395
|
+
readonly stateMutability: "nonpayable";
|
|
396
|
+
readonly type: "function";
|
|
397
|
+
}, {
|
|
398
|
+
readonly inputs: readonly [{
|
|
399
|
+
readonly internalType: "bytes32";
|
|
400
|
+
readonly name: "key";
|
|
401
|
+
readonly type: "bytes32";
|
|
402
|
+
}, {
|
|
403
|
+
readonly components: readonly [{
|
|
404
|
+
readonly internalType: "uint24";
|
|
405
|
+
readonly name: "referenceThreshold";
|
|
406
|
+
readonly type: "uint24";
|
|
407
|
+
}, {
|
|
408
|
+
readonly internalType: "uint24";
|
|
409
|
+
readonly name: "rateA";
|
|
410
|
+
readonly type: "uint24";
|
|
411
|
+
}, {
|
|
412
|
+
readonly internalType: "uint24";
|
|
413
|
+
readonly name: "rateB";
|
|
414
|
+
readonly type: "uint24";
|
|
415
|
+
}, {
|
|
416
|
+
readonly internalType: "uint24";
|
|
417
|
+
readonly name: "minRateA";
|
|
418
|
+
readonly type: "uint24";
|
|
419
|
+
}, {
|
|
420
|
+
readonly internalType: "uint24";
|
|
421
|
+
readonly name: "minRateB";
|
|
422
|
+
readonly type: "uint24";
|
|
423
|
+
}, {
|
|
424
|
+
readonly internalType: "uint24";
|
|
425
|
+
readonly name: "priceThresholdA";
|
|
426
|
+
readonly type: "uint24";
|
|
427
|
+
}, {
|
|
428
|
+
readonly internalType: "uint24";
|
|
429
|
+
readonly name: "priceThresholdB";
|
|
430
|
+
readonly type: "uint24";
|
|
431
|
+
}];
|
|
432
|
+
readonly internalType: "struct ISimpleOracleStrategy.Config";
|
|
433
|
+
readonly name: "config";
|
|
434
|
+
readonly type: "tuple";
|
|
435
|
+
}];
|
|
436
|
+
readonly name: "setConfig";
|
|
437
|
+
readonly outputs: readonly [];
|
|
438
|
+
readonly stateMutability: "nonpayable";
|
|
439
|
+
readonly type: "function";
|
|
440
|
+
}, {
|
|
441
|
+
readonly inputs: readonly [{
|
|
442
|
+
readonly internalType: "address";
|
|
443
|
+
readonly name: "operator";
|
|
444
|
+
readonly type: "address";
|
|
445
|
+
}, {
|
|
446
|
+
readonly internalType: "bool";
|
|
447
|
+
readonly name: "status";
|
|
448
|
+
readonly type: "bool";
|
|
449
|
+
}];
|
|
450
|
+
readonly name: "setOperator";
|
|
451
|
+
readonly outputs: readonly [];
|
|
452
|
+
readonly stateMutability: "nonpayable";
|
|
453
|
+
readonly type: "function";
|
|
454
|
+
}, {
|
|
455
|
+
readonly inputs: readonly [{
|
|
456
|
+
readonly internalType: "address";
|
|
457
|
+
readonly name: "newOwner";
|
|
458
|
+
readonly type: "address";
|
|
459
|
+
}];
|
|
460
|
+
readonly name: "transferOwnership";
|
|
461
|
+
readonly outputs: readonly [];
|
|
462
|
+
readonly stateMutability: "nonpayable";
|
|
463
|
+
readonly type: "function";
|
|
464
|
+
}, {
|
|
465
|
+
readonly inputs: readonly [{
|
|
466
|
+
readonly internalType: "bytes32";
|
|
467
|
+
readonly name: "key";
|
|
468
|
+
readonly type: "bytes32";
|
|
469
|
+
}, {
|
|
470
|
+
readonly internalType: "uint256";
|
|
471
|
+
readonly name: "oraclePrice";
|
|
472
|
+
readonly type: "uint256";
|
|
473
|
+
}, {
|
|
474
|
+
readonly internalType: "Tick";
|
|
475
|
+
readonly name: "tickA";
|
|
476
|
+
readonly type: "int24";
|
|
477
|
+
}, {
|
|
478
|
+
readonly internalType: "Tick";
|
|
479
|
+
readonly name: "tickB";
|
|
480
|
+
readonly type: "int24";
|
|
481
|
+
}];
|
|
482
|
+
readonly name: "updatePrice";
|
|
483
|
+
readonly outputs: readonly [];
|
|
484
|
+
readonly stateMutability: "nonpayable";
|
|
485
|
+
readonly type: "function";
|
|
486
|
+
}];
|
|
487
|
+
//# sourceMappingURL=strategy-abi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strategy-abi.d.ts","sourceRoot":"","sources":["../../../../src/abis/rebalancer/strategy-abi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAonBf,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CHAIN_IDS } from '../constants/chain';
|
|
2
|
+
import { CHART_LOG_INTERVALS, ChartLog } from '../type';
|
|
3
|
+
export declare function fetchLatestChartLog(chainId: CHAIN_IDS, marketCode: string): Promise<ChartLog>;
|
|
4
|
+
export declare function fetchChartLogs(chainId: CHAIN_IDS, marketCode: string, intervalType: CHART_LOG_INTERVALS, from: number, to: number): Promise<ChartLog[]>;
|
|
5
|
+
//# sourceMappingURL=chart-logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-logs.d.ts","sourceRoot":"","sources":["../../../src/apis/chart-logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAgFvD,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,SAAS,EAClB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,QAAQ,CAAC,CAwBnB;AAiCD,wBAAsB,cAAc,CAClC,OAAO,EAAE,SAAS,EAClB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,mBAAmB,EACjC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,QAAQ,EAAE,CAAC,CAsHrB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { PublicClient } from 'viem';
|
|
1
2
|
import { CHAIN_IDS } from '../constants/chain';
|
|
2
3
|
import { Market } from '../model/market';
|
|
3
|
-
export declare function fetchMarket(chainId: CHAIN_IDS, tokenAddresses: `0x${string}`[], n?: number): Promise<Market>;
|
|
4
|
+
export declare function fetchMarket(publicClient: PublicClient, chainId: CHAIN_IDS, tokenAddresses: `0x${string}`[], useSubgraph: boolean, n?: number): Promise<Market>;
|
|
4
5
|
//# sourceMappingURL=market.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market.d.ts","sourceRoot":"","sources":["../../../src/apis/market.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"market.d.ts","sourceRoot":"","sources":["../../../src/apis/market.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AA8FxC,wBAAsB,WAAW,CAC/B,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAClB,cAAc,EAAE,KAAK,MAAM,EAAE,EAAE,EAC/B,WAAW,EAAE,OAAO,EACpB,CAAC,SAAM,GACN,OAAO,CAAC,MAAM,CAAC,CAyBjB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CHAIN_IDS } from '../constants/chain';
|
|
2
|
+
import { Currency } from '../model/currency';
|
|
3
|
+
export declare function fetchOdosApi<T>(path: string, options?: RequestInit): Promise<T>;
|
|
4
|
+
export declare function fetchQuote({ chainId, amountIn, tokenIn, tokenOut, slippageLimitPercent, userAddress, testnetPrice, }: {
|
|
5
|
+
chainId: CHAIN_IDS;
|
|
6
|
+
amountIn: bigint;
|
|
7
|
+
tokenIn: Currency;
|
|
8
|
+
tokenOut: Currency;
|
|
9
|
+
slippageLimitPercent: number;
|
|
10
|
+
userAddress: `0x${string}`;
|
|
11
|
+
testnetPrice?: number;
|
|
12
|
+
}): Promise<{
|
|
13
|
+
amountOut: bigint;
|
|
14
|
+
pathId: string;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function fetchCallData({ chainId, amountIn, tokenIn, tokenOut, slippageLimitPercent, userAddress, testnetPrice, }: {
|
|
17
|
+
chainId: CHAIN_IDS;
|
|
18
|
+
amountIn: bigint;
|
|
19
|
+
tokenIn: Currency;
|
|
20
|
+
tokenOut: Currency;
|
|
21
|
+
slippageLimitPercent: number;
|
|
22
|
+
userAddress: `0x${string}`;
|
|
23
|
+
testnetPrice?: number;
|
|
24
|
+
}): Promise<{
|
|
25
|
+
amountOut: bigint;
|
|
26
|
+
data: `0x${string}`;
|
|
27
|
+
}>;
|
|
28
|
+
//# sourceMappingURL=odos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odos.d.ts","sourceRoot":"","sources":["../../../src/apis/odos.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAkB,MAAM,oBAAoB,CAAA;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,wBAAsB,YAAY,CAAC,CAAC,EAClC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,CAAC,CAAC,CAWZ;AAED,wBAAsB,UAAU,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,YAAY,GACb,EAAE;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,QAAQ,CAAA;IACjB,QAAQ,EAAE,QAAQ,CAAA;IAClB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,WAAW,EAAE,KAAK,MAAM,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,GAAG,OAAO,CAAC;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf,CAAC,CAkDD;AAED,wBAAsB,aAAa,CAAC,EAClC,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,oBAAoB,EACpB,WAAW,EACX,YAAY,GACb,EAAE;IACD,OAAO,EAAE,SAAS,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,QAAQ,CAAA;IACjB,QAAQ,EAAE,QAAQ,CAAA;IAClB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,WAAW,EAAE,KAAK,MAAM,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,GAAG,OAAO,CAAC;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,KAAK,MAAM,EAAE,CAAA;CACpB,CAAC,CAyDD"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { PublicClient } from 'viem';
|
|
1
2
|
import { CHAIN_IDS } from '../constants/chain';
|
|
2
3
|
import type { OpenOrder } from '../model/open-order';
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function fetchOpenOrder(chainId: CHAIN_IDS, id: string): Promise<OpenOrder>;
|
|
4
|
+
export declare function fetchOpenOrdersByUserAddress(publicClient: PublicClient, chainId: CHAIN_IDS, userAddress: `0x${string}`): Promise<OpenOrder[]>;
|
|
5
|
+
export declare function fetchOpenOrder(publicClient: PublicClient, chainId: CHAIN_IDS, id: string): Promise<OpenOrder>;
|
|
6
|
+
export declare function fetchOpenOrders(publicClient: PublicClient, chainId: CHAIN_IDS, ids: string[]): Promise<OpenOrder[]>;
|
|
5
7
|
//# sourceMappingURL=open-order.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-order.d.ts","sourceRoot":"","sources":["../../../src/apis/open-order.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"open-order.d.ts","sourceRoot":"","sources":["../../../src/apis/open-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,YAAY,EAAE,MAAM,MAAM,CAAA;AAE5E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAM9C,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,qBAAqB,CAAA;AA4DlE,wBAAsB,4BAA4B,CAChD,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAClB,WAAW,EAAE,KAAK,MAAM,EAAE,GACzB,OAAO,CAAC,SAAS,EAAE,CAAC,CAoBtB;AAED,wBAAsB,cAAc,CAClC,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAClB,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,SAAS,CAAC,CAYpB;AAED,wBAAsB,eAAe,CACnC,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAClB,GAAG,EAAE,MAAM,EAAE,GACZ,OAAO,CAAC,SAAS,EAAE,CAAC,CAoBtB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PublicClient } from 'viem';
|
|
2
|
+
import { CHAIN_IDS } from '../constants/chain';
|
|
3
|
+
import { Pool } from '../model/pool';
|
|
4
|
+
export declare function fetchPool(publicClient: PublicClient, chainId: CHAIN_IDS, tokenAddresses: `0x${string}`[], salt: `0x${string}`, useSubgraph: boolean): Promise<Pool>;
|
|
5
|
+
//# sourceMappingURL=pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../../../src/apis/pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAQpC,wBAAsB,SAAS,CAC7B,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAClB,cAAc,EAAE,KAAK,MAAM,EAAE,EAAE,EAC/B,IAAI,EAAE,KAAK,MAAM,EAAE,EACnB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,IAAI,CAAC,CAgEf"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PublicClient } from 'viem';
|
|
2
|
+
import { CHAIN_IDS } from '../constants/chain';
|
|
3
|
+
import { StrategyPrice } from '../model/strategy';
|
|
4
|
+
export declare function fetchStrategyPrice(publicClient: PublicClient, chainId: CHAIN_IDS, tokenAddresses: `0x${string}`[], salt: `0x${string}`, useSubgraph: boolean): Promise<StrategyPrice>;
|
|
5
|
+
//# sourceMappingURL=strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strategy.d.ts","sourceRoot":"","sources":["../../../src/apis/strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAMjD,wBAAsB,kBAAkB,CACtC,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,SAAS,EAClB,cAAc,EAAE,KAAK,MAAM,EAAE,EAAE,EAC/B,IAAI,EAAE,KAAK,MAAM,EAAE,EACnB,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,aAAa,CAAC,CAuBxB"}
|
package/dist/types/approval.d.ts
CHANGED
|
@@ -1,35 +1,67 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WalletClient } from 'viem';
|
|
2
2
|
import { CHAIN_IDS } from './constants/chain';
|
|
3
3
|
import type { DefaultOptions } from './type';
|
|
4
4
|
/**
|
|
5
|
+
* @dev This function relates with `viem` dependency
|
|
5
6
|
* Sets approval of all open orders for the specified account on the given chain.
|
|
6
7
|
*
|
|
7
8
|
* @param {CHAIN_IDS} chainId The chain ID.
|
|
8
|
-
* @param {
|
|
9
|
+
* @param {WalletClient} walletClient The wallet client.
|
|
9
10
|
* @param {Object} [options] Optional parameters for setting approval.
|
|
10
11
|
* @param {string} options.rpcUrl The RPC URL to use for executing the transaction.
|
|
11
12
|
* @returns {Promise<`0x${string}` | undefined>} Promise resolving to the transaction hash. If the account is already approved for all, the promise resolves to `undefined`.
|
|
12
13
|
* @example
|
|
13
14
|
* import { setApprovalOfOpenOrdersForAll } from '@clober/v2-sdk'
|
|
14
|
-
* import {
|
|
15
|
+
* import { mnemonicToAccount } from 'viem/accounts'
|
|
15
16
|
*
|
|
16
|
-
* const
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* )
|
|
17
|
+
* const walletClient = createWalletClient({
|
|
18
|
+
* chain: arbitrumSepolia,
|
|
19
|
+
* account: mnemonicToAccount('legal ...'),
|
|
20
|
+
* transport: http(),
|
|
21
|
+
* })
|
|
20
22
|
*
|
|
23
|
+
* const hash = await setApprovalOfOpenOrdersForAll({
|
|
24
|
+
* chainId: 421614,
|
|
25
|
+
* walletClient
|
|
26
|
+
* })
|
|
27
|
+
*/
|
|
28
|
+
export declare const setApprovalOfOpenOrdersForAll: ({ chainId, walletClient, options, }: {
|
|
29
|
+
chainId: CHAIN_IDS;
|
|
30
|
+
walletClient: WalletClient;
|
|
31
|
+
options?: DefaultOptions;
|
|
32
|
+
}) => Promise<`0x${string}` | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* @dev This function relates with `viem` dependency
|
|
35
|
+
* Approves the specified amount of tokens for the given account on the specified chain.
|
|
36
|
+
*
|
|
37
|
+
* @param {CHAIN_IDS} chainId The chain ID.
|
|
38
|
+
* @param {WalletClient} walletClient The wallet client.
|
|
39
|
+
* @param {`0x${string}`} token The ERC20 token address.
|
|
40
|
+
* @param {string | undefined} amount The amount to approve. If not provided, the maximum amount is approved.
|
|
41
|
+
* @param options
|
|
42
|
+
* @param options.rpcUrl The RPC URL of the blockchain.
|
|
43
|
+
* @returns {Promise<`0x${string}` | undefined>} Promise resolving to the transaction hash. If the account is already approved, the promise resolves to `undefined`.
|
|
21
44
|
* @example
|
|
22
|
-
* import {
|
|
23
|
-
*
|
|
45
|
+
* import { approveERC20 } from '@clober/v2-sdk'
|
|
46
|
+
*
|
|
47
|
+
* const walletClient = createWalletClient({
|
|
48
|
+
* chain: arbitrumSepolia,
|
|
49
|
+
* account: mnemonicToAccount('legal ...'),
|
|
50
|
+
* transport: http(),
|
|
51
|
+
* })
|
|
24
52
|
*
|
|
25
|
-
* const hash = await
|
|
26
|
-
* 421614,
|
|
27
|
-
*
|
|
28
|
-
*
|
|
53
|
+
* const hash = await approveERC20({
|
|
54
|
+
* chainId: 421614,
|
|
55
|
+
* walletClient
|
|
56
|
+
* token: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
|
|
57
|
+
* amount: '1000.123', // approve 1000.123 USDC
|
|
58
|
+
* })
|
|
29
59
|
*/
|
|
30
|
-
export declare const
|
|
60
|
+
export declare const approveERC20: ({ chainId, walletClient, token, amount, options, }: {
|
|
31
61
|
chainId: CHAIN_IDS;
|
|
32
|
-
|
|
62
|
+
walletClient: WalletClient;
|
|
63
|
+
token: `0x${string}`;
|
|
64
|
+
amount?: string;
|
|
33
65
|
options?: DefaultOptions;
|
|
34
66
|
}) => Promise<`0x${string}` | undefined>;
|
|
35
67
|
//# sourceMappingURL=approval.d.ts.map
|