@floorlaunchpad/sdk 0.6.0 → 0.8.1

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.
Files changed (125) hide show
  1. package/CHANGELOG.md +279 -0
  2. package/README.md +12 -1
  3. package/dist/abi/evm-event-names.js +7 -0
  4. package/dist/abi/evm.gen.js +81 -2
  5. package/dist/abi/functions.gen.js +135 -1
  6. package/dist/abi/solana.gen.js +64 -0
  7. package/dist/client/solana/index.js +25 -6
  8. package/dist/config/generated.js +803 -26374
  9. package/dist/errors.js +21 -2
  10. package/dist/events/types.gen.js +1 -1
  11. package/dist/evm/chains.js +80 -0
  12. package/dist/evm/floor/abi.gen.js +115 -0
  13. package/dist/evm/floor/calls.js +5 -0
  14. package/dist/evm/squid.js +21 -5
  15. package/dist/evm/venues.js +302 -0
  16. package/dist/generated/interface.gen.js +93 -44
  17. package/dist/index.js +7 -0
  18. package/dist/indexer/bodies.js +288 -5
  19. package/dist/indexer/client.js +17 -1
  20. package/dist/indexer/contract.js +141 -15
  21. package/dist/indexer/paths.js +80 -7
  22. package/dist/indexer/read.js +25 -3
  23. package/dist/indexer/stream.js +2 -2
  24. package/dist/math/v2/book.js +24 -7
  25. package/dist/math/v2/create.js +1 -1
  26. package/dist/math/v2/escrow.js +205 -0
  27. package/dist/math/v2/fees.js +30 -4
  28. package/dist/math/v2/milestones.js +1 -1
  29. package/dist/math/v2/office.js +110 -0
  30. package/dist/math/v2/receipt.js +3 -3
  31. package/dist/math/v2/relay.js +263 -96
  32. package/dist/math/v2/rows.js +17 -0
  33. package/dist/math/v2/team.js +42 -1
  34. package/dist/math/v2/trade.js +3 -1
  35. package/dist/reprice.js +88 -0
  36. package/dist/route/quote.js +16 -0
  37. package/dist/scaledUi.js +113 -0
  38. package/dist/solana/floor/accounts.js +38 -5
  39. package/dist/solana/floor/events.js +62 -1
  40. package/dist/solana/floor/instructions.js +39 -1
  41. package/dist/solana/floor/program.js +3 -0
  42. package/dist/stockRefresh.js +99 -0
  43. package/dist/ton/consts.generated.js +2 -2
  44. package/dist/ton/gas.js +3 -3
  45. package/dist/v2/claims.js +28 -5
  46. package/dist/v2/devbuy.js +28 -3
  47. package/dist/v2/events.js +2 -0
  48. package/dist/v2/evm.js +183 -5
  49. package/dist/v2/layouts.js +102 -2
  50. package/dist/v2/office-events.js +127 -0
  51. package/dist/v2/office-evm.js +68 -0
  52. package/dist/v2/office-read.js +182 -0
  53. package/dist/v2/office-solana.js +134 -0
  54. package/dist/v2/office-trade.js +73 -0
  55. package/dist/v2/route-alt.js +1 -0
  56. package/dist/v2/route.js +1 -1
  57. package/dist/v2/solana.js +224 -5
  58. package/dist/v2/solanaSettle.js +2 -0
  59. package/dist/v2/tx/evm.js +66 -2
  60. package/dist/v2/tx/solana.js +3 -3
  61. package/dist/v2/types.js +4 -0
  62. package/docs/aggregator.md +19 -0
  63. package/docs/cursor-pages.md +9 -3
  64. package/docs/ton.md +1 -1
  65. package/examples/floor-line.html +1 -1
  66. package/package.json +26 -1
  67. package/src/abi/evm-event-names.ts +7 -0
  68. package/src/abi/evm.gen.ts +81 -2
  69. package/src/abi/functions.gen.ts +135 -1
  70. package/src/abi/solana.gen.ts +64 -0
  71. package/src/client/solana/index.ts +25 -6
  72. package/src/config/generated.ts +803 -26374
  73. package/src/errors.ts +21 -2
  74. package/src/events/types.gen.ts +458 -1
  75. package/src/evm/chains.ts +89 -0
  76. package/src/evm/floor/abi.gen.ts +115 -0
  77. package/src/evm/floor/calls.ts +5 -0
  78. package/src/evm/squid.ts +22 -6
  79. package/src/evm/venues.ts +340 -0
  80. package/src/generated/interface.gen.ts +93 -44
  81. package/src/index.ts +7 -0
  82. package/src/indexer/bodies.ts +308 -5
  83. package/src/indexer/client.ts +31 -4
  84. package/src/indexer/contract.ts +148 -17
  85. package/src/indexer/paths.ts +139 -7
  86. package/src/indexer/read.ts +27 -5
  87. package/src/indexer/stream.ts +4 -4
  88. package/src/math/v2/book.ts +23 -7
  89. package/src/math/v2/create.ts +1 -1
  90. package/src/math/v2/escrow.ts +213 -0
  91. package/src/math/v2/fees.ts +30 -4
  92. package/src/math/v2/milestones.ts +1 -1
  93. package/src/math/v2/office.ts +114 -0
  94. package/src/math/v2/receipt.ts +7 -3
  95. package/src/math/v2/relay.ts +269 -96
  96. package/src/math/v2/rows.ts +17 -0
  97. package/src/math/v2/team.ts +42 -1
  98. package/src/math/v2/trade.ts +3 -1
  99. package/src/reprice.ts +121 -0
  100. package/src/route/quote.ts +16 -0
  101. package/src/scaledUi.ts +123 -0
  102. package/src/solana/floor/accounts.ts +38 -5
  103. package/src/solana/floor/events.ts +63 -2
  104. package/src/solana/floor/instructions.ts +39 -1
  105. package/src/solana/floor/program.ts +3 -0
  106. package/src/stockRefresh.ts +131 -0
  107. package/src/ton/consts.generated.ts +2 -2
  108. package/src/ton/gas.ts +3 -3
  109. package/src/v2/claims.ts +34 -5
  110. package/src/v2/devbuy.ts +38 -3
  111. package/src/v2/events.ts +3 -1
  112. package/src/v2/evm.ts +209 -5
  113. package/src/v2/layouts.ts +102 -2
  114. package/src/v2/office-events.ts +133 -0
  115. package/src/v2/office-evm.ts +76 -0
  116. package/src/v2/office-read.ts +264 -0
  117. package/src/v2/office-solana.ts +159 -0
  118. package/src/v2/office-trade.ts +96 -0
  119. package/src/v2/route-alt.ts +1 -0
  120. package/src/v2/route.ts +1 -1
  121. package/src/v2/solana.ts +235 -5
  122. package/src/v2/solanaSettle.ts +2 -0
  123. package/src/v2/tx/evm.ts +66 -2
  124. package/src/v2/tx/solana.ts +5 -3
  125. package/src/v2/types.ts +76 -1
@@ -9,13 +9,30 @@ export const FLOOR_AMM_ABI = [
9
9
  {"type":"function","name":"authority","inputs":[],"outputs":[{"name":"","type":"address"}],"stateMutability":"view"},
10
10
  {"type":"function","name":"bindHandle","inputs":[{"name":"handleId","type":"bytes32"},{"name":"wallet","type":"address"},{"name":"quotes_","type":"address[]"},{"name":"deadline","type":"uint256"},{"name":"authSig","type":"bytes"},{"name":"walletSig","type":"bytes"}],"outputs":[],"stateMutability":"nonpayable"},
11
11
  {"type":"function","name":"buy","inputs":[{"name":"launchId","type":"uint256"},{"name":"amountIn","type":"uint256"},{"name":"minTokensOut","type":"uint256"},{"name":"to","type":"address"},{"name":"deadline","type":"uint256"}],"outputs":[{"name":"r","type":"tuple","components":[{"name":"tokensOut","type":"uint256"},{"name":"spent","type":"uint256"},{"name":"refund","type":"uint256"},{"name":"priceAfterX64","type":"uint256"},{"name":"graduatedNow","type":"bool"},{"name":"endedNow","type":"bool"},{"name":"budgetHit","type":"bool"}]}],"stateMutability":"payable"},
12
+ {"type":"function","name":"buyFor","inputs":[{"name":"launchId","type":"uint256"},{"name":"amountIn","type":"uint256"},{"name":"minTokensOut","type":"uint256"},{"name":"to","type":"address"},{"name":"deadline","type":"uint256"},{"name":"trader","type":"address"}],"outputs":[{"name":"r","type":"tuple","components":[{"name":"tokensOut","type":"uint256"},{"name":"spent","type":"uint256"},{"name":"refund","type":"uint256"},{"name":"priceAfterX64","type":"uint256"},{"name":"graduatedNow","type":"bool"},{"name":"endedNow","type":"bool"},{"name":"budgetHit","type":"bool"}]}],"stateMutability":"payable"},
12
13
  {"type":"function","name":"buyFromBalance","inputs":[{"name":"launchId","type":"uint256"},{"name":"minTokensOut","type":"uint256"},{"name":"to","type":"address"},{"name":"refundTo","type":"address"},{"name":"deadline","type":"uint256"}],"outputs":[{"name":"r","type":"tuple","components":[{"name":"tokensOut","type":"uint256"},{"name":"spent","type":"uint256"},{"name":"refund","type":"uint256"},{"name":"priceAfterX64","type":"uint256"},{"name":"graduatedNow","type":"bool"},{"name":"endedNow","type":"bool"},{"name":"budgetHit","type":"bool"}]}],"stateMutability":"nonpayable"},
14
+ {"type":"function","name":"buyFromBalanceFor","inputs":[{"name":"launchId","type":"uint256"},{"name":"minTokensOut","type":"uint256"},{"name":"to","type":"address"},{"name":"refundTo","type":"address"},{"name":"deadline","type":"uint256"},{"name":"trader","type":"address"}],"outputs":[{"name":"r","type":"tuple","components":[{"name":"tokensOut","type":"uint256"},{"name":"spent","type":"uint256"},{"name":"refund","type":"uint256"},{"name":"priceAfterX64","type":"uint256"},{"name":"graduatedNow","type":"bool"},{"name":"endedNow","type":"bool"},{"name":"budgetHit","type":"bool"}]}],"stateMutability":"nonpayable"},
13
15
  {"type":"function","name":"checkPreset","inputs":[{"name":"spec","type":"bytes"}],"outputs":[{"name":"ok","type":"bool"}],"stateMutability":"view"},
14
16
  {"type":"function","name":"claim","inputs":[{"name":"wallet","type":"address"},{"name":"types","type":"uint256"},{"name":"launchIds","type":"uint256[]"},{"name":"quotes_","type":"address[]"}],"outputs":[{"name":"paid","type":"uint256[]"}],"stateMutability":"nonpayable"},
15
17
  {"type":"function","name":"claimPayoutTo","inputs":[{"name":"quote","type":"address"},{"name":"to","type":"address"}],"outputs":[{"name":"paid","type":"uint256"}],"stateMutability":"nonpayable"},
16
18
  {"type":"function","name":"clearTraderRef","inputs":[{"name":"trader","type":"address"}],"outputs":[],"stateMutability":"nonpayable"},
17
19
  {"type":"function","name":"createLaunch","inputs":[{"name":"p","type":"tuple","components":[{"name":"presetId","type":"uint8"},{"name":"quote","type":"address"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"creatorBuy","type":"uint256"},{"name":"creatorBuyMinTokens","type":"uint256"},{"name":"sameAddressEverywhere","type":"bool"},{"name":"creatorSalt","type":"bytes32"},{"name":"quoteUsdCentsX64","type":"uint256"},{"name":"teamSlotRateBps","type":"uint16"}]}],"outputs":[{"name":"launchId","type":"uint256"},{"name":"token","type":"address"},{"name":"creatorTokens","type":"uint256"}],"stateMutability":"payable"},
18
20
  {"type":"function","name":"createPaused","inputs":[],"outputs":[{"name":"","type":"bool"}],"stateMutability":"view"},
21
+ {"type":"function","name":"creditPlatform","inputs":[{"name":"launchId","type":"uint256"},{"name":"amount","type":"uint256"},{"name":"memo","type":"bytes32"}],"outputs":[],"stateMutability":"payable"},
22
+ {"type":"function","name":"dealEscrowArm","inputs":[{"name":"escrow","type":"bytes32"},{"name":"step","type":"uint8"}],"outputs":[],"stateMutability":"nonpayable"},
23
+ {"type":"function","name":"dealEscrowArmV3","inputs":[{"name":"id","type":"bytes32"},{"name":"step","type":"uint8"}],"outputs":[],"stateMutability":"nonpayable"},
24
+ {"type":"function","name":"dealEscrowCancel","inputs":[{"name":"escrow","type":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},
25
+ {"type":"function","name":"dealEscrowMarketCap","inputs":[{"name":"launchId","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"stateMutability":"view"},
26
+ {"type":"function","name":"dealEscrowObject","inputs":[{"name":"id","type":"bytes32"},{"name":"step","type":"uint8"}],"outputs":[],"stateMutability":"nonpayable"},
27
+ {"type":"function","name":"dealEscrowOf","inputs":[{"name":"escrow","type":"bytes32"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"launchId","type":"uint256"},{"name":"launcher","type":"address"},{"name":"kol","type":"address"},{"name":"asset","type":"address"},{"name":"isToken","type":"bool"},{"name":"n","type":"uint8"},{"name":"released","type":"uint8"},{"name":"refunded","type":"bool"},{"name":"feeBps","type":"uint16"},{"name":"expiry","type":"int64"},{"name":"ref32","type":"bytes32"},{"name":"targets","type":"uint256[8]"},{"name":"amounts","type":"uint256[8]"},{"name":"armedAt","type":"int64[8]"},{"name":"armedBlock","type":"uint64[8]"},{"name":"cancel","type":"uint8"}]}],"stateMutability":"view"},
28
+ {"type":"function","name":"dealEscrowOpen","inputs":[{"name":"launchId","type":"uint256"},{"name":"kol","type":"address"},{"name":"ref32","type":"bytes32"},{"name":"assetIsToken","type":"bool"},{"name":"targets","type":"uint256[]"},{"name":"amounts","type":"uint256[]"},{"name":"expiry","type":"int64"}],"outputs":[{"name":"escrow","type":"bytes32"}],"stateMutability":"payable"},
29
+ {"type":"function","name":"dealEscrowOpenV3","inputs":[{"name":"launchId","type":"uint256"},{"name":"kol","type":"address"},{"name":"ref32","type":"bytes32"},{"name":"assetIsToken","type":"bool"},{"name":"t","type":"tuple","components":[{"name":"kinds","type":"uint8[]"},{"name":"targets","type":"uint256[]"},{"name":"amounts","type":"uint256[]"},{"name":"proofMask","type":"uint8"},{"name":"agency","type":"address"},{"name":"agencyBps","type":"uint16"},{"name":"expiry","type":"int64"}]}],"outputs":[{"name":"id","type":"bytes32"}],"stateMutability":"payable"},
30
+ {"type":"function","name":"dealEscrowRefund","inputs":[{"name":"escrow","type":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},
31
+ {"type":"function","name":"dealEscrowRelease","inputs":[{"name":"escrow","type":"bytes32"},{"name":"step","type":"uint8"}],"outputs":[],"stateMutability":"nonpayable"},
32
+ {"type":"function","name":"dealEscrowReleaseV3","inputs":[{"name":"id","type":"bytes32"},{"name":"step","type":"uint8"}],"outputs":[],"stateMutability":"nonpayable"},
33
+ {"type":"function","name":"dealEscrowSubmitProof","inputs":[{"name":"id","type":"bytes32"},{"name":"step","type":"uint8"},{"name":"proofHash","type":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},
34
+ {"type":"function","name":"dealEscrowV3Of","inputs":[{"name":"escrow","type":"bytes32"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"version","type":"uint8"},{"name":"kinds","type":"uint8[8]"},{"name":"proof","type":"uint8[8]"},{"name":"proofEnds","type":"int64[8]"},{"name":"proofHash","type":"bytes32[8]"},{"name":"agency","type":"address"},{"name":"agencyBps","type":"uint16"},{"name":"volAtLock","type":"uint256"},{"name":"volumeNow","type":"uint256"}]}],"stateMutability":"view"},
35
+ {"type":"function","name":"dealFeeCapBps","inputs":[],"outputs":[{"name":"","type":"uint16"}],"stateMutability":"view"},
19
36
  {"type":"function","name":"deletePreset","inputs":[{"name":"id","type":"uint8"}],"outputs":[],"stateMutability":"nonpayable"},
20
37
  {"type":"function","name":"floorTokenAccrued","inputs":[{"name":"quote","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"stateMutability":"view"},
21
38
  {"type":"function","name":"handleOwed","inputs":[{"name":"handleId","type":"bytes32"},{"name":"quote","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"stateMutability":"view"},
@@ -32,6 +49,23 @@ export const FLOOR_AMM_ABI = [
32
49
  {"type":"function","name":"moveHandleOwed","inputs":[{"name":"handleId","type":"bytes32"},{"name":"quotes_","type":"address[]"}],"outputs":[{"name":"moved","type":"uint256"}],"stateMutability":"nonpayable"},
33
50
  {"type":"function","name":"nativeCreateFee","inputs":[],"outputs":[{"name":"","type":"uint256"}],"stateMutability":"view"},
34
51
  {"type":"function","name":"nextPresetId","inputs":[],"outputs":[{"name":"","type":"uint8"}],"stateMutability":"view"},
52
+ {"type":"function","name":"officeAcceptController","inputs":[{"name":"officeId","type":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},
53
+ {"type":"function","name":"officeAcceptMerge","inputs":[{"name":"officeId","type":"bytes32"},{"name":"other","type":"bytes32"},{"name":"newController","type":"address"}],"outputs":[],"stateMutability":"nonpayable"},
54
+ {"type":"function","name":"officeAddMember","inputs":[{"name":"officeId","type":"bytes32"},{"name":"member","type":"address"}],"outputs":[],"stateMutability":"nonpayable"},
55
+ {"type":"function","name":"officeBuy","inputs":[{"name":"officeId","type":"bytes32"},{"name":"launchId","type":"uint256"},{"name":"gross","type":"uint256"},{"name":"minTokens","type":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},
56
+ {"type":"function","name":"officeCancelMerge","inputs":[{"name":"officeId","type":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},
57
+ {"type":"function","name":"officeDeposit","inputs":[{"name":"officeId","type":"bytes32"},{"name":"amount","type":"uint256"}],"outputs":[],"stateMutability":"payable"},
58
+ {"type":"function","name":"officeLeave","inputs":[{"name":"officeId","type":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},
59
+ {"type":"function","name":"officeMemberOf","inputs":[{"name":"officeId","type":"bytes32"},{"name":"member","type":"address"}],"outputs":[{"name":"units","type":"uint256"},{"name":"shareBps","type":"uint16"}],"stateMutability":"view"},
60
+ {"type":"function","name":"officeMergeStep","inputs":[{"name":"officeId","type":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},
61
+ {"type":"function","name":"officeOf","inputs":[{"name":"officeId","type":"bytes32"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"opened","type":"bool"},{"name":"controller","type":"address"},{"name":"pendingController","type":"address"},{"name":"quote","type":"address"},{"name":"cash","type":"uint256"},{"name":"unitsTotal","type":"uint256"},{"name":"shareSum","type":"uint16"},{"name":"cap","type":"uint16"},{"name":"mergeable","type":"bool"},{"name":"merged","type":"bool"},{"name":"mergeWith","type":"bytes32"},{"name":"mergeController","type":"address"},{"name":"mergedFrom","type":"bytes32"},{"name":"members","type":"address[]"},{"name":"positions","type":"tuple[]","components":[{"name":"launchId","type":"uint256"},{"name":"buyer","type":"address"},{"name":"tokens","type":"uint256"},{"name":"cost","type":"uint256"}]},{"name":"merging","type":"bytes32"}]}],"stateMutability":"view"},
62
+ {"type":"function","name":"officeOpen","inputs":[{"name":"officeId","type":"bytes32"},{"name":"quote","type":"address"}],"outputs":[],"stateMutability":"nonpayable"},
63
+ {"type":"function","name":"officeProposeController","inputs":[{"name":"officeId","type":"bytes32"},{"name":"member","type":"address"}],"outputs":[],"stateMutability":"nonpayable"},
64
+ {"type":"function","name":"officeProposeMerge","inputs":[{"name":"officeId","type":"bytes32"},{"name":"other","type":"bytes32"},{"name":"newController","type":"address"}],"outputs":[],"stateMutability":"nonpayable"},
65
+ {"type":"function","name":"officeRemoveMember","inputs":[{"name":"officeId","type":"bytes32"},{"name":"member","type":"address"}],"outputs":[],"stateMutability":"nonpayable"},
66
+ {"type":"function","name":"officeSell","inputs":[{"name":"officeId","type":"bytes32"},{"name":"launchId","type":"uint256"},{"name":"buyer","type":"address"},{"name":"tokens","type":"uint256"},{"name":"minOut","type":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},
67
+ {"type":"function","name":"officeSetShare","inputs":[{"name":"officeId","type":"bytes32"},{"name":"member","type":"address"},{"name":"shareBps","type":"uint16"}],"outputs":[],"stateMutability":"nonpayable"},
68
+ {"type":"function","name":"officeValue","inputs":[{"name":"officeId","type":"bytes32"}],"outputs":[{"name":"V","type":"uint256"}],"stateMutability":"view"},
35
69
  {"type":"function","name":"owedOf","inputs":[{"name":"wallet","type":"address"},{"name":"quote","type":"address"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"creator","type":"uint128"},{"name":"creatorRef","type":"uint128"},{"name":"teamSlot","type":"uint128"},{"name":"traderRef","type":"uint128"},{"name":"holder","type":"uint128"},{"name":"extra","type":"uint128"}]}],"stateMutability":"view"},
36
70
  {"type":"function","name":"owedOfMany","inputs":[{"name":"wallet","type":"address"},{"name":"quotes_","type":"address[]"}],"outputs":[{"name":"","type":"tuple[]","components":[{"name":"creator","type":"uint128"},{"name":"creatorRef","type":"uint128"},{"name":"teamSlot","type":"uint128"},{"name":"traderRef","type":"uint128"},{"name":"holder","type":"uint128"},{"name":"extra","type":"uint128"}]}],"stateMutability":"view"},
37
71
  {"type":"function","name":"payoutOwed","inputs":[{"name":"wallet","type":"address"},{"name":"quote","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"stateMutability":"view"},
@@ -45,11 +79,15 @@ export const FLOOR_AMM_ABI = [
45
79
  {"type":"function","name":"quoteRisk","inputs":[{"name":"token","type":"address"}],"outputs":[{"name":"accounted_","type":"uint256"},{"name":"held","type":"uint256"},{"name":"cap","type":"uint128"},{"name":"shortIns","type":"uint32"},{"name":"failedOuts","type":"uint32"},{"name":"lastFailBlock","type":"uint64"}],"stateMutability":"view"},
46
80
  {"type":"function","name":"quoteSell","inputs":[{"name":"launchId","type":"uint256"},{"name":"tokensIn","type":"uint256"},{"name":"to","type":"address"}],"outputs":[{"name":"quoteOut","type":"uint256"}],"stateMutability":"view"},
47
81
  {"type":"function","name":"quotes","inputs":[],"outputs":[{"name":"","type":"address[]"}],"stateMutability":"view"},
82
+ {"type":"function","name":"refVolume","inputs":[{"name":"launchId","type":"uint256"},{"name":"referrer","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"stateMutability":"view"},
48
83
  {"type":"function","name":"referralAuthority","inputs":[],"outputs":[{"name":"","type":"address"}],"stateMutability":"view"},
84
+ {"type":"function","name":"routerDeployer","inputs":[],"outputs":[{"name":"","type":"address"}],"stateMutability":"view"},
49
85
  {"type":"function","name":"sell","inputs":[{"name":"launchId","type":"uint256"},{"name":"tokensIn","type":"uint256"},{"name":"minQuoteOut","type":"uint256"},{"name":"to","type":"address"},{"name":"deadline","type":"uint256"}],"outputs":[{"name":"quoteOut","type":"uint256"}],"stateMutability":"nonpayable"},
50
86
  {"type":"function","name":"sellFromBalance","inputs":[{"name":"launchId","type":"uint256"},{"name":"minQuoteOut","type":"uint256"},{"name":"to","type":"address"},{"name":"deadline","type":"uint256"}],"outputs":[{"name":"quoteOut","type":"uint256"}],"stateMutability":"nonpayable"},
87
+ {"type":"function","name":"sellFromBalanceFor","inputs":[{"name":"launchId","type":"uint256"},{"name":"minQuoteOut","type":"uint256"},{"name":"to","type":"address"},{"name":"deadline","type":"uint256"},{"name":"trader","type":"address"}],"outputs":[{"name":"quoteOut","type":"uint256"}],"stateMutability":"nonpayable"},
51
88
  {"type":"function","name":"sellWithPermit","inputs":[{"name":"launchId","type":"uint256"},{"name":"tokensIn","type":"uint256"},{"name":"minQuoteOut","type":"uint256"},{"name":"to","type":"address"},{"name":"deadline","type":"uint256"},{"name":"permitDeadline","type":"uint256"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"outputs":[{"name":"quoteOut","type":"uint256"}],"stateMutability":"nonpayable"},
52
89
  {"type":"function","name":"setCreatePaused","inputs":[{"name":"paused","type":"bool"}],"outputs":[],"stateMutability":"nonpayable"},
90
+ {"type":"function","name":"setDealFeeCap","inputs":[{"name":"capBps","type":"uint16"}],"outputs":[],"stateMutability":"nonpayable"},
53
91
  {"type":"function","name":"setHolderDest","inputs":[{"name":"holderDest","type":"address"}],"outputs":[],"stateMutability":"nonpayable"},
54
92
  {"type":"function","name":"setMetadataBase","inputs":[{"name":"base","type":"string"}],"outputs":[],"stateMutability":"nonpayable"},
55
93
  {"type":"function","name":"setNativeCreateFee","inputs":[{"name":"fee","type":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},
@@ -64,6 +102,9 @@ export const FLOOR_AMM_ABI = [
64
102
  {"type":"function","name":"teamShareBuy","inputs":[{"name":"launchId","type":"uint256"},{"name":"amount","type":"uint256"},{"name":"minTokensOut","type":"uint256"},{"name":"deadline","type":"uint256"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"tokensOut","type":"uint256"},{"name":"spent","type":"uint256"},{"name":"refund","type":"uint256"},{"name":"priceAfterX64","type":"uint256"},{"name":"graduatedNow","type":"bool"},{"name":"endedNow","type":"bool"},{"name":"budgetHit","type":"bool"}]}],"stateMutability":"nonpayable"},
65
103
  {"type":"function","name":"teamShareOf","inputs":[{"name":"launchId","type":"uint256"},{"name":"wallet","type":"address"}],"outputs":[{"name":"claimable","type":"uint256"},{"name":"boughtOwed","type":"uint256"},{"name":"lastDay","type":"uint64"}],"stateMutability":"view"},
66
104
  {"type":"function","name":"teamSlotAdd","inputs":[{"name":"launchId","type":"uint256"},{"name":"key","type":"bytes32"},{"name":"kind","type":"uint8"},{"name":"amount","type":"uint256"},{"name":"payNow","type":"bool"}],"outputs":[],"stateMutability":"payable"},
105
+ {"type":"function","name":"teamSlotAddDeal","inputs":[{"name":"launchId","type":"uint256"},{"name":"key","type":"bytes32"},{"name":"kind","type":"uint8"},{"name":"amount","type":"uint256"},{"name":"dealFeeBps","type":"uint16"}],"outputs":[],"stateMutability":"nonpayable"},
106
+ {"type":"function","name":"teamSlotAddDealV3","inputs":[{"name":"launchId","type":"uint256"},{"name":"key","type":"bytes32"},{"name":"kind","type":"uint8"},{"name":"amount","type":"uint256"},{"name":"dealFeeBps","type":"uint16"},{"name":"agency","type":"address"},{"name":"agencyBps","type":"uint16"}],"outputs":[],"stateMutability":"nonpayable"},
107
+ {"type":"function","name":"teamSlotAgencyOf","inputs":[{"name":"launchId","type":"uint256"},{"name":"place","type":"uint8"}],"outputs":[{"name":"agency","type":"address"},{"name":"agencyBps","type":"uint16"}],"stateMutability":"view"},
67
108
  {"type":"function","name":"timelock","inputs":[],"outputs":[{"name":"","type":"address"}],"stateMutability":"view"},
68
109
  {"type":"function","name":"traderRef","inputs":[{"name":"trader","type":"address"}],"outputs":[{"name":"tiers","type":"address[3]"}],"stateMutability":"view"},
69
110
  {"type":"function","name":"transferAuthority","inputs":[{"name":"newAuthority","type":"address"}],"outputs":[],"stateMutability":"nonpayable"},
@@ -103,14 +144,23 @@ export const FLOOR_AMM_V2_FUNCTIONS: readonly EvmFunctionRow[] = [
103
144
  { module: "floorAmmV2", name: "UPGRADE_INTERFACE_VERSION", signature: "UPGRADE_INTERFACE_VERSION()", selector: "0xad3cb1cc", outputs: "(string)" },
104
145
  { module: "floorAmmV2", name: "bookEngine", signature: "bookEngine()", selector: "0x72148c77", outputs: "(address)" },
105
146
  { module: "floorAmmV2", name: "buy", signature: "buy(uint256,uint256,uint256,address,uint256)", selector: "0x102d8c79", outputs: "((uint256,uint256,uint256,uint256,bool,bool,bool))" },
147
+ { module: "floorAmmV2", name: "buyFor", signature: "buyFor(uint256,uint256,uint256,address,uint256,address)", selector: "0x67105875", outputs: "((uint256,uint256,uint256,uint256,bool,bool,bool))" },
106
148
  { module: "floorAmmV2", name: "buyFromBalance", signature: "buyFromBalance(uint256,uint256,address,address,uint256)", selector: "0x5f9f56d2", outputs: "((uint256,uint256,uint256,uint256,bool,bool,bool))" },
149
+ { module: "floorAmmV2", name: "buyFromBalanceFor", signature: "buyFromBalanceFor(uint256,uint256,address,address,uint256,address)", selector: "0xbb6cda49", outputs: "((uint256,uint256,uint256,uint256,bool,bool,bool))" },
107
150
  { module: "floorAmmV2", name: "creditBacking", signature: "creditBacking(uint256,uint256)", selector: "0x1f341504", outputs: "()" },
151
+ { module: "floorAmmV2", name: "creditPlatform", signature: "creditPlatform(uint256,uint256,bytes32)", selector: "0x93fe58a2", outputs: "()" },
108
152
  { module: "floorAmmV2", name: "nextModule", signature: "nextModule()", selector: "0xf85abfc7", outputs: "(address)" },
153
+ { module: "floorAmmV2", name: "noteMove", signature: "noteMove(address,address,uint256,uint256,uint256)", selector: "0xe6b761ea", outputs: "()" },
109
154
  { module: "floorAmmV2", name: "proxiableUUID", signature: "proxiableUUID()", selector: "0x52d1902d", outputs: "(bytes32)" },
110
155
  { module: "floorAmmV2", name: "quoteBuy", signature: "quoteBuy(uint256,uint256,address)", selector: "0xec7a34c9", outputs: "((uint256,uint256,uint256,uint256,bool,bool,bool))" },
111
156
  { module: "floorAmmV2", name: "quoteSell", signature: "quoteSell(uint256,uint256,address)", selector: "0x0cff08d1", outputs: "(uint256)" },
157
+ { module: "floorAmmV2", name: "relayBook", signature: "relayBook(uint256)", selector: "0xd1f6ab70", outputs: "()" },
158
+ { module: "floorAmmV2", name: "relayBooks", signature: "relayBooks(uint256,uint256)", selector: "0xcf90be94", outputs: "()" },
159
+ { module: "floorAmmV2", name: "roomOf", signature: "roomOf()", selector: "0x7a0be43c", outputs: "()" },
160
+ { module: "floorAmmV2", name: "routerDeployer", signature: "routerDeployer()", selector: "0xe8381015", outputs: "(address)" },
112
161
  { module: "floorAmmV2", name: "sell", signature: "sell(uint256,uint256,uint256,address,uint256)", selector: "0xbadb999b", outputs: "(uint256)" },
113
162
  { module: "floorAmmV2", name: "sellFromBalance", signature: "sellFromBalance(uint256,uint256,address,uint256)", selector: "0x611b00a8", outputs: "(uint256)" },
163
+ { module: "floorAmmV2", name: "sellFromBalanceFor", signature: "sellFromBalanceFor(uint256,uint256,address,uint256,address)", selector: "0x54590af6", outputs: "(uint256)" },
114
164
  { module: "floorAmmV2", name: "sellWithPermit", signature: "sellWithPermit(uint256,uint256,uint256,address,uint256,uint256,uint8,bytes32,bytes32)", selector: "0x2ab030d3", outputs: "(uint256)" },
115
165
  { module: "floorAmmV2", name: "simBuy", signature: "simBuy(uint256,uint256,address)", selector: "0xf69acbed", outputs: "((uint256,uint256,uint256,uint128,uint8,bool,bool))" },
116
166
  { module: "floorAmmV2", name: "simSell", signature: "simSell(uint256,uint256,address)", selector: "0xd3536ecd", outputs: "((uint256,uint256,uint256,uint128,uint8))" },
@@ -118,8 +168,14 @@ export const FLOOR_AMM_V2_FUNCTIONS: readonly EvmFunctionRow[] = [
118
168
  { module: "floorAmmV2", name: "upgradeToAndCall", signature: "upgradeToAndCall(address,bytes)", selector: "0x4f1ef286", outputs: "()" },
119
169
  { module: "floorAmmViewsV2", name: "bidMoney", signature: "bidMoney(uint256)", selector: "0x8e403c51", outputs: "(uint256)" },
120
170
  { module: "floorAmmViewsV2", name: "circulatingOf", signature: "circulatingOf(uint256)", selector: "0x72812fcf", outputs: "(uint256,uint256,uint256)" },
171
+ { module: "floorAmmViewsV2", name: "dealEscrowCancel", signature: "dealEscrowCancel(bytes32)", selector: "0x16d11c50", outputs: "()" },
172
+ { module: "floorAmmViewsV2", name: "dealEscrowMarketCap", signature: "dealEscrowMarketCap(uint256)", selector: "0x96cefeb9", outputs: "(uint256)" },
173
+ { module: "floorAmmViewsV2", name: "dealEscrowObject", signature: "dealEscrowObject(bytes32,uint8)", selector: "0xd8071cc0", outputs: "()" },
174
+ { module: "floorAmmViewsV2", name: "dealEscrowOf", signature: "dealEscrowOf(bytes32)", selector: "0x2a144918", outputs: "((uint256,address,address,address,bool,uint8,uint8,bool,uint16,int64,bytes32,uint256[8],uint256[8],int64[8],uint64[8],uint8))" },
175
+ { module: "floorAmmViewsV2", name: "dealEscrowSubmitProof", signature: "dealEscrowSubmitProof(bytes32,uint8,bytes32)", selector: "0x236f5ea6", outputs: "()" },
176
+ { module: "floorAmmViewsV2", name: "dealEscrowV3Of", signature: "dealEscrowV3Of(bytes32)", selector: "0xaffbc4bb", outputs: "((uint8,uint8[8],uint8[8],int64[8],bytes32[8],address,uint16,uint256,uint256))" },
121
177
  { module: "floorAmmViewsV2", name: "holderBook", signature: "holderBook(uint256)", selector: "0xf5d23b14", outputs: "((uint128,uint64,uint64,uint128,uint128))" },
122
- { module: "floorAmmViewsV2", name: "launchBook", signature: "launchBook(uint256)", selector: "0x926310f1", outputs: "((uint128,uint128,uint128,uint128[],uint8,(uint128,uint128,uint64,uint64,uint64,uint128,uint16,uint16,uint8,uint8)[48],uint128,uint64,uint64[],uint128[],uint8,uint8,uint128[],uint128[],uint128,uint64,bool,uint32[5],uint128,uint64,bool))" },
178
+ { module: "floorAmmViewsV2", name: "launchBook", signature: "launchBook(uint256)", selector: "0x926310f1", outputs: "((uint128,uint128,uint128,uint128[],uint8,(uint128,uint128,uint64,uint64,uint64,uint128,uint16,uint16,uint8,uint8)[48],uint128,uint64,uint64[],uint128[],uint8,uint8,uint128[],uint128[],uint128,uint64,bool,uint32[5],uint128,uint64,bool,uint32))" },
123
179
  { module: "floorAmmViewsV2", name: "launchCount", signature: "launchCount()", selector: "0x27cca59f", outputs: "(uint256)" },
124
180
  { module: "floorAmmViewsV2", name: "launchFeeCurve", signature: "launchFeeCurve(uint256)", selector: "0xc598083f", outputs: "((uint32[5],uint128,uint128))" },
125
181
  { module: "floorAmmViewsV2", name: "launchMilestones", signature: "launchMilestones(uint256)", selector: "0x2414ccf1", outputs: "((uint128[4],uint128[4]))" },
@@ -131,8 +187,10 @@ export const FLOOR_AMM_V2_FUNCTIONS: readonly EvmFunctionRow[] = [
131
187
  { module: "floorAmmViewsV2", name: "nextModule", signature: "nextModule()", selector: "0xf85abfc7", outputs: "(address)" },
132
188
  { module: "floorAmmViewsV2", name: "owedV2", signature: "owedV2(address,uint256[],address[])", selector: "0xdd3ee1ef", outputs: "((uint256,address,address,uint256,uint256,uint256,uint256,uint256,uint256,uint64,uint256)[],(address,uint256,uint256,uint256,uint256,uint256)[])" },
133
189
  { module: "floorAmmViewsV2", name: "pairIdOf", signature: "pairIdOf(uint256)", selector: "0x83a74ea3", outputs: "(bytes32)" },
190
+ { module: "floorAmmViewsV2", name: "refVolume", signature: "refVolume(uint256,address)", selector: "0xe6a32581", outputs: "(uint256)" },
134
191
  { module: "floorAmmViewsV2", name: "teamShareBuyAndClaim", signature: "teamShareBuyAndClaim(uint256,uint256,uint256,uint256)", selector: "0xc7f1048c", outputs: "((uint256,uint256,uint256,uint256,bool,bool,bool),uint256[])" },
135
192
  { module: "floorAmmViewsV2", name: "teamShareOf", signature: "teamShareOf(uint256,address)", selector: "0xb2280af2", outputs: "(uint256,uint256,uint64)" },
193
+ { module: "floorAmmViewsV2", name: "teamSlotAgencyOf", signature: "teamSlotAgencyOf(uint256,uint8)", selector: "0x1764d99f", outputs: "(address,uint16)" },
136
194
  { module: "floorAmmViewsV2", name: "teamSlotOf", signature: "teamSlotOf(uint256)", selector: "0x8744aded", outputs: "((uint64[10],uint32[10],uint64[10],address[10],bytes32[10],uint128[10],uint64[10],address[10]))" },
137
195
  { module: "floorAmmViewsV2", name: "traderRef", signature: "traderRef(address)", selector: "0xcfc18291", outputs: "(address[3])" },
138
196
  { module: "floorAmmCreateV2", name: "createBookEngine", signature: "createBookEngine()", selector: "0x0fdf26a7", outputs: "(address)" },
@@ -148,7 +206,83 @@ export const FLOOR_AMM_V2_FUNCTIONS: readonly EvmFunctionRow[] = [
148
206
  { module: "floorAmmCreateV2", name: "withdrawPlatformMany", signature: "withdrawPlatformMany(uint256[])", selector: "0x7c74681b", outputs: "(uint256)" },
149
207
  { module: "floorAmmClaimsV2", name: "burnTeamV2", signature: "burnTeamV2(uint256,uint8,uint256)", selector: "0x2f7bf11b", outputs: "()" },
150
208
  { module: "floorAmmClaimsV2", name: "claim", signature: "claim(address,uint256,uint256[],address[])", selector: "0xa461a90d", outputs: "(uint256[])" },
209
+ { module: "floorAmmClaimsV2", name: "dealEscrowArm", signature: "dealEscrowArm(bytes32,uint8)", selector: "0x3fe96415", outputs: "()" },
210
+ { module: "floorAmmClaimsV2", name: "dealEscrowArmV3", signature: "dealEscrowArmV3(bytes32,uint8)", selector: "0x32037a0e", outputs: "()" },
211
+ { module: "floorAmmClaimsV2", name: "dealEscrowOpen", signature: "dealEscrowOpen(uint256,address,bytes32,bool,uint256[],uint256[],int64)", selector: "0xe279a5e8", outputs: "(bytes32)" },
212
+ { module: "floorAmmClaimsV2", name: "dealEscrowOpenV3", signature: "dealEscrowOpenV3(uint256,address,bytes32,bool,(uint8[],uint256[],uint256[],uint8,address,uint16,int64))", selector: "0xa1330ee1", outputs: "(bytes32)" },
213
+ { module: "floorAmmClaimsV2", name: "dealEscrowRefund", signature: "dealEscrowRefund(bytes32)", selector: "0x947a9b41", outputs: "()" },
214
+ { module: "floorAmmClaimsV2", name: "dealEscrowRelease", signature: "dealEscrowRelease(bytes32,uint8)", selector: "0xcd129e2e", outputs: "()" },
215
+ { module: "floorAmmClaimsV2", name: "dealEscrowReleaseV3", signature: "dealEscrowReleaseV3(bytes32,uint8)", selector: "0xb25894ac", outputs: "()" },
151
216
  { module: "floorAmmClaimsV2", name: "nextModule", signature: "nextModule()", selector: "0xf85abfc7", outputs: "(address)" },
152
217
  { module: "floorAmmClaimsV2", name: "teamSlotAdd", signature: "teamSlotAdd(uint256,bytes32,uint8,uint256,bool)", selector: "0xd5402e81", outputs: "()" },
218
+ { module: "floorAmmClaimsV2", name: "teamSlotAddDeal", signature: "teamSlotAddDeal(uint256,bytes32,uint8,uint256,uint16)", selector: "0xed6c1829", outputs: "()" },
219
+ { module: "floorAmmClaimsV2", name: "teamSlotAddDealV3", signature: "teamSlotAddDealV3(uint256,bytes32,uint8,uint256,uint16,address,uint16)", selector: "0x883baaa4", outputs: "()" },
153
220
  { module: "floorAmmClaimsV2", name: "unlockCreatorBuy", signature: "unlockCreatorBuy(uint256)", selector: "0xf03d6d5e", outputs: "(uint256)" },
221
+ { module: "floorAmmOfficeV2", name: "nextModule", signature: "nextModule()", selector: "0xf85abfc7", outputs: "(address)" },
222
+ { module: "floorAmmOfficeV2", name: "officeAcceptController", signature: "officeAcceptController(bytes32)", selector: "0x94a408e4", outputs: "()" },
223
+ { module: "floorAmmOfficeV2", name: "officeAcceptMerge", signature: "officeAcceptMerge(bytes32,bytes32,address)", selector: "0x5b134957", outputs: "()" },
224
+ { module: "floorAmmOfficeV2", name: "officeAddMember", signature: "officeAddMember(bytes32,address)", selector: "0xe65ac3d9", outputs: "()" },
225
+ { module: "floorAmmOfficeV2", name: "officeBuy", signature: "officeBuy(bytes32,uint256,uint256,uint256)", selector: "0xad7e22ec", outputs: "()" },
226
+ { module: "floorAmmOfficeV2", name: "officeCancelMerge", signature: "officeCancelMerge(bytes32)", selector: "0x009048f9", outputs: "()" },
227
+ { module: "floorAmmOfficeV2", name: "officeDeposit", signature: "officeDeposit(bytes32,uint256)", selector: "0x303a9f22", outputs: "()" },
228
+ { module: "floorAmmOfficeV2", name: "officeLeave", signature: "officeLeave(bytes32)", selector: "0xa3c22110", outputs: "()" },
229
+ { module: "floorAmmOfficeV2", name: "officeMemberOf", signature: "officeMemberOf(bytes32,address)", selector: "0x17883590", outputs: "(uint256,uint16)" },
230
+ { module: "floorAmmOfficeV2", name: "officeMergeStep", signature: "officeMergeStep(bytes32)", selector: "0x8c2973f8", outputs: "()" },
231
+ { module: "floorAmmOfficeV2", name: "officeOf", signature: "officeOf(bytes32)", selector: "0x525c1680", outputs: "((bool,address,address,address,uint256,uint256,uint16,uint16,bool,bool,bytes32,address,bytes32,address[],(uint256,address,uint256,uint256)[],bytes32))" },
232
+ { module: "floorAmmOfficeV2", name: "officeOpen", signature: "officeOpen(bytes32,address)", selector: "0x749cd130", outputs: "()" },
233
+ { module: "floorAmmOfficeV2", name: "officeProposeController", signature: "officeProposeController(bytes32,address)", selector: "0x7dc27095", outputs: "()" },
234
+ { module: "floorAmmOfficeV2", name: "officeProposeMerge", signature: "officeProposeMerge(bytes32,bytes32,address)", selector: "0x95660c91", outputs: "()" },
235
+ { module: "floorAmmOfficeV2", name: "officeRemoveMember", signature: "officeRemoveMember(bytes32,address)", selector: "0xf1b0f92d", outputs: "()" },
236
+ { module: "floorAmmOfficeV2", name: "officeSell", signature: "officeSell(bytes32,uint256,address,uint256,uint256)", selector: "0x6b8325c5", outputs: "()" },
237
+ { module: "floorAmmOfficeV2", name: "officeSetShare", signature: "officeSetShare(bytes32,address,uint16)", selector: "0x1569850a", outputs: "()" },
238
+ { module: "floorAmmOfficeV2", name: "officeValue", signature: "officeValue(bytes32)", selector: "0x7f2683e3", outputs: "(uint256)" },
239
+ { module: "floorAmmGovV2", name: "NATIVE", signature: "NATIVE()", selector: "0xa0cf0aea", outputs: "(address)" },
240
+ { module: "floorAmmGovV2", name: "acceptAuthority", signature: "acceptAuthority()", selector: "0x1580798f", outputs: "()" },
241
+ { module: "floorAmmGovV2", name: "accounted", signature: "accounted(address)", selector: "0xee1a56ce", outputs: "(uint256)" },
242
+ { module: "floorAmmGovV2", name: "addQuote", signature: "addQuote(address,uint256,uint256)", selector: "0x488c664b", outputs: "()" },
243
+ { module: "floorAmmGovV2", name: "authority", signature: "authority()", selector: "0xbf7e214f", outputs: "(address)" },
244
+ { module: "floorAmmGovV2", name: "bindHandle", signature: "bindHandle(bytes32,address,address[],uint256,bytes,bytes)", selector: "0xcea3463e", outputs: "()" },
245
+ { module: "floorAmmGovV2", name: "claimPayoutTo", signature: "claimPayoutTo(address,address)", selector: "0xc14ab75d", outputs: "(uint256)" },
246
+ { module: "floorAmmGovV2", name: "clearTraderRef", signature: "clearTraderRef(address)", selector: "0x53550430", outputs: "()" },
247
+ { module: "floorAmmGovV2", name: "createPaused", signature: "createPaused()", selector: "0xbac7b497", outputs: "(bool)" },
248
+ { module: "floorAmmGovV2", name: "dealFeeCapBps", signature: "dealFeeCapBps()", selector: "0xfd066b8a", outputs: "(uint16)" },
249
+ { module: "floorAmmGovV2", name: "floorTokenAccrued", signature: "floorTokenAccrued(address)", selector: "0xf3a261f9", outputs: "(uint256)" },
250
+ { module: "floorAmmGovV2", name: "handleOwed", signature: "handleOwed(bytes32,address)", selector: "0xaad2ed5c", outputs: "(uint256)" },
251
+ { module: "floorAmmGovV2", name: "handleWallet", signature: "handleWallet(bytes32)", selector: "0xc6da686d", outputs: "(address)" },
252
+ { module: "floorAmmGovV2", name: "holderBucket", signature: "holderBucket(address)", selector: "0x088806d0", outputs: "(uint256)" },
253
+ { module: "floorAmmGovV2", name: "holderDest", signature: "holderDest()", selector: "0x84a6263a", outputs: "(address)" },
254
+ { module: "floorAmmGovV2", name: "initialize", signature: "initialize(address,address,address,address)", selector: "0xf8c8765e", outputs: "()" },
255
+ { module: "floorAmmGovV2", name: "metadataBase", signature: "metadataBase()", selector: "0x65b973c3", outputs: "(string)" },
256
+ { module: "floorAmmGovV2", name: "moveHandleOwed", signature: "moveHandleOwed(bytes32,address[])", selector: "0xc43594a1", outputs: "(uint256)" },
257
+ { module: "floorAmmGovV2", name: "nativeCreateFee", signature: "nativeCreateFee()", selector: "0x10b51e45", outputs: "(uint256)" },
258
+ { module: "floorAmmGovV2", name: "ogCount", signature: "ogCount()", selector: "0x9457990a", outputs: "(uint16,uint64)" },
259
+ { module: "floorAmmGovV2", name: "ogUserOf", signature: "ogUserOf(address)", selector: "0x6df29e2f", outputs: "(uint64,uint64,bool)" },
260
+ { module: "floorAmmGovV2", name: "owedOf", signature: "owedOf(address,address)", selector: "0xfacba08d", outputs: "((uint128,uint128,uint128,uint128,uint128,uint128))" },
261
+ { module: "floorAmmGovV2", name: "owedOfMany", signature: "owedOfMany(address,address[])", selector: "0xa1efa4ba", outputs: "((uint128,uint128,uint128,uint128,uint128,uint128)[])" },
262
+ { module: "floorAmmGovV2", name: "payoutOwed", signature: "payoutOwed(address,address)", selector: "0xae3f9120", outputs: "(uint256)" },
263
+ { module: "floorAmmGovV2", name: "pendingAuthority", signature: "pendingAuthority()", selector: "0xfabb94bb", outputs: "(address)" },
264
+ { module: "floorAmmGovV2", name: "platformOwed", signature: "platformOwed(address)", selector: "0x240b9586", outputs: "(uint256)" },
265
+ { module: "floorAmmGovV2", name: "priceUpdater", signature: "priceUpdater()", selector: "0xfc612a8d", outputs: "(address)" },
266
+ { module: "floorAmmGovV2", name: "quoteEntry", signature: "quoteEntry(address)", selector: "0x77665076", outputs: "((bool,bool,uint8,uint256,uint256,uint64,uint64))" },
267
+ { module: "floorAmmGovV2", name: "quoteRisk", signature: "quoteRisk(address)", selector: "0x1461d14e", outputs: "(uint256,uint256,(uint128,uint32,uint32,uint64))" },
268
+ { module: "floorAmmGovV2", name: "quotes", signature: "quotes()", selector: "0xd6a5d7db", outputs: "(address[])" },
269
+ { module: "floorAmmGovV2", name: "referralAuthority", signature: "referralAuthority()", selector: "0x2fe0a99a", outputs: "(address)" },
270
+ { module: "floorAmmGovV2", name: "revokeOgUser", signature: "revokeOgUser(address)", selector: "0x52e52ecc", outputs: "()" },
271
+ { module: "floorAmmGovV2", name: "setCreatePaused", signature: "setCreatePaused(bool)", selector: "0x83bcec85", outputs: "()" },
272
+ { module: "floorAmmGovV2", name: "setDealFeeCap", signature: "setDealFeeCap(uint16)", selector: "0x041a4410", outputs: "()" },
273
+ { module: "floorAmmGovV2", name: "setHolderDest", signature: "setHolderDest(address)", selector: "0x6ad3e66d", outputs: "()" },
274
+ { module: "floorAmmGovV2", name: "setMetadataBase", signature: "setMetadataBase(string)", selector: "0xd3811c0f", outputs: "()" },
275
+ { module: "floorAmmGovV2", name: "setNativeCreateFee", signature: "setNativeCreateFee(uint256)", selector: "0xa4433667", outputs: "()" },
276
+ { module: "floorAmmGovV2", name: "setOgUser", signature: "setOgUser(address,uint256,bytes)", selector: "0x02cb4469", outputs: "()" },
277
+ { module: "floorAmmGovV2", name: "setPriceUpdater", signature: "setPriceUpdater(address)", selector: "0x97c4a5f3", outputs: "()" },
278
+ { module: "floorAmmGovV2", name: "setQuoteCap", signature: "setQuoteCap(address,uint128)", selector: "0x42adf398", outputs: "()" },
279
+ { module: "floorAmmGovV2", name: "setQuotePrice", signature: "setQuotePrice(address,uint256)", selector: "0x3857ed9e", outputs: "()" },
280
+ { module: "floorAmmGovV2", name: "setReferralAuthority", signature: "setReferralAuthority(address)", selector: "0x46325d7a", outputs: "()" },
281
+ { module: "floorAmmGovV2", name: "setTimelock", signature: "setTimelock(address)", selector: "0xbdacb303", outputs: "()" },
282
+ { module: "floorAmmGovV2", name: "setTraderRef", signature: "setTraderRef(address,address[3],uint256,bytes,bytes)", selector: "0xd7426758", outputs: "()" },
283
+ { module: "floorAmmGovV2", name: "setTreasury", signature: "setTreasury(address)", selector: "0xf0f44260", outputs: "()" },
284
+ { module: "floorAmmGovV2", name: "timelock", signature: "timelock()", selector: "0xd33219b4", outputs: "(address)" },
285
+ { module: "floorAmmGovV2", name: "transferAuthority", signature: "transferAuthority(address)", selector: "0x3078db6c", outputs: "()" },
286
+ { module: "floorAmmGovV2", name: "treasury", signature: "treasury()", selector: "0x61d027b3", outputs: "(address)" },
287
+ { module: "floorAmmGovV2", name: "updateQuote", signature: "updateQuote(address,bool,uint256,uint256)", selector: "0x21593d6e", outputs: "()" },
154
288
  ];
@@ -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"]] },
@@ -54,6 +57,22 @@ export const SOLANA_EVENT_SCHEMAS: readonly SolanaEventSchema[] = [
54
57
  { name: "GenesisListRootSet", discriminator: "85037264ea1a3265", source: "v1", fields: [["signer","pubkey"],["oldRoot","bytes:32"],["newRoot","bytes:32"]] },
55
58
  { name: "BurnsSynced", discriminator: "cfb2d288fed64590", source: "v1", fields: [["launch","pubkey"],["incinerated","u64"],["supply","u64"],["sOut","u64"],["floorAfterX64","u128"],["slot","u64"]] },
56
59
  { name: "TokensBurned", discriminator: "e6ff2271e235e309", source: "v1", fields: [["launch","pubkey"],["wallet","pubkey"],["role","u8"],["place","u8"],["fromTeamBuy","u64"],["fromWallet","u64"],["balanceBefore","u64"],["owedAfter","u64"],["split","u64[10]"],["supply","u64"],["sOut","u64"],["floorAfterX64","u128"],["slot","u64"],["fromShareBought","u64?"]] },
60
+ { name: "DealFeePaid", discriminator: "d0d4054001dc9d85", source: "v1", fields: [["launch","pubkey"],["place","u8"],["member","pubkey"],["owed","u64"],["fee","u64"],["agencyPart","u64"]] },
61
+ { name: "PlatformCredited", discriminator: "340c33001e1c2bab", source: "v1", fields: [["launch","pubkey"],["payer","pubkey"],["quoteMint","pubkey"],["amount","u64"],["memo","bytes:32"]] },
62
+ { name: "TeamSlotDealFee", discriminator: "20dcbfa8f94cc11c", source: "v1", fields: [["launch","pubkey"],["index","u8"],["key","bytes:32"],["dealFeeBps","u16"]] },
63
+ { name: "TeamSlotAgency", discriminator: "f9c19e1b665cba05", source: "v1", fields: [["launch","pubkey"],["index","u8"],["key","bytes:32"],["agency","pubkey"],["agencyBps","u16"]] },
64
+ { name: "DealFeeCapSet", discriminator: "9457450109c1d6b9", source: "v1", fields: [["capBps","u16"]] },
65
+ { name: "DealEscrowOpened", discriminator: "17bce9ef00467001", source: "v1", fields: [["launch","pubkey"],["escrow","pubkey"],["launcher","pubkey"],["kol","pubkey"],["ref32","bytes:32"],["assetMint","pubkey"],["kind","u8"],["n","u8"],["targets","u128[8]"],["amounts","u64[8]"],["total","u64"],["expiry","i64"]] },
66
+ { name: "DealEscrowArmed", discriminator: "99e5a265f87e7181", source: "v1", fields: [["launch","pubkey"],["escrow","pubkey"],["ref32","bytes:32"],["step","u8"],["marketCap","u128"],["armedAt","i64"],["armedSlot","u64"]] },
67
+ { name: "DealEscrowReleased", discriminator: "b7370a5726741fd8", source: "v1", fields: [["launch","pubkey"],["escrow","pubkey"],["ref32","bytes:32"],["step","u8"],["kol","pubkey"],["amount","u64"],["fee","u64"],["marketCap","u128"]] },
68
+ { name: "DealEscrowRefunded", discriminator: "15e26e0d525a51cf", source: "v1", fields: [["launch","pubkey"],["escrow","pubkey"],["ref32","bytes:32"],["launcher","pubkey"],["amount","u64"]] },
69
+ { name: "DealEscrowCancelAgreed", discriminator: "5d19c81de71d73ff", source: "v1", fields: [["launch","pubkey"],["escrow","pubkey"],["ref32","bytes:32"],["by","pubkey"],["party","u8"],["agreed","u8"]] },
70
+ { name: "DealEscrowCancelled", discriminator: "35e5ddea110984ff", source: "v1", fields: [["launch","pubkey"],["escrow","pubkey"],["ref32","bytes:32"],["launcher","pubkey"],["amount","u64"]] },
71
+ { name: "RefVolumeOpened", discriminator: "70ce4a5844f18c55", source: "v1", fields: [["launch","pubkey"],["referrer","pubkey"]] },
72
+ { name: "DealEscrowTermsV3", discriminator: "211bc0a0a5a75738", source: "v1", fields: [["launch","pubkey"],["escrow","pubkey"],["ref32","bytes:32"],["kinds","bytes:8"],["proofMask","u8"],["agency","pubkey"],["agencyBps","u16"],["volAtLock","u128"]] },
73
+ { name: "DealEscrowSplit", discriminator: "439c4d8395ffd975", source: "v1", fields: [["launch","pubkey"],["escrow","pubkey"],["ref32","bytes:32"],["step","u8"],["kind","u8"],["kol","pubkey"],["kolPart","u64"],["agency","pubkey"],["agencyPart","u64"],["tiers","pubkey[3]"],["refs","u64[3]"],["feeRest","u64"]] },
74
+ { name: "DealEscrowProofSubmitted", discriminator: "f0767d9dc16fb763", source: "v1", fields: [["launch","pubkey"],["escrow","pubkey"],["ref32","bytes:32"],["step","u8"],["proofHash","bytes:32"],["state","u8"],["windowEnds","i64"]] },
75
+ { name: "DealEscrowProofObjected", discriminator: "e140bc9e357d541b", source: "v1", fields: [["launch","pubkey"],["escrow","pubkey"],["ref32","bytes:32"],["step","u8"]] },
57
76
  { name: "GenesisPublicStarted", discriminator: "0f963d81be5c82af", source: "v1", fields: [["signer","pubkey"],["at","i64"]] },
58
77
  { name: "GenesisEndSet", discriminator: "2fc250f230dedba2", source: "v1", fields: [["signer","pubkey"],["oldEndsAt","i64"],["newEndsAt","i64"]] },
59
78
  { name: "LaunchCreatedV2", discriminator: "4c0e9eb9ef6b568e", source: "v2", fields: [["launch","pubkey"],["mint","pubkey"],["quoteMint","pubkey"],["creator","pubkey"],["id","u64"],["presetId","u8"],["presetVersion","u32"],["presetHash","bytes:32"],["p0X64","u128"],["raise","u64"],["windowTokens","u64"],["creatorBuyTokens","u64"],["createFee","u64"],["name","bytes:32"],["symbol","bytes:10"],["slot","u64"],["ts","i64"],["listed","bool"],["quoteUsdCentsX64","u128"],["nativeCreateFee","u64"],["rowVersion","u8"],["sqrtP0","u128"]] },
@@ -62,6 +81,7 @@ export const SOLANA_EVENT_SCHEMAS: readonly SolanaEventSchema[] = [
62
81
  { name: "HolderPositionClosed", discriminator: "a5451f6d7c8dab3c", source: "v2", fields: [["launch","pubkey"],["owner","pubkey"],["amount","u64"],["paid","u64"]] },
63
82
  { name: "HolderIndexRolled", discriminator: "5c857c0e16a9a203", source: "v2", fields: [["launch","pubkey"],["index","u128"],["wMatured","u64"],["wPending","u64"],["carry","u64"]] },
64
83
  { name: "DeadSynced", discriminator: "29e5a9cda4b90d32", source: "v2", fields: [["launch","pubkey"],["added","u64"],["deadTokens","u64"],["sCirc","u64"]] },
84
+ { name: "RefSlices", discriminator: "328f40d2f919f9a9", source: "v2", fields: [["launch","pubkey"],["trader","pubkey"],["traderParts","u64[3]"],["creatorParts","u64[3]"],["og","u8"]] },
65
85
  { 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
86
  ];
67
87
 
@@ -137,4 +157,48 @@ export const SOLANA_ERRORS: readonly ProgramErrorRow[] = [
137
157
  { chain: "solana", name: "HookAccountsMissing", message: "the transfer-hook accounts are missing", code: 6068, selector: null, signature: null },
138
158
  { chain: "solana", name: "RowTooManyRanges", message: "the row has too many ranges", code: 6069, selector: null, signature: null },
139
159
  { chain: "solana", name: "RowNotFeasible", message: "the row fails the feasibility check", code: 6070, selector: null, signature: null },
160
+ { chain: "solana", name: "OgFull", message: "the OG Users are full: OG_MAX windows are set on this chain", code: 6071, selector: null, signature: null },
161
+ { chain: "solana", name: "DealFeeOverCap", message: "the Deal Fee is above the governance cap (Config.deal_fee_cap_bps)", code: 6072, selector: null, signature: null },
162
+ { chain: "solana", name: "DealFeeFixed", message: "this Team Slot member's Deal Fee is set once and never changes", code: 6073, selector: null, signature: null },
163
+ { chain: "solana", name: "DealEscrowSteps", message: "deal escrow steps: 1 ..= 8, targets above 0 and strictly ascending, amounts above 0, the total within u64", code: 6074, selector: null, signature: null },
164
+ { chain: "solana", name: "DealEscrowExpiry", message: "deal escrow expiry is less than 1 day away", code: 6075, selector: null, signature: null },
165
+ { chain: "solana", name: "DealEscrowTarget", message: "the launch's market cap is under this step's target", code: 6076, selector: null, signature: null },
166
+ { chain: "solana", name: "DealEscrowNotArmed", message: "this deal escrow step was never armed", code: 6077, selector: null, signature: null },
167
+ { chain: "solana", name: "DealEscrowTooSoon", message: "less than 1 hour since this deal escrow step was armed", code: 6078, selector: null, signature: null },
168
+ { chain: "solana", name: "DealEscrowDone", message: "this deal escrow step is already armed, released or refunded", code: 6079, selector: null, signature: null },
169
+ { chain: "solana", name: "DealEscrowExpired", message: "the deal escrow has expired", code: 6080, selector: null, signature: null },
170
+ { chain: "solana", name: "DealEscrowNotExpired", message: "the deal escrow has not expired", code: 6081, selector: null, signature: null },
171
+ { chain: "solana", name: "DealEscrowFunding", message: "the deal escrow vault did not receive the whole total (a transfer-fee asset is refused)", code: 6082, selector: null, signature: null },
172
+ { chain: "solana", name: "DealEscrowNotParty", message: "only the deal escrow's launcher or its KOL may agree to cancel it", code: 6083, selector: null, signature: null },
173
+ { chain: "solana", name: "DealEscrowAgency", message: "deal escrow agency: a payee needs 1 ..= 3,000 bps, no payee needs 0", code: 6084, selector: null, signature: null },
174
+ { chain: "solana", name: "DealEscrowProofNotRequired", message: "this deal escrow step needs no proof", code: 6085, selector: null, signature: null },
175
+ { chain: "solana", name: "DealEscrowProofState", message: "this deal escrow step's proof cannot move from its state (a window is open, it is armed, or nothing is open to object to)", code: 6086, selector: null, signature: null },
176
+ { chain: "solana", name: "DealEscrowWindowClosed", message: "this deal escrow step's objection window has closed", code: 6087, selector: null, signature: null },
177
+ { chain: "solana", name: "DealEscrowNoObjectionLeft", message: "this deal escrow step was objected to once already", code: 6088, selector: null, signature: null },
178
+ { chain: "solana", name: "DealEscrowNotProven", message: "this deal escrow step's proof is not armed", code: 6089, selector: null, signature: null },
179
+ { chain: "solana", name: "DealEscrowVersion", message: "this instruction does not serve this deal escrow's version (a v3 escrow uses the v3 arm and release)", code: 6090, selector: null, signature: null },
180
+ { chain: "solana", name: "RefVolumeBookFull", message: "the launch's referred-volume book is full", code: 6091, selector: null, signature: null },
181
+ { chain: "solana", name: "OfficeNotMember", message: "the signer or target is not a member of this Office", code: 6092, selector: null, signature: null },
182
+ { chain: "solana", name: "OfficeNotController", message: "only this Office's controller may do this", code: 6093, selector: null, signature: null },
183
+ { chain: "solana", name: "OfficeFull", message: "this Office is full", code: 6094, selector: null, signature: null },
184
+ { chain: "solana", name: "OfficeAlreadyMember", message: "already a member of this Office", code: 6095, selector: null, signature: null },
185
+ { chain: "solana", name: "OfficeShareSum", message: "a Spending Share over 10,000 bps, or the shares together over 10,000", code: 6096, selector: null, signature: null },
186
+ { chain: "solana", name: "OfficeOverShare", message: "this buy passes the member's Spending Share of the pool", code: 6097, selector: null, signature: null },
187
+ { chain: "solana", name: "OfficeNoCash", message: "this buy passes the pool's cash", code: 6098, selector: null, signature: null },
188
+ { chain: "solana", name: "OfficePositions", message: "the pool's positions are full (or a merge would pass the cap)", code: 6099, selector: null, signature: null },
189
+ { chain: "solana", name: "OfficeZeroAmount", message: "a zero deposit or buy", code: 6100, selector: null, signature: null },
190
+ { chain: "solana", name: "OfficeZeroUnits", message: "this deposit mints no units, or the pool has no units", code: 6101, selector: null, signature: null },
191
+ { chain: "solana", name: "OfficeZeroValue", message: "the pool has units and is worth 0", code: 6102, selector: null, signature: null },
192
+ { chain: "solana", name: "OfficeNotHeld", message: "more units or tokens than held", code: 6103, selector: null, signature: null },
193
+ { chain: "solana", name: "OfficeMergeSize", message: "a merge needs two full Offices of the same size", code: 6104, selector: null, signature: null },
194
+ { chain: "solana", name: "OfficeNotMergeable", message: "the merged Office would pass the member ceiling", code: 6105, selector: null, signature: null },
195
+ { chain: "solana", name: "OfficeMergeMismatch", message: "this accept does not match the merge proposal", code: 6106, selector: null, signature: null },
196
+ { chain: "solana", name: "OfficeNotSeller", message: "only the position's buyer or the controller may sell it", code: 6107, selector: null, signature: null },
197
+ { chain: "solana", name: "OfficeWrongQuote", message: "the launch or the other pool is in another quote", code: 6108, selector: null, signature: null },
198
+ { chain: "solana", name: "OfficeControllerLeaves", message: "the controller leaves only as the last member: hand over first", code: 6109, selector: null, signature: null },
199
+ { chain: "solana", name: "OfficeSlippage", message: "the total out is under the minimum", code: 6110, selector: null, signature: null },
200
+ { chain: "solana", name: "OfficeOverflow", message: "an Office amount passed its width", code: 6111, selector: null, signature: null },
201
+ { chain: "solana", name: "OfficeExists", message: "this office_id is used or zero", code: 6112, selector: null, signature: null },
202
+ { chain: "solana", name: "OfficeMergeLocked", message: "a merge is in flight on this Office: only its steps run until it finishes", code: 6113, selector: null, signature: null },
203
+ { chain: "solana", name: "OfficeNoMerge", message: "no merge is in flight between these Offices", code: 6114, selector: null, signature: null },
140
204
  ];
@@ -7,13 +7,13 @@ import { nextBuyPriceX64 } from "../../math/v2/display.ts";
7
7
  import { LEG_BACKING, LEG_FLOOR, LEG_HOLDER, LEG_PLATFORM, LEG_TEAM } from "../../math/v2/fees.ts";
8
8
  import { priceImpactV2, quoteSellImpactV2 } from "../../math/v2/receipt.ts";
9
9
  import { sCirc } from "../../math/v2/supply.ts";
10
- import { CLAIM_SHARE_BOUGHT, CLAIM_TEAM_BUY, CLAIM_TRADER_REF } from "../../solana/floor/instructions.ts";
10
+ import { CLAIM_SHARE_BOUGHT, CLAIM_TEAM_BUY, CLAIM_TEAM_SLOT, CLAIM_TRADER_REF } from "../../solana/floor/instructions.ts";
11
11
  import { FLOOR_AMM_PROGRAM_ID, configPda, launchPda, refOwedPda, refOwedVault, teamSlotPda, traderLinkPda, traderRefEscrow, traderRefPda } from "../../solana/floor/program.ts";
12
12
  import { MAX_COMPUTE_UNIT_LIMIT, computeUnitLimitInstruction } from "../../solana/instruction.ts";
13
13
  import type { Instruction } from "../../solana/instruction.ts";
14
14
  import { TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, WSOL_MINT, associatedTokenAddress } from "../../solana/pda.ts";
15
15
  import { closeAccountInstruction, createAssociatedTokenAccountIdempotentInstruction, syncNativeInstruction, systemTransferInstruction } from "../../solana/tx.ts";
16
- import { CLAIM_COMPUTE_UNIT_LIMIT_V2 } from "../../v2/claims.ts";
16
+ import { CLAIM_COMPUTE_UNIT_LIMIT_V2, seatAgencyOf } from "../../v2/claims.ts";
17
17
  import { FLOOR_HOOK_PROGRAM_ID, buyWithPositionInstructions, claimInstructionV2, holderPositionPda, sellInstructionV2 } from "../../v2/solana.ts";
18
18
  import type { ClaimLaunchV2, TradeAccountsV2 } from "../../v2/solana.ts";
19
19
  import { quoteBuySolanaV2, solanaSettleInputsV2 } from "../../v2/solanaSettle.ts";
@@ -114,7 +114,7 @@ export function createSolanaClient(opts: FloorClientOptions<"solana">): FloorCli
114
114
  programId: pid, hookProgramId: hid, trader, launch: address, baseMint: l.baseMint, quoteMint: l.quoteMint, tokenVault: l.tokenVault, quoteVault: l.quoteVault,
115
115
  traderBase: associatedTokenAddress(baseOwner, l.baseMint, TOKEN_2022_PROGRAM_ID), traderQuote: associatedTokenAddress(quoteOwner, l.quoteMint, l.quoteTokenProgram),
116
116
  quoteTokenProgram: l.quoteTokenProgram, traderRef: hasRef ? ref : null, escrow: hasRef ? traderRefEscrow(ref, l.quoteMint, l.quoteTokenProgram) : null,
117
- baseOwner, quoteOwner, quoteIsLaunch: await quoteIsLaunchOf(l),
117
+ refVolumeBook: hasRef ? true : undefined, baseOwner, quoteOwner, quoteIsLaunch: await quoteIsLaunchOf(l),
118
118
  ...(linked ? { user: trader, recipient: out !== trader ? out : null } : {}),
119
119
  };
120
120
  }
@@ -236,10 +236,29 @@ export function createSolanaClient(opts: FloorClientOptions<"solana">): FloorCli
236
236
  if (l.quoteMint !== p.quote) throw bad(`launch ${mint} trades in ${l.quoteMint}, not ${p.quote}`);
237
237
  const slot = teamSlotPda(address, pid)[0];
238
238
  const [isLaunch, slotAcc] = await Promise.all([quoteIsLaunchOf(l), get(slot)]);
239
- return { mint, address, l, slot, isLaunch, slotAcc };
239
+
240
+ let seatAgency: { index: number; agency: string } | undefined;
241
+ if (slotAcc !== null && (p.types & CLAIM_TEAM_SLOT) !== 0) {
242
+
243
+ const decode = (seatAgencyData?: Uint8Array) => {
244
+ try {
245
+ return seatAgencyOf({ wallet: p.wallet, launch: address, teamSlotData: slotAcc.data, seatAgencyData, programId: pid });
246
+ } catch (e) {
247
+ throw new FloorError("BadAccount", `launch ${mint}: ${e instanceof Error ? e.message : String(e)}`, { source: "sdk", cause: e });
248
+ }
249
+ };
250
+ const sa = decode();
251
+ if (sa) {
252
+ const acc = await get(sa.address);
253
+ if (acc === null) throw new FloorError("BadAccount", `launch ${mint}: the wallet's seat carries an agency but its SeatAgency ${sa.address} is missing`, { source: "sdk" });
254
+ const full = decode(acc.data)!;
255
+ seatAgency = { index: full.index, agency: full.agency! };
256
+ }
257
+ }
258
+ return { mint, address, l, slot, isLaunch, slotAcc, seatAgency };
240
259
  }));
241
- const launches: ClaimLaunchV2[] = read.map(({ address, l, slot, slotAcc }) => ({
242
- launch: address, quoteVault: l.quoteVault, teamSlot: slotAcc !== null ? slot : null, baseMint: l.baseMint,
260
+ const launches: ClaimLaunchV2[] = read.map(({ address, l, slot, slotAcc, seatAgency }) => ({
261
+ launch: address, quoteVault: l.quoteVault, teamSlot: slotAcc !== null ? slot : null, baseMint: l.baseMint, ...(seatAgency ? { seatAgency } : {}),
243
262
  ...(tok ? { teamBuy: { baseMint: l.baseMint, tokenVault: l.tokenVault, walletBase: associatedTokenAddress(p.wallet, l.baseMint, TOKEN_2022_PROGRAM_ID) } } : {}),
244
263
  }));
245
264
  const last = read.at(-1);