@whetstone-research/doppler-sdk 1.0.41 → 1.0.42
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 +18 -100
- package/dist/evm/index.cjs +6546 -11428
- package/dist/evm/index.cjs.map +1 -1
- package/dist/evm/index.d.cts +2753 -4667
- package/dist/evm/index.d.ts +2753 -4667
- package/dist/evm/index.js +6547 -11395
- package/dist/evm/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ The Doppler SDK exposes network-specific entrypoints for creating, managing, and
|
|
|
15
15
|
- **Solana Clients and React**: Read clients, PDA helpers, generated codecs, and optional React bindings
|
|
16
16
|
- **Token Management**: Built-in EVM support for DERC20 tokens with vesting
|
|
17
17
|
- **Type Safety**: Full TypeScript support across EVM and Solana entrypoints
|
|
18
|
-
- **Network Support**: EVM deployments on
|
|
18
|
+
- **Network Support**: EVM deployments on Ethereum, BNB Smart Chain (BSC), Monad, Robinhood Chain, Arc, Base, and Arbitrum; Solana/SVM support via explicit Solana program deployments
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
@@ -324,76 +324,6 @@ console.log('Hook address:', result.hookAddress);
|
|
|
324
324
|
console.log('Token address:', result.tokenAddress);
|
|
325
325
|
```
|
|
326
326
|
|
|
327
|
-
### Opening Auction (Lifecycle + Bid Management)
|
|
328
|
-
|
|
329
|
-
Support includes:
|
|
330
|
-
|
|
331
|
-
- `sdk.buildOpeningAuction()` for `CreateOpeningAuctionParams`
|
|
332
|
-
- `sdk.factory.simulateCreateOpeningAuction(params)` and `sdk.factory.createOpeningAuction(params)`
|
|
333
|
-
- `sdk.getOpeningAuction(hookAddress)` for hook reads + `settleAuction()` / `claimIncentives()`
|
|
334
|
-
- `sdk.factory.simulateCompleteOpeningAuction(...)` and `sdk.factory.completeOpeningAuction(...)` for handoff to Doppler
|
|
335
|
-
- `sdk.getOpeningAuctionLifecycle(initializerAddress?)` for initializer-level state + complete/recover/sweep helpers
|
|
336
|
-
- `sdk.getOpeningAuctionPositionManager(positionManagerAddress?)` for placing/withdrawing opening-auction bids
|
|
337
|
-
- Resolve the address via `await (await sdk.getOpeningAuctionLifecycle(initializerAddress)).getPositionManager()` when chain defaults are not configured
|
|
338
|
-
- Resolve `positionId` for incentives via `opening.getPositionId(...)` or `opening.claimIncentivesByPositionKey(...)` (no log parsing required)
|
|
339
|
-
|
|
340
|
-
> **Base caveat:** on Base mainnet (`chainId = 8453`), `openingAuctionInitializer` and `openingAuctionPositionManager` default to `0x0000000000000000000000000000000000000000` until deployment. Override with `.withOpeningAuctionInitializer('0x...')` / `.withOpeningAuctionPositionManager('0x...')` (or pass explicit addresses) before using opening-auction create/completion/bid flows there.
|
|
341
|
-
|
|
342
|
-
```typescript
|
|
343
|
-
const params = sdk
|
|
344
|
-
.buildOpeningAuction()
|
|
345
|
-
.tokenConfig({
|
|
346
|
-
name: 'My Token',
|
|
347
|
-
symbol: 'MTK',
|
|
348
|
-
tokenURI: 'https://example.com/metadata.json',
|
|
349
|
-
})
|
|
350
|
-
.saleConfig({
|
|
351
|
-
initialSupply: parseEther('1000000'),
|
|
352
|
-
numTokensToSell: parseEther('900000'),
|
|
353
|
-
numeraire: '0x...',
|
|
354
|
-
})
|
|
355
|
-
.openingAuctionConfig({
|
|
356
|
-
auctionDuration: 3600,
|
|
357
|
-
minAcceptableTickToken0: -887220,
|
|
358
|
-
minAcceptableTickToken1: -887220,
|
|
359
|
-
incentiveShareBps: 500,
|
|
360
|
-
tickSpacing: 60,
|
|
361
|
-
fee: 3000,
|
|
362
|
-
minLiquidity: 1n,
|
|
363
|
-
shareToAuctionBps: 8000,
|
|
364
|
-
})
|
|
365
|
-
.dopplerConfig({
|
|
366
|
-
minProceeds: parseEther('10'),
|
|
367
|
-
maxProceeds: parseEther('100'),
|
|
368
|
-
startTick: -69080,
|
|
369
|
-
endTick: -92103,
|
|
370
|
-
})
|
|
371
|
-
.withMigration({ type: 'uniswapV4', fee: 3000, tickSpacing: 60 })
|
|
372
|
-
.withUserAddress('0x...')
|
|
373
|
-
.withOpeningAuctionInitializer('0x...') // required on Base until deployed
|
|
374
|
-
.build();
|
|
375
|
-
|
|
376
|
-
const sim = await sdk.factory.simulateCreateOpeningAuction(params);
|
|
377
|
-
const created = await sim.execute();
|
|
378
|
-
|
|
379
|
-
const opening = await sdk.getOpeningAuction(created.openingAuctionHookAddress);
|
|
380
|
-
await opening.getPhase();
|
|
381
|
-
|
|
382
|
-
const lifecycle = await sdk.getOpeningAuctionLifecycle('0x...');
|
|
383
|
-
await lifecycle.getState(created.tokenAddress);
|
|
384
|
-
|
|
385
|
-
await sdk.factory.completeOpeningAuction({
|
|
386
|
-
asset: created.tokenAddress,
|
|
387
|
-
initializerAddress: '0x...',
|
|
388
|
-
});
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
`completeOpeningAuction` auto-settles and auto-mines `dopplerSalt` when omitted; because completion mining can race with block timestamps/state changes, the SDK may re-mine and retry a few times if needed. `simulateCompleteOpeningAuction` requires the opening auction to already be settled.
|
|
392
|
-
|
|
393
|
-
Position-manager bid wrappers are available, but bid sizing is still “advanced user”: `liquidity` is Uniswap V4 liquidity units. Use `simulatePlaceBid(...)` / `simulateWithdrawBid(...)` to inspect the `BalanceDelta` (token amounts in/out) and iterate. During the active auction, liquidity withdrawals must be full (no partial removals); use `withdrawFullBid(...)` to read the onchain liquidity and withdraw safely.
|
|
394
|
-
|
|
395
|
-
See [examples/opening-auction-lifecycle.ts](./examples/opening-auction-lifecycle.ts) for the full builder/factory/lifecycle flow, and [examples/opening-auction-bidding.ts](./examples/opening-auction-bidding.ts) for the bid-management pattern + positionId resolution.
|
|
396
|
-
|
|
397
327
|
### Multicurve Auction (V4 Multicurve Initializer)
|
|
398
328
|
|
|
399
329
|
Multicurve auctions use `DopplerHookInitializer` by default to seed liquidity across multiple curves in a single Uniswap V4 pool. The typed initializer modes are `dopplerHookInitializer`, `standard`, `scheduled`, `decay`, and `rehype`; use `withV4MulticurveInitializer(address)` when explicitly targeting the legacy standard initializer.
|
|
@@ -1401,12 +1331,9 @@ for (const id of SUPPORTED_CHAIN_IDS) {
|
|
|
1401
1331
|
}
|
|
1402
1332
|
```
|
|
1403
1333
|
|
|
1404
|
-
|
|
1405
|
-
definition included in `SupportedChain`.
|
|
1334
|
+
Available launch features depend on the contracts deployed on the selected network. Use `getAddresses(chainId)` to inspect its deployment configuration. For native V4 numeraires, use `zeroAddress` and the chain's native currency decimals rather than the decimals of an ERC-20 token with the same symbol.
|
|
1406
1335
|
|
|
1407
|
-
|
|
1408
|
-
addresses and support checks for it, but does not export a viem chain definition;
|
|
1409
|
-
use your application's chain/client setup when constructing clients.
|
|
1336
|
+
Arc uses native USDC with 18 decimals. Import the SDK's `arc` chain definition and provide an explicit RPC transport; Multicall3 is configured for fee previews. Arc launches with `numeraire: zeroAddress` must stay on Uniswap V4: all V3 static launches (including `LockableUniswapV3Initializer`) and both `uniswapV2` and `uniswapV2Split` migrations reject native USDC. Use a nonzero ERC-20 numeraire for those V2/V3 paths. For native dynamic auctions on Arc, use `dopplerHookMigrator`; locked native multicurve pools can use `noOp`.
|
|
1410
1337
|
|
|
1411
1338
|
## Advanced Usage
|
|
1412
1339
|
|
|
@@ -1763,49 +1690,40 @@ pnpm dev
|
|
|
1763
1690
|
|
|
1764
1691
|
The SDK includes comprehensive tests covering:
|
|
1765
1692
|
|
|
1766
|
-
- **Airlock Whitelisting**: Verifies that
|
|
1767
|
-
- **
|
|
1693
|
+
- **Airlock Whitelisting**: Verifies that configured modules are whitelisted on the selected networks
|
|
1694
|
+
- **Auction Workflows**: Tests dynamic and multicurve creation, quoting, and executed buy/sell round trips on local Anvil forks
|
|
1768
1695
|
- **Token Address Mining**: Tests for generating optimized token addresses
|
|
1769
1696
|
|
|
1770
|
-
|
|
1697
|
+
Configure Alchemy once, then run the whitelist audit:
|
|
1771
1698
|
|
|
1772
1699
|
```bash
|
|
1773
|
-
|
|
1700
|
+
export ALCHEMY_API_KEY=your_key_here
|
|
1774
1701
|
pnpm test:whitelisting
|
|
1775
1702
|
|
|
1776
|
-
# With Alchemy fallback (faster and more reliable)
|
|
1777
|
-
ALCHEMY_API_KEY=your_key_here pnpm test:whitelisting
|
|
1778
|
-
|
|
1779
1703
|
# Limit to specific whitelist-audit chains when needed
|
|
1780
|
-
TEST_CHAINS=mainnet,base,base-sepolia,arbitrum,bsc,monad-mainnet,robinhood pnpm test:whitelisting
|
|
1704
|
+
TEST_CHAINS=mainnet,base,base-sepolia,arbitrum,bsc,arc,monad-mainnet,robinhood pnpm test:whitelisting
|
|
1781
1705
|
```
|
|
1782
1706
|
|
|
1783
|
-
|
|
1707
|
+
Use `TEST_CHAINS` to select networks by their comma-separated names, or omit it to check all networks configured in the whitelisting suite.
|
|
1784
1708
|
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
1. Chain-specific RPC URL env var (`ETH_MAINNET_RPC_URL`, `ARBITRUM_RPC_URL`, `BSC_RPC_URL`, `BASE_RPC_URL`, `BASE_SEPOLIA_RPC_URL`)
|
|
1788
|
-
2. `ALCHEMY_API_KEY` fallback for supported Alchemy networks, including Monad Mainnet
|
|
1789
|
-
3. Public/default RPC URL
|
|
1709
|
+
The test harness selects the network endpoint from the chain ID; no per-chain RPC URL setup is needed.
|
|
1790
1710
|
|
|
1791
1711
|
To run fork tests (Anvil):
|
|
1792
1712
|
|
|
1793
1713
|
```bash
|
|
1794
1714
|
# all fork tests
|
|
1795
|
-
|
|
1715
|
+
pnpm test:fork
|
|
1796
1716
|
|
|
1797
1717
|
# chain-specific fork tests
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1718
|
+
TEST_CHAIN=base pnpm test:fork
|
|
1719
|
+
TEST_CHAIN=base-sepolia pnpm test:fork
|
|
1720
|
+
TEST_CHAIN=mainnet pnpm test:fork
|
|
1721
|
+
TEST_CHAIN=monad-mainnet pnpm test:fork
|
|
1722
|
+
TEST_CHAIN=robinhood pnpm test:fork
|
|
1723
|
+
TEST_CHAIN=arc pnpm test:fork
|
|
1801
1724
|
```
|
|
1802
1725
|
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
```bash
|
|
1806
|
-
ETH_MAINNET_RPC_URL=https://... TEST_CHAIN=mainnet pnpm test:fork
|
|
1807
|
-
ARBITRUM_RPC_URL=https://... TEST_CHAIN=arbitrum pnpm test:fork
|
|
1808
|
-
```
|
|
1726
|
+
The shared mainnet suite buys and partially sells through each newly created dynamic, Rehype, NoOp, and deployed scheduled pool. Arc uses native USDC; other networks use their configured wrapped native token. Checks verify receipts, acquired and sold tokens, and returned numeraire, with gas costs excluded from native sell proceeds. Fork tests do not broadcast to mainnet.
|
|
1809
1727
|
|
|
1810
1728
|
## Migration from Previous SDKs
|
|
1811
1729
|
|