@ubi.fun/sdk 0.1.0 → 0.2.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 +33 -0
- package/dist/abi/DividendVault.d.cts +670 -0
- package/dist/abi/DividendVault.d.ts +671 -0
- package/dist/abi/DividendVault.d.ts.map +1 -0
- package/dist/abi/HolderShareFeeCalculator.d.cts +287 -0
- package/dist/abi/HolderShareFeeCalculator.d.ts +288 -0
- package/dist/abi/HolderShareFeeCalculator.d.ts.map +1 -0
- package/dist/abi/IndexerSubscriber.d.cts +221 -0
- package/dist/abi/IndexerSubscriber.d.ts +222 -0
- package/dist/abi/IndexerSubscriber.d.ts.map +1 -0
- package/dist/abi/MemecoinDividends.d.cts +1021 -0
- package/dist/abi/MemecoinDividends.d.ts +1022 -0
- package/dist/abi/MemecoinDividends.d.ts.map +1 -0
- package/dist/abi/index.cjs +6447 -3585
- package/dist/abi/index.cjs.map +1 -1
- package/dist/abi/index.d.cts +4 -0
- package/dist/abi/index.d.ts +4 -0
- package/dist/abi/index.d.ts.map +1 -1
- package/dist/abi/index.js +6444 -3586
- package/dist/abi/index.js.map +1 -1
- package/dist/addresses/index.cjs +17 -0
- package/dist/addresses/index.cjs.map +1 -1
- package/dist/addresses/index.js +14 -1
- package/dist/addresses/index.js.map +1 -1
- package/dist/addresses.d.cts +25 -0
- package/dist/addresses.d.ts +25 -0
- package/dist/addresses.d.ts.map +1 -1
- package/dist/clients/DividendVaultClient.d.cts +32 -0
- package/dist/clients/DividendVaultClient.d.ts +33 -0
- package/dist/clients/DividendVaultClient.d.ts.map +1 -0
- package/dist/clients/FlaunchPositionManagerClient.d.cts +18 -0
- package/dist/clients/FlaunchPositionManagerClient.d.ts +18 -0
- package/dist/clients/FlaunchPositionManagerClient.d.ts.map +1 -1
- package/dist/clients/FlaunchZapClient.d.cts +41 -0
- package/dist/clients/FlaunchZapClient.d.ts +41 -0
- package/dist/clients/FlaunchZapClient.d.ts.map +1 -1
- package/dist/clients/IndexerSubscriberClient.d.cts +46 -0
- package/dist/clients/IndexerSubscriberClient.d.ts +47 -0
- package/dist/clients/IndexerSubscriberClient.d.ts.map +1 -0
- package/dist/clients/MemecoinDividendsClient.d.cts +23 -0
- package/dist/clients/MemecoinDividendsClient.d.ts +24 -0
- package/dist/clients/MemecoinDividendsClient.d.ts.map +1 -0
- package/dist/helpers/index.cjs.map +1 -1
- package/dist/helpers/index.js.map +1 -1
- package/dist/index.cjs +11710 -8366
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11687 -8368
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/sdk/FlaunchSDK.d.cts +47 -1
- package/dist/sdk/FlaunchSDK.d.ts +47 -1
- package/dist/sdk/FlaunchSDK.d.ts.map +1 -1
- package/dist/utils/creatorVaults.d.cts +64 -0
- package/dist/utils/creatorVaults.d.ts +65 -0
- package/dist/utils/creatorVaults.d.ts.map +1 -0
- package/dist/utils/index.cjs +64 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +55 -2
- package/dist/utils/index.js.map +1 -1
- package/package.json +2 -2
package/dist/addresses/index.cjs
CHANGED
|
@@ -39,6 +39,12 @@ const AddressFeeSplitManagerAddress = {
|
|
|
39
39
|
[ARC_MAINNET_CHAIN_ID]: "0xde10818344f5ab75ecfA772887cE5751D6Cb91C7",
|
|
40
40
|
[ARC_TESTNET_CHAIN_ID]: "0xA7d182B81aF7B40b6d09Da88A12a4f7ad770e162"
|
|
41
41
|
};
|
|
42
|
+
const DividendVaultAddress = {
|
|
43
|
+
[ARC_MAINNET_CHAIN_ID]: "0xA9E566b548D5D0203e4d00bc3dFdB4BC38883514"
|
|
44
|
+
};
|
|
45
|
+
const HolderShareFeeCalculatorAddress = {
|
|
46
|
+
[ARC_MAINNET_CHAIN_ID]: "0xe5737916951Fe20235Bddef5a65af5d18406f92E"
|
|
47
|
+
};
|
|
42
48
|
const FeeEscrowAddress = {
|
|
43
49
|
[ARC_MAINNET_CHAIN_ID]: "0x678f0D1C045e820Ec1d4806749f2629e1035550e",
|
|
44
50
|
[ARC_TESTNET_CHAIN_ID]: "0x59b3269aaf9db83bd3029c84d8b5226fa5702f78"
|
|
@@ -63,6 +69,13 @@ const QuoterAddress = {
|
|
|
63
69
|
[ARC_MAINNET_CHAIN_ID]: "0x4595D3CD7A6D98d83A719934e829db5076fF1d0d",
|
|
64
70
|
[ARC_TESTNET_CHAIN_ID]: "0xf517623f178Ba90e5b3299cb121D38F5A0733ac4"
|
|
65
71
|
};
|
|
72
|
+
const StateViewAddress = {
|
|
73
|
+
[ARC_MAINNET_CHAIN_ID]: "0xf3334192d15450cdd385c8b70e03f9a6bd9e673b"
|
|
74
|
+
};
|
|
75
|
+
const IndexerSubscriberAddress = {
|
|
76
|
+
[ARC_MAINNET_CHAIN_ID]: "0x2c68B21C9f8b899a662A71dd188C1c919D578a9F",
|
|
77
|
+
[ARC_TESTNET_CHAIN_ID]: "0xe6d8164d67c60ff860e1a0d90636f5f65b665be7"
|
|
78
|
+
};
|
|
66
79
|
const ApiBaseUrl = {
|
|
67
80
|
[ARC_MAINNET_CHAIN_ID]: "https://api.ubi.fun",
|
|
68
81
|
[ARC_TESTNET_CHAIN_ID]: "https://api-dev.ubi.fun"
|
|
@@ -73,16 +86,20 @@ exports.ARC_TESTNET_CHAIN_ID = ARC_TESTNET_CHAIN_ID;
|
|
|
73
86
|
exports.AddressFeeSplitManagerAddress = AddressFeeSplitManagerAddress;
|
|
74
87
|
exports.ApiBaseUrl = ApiBaseUrl;
|
|
75
88
|
exports.BidWallAddress = BidWallAddress;
|
|
89
|
+
exports.DividendVaultAddress = DividendVaultAddress;
|
|
76
90
|
exports.FairLaunchAddress = FairLaunchAddress;
|
|
77
91
|
exports.FeeEscrowAddress = FeeEscrowAddress;
|
|
78
92
|
exports.FlaunchAddress = FlaunchAddress;
|
|
79
93
|
exports.FlaunchPositionManagerAddress = FlaunchPositionManagerAddress;
|
|
80
94
|
exports.FlaunchZapAddress = FlaunchZapAddress;
|
|
95
|
+
exports.HolderShareFeeCalculatorAddress = HolderShareFeeCalculatorAddress;
|
|
96
|
+
exports.IndexerSubscriberAddress = IndexerSubscriberAddress;
|
|
81
97
|
exports.NativeTokenAddress = NativeTokenAddress;
|
|
82
98
|
exports.PoolManagerAddress = PoolManagerAddress;
|
|
83
99
|
exports.PoolSwapAddress = PoolSwapAddress;
|
|
84
100
|
exports.QuoterAddress = QuoterAddress;
|
|
85
101
|
exports.ReferralEscrowAddress = ReferralEscrowAddress;
|
|
102
|
+
exports.StateViewAddress = StateViewAddress;
|
|
86
103
|
exports.TreasuryManagerFactoryAddress = TreasuryManagerFactoryAddress;
|
|
87
104
|
exports.USDC_ADDRESS = USDC_ADDRESS;
|
|
88
105
|
exports.UniversalRewardsDistributorAddress = UniversalRewardsDistributorAddress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/addresses.ts"],"sourcesContent":["import { Addresses } from \"./types\";\n\n/**\n * ubi.fun deployments on Arc (Circle).\n *\n * Source of truth: deployments/arc-mainnet-5042.json and\n * deployments/arc-testnet-5042002.json in the contracts repo, mirrored by the\n * committed frontend registry. The cash / native asset on Arc is native USDC\n * (6 decimals through its ERC20 interface) at\n * 0x3600000000000000000000000000000000000000: the position manager's\n * \"nativeToken\" slot IS this USDC, and every pool pairs a coin against it.\n * There is no flETH, no WETH wrapping, and no unwrap step on this chain.\n */\nexport const ARC_MAINNET_CHAIN_ID = 5042;\nexport const ARC_TESTNET_CHAIN_ID = 5042002;\n\n/** Arc native USDC (ERC20 interface, 6 decimals). The cash side of every pool. */\nexport const USDC_ADDRESS =\n \"0x3600000000000000000000000000000000000000\" as const;\n\n/**\n * The pool \"native token\": Arc native USDC on both networks. Kept as an\n * Addresses map so client code stays chain-keyed like every other contract.\n */\nexport const NativeTokenAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: USDC_ADDRESS,\n [ARC_TESTNET_CHAIN_ID]: USDC_ADDRESS,\n};\n\nexport const FlaunchZapAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xe07F7cA66EC795592385018Dd998F0B50b8A2834\",\n [ARC_TESTNET_CHAIN_ID]: \"0x3fd667aaa89519772bb44e984de408bfcd40e285\",\n};\n\n// SDK \"FlaunchPositionManager\" maps to our deployment \"PositionManager\".\nexport const FlaunchPositionManagerAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xC780c0f4aAc690908854D351b8bFda2812daeFDc\",\n [ARC_TESTNET_CHAIN_ID]: \"0x88af0b76752ff31aa351cea2cc2e43a1b7c32fdc\",\n};\n\nexport const FlaunchAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x93E5A7565008db9688BA5211Fa552d8b108B9c75\",\n [ARC_TESTNET_CHAIN_ID]: \"0x55a0e1a458f1c13023dbd6b204e2a439c3b44663\",\n};\n\nexport const FairLaunchAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xdCDADa707264d9e2B0E8c2feC467860C97434Bd4\",\n [ARC_TESTNET_CHAIN_ID]: \"0xd2ea5591fe0b5820b6de33afbc3b468d070038ea\",\n};\n\n// SDK \"BidWall\" maps to our deployment \"BurningBidWall\" (a modified BidWall).\nexport const BidWallAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xC5DD30802fefab789Cd9b1e835Bd7301a8D23F8A\",\n [ARC_TESTNET_CHAIN_ID]: \"0x04f947e5fc0ac42836f880d45705af7483a2c4c0\",\n};\n\n/** Referrer-aware swap router: the supported way to trade ubi.fun pools. */\nexport const PoolSwapAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x3A61B6E86fde5Fc657a48819837F346C7E2Fffa7\",\n [ARC_TESTNET_CHAIN_ID]: \"0x396d41eb4d110d64491d01cd186548fdc82b1b4a\",\n};\n\nexport const TreasuryManagerFactoryAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xE25C132F379DB49C463328eF427E28DBCbD3a2F0\",\n [ARC_TESTNET_CHAIN_ID]: \"0x093c10b780f7cf8fca9aa7dbc83a64cddf55215f\",\n};\n\n// The approved AddressFeeSplitManager IMPLEMENTATION (factory deploys clones).\nexport const AddressFeeSplitManagerAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xde10818344f5ab75ecfA772887cE5751D6Cb91C7\",\n [ARC_TESTNET_CHAIN_ID]: \"0xA7d182B81aF7B40b6d09Da88A12a4f7ad770e162\",\n};\n\n/** Creator revenue escrow: balances accrue here, claimed as USDC (unwrap=false). */\nexport const FeeEscrowAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x678f0D1C045e820Ec1d4806749f2629e1035550e\",\n [ARC_TESTNET_CHAIN_ID]: \"0x59b3269aaf9db83bd3029c84d8b5226fa5702f78\",\n};\n\n/** Referrer rewards escrow: 5% of every swap fee routed with your address. */\nexport const ReferralEscrowAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xf25B9ceAba005CcCb0cefC4e323e6e519F111eB3\",\n [ARC_TESTNET_CHAIN_ID]: \"0x51b6a4759f9c9a681349c857f6fd912cdfeb8fef\",\n};\n\n/** X-handle earnings registry: per-handle CREATE2 escrows + attested claims. */\nexport const XHandleClaimsAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xfC38298590893c39E46D319aEd9EC3bf6CB17A3E\",\n [ARC_TESTNET_CHAIN_ID]: \"0x6fE2b9e1Da493E4584e742C03e1926a4CD8AC2A1\",\n};\n\n/**\n * Morpho UniversalRewardsDistributor paying the daily USDC holder pool\n * (24% of every swap fee). Claims are Merkle-proofed cumulative amounts.\n */\nexport const UniversalRewardsDistributorAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x66003091e723778d7D3285BB6c24ff3F0Ddcc7F7\",\n [ARC_TESTNET_CHAIN_ID]: \"0x7a8e9dA46db2be8436c4404476b40F07a31A6d95\",\n};\n\n/** Uniswap v4 PoolManager (canonical deployment on mainnet, ours on testnet). */\nexport const PoolManagerAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x8366a39CC670B4001A1121B8F6A443A643e40951\",\n [ARC_TESTNET_CHAIN_ID]: \"0x5fb24c800133a0930280788c5eb3468764154309\",\n};\n\nexport const QuoterAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x4595D3CD7A6D98d83A719934e829db5076fF1d0d\",\n [ARC_TESTNET_CHAIN_ID]: \"0xf517623f178Ba90e5b3299cb121D38F5A0733ac4\",\n};\n\n/** Base URL of the ubi.fun read/upload API serving each network. */\nexport const ApiBaseUrl: { [chainId: number]: string } = {\n [ARC_MAINNET_CHAIN_ID]: \"https://api.ubi.fun\",\n [ARC_TESTNET_CHAIN_ID]: \"https://api-dev.ubi.fun\",\n};\n"],"names":[],"mappings":";;AAaO,MAAM,oBAAA,GAAuB;AAC7B,MAAM,oBAAA,GAAuB;AAG7B,MAAM,YAAA,GACX;AAMK,MAAM,kBAAA,GAAgC;AAAA,EAC3C,CAAC,oBAAoB,GAAG,YAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,iBAAA,GAA+B;AAAA,EAC1C,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,6BAAA,GAA2C;AAAA,EACtD,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,cAAA,GAA4B;AAAA,EACvC,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,iBAAA,GA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AoB,GAAG;AAC1B
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/addresses.ts"],"sourcesContent":["import { Addresses } from \"./types\";\n\n/**\n * ubi.fun deployments on Arc (Circle).\n *\n * Source of truth: deployments/arc-mainnet-5042.json and\n * deployments/arc-testnet-5042002.json in the contracts repo, mirrored by the\n * committed frontend registry. The cash / native asset on Arc is native USDC\n * (6 decimals through its ERC20 interface) at\n * 0x3600000000000000000000000000000000000000: the position manager's\n * \"nativeToken\" slot IS this USDC, and every pool pairs a coin against it.\n * There is no flETH, no WETH wrapping, and no unwrap step on this chain.\n */\nexport const ARC_MAINNET_CHAIN_ID = 5042;\nexport const ARC_TESTNET_CHAIN_ID = 5042002;\n\n/** Arc native USDC (ERC20 interface, 6 decimals). The cash side of every pool. */\nexport const USDC_ADDRESS =\n \"0x3600000000000000000000000000000000000000\" as const;\n\n/**\n * The pool \"native token\": Arc native USDC on both networks. Kept as an\n * Addresses map so client code stays chain-keyed like every other contract.\n */\nexport const NativeTokenAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: USDC_ADDRESS,\n [ARC_TESTNET_CHAIN_ID]: USDC_ADDRESS,\n};\n\nexport const FlaunchZapAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xe07F7cA66EC795592385018Dd998F0B50b8A2834\",\n [ARC_TESTNET_CHAIN_ID]: \"0x3fd667aaa89519772bb44e984de408bfcd40e285\",\n};\n\n// SDK \"FlaunchPositionManager\" maps to our deployment \"PositionManager\".\nexport const FlaunchPositionManagerAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xC780c0f4aAc690908854D351b8bFda2812daeFDc\",\n [ARC_TESTNET_CHAIN_ID]: \"0x88af0b76752ff31aa351cea2cc2e43a1b7c32fdc\",\n};\n\nexport const FlaunchAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x93E5A7565008db9688BA5211Fa552d8b108B9c75\",\n [ARC_TESTNET_CHAIN_ID]: \"0x55a0e1a458f1c13023dbd6b204e2a439c3b44663\",\n};\n\nexport const FairLaunchAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xdCDADa707264d9e2B0E8c2feC467860C97434Bd4\",\n [ARC_TESTNET_CHAIN_ID]: \"0xd2ea5591fe0b5820b6de33afbc3b468d070038ea\",\n};\n\n// SDK \"BidWall\" maps to our deployment \"BurningBidWall\" (a modified BidWall).\nexport const BidWallAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xC5DD30802fefab789Cd9b1e835Bd7301a8D23F8A\",\n [ARC_TESTNET_CHAIN_ID]: \"0x04f947e5fc0ac42836f880d45705af7483a2c4c0\",\n};\n\n/** Referrer-aware swap router: the supported way to trade ubi.fun pools. */\nexport const PoolSwapAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x3A61B6E86fde5Fc657a48819837F346C7E2Fffa7\",\n [ARC_TESTNET_CHAIN_ID]: \"0x396d41eb4d110d64491d01cd186548fdc82b1b4a\",\n};\n\nexport const TreasuryManagerFactoryAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xE25C132F379DB49C463328eF427E28DBCbD3a2F0\",\n [ARC_TESTNET_CHAIN_ID]: \"0x093c10b780f7cf8fca9aa7dbc83a64cddf55215f\",\n};\n\n// The approved AddressFeeSplitManager IMPLEMENTATION (factory deploys clones).\nexport const AddressFeeSplitManagerAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xde10818344f5ab75ecfA772887cE5751D6Cb91C7\",\n [ARC_TESTNET_CHAIN_ID]: \"0xA7d182B81aF7B40b6d09Da88A12a4f7ad770e162\",\n};\n\n/**\n * Creator vaults (docs/CREATOR-VAULTS.md in the contracts repo): the approved DividendVault\n * IMPLEMENTATION every new launch clones, and the HolderShareFeeCalculator. Empty until the\n * contracts are deployed; once the calculator is the PositionManager's fee calculator, every\n * launch must attach a vault (`flaunchWithVault`).\n */\nexport const DividendVaultAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xA9E566b548D5D0203e4d00bc3dFdB4BC38883514\",\n};\nexport const HolderShareFeeCalculatorAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xe5737916951Fe20235Bddef5a65af5d18406f92E\",\n};\n\n/** Creator revenue escrow: balances accrue here, claimed as USDC (unwrap=false). */\nexport const FeeEscrowAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x678f0D1C045e820Ec1d4806749f2629e1035550e\",\n [ARC_TESTNET_CHAIN_ID]: \"0x59b3269aaf9db83bd3029c84d8b5226fa5702f78\",\n};\n\n/** Referrer rewards escrow: 5% of every swap fee routed with your address. */\nexport const ReferralEscrowAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xf25B9ceAba005CcCb0cefC4e323e6e519F111eB3\",\n [ARC_TESTNET_CHAIN_ID]: \"0x51b6a4759f9c9a681349c857f6fd912cdfeb8fef\",\n};\n\n/** X-handle earnings registry: per-handle CREATE2 escrows + attested claims. */\nexport const XHandleClaimsAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xfC38298590893c39E46D319aEd9EC3bf6CB17A3E\",\n [ARC_TESTNET_CHAIN_ID]: \"0x6fE2b9e1Da493E4584e742C03e1926a4CD8AC2A1\",\n};\n\n/**\n * Morpho UniversalRewardsDistributor paying the daily USDC holder pool\n * (24% of every swap fee). Claims are Merkle-proofed cumulative amounts.\n */\nexport const UniversalRewardsDistributorAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x66003091e723778d7D3285BB6c24ff3F0Ddcc7F7\",\n [ARC_TESTNET_CHAIN_ID]: \"0x7a8e9dA46db2be8436c4404476b40F07a31A6d95\",\n};\n\n/** Uniswap v4 PoolManager (canonical deployment on mainnet, ours on testnet). */\nexport const PoolManagerAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x8366a39CC670B4001A1121B8F6A443A643e40951\",\n [ARC_TESTNET_CHAIN_ID]: \"0x5fb24c800133a0930280788c5eb3468764154309\",\n};\n\nexport const QuoterAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x4595D3CD7A6D98d83A719934e829db5076fF1d0d\",\n [ARC_TESTNET_CHAIN_ID]: \"0xf517623f178Ba90e5b3299cb121D38F5A0733ac4\",\n};\n\n/**\n * Uniswap v4 StateView (canonical periphery view over PoolManager storage).\n *\n * MAINNET ONLY. Arc testnet runs our own PoolManager instance, and no StateView\n * was deployed against it, so there is no testnet entry. The SDK does not\n * depend on StateView on either network: `ReadPoolManager` reads slot0,\n * liquidity, positions and tick data straight from PoolManager storage with\n * `extsload`, using the same slot derivations as Uniswap's StateLibrary. Use\n * that path if you need one code path across both chains.\n */\nexport const StateViewAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xf3334192d15450cdd385c8b70e03f9a6bd9e673b\",\n};\n\n/**\n * IndexerSubscriber: on-chain reverse index PoolId -> (flaunch, memecoin,\n * memecoinTreasury, tokenId). Attached to the PositionManager's Notifier, so it\n * is populated at pool initialisation. See contracts/IndexerSubscriber.sol.\n */\nexport const IndexerSubscriberAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x2c68B21C9f8b899a662A71dd188C1c919D578a9F\",\n [ARC_TESTNET_CHAIN_ID]: \"0xe6d8164d67c60ff860e1a0d90636f5f65b665be7\",\n};\n\n/** Base URL of the ubi.fun read/upload API serving each network. */\nexport const ApiBaseUrl: { [chainId: number]: string } = {\n [ARC_MAINNET_CHAIN_ID]: \"https://api.ubi.fun\",\n [ARC_TESTNET_CHAIN_ID]: \"https://api-dev.ubi.fun\",\n};\n"],"names":[],"mappings":";;AAaO,MAAM,oBAAA,GAAuB;AAC7B,MAAM,oBAAA,GAAuB;AAG7B,MAAM,YAAA,GACX;AAMK,MAAM,kBAAA,GAAgC;AAAA,EAC3C,CAAC,oBAAoB,GAAG,YAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,iBAAA,GAA+B;AA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AA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAMO,MAAM,kCAAA,GAAgD;AAAA,EAC3D,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,kBAAA,GAAgC;AAAA,EAC3C,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,aAAA,GAA2B;AAAA,EACtC,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAYO,MAAM,gBAAA,GAA8B;AAAA,EACzC,CAAC,oBAAoB,GAAG;AAC1B;AAOO,MAAM,wBAAA,GAAsC;AAAA,EACjD,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,UAAA,GAA4C;AAAA,EACvD,CAAC,oBAAoB,GAAG,qBAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/addresses/index.js
CHANGED
|
@@ -37,6 +37,12 @@ const AddressFeeSplitManagerAddress = {
|
|
|
37
37
|
[ARC_MAINNET_CHAIN_ID]: "0xde10818344f5ab75ecfA772887cE5751D6Cb91C7",
|
|
38
38
|
[ARC_TESTNET_CHAIN_ID]: "0xA7d182B81aF7B40b6d09Da88A12a4f7ad770e162"
|
|
39
39
|
};
|
|
40
|
+
const DividendVaultAddress = {
|
|
41
|
+
[ARC_MAINNET_CHAIN_ID]: "0xA9E566b548D5D0203e4d00bc3dFdB4BC38883514"
|
|
42
|
+
};
|
|
43
|
+
const HolderShareFeeCalculatorAddress = {
|
|
44
|
+
[ARC_MAINNET_CHAIN_ID]: "0xe5737916951Fe20235Bddef5a65af5d18406f92E"
|
|
45
|
+
};
|
|
40
46
|
const FeeEscrowAddress = {
|
|
41
47
|
[ARC_MAINNET_CHAIN_ID]: "0x678f0D1C045e820Ec1d4806749f2629e1035550e",
|
|
42
48
|
[ARC_TESTNET_CHAIN_ID]: "0x59b3269aaf9db83bd3029c84d8b5226fa5702f78"
|
|
@@ -61,10 +67,17 @@ const QuoterAddress = {
|
|
|
61
67
|
[ARC_MAINNET_CHAIN_ID]: "0x4595D3CD7A6D98d83A719934e829db5076fF1d0d",
|
|
62
68
|
[ARC_TESTNET_CHAIN_ID]: "0xf517623f178Ba90e5b3299cb121D38F5A0733ac4"
|
|
63
69
|
};
|
|
70
|
+
const StateViewAddress = {
|
|
71
|
+
[ARC_MAINNET_CHAIN_ID]: "0xf3334192d15450cdd385c8b70e03f9a6bd9e673b"
|
|
72
|
+
};
|
|
73
|
+
const IndexerSubscriberAddress = {
|
|
74
|
+
[ARC_MAINNET_CHAIN_ID]: "0x2c68B21C9f8b899a662A71dd188C1c919D578a9F",
|
|
75
|
+
[ARC_TESTNET_CHAIN_ID]: "0xe6d8164d67c60ff860e1a0d90636f5f65b665be7"
|
|
76
|
+
};
|
|
64
77
|
const ApiBaseUrl = {
|
|
65
78
|
[ARC_MAINNET_CHAIN_ID]: "https://api.ubi.fun",
|
|
66
79
|
[ARC_TESTNET_CHAIN_ID]: "https://api-dev.ubi.fun"
|
|
67
80
|
};
|
|
68
81
|
|
|
69
|
-
export { ARC_MAINNET_CHAIN_ID, ARC_TESTNET_CHAIN_ID, AddressFeeSplitManagerAddress, ApiBaseUrl, BidWallAddress, FairLaunchAddress, FeeEscrowAddress, FlaunchAddress, FlaunchPositionManagerAddress, FlaunchZapAddress, NativeTokenAddress, PoolManagerAddress, PoolSwapAddress, QuoterAddress, ReferralEscrowAddress, TreasuryManagerFactoryAddress, USDC_ADDRESS, UniversalRewardsDistributorAddress, XHandleClaimsAddress };
|
|
82
|
+
export { ARC_MAINNET_CHAIN_ID, ARC_TESTNET_CHAIN_ID, AddressFeeSplitManagerAddress, ApiBaseUrl, BidWallAddress, DividendVaultAddress, FairLaunchAddress, FeeEscrowAddress, FlaunchAddress, FlaunchPositionManagerAddress, FlaunchZapAddress, HolderShareFeeCalculatorAddress, IndexerSubscriberAddress, NativeTokenAddress, PoolManagerAddress, PoolSwapAddress, QuoterAddress, ReferralEscrowAddress, StateViewAddress, TreasuryManagerFactoryAddress, USDC_ADDRESS, UniversalRewardsDistributorAddress, XHandleClaimsAddress };
|
|
70
83
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/addresses.ts"],"sourcesContent":["import { Addresses } from \"./types\";\n\n/**\n * ubi.fun deployments on Arc (Circle).\n *\n * Source of truth: deployments/arc-mainnet-5042.json and\n * deployments/arc-testnet-5042002.json in the contracts repo, mirrored by the\n * committed frontend registry. The cash / native asset on Arc is native USDC\n * (6 decimals through its ERC20 interface) at\n * 0x3600000000000000000000000000000000000000: the position manager's\n * \"nativeToken\" slot IS this USDC, and every pool pairs a coin against it.\n * There is no flETH, no WETH wrapping, and no unwrap step on this chain.\n */\nexport const ARC_MAINNET_CHAIN_ID = 5042;\nexport const ARC_TESTNET_CHAIN_ID = 5042002;\n\n/** Arc native USDC (ERC20 interface, 6 decimals). The cash side of every pool. */\nexport const USDC_ADDRESS =\n \"0x3600000000000000000000000000000000000000\" as const;\n\n/**\n * The pool \"native token\": Arc native USDC on both networks. Kept as an\n * Addresses map so client code stays chain-keyed like every other contract.\n */\nexport const NativeTokenAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: USDC_ADDRESS,\n [ARC_TESTNET_CHAIN_ID]: USDC_ADDRESS,\n};\n\nexport const FlaunchZapAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xe07F7cA66EC795592385018Dd998F0B50b8A2834\",\n [ARC_TESTNET_CHAIN_ID]: \"0x3fd667aaa89519772bb44e984de408bfcd40e285\",\n};\n\n// SDK \"FlaunchPositionManager\" maps to our deployment \"PositionManager\".\nexport const FlaunchPositionManagerAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xC780c0f4aAc690908854D351b8bFda2812daeFDc\",\n [ARC_TESTNET_CHAIN_ID]: \"0x88af0b76752ff31aa351cea2cc2e43a1b7c32fdc\",\n};\n\nexport const FlaunchAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x93E5A7565008db9688BA5211Fa552d8b108B9c75\",\n [ARC_TESTNET_CHAIN_ID]: \"0x55a0e1a458f1c13023dbd6b204e2a439c3b44663\",\n};\n\nexport const FairLaunchAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xdCDADa707264d9e2B0E8c2feC467860C97434Bd4\",\n [ARC_TESTNET_CHAIN_ID]: \"0xd2ea5591fe0b5820b6de33afbc3b468d070038ea\",\n};\n\n// SDK \"BidWall\" maps to our deployment \"BurningBidWall\" (a modified BidWall).\nexport const BidWallAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xC5DD30802fefab789Cd9b1e835Bd7301a8D23F8A\",\n [ARC_TESTNET_CHAIN_ID]: \"0x04f947e5fc0ac42836f880d45705af7483a2c4c0\",\n};\n\n/** Referrer-aware swap router: the supported way to trade ubi.fun pools. */\nexport const PoolSwapAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x3A61B6E86fde5Fc657a48819837F346C7E2Fffa7\",\n [ARC_TESTNET_CHAIN_ID]: \"0x396d41eb4d110d64491d01cd186548fdc82b1b4a\",\n};\n\nexport const TreasuryManagerFactoryAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xE25C132F379DB49C463328eF427E28DBCbD3a2F0\",\n [ARC_TESTNET_CHAIN_ID]: \"0x093c10b780f7cf8fca9aa7dbc83a64cddf55215f\",\n};\n\n// The approved AddressFeeSplitManager IMPLEMENTATION (factory deploys clones).\nexport const AddressFeeSplitManagerAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xde10818344f5ab75ecfA772887cE5751D6Cb91C7\",\n [ARC_TESTNET_CHAIN_ID]: \"0xA7d182B81aF7B40b6d09Da88A12a4f7ad770e162\",\n};\n\n/** Creator revenue escrow: balances accrue here, claimed as USDC (unwrap=false). */\nexport const FeeEscrowAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x678f0D1C045e820Ec1d4806749f2629e1035550e\",\n [ARC_TESTNET_CHAIN_ID]: \"0x59b3269aaf9db83bd3029c84d8b5226fa5702f78\",\n};\n\n/** Referrer rewards escrow: 5% of every swap fee routed with your address. */\nexport const ReferralEscrowAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xf25B9ceAba005CcCb0cefC4e323e6e519F111eB3\",\n [ARC_TESTNET_CHAIN_ID]: \"0x51b6a4759f9c9a681349c857f6fd912cdfeb8fef\",\n};\n\n/** X-handle earnings registry: per-handle CREATE2 escrows + attested claims. */\nexport const XHandleClaimsAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xfC38298590893c39E46D319aEd9EC3bf6CB17A3E\",\n [ARC_TESTNET_CHAIN_ID]: \"0x6fE2b9e1Da493E4584e742C03e1926a4CD8AC2A1\",\n};\n\n/**\n * Morpho UniversalRewardsDistributor paying the daily USDC holder pool\n * (24% of every swap fee). Claims are Merkle-proofed cumulative amounts.\n */\nexport const UniversalRewardsDistributorAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x66003091e723778d7D3285BB6c24ff3F0Ddcc7F7\",\n [ARC_TESTNET_CHAIN_ID]: \"0x7a8e9dA46db2be8436c4404476b40F07a31A6d95\",\n};\n\n/** Uniswap v4 PoolManager (canonical deployment on mainnet, ours on testnet). */\nexport const PoolManagerAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x8366a39CC670B4001A1121B8F6A443A643e40951\",\n [ARC_TESTNET_CHAIN_ID]: \"0x5fb24c800133a0930280788c5eb3468764154309\",\n};\n\nexport const QuoterAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x4595D3CD7A6D98d83A719934e829db5076fF1d0d\",\n [ARC_TESTNET_CHAIN_ID]: \"0xf517623f178Ba90e5b3299cb121D38F5A0733ac4\",\n};\n\n/** Base URL of the ubi.fun read/upload API serving each network. */\nexport const ApiBaseUrl: { [chainId: number]: string } = {\n [ARC_MAINNET_CHAIN_ID]: \"https://api.ubi.fun\",\n [ARC_TESTNET_CHAIN_ID]: \"https://api-dev.ubi.fun\",\n};\n"],"names":[],"mappings":"AAaO,MAAM,oBAAA,GAAuB;AAC7B,MAAM,oBAAA,GAAuB;AAG7B,MAAM,YAAA,GACX;AAMK,MAAM,kBAAA,GAAgC;AAAA,EAC3C,CAAC,oBAAoB,GAAG,YAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,iBAAA,GAA+B;AAAA,EAC1C,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,6BAAA,GAA2C;AAAA,EACtD,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,cAAA,GAA4B;AAAA,EACvC,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,iBAAA,GAA+B;AAAA,EAC1C,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,cAAA,GAA4B;AAAA,EACvC,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,eAAA,GAA6B;AAAA,EACxC,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,6BAAA,GAA2C;AAAA,EACtD,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,6BAAA,GAA2C;AAAA,EACtD,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,gBAAA,GAA8B;AAAA,EACzC,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,qBAAA,GAAmC;AAAA,EAC9C,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,oBAAA,GAAkC;AAAA,EAC7C,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAMO,MAAM,kCAAA,GAAgD;AAAA,EAC3D,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,kBAAA,GAAgC;AAAA,EAC3C,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,aAAA,GAA2B;AAAA,EACtC,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,UAAA,GAA4C;AAAA,EACvD,CAAC,oBAAoB,GAAG,qBAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/addresses.ts"],"sourcesContent":["import { Addresses } from \"./types\";\n\n/**\n * ubi.fun deployments on Arc (Circle).\n *\n * Source of truth: deployments/arc-mainnet-5042.json and\n * deployments/arc-testnet-5042002.json in the contracts repo, mirrored by the\n * committed frontend registry. The cash / native asset on Arc is native USDC\n * (6 decimals through its ERC20 interface) at\n * 0x3600000000000000000000000000000000000000: the position manager's\n * \"nativeToken\" slot IS this USDC, and every pool pairs a coin against it.\n * There is no flETH, no WETH wrapping, and no unwrap step on this chain.\n */\nexport const ARC_MAINNET_CHAIN_ID = 5042;\nexport const ARC_TESTNET_CHAIN_ID = 5042002;\n\n/** Arc native USDC (ERC20 interface, 6 decimals). The cash side of every pool. */\nexport const USDC_ADDRESS =\n \"0x3600000000000000000000000000000000000000\" as const;\n\n/**\n * The pool \"native token\": Arc native USDC on both networks. Kept as an\n * Addresses map so client code stays chain-keyed like every other contract.\n */\nexport const NativeTokenAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: USDC_ADDRESS,\n [ARC_TESTNET_CHAIN_ID]: USDC_ADDRESS,\n};\n\nexport const FlaunchZapAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xe07F7cA66EC795592385018Dd998F0B50b8A2834\",\n [ARC_TESTNET_CHAIN_ID]: \"0x3fd667aaa89519772bb44e984de408bfcd40e285\",\n};\n\n// SDK \"FlaunchPositionManager\" maps to our deployment \"PositionManager\".\nexport const FlaunchPositionManagerAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xC780c0f4aAc690908854D351b8bFda2812daeFDc\",\n [ARC_TESTNET_CHAIN_ID]: \"0x88af0b76752ff31aa351cea2cc2e43a1b7c32fdc\",\n};\n\nexport const FlaunchAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x93E5A7565008db9688BA5211Fa552d8b108B9c75\",\n [ARC_TESTNET_CHAIN_ID]: \"0x55a0e1a458f1c13023dbd6b204e2a439c3b44663\",\n};\n\nexport const FairLaunchAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xdCDADa707264d9e2B0E8c2feC467860C97434Bd4\",\n [ARC_TESTNET_CHAIN_ID]: \"0xd2ea5591fe0b5820b6de33afbc3b468d070038ea\",\n};\n\n// SDK \"BidWall\" maps to our deployment \"BurningBidWall\" (a modified BidWall).\nexport const BidWallAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xC5DD30802fefab789Cd9b1e835Bd7301a8D23F8A\",\n [ARC_TESTNET_CHAIN_ID]: \"0x04f947e5fc0ac42836f880d45705af7483a2c4c0\",\n};\n\n/** Referrer-aware swap router: the supported way to trade ubi.fun pools. */\nexport const PoolSwapAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x3A61B6E86fde5Fc657a48819837F346C7E2Fffa7\",\n [ARC_TESTNET_CHAIN_ID]: \"0x396d41eb4d110d64491d01cd186548fdc82b1b4a\",\n};\n\nexport const TreasuryManagerFactoryAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xE25C132F379DB49C463328eF427E28DBCbD3a2F0\",\n [ARC_TESTNET_CHAIN_ID]: \"0x093c10b780f7cf8fca9aa7dbc83a64cddf55215f\",\n};\n\n// The approved AddressFeeSplitManager IMPLEMENTATION (factory deploys clones).\nexport const AddressFeeSplitManagerAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xde10818344f5ab75ecfA772887cE5751D6Cb91C7\",\n [ARC_TESTNET_CHAIN_ID]: \"0xA7d182B81aF7B40b6d09Da88A12a4f7ad770e162\",\n};\n\n/**\n * Creator vaults (docs/CREATOR-VAULTS.md in the contracts repo): the approved DividendVault\n * IMPLEMENTATION every new launch clones, and the HolderShareFeeCalculator. Empty until the\n * contracts are deployed; once the calculator is the PositionManager's fee calculator, every\n * launch must attach a vault (`flaunchWithVault`).\n */\nexport const DividendVaultAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xA9E566b548D5D0203e4d00bc3dFdB4BC38883514\",\n};\nexport const HolderShareFeeCalculatorAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xe5737916951Fe20235Bddef5a65af5d18406f92E\",\n};\n\n/** Creator revenue escrow: balances accrue here, claimed as USDC (unwrap=false). */\nexport const FeeEscrowAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x678f0D1C045e820Ec1d4806749f2629e1035550e\",\n [ARC_TESTNET_CHAIN_ID]: \"0x59b3269aaf9db83bd3029c84d8b5226fa5702f78\",\n};\n\n/** Referrer rewards escrow: 5% of every swap fee routed with your address. */\nexport const ReferralEscrowAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xf25B9ceAba005CcCb0cefC4e323e6e519F111eB3\",\n [ARC_TESTNET_CHAIN_ID]: \"0x51b6a4759f9c9a681349c857f6fd912cdfeb8fef\",\n};\n\n/** X-handle earnings registry: per-handle CREATE2 escrows + attested claims. */\nexport const XHandleClaimsAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xfC38298590893c39E46D319aEd9EC3bf6CB17A3E\",\n [ARC_TESTNET_CHAIN_ID]: \"0x6fE2b9e1Da493E4584e742C03e1926a4CD8AC2A1\",\n};\n\n/**\n * Morpho UniversalRewardsDistributor paying the daily USDC holder pool\n * (24% of every swap fee). Claims are Merkle-proofed cumulative amounts.\n */\nexport const UniversalRewardsDistributorAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x66003091e723778d7D3285BB6c24ff3F0Ddcc7F7\",\n [ARC_TESTNET_CHAIN_ID]: \"0x7a8e9dA46db2be8436c4404476b40F07a31A6d95\",\n};\n\n/** Uniswap v4 PoolManager (canonical deployment on mainnet, ours on testnet). */\nexport const PoolManagerAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x8366a39CC670B4001A1121B8F6A443A643e40951\",\n [ARC_TESTNET_CHAIN_ID]: \"0x5fb24c800133a0930280788c5eb3468764154309\",\n};\n\nexport const QuoterAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x4595D3CD7A6D98d83A719934e829db5076fF1d0d\",\n [ARC_TESTNET_CHAIN_ID]: \"0xf517623f178Ba90e5b3299cb121D38F5A0733ac4\",\n};\n\n/**\n * Uniswap v4 StateView (canonical periphery view over PoolManager storage).\n *\n * MAINNET ONLY. Arc testnet runs our own PoolManager instance, and no StateView\n * was deployed against it, so there is no testnet entry. The SDK does not\n * depend on StateView on either network: `ReadPoolManager` reads slot0,\n * liquidity, positions and tick data straight from PoolManager storage with\n * `extsload`, using the same slot derivations as Uniswap's StateLibrary. Use\n * that path if you need one code path across both chains.\n */\nexport const StateViewAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0xf3334192d15450cdd385c8b70e03f9a6bd9e673b\",\n};\n\n/**\n * IndexerSubscriber: on-chain reverse index PoolId -> (flaunch, memecoin,\n * memecoinTreasury, tokenId). Attached to the PositionManager's Notifier, so it\n * is populated at pool initialisation. See contracts/IndexerSubscriber.sol.\n */\nexport const IndexerSubscriberAddress: Addresses = {\n [ARC_MAINNET_CHAIN_ID]: \"0x2c68B21C9f8b899a662A71dd188C1c919D578a9F\",\n [ARC_TESTNET_CHAIN_ID]: \"0xe6d8164d67c60ff860e1a0d90636f5f65b665be7\",\n};\n\n/** Base URL of the ubi.fun read/upload API serving each network. */\nexport const ApiBaseUrl: { [chainId: number]: string } = {\n [ARC_MAINNET_CHAIN_ID]: \"https://api.ubi.fun\",\n [ARC_TESTNET_CHAIN_ID]: \"https://api-dev.ubi.fun\",\n};\n"],"names":[],"mappings":"AAaO,MAAM,oBAAA,GAAuB;AAC7B,MAAM,oBAAA,GAAuB;AAG7B,MAAM,YAAA,GACX;AAMK,MAAM,kBAAA,GAAgC;AAAA,EAC3C,CAAC,oBAAoB,GAAG,YAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,iBAAA,GAA+B;AAAA,EAC1C,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,6BAAA,GAA2C;AAAA,EACtD,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,cAAA,GAA4B;AAAA,EACvC,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAEO,MAAM,iBAAA,GAA+B;AAAA,EAC1C,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,cAAA,GAA4B;AAAA,EACvC,CAAC,oBAAoB,GAAG,4CAAA;AAAA,EACxB,CAAC,o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,4CAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;AAGO,MAAM,UAAA,GAA4C;AAAA,EACvD,CAAC,oBAAoB,GAAG,qBAAA;AAAA,EACxB,CAAC,oBAAoB,GAAG;AAC1B;;;;"}
|
package/dist/addresses.d.cts
CHANGED
|
@@ -28,6 +28,14 @@ export declare const BidWallAddress: Addresses;
|
|
|
28
28
|
export declare const PoolSwapAddress: Addresses;
|
|
29
29
|
export declare const TreasuryManagerFactoryAddress: Addresses;
|
|
30
30
|
export declare const AddressFeeSplitManagerAddress: Addresses;
|
|
31
|
+
/**
|
|
32
|
+
* Creator vaults (docs/CREATOR-VAULTS.md in the contracts repo): the approved DividendVault
|
|
33
|
+
* IMPLEMENTATION every new launch clones, and the HolderShareFeeCalculator. Empty until the
|
|
34
|
+
* contracts are deployed; once the calculator is the PositionManager's fee calculator, every
|
|
35
|
+
* launch must attach a vault (`flaunchWithVault`).
|
|
36
|
+
*/
|
|
37
|
+
export declare const DividendVaultAddress: Addresses;
|
|
38
|
+
export declare const HolderShareFeeCalculatorAddress: Addresses;
|
|
31
39
|
/** Creator revenue escrow: balances accrue here, claimed as USDC (unwrap=false). */
|
|
32
40
|
export declare const FeeEscrowAddress: Addresses;
|
|
33
41
|
/** Referrer rewards escrow: 5% of every swap fee routed with your address. */
|
|
@@ -42,6 +50,23 @@ export declare const UniversalRewardsDistributorAddress: Addresses;
|
|
|
42
50
|
/** Uniswap v4 PoolManager (canonical deployment on mainnet, ours on testnet). */
|
|
43
51
|
export declare const PoolManagerAddress: Addresses;
|
|
44
52
|
export declare const QuoterAddress: Addresses;
|
|
53
|
+
/**
|
|
54
|
+
* Uniswap v4 StateView (canonical periphery view over PoolManager storage).
|
|
55
|
+
*
|
|
56
|
+
* MAINNET ONLY. Arc testnet runs our own PoolManager instance, and no StateView
|
|
57
|
+
* was deployed against it, so there is no testnet entry. The SDK does not
|
|
58
|
+
* depend on StateView on either network: `ReadPoolManager` reads slot0,
|
|
59
|
+
* liquidity, positions and tick data straight from PoolManager storage with
|
|
60
|
+
* `extsload`, using the same slot derivations as Uniswap's StateLibrary. Use
|
|
61
|
+
* that path if you need one code path across both chains.
|
|
62
|
+
*/
|
|
63
|
+
export declare const StateViewAddress: Addresses;
|
|
64
|
+
/**
|
|
65
|
+
* IndexerSubscriber: on-chain reverse index PoolId -> (flaunch, memecoin,
|
|
66
|
+
* memecoinTreasury, tokenId). Attached to the PositionManager's Notifier, so it
|
|
67
|
+
* is populated at pool initialisation. See contracts/IndexerSubscriber.sol.
|
|
68
|
+
*/
|
|
69
|
+
export declare const IndexerSubscriberAddress: Addresses;
|
|
45
70
|
/** Base URL of the ubi.fun read/upload API serving each network. */
|
|
46
71
|
export declare const ApiBaseUrl: {
|
|
47
72
|
[chainId: number]: string;
|
package/dist/addresses.d.ts
CHANGED
|
@@ -28,6 +28,14 @@ export declare const BidWallAddress: Addresses;
|
|
|
28
28
|
export declare const PoolSwapAddress: Addresses;
|
|
29
29
|
export declare const TreasuryManagerFactoryAddress: Addresses;
|
|
30
30
|
export declare const AddressFeeSplitManagerAddress: Addresses;
|
|
31
|
+
/**
|
|
32
|
+
* Creator vaults (docs/CREATOR-VAULTS.md in the contracts repo): the approved DividendVault
|
|
33
|
+
* IMPLEMENTATION every new launch clones, and the HolderShareFeeCalculator. Empty until the
|
|
34
|
+
* contracts are deployed; once the calculator is the PositionManager's fee calculator, every
|
|
35
|
+
* launch must attach a vault (`flaunchWithVault`).
|
|
36
|
+
*/
|
|
37
|
+
export declare const DividendVaultAddress: Addresses;
|
|
38
|
+
export declare const HolderShareFeeCalculatorAddress: Addresses;
|
|
31
39
|
/** Creator revenue escrow: balances accrue here, claimed as USDC (unwrap=false). */
|
|
32
40
|
export declare const FeeEscrowAddress: Addresses;
|
|
33
41
|
/** Referrer rewards escrow: 5% of every swap fee routed with your address. */
|
|
@@ -42,6 +50,23 @@ export declare const UniversalRewardsDistributorAddress: Addresses;
|
|
|
42
50
|
/** Uniswap v4 PoolManager (canonical deployment on mainnet, ours on testnet). */
|
|
43
51
|
export declare const PoolManagerAddress: Addresses;
|
|
44
52
|
export declare const QuoterAddress: Addresses;
|
|
53
|
+
/**
|
|
54
|
+
* Uniswap v4 StateView (canonical periphery view over PoolManager storage).
|
|
55
|
+
*
|
|
56
|
+
* MAINNET ONLY. Arc testnet runs our own PoolManager instance, and no StateView
|
|
57
|
+
* was deployed against it, so there is no testnet entry. The SDK does not
|
|
58
|
+
* depend on StateView on either network: `ReadPoolManager` reads slot0,
|
|
59
|
+
* liquidity, positions and tick data straight from PoolManager storage with
|
|
60
|
+
* `extsload`, using the same slot derivations as Uniswap's StateLibrary. Use
|
|
61
|
+
* that path if you need one code path across both chains.
|
|
62
|
+
*/
|
|
63
|
+
export declare const StateViewAddress: Addresses;
|
|
64
|
+
/**
|
|
65
|
+
* IndexerSubscriber: on-chain reverse index PoolId -> (flaunch, memecoin,
|
|
66
|
+
* memecoinTreasury, tokenId). Attached to the PositionManager's Notifier, so it
|
|
67
|
+
* is populated at pool initialisation. See contracts/IndexerSubscriber.sol.
|
|
68
|
+
*/
|
|
69
|
+
export declare const IndexerSubscriberAddress: Addresses;
|
|
45
70
|
/** Base URL of the ubi.fun read/upload API serving each network. */
|
|
46
71
|
export declare const ApiBaseUrl: {
|
|
47
72
|
[chainId: number]: string;
|
package/dist/addresses.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../src/addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAC;AACzC,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAE5C,kFAAkF;AAClF,eAAO,MAAM,YAAY,EACvB,4CAAqD,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAGhC,CAAC;AAEF,eAAO,MAAM,iBAAiB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AAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAG5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,SAG/B,CAAC;AAGF,eAAO,MAAM,cAAc,EAAE,SAG5B,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,eAAe,EAAE,SAG7B,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,SAG3C,CAAC;AAGF,eAAO,MAAM,6BAA6B,EAAE,SAG3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAElC,CAAC;AACF,eAAO,MAAM,+BAA+B,EAAE,SAE7C,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,EAAE,SAG9B,CAAC;AAEF,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB,EAAE,SAGnC,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,EAAE,SAGlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kCAAkC,EAAE,SAGhD,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,EAAE,SAGhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SAG3B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAE9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAGtC,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAGnD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ReadContract, type Address, type Drift, type ReadWriteContract, type ReadWriteAdapter } from "@delvtech/drift";
|
|
2
|
+
import { DividendVaultAbi } from "../abi/DividendVault.cjs";
|
|
3
|
+
export type DividendVaultABI = typeof DividendVaultAbi;
|
|
4
|
+
/**
|
|
5
|
+
* Read client for a creator vault (DividendVault clone): it holds one token's
|
|
6
|
+
* creator NFT forever and splits the creator side of its fees between the
|
|
7
|
+
* token's holders and the creator recipients.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ReadDividendVault {
|
|
10
|
+
readonly contract: ReadContract<DividendVaultABI>;
|
|
11
|
+
constructor(address: Address, drift?: Drift);
|
|
12
|
+
/** The token whose creator NFT this vault holds. */
|
|
13
|
+
memecoin(): Promise<`0x${string}`>;
|
|
14
|
+
/** Holder share of what the vault receives, in 100_00 = 100% units. */
|
|
15
|
+
holderShare(): Promise<bigint>;
|
|
16
|
+
/** Whether the whole creator side goes to holders for good. */
|
|
17
|
+
renounced(): Promise<boolean>;
|
|
18
|
+
managerOwner(): Promise<`0x${string}`>;
|
|
19
|
+
/** USDC a creator recipient can claim now (after the latest harvest). */
|
|
20
|
+
balances(recipient: Address): Promise<bigint>;
|
|
21
|
+
}
|
|
22
|
+
/** Write client for a creator vault. */
|
|
23
|
+
export declare class ReadWriteDividendVault extends ReadDividendVault {
|
|
24
|
+
contract: ReadWriteContract<DividendVaultABI>;
|
|
25
|
+
constructor(address: Address, drift?: Drift<ReadWriteAdapter>);
|
|
26
|
+
/** Moves the vault's fees in and splits them (holders' part drips over 24 hours). Anyone can call. */
|
|
27
|
+
harvest(): Promise<`0x${string}`>;
|
|
28
|
+
/** Pays the caller's creator credit. */
|
|
29
|
+
claim(): Promise<`0x${string}`>;
|
|
30
|
+
/** Manager owner only: every creator fee goes to holders from now on. Cannot be undone. */
|
|
31
|
+
renounce(): Promise<`0x${string}`>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ReadContract, type Address, type Drift, type ReadWriteContract, type ReadWriteAdapter } from "@delvtech/drift";
|
|
2
|
+
import { DividendVaultAbi } from "../abi/DividendVault.js";
|
|
3
|
+
export type DividendVaultABI = typeof DividendVaultAbi;
|
|
4
|
+
/**
|
|
5
|
+
* Read client for a creator vault (DividendVault clone): it holds one token's
|
|
6
|
+
* creator NFT forever and splits the creator side of its fees between the
|
|
7
|
+
* token's holders and the creator recipients.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ReadDividendVault {
|
|
10
|
+
readonly contract: ReadContract<DividendVaultABI>;
|
|
11
|
+
constructor(address: Address, drift?: Drift);
|
|
12
|
+
/** The token whose creator NFT this vault holds. */
|
|
13
|
+
memecoin(): Promise<`0x${string}`>;
|
|
14
|
+
/** Holder share of what the vault receives, in 100_00 = 100% units. */
|
|
15
|
+
holderShare(): Promise<bigint>;
|
|
16
|
+
/** Whether the whole creator side goes to holders for good. */
|
|
17
|
+
renounced(): Promise<boolean>;
|
|
18
|
+
managerOwner(): Promise<`0x${string}`>;
|
|
19
|
+
/** USDC a creator recipient can claim now (after the latest harvest). */
|
|
20
|
+
balances(recipient: Address): Promise<bigint>;
|
|
21
|
+
}
|
|
22
|
+
/** Write client for a creator vault. */
|
|
23
|
+
export declare class ReadWriteDividendVault extends ReadDividendVault {
|
|
24
|
+
contract: ReadWriteContract<DividendVaultABI>;
|
|
25
|
+
constructor(address: Address, drift?: Drift<ReadWriteAdapter>);
|
|
26
|
+
/** Moves the vault's fees in and splits them (holders' part drips over 24 hours). Anyone can call. */
|
|
27
|
+
harvest(): Promise<`0x${string}`>;
|
|
28
|
+
/** Pays the caller's creator credit. */
|
|
29
|
+
claim(): Promise<`0x${string}`>;
|
|
30
|
+
/** Manager owner only: every creator fee goes to holders from now on. Cannot be undone. */
|
|
31
|
+
renounce(): Promise<`0x${string}`>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=DividendVaultClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DividendVaultClient.d.ts","sourceRoot":"","sources":["../../src/clients/DividendVaultClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAEtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC;AAEvD;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,SAAgB,QAAQ,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC;gBAE7C,OAAO,EAAE,OAAO,EAAE,KAAK,GAAE,KAAqB;IAW1D,oDAAoD;IAC9C,QAAQ;IAKd,uEAAuE;IACjE,WAAW;IAKjB,+DAA+D;IACzD,SAAS;IAKT,YAAY;IAKlB,yEAAyE;IACnE,QAAQ,CAAC,SAAS,EAAE,OAAO;CAIlC;AAED,wCAAwC;AACxC,qBAAa,sBAAuB,SAAQ,iBAAiB;IACnD,QAAQ,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;gBAE1C,OAAO,EAAE,OAAO,EAAE,KAAK,GAAE,KAAK,CAAC,gBAAgB,CAAiB;IAI5E,sGAAsG;IACtG,OAAO;IAIP,wCAAwC;IACxC,KAAK;IAIL,2FAA2F;IAC3F,QAAQ;CAGT"}
|
|
@@ -79,6 +79,24 @@ export declare class ReadFlaunchPositionManager {
|
|
|
79
79
|
tickSpacing: number;
|
|
80
80
|
hooks: `0x${string}`;
|
|
81
81
|
}>;
|
|
82
|
+
/**
|
|
83
|
+
* Internal Swap Pool inventory for a pool: swap fees the hook is holding
|
|
84
|
+
* that have not yet been distributed. `amount0` is always the USDC side,
|
|
85
|
+
* `amount1` the coin side, regardless of currency ordering in the PoolKey.
|
|
86
|
+
* Coin-side fees are sold to the next buyer before the v4 pool is touched,
|
|
87
|
+
* so this inventory is real liquidity that active v4 positions do not show.
|
|
88
|
+
* See contracts/README.md for the full reserve accounting.
|
|
89
|
+
*/
|
|
90
|
+
poolFees(poolKey: {
|
|
91
|
+
currency0: Address;
|
|
92
|
+
currency1: Address;
|
|
93
|
+
fee: number;
|
|
94
|
+
tickSpacing: number;
|
|
95
|
+
hooks: Address;
|
|
96
|
+
}): Promise<{
|
|
97
|
+
amount0: bigint;
|
|
98
|
+
amount1: bigint;
|
|
99
|
+
}>;
|
|
82
100
|
/**
|
|
83
101
|
* The live fee distribution for a pool (swapFee, referrer, protocol shares
|
|
84
102
|
* in hundredths of a percent)
|
|
@@ -79,6 +79,24 @@ export declare class ReadFlaunchPositionManager {
|
|
|
79
79
|
tickSpacing: number;
|
|
80
80
|
hooks: `0x${string}`;
|
|
81
81
|
}>;
|
|
82
|
+
/**
|
|
83
|
+
* Internal Swap Pool inventory for a pool: swap fees the hook is holding
|
|
84
|
+
* that have not yet been distributed. `amount0` is always the USDC side,
|
|
85
|
+
* `amount1` the coin side, regardless of currency ordering in the PoolKey.
|
|
86
|
+
* Coin-side fees are sold to the next buyer before the v4 pool is touched,
|
|
87
|
+
* so this inventory is real liquidity that active v4 positions do not show.
|
|
88
|
+
* See contracts/README.md for the full reserve accounting.
|
|
89
|
+
*/
|
|
90
|
+
poolFees(poolKey: {
|
|
91
|
+
currency0: Address;
|
|
92
|
+
currency1: Address;
|
|
93
|
+
fee: number;
|
|
94
|
+
tickSpacing: number;
|
|
95
|
+
hooks: Address;
|
|
96
|
+
}): Promise<{
|
|
97
|
+
amount0: bigint;
|
|
98
|
+
amount1: bigint;
|
|
99
|
+
}>;
|
|
82
100
|
/**
|
|
83
101
|
* The live fee distribution for a pool (swapFee, referrer, protocol shares
|
|
84
102
|
* in hundredths of a percent)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlaunchPositionManagerClient.d.ts","sourceRoot":"","sources":["../../src/clients/FlaunchPositionManagerClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,QAAQ,EAEb,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAK1E,MAAM,MAAM,yBAAyB,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O,GAC3B,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;IAkD7B,aAAa,CAAC,CAAC,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAAE,EAC7D,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACf,EAAE,mBAAmB,CAAC,CAAC,CAAC;;;;CA4F1B"}
|
|
1
|
+
{"version":3,"file":"FlaunchPositionManagerClient.d.ts","sourceRoot":"","sources":["../../src/clients/FlaunchPositionManagerClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,QAAQ,EAEb,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAK1E,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG,QAAQ,CACnC,yBAAyB,EACzB,aAAa,CACd,GAAG;IACF,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AACF,MAAM,MAAM,eAAe,GAAG,cAAc,EAAE,CAAC;AAE/C,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,CAAC,EACd,IAAI,EACJ,mBAAmB,GACpB,EAAE;QACD,IAAI,EAAE,eAAe,CAAC;QACtB,mBAAmB,EAAE,OAAO,CAAC;KAC9B,KAAK,IAAI,CAAC;IACX,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,yBAAyB,EAAE,UAAU,CAAC,GAAG;IAC1E,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG;IACrC,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE;QACL,WAAW,EAAE,MAAM,CAAC;QACpB,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AE,OAAO,EAAE,KAAK,GAAE,KAAqB;IAW1D,gBAAgB,CAAC,EAAE,aAAa,EAAE,EAAE;QAAE,aAAa,EAAE,OAAO,CAAA;KAAE;IAMxD,WAAW,CAAC,WAAW,EAAE,OAAO;IAQtC;;;OAGG;IACH,OAAO,CAAC,WAAW,EAAE,OAAO;;;;;;;IAM5B;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,SAAS,EAAE,OAAO,CAAC;QACnB,GAAG,EAAE,MAAM,CAAC;QACZ,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,OAAO,CAAC;KAChB;;;;IAMD;;;OAGG;IACH,sBAAsB,CAAC,MAAM,EAAE,SAAS;;;;;;IAMxC;;;;OAIG;IACG,gBAAgB,CAAC,MAAM,EAAE;QAC7B,MAAM,EAAE,OAAO,CAAC;QAChB,kBAAkB,EAAE,SAAS,CAAC;QAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B;IAiBK,gBAAgB,CAAC,EACrB,aAAa,EACb,gBAAgB,GACjB,EAAE,sBAAsB;;;;IAuEzB;;;;;OAKG;IACG,WAAW,CACf,MAAM,EAAE,GAAG,EACX,kBAAkB,CAAC,EAAE,OAAO,GAC3B,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;IAkD7B,aAAa,CAAC,CAAC,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAAE,EAC7D,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACf,EAAE,mBAAmB,CAAC,CAAC,CAAC;;;;CA4F1B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReadContract, type Address, type Drift, type ReadWriteContract, type ReadWriteAdapter, type HexString } from "@delvtech/drift";
|
|
2
2
|
import { FlaunchZapAbi } from "../abi/FlaunchZap.cjs";
|
|
3
|
+
import { type LaunchCalculatorState } from "../utils/creatorVaults.cjs";
|
|
3
4
|
import { IPFSParams } from "../types.cjs";
|
|
4
5
|
export type FlaunchZapABI = typeof FlaunchZapAbi;
|
|
5
6
|
export interface FlaunchParams {
|
|
@@ -60,6 +61,26 @@ export interface FlaunchWithSplitManagerParams extends Omit<FlaunchParams, "trea
|
|
|
60
61
|
}
|
|
61
62
|
export interface FlaunchWithSplitManagerIPFSParams extends Omit<FlaunchWithSplitManagerParams, "tokenUri">, IPFSParams {
|
|
62
63
|
}
|
|
64
|
+
export interface FlaunchWithVaultParams extends Omit<FlaunchParams, "treasuryManagerParams"> {
|
|
65
|
+
/** Trading fee in percent, 1.5 to 5 with at most 2 decimals (default 1.5). Permanent. */
|
|
66
|
+
feePercent?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Share of the creator's earnings paid to the token's holders in USDC, in
|
|
69
|
+
* percent: 16.67 to 100 with at most 2 decimals (default 16.67). Permanent.
|
|
70
|
+
*/
|
|
71
|
+
holderSharePercent?: number;
|
|
72
|
+
/**
|
|
73
|
+
* Other recipients of what the creator keeps after holder dividends, in
|
|
74
|
+
* percent (at most 2 decimals, at most 4 receivers). The creator receives
|
|
75
|
+
* the exact remainder. A receiver can be an X-handle escrow address.
|
|
76
|
+
*/
|
|
77
|
+
splitReceivers?: {
|
|
78
|
+
address: Address;
|
|
79
|
+
percent: number;
|
|
80
|
+
}[];
|
|
81
|
+
}
|
|
82
|
+
export interface FlaunchWithVaultIPFSParams extends Omit<FlaunchWithVaultParams, "tokenUri">, IPFSParams {
|
|
83
|
+
}
|
|
63
84
|
/**
|
|
64
85
|
* Base client for interacting with the FlaunchZap contract in read-only mode.
|
|
65
86
|
* The zap is the one-transaction launch entry point: token, Uniswap v4 pool,
|
|
@@ -82,6 +103,12 @@ export declare class ReadFlaunchZap {
|
|
|
82
103
|
initialPriceParams: HexString;
|
|
83
104
|
slippagePercent?: number;
|
|
84
105
|
}): Promise<bigint>;
|
|
106
|
+
/**
|
|
107
|
+
* Reads the PositionManager's fee calculators: whether creator vaults are
|
|
108
|
+
* live (every launch must attach a vault) and which `feeCalculatorParams`
|
|
109
|
+
* a launch without a vault sends.
|
|
110
|
+
*/
|
|
111
|
+
readLaunchCalculatorState(): Promise<LaunchCalculatorState>;
|
|
85
112
|
}
|
|
86
113
|
/**
|
|
87
114
|
* Extended client for interacting with the FlaunchZap contract with write capabilities
|
|
@@ -96,6 +123,20 @@ export declare class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
|
96
123
|
* @returns Transaction response for the flaunch creation
|
|
97
124
|
*/
|
|
98
125
|
flaunch(params: FlaunchParams): Promise<`0x${string}`>;
|
|
126
|
+
/**
|
|
127
|
+
* Flaunches a token whose creator NFT goes into a DividendVault: holders of
|
|
128
|
+
* the token earn `holderSharePercent` of the creator's earnings in USDC,
|
|
129
|
+
* and the trading fee is `feePercent`. Both are permanent, as is the split.
|
|
130
|
+
* The creator side of the fee must stay at 90% or more (buyback 0-10%).
|
|
131
|
+
* @returns Transaction response for the flaunch creation
|
|
132
|
+
*/
|
|
133
|
+
flaunchWithVault(params: FlaunchWithVaultParams): Promise<`0x${string}`>;
|
|
134
|
+
/**
|
|
135
|
+
* Flaunches a vault token, pinning the token metadata through the ubi.fun
|
|
136
|
+
* API first. To host the metadata yourself, call `flaunchWithVault({ tokenUri })`.
|
|
137
|
+
*/
|
|
138
|
+
flaunchIPFSWithVault(params: FlaunchWithVaultIPFSParams): Promise<`0x${string}`>;
|
|
139
|
+
private writeFlaunch;
|
|
99
140
|
/**
|
|
100
141
|
* Flaunches a new token, first pinning the image + metadata through the
|
|
101
142
|
* ubi.fun API to produce the tokenUri. To host the metadata yourself, pin
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReadContract, type Address, type Drift, type ReadWriteContract, type ReadWriteAdapter, type HexString } from "@delvtech/drift";
|
|
2
2
|
import { FlaunchZapAbi } from "../abi/FlaunchZap.js";
|
|
3
|
+
import { type LaunchCalculatorState } from "../utils/creatorVaults.js";
|
|
3
4
|
import { IPFSParams } from "../types.js";
|
|
4
5
|
export type FlaunchZapABI = typeof FlaunchZapAbi;
|
|
5
6
|
export interface FlaunchParams {
|
|
@@ -60,6 +61,26 @@ export interface FlaunchWithSplitManagerParams extends Omit<FlaunchParams, "trea
|
|
|
60
61
|
}
|
|
61
62
|
export interface FlaunchWithSplitManagerIPFSParams extends Omit<FlaunchWithSplitManagerParams, "tokenUri">, IPFSParams {
|
|
62
63
|
}
|
|
64
|
+
export interface FlaunchWithVaultParams extends Omit<FlaunchParams, "treasuryManagerParams"> {
|
|
65
|
+
/** Trading fee in percent, 1.5 to 5 with at most 2 decimals (default 1.5). Permanent. */
|
|
66
|
+
feePercent?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Share of the creator's earnings paid to the token's holders in USDC, in
|
|
69
|
+
* percent: 16.67 to 100 with at most 2 decimals (default 16.67). Permanent.
|
|
70
|
+
*/
|
|
71
|
+
holderSharePercent?: number;
|
|
72
|
+
/**
|
|
73
|
+
* Other recipients of what the creator keeps after holder dividends, in
|
|
74
|
+
* percent (at most 2 decimals, at most 4 receivers). The creator receives
|
|
75
|
+
* the exact remainder. A receiver can be an X-handle escrow address.
|
|
76
|
+
*/
|
|
77
|
+
splitReceivers?: {
|
|
78
|
+
address: Address;
|
|
79
|
+
percent: number;
|
|
80
|
+
}[];
|
|
81
|
+
}
|
|
82
|
+
export interface FlaunchWithVaultIPFSParams extends Omit<FlaunchWithVaultParams, "tokenUri">, IPFSParams {
|
|
83
|
+
}
|
|
63
84
|
/**
|
|
64
85
|
* Base client for interacting with the FlaunchZap contract in read-only mode.
|
|
65
86
|
* The zap is the one-transaction launch entry point: token, Uniswap v4 pool,
|
|
@@ -82,6 +103,12 @@ export declare class ReadFlaunchZap {
|
|
|
82
103
|
initialPriceParams: HexString;
|
|
83
104
|
slippagePercent?: number;
|
|
84
105
|
}): Promise<bigint>;
|
|
106
|
+
/**
|
|
107
|
+
* Reads the PositionManager's fee calculators: whether creator vaults are
|
|
108
|
+
* live (every launch must attach a vault) and which `feeCalculatorParams`
|
|
109
|
+
* a launch without a vault sends.
|
|
110
|
+
*/
|
|
111
|
+
readLaunchCalculatorState(): Promise<LaunchCalculatorState>;
|
|
85
112
|
}
|
|
86
113
|
/**
|
|
87
114
|
* Extended client for interacting with the FlaunchZap contract with write capabilities
|
|
@@ -96,6 +123,20 @@ export declare class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
|
96
123
|
* @returns Transaction response for the flaunch creation
|
|
97
124
|
*/
|
|
98
125
|
flaunch(params: FlaunchParams): Promise<`0x${string}`>;
|
|
126
|
+
/**
|
|
127
|
+
* Flaunches a token whose creator NFT goes into a DividendVault: holders of
|
|
128
|
+
* the token earn `holderSharePercent` of the creator's earnings in USDC,
|
|
129
|
+
* and the trading fee is `feePercent`. Both are permanent, as is the split.
|
|
130
|
+
* The creator side of the fee must stay at 90% or more (buyback 0-10%).
|
|
131
|
+
* @returns Transaction response for the flaunch creation
|
|
132
|
+
*/
|
|
133
|
+
flaunchWithVault(params: FlaunchWithVaultParams): Promise<`0x${string}`>;
|
|
134
|
+
/**
|
|
135
|
+
* Flaunches a vault token, pinning the token metadata through the ubi.fun
|
|
136
|
+
* API first. To host the metadata yourself, call `flaunchWithVault({ tokenUri })`.
|
|
137
|
+
*/
|
|
138
|
+
flaunchIPFSWithVault(params: FlaunchWithVaultIPFSParams): Promise<`0x${string}`>;
|
|
139
|
+
private writeFlaunch;
|
|
99
140
|
/**
|
|
100
141
|
* Flaunches a new token, first pinning the image + metadata through the
|
|
101
142
|
* ubi.fun API to produce the tokenUri. To host the metadata yourself, pin
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlaunchZapClient.d.ts","sourceRoot":"","sources":["../../src/clients/FlaunchZapClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAEf,MAAM,iBAAiB,CAAC;AAC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SAAqB;gBAErC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,GAAE,KAAqB;IAY3E;;;;;OAKG;IACH,sBAAsB,CAAC,MAAM,EAAE;QAC7B,aAAa,EAAE,MAAM,CAAC;QACtB,kBAAkB,EAAE,SAAS,CAAC;QAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B;IAkBD;;;;OAIG;IACG,yBAAyB,IAAI,OAAO,CAAC,qBAAqB,CAAC;CAwClE;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;IAC7C,QAAQ,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAC;gBAGjD,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,EAChB,KAAK,GAAE,KAAK,CAAC,gBAAgB,CAAiB;IAKhD;;;;;OAKG;IACG,OAAO,CAAC,MAAM,EAAE,aAAa;IA0BnC;;;;;;OAMG;IACG,gBAAgB,CAAC,MAAM,EAAE,sBAAsB;IAyErD;;;OAGG;IACG,oBAAoB,CAAC,MAAM,EAAE,0BAA0B;YAY/C,YAAY;IAyF1B;;;;OAIG;IACG,WAAW,CAAC,MAAM,EAAE,iBAAiB;IAY3C;;;;;;;;;;;;OAYG;IACG,uBAAuB,CAAC,MAAM,EAAE,6BAA6B;IA8EnE;;;;;;OAMG;IACG,2BAA2B,CAAC,MAAM,EAAE,iCAAiC;CAW5E"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type ReadContract, type Address, type Drift, type HexString } from "@delvtech/drift";
|
|
2
|
+
import { IndexerSubscriberAbi } from "../abi/IndexerSubscriber.cjs";
|
|
3
|
+
export type IndexerSubscriberABI = typeof IndexerSubscriberAbi;
|
|
4
|
+
/**
|
|
5
|
+
* Read-only client for the IndexerSubscriber: the on-chain reverse index from
|
|
6
|
+
* a Uniswap v4 PoolId to the coin that owns the pool.
|
|
7
|
+
*
|
|
8
|
+
* The protocol's own lookups are one-directional (coin address to PoolKey via
|
|
9
|
+
* `PositionManager.poolKey`). This subscriber listens to the PositionManager's
|
|
10
|
+
* Notifier on `afterInitialize` and stores the inverse, so an indexer that only
|
|
11
|
+
* has a PoolId (from a PoolManager `Initialize` or `Swap` log) can resolve the
|
|
12
|
+
* coin, its treasury, and its Flaunch tokenId without replaying our events.
|
|
13
|
+
*/
|
|
14
|
+
export declare class ReadIndexerSubscriber {
|
|
15
|
+
readonly contract: ReadContract<IndexerSubscriberABI>;
|
|
16
|
+
/**
|
|
17
|
+
* @param address - The IndexerSubscriber address for the chain
|
|
18
|
+
* @param drift - Optional drift instance (creates a new one if not provided)
|
|
19
|
+
* @throws Error if address is not provided
|
|
20
|
+
*/
|
|
21
|
+
constructor(address: Address, drift?: Drift);
|
|
22
|
+
/**
|
|
23
|
+
* Resolves a PoolId to the coin behind it.
|
|
24
|
+
*
|
|
25
|
+
* Returns zero addresses for a PoolId that was never initialised through our
|
|
26
|
+
* PositionManager hook (a foreign v4 pool, or a pool created before the
|
|
27
|
+
* subscriber was attached and not back-filled with `addIndex`).
|
|
28
|
+
*
|
|
29
|
+
* `tokenId_` is 0 when the creator has burned the Flaunch NFT: the pool is
|
|
30
|
+
* still live, but creator fees route to the treasury from then on.
|
|
31
|
+
*/
|
|
32
|
+
poolIndex({ poolId }: {
|
|
33
|
+
poolId: HexString;
|
|
34
|
+
}): Promise<{
|
|
35
|
+
flaunch_: `0x${string}`;
|
|
36
|
+
memecoin_: `0x${string}`;
|
|
37
|
+
memecoinTreasury_: `0x${string}`;
|
|
38
|
+
tokenId_: bigint;
|
|
39
|
+
}>;
|
|
40
|
+
/**
|
|
41
|
+
* True when the PoolId belongs to a coin launched through this deployment.
|
|
42
|
+
*/
|
|
43
|
+
isUbiPool({ poolId }: {
|
|
44
|
+
poolId: HexString;
|
|
45
|
+
}): Promise<boolean>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ReadContract, type Address, type Drift, type HexString } from "@delvtech/drift";
|
|
2
|
+
import { IndexerSubscriberAbi } from "../abi/IndexerSubscriber.js";
|
|
3
|
+
export type IndexerSubscriberABI = typeof IndexerSubscriberAbi;
|
|
4
|
+
/**
|
|
5
|
+
* Read-only client for the IndexerSubscriber: the on-chain reverse index from
|
|
6
|
+
* a Uniswap v4 PoolId to the coin that owns the pool.
|
|
7
|
+
*
|
|
8
|
+
* The protocol's own lookups are one-directional (coin address to PoolKey via
|
|
9
|
+
* `PositionManager.poolKey`). This subscriber listens to the PositionManager's
|
|
10
|
+
* Notifier on `afterInitialize` and stores the inverse, so an indexer that only
|
|
11
|
+
* has a PoolId (from a PoolManager `Initialize` or `Swap` log) can resolve the
|
|
12
|
+
* coin, its treasury, and its Flaunch tokenId without replaying our events.
|
|
13
|
+
*/
|
|
14
|
+
export declare class ReadIndexerSubscriber {
|
|
15
|
+
readonly contract: ReadContract<IndexerSubscriberABI>;
|
|
16
|
+
/**
|
|
17
|
+
* @param address - The IndexerSubscriber address for the chain
|
|
18
|
+
* @param drift - Optional drift instance (creates a new one if not provided)
|
|
19
|
+
* @throws Error if address is not provided
|
|
20
|
+
*/
|
|
21
|
+
constructor(address: Address, drift?: Drift);
|
|
22
|
+
/**
|
|
23
|
+
* Resolves a PoolId to the coin behind it.
|
|
24
|
+
*
|
|
25
|
+
* Returns zero addresses for a PoolId that was never initialised through our
|
|
26
|
+
* PositionManager hook (a foreign v4 pool, or a pool created before the
|
|
27
|
+
* subscriber was attached and not back-filled with `addIndex`).
|
|
28
|
+
*
|
|
29
|
+
* `tokenId_` is 0 when the creator has burned the Flaunch NFT: the pool is
|
|
30
|
+
* still live, but creator fees route to the treasury from then on.
|
|
31
|
+
*/
|
|
32
|
+
poolIndex({ poolId }: {
|
|
33
|
+
poolId: HexString;
|
|
34
|
+
}): Promise<{
|
|
35
|
+
flaunch_: `0x${string}`;
|
|
36
|
+
memecoin_: `0x${string}`;
|
|
37
|
+
memecoinTreasury_: `0x${string}`;
|
|
38
|
+
tokenId_: bigint;
|
|
39
|
+
}>;
|
|
40
|
+
/**
|
|
41
|
+
* True when the PoolId belongs to a coin launched through this deployment.
|
|
42
|
+
*/
|
|
43
|
+
isUbiPool({ poolId }: {
|
|
44
|
+
poolId: HexString;
|
|
45
|
+
}): Promise<boolean>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=IndexerSubscriberClient.d.ts.map
|