@floorlaunchpad/sdk 0.6.0 → 0.7.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/CHANGELOG.md +136 -0
- package/dist/abi/evm-event-names.js +7 -0
- package/dist/abi/evm.gen.js +6 -0
- package/dist/abi/functions.gen.js +48 -0
- package/dist/abi/solana.gen.js +5 -0
- package/dist/errors.js +2 -2
- package/dist/events/types.gen.js +1 -1
- package/dist/evm/chains.js +31 -0
- package/dist/evm/floor/calls.js +5 -0
- package/dist/evm/squid.js +1 -1
- package/dist/generated/interface.gen.js +48 -43
- package/dist/indexer/bodies.js +135 -4
- package/dist/indexer/client.js +10 -1
- package/dist/indexer/contract.js +65 -6
- package/dist/indexer/paths.js +34 -7
- package/dist/indexer/read.js +12 -3
- package/dist/indexer/stream.js +2 -2
- package/dist/math/v2/fees.js +30 -4
- package/dist/math/v2/milestones.js +1 -1
- package/dist/math/v2/receipt.js +3 -3
- package/dist/math/v2/rows.js +17 -0
- package/dist/math/v2/team.js +14 -1
- package/dist/solana/floor/accounts.js +30 -3
- package/dist/solana/floor/events.js +6 -0
- package/dist/solana/floor/instructions.js +23 -1
- package/dist/solana/floor/program.js +3 -0
- package/dist/ton/gas.js +2 -2
- package/dist/v2/events.js +2 -0
- package/dist/v2/evm.js +5 -0
- package/dist/v2/layouts.js +3 -1
- package/dist/v2/solana.js +1 -1
- package/dist/v2/tx/evm.js +15 -1
- package/docs/cursor-pages.md +9 -3
- package/docs/ton.md +1 -1
- package/package.json +1 -1
- package/src/abi/evm-event-names.ts +7 -0
- package/src/abi/evm.gen.ts +6 -0
- package/src/abi/functions.gen.ts +48 -0
- package/src/abi/solana.gen.ts +5 -0
- package/src/errors.ts +2 -2
- package/src/events/types.gen.ts +57 -1
- package/src/evm/chains.ts +31 -0
- package/src/evm/floor/calls.ts +5 -0
- package/src/evm/squid.ts +1 -1
- package/src/generated/interface.gen.ts +48 -43
- package/src/indexer/bodies.ts +142 -4
- package/src/indexer/client.ts +17 -4
- package/src/indexer/contract.ts +66 -7
- package/src/indexer/paths.ts +62 -7
- package/src/indexer/read.ts +14 -5
- package/src/indexer/stream.ts +4 -4
- package/src/math/v2/fees.ts +30 -4
- package/src/math/v2/milestones.ts +1 -1
- package/src/math/v2/receipt.ts +7 -3
- package/src/math/v2/rows.ts +17 -0
- package/src/math/v2/team.ts +14 -1
- package/src/solana/floor/accounts.ts +30 -3
- package/src/solana/floor/events.ts +6 -0
- package/src/solana/floor/instructions.ts +23 -1
- package/src/solana/floor/program.ts +3 -0
- package/src/ton/gas.ts +2 -2
- package/src/v2/events.ts +3 -1
- package/src/v2/evm.ts +5 -0
- package/src/v2/layouts.ts +3 -1
- package/src/v2/solana.ts +1 -1
- package/src/v2/tx/evm.ts +15 -1
- package/src/v2/types.ts +11 -1
package/dist/math/v2/team.js
CHANGED
|
@@ -9,10 +9,23 @@ export const WEIGHT_ONE = 1_000_000_000n;
|
|
|
9
9
|
|
|
10
10
|
export const CREATOR_BUY_LOCK_SECS = 86_400n;
|
|
11
11
|
|
|
12
|
-
export {
|
|
12
|
+
export {
|
|
13
|
+
CREATOR_REF_BPS,
|
|
14
|
+
CREATOR_REF_OG_BPS,
|
|
15
|
+
OG_MAX,
|
|
16
|
+
OG_WINDOW_SECS,
|
|
17
|
+
TRADER_REF_BPS,
|
|
18
|
+
TRADER_REF_OG_BPS,
|
|
19
|
+
ogLaunch,
|
|
20
|
+
ogLive,
|
|
21
|
+
ogUntil,
|
|
22
|
+
tierBps,
|
|
23
|
+
} from "./fees.js";
|
|
13
24
|
|
|
14
25
|
export { platformLegs as platformLegsV2, creatorLegs as creatorLegsV2 } from "./fees.js";
|
|
15
26
|
|
|
27
|
+
export { platformLegsOg as platformLegsOgV2, creatorLegsOg as creatorLegsOgV2 } from "./fees.js";
|
|
28
|
+
|
|
16
29
|
const u128 = (x ) => (x < 0n || x > U128_MAX ? fail("Overflow") : x);
|
|
17
30
|
const members = (n , what ) => {
|
|
18
31
|
if (n !== MAX_MEMBERS) throw new RangeError(`${what}: ${n} entries, want ${MAX_MEMBERS}`);
|
|
@@ -87,14 +87,34 @@ export const TRADER_REF = [
|
|
|
87
87
|
["revoked", "u8"],
|
|
88
88
|
|
|
89
89
|
["pad0", "bytes:5"],
|
|
90
|
-
|
|
90
|
+
|
|
91
|
+
["og_until", "u64[3]"],
|
|
91
92
|
];
|
|
92
93
|
|
|
93
94
|
export const TRADER_LINK = [
|
|
94
95
|
["wallet", "pubkey"],
|
|
95
96
|
["tiers", "pubkey[3]"],
|
|
96
97
|
["bump", "u8"],
|
|
97
|
-
|
|
98
|
+
|
|
99
|
+
["og_until", "bytes:24"],
|
|
100
|
+
];
|
|
101
|
+
|
|
102
|
+
export const OG_USER = [
|
|
103
|
+
["referrer", "pubkey"],
|
|
104
|
+
["from", "i64"],
|
|
105
|
+
["until", "i64"],
|
|
106
|
+
["bump", "u8"],
|
|
107
|
+
["revoked", "u8"],
|
|
108
|
+
["pad0", "bytes:6"],
|
|
109
|
+
["reserved", "bytes:32"],
|
|
110
|
+
];
|
|
111
|
+
|
|
112
|
+
export const OG_COUNT = [
|
|
113
|
+
["count", "u16"],
|
|
114
|
+
["bump", "u8"],
|
|
115
|
+
["pad0", "bytes:5"],
|
|
116
|
+
["total", "u64"],
|
|
117
|
+
["reserved", "bytes:16"],
|
|
98
118
|
];
|
|
99
119
|
|
|
100
120
|
export const REF_OWED = [
|
|
@@ -206,7 +226,7 @@ export const GENESIS_ALLOC_WAGMI_CLAIMED = 8;
|
|
|
206
226
|
|
|
207
227
|
const NESTED = { SlotMember: SLOT_MEMBER };
|
|
208
228
|
|
|
209
|
-
export const LAYOUTS = { Config: CONFIG, QuoteEntry: QUOTE_ENTRY, TeamSlot: TEAM_SLOT, SlotMember: SLOT_MEMBER, TraderRef: TRADER_REF, TraderLink: TRADER_LINK, RefOwed: REF_OWED, GenesisRaise: GENESIS_RAISE, GenesisAllocation: GENESIS_ALLOCATION } ;
|
|
229
|
+
export const LAYOUTS = { Config: CONFIG, QuoteEntry: QUOTE_ENTRY, TeamSlot: TEAM_SLOT, SlotMember: SLOT_MEMBER, TraderRef: TRADER_REF, TraderLink: TRADER_LINK, RefOwed: REF_OWED, OgUser: OG_USER, OgCount: OG_COUNT, GenesisRaise: GENESIS_RAISE, GenesisAllocation: GENESIS_ALLOCATION } ;
|
|
210
230
|
|
|
211
231
|
function scalarSize(t ) {
|
|
212
232
|
switch (t) {
|
|
@@ -364,6 +384,13 @@ export const decodeTeamSlot = (d ) => decodeAccount("TeamSlot", d);
|
|
|
364
384
|
export const decodeTraderRef = (d ) => decodeAccount("TraderRef", d);
|
|
365
385
|
export const decodeTraderLink = (d ) => decodeAccount("TraderLink", d);
|
|
366
386
|
export const decodeRefOwed = (d ) => decodeAccount("RefOwed", d);
|
|
387
|
+
export const decodeOgUser = (d ) => decodeAccount("OgUser", d);
|
|
388
|
+
export const decodeOgCount = (d ) => decodeAccount("OgCount", d);
|
|
389
|
+
|
|
390
|
+
export function traderLinkOgUntil(ogUntil ) {
|
|
391
|
+
const v = new DataView(ogUntil.buffer, ogUntil.byteOffset, ogUntil.byteLength);
|
|
392
|
+
return [v.getBigUint64(0, true), v.getBigUint64(8, true), v.getBigUint64(16, true)];
|
|
393
|
+
}
|
|
367
394
|
export const decodeGenesisRaise = (d ) => decodeAccount("GenesisRaise", d);
|
|
368
395
|
export const decodeGenesisAllocation = (d ) => decodeAccount("GenesisAllocation", d);
|
|
369
396
|
|
|
@@ -29,6 +29,12 @@ export const EVENTS = {
|
|
|
29
29
|
TraderLinkOpened: S(["trader", "pubkey"], ["tiers", "pubkey[3]"]),
|
|
30
30
|
|
|
31
31
|
TraderRefCleared: S(["trader", "pubkey"], ["records", "u16"]),
|
|
32
|
+
|
|
33
|
+
OgUserSet: S(["referrer", "pubkey"], ["from", "i64"], ["until", "i64"], ["count", "u16"]),
|
|
34
|
+
|
|
35
|
+
OgUserRevoked: S(["referrer", "pubkey"], ["until", "i64"], ["count", "u16"]),
|
|
36
|
+
|
|
37
|
+
OgSynced: S(["referrer", "pubkey"], ["records", "u16"]),
|
|
32
38
|
CreatorBuyUnlocked: S(["launch", "pubkey"], ["creator", "pubkey"], ["tokens", "u64"], ["members", "u64[10]?"], ["paid", "u64?"]),
|
|
33
39
|
RefOwedOpened: S(["referrer", "pubkey"], ["quoteMint", "pubkey"]),
|
|
34
40
|
RefsRolled: S(["quoteMint", "pubkey"], ["traderRefs", "u16"], ["amount", "u64"]),
|
|
@@ -5,7 +5,7 @@ import { R, RS, W, WS, instructionDiscriminator } from "../instruction.js";
|
|
|
5
5
|
import { SYSTEM_PROGRAM_ID, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, WSOL_MINT, associatedTokenAddress } from "../pda.js";
|
|
6
6
|
import {
|
|
7
7
|
FLOOR_AMM_PROGRAM_ID, GENESIS_USDC_MINT, INSTRUCTIONS_SYSVAR_ID, METADATA_PROGRAM_ID, configPda, floorEventAuthorityPda, genesisAllocPda, genesisConvertBandPda, genesisMigrationVaultPda, genesisRaisePda, genesisRaiseTokenVault,
|
|
8
|
-
genesisVaultFloor, genesisVaultUsdc, launchPda, metadataPda, presetPda, quoteEntryPda, teamSlotPda, traderLinkPda,
|
|
8
|
+
genesisVaultFloor, genesisVaultUsdc, launchPda, metadataPda, ogCountPda, ogUserPda, presetPda, quoteEntryPda, teamSlotPda, traderLinkPda,
|
|
9
9
|
} from "./program.js";
|
|
10
10
|
import { Writer } from "./borsh.js";
|
|
11
11
|
import { CLAIM_BITS, CLAIM_KNOWN_MASKS, CLAIM_RESERVED, CLAIM_CREATOR, CLAIM_CREATOR_REF, CLAIM_TEAM_SLOT, CLAIM_TRADER_REF, CLAIM_RESERVED_HOLDER, CLAIM_EXTRA, CLAIM_TEAM_BUY, CLAIM_SHARE_BOUGHT } from "../../generated/index.js";
|
|
@@ -189,6 +189,28 @@ export function openTraderLinkInstruction(p
|
|
|
189
189
|
);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
+
export function setOgUserInstruction(p ) {
|
|
193
|
+
return ix(
|
|
194
|
+
"set_og_user",
|
|
195
|
+
[WS(p.payer), RS(p.referralAuthority), R(p.config ?? configPda(p.programId)[0]), W(ogUserPda(p.referrer, p.programId)[0]), W(ogCountPda(p.programId)[0]), R(SYSTEM_PROGRAM_ID)],
|
|
196
|
+
(w) => w.pubkey(p.referrer),
|
|
197
|
+
p,
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export function revokeOgUserInstruction(p ) {
|
|
202
|
+
return ix(
|
|
203
|
+
"revoke_og_user",
|
|
204
|
+
[RS(p.authority), R(p.config ?? configPda(p.programId)[0]), W(ogUserPda(p.referrer, p.programId)[0]), W(ogCountPda(p.programId)[0])],
|
|
205
|
+
(w) => w.pubkey(p.referrer),
|
|
206
|
+
p,
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function syncOgInstruction(p ) {
|
|
211
|
+
return withRest(ix("sync_og", [R(ogUserPda(p.referrer, p.programId)[0])], (w) => w.pubkey(p.referrer), p), p.records.map((r) => W(r)));
|
|
212
|
+
}
|
|
213
|
+
|
|
192
214
|
export function openRefOwedInstruction(p ) {
|
|
193
215
|
return ix("open_ref_owed", [WS(p.payer), R(p.quoteMint), W(p.refOwed), W(p.vault), R(p.quoteTokenProgram), R(ASSOCIATED_TOKEN_PROGRAM_ID), R(SYSTEM_PROGRAM_ID)], (w) => w.pubkey(p.referrer), p);
|
|
194
216
|
}
|
|
@@ -34,6 +34,9 @@ export const traderLinkPda = (wallet , p = FLOOR_AMM_PROGRAM_ID) =>
|
|
|
34
34
|
export const unwrapPda = (wallet , p = FLOOR_AMM_PROGRAM_ID) => findProgramAddress(["unwrap", k(wallet)], p);
|
|
35
35
|
export const refOwedPda = (referrer , quoteMint , p = FLOOR_AMM_PROGRAM_ID) => findProgramAddress(["ref_owed", k(referrer), k(quoteMint)], p);
|
|
36
36
|
|
|
37
|
+
export const ogUserPda = (referrer , p = FLOOR_AMM_PROGRAM_ID) => findProgramAddress(["og_user", k(referrer)], p);
|
|
38
|
+
export const ogCountPda = (p = FLOOR_AMM_PROGRAM_ID) => findProgramAddress(["og_count"], p);
|
|
39
|
+
|
|
37
40
|
export const genesisRaisePda = (p = FLOOR_AMM_PROGRAM_ID) => findProgramAddress(["genesis_raise"], p);
|
|
38
41
|
export const genesisAllocPda = (wallet , p = FLOOR_AMM_PROGRAM_ID) => findProgramAddress(["genesis_alloc", k(wallet)], p);
|
|
39
42
|
|
package/dist/ton/gas.js
CHANGED
|
@@ -21,8 +21,8 @@ export const TON_CLAIM_COST_CONSTS = {
|
|
|
21
21
|
HOP_MSG_CELLS: 4n,
|
|
22
22
|
ACCOUNT_STATE_BITS: 33200n,
|
|
23
23
|
ACCOUNT_STATE_CELLS: 68n,
|
|
24
|
-
LAUNCH_STATE_BITS:
|
|
25
|
-
LAUNCH_STATE_CELLS:
|
|
24
|
+
LAUNCH_STATE_BITS: 844700n,
|
|
25
|
+
LAUNCH_STATE_CELLS: 1305n,
|
|
26
26
|
QUOTE_STATE_BITS: 20000n,
|
|
27
27
|
QUOTE_STATE_CELLS: 50n,
|
|
28
28
|
RENT_SECONDS: 31536000n,
|
package/dist/v2/events.js
CHANGED
|
@@ -24,6 +24,8 @@ export const EVENTS_V2 = {
|
|
|
24
24
|
HolderPositionClosed: S(["launch", "pubkey"], ["owner", "pubkey"], ["amount", "u64"], ["paid", "u64"]),
|
|
25
25
|
HolderIndexRolled: S(["launch", "pubkey"], ["index", "u128"], ["wMatured", "u64"], ["wPending", "u64"], ["carry", "u64"]),
|
|
26
26
|
DeadSynced: S(["launch", "pubkey"], ["added", "u64"], ["deadTokens", "u64"], ["sCirc", "u64"]),
|
|
27
|
+
|
|
28
|
+
RefSlices: S(["launch", "pubkey"], ["trader", "pubkey"], ["traderParts", "u64[3]"], ["creatorParts", "u64[3]"], ["og", "u8"]),
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
EVENTS_V2.GenesisRaiseBought = EVENTS_V2.Trade;
|
package/dist/v2/evm.js
CHANGED
|
@@ -195,6 +195,9 @@ export const V2_EVENTS_ELSEWHERE = [
|
|
|
195
195
|
"Initialized", "LaunchCreated", "PayoutOwed", "TeamSlotOpened", "Upgraded", "Approval", "Transfer", "EIP712DomainChanged", "Claimed", "ClaimSkipped",
|
|
196
196
|
"HolderWithdrawn", "PlatformWithdrawn", "PayoutClaimed", "PotsSwept", "TeamBuyClaimed", "TeamShareBoughtClaimed", "CreatorBuyUnlocked",
|
|
197
197
|
"TeamSlotMember",
|
|
198
|
+
|
|
199
|
+
"ConfigWritten", "HandleBound", "HandleOwedMoved", "MetadataBaseSet", "NativeCreateFeeSet", "PriceUpdaterSet", "QuoteCapSet",
|
|
200
|
+
"QuoteWritten", "TraderRefCleared", "TraderRefOpened", "TreasurySet",
|
|
198
201
|
] ;
|
|
199
202
|
|
|
200
203
|
let topics ;
|
|
@@ -222,6 +225,8 @@ export const V2_ERRORS_EVM = [
|
|
|
222
225
|
"NotProgram",
|
|
223
226
|
|
|
224
227
|
"BadMember",
|
|
228
|
+
|
|
229
|
+
"OgFull", "OgAlreadySet",
|
|
225
230
|
] ;
|
|
226
231
|
|
|
227
232
|
export const V2_ERRORS_ARGS_EVM = ["UnknownClaimType(uint256)"] ;
|
package/dist/v2/layouts.js
CHANGED
|
@@ -134,7 +134,9 @@ export const LAUNCH_V2 = [
|
|
|
134
134
|
["k_at_f", "u64"],
|
|
135
135
|
["k_floor_tokens", "u64"],
|
|
136
136
|
["kpot", "u8"],
|
|
137
|
-
|
|
137
|
+
|
|
138
|
+
["pad_og", "bytes:3"],
|
|
139
|
+
["creator_ref_og_until", "u32[3]"],
|
|
138
140
|
];
|
|
139
141
|
|
|
140
142
|
export const HOLDER_POSITION = [
|
package/dist/v2/solana.js
CHANGED
|
@@ -34,7 +34,7 @@ export const extraAccountMetasPda = (baseMint , hook = FLOOR_HOOK_PROGRAM
|
|
|
34
34
|
|
|
35
35
|
const V2_ERROR_NAMES = [
|
|
36
36
|
"NothingToSettle", "HolderPositionExists", "HolderPositionNotEmpty", "HolderBookMismatch", "DeadAccountNotDead",
|
|
37
|
-
"HookAccountsMissing", "RowTooManyRanges", "RowNotFeasible",
|
|
37
|
+
"HookAccountsMissing", "RowTooManyRanges", "RowNotFeasible", "OgFull",
|
|
38
38
|
] ;
|
|
39
39
|
|
|
40
40
|
export const V2_ERROR_BASE = FLOOR_AMM_ERRORS.BurnTooLarge + 1;
|
package/dist/v2/tx/evm.js
CHANGED
|
@@ -9,7 +9,7 @@ import { evmSignature } from "../../generated/index.js";
|
|
|
9
9
|
|
|
10
10
|
export { claimV2Call, CLAIM_HOLDER_EVM, CLAIM_KNOWN_V2_EVM, creditBackingCall, optInCall, viewCall, decodeTeamShareOf } from "../evm.js";
|
|
11
11
|
|
|
12
|
-
export { traderRefDigest, traderRefAuthDigest, bindHandleDigest, bindHandleAuthDigest } from "../../evm/floor/calls.js";
|
|
12
|
+
export { traderRefDigest, traderRefAuthDigest, bindHandleDigest, bindHandleAuthDigest, ogUserAuthDigest } from "../../evm/floor/calls.js";
|
|
13
13
|
export { CLAIM_CREATOR, CLAIM_CREATOR_REF, CLAIM_TEAM_SLOT, CLAIM_TRADER_REF, CLAIM_PAYOUT, CLAIM_TEAM_BUY, CLAIM_SHARE_BOUGHT, MEMBER_WALLET, MEMBER_HANDLE, NATIVE_QUOTE } from "../../evm/floor/iface.js";
|
|
14
14
|
|
|
15
15
|
export const EVM_V2_TX = {
|
|
@@ -25,12 +25,18 @@ export const EVM_V2_TX = {
|
|
|
25
25
|
setTraderRef: evmSignature("setTraderRef"),
|
|
26
26
|
bindHandle: evmSignature("bindHandle"),
|
|
27
27
|
claimPayoutTo: evmSignature("claimPayoutTo"),
|
|
28
|
+
|
|
29
|
+
setOgUser: evmSignature("setOgUser"),
|
|
30
|
+
revokeOgUser: evmSignature("revokeOgUser"),
|
|
28
31
|
} ;
|
|
29
32
|
|
|
30
33
|
export const EVM_V2_TX_VIEWS = {
|
|
31
34
|
traderRef: { sig: evmSignature("traderRef"), ret: ["address[3]"] },
|
|
32
35
|
launchCount: { sig: evmSignature("launchCount"), ret: ["uint256"] },
|
|
33
36
|
predictToken: { sig: evmSignature("predictToken"), ret: ["address"] },
|
|
37
|
+
|
|
38
|
+
ogUserOf: { sig: evmSignature("ogUserOf"), ret: ["uint64", "uint64", "bool"] },
|
|
39
|
+
ogCount: { sig: evmSignature("ogCount"), ret: ["uint16", "uint64"] },
|
|
34
40
|
} ;
|
|
35
41
|
|
|
36
42
|
const NATIVE = "0x0000000000000000000000000000000000000000";
|
|
@@ -114,6 +120,14 @@ export function setTraderRefCallV2(p
|
|
|
114
120
|
return call(p.floorAmm, EVM_V2_TX.setTraderRef, [p.trader, [...p.tiers], p.deadline, hexToBytes(p.authSig), hexToBytes(p.traderSig ?? "0x")]);
|
|
115
121
|
}
|
|
116
122
|
|
|
123
|
+
export function setOgUserCall(p ) {
|
|
124
|
+
return call(p.floorAmm, EVM_V2_TX.setOgUser, [p.referrer, p.deadline, hexToBytes(p.authSig)]);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function revokeOgUserCall(p ) {
|
|
128
|
+
return call(p.floorAmm, EVM_V2_TX.revokeOgUser, [p.referrer]);
|
|
129
|
+
}
|
|
130
|
+
|
|
117
131
|
export function bindHandleCallV2(p ) {
|
|
118
132
|
return call(p.floorAmm, EVM_V2_TX.bindHandle, [hexToBytes(p.handleId), p.wallet, [...p.quotes], p.deadline, hexToBytes(p.authSig), hexToBytes(p.walletSig ?? "0x")]);
|
|
119
133
|
}
|
package/docs/cursor-pages.md
CHANGED
|
@@ -10,10 +10,15 @@ before cursor pages existed (`launches/<id>/trades`, `wallets/<w>/trades`, `laun
|
|
|
10
10
|
holds each route's default and maximum. A `limit` above the maximum is a 400 (`limit must be 1..500`, with the route's
|
|
11
11
|
own bounds), never a silent clamp.
|
|
12
12
|
|
|
13
|
-
The wallet routes `positions`, `locks`, `claims`, `roles` and `referrals/<w>/people` answer a page only
|
|
14
|
-
(`limit`, or a non-empty `cursor`). The inbox answers a page when `before` is present, and an empty `before` asks the
|
|
13
|
+
The wallet routes `positions`, `position-totals`, `locks`, `claims`, `roles` and `referrals/<w>/people` answer a page only
|
|
14
|
+
when one is asked (`limit`, or a non-empty `cursor`). The inbox answers a page when `before` is present, and an empty `before` asks the
|
|
15
15
|
newest page. Asked with none of these, each route answers its whole list in one body.
|
|
16
16
|
|
|
17
|
+
`wallets/<w>/position-totals?launch=<id>` answers that launch's one row (a wallet that never traded it gets a row of
|
|
18
|
+
zeros) and `next` null; it takes no page keys. `referrals/<w>/people?person=<a>,<b>,…` answers only the rows of those
|
|
19
|
+
referred wallets (1 to `PEOPLE_PERSON_MAX`, 8, distinct), with no `next`; a person not among the wallet's people is
|
|
20
|
+
absent. `person` never goes with `limit` or `cursor`.
|
|
21
|
+
|
|
17
22
|
## Defaults
|
|
18
23
|
|
|
19
24
|
| route | reader | cursor key | `limit` default | `limit` maximum |
|
|
@@ -21,6 +26,7 @@ newest page. Asked with none of these, each route answers its whole list in one
|
|
|
21
26
|
| `launches` | `readLaunches` | `cursor` | `LAUNCHES_PAGE_DEFAULT` (100) | `LAUNCHES_PAGE_MAX` (1,000) |
|
|
22
27
|
| `search?q=` | `readLaunchSearch` | `cursor` | `SEARCH_PAGE_DEFAULT` (12) | `SEARCH_PAGE_MAX` (100) |
|
|
23
28
|
| `wallets/<w>/positions`, `locks`, `claims`, `roles/<w>`, `referrals/<w>/people` | `readPositions`, `readWalletLocks`, `readClaimHistory`, `readRoles`, `readPeople` | `cursor` | `WALLET_PAGE_DEFAULT` (100) | `WALLET_PAGE_MAX` (500) |
|
|
29
|
+
| `wallets/<w>/position-totals` | `readPositionTotals` | `cursor` | `POSITION_TOTALS_PAGE_MAX` (100) | `POSITION_TOTALS_PAGE_MAX` (100) |
|
|
24
30
|
| `wallets/<w>/inbox` | `readInbox` | `before` | `INBOX_PAGE_DEFAULT` (100) | `INBOX_PAGE_MAX` (500) |
|
|
25
31
|
|
|
26
32
|
No request answers every launch: a bare `launches` is one page of 100. The list body also carries `cursors` (the cursor
|
|
@@ -42,7 +48,7 @@ client treats it as opaque: it passes back the `next` the indexer served, and bo
|
|
|
42
48
|
| route | order | `next` positions the page after |
|
|
43
49
|
|---|---|---|
|
|
44
50
|
| `wallets/<w>/inbox` (`before`), `wallets/<w>/claims` | newest first | the last row (block, txnIndex, eventIndex) |
|
|
45
|
-
| `wallets/<w>/positions`, `wallets/<w>/locks`, `roles/<w>` | launch create order | the last launch (createdBlock, id) |
|
|
51
|
+
| `wallets/<w>/positions`, `wallets/<w>/position-totals`, `wallets/<w>/locks`, `roles/<w>` | launch create order | the last launch (createdBlock, id) |
|
|
46
52
|
| `referrals/<w>/people` | referred wallet ascending | the last wallet |
|
|
47
53
|
| `launches`, `search` | the asked sort | the last row's key and tie (`cursors[i]` per row on the list) |
|
|
48
54
|
|
package/docs/ton.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# FLOOR on TON
|
|
2
2
|
|
|
3
|
-
> TON is not deployed yet: the module ships in `@floorlaunchpad/sdk` 0.6.0, switched off: the TON chain row stays off until a mainnet factory is live.
|
|
3
|
+
> TON is not deployed yet: the module ships in `@floorlaunchpad/sdk` 0.6.0 and 0.7.0, switched off: the TON chain row stays off until a mainnet factory is live.
|
|
4
4
|
|
|
5
5
|
`@floorlaunchpad/sdk/ton` builds the messages a wallet sends to the FLOOR program on TON and reads what the program answers.
|
|
6
6
|
It holds no key, sends nothing and opens no connection of its own: you give it a read function (`TonRpc`) and a wallet.
|
package/package.json
CHANGED
|
@@ -4,9 +4,16 @@ export const V2_EVENT_FIELD_NAMES = {
|
|
|
4
4
|
Trade: ["launchId", "trader", "recipient", "isBuy", "quoteGross", "quoteNet", "refund", "tokens", "fees", "traderRef", "fromResale", "fromFirst", "unfilled", "sqrtBefore", "sqrtAfter", "sqrtF", "floor", "cushion", "sCirc", "steps", "budgetHit", "slot", "ts", "kind", "creatorRef", "bidMoney", "msPaid"],
|
|
5
5
|
HolderIndexRolled: ["launchId", "index", "wMatured", "wPending", "carry"],
|
|
6
6
|
DeadSynced: ["launchId", "added", "deadTokens", "sCirc"],
|
|
7
|
+
|
|
8
|
+
HolderMoved: ["launchId", "from", "to", "value", "fromBalance", "toBalance"],
|
|
7
9
|
BackingCredited: ["launchId", "donor", "amount", "fAfter", "slot"],
|
|
8
10
|
|
|
9
11
|
TokensBurnedV2: ["launchId", "wallet", "role", "place", "fromTeamBuy", "fromWallet", "balanceBefore", "owedAfter", "split", "supply", "sOut", "floorAfterX64", "fromShareBought"],
|
|
10
12
|
|
|
13
|
+
RefSlices: ["launchId", "trader", "traderParts", "creatorParts", "og"],
|
|
14
|
+
|
|
15
|
+
OgUserSet: ["referrer", "from", "until", "count"],
|
|
16
|
+
OgUserRevoked: ["referrer", "until", "count"],
|
|
17
|
+
|
|
11
18
|
OptedIn: ["a"],
|
|
12
19
|
} as const;
|
package/src/abi/evm.gen.ts
CHANGED
|
@@ -13,8 +13,12 @@ export const EVM_EVENT_SCHEMAS: readonly EvmEventSchema[] = [
|
|
|
13
13
|
{ name: "Trade", signature: "Trade(uint256,address,address,bool,uint256,uint256,uint256,uint256,uint256[5],uint256,uint256,uint256,uint256,uint128,uint128,uint128,uint256,uint256,uint256,uint8,bool,uint64,uint64,uint8,uint256,uint256,uint256[4])", topic: "0xf13d84552bb2de89213afd3ee8de6d2f901a8ef3c46baecd3ba56d079ec5bbee", params: [{"name":"launchId","type":"uint256","indexed":true},{"name":"trader","type":"address","indexed":true},{"name":"recipient","type":"address","indexed":true},{"name":"isBuy","type":"bool","indexed":false},{"name":"quoteGross","type":"uint256","indexed":false},{"name":"quoteNet","type":"uint256","indexed":false},{"name":"refund","type":"uint256","indexed":false},{"name":"tokens","type":"uint256","indexed":false},{"name":"fees","type":"uint256[5]","indexed":false},{"name":"traderRef","type":"uint256","indexed":false},{"name":"fromResale","type":"uint256","indexed":false},{"name":"fromFirst","type":"uint256","indexed":false},{"name":"unfilled","type":"uint256","indexed":false},{"name":"sqrtBefore","type":"uint128","indexed":false},{"name":"sqrtAfter","type":"uint128","indexed":false},{"name":"sqrtF","type":"uint128","indexed":false},{"name":"floor","type":"uint256","indexed":false},{"name":"cushion","type":"uint256","indexed":false},{"name":"sCirc","type":"uint256","indexed":false},{"name":"steps","type":"uint8","indexed":false},{"name":"budgetHit","type":"bool","indexed":false},{"name":"slot","type":"uint64","indexed":false},{"name":"ts","type":"uint64","indexed":false},{"name":"kind","type":"uint8","indexed":false},{"name":"creatorRef","type":"uint256","indexed":false},{"name":"bidMoney","type":"uint256","indexed":false},{"name":"msPaid","type":"uint256[4]","indexed":false}] },
|
|
14
14
|
{ name: "HolderIndexRolled", signature: "HolderIndexRolled(uint256,uint128,uint64,uint64,uint64)", topic: "0xf20012f017d83d67e79d107e45ef1b26b2c12801c8ac321026fa5fbf4a4617a6", params: [{"name":"launchId","type":"uint256","indexed":true},{"name":"index","type":"uint128","indexed":false},{"name":"wMatured","type":"uint64","indexed":false},{"name":"wPending","type":"uint64","indexed":false},{"name":"carry","type":"uint64","indexed":false}] },
|
|
15
15
|
{ name: "DeadSynced", signature: "DeadSynced(uint256,uint256,uint256,uint256)", topic: "0x6846c78bd22de57afa536b973536ab5c61067e4d1b4ea058582ba5069d9773af", params: [{"name":"launchId","type":"uint256","indexed":true},{"name":"added","type":"uint256","indexed":false},{"name":"deadTokens","type":"uint256","indexed":false},{"name":"sCirc","type":"uint256","indexed":false}] },
|
|
16
|
+
{ name: "HolderMoved", signature: "HolderMoved(uint256,address,address,uint256,uint256,uint256)", topic: "0xd5824b5333646edb861042e3e4dc301d313bad82266261cc142ea065a6f80f62", params: [{"name":"launchId","type":"uint256","indexed":true},{"name":"from","type":"address","indexed":true},{"name":"to","type":"address","indexed":true},{"name":"value","type":"uint256","indexed":false},{"name":"fromBalance","type":"uint256","indexed":false},{"name":"toBalance","type":"uint256","indexed":false}] },
|
|
16
17
|
{ name: "BackingCredited", signature: "BackingCredited(uint256,address,uint256,uint256,uint64)", topic: "0x9d068fe704d7ba4d84d7cae6b6f5b80e22bc5282d5677787bd0c6fb6b1375797", params: [{"name":"launchId","type":"uint256","indexed":true},{"name":"donor","type":"address","indexed":true},{"name":"amount","type":"uint256","indexed":false},{"name":"fAfter","type":"uint256","indexed":false},{"name":"slot","type":"uint64","indexed":false}] },
|
|
17
18
|
{ name: "TokensBurnedV2", signature: "TokensBurnedV2(uint256,address,uint8,uint8,uint256,uint256,uint256,uint256,uint256[10],uint256,uint256,uint256,uint256)", topic: "0xf6e435381411d86653aa1fb249000f3ead53faa462387a4492da7021bb1ed930", params: [{"name":"launchId","type":"uint256","indexed":true},{"name":"wallet","type":"address","indexed":true},{"name":"role","type":"uint8","indexed":false},{"name":"place","type":"uint8","indexed":false},{"name":"fromTeamBuy","type":"uint256","indexed":false},{"name":"fromWallet","type":"uint256","indexed":false},{"name":"balanceBefore","type":"uint256","indexed":false},{"name":"owedAfter","type":"uint256","indexed":false},{"name":"split","type":"uint256[10]","indexed":false},{"name":"supply","type":"uint256","indexed":false},{"name":"sOut","type":"uint256","indexed":false},{"name":"floorAfterX64","type":"uint256","indexed":false},{"name":"fromShareBought","type":"uint256","indexed":false}] },
|
|
19
|
+
{ name: "RefSlices", signature: "RefSlices(uint256,address,uint256[3],uint256[3],uint8)", topic: "0x70230bb504c4cfaa69721add1e2556ac9a5062317ccccff591bea6f9519002f2", params: [{"name":"launchId","type":"uint256","indexed":true},{"name":"trader","type":"address","indexed":true},{"name":"traderParts","type":"uint256[3]","indexed":false},{"name":"creatorParts","type":"uint256[3]","indexed":false},{"name":"og","type":"uint8","indexed":false}] },
|
|
20
|
+
{ name: "OgUserSet", signature: "OgUserSet(address,uint64,uint64,uint16)", topic: "0xe77b61264f15c177ea65dbd08e49ca5f4082c241812720be4734124a431e72ee", params: [{"name":"referrer","type":"address","indexed":true},{"name":"from","type":"uint64","indexed":false},{"name":"until","type":"uint64","indexed":false},{"name":"count","type":"uint16","indexed":false}] },
|
|
21
|
+
{ name: "OgUserRevoked", signature: "OgUserRevoked(address,uint64,uint16)", topic: "0xa4f04a24e1d2ca998acdb3c7db54bd6796fb2a591a81992e13d2585fecd6f7e7", params: [{"name":"referrer","type":"address","indexed":true},{"name":"until","type":"uint64","indexed":false},{"name":"count","type":"uint16","indexed":false}] },
|
|
18
22
|
{ name: "OptedIn", signature: "OptedIn(address)", topic: "0x25f9c685db8e2630204f5e7c890a95f58852ccac883a9d96f44a72b777b06c59", params: [{"name":"a","type":"address","indexed":true}] },
|
|
19
23
|
{ name: "ClaimSkipped", signature: "ClaimSkipped(address,address,uint256)", topic: "0x4db58311c6a38618cc6dd27586cfb08657be781d572fb89d63886e3a04b654fa", params: [{"name":"wallet","type":"address","indexed":true},{"name":"quote","type":"address","indexed":true},{"name":"amount","type":"uint256","indexed":false}] },
|
|
20
24
|
{ name: "Claimed", signature: "Claimed(address,address,address,uint16,uint256,uint256,uint256,uint256,uint256,uint256,uint256)", topic: "0xc65b75258efd65cacbab47f067226591f78c24d2ee3c3deedf737ca24dc84ada", params: [{"name":"wallet","type":"address","indexed":true},{"name":"sender","type":"address","indexed":true},{"name":"quote","type":"address","indexed":true},{"name":"types","type":"uint16","indexed":false},{"name":"creator","type":"uint256","indexed":false},{"name":"creatorRef","type":"uint256","indexed":false},{"name":"teamSlot","type":"uint256","indexed":false},{"name":"traderRef","type":"uint256","indexed":false},{"name":"holder","type":"uint256","indexed":false},{"name":"extra","type":"uint256","indexed":false},{"name":"amount","type":"uint256","indexed":false}] },
|
|
@@ -100,6 +104,8 @@ export const EVM_ERRORS: readonly ProgramErrorRow[] = [
|
|
|
100
104
|
{ chain: "evm", name: "NotTeamMember", message: "NotTeamMember", code: null, selector: "0x2793ed7d", signature: "NotTeamMember()" },
|
|
101
105
|
{ chain: "evm", name: "NotTimelock", message: "NotTimelock", code: null, selector: "0xcad4da2a", signature: "NotTimelock()" },
|
|
102
106
|
{ chain: "evm", name: "NotToken", message: "NotToken", code: null, selector: "0x21f2b69c", signature: "NotToken()" },
|
|
107
|
+
{ chain: "evm", name: "OgAlreadySet", message: "OgAlreadySet", code: null, selector: "0x15a3af55", signature: "OgAlreadySet()" },
|
|
108
|
+
{ chain: "evm", name: "OgFull", message: "OgFull", code: null, selector: "0x94de33e9", signature: "OgFull()" },
|
|
103
109
|
{ chain: "evm", name: "Overflow", message: "Overflow", code: null, selector: "0x35278d12", signature: "Overflow()" },
|
|
104
110
|
{ chain: "evm", name: "OverOwed", message: "OverOwed", code: null, selector: "0xbf537318", signature: "OverOwed()" },
|
|
105
111
|
{ chain: "evm", name: "PresetDeleted", message: "PresetDeleted", code: null, selector: "0xf94f84f1", signature: "PresetDeleted()" },
|
package/src/abi/functions.gen.ts
CHANGED
|
@@ -106,6 +106,7 @@ export const FLOOR_AMM_V2_FUNCTIONS: readonly EvmFunctionRow[] = [
|
|
|
106
106
|
{ module: "floorAmmV2", name: "buyFromBalance", signature: "buyFromBalance(uint256,uint256,address,address,uint256)", selector: "0x5f9f56d2", outputs: "((uint256,uint256,uint256,uint256,bool,bool,bool))" },
|
|
107
107
|
{ module: "floorAmmV2", name: "creditBacking", signature: "creditBacking(uint256,uint256)", selector: "0x1f341504", outputs: "()" },
|
|
108
108
|
{ module: "floorAmmV2", name: "nextModule", signature: "nextModule()", selector: "0xf85abfc7", outputs: "(address)" },
|
|
109
|
+
{ module: "floorAmmV2", name: "noteMove", signature: "noteMove(address,address,uint256,uint256,uint256)", selector: "0xe6b761ea", outputs: "()" },
|
|
109
110
|
{ module: "floorAmmV2", name: "proxiableUUID", signature: "proxiableUUID()", selector: "0x52d1902d", outputs: "(bytes32)" },
|
|
110
111
|
{ module: "floorAmmV2", name: "quoteBuy", signature: "quoteBuy(uint256,uint256,address)", selector: "0xec7a34c9", outputs: "((uint256,uint256,uint256,uint256,bool,bool,bool))" },
|
|
111
112
|
{ module: "floorAmmV2", name: "quoteSell", signature: "quoteSell(uint256,uint256,address)", selector: "0x0cff08d1", outputs: "(uint256)" },
|
|
@@ -151,4 +152,51 @@ export const FLOOR_AMM_V2_FUNCTIONS: readonly EvmFunctionRow[] = [
|
|
|
151
152
|
{ module: "floorAmmClaimsV2", name: "nextModule", signature: "nextModule()", selector: "0xf85abfc7", outputs: "(address)" },
|
|
152
153
|
{ module: "floorAmmClaimsV2", name: "teamSlotAdd", signature: "teamSlotAdd(uint256,bytes32,uint8,uint256,bool)", selector: "0xd5402e81", outputs: "()" },
|
|
153
154
|
{ module: "floorAmmClaimsV2", name: "unlockCreatorBuy", signature: "unlockCreatorBuy(uint256)", selector: "0xf03d6d5e", outputs: "(uint256)" },
|
|
155
|
+
{ module: "floorAmmGovV2", name: "NATIVE", signature: "NATIVE()", selector: "0xa0cf0aea", outputs: "(address)" },
|
|
156
|
+
{ module: "floorAmmGovV2", name: "acceptAuthority", signature: "acceptAuthority()", selector: "0x1580798f", outputs: "()" },
|
|
157
|
+
{ module: "floorAmmGovV2", name: "accounted", signature: "accounted(address)", selector: "0xee1a56ce", outputs: "(uint256)" },
|
|
158
|
+
{ module: "floorAmmGovV2", name: "addQuote", signature: "addQuote(address,uint256,uint256)", selector: "0x488c664b", outputs: "()" },
|
|
159
|
+
{ module: "floorAmmGovV2", name: "authority", signature: "authority()", selector: "0xbf7e214f", outputs: "(address)" },
|
|
160
|
+
{ module: "floorAmmGovV2", name: "bindHandle", signature: "bindHandle(bytes32,address,address[],uint256,bytes,bytes)", selector: "0xcea3463e", outputs: "()" },
|
|
161
|
+
{ module: "floorAmmGovV2", name: "claimPayoutTo", signature: "claimPayoutTo(address,address)", selector: "0xc14ab75d", outputs: "(uint256)" },
|
|
162
|
+
{ module: "floorAmmGovV2", name: "clearTraderRef", signature: "clearTraderRef(address)", selector: "0x53550430", outputs: "()" },
|
|
163
|
+
{ module: "floorAmmGovV2", name: "createPaused", signature: "createPaused()", selector: "0xbac7b497", outputs: "(bool)" },
|
|
164
|
+
{ module: "floorAmmGovV2", name: "floorTokenAccrued", signature: "floorTokenAccrued(address)", selector: "0xf3a261f9", outputs: "(uint256)" },
|
|
165
|
+
{ module: "floorAmmGovV2", name: "handleOwed", signature: "handleOwed(bytes32,address)", selector: "0xaad2ed5c", outputs: "(uint256)" },
|
|
166
|
+
{ module: "floorAmmGovV2", name: "handleWallet", signature: "handleWallet(bytes32)", selector: "0xc6da686d", outputs: "(address)" },
|
|
167
|
+
{ module: "floorAmmGovV2", name: "holderBucket", signature: "holderBucket(address)", selector: "0x088806d0", outputs: "(uint256)" },
|
|
168
|
+
{ module: "floorAmmGovV2", name: "holderDest", signature: "holderDest()", selector: "0x84a6263a", outputs: "(address)" },
|
|
169
|
+
{ module: "floorAmmGovV2", name: "initialize", signature: "initialize(address,address,address,address)", selector: "0xf8c8765e", outputs: "()" },
|
|
170
|
+
{ module: "floorAmmGovV2", name: "metadataBase", signature: "metadataBase()", selector: "0x65b973c3", outputs: "(string)" },
|
|
171
|
+
{ module: "floorAmmGovV2", name: "moveHandleOwed", signature: "moveHandleOwed(bytes32,address[])", selector: "0xc43594a1", outputs: "(uint256)" },
|
|
172
|
+
{ module: "floorAmmGovV2", name: "nativeCreateFee", signature: "nativeCreateFee()", selector: "0x10b51e45", outputs: "(uint256)" },
|
|
173
|
+
{ module: "floorAmmGovV2", name: "ogCount", signature: "ogCount()", selector: "0x9457990a", outputs: "(uint16,uint64)" },
|
|
174
|
+
{ module: "floorAmmGovV2", name: "ogUserOf", signature: "ogUserOf(address)", selector: "0x6df29e2f", outputs: "(uint64,uint64,bool)" },
|
|
175
|
+
{ module: "floorAmmGovV2", name: "owedOf", signature: "owedOf(address,address)", selector: "0xfacba08d", outputs: "((uint128,uint128,uint128,uint128,uint128,uint128))" },
|
|
176
|
+
{ module: "floorAmmGovV2", name: "owedOfMany", signature: "owedOfMany(address,address[])", selector: "0xa1efa4ba", outputs: "((uint128,uint128,uint128,uint128,uint128,uint128)[])" },
|
|
177
|
+
{ module: "floorAmmGovV2", name: "payoutOwed", signature: "payoutOwed(address,address)", selector: "0xae3f9120", outputs: "(uint256)" },
|
|
178
|
+
{ module: "floorAmmGovV2", name: "pendingAuthority", signature: "pendingAuthority()", selector: "0xfabb94bb", outputs: "(address)" },
|
|
179
|
+
{ module: "floorAmmGovV2", name: "platformOwed", signature: "platformOwed(address)", selector: "0x240b9586", outputs: "(uint256)" },
|
|
180
|
+
{ module: "floorAmmGovV2", name: "priceUpdater", signature: "priceUpdater()", selector: "0xfc612a8d", outputs: "(address)" },
|
|
181
|
+
{ module: "floorAmmGovV2", name: "quoteEntry", signature: "quoteEntry(address)", selector: "0x77665076", outputs: "((bool,bool,uint8,uint256,uint256,uint64,uint64))" },
|
|
182
|
+
{ module: "floorAmmGovV2", name: "quoteRisk", signature: "quoteRisk(address)", selector: "0x1461d14e", outputs: "(uint256,uint256,(uint128,uint32,uint32,uint64))" },
|
|
183
|
+
{ module: "floorAmmGovV2", name: "quotes", signature: "quotes()", selector: "0xd6a5d7db", outputs: "(address[])" },
|
|
184
|
+
{ module: "floorAmmGovV2", name: "referralAuthority", signature: "referralAuthority()", selector: "0x2fe0a99a", outputs: "(address)" },
|
|
185
|
+
{ module: "floorAmmGovV2", name: "revokeOgUser", signature: "revokeOgUser(address)", selector: "0x52e52ecc", outputs: "()" },
|
|
186
|
+
{ module: "floorAmmGovV2", name: "setCreatePaused", signature: "setCreatePaused(bool)", selector: "0x83bcec85", outputs: "()" },
|
|
187
|
+
{ module: "floorAmmGovV2", name: "setHolderDest", signature: "setHolderDest(address)", selector: "0x6ad3e66d", outputs: "()" },
|
|
188
|
+
{ module: "floorAmmGovV2", name: "setMetadataBase", signature: "setMetadataBase(string)", selector: "0xd3811c0f", outputs: "()" },
|
|
189
|
+
{ module: "floorAmmGovV2", name: "setNativeCreateFee", signature: "setNativeCreateFee(uint256)", selector: "0xa4433667", outputs: "()" },
|
|
190
|
+
{ module: "floorAmmGovV2", name: "setOgUser", signature: "setOgUser(address,uint256,bytes)", selector: "0x02cb4469", outputs: "()" },
|
|
191
|
+
{ module: "floorAmmGovV2", name: "setPriceUpdater", signature: "setPriceUpdater(address)", selector: "0x97c4a5f3", outputs: "()" },
|
|
192
|
+
{ module: "floorAmmGovV2", name: "setQuoteCap", signature: "setQuoteCap(address,uint128)", selector: "0x42adf398", outputs: "()" },
|
|
193
|
+
{ module: "floorAmmGovV2", name: "setQuotePrice", signature: "setQuotePrice(address,uint256)", selector: "0x3857ed9e", outputs: "()" },
|
|
194
|
+
{ module: "floorAmmGovV2", name: "setReferralAuthority", signature: "setReferralAuthority(address)", selector: "0x46325d7a", outputs: "()" },
|
|
195
|
+
{ module: "floorAmmGovV2", name: "setTimelock", signature: "setTimelock(address)", selector: "0xbdacb303", outputs: "()" },
|
|
196
|
+
{ module: "floorAmmGovV2", name: "setTraderRef", signature: "setTraderRef(address,address[3],uint256,bytes,bytes)", selector: "0xd7426758", outputs: "()" },
|
|
197
|
+
{ module: "floorAmmGovV2", name: "setTreasury", signature: "setTreasury(address)", selector: "0xf0f44260", outputs: "()" },
|
|
198
|
+
{ module: "floorAmmGovV2", name: "timelock", signature: "timelock()", selector: "0xd33219b4", outputs: "(address)" },
|
|
199
|
+
{ module: "floorAmmGovV2", name: "transferAuthority", signature: "transferAuthority(address)", selector: "0x3078db6c", outputs: "()" },
|
|
200
|
+
{ module: "floorAmmGovV2", name: "treasury", signature: "treasury()", selector: "0x61d027b3", outputs: "(address)" },
|
|
201
|
+
{ module: "floorAmmGovV2", name: "updateQuote", signature: "updateQuote(address,bool,uint256,uint256)", selector: "0x21593d6e", outputs: "()" },
|
|
154
202
|
];
|
package/src/abi/solana.gen.ts
CHANGED
|
@@ -27,6 +27,9 @@ export const SOLANA_EVENT_SCHEMAS: readonly SolanaEventSchema[] = [
|
|
|
27
27
|
{ name: "TraderRefOpened", discriminator: "b19ede398fd84173", source: "v1", fields: [["trader","pubkey"],["quoteMint","pubkey"],["tiers","pubkey[3]"]] },
|
|
28
28
|
{ name: "TraderLinkOpened", discriminator: "ce3cf7987530744b", source: "v1", fields: [["trader","pubkey"],["tiers","pubkey[3]"]] },
|
|
29
29
|
{ name: "TraderRefCleared", discriminator: "2248a8735d5891ac", source: "v1", fields: [["trader","pubkey"],["records","u16"]] },
|
|
30
|
+
{ name: "OgUserSet", discriminator: "fa6fd6a5ca80af7e", source: "v1", fields: [["referrer","pubkey"],["from","i64"],["until","i64"],["count","u16"]] },
|
|
31
|
+
{ name: "OgUserRevoked", discriminator: "500ecde2e01f6590", source: "v1", fields: [["referrer","pubkey"],["until","i64"],["count","u16"]] },
|
|
32
|
+
{ name: "OgSynced", discriminator: "c4e2e1034f80b86e", source: "v1", fields: [["referrer","pubkey"],["records","u16"]] },
|
|
30
33
|
{ name: "CreatorBuyUnlocked", discriminator: "2a091cbbe392c8fc", source: "v1", fields: [["launch","pubkey"],["creator","pubkey"],["tokens","u64"],["members","u64[10]?"],["paid","u64?"]] },
|
|
31
34
|
{ name: "RefOwedOpened", discriminator: "c6738dc0a56e6a77", source: "v1", fields: [["referrer","pubkey"],["quoteMint","pubkey"]] },
|
|
32
35
|
{ name: "RefsRolled", discriminator: "65150ff9ec7a53ab", source: "v1", fields: [["quoteMint","pubkey"],["traderRefs","u16"],["amount","u64"]] },
|
|
@@ -62,6 +65,7 @@ export const SOLANA_EVENT_SCHEMAS: readonly SolanaEventSchema[] = [
|
|
|
62
65
|
{ name: "HolderPositionClosed", discriminator: "a5451f6d7c8dab3c", source: "v2", fields: [["launch","pubkey"],["owner","pubkey"],["amount","u64"],["paid","u64"]] },
|
|
63
66
|
{ name: "HolderIndexRolled", discriminator: "5c857c0e16a9a203", source: "v2", fields: [["launch","pubkey"],["index","u128"],["wMatured","u64"],["wPending","u64"],["carry","u64"]] },
|
|
64
67
|
{ name: "DeadSynced", discriminator: "29e5a9cda4b90d32", source: "v2", fields: [["launch","pubkey"],["added","u64"],["deadTokens","u64"],["sCirc","u64"]] },
|
|
68
|
+
{ name: "RefSlices", discriminator: "328f40d2f919f9a9", source: "v2", fields: [["launch","pubkey"],["trader","pubkey"],["traderParts","u64[3]"],["creatorParts","u64[3]"],["og","u8"]] },
|
|
65
69
|
{ name: "GenesisRaiseBought", discriminator: "81c072c6908a578b", source: "v2", fields: [["launch","pubkey"],["trader","pubkey"],["isBuy","bool"],["quoteGross","u64"],["quoteNet","u64"],["refund","u64"],["tokens","u64"],["fees","u64[5]"],["traderRef","u64"],["fromResale","u64"],["fromFirst","u64"],["unfilled","u64"],["sqrtBefore","u128"],["sqrtAfter","u128"],["sqrtF","u128"],["floor","u64"],["cushion","u64"],["sCirc","u64"],["steps","u8"],["budgetHit","bool"],["slot","u64"],["ts","i64"],["kind","u8"],["creatorRef","u64"],["recipient","pubkey"],["bidMoney","u64"],["msPaid","u64[4]"]] },
|
|
66
70
|
];
|
|
67
71
|
|
|
@@ -137,4 +141,5 @@ export const SOLANA_ERRORS: readonly ProgramErrorRow[] = [
|
|
|
137
141
|
{ chain: "solana", name: "HookAccountsMissing", message: "the transfer-hook accounts are missing", code: 6068, selector: null, signature: null },
|
|
138
142
|
{ chain: "solana", name: "RowTooManyRanges", message: "the row has too many ranges", code: 6069, selector: null, signature: null },
|
|
139
143
|
{ chain: "solana", name: "RowNotFeasible", message: "the row fails the feasibility check", code: 6070, selector: null, signature: null },
|
|
144
|
+
{ chain: "solana", name: "OgFull", message: "the OG Users are full: OG_MAX windows are set on this chain", code: 6071, selector: null, signature: null },
|
|
140
145
|
];
|
package/src/errors.ts
CHANGED
|
@@ -91,7 +91,7 @@ export const SOLANA_ERROR_NAMES = [
|
|
|
91
91
|
"GenesisDustNotYet", "GenesisConvertCapped", "GenesisPriceStale", "GenesisConvertSlippage", "GenesisSolNotConverted",
|
|
92
92
|
"GenesisWagmiWrongState", "GenesisWagmiNoPreset", "GenesisWagmiQuoteNotListed", "HolderDestNotSet", "NotTeamMember",
|
|
93
93
|
"BurnTooLarge", "NothingToSettle", "HolderPositionExists", "HolderPositionNotEmpty", "HolderBookMismatch", "DeadAccountNotDead",
|
|
94
|
-
"HookAccountsMissing", "RowTooManyRanges", "RowNotFeasible",
|
|
94
|
+
"HookAccountsMissing", "RowTooManyRanges", "RowNotFeasible", "OgFull",
|
|
95
95
|
] as const;
|
|
96
96
|
|
|
97
97
|
export const SOLANA_ERROR_BASE = 6000;
|
|
@@ -114,7 +114,7 @@ const EXACT: Readonly<Record<string, FloorErrorCode>> = {
|
|
|
114
114
|
OverOwed: "OverOwed", ClaimsShort: "OverOwed", UnknownClaimType: "UnknownClaimType",
|
|
115
115
|
TeamSlotRateOverMax: "TeamSlot", TeamSlotFull: "TeamSlot", TeamSlotPaid: "TeamSlot", TeamSlotExists: "TeamSlot", TeamSlotNoRequest: "TeamSlot",
|
|
116
116
|
NotPendingHandle: "TeamSlot", BadMember: "TeamSlot", HandleAlreadyBound: "TeamSlot",
|
|
117
|
-
TraderRefMismatch: "Referral", TraderRefSet: "Referral", BadReferralSig: "Referral", BadSignature: "Referral", ReferralSigExpired: "Referral",
|
|
117
|
+
TraderRefMismatch: "Referral", TraderRefSet: "Referral", OgFull: "Referral", BadReferralSig: "Referral", BadSignature: "Referral", ReferralSigExpired: "Referral",
|
|
118
118
|
BurnTooLarge: "BurnTooLarge", PageFull: "PageFull",
|
|
119
119
|
NotAuthority: "NotAuthorized", NotUpgradeAuthority: "NotAuthorized", NotPriceUpdater: "NotAuthorized", RoleNotHeld: "NotAuthorized",
|
|
120
120
|
NotTeamMember: "NotAuthorized", NotCreator: "NotAuthorized", NotTimelock: "NotAuthorized", NotReferralAuthority: "NotAuthorized",
|
package/src/events/types.gen.ts
CHANGED
|
@@ -136,6 +136,21 @@ export interface SolTraderRefClearedFields {
|
|
|
136
136
|
trader: string;
|
|
137
137
|
records: number;
|
|
138
138
|
}
|
|
139
|
+
export interface SolOgUserSetFields {
|
|
140
|
+
referrer: string;
|
|
141
|
+
from: bigint;
|
|
142
|
+
until: bigint;
|
|
143
|
+
count: number;
|
|
144
|
+
}
|
|
145
|
+
export interface SolOgUserRevokedFields {
|
|
146
|
+
referrer: string;
|
|
147
|
+
until: bigint;
|
|
148
|
+
count: number;
|
|
149
|
+
}
|
|
150
|
+
export interface SolOgSyncedFields {
|
|
151
|
+
referrer: string;
|
|
152
|
+
records: number;
|
|
153
|
+
}
|
|
139
154
|
export interface SolCreatorBuyUnlockedFields {
|
|
140
155
|
launch: string;
|
|
141
156
|
creator: string;
|
|
@@ -412,6 +427,13 @@ export interface SolDeadSyncedFields {
|
|
|
412
427
|
deadTokens: bigint;
|
|
413
428
|
sCirc: bigint;
|
|
414
429
|
}
|
|
430
|
+
export interface SolRefSlicesFields {
|
|
431
|
+
launch: string;
|
|
432
|
+
trader: string;
|
|
433
|
+
traderParts: bigint[];
|
|
434
|
+
creatorParts: bigint[];
|
|
435
|
+
og: number;
|
|
436
|
+
}
|
|
415
437
|
export interface SolGenesisRaiseBoughtFields {
|
|
416
438
|
launch: string;
|
|
417
439
|
trader: string;
|
|
@@ -459,6 +481,9 @@ export type SolanaEventMap = {
|
|
|
459
481
|
TraderRefOpened: SolTraderRefOpenedFields;
|
|
460
482
|
TraderLinkOpened: SolTraderLinkOpenedFields;
|
|
461
483
|
TraderRefCleared: SolTraderRefClearedFields;
|
|
484
|
+
OgUserSet: SolOgUserSetFields;
|
|
485
|
+
OgUserRevoked: SolOgUserRevokedFields;
|
|
486
|
+
OgSynced: SolOgSyncedFields;
|
|
462
487
|
CreatorBuyUnlocked: SolCreatorBuyUnlockedFields;
|
|
463
488
|
RefOwedOpened: SolRefOwedOpenedFields;
|
|
464
489
|
RefsRolled: SolRefsRolledFields;
|
|
@@ -494,6 +519,7 @@ export type SolanaEventMap = {
|
|
|
494
519
|
HolderPositionClosed: SolHolderPositionClosedFields;
|
|
495
520
|
HolderIndexRolled: SolHolderIndexRolledFields;
|
|
496
521
|
DeadSynced: SolDeadSyncedFields;
|
|
522
|
+
RefSlices: SolRefSlicesFields;
|
|
497
523
|
GenesisRaiseBought: SolGenesisRaiseBoughtFields;
|
|
498
524
|
};
|
|
499
525
|
export type SolanaEvent = { [N in keyof SolanaEventMap]: { chain: "solana"; name: N; fields: SolanaEventMap[N] } }[keyof SolanaEventMap];
|
|
@@ -540,6 +566,14 @@ export interface EvmDeadSyncedFields {
|
|
|
540
566
|
deadTokens: bigint;
|
|
541
567
|
sCirc: bigint;
|
|
542
568
|
}
|
|
569
|
+
export interface EvmHolderMovedFields {
|
|
570
|
+
launchId: bigint;
|
|
571
|
+
from: string;
|
|
572
|
+
to: string;
|
|
573
|
+
value: bigint;
|
|
574
|
+
fromBalance: bigint;
|
|
575
|
+
toBalance: bigint;
|
|
576
|
+
}
|
|
543
577
|
export interface EvmBackingCreditedFields {
|
|
544
578
|
launchId: bigint;
|
|
545
579
|
donor: string;
|
|
@@ -562,6 +596,24 @@ export interface EvmTokensBurnedV2Fields {
|
|
|
562
596
|
floorAfterX64: bigint;
|
|
563
597
|
fromShareBought: bigint;
|
|
564
598
|
}
|
|
599
|
+
export interface EvmRefSlicesFields {
|
|
600
|
+
launchId: bigint;
|
|
601
|
+
trader: string;
|
|
602
|
+
traderParts: bigint[];
|
|
603
|
+
creatorParts: bigint[];
|
|
604
|
+
og: bigint;
|
|
605
|
+
}
|
|
606
|
+
export interface EvmOgUserSetFields {
|
|
607
|
+
referrer: string;
|
|
608
|
+
from: bigint;
|
|
609
|
+
until: bigint;
|
|
610
|
+
count: bigint;
|
|
611
|
+
}
|
|
612
|
+
export interface EvmOgUserRevokedFields {
|
|
613
|
+
referrer: string;
|
|
614
|
+
until: bigint;
|
|
615
|
+
count: bigint;
|
|
616
|
+
}
|
|
565
617
|
export interface EvmOptedInFields {
|
|
566
618
|
a: string;
|
|
567
619
|
}
|
|
@@ -803,8 +855,12 @@ export type EvmEventMap = {
|
|
|
803
855
|
Trade: EvmTradeFields;
|
|
804
856
|
HolderIndexRolled: EvmHolderIndexRolledFields;
|
|
805
857
|
DeadSynced: EvmDeadSyncedFields;
|
|
858
|
+
HolderMoved: EvmHolderMovedFields;
|
|
806
859
|
BackingCredited: EvmBackingCreditedFields;
|
|
807
860
|
TokensBurnedV2: EvmTokensBurnedV2Fields;
|
|
861
|
+
RefSlices: EvmRefSlicesFields;
|
|
862
|
+
OgUserSet: EvmOgUserSetFields;
|
|
863
|
+
OgUserRevoked: EvmOgUserRevokedFields;
|
|
808
864
|
OptedIn: EvmOptedInFields;
|
|
809
865
|
ClaimSkipped: EvmClaimSkippedFields;
|
|
810
866
|
Claimed: EvmClaimedFields;
|
|
@@ -840,4 +896,4 @@ export type EvmEventMap = {
|
|
|
840
896
|
};
|
|
841
897
|
export type EvmEvent = { [N in keyof EvmEventMap]: { chain: "evm"; name: N; fields: EvmEventMap[N]; address?: string } }[keyof EvmEventMap];
|
|
842
898
|
|
|
843
|
-
export const SHARED_EVENT_NAMES = ["BackingCredited","Claimed","ConfigWritten","CreatorBuyUnlocked","DeadSynced","Graduated","HandleBound","HolderIndexRolled","HolderWithdrawn","LaunchCreated","MetadataBaseSet","PlatformWithdrawn","PotsSwept","PresetWritten","QuoteWritten","TeamShareBought","TeamSlotMember","TeamSlotOpened","Trade","TraderRefCleared","TraderRefOpened"] as const;
|
|
899
|
+
export const SHARED_EVENT_NAMES = ["BackingCredited","Claimed","ConfigWritten","CreatorBuyUnlocked","DeadSynced","Graduated","HandleBound","HolderIndexRolled","HolderWithdrawn","LaunchCreated","MetadataBaseSet","OgUserRevoked","OgUserSet","PlatformWithdrawn","PotsSwept","PresetWritten","QuoteWritten","RefSlices","TeamShareBought","TeamSlotMember","TeamSlotOpened","Trade","TraderRefCleared","TraderRefOpened"] as const;
|