@nradko/metric-omm-sdk-v1 0.2.0 → 0.3.0
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 +105 -18
- package/dist/abis/DepositAllowlistExtension.d.ts +440 -0
- package/dist/abis/DepositAllowlistExtension.d.ts.map +1 -0
- package/dist/abis/DepositAllowlistExtension.js +572 -0
- package/dist/abis/DepositAllowlistExtension.js.map +1 -0
- package/dist/abis/MetricOmmPool.d.ts +136 -30
- package/dist/abis/MetricOmmPool.d.ts.map +1 -1
- package/dist/abis/MetricOmmPool.js +168 -34
- package/dist/abis/MetricOmmPool.js.map +1 -1
- package/dist/abis/MetricOmmPoolDataProvider.d.ts +4 -4
- package/dist/abis/MetricOmmPoolDataProvider.js +4 -4
- package/dist/abis/MetricOmmPoolDataProvider.js.map +1 -1
- package/dist/abis/MetricOmmPoolFactory.d.ts +76 -18
- package/dist/abis/MetricOmmPoolFactory.d.ts.map +1 -1
- package/dist/abis/MetricOmmPoolFactory.js +93 -19
- package/dist/abis/MetricOmmPoolFactory.js.map +1 -1
- package/dist/abis/MetricOmmPoolLiquidityAdder.d.ts +68 -8
- package/dist/abis/MetricOmmPoolLiquidityAdder.d.ts.map +1 -1
- package/dist/abis/MetricOmmPoolLiquidityAdder.js +85 -9
- package/dist/abis/MetricOmmPoolLiquidityAdder.js.map +1 -1
- package/dist/abis/MetricOmmPoolSwapper.d.ts +8 -8
- package/dist/abis/MetricOmmPoolSwapper.js +8 -8
- package/dist/abis/MetricOmmPoolSwapper.js.map +1 -1
- package/dist/abis/OracleValueStopLossExtension.d.ts +936 -0
- package/dist/abis/OracleValueStopLossExtension.d.ts.map +1 -0
- package/dist/abis/OracleValueStopLossExtension.js +1214 -0
- package/dist/abis/OracleValueStopLossExtension.js.map +1 -0
- package/dist/abis/PriceProvider.d.ts +1 -113
- package/dist/abis/PriceProvider.d.ts.map +1 -1
- package/dist/abis/PriceProvider.js +1 -146
- package/dist/abis/PriceProvider.js.map +1 -1
- package/dist/abis/PriceVelocityGuardExtension.d.ts +454 -0
- package/dist/abis/PriceVelocityGuardExtension.d.ts.map +1 -0
- package/dist/abis/PriceVelocityGuardExtension.js +590 -0
- package/dist/abis/PriceVelocityGuardExtension.js.map +1 -0
- package/dist/abis/SwapAllowlistExtension.d.ts +440 -0
- package/dist/abis/SwapAllowlistExtension.d.ts.map +1 -0
- package/dist/abis/SwapAllowlistExtension.js +572 -0
- package/dist/abis/SwapAllowlistExtension.js.map +1 -0
- package/dist/abis/index.d.ts +4 -0
- package/dist/abis/index.d.ts.map +1 -1
- package/dist/abis/index.js +4 -0
- package/dist/abis/index.js.map +1 -1
- package/dist/addresses.d.ts +13 -6
- package/dist/addresses.d.ts.map +1 -1
- package/dist/addresses.js +33 -16
- package/dist/addresses.js.map +1 -1
- package/dist/extensions/admin/depositAllowlist.d.ts +8 -0
- package/dist/extensions/admin/depositAllowlist.d.ts.map +1 -0
- package/dist/extensions/admin/depositAllowlist.js +10 -0
- package/dist/extensions/admin/depositAllowlist.js.map +1 -0
- package/dist/extensions/admin/oracleStopLoss.d.ts +56 -0
- package/dist/extensions/admin/oracleStopLoss.d.ts.map +1 -0
- package/dist/extensions/admin/oracleStopLoss.js +87 -0
- package/dist/extensions/admin/oracleStopLoss.js.map +1 -0
- package/dist/extensions/admin/priceVelocityGuard.d.ts +12 -0
- package/dist/extensions/admin/priceVelocityGuard.d.ts.map +1 -0
- package/dist/extensions/admin/priceVelocityGuard.js +17 -0
- package/dist/extensions/admin/priceVelocityGuard.js.map +1 -0
- package/dist/extensions/admin/swapAllowlist.d.ts +8 -0
- package/dist/extensions/admin/swapAllowlist.d.ts.map +1 -0
- package/dist/extensions/admin/swapAllowlist.js +10 -0
- package/dist/extensions/admin/swapAllowlist.js.map +1 -0
- package/dist/extensions/index.d.ts +8 -0
- package/dist/extensions/index.d.ts.map +1 -0
- package/dist/extensions/index.js +8 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/init/index.d.ts +13 -0
- package/dist/extensions/init/index.d.ts.map +1 -0
- package/dist/extensions/init/index.js +12 -0
- package/dist/extensions/init/index.js.map +1 -0
- package/dist/extensions/orders.d.ts +7 -0
- package/dist/extensions/orders.d.ts.map +1 -0
- package/dist/extensions/orders.js +24 -0
- package/dist/extensions/orders.js.map +1 -0
- package/dist/extensions/types.d.ts +23 -0
- package/dist/extensions/types.d.ts.map +1 -0
- package/dist/extensions/types.js +10 -0
- package/dist/extensions/types.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/pool/create.d.ts +11 -6
- package/dist/pool/create.d.ts.map +1 -1
- package/dist/pool/create.js +5 -3
- package/dist/pool/create.js.map +1 -1
- package/dist/pool/index.d.ts +1 -1
- package/dist/pool/index.d.ts.map +1 -1
- package/dist/pool/index.js.map +1 -1
- package/dist/pool/liquidity.d.ts +13 -5
- package/dist/pool/liquidity.d.ts.map +1 -1
- package/dist/pool/liquidity.js +25 -10
- package/dist/pool/liquidity.js.map +1 -1
- package/dist/pool/read.d.ts +0 -6
- package/dist/pool/read.d.ts.map +1 -1
- package/dist/pool/read.js +21 -14
- package/dist/pool/read.js.map +1 -1
- package/dist/router/swap.d.ts +1 -1
- package/dist/router/swap.d.ts.map +1 -1
- package/dist/router/swap.js +14 -14
- package/dist/router/swap.js.map +1 -1
- package/dist/types.d.ts +3 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -5
- package/src/abis/DepositAllowlistExtension.ts +571 -0
- package/src/abis/MetricOmmPool.ts +168 -34
- package/src/abis/MetricOmmPoolDataProvider.ts +4 -4
- package/src/abis/MetricOmmPoolFactory.ts +93 -19
- package/src/abis/MetricOmmPoolLiquidityAdder.ts +85 -9
- package/src/abis/MetricOmmPoolSwapper.ts +8 -8
- package/src/abis/OracleValueStopLossExtension.ts +1213 -0
- package/src/abis/PriceProvider.ts +1 -146
- package/src/abis/PriceVelocityGuardExtension.ts +589 -0
- package/src/abis/SwapAllowlistExtension.ts +571 -0
- package/src/abis/index.ts +4 -0
- package/src/addresses.ts +44 -18
- package/src/extensions/admin/depositAllowlist.ts +16 -0
- package/src/extensions/admin/oracleStopLoss.ts +141 -0
- package/src/extensions/admin/priceVelocityGuard.ts +27 -0
- package/src/extensions/admin/swapAllowlist.ts +16 -0
- package/src/extensions/index.ts +31 -0
- package/src/extensions/init/index.ts +21 -0
- package/src/extensions/orders.ts +33 -0
- package/src/extensions/types.ts +33 -0
- package/src/index.ts +33 -0
- package/src/pool/create.ts +12 -8
- package/src/pool/index.ts +1 -0
- package/src/pool/liquidity.ts +41 -15
- package/src/pool/read.ts +34 -16
- package/src/router/swap.ts +16 -16
- package/src/types.ts +3 -4
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @nradko/metric-omm-sdk-v1
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for **v1** Metric OMM contracts: **Swapper**, **LiquidityAdder**, pool `addLiquidity` / `removeLiquidity`, and factory-backed reads.
|
|
3
|
+
TypeScript SDK for **v1** Metric OMM contracts: **Swapper**, **LiquidityAdder**, pool `addLiquidity` / `removeLiquidity`, **extensions**, and factory-backed reads.
|
|
4
4
|
|
|
5
|
-
Pinned
|
|
5
|
+
Pinned **metric-periphery** `cc8fef9781fba405cfd1945fe6bf49a00da132bb` (core via periphery `lib/metric-core`).
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -16,18 +16,25 @@ Or via the combined package:
|
|
|
16
16
|
import { v1 } from "@nradko/metric-omm-sdk";
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
## Ethereum mainnet addresses
|
|
19
|
+
## Ethereum mainnet and Base addresses
|
|
20
|
+
|
|
21
|
+
Protocol contracts use the **same addresses** on Ethereum mainnet and Base (CREATE2). Wrapped native differs per chain (WETH).
|
|
20
22
|
|
|
21
23
|
| Contract | Address |
|
|
22
24
|
| -------- | ------- |
|
|
23
|
-
| MetricOmmPoolFactory | `
|
|
24
|
-
| MetricOmmPoolDeployer | `
|
|
25
|
-
| MetricOmmPoolLiquidityAdder | `
|
|
26
|
-
| MetricOmmPoolDataProvider | `
|
|
27
|
-
| MetricOmmPoolStateView | `
|
|
28
|
-
| MetricOmmSimpleRouter | `
|
|
29
|
-
| MetricOmmPoolSwapper | `
|
|
30
|
-
|
|
|
25
|
+
| MetricOmmPoolFactory | `0x175851292f22621F337D76fE5445e9372fb06f9C` |
|
|
26
|
+
| MetricOmmPoolDeployer | `0x1C0502457231fF2BE9af4468115B33c112A580eF` |
|
|
27
|
+
| MetricOmmPoolLiquidityAdder | `0x7A2C0A39A48c526F1Cae4d67cb0e7aE883A7B623` |
|
|
28
|
+
| MetricOmmPoolDataProvider | `0xD0C4df72910Fd70C89CBa5f0FE0ef45638D12775` |
|
|
29
|
+
| MetricOmmPoolStateView | `0xb40F8B0cfBB6a01c3232c6D063B1F87d1C0bE40f` |
|
|
30
|
+
| MetricOmmSimpleRouter | `0x818a948B25f32F41547a7B9175cB174d2B1e6AD7` |
|
|
31
|
+
| MetricOmmPoolSwapper | `0x3B8F17A4cb4f91805338f4b6c2f2aAf94243587e` |
|
|
32
|
+
| DepositAllowlistExtension | `0xa56f616c1C8108750b8a5BF387a34C757B8Bdc2c` |
|
|
33
|
+
| SwapAllowlistExtension | `0x1aee646900bE4aa1D0A7Ec6c98483923E1aBf481` |
|
|
34
|
+
| OracleValueStopLossExtension | `0x3CB3EdCce50Bdc95e746F6e7C23fd61d439fA02a` |
|
|
35
|
+
| PriceVelocityGuardExtension | `0x65D5C490fF5Df1861D966A671dB43a8d0c22b9C4` |
|
|
36
|
+
| WETH (Ethereum) | `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2` |
|
|
37
|
+
| WETH (Base) | `0x4200000000000000000000000000000000000006` |
|
|
31
38
|
|
|
32
39
|
`MetricOmmPoolDataProvider` is the deployed lens: pool reads (`slot0`, `binStates`, `positionBinShares`, …) plus swap depth and revert-based quotes. Pass `addresses.dataProvider` to read helpers and liquidity builders (`dataProviderAddress` param).
|
|
33
40
|
|
|
@@ -35,10 +42,11 @@ import { v1 } from "@nradko/metric-omm-sdk";
|
|
|
35
42
|
import { getAddressesOrThrow, ChainId, isChainSupported } from "@nradko/metric-omm-sdk-v1";
|
|
36
43
|
|
|
37
44
|
const a = getAddressesOrThrow(ChainId.ETHEREUM);
|
|
38
|
-
//
|
|
45
|
+
// getAddressesOrThrow(ChainId.BASE) — same protocol addresses as Ethereum
|
|
46
|
+
// isChainSupported(ChainId.ARBITRUM) === false — use DeployedChainId / getSupportedChainIds()
|
|
39
47
|
```
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
ChainId lists future chain IDs for typing; **Ethereum mainnet and Base** have entries in ADDRESSES for this release. Use getSupportedChainIds(), isChainSupported(), or DeployedChainId when you need compile-time guarantees.
|
|
42
50
|
|
|
43
51
|
## Swaps (Swapper)
|
|
44
52
|
|
|
@@ -63,6 +71,7 @@ const { args, expectedInput, expectedOutput } =
|
|
|
63
71
|
amountIn: 1_000_000_000_000_000_000n,
|
|
64
72
|
slippagePercent: 0.5,
|
|
65
73
|
deadline: BigInt(Math.floor(Date.now() / 1000) + 1200),
|
|
74
|
+
// extensionData: "0x", // optional; defaults to empty
|
|
66
75
|
});
|
|
67
76
|
|
|
68
77
|
await walletClient.writeContract({
|
|
@@ -81,8 +90,82 @@ Quote without building tx args: `quoteSwap` (read-only pool quote), `quoteExpect
|
|
|
81
90
|
- **Add (EOA):** approve **LiquidityAdder**, then `addLiquidityExactShares` / `addLiquidityWeighted` on the adder (see `encodeAddLiquidity*` helpers).
|
|
82
91
|
- **Remove:** `removeLiquidity` on the pool — build deltas with `buildModifyLiquidityArgsForRemoval` / `encodeRemoveLiquidityCalldata`.
|
|
83
92
|
|
|
93
|
+
`addLiquidityWeighted` encoders accept optional bin-position bounds (`minimalCurBin`, `minimalPosition`, `maximalCurBin`, `maximalPosition`); defaults disable bounds.
|
|
94
|
+
|
|
84
95
|
SDK builders still use internal names like `buildModifyLiquidityArgsForUniformAddition` where the math is shared; encoders target v1 pool/adder ABIs.
|
|
85
96
|
|
|
97
|
+
## Extensions
|
|
98
|
+
|
|
99
|
+
Pools support up to seven **extensions** (periphery contracts) configured at creation via `extensions`, `extensionOrders`, and `extensionInitData`. Swap and liquidity encoders forward optional **`extensionData`** (defaults to `0x`).
|
|
100
|
+
|
|
101
|
+
### Pool creation with extensions
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
import {
|
|
105
|
+
encodeCreatePoolCalldata,
|
|
106
|
+
buildExtensionOrders,
|
|
107
|
+
encodeOracleStopLossInitData,
|
|
108
|
+
EMPTY_EXTENSION_INIT_DATA,
|
|
109
|
+
} from "@nradko/metric-omm-sdk-v1";
|
|
110
|
+
|
|
111
|
+
const calldata = encodeCreatePoolCalldata({
|
|
112
|
+
token0,
|
|
113
|
+
token1,
|
|
114
|
+
priceProvider,
|
|
115
|
+
admin,
|
|
116
|
+
adminFeeDestination,
|
|
117
|
+
adminSpreadFeeE6: 5000,
|
|
118
|
+
adminNotionalFeeE8: 0,
|
|
119
|
+
curBinDistFromProvidedPricePercent: 0,
|
|
120
|
+
initialScaledToken0PerShareE18,
|
|
121
|
+
initialScaledToken1PerShareE18,
|
|
122
|
+
minimalMintableLiquidity: 1000n,
|
|
123
|
+
nonNegativeBins,
|
|
124
|
+
negativeBins,
|
|
125
|
+
extensions: [depositAllowlistAddress, swapAllowlistAddress],
|
|
126
|
+
extensionOrders: buildExtensionOrders({
|
|
127
|
+
beforeAddLiquidity: [1],
|
|
128
|
+
beforeSwap: [2],
|
|
129
|
+
}),
|
|
130
|
+
extensionInitData: [
|
|
131
|
+
EMPTY_EXTENSION_INIT_DATA, // DepositAllowlist — no init payload
|
|
132
|
+
EMPTY_EXTENSION_INIT_DATA, // SwapAllowlist — no init payload
|
|
133
|
+
],
|
|
134
|
+
});
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`encodeExtensionOrder` / `buildExtensionOrders` pack 3-bit extension indices per action (same encoding as on-chain `ExtensionOrders`).
|
|
138
|
+
|
|
139
|
+
### Initialize data
|
|
140
|
+
|
|
141
|
+
| Extension | Init encoder |
|
|
142
|
+
| --------- | ------------ |
|
|
143
|
+
| DepositAllowlist, SwapAllowlist, PriceVelocityGuard | `EMPTY_EXTENSION_INIT_DATA` |
|
|
144
|
+
| OracleValueStopLoss | `encodeOracleStopLossInitData({ drawdownE6, decayPerSecondE8, timelockSeconds })` |
|
|
145
|
+
|
|
146
|
+
### Admin actions (pool admin)
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
import {
|
|
150
|
+
encodeSetAllowedToDepositCalldata,
|
|
151
|
+
encodeSetAllowedToSwapCalldata,
|
|
152
|
+
encodeSetMaxChangePerBlockCalldata,
|
|
153
|
+
encodeProposeOracleStopLossDrawdownCalldata,
|
|
154
|
+
} from "@nradko/metric-omm-sdk-v1";
|
|
155
|
+
|
|
156
|
+
// Allow a depositor on a pool with DepositAllowlistExtension
|
|
157
|
+
const data = encodeSetAllowedToDepositCalldata({
|
|
158
|
+
extension: depositAllowlistAddress,
|
|
159
|
+
pool: poolAddress,
|
|
160
|
+
depositor: userAddress,
|
|
161
|
+
allowed: true,
|
|
162
|
+
});
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Also available: swap allowlist setters, price-velocity guard setters, and oracle stop-loss propose / execute / cancel helpers for timelock, drawdown, decay, and high-watermark updates.
|
|
166
|
+
|
|
167
|
+
**Swap allowlist note:** when users swap via `MetricOmmPoolSwapper`, the extension gates the **Swapper contract address** as the pool swap caller — allow that address, not the end-user EOA.
|
|
168
|
+
|
|
86
169
|
## Pool reads
|
|
87
170
|
|
|
88
171
|
```typescript
|
|
@@ -90,6 +173,7 @@ import { getPoolImmutables, getPoolState, getSlot0, getAddressesOrThrow, ChainId
|
|
|
90
173
|
|
|
91
174
|
const addresses = getAddressesOrThrow(ChainId.ETHEREUM);
|
|
92
175
|
const imm = await getPoolImmutables(publicClient, addresses.factory, poolAddress);
|
|
176
|
+
// imm.extensions (extension1…7), imm.extensionOrders
|
|
93
177
|
const state = await getPoolState(publicClient, addresses.dataProvider, poolAddress);
|
|
94
178
|
const slot0 = await getSlot0(publicClient, addresses.dataProvider, poolAddress);
|
|
95
179
|
```
|
|
@@ -102,6 +186,10 @@ import {
|
|
|
102
186
|
MetricOmmPoolDataProviderAbi,
|
|
103
187
|
MetricOmmPoolSwapperAbi,
|
|
104
188
|
MetricOmmPoolLiquidityAdderAbi,
|
|
189
|
+
DepositAllowlistExtensionAbi,
|
|
190
|
+
SwapAllowlistExtensionAbi,
|
|
191
|
+
PriceVelocityGuardExtensionAbi,
|
|
192
|
+
OracleValueStopLossExtensionAbi,
|
|
105
193
|
} from "@nradko/metric-omm-sdk-v1/abis";
|
|
106
194
|
```
|
|
107
195
|
|
|
@@ -111,7 +199,7 @@ Regenerate from pinned contracts:
|
|
|
111
199
|
npm run setup:contracts # init submodules, hardhat build, sync ABIs
|
|
112
200
|
```
|
|
113
201
|
|
|
114
|
-
All pinned contracts
|
|
202
|
+
All pinned contracts are compiled by Hardhat from the pinned `@metric/periphery` git dependency (core via `lib/metric-core`).
|
|
115
203
|
|
|
116
204
|
## Development
|
|
117
205
|
|
|
@@ -121,20 +209,19 @@ npm run setup:contracts # refresh ABIs from pinned git deps (maintainers)
|
|
|
121
209
|
npm test # Hardhat tests (needs matching @metric/* in node_modules)
|
|
122
210
|
```
|
|
123
211
|
|
|
124
|
-
In the monorepo, run v1 tests with an isolated install
|
|
212
|
+
In the monorepo, run v1 tests with an isolated install:
|
|
125
213
|
|
|
126
214
|
```bash
|
|
127
|
-
# from dev_sdk/
|
|
128
215
|
cd v1
|
|
129
216
|
npm ci
|
|
130
|
-
npm run
|
|
217
|
+
npm run setup:contracts
|
|
131
218
|
npm test
|
|
132
219
|
```
|
|
133
220
|
|
|
134
221
|
## Tests
|
|
135
222
|
|
|
136
223
|
```bash
|
|
137
|
-
npm run
|
|
224
|
+
npm run setup:contracts && npm test
|
|
138
225
|
```
|
|
139
226
|
|
|
140
227
|
Fork tests: set `ETHEREUM_RPC_URL` (optional `ETHEREUM_FORK_BLOCK_NUMBER`).
|
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
export declare const DepositAllowlistExtensionAbi: readonly [{
|
|
2
|
+
readonly inputs: readonly [{
|
|
3
|
+
readonly internalType: "address";
|
|
4
|
+
readonly name: "factory_";
|
|
5
|
+
readonly type: "address";
|
|
6
|
+
}];
|
|
7
|
+
readonly stateMutability: "nonpayable";
|
|
8
|
+
readonly type: "constructor";
|
|
9
|
+
}, {
|
|
10
|
+
readonly inputs: readonly [];
|
|
11
|
+
readonly name: "ExtensionNotImplemented";
|
|
12
|
+
readonly type: "error";
|
|
13
|
+
}, {
|
|
14
|
+
readonly inputs: readonly [];
|
|
15
|
+
readonly name: "NotAllowedToDeposit";
|
|
16
|
+
readonly type: "error";
|
|
17
|
+
}, {
|
|
18
|
+
readonly inputs: readonly [{
|
|
19
|
+
readonly internalType: "address";
|
|
20
|
+
readonly name: "caller";
|
|
21
|
+
readonly type: "address";
|
|
22
|
+
}, {
|
|
23
|
+
readonly internalType: "address";
|
|
24
|
+
readonly name: "factory";
|
|
25
|
+
readonly type: "address";
|
|
26
|
+
}];
|
|
27
|
+
readonly name: "OnlyFactory";
|
|
28
|
+
readonly type: "error";
|
|
29
|
+
}, {
|
|
30
|
+
readonly inputs: readonly [{
|
|
31
|
+
readonly internalType: "address";
|
|
32
|
+
readonly name: "caller";
|
|
33
|
+
readonly type: "address";
|
|
34
|
+
}, {
|
|
35
|
+
readonly internalType: "address";
|
|
36
|
+
readonly name: "factory";
|
|
37
|
+
readonly type: "address";
|
|
38
|
+
}];
|
|
39
|
+
readonly name: "OnlyPool";
|
|
40
|
+
readonly type: "error";
|
|
41
|
+
}, {
|
|
42
|
+
readonly inputs: readonly [{
|
|
43
|
+
readonly internalType: "address";
|
|
44
|
+
readonly name: "pool";
|
|
45
|
+
readonly type: "address";
|
|
46
|
+
}, {
|
|
47
|
+
readonly internalType: "address";
|
|
48
|
+
readonly name: "caller";
|
|
49
|
+
readonly type: "address";
|
|
50
|
+
}, {
|
|
51
|
+
readonly internalType: "address";
|
|
52
|
+
readonly name: "admin";
|
|
53
|
+
readonly type: "address";
|
|
54
|
+
}];
|
|
55
|
+
readonly name: "OnlyPoolAdmin";
|
|
56
|
+
readonly type: "error";
|
|
57
|
+
}, {
|
|
58
|
+
readonly anonymous: false;
|
|
59
|
+
readonly inputs: readonly [{
|
|
60
|
+
readonly indexed: true;
|
|
61
|
+
readonly internalType: "address";
|
|
62
|
+
readonly name: "pool";
|
|
63
|
+
readonly type: "address";
|
|
64
|
+
}, {
|
|
65
|
+
readonly indexed: true;
|
|
66
|
+
readonly internalType: "address";
|
|
67
|
+
readonly name: "depositor";
|
|
68
|
+
readonly type: "address";
|
|
69
|
+
}, {
|
|
70
|
+
readonly indexed: false;
|
|
71
|
+
readonly internalType: "bool";
|
|
72
|
+
readonly name: "allowed";
|
|
73
|
+
readonly type: "bool";
|
|
74
|
+
}];
|
|
75
|
+
readonly name: "AllowedToDepositSet";
|
|
76
|
+
readonly type: "event";
|
|
77
|
+
}, {
|
|
78
|
+
readonly inputs: readonly [];
|
|
79
|
+
readonly name: "FACTORY";
|
|
80
|
+
readonly outputs: readonly [{
|
|
81
|
+
readonly internalType: "address";
|
|
82
|
+
readonly name: "";
|
|
83
|
+
readonly type: "address";
|
|
84
|
+
}];
|
|
85
|
+
readonly stateMutability: "view";
|
|
86
|
+
readonly type: "function";
|
|
87
|
+
}, {
|
|
88
|
+
readonly inputs: readonly [{
|
|
89
|
+
readonly internalType: "address";
|
|
90
|
+
readonly name: "";
|
|
91
|
+
readonly type: "address";
|
|
92
|
+
}, {
|
|
93
|
+
readonly internalType: "address";
|
|
94
|
+
readonly name: "";
|
|
95
|
+
readonly type: "address";
|
|
96
|
+
}, {
|
|
97
|
+
readonly internalType: "uint80";
|
|
98
|
+
readonly name: "";
|
|
99
|
+
readonly type: "uint80";
|
|
100
|
+
}, {
|
|
101
|
+
readonly components: readonly [{
|
|
102
|
+
readonly internalType: "int256[]";
|
|
103
|
+
readonly name: "binIdxs";
|
|
104
|
+
readonly type: "int256[]";
|
|
105
|
+
}, {
|
|
106
|
+
readonly internalType: "uint256[]";
|
|
107
|
+
readonly name: "shares";
|
|
108
|
+
readonly type: "uint256[]";
|
|
109
|
+
}];
|
|
110
|
+
readonly internalType: "struct LiquidityDelta";
|
|
111
|
+
readonly name: "";
|
|
112
|
+
readonly type: "tuple";
|
|
113
|
+
}, {
|
|
114
|
+
readonly internalType: "uint256";
|
|
115
|
+
readonly name: "";
|
|
116
|
+
readonly type: "uint256";
|
|
117
|
+
}, {
|
|
118
|
+
readonly internalType: "uint256";
|
|
119
|
+
readonly name: "";
|
|
120
|
+
readonly type: "uint256";
|
|
121
|
+
}, {
|
|
122
|
+
readonly internalType: "bytes";
|
|
123
|
+
readonly name: "";
|
|
124
|
+
readonly type: "bytes";
|
|
125
|
+
}];
|
|
126
|
+
readonly name: "afterAddLiquidity";
|
|
127
|
+
readonly outputs: readonly [{
|
|
128
|
+
readonly internalType: "bytes4";
|
|
129
|
+
readonly name: "";
|
|
130
|
+
readonly type: "bytes4";
|
|
131
|
+
}];
|
|
132
|
+
readonly stateMutability: "nonpayable";
|
|
133
|
+
readonly type: "function";
|
|
134
|
+
}, {
|
|
135
|
+
readonly inputs: readonly [{
|
|
136
|
+
readonly internalType: "address";
|
|
137
|
+
readonly name: "";
|
|
138
|
+
readonly type: "address";
|
|
139
|
+
}, {
|
|
140
|
+
readonly internalType: "address";
|
|
141
|
+
readonly name: "";
|
|
142
|
+
readonly type: "address";
|
|
143
|
+
}, {
|
|
144
|
+
readonly internalType: "uint80";
|
|
145
|
+
readonly name: "";
|
|
146
|
+
readonly type: "uint80";
|
|
147
|
+
}, {
|
|
148
|
+
readonly components: readonly [{
|
|
149
|
+
readonly internalType: "int256[]";
|
|
150
|
+
readonly name: "binIdxs";
|
|
151
|
+
readonly type: "int256[]";
|
|
152
|
+
}, {
|
|
153
|
+
readonly internalType: "uint256[]";
|
|
154
|
+
readonly name: "shares";
|
|
155
|
+
readonly type: "uint256[]";
|
|
156
|
+
}];
|
|
157
|
+
readonly internalType: "struct LiquidityDelta";
|
|
158
|
+
readonly name: "";
|
|
159
|
+
readonly type: "tuple";
|
|
160
|
+
}, {
|
|
161
|
+
readonly internalType: "uint256";
|
|
162
|
+
readonly name: "";
|
|
163
|
+
readonly type: "uint256";
|
|
164
|
+
}, {
|
|
165
|
+
readonly internalType: "uint256";
|
|
166
|
+
readonly name: "";
|
|
167
|
+
readonly type: "uint256";
|
|
168
|
+
}, {
|
|
169
|
+
readonly internalType: "bytes";
|
|
170
|
+
readonly name: "";
|
|
171
|
+
readonly type: "bytes";
|
|
172
|
+
}];
|
|
173
|
+
readonly name: "afterRemoveLiquidity";
|
|
174
|
+
readonly outputs: readonly [{
|
|
175
|
+
readonly internalType: "bytes4";
|
|
176
|
+
readonly name: "";
|
|
177
|
+
readonly type: "bytes4";
|
|
178
|
+
}];
|
|
179
|
+
readonly stateMutability: "nonpayable";
|
|
180
|
+
readonly type: "function";
|
|
181
|
+
}, {
|
|
182
|
+
readonly inputs: readonly [{
|
|
183
|
+
readonly internalType: "address";
|
|
184
|
+
readonly name: "";
|
|
185
|
+
readonly type: "address";
|
|
186
|
+
}, {
|
|
187
|
+
readonly internalType: "address";
|
|
188
|
+
readonly name: "";
|
|
189
|
+
readonly type: "address";
|
|
190
|
+
}, {
|
|
191
|
+
readonly internalType: "bool";
|
|
192
|
+
readonly name: "";
|
|
193
|
+
readonly type: "bool";
|
|
194
|
+
}, {
|
|
195
|
+
readonly internalType: "int128";
|
|
196
|
+
readonly name: "";
|
|
197
|
+
readonly type: "int128";
|
|
198
|
+
}, {
|
|
199
|
+
readonly internalType: "uint128";
|
|
200
|
+
readonly name: "";
|
|
201
|
+
readonly type: "uint128";
|
|
202
|
+
}, {
|
|
203
|
+
readonly internalType: "uint256";
|
|
204
|
+
readonly name: "";
|
|
205
|
+
readonly type: "uint256";
|
|
206
|
+
}, {
|
|
207
|
+
readonly internalType: "uint256";
|
|
208
|
+
readonly name: "";
|
|
209
|
+
readonly type: "uint256";
|
|
210
|
+
}, {
|
|
211
|
+
readonly internalType: "uint128";
|
|
212
|
+
readonly name: "";
|
|
213
|
+
readonly type: "uint128";
|
|
214
|
+
}, {
|
|
215
|
+
readonly internalType: "uint128";
|
|
216
|
+
readonly name: "";
|
|
217
|
+
readonly type: "uint128";
|
|
218
|
+
}, {
|
|
219
|
+
readonly internalType: "int128";
|
|
220
|
+
readonly name: "";
|
|
221
|
+
readonly type: "int128";
|
|
222
|
+
}, {
|
|
223
|
+
readonly internalType: "int128";
|
|
224
|
+
readonly name: "";
|
|
225
|
+
readonly type: "int128";
|
|
226
|
+
}, {
|
|
227
|
+
readonly internalType: "uint256";
|
|
228
|
+
readonly name: "";
|
|
229
|
+
readonly type: "uint256";
|
|
230
|
+
}, {
|
|
231
|
+
readonly internalType: "bytes";
|
|
232
|
+
readonly name: "";
|
|
233
|
+
readonly type: "bytes";
|
|
234
|
+
}];
|
|
235
|
+
readonly name: "afterSwap";
|
|
236
|
+
readonly outputs: readonly [{
|
|
237
|
+
readonly internalType: "bytes4";
|
|
238
|
+
readonly name: "";
|
|
239
|
+
readonly type: "bytes4";
|
|
240
|
+
}];
|
|
241
|
+
readonly stateMutability: "nonpayable";
|
|
242
|
+
readonly type: "function";
|
|
243
|
+
}, {
|
|
244
|
+
readonly inputs: readonly [{
|
|
245
|
+
readonly internalType: "address";
|
|
246
|
+
readonly name: "pool";
|
|
247
|
+
readonly type: "address";
|
|
248
|
+
}, {
|
|
249
|
+
readonly internalType: "address";
|
|
250
|
+
readonly name: "depositor";
|
|
251
|
+
readonly type: "address";
|
|
252
|
+
}];
|
|
253
|
+
readonly name: "allowedDepositor";
|
|
254
|
+
readonly outputs: readonly [{
|
|
255
|
+
readonly internalType: "bool";
|
|
256
|
+
readonly name: "";
|
|
257
|
+
readonly type: "bool";
|
|
258
|
+
}];
|
|
259
|
+
readonly stateMutability: "view";
|
|
260
|
+
readonly type: "function";
|
|
261
|
+
}, {
|
|
262
|
+
readonly inputs: readonly [{
|
|
263
|
+
readonly internalType: "address";
|
|
264
|
+
readonly name: "";
|
|
265
|
+
readonly type: "address";
|
|
266
|
+
}, {
|
|
267
|
+
readonly internalType: "address";
|
|
268
|
+
readonly name: "owner";
|
|
269
|
+
readonly type: "address";
|
|
270
|
+
}, {
|
|
271
|
+
readonly internalType: "uint80";
|
|
272
|
+
readonly name: "";
|
|
273
|
+
readonly type: "uint80";
|
|
274
|
+
}, {
|
|
275
|
+
readonly components: readonly [{
|
|
276
|
+
readonly internalType: "int256[]";
|
|
277
|
+
readonly name: "binIdxs";
|
|
278
|
+
readonly type: "int256[]";
|
|
279
|
+
}, {
|
|
280
|
+
readonly internalType: "uint256[]";
|
|
281
|
+
readonly name: "shares";
|
|
282
|
+
readonly type: "uint256[]";
|
|
283
|
+
}];
|
|
284
|
+
readonly internalType: "struct LiquidityDelta";
|
|
285
|
+
readonly name: "";
|
|
286
|
+
readonly type: "tuple";
|
|
287
|
+
}, {
|
|
288
|
+
readonly internalType: "bytes";
|
|
289
|
+
readonly name: "";
|
|
290
|
+
readonly type: "bytes";
|
|
291
|
+
}];
|
|
292
|
+
readonly name: "beforeAddLiquidity";
|
|
293
|
+
readonly outputs: readonly [{
|
|
294
|
+
readonly internalType: "bytes4";
|
|
295
|
+
readonly name: "";
|
|
296
|
+
readonly type: "bytes4";
|
|
297
|
+
}];
|
|
298
|
+
readonly stateMutability: "view";
|
|
299
|
+
readonly type: "function";
|
|
300
|
+
}, {
|
|
301
|
+
readonly inputs: readonly [{
|
|
302
|
+
readonly internalType: "address";
|
|
303
|
+
readonly name: "";
|
|
304
|
+
readonly type: "address";
|
|
305
|
+
}, {
|
|
306
|
+
readonly internalType: "address";
|
|
307
|
+
readonly name: "";
|
|
308
|
+
readonly type: "address";
|
|
309
|
+
}, {
|
|
310
|
+
readonly internalType: "uint80";
|
|
311
|
+
readonly name: "";
|
|
312
|
+
readonly type: "uint80";
|
|
313
|
+
}, {
|
|
314
|
+
readonly components: readonly [{
|
|
315
|
+
readonly internalType: "int256[]";
|
|
316
|
+
readonly name: "binIdxs";
|
|
317
|
+
readonly type: "int256[]";
|
|
318
|
+
}, {
|
|
319
|
+
readonly internalType: "uint256[]";
|
|
320
|
+
readonly name: "shares";
|
|
321
|
+
readonly type: "uint256[]";
|
|
322
|
+
}];
|
|
323
|
+
readonly internalType: "struct LiquidityDelta";
|
|
324
|
+
readonly name: "";
|
|
325
|
+
readonly type: "tuple";
|
|
326
|
+
}, {
|
|
327
|
+
readonly internalType: "bytes";
|
|
328
|
+
readonly name: "";
|
|
329
|
+
readonly type: "bytes";
|
|
330
|
+
}];
|
|
331
|
+
readonly name: "beforeRemoveLiquidity";
|
|
332
|
+
readonly outputs: readonly [{
|
|
333
|
+
readonly internalType: "bytes4";
|
|
334
|
+
readonly name: "";
|
|
335
|
+
readonly type: "bytes4";
|
|
336
|
+
}];
|
|
337
|
+
readonly stateMutability: "nonpayable";
|
|
338
|
+
readonly type: "function";
|
|
339
|
+
}, {
|
|
340
|
+
readonly inputs: readonly [{
|
|
341
|
+
readonly internalType: "address";
|
|
342
|
+
readonly name: "";
|
|
343
|
+
readonly type: "address";
|
|
344
|
+
}, {
|
|
345
|
+
readonly internalType: "address";
|
|
346
|
+
readonly name: "";
|
|
347
|
+
readonly type: "address";
|
|
348
|
+
}, {
|
|
349
|
+
readonly internalType: "bool";
|
|
350
|
+
readonly name: "";
|
|
351
|
+
readonly type: "bool";
|
|
352
|
+
}, {
|
|
353
|
+
readonly internalType: "int128";
|
|
354
|
+
readonly name: "";
|
|
355
|
+
readonly type: "int128";
|
|
356
|
+
}, {
|
|
357
|
+
readonly internalType: "uint128";
|
|
358
|
+
readonly name: "";
|
|
359
|
+
readonly type: "uint128";
|
|
360
|
+
}, {
|
|
361
|
+
readonly internalType: "uint256";
|
|
362
|
+
readonly name: "";
|
|
363
|
+
readonly type: "uint256";
|
|
364
|
+
}, {
|
|
365
|
+
readonly internalType: "uint128";
|
|
366
|
+
readonly name: "";
|
|
367
|
+
readonly type: "uint128";
|
|
368
|
+
}, {
|
|
369
|
+
readonly internalType: "uint128";
|
|
370
|
+
readonly name: "";
|
|
371
|
+
readonly type: "uint128";
|
|
372
|
+
}, {
|
|
373
|
+
readonly internalType: "bytes";
|
|
374
|
+
readonly name: "";
|
|
375
|
+
readonly type: "bytes";
|
|
376
|
+
}];
|
|
377
|
+
readonly name: "beforeSwap";
|
|
378
|
+
readonly outputs: readonly [{
|
|
379
|
+
readonly internalType: "bytes4";
|
|
380
|
+
readonly name: "";
|
|
381
|
+
readonly type: "bytes4";
|
|
382
|
+
}];
|
|
383
|
+
readonly stateMutability: "nonpayable";
|
|
384
|
+
readonly type: "function";
|
|
385
|
+
}, {
|
|
386
|
+
readonly inputs: readonly [{
|
|
387
|
+
readonly internalType: "address";
|
|
388
|
+
readonly name: "";
|
|
389
|
+
readonly type: "address";
|
|
390
|
+
}, {
|
|
391
|
+
readonly internalType: "bytes";
|
|
392
|
+
readonly name: "";
|
|
393
|
+
readonly type: "bytes";
|
|
394
|
+
}];
|
|
395
|
+
readonly name: "initialize";
|
|
396
|
+
readonly outputs: readonly [{
|
|
397
|
+
readonly internalType: "bytes4";
|
|
398
|
+
readonly name: "";
|
|
399
|
+
readonly type: "bytes4";
|
|
400
|
+
}];
|
|
401
|
+
readonly stateMutability: "nonpayable";
|
|
402
|
+
readonly type: "function";
|
|
403
|
+
}, {
|
|
404
|
+
readonly inputs: readonly [{
|
|
405
|
+
readonly internalType: "address";
|
|
406
|
+
readonly name: "pool_";
|
|
407
|
+
readonly type: "address";
|
|
408
|
+
}, {
|
|
409
|
+
readonly internalType: "address";
|
|
410
|
+
readonly name: "depositor";
|
|
411
|
+
readonly type: "address";
|
|
412
|
+
}];
|
|
413
|
+
readonly name: "isAllowedToDeposit";
|
|
414
|
+
readonly outputs: readonly [{
|
|
415
|
+
readonly internalType: "bool";
|
|
416
|
+
readonly name: "";
|
|
417
|
+
readonly type: "bool";
|
|
418
|
+
}];
|
|
419
|
+
readonly stateMutability: "view";
|
|
420
|
+
readonly type: "function";
|
|
421
|
+
}, {
|
|
422
|
+
readonly inputs: readonly [{
|
|
423
|
+
readonly internalType: "address";
|
|
424
|
+
readonly name: "pool_";
|
|
425
|
+
readonly type: "address";
|
|
426
|
+
}, {
|
|
427
|
+
readonly internalType: "address";
|
|
428
|
+
readonly name: "depositor";
|
|
429
|
+
readonly type: "address";
|
|
430
|
+
}, {
|
|
431
|
+
readonly internalType: "bool";
|
|
432
|
+
readonly name: "allowed";
|
|
433
|
+
readonly type: "bool";
|
|
434
|
+
}];
|
|
435
|
+
readonly name: "setAllowedToDeposit";
|
|
436
|
+
readonly outputs: readonly [];
|
|
437
|
+
readonly stateMutability: "nonpayable";
|
|
438
|
+
readonly type: "function";
|
|
439
|
+
}];
|
|
440
|
+
//# sourceMappingURL=DepositAllowlistExtension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DepositAllowlistExtension.d.ts","sourceRoot":"","sources":["../../src/abis/DepositAllowlistExtension.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0jB/B,CAAC"}
|