levr-sdk 0.1.2 → 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 +5 -4
- package/dist/esm/client/hook/index.js +5 -9
- package/dist/esm/client/hook/index.js.map +1 -1
- package/dist/esm/client/hook/use-airdrop.js +19 -0
- package/dist/esm/client/hook/use-airdrop.js.map +1 -0
- package/dist/esm/client/hook/use-clanker.js +1 -34
- package/dist/esm/client/hook/use-clanker.js.map +1 -1
- package/dist/esm/client/hook/use-governance.js +2 -2
- package/dist/esm/client/hook/use-governance.js.map +1 -1
- package/dist/esm/client/hook/use-project.js +30 -6
- package/dist/esm/client/hook/use-project.js.map +1 -1
- package/dist/esm/client/hook/use-swap.js +0 -2
- package/dist/esm/client/hook/use-swap.js.map +1 -1
- package/dist/esm/client/levr-provider.js +10 -7
- package/dist/esm/client/levr-provider.js.map +1 -1
- package/dist/esm/fee-receivers.js +35 -6
- package/dist/esm/fee-receivers.js.map +1 -1
- package/dist/esm/governance.js +2 -7
- package/dist/esm/governance.js.map +1 -1
- package/dist/esm/project.js +106 -63
- package/dist/esm/project.js.map +1 -1
- package/dist/esm/quote/index.js +2 -2
- package/dist/esm/quote/v4.js +142 -128
- package/dist/esm/quote/v4.js.map +1 -1
- package/dist/esm/stake.js +1 -1
- package/dist/esm/stake.js.map +1 -1
- package/dist/esm/usd-price.js +21 -4
- package/dist/esm/usd-price.js.map +1 -1
- package/dist/esm/user.js +1 -1
- package/dist/esm/user.js.map +1 -1
- package/dist/types/client/hook/index.d.ts +5 -12
- package/dist/types/client/hook/index.d.ts.map +1 -1
- package/dist/types/client/hook/use-airdrop.d.ts +11 -0
- package/dist/types/client/hook/use-airdrop.d.ts.map +1 -0
- package/dist/types/client/hook/use-clanker.d.ts +1 -18
- package/dist/types/client/hook/use-clanker.d.ts.map +1 -1
- package/dist/types/client/hook/use-governance.d.ts +2 -1
- package/dist/types/client/hook/use-governance.d.ts.map +1 -1
- package/dist/types/client/hook/use-project.d.ts +11 -1
- package/dist/types/client/hook/use-project.d.ts.map +1 -1
- package/dist/types/client/hook/use-swap.d.ts.map +1 -1
- package/dist/types/client/levr-provider.d.ts +3 -10
- package/dist/types/client/levr-provider.d.ts.map +1 -1
- package/dist/types/fee-receivers.d.ts +514 -0
- package/dist/types/fee-receivers.d.ts.map +1 -1
- package/dist/types/governance.d.ts +3 -2
- package/dist/types/governance.d.ts.map +1 -1
- package/dist/types/project.d.ts +25 -6
- package/dist/types/project.d.ts.map +1 -1
- package/dist/types/quote/index.d.ts +2 -2
- package/dist/types/quote/v4.d.ts +5 -7
- package/dist/types/quote/v4.d.ts.map +1 -1
- package/dist/types/usd-price.d.ts +6 -1
- package/dist/types/usd-price.d.ts.map +1 -1
- package/dist/types/user.d.ts +1 -1
- package/dist/types/user.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-governance.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-governance.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAA;AAI9C,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"use-governance.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-governance.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAA;AAI9C,OAAO,KAAK,EACV,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAOnD,MAAM,MAAM,mBAAmB,GAAG;IAEhC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,WAAW,C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,CAAA;KACpB,KAAG,qBAAqB;2DAUtB;QACD,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;QACvB,cAAc,CAAC,EAAE,MAAM,CAAA;KACxB,KAAG,kBAAkB;kDAOnB;QACD,UAAU,EAAE,MAAM,GAAG,MAAM,CAAA;KAC5B,KAAG,qBAAqB;;;;;;EAwB1B"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { Address } from 'viem';
|
|
2
|
-
import type { ProjectsParams, ProjectsResult } from '../..';
|
|
2
|
+
import type { ProjectsParams, ProjectsResult, StaticProject } from '../..';
|
|
3
3
|
import type { PopPublicClient } from '../../types';
|
|
4
|
+
export type UseStaticProjectQueryParams = {
|
|
5
|
+
clankerToken: Address | null;
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Internal: Fetches static project data that doesn't change frequently
|
|
10
|
+
* Only refetches when the token address changes
|
|
11
|
+
*/
|
|
12
|
+
export declare function useStaticProjectQuery({ clankerToken, enabled: e, }: UseStaticProjectQueryParams): import("@tanstack/react-query").UseQueryResult<StaticProject | null, Error>;
|
|
4
13
|
export type UseProjectQueryParams = {
|
|
5
14
|
clankerToken: Address | null;
|
|
6
15
|
oraclePublicClient: PopPublicClient;
|
|
@@ -9,6 +18,7 @@ export type UseProjectQueryParams = {
|
|
|
9
18
|
/**
|
|
10
19
|
* Internal: Creates project query with all logic
|
|
11
20
|
* Used by LevrProvider
|
|
21
|
+
* Fetches dynamic stats (treasury, staking, governance, pricing) using static data from useStaticProjectQuery
|
|
12
22
|
*/
|
|
13
23
|
export declare function useProjectQuery({ clankerToken, oraclePublicClient, enabled: e, }: UseProjectQueryParams): import("@tanstack/react-query").UseQueryResult<import("../..").Project | null, Error>;
|
|
14
24
|
export type UseProjectsParams = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-project.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-project.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAGnC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"use-project.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-project.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAGnC,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAGlD,MAAM,MAAM,2BAA2B,GAAG;IACxC,YAAY,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,YAAY,EACZ,OAAO,EAAE,CAAQ,GAClB,EAAE,2BAA2B,+EAkB7B;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,kBAAkB,EAAE,eAAe,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,kBAAkB,EAClB,OAAO,EAAE,CAAQ,GAClB,EAAE,qBAAqB,yFAuBvB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,GAAG,IAAI,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA;AAExC,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,CAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAE,iBAAsB,yEAiBvF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-swap.d.ts","sourceRoot":"","sources":["../../../../src/client/hook/use-swap.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,CAAC;oBACN,CAAC;;;iFAqFb;QACD,UAAU,EAAE,OAAO,CAAA;QACnB,QAAQ,EAAE,MAAM,CAAA;QAChB,gBAAgB,CAAC,EAAE,MAAM,CAAA;QACzB,YAAY,EAAE,MAAM,CAAA;KACrB,KAAG,UAAU,GAAG,IAAI;;;EA0BtB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { UseQueryResult } from '@tanstack/react-query';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { Address } from 'viem';
|
|
4
|
+
import type { AirdropStatus } from '..';
|
|
4
5
|
import type { PoolData } from '../pool';
|
|
6
|
+
import type { Project } from '../project';
|
|
5
7
|
import type { ProposalsResult } from '../proposal';
|
|
6
8
|
import type { User } from '../user';
|
|
7
|
-
import { useProjectQuery } from './hook/use-project';
|
|
8
|
-
type Project = NonNullable<ReturnType<typeof useProjectQuery>['data']>;
|
|
9
9
|
/**
|
|
10
10
|
* Context value provided by LevrProvider
|
|
11
11
|
* Provides dual access: hierarchical (user.balances) + flat (balances)
|
|
@@ -19,13 +19,7 @@ export type LevrContextValue = {
|
|
|
19
19
|
project: UseQueryResult<Project | null>;
|
|
20
20
|
pool: UseQueryResult<PoolData | null>;
|
|
21
21
|
proposals: UseQueryResult<ProposalsResult | null>;
|
|
22
|
-
|
|
23
|
-
originalAdmin: Address;
|
|
24
|
-
admin: Address;
|
|
25
|
-
image: string;
|
|
26
|
-
metadata: string;
|
|
27
|
-
context: string;
|
|
28
|
-
} | null>;
|
|
22
|
+
airdropStatus: UseQueryResult<AirdropStatus | null>;
|
|
29
23
|
refetch: {
|
|
30
24
|
all: () => Promise<void>;
|
|
31
25
|
user: () => Promise<void>;
|
|
@@ -96,5 +90,4 @@ export declare const useLevrRefetch: () => {
|
|
|
96
90
|
afterExecute: () => Promise<void>;
|
|
97
91
|
afterAirdrop: () => Promise<void>;
|
|
98
92
|
};
|
|
99
|
-
export {};
|
|
100
93
|
//# sourceMappingURL=levr-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"levr-provider.d.ts","sourceRoot":"","sources":["../../../src/client/levr-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE3D,OAAO,KAAwD,MAAM,OAAO,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAInC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"levr-provider.d.ts","sourceRoot":"","sources":["../../../src/client/levr-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE3D,OAAO,KAAwD,MAAM,OAAO,CAAA;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAInC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,IAAI,CAAA;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAQnC;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAE7B,YAAY,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,eAAe,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAChD,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,WAAW,EAAE,OAAO,GAAG,SAAS,CAAA;IAGhC,IAAI,EAAE,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,CAAA;IACjC,OAAO,EAAE,cAAc,CAAC,OAAO,GAAG,IAAI,CAAC,CAAA;IACvC,IAAI,EAAE,cAAc,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;IACrC,SA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ACvB,YAAY,GACb,EAAE,iBAAiB,2CA8InB;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,gBAAgB,CAMjD;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,eAAe,OAAO,GAAG,IAAI,SAM/D,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc;SA7NlB,MAAM,OAAO,CAAC,IAAI,CAAC;UAClB,MAAM,OAAO,CAAC,IAAI,CAAC;aAChB,MAAM,OAAO,CAAC,IAAI,CAAC;UACtB,MAAM,OAAO,CAAC,IAAI,CAAC;eACd,MAAM,OAAO,CAAC,IAAI,CAAC;gBAGlB,MAAM,OAAO,CAAC,IAAI,CAAC;gBACnB,MAAM,OAAO,CAAC,IAAI,CAAC;kBACjB,MAAM,OAAO,CAAC,IAAI,CAAC;gBACrB,MAAM,OAAO,CAAC,IAAI,CAAC;iBAClB,MAAM,OAAO,CAAC,IAAI,CAAC;eACrB,MAAM,OAAO,CAAC,IAAI,CAAC;mBACf,MAAM,OAAO,CAAC,IAAI,CAAC;kBACpB,MAAM,OAAO,CAAC,IAAI,CAAC;kBACnB,MAAM,OAAO,CAAC,IAAI,CAAC;CA8MuB,CAAA"}
|
|
@@ -17,7 +17,521 @@ export type UpdateFeeReceiverParams = {
|
|
|
17
17
|
rewardIndex: bigint | number;
|
|
18
18
|
newRecipient: `0x${string}`;
|
|
19
19
|
};
|
|
20
|
+
export type TokenRewardsParams = {
|
|
21
|
+
publicClient?: PopPublicClient;
|
|
22
|
+
clankerToken: `0x${string}`;
|
|
23
|
+
chainId?: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Get tokenRewards from LP locker by reading the contract
|
|
27
|
+
* Returns pool info and fee receiver data
|
|
28
|
+
*/
|
|
29
|
+
export declare const tokenRewardsRead: (params: TokenRewardsParams) => Promise<{
|
|
30
|
+
token: `0x${string}`;
|
|
31
|
+
poolKey: {
|
|
32
|
+
currency0: `0x${string}`;
|
|
33
|
+
currency1: `0x${string}`;
|
|
34
|
+
fee: number;
|
|
35
|
+
tickSpacing: number;
|
|
36
|
+
hooks: `0x${string}`;
|
|
37
|
+
};
|
|
38
|
+
positionId: bigint;
|
|
39
|
+
numPositions: bigint;
|
|
40
|
+
rewardBps: readonly number[];
|
|
41
|
+
rewardAdmins: readonly `0x${string}`[];
|
|
42
|
+
rewardRecipients: readonly `0x${string}`[];
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* Get fee receiver contract calls for multicall
|
|
46
|
+
* Returns contract call to fetch tokenRewards from LP locker
|
|
47
|
+
*/
|
|
48
|
+
export declare function getFeeReceiverContracts(clankerToken: `0x${string}`, chainId: number): {
|
|
49
|
+
address: `0x${string}`;
|
|
50
|
+
abi: readonly [{
|
|
51
|
+
readonly type: "function";
|
|
52
|
+
readonly name: "collectRewards";
|
|
53
|
+
readonly inputs: readonly [{
|
|
54
|
+
readonly name: "token";
|
|
55
|
+
readonly type: "address";
|
|
56
|
+
readonly internalType: "address";
|
|
57
|
+
}];
|
|
58
|
+
readonly outputs: readonly [];
|
|
59
|
+
readonly stateMutability: "nonpayable";
|
|
60
|
+
}, {
|
|
61
|
+
readonly type: "function";
|
|
62
|
+
readonly name: "collectRewardsWithoutUnlock";
|
|
63
|
+
readonly inputs: readonly [{
|
|
64
|
+
readonly name: "token";
|
|
65
|
+
readonly type: "address";
|
|
66
|
+
readonly internalType: "address";
|
|
67
|
+
}];
|
|
68
|
+
readonly outputs: readonly [];
|
|
69
|
+
readonly stateMutability: "nonpayable";
|
|
70
|
+
}, {
|
|
71
|
+
readonly type: "function";
|
|
72
|
+
readonly name: "placeLiquidity";
|
|
73
|
+
readonly inputs: readonly [{
|
|
74
|
+
readonly name: "lockerConfig";
|
|
75
|
+
readonly type: "tuple";
|
|
76
|
+
readonly internalType: "struct IClanker.LockerConfig";
|
|
77
|
+
readonly components: readonly [{
|
|
78
|
+
readonly name: "locker";
|
|
79
|
+
readonly type: "address";
|
|
80
|
+
readonly internalType: "address";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "rewardAdmins";
|
|
83
|
+
readonly type: "address[]";
|
|
84
|
+
readonly internalType: "address[]";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "rewardRecipients";
|
|
87
|
+
readonly type: "address[]";
|
|
88
|
+
readonly internalType: "address[]";
|
|
89
|
+
}, {
|
|
90
|
+
readonly name: "rewardBps";
|
|
91
|
+
readonly type: "uint16[]";
|
|
92
|
+
readonly internalType: "uint16[]";
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "tickLower";
|
|
95
|
+
readonly type: "int24[]";
|
|
96
|
+
readonly internalType: "int24[]";
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "tickUpper";
|
|
99
|
+
readonly type: "int24[]";
|
|
100
|
+
readonly internalType: "int24[]";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "positionBps";
|
|
103
|
+
readonly type: "uint16[]";
|
|
104
|
+
readonly internalType: "uint16[]";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "lockerData";
|
|
107
|
+
readonly type: "bytes";
|
|
108
|
+
readonly internalType: "bytes";
|
|
109
|
+
}];
|
|
110
|
+
}, {
|
|
111
|
+
readonly name: "poolConfig";
|
|
112
|
+
readonly type: "tuple";
|
|
113
|
+
readonly internalType: "struct IClanker.PoolConfig";
|
|
114
|
+
readonly components: readonly [{
|
|
115
|
+
readonly name: "hook";
|
|
116
|
+
readonly type: "address";
|
|
117
|
+
readonly internalType: "address";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "pairedToken";
|
|
120
|
+
readonly type: "address";
|
|
121
|
+
readonly internalType: "address";
|
|
122
|
+
}, {
|
|
123
|
+
readonly name: "tickIfToken0IsClanker";
|
|
124
|
+
readonly type: "int24";
|
|
125
|
+
readonly internalType: "int24";
|
|
126
|
+
}, {
|
|
127
|
+
readonly name: "tickSpacing";
|
|
128
|
+
readonly type: "int24";
|
|
129
|
+
readonly internalType: "int24";
|
|
130
|
+
}, {
|
|
131
|
+
readonly name: "poolData";
|
|
132
|
+
readonly type: "bytes";
|
|
133
|
+
readonly internalType: "bytes";
|
|
134
|
+
}];
|
|
135
|
+
}, {
|
|
136
|
+
readonly name: "poolKey";
|
|
137
|
+
readonly type: "tuple";
|
|
138
|
+
readonly internalType: "struct PoolKey";
|
|
139
|
+
readonly components: readonly [{
|
|
140
|
+
readonly name: "currency0";
|
|
141
|
+
readonly type: "address";
|
|
142
|
+
readonly internalType: "Currency";
|
|
143
|
+
}, {
|
|
144
|
+
readonly name: "currency1";
|
|
145
|
+
readonly type: "address";
|
|
146
|
+
readonly internalType: "Currency";
|
|
147
|
+
}, {
|
|
148
|
+
readonly name: "fee";
|
|
149
|
+
readonly type: "uint24";
|
|
150
|
+
readonly internalType: "uint24";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "tickSpacing";
|
|
153
|
+
readonly type: "int24";
|
|
154
|
+
readonly internalType: "int24";
|
|
155
|
+
}, {
|
|
156
|
+
readonly name: "hooks";
|
|
157
|
+
readonly type: "address";
|
|
158
|
+
readonly internalType: "contract IHooks";
|
|
159
|
+
}];
|
|
160
|
+
}, {
|
|
161
|
+
readonly name: "poolSupply";
|
|
162
|
+
readonly type: "uint256";
|
|
163
|
+
readonly internalType: "uint256";
|
|
164
|
+
}, {
|
|
165
|
+
readonly name: "token";
|
|
166
|
+
readonly type: "address";
|
|
167
|
+
readonly internalType: "address";
|
|
168
|
+
}];
|
|
169
|
+
readonly outputs: readonly [{
|
|
170
|
+
readonly name: "tokenId";
|
|
171
|
+
readonly type: "uint256";
|
|
172
|
+
readonly internalType: "uint256";
|
|
173
|
+
}];
|
|
174
|
+
readonly stateMutability: "nonpayable";
|
|
175
|
+
}, {
|
|
176
|
+
readonly type: "function";
|
|
177
|
+
readonly name: "supportsInterface";
|
|
178
|
+
readonly inputs: readonly [{
|
|
179
|
+
readonly name: "interfaceId";
|
|
180
|
+
readonly type: "bytes4";
|
|
181
|
+
readonly internalType: "bytes4";
|
|
182
|
+
}];
|
|
183
|
+
readonly outputs: readonly [{
|
|
184
|
+
readonly name: "";
|
|
185
|
+
readonly type: "bool";
|
|
186
|
+
readonly internalType: "bool";
|
|
187
|
+
}];
|
|
188
|
+
readonly stateMutability: "view";
|
|
189
|
+
}, {
|
|
190
|
+
readonly type: "function";
|
|
191
|
+
readonly name: "tokenRewards";
|
|
192
|
+
readonly inputs: readonly [{
|
|
193
|
+
readonly name: "token";
|
|
194
|
+
readonly type: "address";
|
|
195
|
+
readonly internalType: "address";
|
|
196
|
+
}];
|
|
197
|
+
readonly outputs: readonly [{
|
|
198
|
+
readonly name: "";
|
|
199
|
+
readonly type: "tuple";
|
|
200
|
+
readonly internalType: "struct IClankerLpLocker.TokenRewardInfo";
|
|
201
|
+
readonly components: readonly [{
|
|
202
|
+
readonly name: "token";
|
|
203
|
+
readonly type: "address";
|
|
204
|
+
readonly internalType: "address";
|
|
205
|
+
}, {
|
|
206
|
+
readonly name: "poolKey";
|
|
207
|
+
readonly type: "tuple";
|
|
208
|
+
readonly internalType: "struct PoolKey";
|
|
209
|
+
readonly components: readonly [{
|
|
210
|
+
readonly name: "currency0";
|
|
211
|
+
readonly type: "address";
|
|
212
|
+
readonly internalType: "Currency";
|
|
213
|
+
}, {
|
|
214
|
+
readonly name: "currency1";
|
|
215
|
+
readonly type: "address";
|
|
216
|
+
readonly internalType: "Currency";
|
|
217
|
+
}, {
|
|
218
|
+
readonly name: "fee";
|
|
219
|
+
readonly type: "uint24";
|
|
220
|
+
readonly internalType: "uint24";
|
|
221
|
+
}, {
|
|
222
|
+
readonly name: "tickSpacing";
|
|
223
|
+
readonly type: "int24";
|
|
224
|
+
readonly internalType: "int24";
|
|
225
|
+
}, {
|
|
226
|
+
readonly name: "hooks";
|
|
227
|
+
readonly type: "address";
|
|
228
|
+
readonly internalType: "contract IHooks";
|
|
229
|
+
}];
|
|
230
|
+
}, {
|
|
231
|
+
readonly name: "positionId";
|
|
232
|
+
readonly type: "uint256";
|
|
233
|
+
readonly internalType: "uint256";
|
|
234
|
+
}, {
|
|
235
|
+
readonly name: "numPositions";
|
|
236
|
+
readonly type: "uint256";
|
|
237
|
+
readonly internalType: "uint256";
|
|
238
|
+
}, {
|
|
239
|
+
readonly name: "rewardBps";
|
|
240
|
+
readonly type: "uint16[]";
|
|
241
|
+
readonly internalType: "uint16[]";
|
|
242
|
+
}, {
|
|
243
|
+
readonly name: "rewardAdmins";
|
|
244
|
+
readonly type: "address[]";
|
|
245
|
+
readonly internalType: "address[]";
|
|
246
|
+
}, {
|
|
247
|
+
readonly name: "rewardRecipients";
|
|
248
|
+
readonly type: "address[]";
|
|
249
|
+
readonly internalType: "address[]";
|
|
250
|
+
}];
|
|
251
|
+
}];
|
|
252
|
+
readonly stateMutability: "view";
|
|
253
|
+
}, {
|
|
254
|
+
readonly type: "function";
|
|
255
|
+
readonly name: "updateRewardAdmin";
|
|
256
|
+
readonly inputs: readonly [{
|
|
257
|
+
readonly name: "token";
|
|
258
|
+
readonly type: "address";
|
|
259
|
+
readonly internalType: "address";
|
|
260
|
+
}, {
|
|
261
|
+
readonly name: "rewardIndex";
|
|
262
|
+
readonly type: "uint256";
|
|
263
|
+
readonly internalType: "uint256";
|
|
264
|
+
}, {
|
|
265
|
+
readonly name: "newAdmin";
|
|
266
|
+
readonly type: "address";
|
|
267
|
+
readonly internalType: "address";
|
|
268
|
+
}];
|
|
269
|
+
readonly outputs: readonly [];
|
|
270
|
+
readonly stateMutability: "nonpayable";
|
|
271
|
+
}, {
|
|
272
|
+
readonly type: "function";
|
|
273
|
+
readonly name: "updateRewardRecipient";
|
|
274
|
+
readonly inputs: readonly [{
|
|
275
|
+
readonly name: "token";
|
|
276
|
+
readonly type: "address";
|
|
277
|
+
readonly internalType: "address";
|
|
278
|
+
}, {
|
|
279
|
+
readonly name: "rewardIndex";
|
|
280
|
+
readonly type: "uint256";
|
|
281
|
+
readonly internalType: "uint256";
|
|
282
|
+
}, {
|
|
283
|
+
readonly name: "newRecipient";
|
|
284
|
+
readonly type: "address";
|
|
285
|
+
readonly internalType: "address";
|
|
286
|
+
}];
|
|
287
|
+
readonly outputs: readonly [];
|
|
288
|
+
readonly stateMutability: "nonpayable";
|
|
289
|
+
}, {
|
|
290
|
+
readonly type: "event";
|
|
291
|
+
readonly name: "ClaimedRewards";
|
|
292
|
+
readonly inputs: readonly [{
|
|
293
|
+
readonly name: "token";
|
|
294
|
+
readonly type: "address";
|
|
295
|
+
readonly indexed: true;
|
|
296
|
+
readonly internalType: "address";
|
|
297
|
+
}, {
|
|
298
|
+
readonly name: "amount0";
|
|
299
|
+
readonly type: "uint256";
|
|
300
|
+
readonly indexed: false;
|
|
301
|
+
readonly internalType: "uint256";
|
|
302
|
+
}, {
|
|
303
|
+
readonly name: "amount1";
|
|
304
|
+
readonly type: "uint256";
|
|
305
|
+
readonly indexed: false;
|
|
306
|
+
readonly internalType: "uint256";
|
|
307
|
+
}, {
|
|
308
|
+
readonly name: "rewards0";
|
|
309
|
+
readonly type: "uint256[]";
|
|
310
|
+
readonly indexed: false;
|
|
311
|
+
readonly internalType: "uint256[]";
|
|
312
|
+
}, {
|
|
313
|
+
readonly name: "rewards1";
|
|
314
|
+
readonly type: "uint256[]";
|
|
315
|
+
readonly indexed: false;
|
|
316
|
+
readonly internalType: "uint256[]";
|
|
317
|
+
}];
|
|
318
|
+
readonly anonymous: false;
|
|
319
|
+
}, {
|
|
320
|
+
readonly type: "event";
|
|
321
|
+
readonly name: "Received";
|
|
322
|
+
readonly inputs: readonly [{
|
|
323
|
+
readonly name: "from";
|
|
324
|
+
readonly type: "address";
|
|
325
|
+
readonly indexed: true;
|
|
326
|
+
readonly internalType: "address";
|
|
327
|
+
}, {
|
|
328
|
+
readonly name: "positionId";
|
|
329
|
+
readonly type: "uint256";
|
|
330
|
+
readonly indexed: false;
|
|
331
|
+
readonly internalType: "uint256";
|
|
332
|
+
}];
|
|
333
|
+
readonly anonymous: false;
|
|
334
|
+
}, {
|
|
335
|
+
readonly type: "event";
|
|
336
|
+
readonly name: "RewardAdminUpdated";
|
|
337
|
+
readonly inputs: readonly [{
|
|
338
|
+
readonly name: "token";
|
|
339
|
+
readonly type: "address";
|
|
340
|
+
readonly indexed: true;
|
|
341
|
+
readonly internalType: "address";
|
|
342
|
+
}, {
|
|
343
|
+
readonly name: "rewardIndex";
|
|
344
|
+
readonly type: "uint256";
|
|
345
|
+
readonly indexed: true;
|
|
346
|
+
readonly internalType: "uint256";
|
|
347
|
+
}, {
|
|
348
|
+
readonly name: "oldAdmin";
|
|
349
|
+
readonly type: "address";
|
|
350
|
+
readonly indexed: false;
|
|
351
|
+
readonly internalType: "address";
|
|
352
|
+
}, {
|
|
353
|
+
readonly name: "newAdmin";
|
|
354
|
+
readonly type: "address";
|
|
355
|
+
readonly indexed: false;
|
|
356
|
+
readonly internalType: "address";
|
|
357
|
+
}];
|
|
358
|
+
readonly anonymous: false;
|
|
359
|
+
}, {
|
|
360
|
+
readonly type: "event";
|
|
361
|
+
readonly name: "RewardRecipientUpdated";
|
|
362
|
+
readonly inputs: readonly [{
|
|
363
|
+
readonly name: "token";
|
|
364
|
+
readonly type: "address";
|
|
365
|
+
readonly indexed: true;
|
|
366
|
+
readonly internalType: "address";
|
|
367
|
+
}, {
|
|
368
|
+
readonly name: "rewardIndex";
|
|
369
|
+
readonly type: "uint256";
|
|
370
|
+
readonly indexed: true;
|
|
371
|
+
readonly internalType: "uint256";
|
|
372
|
+
}, {
|
|
373
|
+
readonly name: "oldRecipient";
|
|
374
|
+
readonly type: "address";
|
|
375
|
+
readonly indexed: false;
|
|
376
|
+
readonly internalType: "address";
|
|
377
|
+
}, {
|
|
378
|
+
readonly name: "newRecipient";
|
|
379
|
+
readonly type: "address";
|
|
380
|
+
readonly indexed: false;
|
|
381
|
+
readonly internalType: "address";
|
|
382
|
+
}];
|
|
383
|
+
readonly anonymous: false;
|
|
384
|
+
}, {
|
|
385
|
+
readonly type: "event";
|
|
386
|
+
readonly name: "TokenRewardAdded";
|
|
387
|
+
readonly inputs: readonly [{
|
|
388
|
+
readonly name: "token";
|
|
389
|
+
readonly type: "address";
|
|
390
|
+
readonly indexed: false;
|
|
391
|
+
readonly internalType: "address";
|
|
392
|
+
}, {
|
|
393
|
+
readonly name: "poolKey";
|
|
394
|
+
readonly type: "tuple";
|
|
395
|
+
readonly indexed: false;
|
|
396
|
+
readonly internalType: "struct PoolKey";
|
|
397
|
+
readonly components: readonly [{
|
|
398
|
+
readonly name: "currency0";
|
|
399
|
+
readonly type: "address";
|
|
400
|
+
readonly internalType: "Currency";
|
|
401
|
+
}, {
|
|
402
|
+
readonly name: "currency1";
|
|
403
|
+
readonly type: "address";
|
|
404
|
+
readonly internalType: "Currency";
|
|
405
|
+
}, {
|
|
406
|
+
readonly name: "fee";
|
|
407
|
+
readonly type: "uint24";
|
|
408
|
+
readonly internalType: "uint24";
|
|
409
|
+
}, {
|
|
410
|
+
readonly name: "tickSpacing";
|
|
411
|
+
readonly type: "int24";
|
|
412
|
+
readonly internalType: "int24";
|
|
413
|
+
}, {
|
|
414
|
+
readonly name: "hooks";
|
|
415
|
+
readonly type: "address";
|
|
416
|
+
readonly internalType: "contract IHooks";
|
|
417
|
+
}];
|
|
418
|
+
}, {
|
|
419
|
+
readonly name: "poolSupply";
|
|
420
|
+
readonly type: "uint256";
|
|
421
|
+
readonly indexed: false;
|
|
422
|
+
readonly internalType: "uint256";
|
|
423
|
+
}, {
|
|
424
|
+
readonly name: "positionId";
|
|
425
|
+
readonly type: "uint256";
|
|
426
|
+
readonly indexed: false;
|
|
427
|
+
readonly internalType: "uint256";
|
|
428
|
+
}, {
|
|
429
|
+
readonly name: "numPositions";
|
|
430
|
+
readonly type: "uint256";
|
|
431
|
+
readonly indexed: false;
|
|
432
|
+
readonly internalType: "uint256";
|
|
433
|
+
}, {
|
|
434
|
+
readonly name: "rewardBps";
|
|
435
|
+
readonly type: "uint16[]";
|
|
436
|
+
readonly indexed: false;
|
|
437
|
+
readonly internalType: "uint16[]";
|
|
438
|
+
}, {
|
|
439
|
+
readonly name: "rewardAdmins";
|
|
440
|
+
readonly type: "address[]";
|
|
441
|
+
readonly indexed: false;
|
|
442
|
+
readonly internalType: "address[]";
|
|
443
|
+
}, {
|
|
444
|
+
readonly name: "rewardRecipients";
|
|
445
|
+
readonly type: "address[]";
|
|
446
|
+
readonly indexed: false;
|
|
447
|
+
readonly internalType: "address[]";
|
|
448
|
+
}, {
|
|
449
|
+
readonly name: "tickLower";
|
|
450
|
+
readonly type: "int24[]";
|
|
451
|
+
readonly indexed: false;
|
|
452
|
+
readonly internalType: "int24[]";
|
|
453
|
+
}, {
|
|
454
|
+
readonly name: "tickUpper";
|
|
455
|
+
readonly type: "int24[]";
|
|
456
|
+
readonly indexed: false;
|
|
457
|
+
readonly internalType: "int24[]";
|
|
458
|
+
}, {
|
|
459
|
+
readonly name: "positionBps";
|
|
460
|
+
readonly type: "uint16[]";
|
|
461
|
+
readonly indexed: false;
|
|
462
|
+
readonly internalType: "uint16[]";
|
|
463
|
+
}];
|
|
464
|
+
readonly anonymous: false;
|
|
465
|
+
}, {
|
|
466
|
+
readonly type: "error";
|
|
467
|
+
readonly name: "InvalidPositionBps";
|
|
468
|
+
readonly inputs: readonly [];
|
|
469
|
+
}, {
|
|
470
|
+
readonly type: "error";
|
|
471
|
+
readonly name: "InvalidRewardBps";
|
|
472
|
+
readonly inputs: readonly [];
|
|
473
|
+
}, {
|
|
474
|
+
readonly type: "error";
|
|
475
|
+
readonly name: "MismatchedPositionInfos";
|
|
476
|
+
readonly inputs: readonly [];
|
|
477
|
+
}, {
|
|
478
|
+
readonly type: "error";
|
|
479
|
+
readonly name: "MismatchedRewardArrays";
|
|
480
|
+
readonly inputs: readonly [];
|
|
481
|
+
}, {
|
|
482
|
+
readonly type: "error";
|
|
483
|
+
readonly name: "NoPositions";
|
|
484
|
+
readonly inputs: readonly [];
|
|
485
|
+
}, {
|
|
486
|
+
readonly type: "error";
|
|
487
|
+
readonly name: "NoRewardRecipients";
|
|
488
|
+
readonly inputs: readonly [];
|
|
489
|
+
}, {
|
|
490
|
+
readonly type: "error";
|
|
491
|
+
readonly name: "TickRangeLowerThanStartingTick";
|
|
492
|
+
readonly inputs: readonly [];
|
|
493
|
+
}, {
|
|
494
|
+
readonly type: "error";
|
|
495
|
+
readonly name: "TicksBackwards";
|
|
496
|
+
readonly inputs: readonly [];
|
|
497
|
+
}, {
|
|
498
|
+
readonly type: "error";
|
|
499
|
+
readonly name: "TicksNotMultipleOfTickSpacing";
|
|
500
|
+
readonly inputs: readonly [];
|
|
501
|
+
}, {
|
|
502
|
+
readonly type: "error";
|
|
503
|
+
readonly name: "TicksOutOfTickBounds";
|
|
504
|
+
readonly inputs: readonly [];
|
|
505
|
+
}, {
|
|
506
|
+
readonly type: "error";
|
|
507
|
+
readonly name: "TokenAlreadyHasRewards";
|
|
508
|
+
readonly inputs: readonly [];
|
|
509
|
+
}, {
|
|
510
|
+
readonly type: "error";
|
|
511
|
+
readonly name: "TooManyPositions";
|
|
512
|
+
readonly inputs: readonly [];
|
|
513
|
+
}, {
|
|
514
|
+
readonly type: "error";
|
|
515
|
+
readonly name: "TooManyRewardParticipants";
|
|
516
|
+
readonly inputs: readonly [];
|
|
517
|
+
}, {
|
|
518
|
+
readonly type: "error";
|
|
519
|
+
readonly name: "Unauthorized";
|
|
520
|
+
readonly inputs: readonly [];
|
|
521
|
+
}, {
|
|
522
|
+
readonly type: "error";
|
|
523
|
+
readonly name: "ZeroRewardAddress";
|
|
524
|
+
readonly inputs: readonly [];
|
|
525
|
+
}, {
|
|
526
|
+
readonly type: "error";
|
|
527
|
+
readonly name: "ZeroRewardAmount";
|
|
528
|
+
readonly inputs: readonly [];
|
|
529
|
+
}];
|
|
530
|
+
functionName: "tokenRewards";
|
|
531
|
+
args: `0x${string}`[];
|
|
532
|
+
}[];
|
|
20
533
|
/**
|
|
534
|
+
* @deprecated Use tokenRewardsRead() instead
|
|
21
535
|
* Get tokenRewards from LP locker (shared utility)
|
|
22
536
|
* Returns pool info and fee receiver data
|
|
23
537
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fee-receivers.d.ts","sourceRoot":"","sources":["../../src/fee-receivers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE/D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,eAAe,CAAA;IAC7B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAA;IAC3B,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,EAAE,OAAO,CAAA;IACtB,KAAK,EAAE,KAAK,MAAM,EAAE,CAAA;IACpB,SAAS,EAAE,KAAK,MAAM,EAAE,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,YAAY,EAAE,eAAe,CAAA;IAC7B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAA;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAA;CAC5B,CAAA;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,MAAM,EAAE;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"fee-receivers.d.ts","sourceRoot":"","sources":["../../src/fee-receivers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE/D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,EAAE,eAAe,CAAA;IAC7B,YAAY,EAAE,KAAK,MAAM,EAAE,CAAA;IAC3B,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,CAAA;CAC5B,CAAA;AAED,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAcnF;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,MAAM,EAAE;;;;;;;;;;;;;;GAE/F;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,kBAAkB,EAAE;IAClB,YAAY,CAAC,EAAE,SAAS,KAAK,MAAM,EAAE,EAAE,CAAA;IACvC,gBAAgB,CAAC,EAAE,SAAS,KAAK,MAAM,EAAE,EAAE,CAAA;IAC3C,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC9B,EACD,WAAW,CAAC,EAAE,KAAK,MAAM,EAAE,GAC1B,gBAAgB,EAAE,CAWpB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,EACjC,YAAY,EACZ,YAAY,EACZ,WAAW,GACZ,EAAE,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,EAAE,GAAG,SAAS,CAAC,CAO9D;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,WAAW,EACX,YAAY,GACb,EAAE,uBAAuB,GAAG,OAAO,CAAC,KAAK,MAAM,EAAE,CAAC,CAqBlD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TransactionReceipt } from 'viem';
|
|
2
2
|
import type { Project } from '.';
|
|
3
|
+
import type { AirdropStatus } from './treasury';
|
|
3
4
|
import type { BalanceResult, PopPublicClient, PopWalletClient } from './types';
|
|
4
5
|
export type GovernanceConfig = {
|
|
5
6
|
wallet: PopWalletClient;
|
|
@@ -98,8 +99,8 @@ export declare class Governance {
|
|
|
98
99
|
}>;
|
|
99
100
|
/**
|
|
100
101
|
* Claim airdrop for treasury
|
|
101
|
-
*
|
|
102
|
+
* Requires airdrop status to be fetched beforehand
|
|
102
103
|
*/
|
|
103
|
-
claimAirdrop(): Promise<TransactionReceipt>;
|
|
104
|
+
claimAirdrop(airdropStatus: AirdropStatus): Promise<TransactionReceipt>;
|
|
104
105
|
}
|
|
105
106
|
//# sourceMappingURL=governance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"governance.d.ts","sourceRoot":"","sources":["../../src/governance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,MAAM,CAAA;AAG9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,GAAG,CAAA;AAGhC,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,eAAe,CAAA;IACvB,YAAY,EAAE,eAAe,CAAA;IAC7B,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAA;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,KAAK,MAAM,EAAE,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,iBAAiB,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAA;IACvB,MAAM,EAA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