skillpp 0.1.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.
Files changed (208) hide show
  1. package/COMPATIBILITY.md +58 -0
  2. package/LICENSE +21 -0
  3. package/README.md +307 -0
  4. package/README.zh-CN.md +307 -0
  5. package/SKILL.md +490 -0
  6. package/adapters/binance-ai.md +22 -0
  7. package/adapters/claude.md +21 -0
  8. package/adapters/gemini.md +26 -0
  9. package/adapters/gpt.md +28 -0
  10. package/adapters/kimi.md +26 -0
  11. package/adapters/mimo.md +22 -0
  12. package/adapters/openclaw.md +29 -0
  13. package/assets/skillpp-banner.png +0 -0
  14. package/package.json +59 -0
  15. package/pipelines.md +310 -0
  16. package/prompts/newbie-mode.md +48 -0
  17. package/prompts/router-prompt.md +32 -0
  18. package/prompts/universal-system-prompt.md +41 -0
  19. package/registry.md +209 -0
  20. package/rules.md +323 -0
  21. package/schemas/audit.schema.json +67 -0
  22. package/schemas/checkpoint.schema.json +86 -0
  23. package/schemas/handoff.schema.json +82 -0
  24. package/schemas/token.schema.json +36 -0
  25. package/scripts/compatibility-check.mjs +130 -0
  26. package/scripts/selftest.mjs +384 -0
  27. package/scripts/skillpp.mjs +448 -0
  28. package/scripts/validate-skillpp.mjs +140 -0
  29. package/skillpp.manifest.json +714 -0
  30. package/skills/audit-plus/SKILL.md +612 -0
  31. package/skills/binance/binance/CHANGELOG.md +112 -0
  32. package/skills/binance/binance/LICENSE.md +9 -0
  33. package/skills/binance/binance/SKILL.md +69 -0
  34. package/skills/binance/binance/references/algo.md +21 -0
  35. package/skills/binance/binance/references/alpha.md +9 -0
  36. package/skills/binance/binance/references/auth.md +32 -0
  37. package/skills/binance/binance/references/c2c.md +5 -0
  38. package/skills/binance/binance/references/convert.md +19 -0
  39. package/skills/binance/binance/references/copy-trading.md +6 -0
  40. package/skills/binance/binance/references/crypto-loan.md +27 -0
  41. package/skills/binance/binance/references/derivatives-options-streams.md +25 -0
  42. package/skills/binance/binance/references/derivatives-options.md +85 -0
  43. package/skills/binance/binance/references/derivatives-portfolio-margin-pro-streams.md +5 -0
  44. package/skills/binance/binance/references/derivatives-portfolio-margin-pro.md +34 -0
  45. package/skills/binance/binance/references/derivatives-portfolio-margin-streams.md +5 -0
  46. package/skills/binance/binance/references/derivatives-portfolio-margin.md +146 -0
  47. package/skills/binance/binance/references/dual-investment.md +15 -0
  48. package/skills/binance/binance/references/fiat.md +9 -0
  49. package/skills/binance/binance/references/futures-coin-streams.md +29 -0
  50. package/skills/binance/binance/references/futures-coin.md +109 -0
  51. package/skills/binance/binance/references/futures-usds-streams.md +35 -0
  52. package/skills/binance/binance/references/futures-usds.md +144 -0
  53. package/skills/binance/binance/references/gift-card.md +10 -0
  54. package/skills/binance/binance/references/margin-trading-streams.md +6 -0
  55. package/skills/binance/binance/references/margin-trading.md +101 -0
  56. package/skills/binance/binance/references/mining.md +17 -0
  57. package/skills/binance/binance/references/pay.md +5 -0
  58. package/skills/binance/binance/references/rebate.md +5 -0
  59. package/skills/binance/binance/references/simple-earn.md +56 -0
  60. package/skills/binance/binance/references/spot-streams.md +25 -0
  61. package/skills/binance/binance/references/spot.md +114 -0
  62. package/skills/binance/binance/references/staking.md +59 -0
  63. package/skills/binance/binance/references/sub-account.md +67 -0
  64. package/skills/binance/binance/references/vip-loan.md +27 -0
  65. package/skills/binance/binance/references/wallet.md +75 -0
  66. package/skills/binance/fiat/CHANGELOG.md +11 -0
  67. package/skills/binance/fiat/LICENSE.md +9 -0
  68. package/skills/binance/fiat/SKILL.md +169 -0
  69. package/skills/binance/fiat/references/authentication.md +126 -0
  70. package/skills/binance/fiat/references/sapi-endpoints.md +217 -0
  71. package/skills/binance/onchain-pay/.local.md.example +10 -0
  72. package/skills/binance/onchain-pay/CHANGELOG.md +20 -0
  73. package/skills/binance/onchain-pay/LICENSE.md +9 -0
  74. package/skills/binance/onchain-pay/SKILL.md +466 -0
  75. package/skills/binance/onchain-pay/references/authentication.md +92 -0
  76. package/skills/binance/onchain-pay/scripts/sign_and_call.sh +52 -0
  77. package/skills/binance/p2p/CHANGELOG.md +33 -0
  78. package/skills/binance/p2p/LICENSE.md +9 -0
  79. package/skills/binance/p2p/SKILL.md +1082 -0
  80. package/skills/binance/p2p/references/agent-sapi-api.md +795 -0
  81. package/skills/binance/p2p/references/authentication.md +100 -0
  82. package/skills/binance/payment/SKILL.md +824 -0
  83. package/skills/binance/payment/common.py +560 -0
  84. package/skills/binance/payment/payment_skill.py +86 -0
  85. package/skills/binance/payment/receive.py +109 -0
  86. package/skills/binance/payment/references/setup-guide.md +77 -0
  87. package/skills/binance/payment/requirements.txt +4 -0
  88. package/skills/binance/payment/send.py +952 -0
  89. package/skills/binance/payment/send_extension/__init__.py +43 -0
  90. package/skills/binance/payment/send_extension/base.py +48 -0
  91. package/skills/binance/payment/send_extension/c2c.py +193 -0
  92. package/skills/binance/payment/send_extension/pix.py +316 -0
  93. package/skills/binance/square-post/README.md +62 -0
  94. package/skills/binance/square-post/SKILL.md +171 -0
  95. package/skills/binance/square-post/scripts/lib.mjs +175 -0
  96. package/skills/binance/square-post/scripts/post-image.mjs +80 -0
  97. package/skills/binance/square-post/scripts/post-text.mjs +41 -0
  98. package/skills/binance/square-post/scripts/post-video.mjs +110 -0
  99. package/skills/binance/square-post/scripts/save-key.mjs +34 -0
  100. package/skills/binance-web3/binance-agentic-wallet/SKILL.md +150 -0
  101. package/skills/binance-web3/binance-agentic-wallet/references/authentication.md +136 -0
  102. package/skills/binance-web3/binance-agentic-wallet/references/limit-order.md +204 -0
  103. package/skills/binance-web3/binance-agentic-wallet/references/market-order.md +179 -0
  104. package/skills/binance-web3/binance-agentic-wallet/references/prediction.md +489 -0
  105. package/skills/binance-web3/binance-agentic-wallet/references/preflight.md +66 -0
  106. package/skills/binance-web3/binance-agentic-wallet/references/security.md +47 -0
  107. package/skills/binance-web3/binance-agentic-wallet/references/send.md +53 -0
  108. package/skills/binance-web3/binance-agentic-wallet/references/wallet-setting.md +86 -0
  109. package/skills/binance-web3/binance-agentic-wallet/references/wallet-view.md +312 -0
  110. package/skills/binance-web3/binance-agentic-wallet/references/x402-payment.md +259 -0
  111. package/skills/binance-web3/binance-tokenized-securities-info/SKILL.md +613 -0
  112. package/skills/binance-web3/crypto-market-rank/SKILL.md +91 -0
  113. package/skills/binance-web3/crypto-market-rank/references/cli.md +219 -0
  114. package/skills/binance-web3/crypto-market-rank/scripts/cli.mjs +149 -0
  115. package/skills/binance-web3/meme-rush/SKILL.md +72 -0
  116. package/skills/binance-web3/meme-rush/references/cli.md +158 -0
  117. package/skills/binance-web3/meme-rush/scripts/cli.mjs +101 -0
  118. package/skills/binance-web3/query-address-info/SKILL.md +61 -0
  119. package/skills/binance-web3/query-address-info/references/cli.md +56 -0
  120. package/skills/binance-web3/query-address-info/scripts/cli.mjs +132 -0
  121. package/skills/binance-web3/query-token-audit/SKILL.md +162 -0
  122. package/skills/binance-web3/query-token-info/SKILL.md +83 -0
  123. package/skills/binance-web3/query-token-info/references/cli.md +135 -0
  124. package/skills/binance-web3/query-token-info/scripts/cli.mjs +112 -0
  125. package/skills/binance-web3/trading-signal/SKILL.md +66 -0
  126. package/skills/binance-web3/trading-signal/references/cli.md +90 -0
  127. package/skills/binance-web3/trading-signal/scripts/cli.mjs +92 -0
  128. package/skills/four-meme/four-guard/API-Contract-TaxToken.md +277 -0
  129. package/skills/four-meme/four-guard/API-CreateToken.02-02-2026.md +285 -0
  130. package/skills/four-meme/four-guard/API-Documents.03-03-2026.md +789 -0
  131. package/skills/four-meme/four-guard/AgentIdentifier.abi +585 -0
  132. package/skills/four-meme/four-guard/README.md +21 -0
  133. package/skills/four-meme/four-guard/SKILL.md +31 -0
  134. package/skills/four-meme/four-guard/TaxToken.abi +969 -0
  135. package/skills/four-meme/four-guard/TokenIdentifierSample.js_ +81 -0
  136. package/skills/four-meme/four-guard/TokenIdentifierSample.sol +69 -0
  137. package/skills/four-meme/four-guard/TokenManager.lite.abi +836 -0
  138. package/skills/four-meme/four-guard/TokenManager2.lite.abi +2325 -0
  139. package/skills/four-meme/four-guard/TokenManagerHelper3.abi +999 -0
  140. package/skills/four-meme/four-guard/go.mod +36 -0
  141. package/skills/four-meme/four-guard/go.sum +127 -0
  142. package/skills/four-meme/four-guard/main.go +183 -0
  143. package/skills/four-meme/four-meme-ai/SKILL.md +31 -0
  144. package/skills/four-meme/four-meme-ai/references/agent-creator-and-wallets.md +87 -0
  145. package/skills/four-meme/four-meme-ai/references/api-create-token.md +55 -0
  146. package/skills/four-meme/four-meme-ai/references/contract-addresses.md +47 -0
  147. package/skills/four-meme/four-meme-ai/references/create-token-scripts.md +131 -0
  148. package/skills/four-meme/four-meme-ai/references/errors.md +29 -0
  149. package/skills/four-meme/four-meme-ai/references/event-listening.md +75 -0
  150. package/skills/four-meme/four-meme-ai/references/execute-trade.md +31 -0
  151. package/skills/four-meme/four-meme-ai/references/tax-token-query.md +38 -0
  152. package/skills/four-meme/four-meme-ai/references/token-query-api.md +44 -0
  153. package/skills/four-meme/four-meme-ai/references/token-tax-info.md +77 -0
  154. package/skills/four-meme/four-meme-ai/scripts/8004-balance.ts +52 -0
  155. package/skills/four-meme/four-meme-ai/scripts/8004-register.ts +108 -0
  156. package/skills/four-meme/four-meme-ai/scripts/create-token-api.ts +321 -0
  157. package/skills/four-meme/four-meme-ai/scripts/create-token-chain.ts +102 -0
  158. package/skills/four-meme/four-meme-ai/scripts/create-token-instant.ts +106 -0
  159. package/skills/four-meme/four-meme-ai/scripts/execute-buy.ts +198 -0
  160. package/skills/four-meme/four-meme-ai/scripts/execute-sell.ts +150 -0
  161. package/skills/four-meme/four-meme-ai/scripts/get-public-config.ts +25 -0
  162. package/skills/four-meme/four-meme-ai/scripts/get-recent-events.ts +76 -0
  163. package/skills/four-meme/four-meme-ai/scripts/get-tax-token-info.ts +69 -0
  164. package/skills/four-meme/four-meme-ai/scripts/get-token-info.ts +94 -0
  165. package/skills/four-meme/four-meme-ai/scripts/quote-buy.ts +85 -0
  166. package/skills/four-meme/four-meme-ai/scripts/quote-sell.ts +66 -0
  167. package/skills/four-meme/four-meme-ai/scripts/send-token.ts +98 -0
  168. package/skills/four-meme/four-meme-ai/scripts/token-get.ts +31 -0
  169. package/skills/four-meme/four-meme-ai/scripts/token-list.ts +134 -0
  170. package/skills/four-meme/four-meme-ai/scripts/token-rankings.ts +162 -0
  171. package/skills/four-meme/four-meme-ai/scripts/verify-events.ts +47 -0
  172. package/skills/four-meme/four-meme-integration/SKILL.md +374 -0
  173. package/skills/four-meme/four-meme-integration/references/agent-creator-and-wallets.md +87 -0
  174. package/skills/four-meme/four-meme-integration/references/api-create-token.md +55 -0
  175. package/skills/four-meme/four-meme-integration/references/contract-addresses.md +47 -0
  176. package/skills/four-meme/four-meme-integration/references/create-token-scripts.md +131 -0
  177. package/skills/four-meme/four-meme-integration/references/errors.md +29 -0
  178. package/skills/four-meme/four-meme-integration/references/event-listening.md +75 -0
  179. package/skills/four-meme/four-meme-integration/references/execute-trade.md +31 -0
  180. package/skills/four-meme/four-meme-integration/references/tax-token-query.md +38 -0
  181. package/skills/four-meme/four-meme-integration/references/token-query-api.md +44 -0
  182. package/skills/four-meme/four-meme-integration/references/token-tax-info.md +77 -0
  183. package/skills/four-meme/four-meme-integration/scripts/8004-balance.ts +52 -0
  184. package/skills/four-meme/four-meme-integration/scripts/8004-register.ts +108 -0
  185. package/skills/four-meme/four-meme-integration/scripts/create-token-api.ts +321 -0
  186. package/skills/four-meme/four-meme-integration/scripts/create-token-chain.ts +102 -0
  187. package/skills/four-meme/four-meme-integration/scripts/create-token-instant.ts +106 -0
  188. package/skills/four-meme/four-meme-integration/scripts/execute-buy.ts +198 -0
  189. package/skills/four-meme/four-meme-integration/scripts/execute-sell.ts +150 -0
  190. package/skills/four-meme/four-meme-integration/scripts/get-public-config.ts +25 -0
  191. package/skills/four-meme/four-meme-integration/scripts/get-recent-events.ts +76 -0
  192. package/skills/four-meme/four-meme-integration/scripts/get-tax-token-info.ts +69 -0
  193. package/skills/four-meme/four-meme-integration/scripts/get-token-info.ts +94 -0
  194. package/skills/four-meme/four-meme-integration/scripts/quote-buy.ts +85 -0
  195. package/skills/four-meme/four-meme-integration/scripts/quote-sell.ts +66 -0
  196. package/skills/four-meme/four-meme-integration/scripts/send-token.ts +98 -0
  197. package/skills/four-meme/four-meme-integration/scripts/token-get.ts +31 -0
  198. package/skills/four-meme/four-meme-integration/scripts/token-list.ts +134 -0
  199. package/skills/four-meme/four-meme-integration/scripts/token-rankings.ts +162 -0
  200. package/skills/four-meme/four-meme-integration/scripts/verify-events.ts +47 -0
  201. package/skills/skillpp/contract-profiler/SKILL.md +118 -0
  202. package/skills/skillpp/newbie-tutor/SKILL.md +85 -0
  203. package/skills/skillpp/opportunity-board/SKILL.md +87 -0
  204. package/skills/skillpp/risk-fusion/SKILL.md +146 -0
  205. package/skills/skillpp/scam-pattern-lab/SKILL.md +115 -0
  206. package/skills/skillpp/wallet-doctor/SKILL.md +119 -0
  207. package/skills/skillpp/watchtower/SKILL.md +72 -0
  208. package/tests/compatibility/v0.1.0.json +117 -0
@@ -0,0 +1,277 @@
1
+ # Tax Token Contract API Documentation
2
+
3
+ ## Overview
4
+
5
+ Tax Token is an advanced ERC20 token contract supporting transaction fees, reward distribution, and multiple allocation modes.
6
+
7
+ **Key Features:**
8
+ - Transaction fee mechanism: Charges a certain percentage of fees on buy/sell transactions
9
+ - Reward distribution mechanism: Token holders receive reward distributions based on their holdings
10
+ - Multiple allocation modes: Fees can be allocated to founder, holders, burn, and liquidity
11
+ - Anti-sniper protection: Prevents malicious addresses from participating in rewards through blacklist mechanism
12
+
13
+ ---
14
+
15
+ ## Constants
16
+
17
+ ### Transfer Modes
18
+
19
+ | Name | Type | Value | Description |
20
+ |------|------|-------|-------------|
21
+ | `MODE_NORMAL` | `uint` | 0 | Normal transfer mode - allows all transfers |
22
+ | `MODE_TRANSFER_RESTRICTED` | `uint` | 1 | Restricted transfer mode - prohibits all transfers |
23
+ | `MODE_TRANSFER_CONTROLLED` | `uint` | 2 | Controlled transfer mode - only allows transfers related to owner |
24
+
25
+ ---
26
+
27
+ ## State Variables
28
+
29
+ ### Configuration Variables
30
+
31
+ | Name | Type | Visibility | Description |
32
+ |------|------|------------|-------------|
33
+ | `_mode` | `uint` | public | Current transfer mode |
34
+ | `quote` | `address` | public | Quote token address (e.g., USDT, BUSD, etc.) |
35
+ | `pair` | `address` | public | PancakeSwap pair address (lazily initialized when mode is NORMAL) |
36
+ | `founder` | `address` | public | Founder address, receives founder rewards |
37
+ | `feeRate` | `uint256` | public | Transaction fee rate (basis points, 10000 = 100%) |
38
+ | `rateFounder` | `uint256` | public | Founder allocation rate (percentage, 100 = 100%) |
39
+ | `rateHolder` | `uint256` | public | Holder allocation rate (percentage, 100 = 100%) |
40
+ | `rateBurn` | `uint256` | public | Burn allocation rate (percentage, 100 = 100%) |
41
+ | `rateLiquidity` | `uint256` | public | Liquidity allocation rate (percentage, 100 = 100%) |
42
+ | `minDispatch` | `uint256` | public | Minimum dispatch threshold, fees are only dispatched when accumulated fees reach this value |
43
+ | `minShare` | `uint256` | public | Minimum holding amount, addresses below this value do not participate in rewards |
44
+
45
+ ### Reward System Variables
46
+
47
+ | Name | Type | Visibility | Description |
48
+ |------|------|------------|-------------|
49
+ | `userInfo` | `mapping(address => UserInfo)` | public | User reward information mapping |
50
+ | `totalShares` | `uint256` | public | Total token holding shares (sum of all user shares, excluding addresses below minShare) |
51
+ | `feePerShare` | `uint256` | public | Cumulative reward amount per share (using MAGNITUDE precision, accumulates with each dispatch) |
52
+ | `feeAccumulated` | `uint256` | public | Total accumulated fees (not yet dispatched). May contain remainder due to rounding errors after dispatch |
53
+ | `feeDispatched` | `uint256` | public | Total dispatched fees |
54
+ | `feeFounder` | `uint256` | public | Total fees allocated to founder |
55
+ | `feeHolder` | `uint256` | public | Total fees allocated to holders |
56
+ | `feeBurn` | `uint256` | public | Total fees burned |
57
+ | `feeLiquidity` | `uint256` | public | Total fees added to liquidity |
58
+ | `quoteFounder` | `uint256` | public | Total quote tokens allocated to founder |
59
+ | `quoteHolder` | `uint256` | public | Total quote tokens allocated to holders |
60
+ | `quoteClaimed` | `uint256` | public | Total quote tokens claimed |
61
+
62
+ ---
63
+
64
+ ## Structs
65
+
66
+ ### UserInfo
67
+
68
+ User reward information structure.
69
+
70
+ | Field | Type | Description |
71
+ |-------|------|-------------|
72
+ | `share` | `uint256` | User token holding share (0 if balance is below minShare) |
73
+ | `rewardDebt` | `uint256` | Calculated reward debt, used to track already accounted rewards |
74
+ | `claimable` | `uint256` | Claimable reward amount (in quote tokens) |
75
+ | `claimed` | `uint256` | Claimed reward amount (in quote tokens) |
76
+
77
+ ---
78
+
79
+ ## Events
80
+
81
+ ### FeeDispatched
82
+
83
+ Emitted when fees are dispatched and allocated.
84
+
85
+ ```solidity
86
+ event FeeDispatched(
87
+ uint256 amountFounder,
88
+ uint256 amountHolder,
89
+ uint256 amountBurn,
90
+ uint256 amountLiquidity,
91
+ uint256 quoteFounder,
92
+ uint256 quoteHolder
93
+ );
94
+ ```
95
+
96
+ **Parameters:**
97
+ - `amountFounder`: Token amount allocated to founder (in token units)
98
+ - `amountHolder`: Token amount allocated to holders (in token units)
99
+ - `amountBurn`: Token amount burned (in token units)
100
+ - `amountLiquidity`: Token amount added to liquidity (in token units)
101
+ - `quoteFounder`: Quote token amount allocated to founder in this dispatch (0 if rateFounder is 0)
102
+ - `quoteHolder`: Quote token amount allocated to holders in this dispatch (0 if rateHolder is 0 or totalShares is 0)
103
+
104
+ ### FeeClaimed
105
+
106
+ Emitted when rewards are claimed by a user.
107
+
108
+ ```solidity
109
+ event FeeClaimed(
110
+ address account,
111
+ uint256 amount
112
+ );
113
+ ```
114
+
115
+ **Parameters:**
116
+ - `account`: Address claiming rewards
117
+ - `amount`: Amount of quote tokens claimed
118
+
119
+ ---
120
+
121
+ ## Public Functions
122
+
123
+ ### setMode
124
+
125
+ Set transfer mode.
126
+
127
+ ```solidity
128
+ function setMode(uint256 v) public onlyOwner
129
+ ```
130
+
131
+ **Parameters:**
132
+ - `v`: Target mode:
133
+ - `0`: MODE_NORMAL (normal mode)
134
+ - `1`: MODE_TRANSFER_RESTRICTED (restricted mode)
135
+ - `2`: MODE_TRANSFER_CONTROLLED (controlled mode)
136
+
137
+ **Note:** Once mode is set to `MODE_NORMAL` when migrated to DEX, it cannot be changed.
138
+
139
+ ### claimableFee
140
+
141
+ Query the claimable reward amount for an account.
142
+
143
+ ```solidity
144
+ function claimableFee(address account) view public returns (uint256)
145
+ ```
146
+
147
+ **Parameters:**
148
+ - `account`: Account address
149
+
150
+ **Returns:**
151
+ - `uint256`: Claimable quote token amount
152
+
153
+ **Description:**
154
+ Calculates the total claimable rewards for an account, including:
155
+ - Previously accumulated claimable rewards (`info.claimable`)
156
+ - New rewards calculated from current share and feePerShare
157
+
158
+ ### claimedFee
159
+
160
+ Query the claimed reward amount for an account.
161
+
162
+ ```solidity
163
+ function claimedFee(address account) view public returns (uint256)
164
+ ```
165
+
166
+ **Parameters:**
167
+ - `account`: Account address
168
+
169
+ **Returns:**
170
+ - `uint256`: Claimed quote token amount
171
+
172
+ ### claimFee
173
+
174
+ Claim rewards for the caller.
175
+
176
+ ```solidity
177
+ function claimFee() external
178
+ ```
179
+
180
+ **Effects:**
181
+ - Updates caller's share
182
+ - Transfers claimable quote tokens to caller
183
+ - Updates `claimed` and `quoteClaimed` counters
184
+ - Emits `FeeClaimed` event
185
+
186
+ **Requirements:**
187
+ - Caller must not be blacklisted
188
+ - Caller must have claimable rewards > 0
189
+
190
+ ---
191
+
192
+ ## View Functions
193
+
194
+ ### userInfo
195
+
196
+ Get user reward information.
197
+
198
+ ```solidity
199
+ function userInfo(address) view public returns (
200
+ uint256 share,
201
+ uint256 rewardDebt,
202
+ uint256 claimable,
203
+ uint256 claimed
204
+ )
205
+ ```
206
+
207
+ **Parameters:**
208
+ - User address
209
+
210
+ **Returns:**
211
+ - `share`: User token holding share
212
+ - `rewardDebt`: Calculated reward debt
213
+ - `claimable`: Claimable reward amount
214
+ - `claimed`: Claimed reward amount
215
+
216
+ ---
217
+
218
+ ### Reward Claiming
219
+
220
+ Users can claim their accumulated rewards by calling `claimFee()`:
221
+
222
+ 1. Updates user's share (if changed)
223
+ 2. Calculates claimable amount using `claimableFee()`
224
+ 3. Checks if user is blacklisted (if yes, returns early)
225
+ 4. Transfers quote tokens to user
226
+ 5. Updates `claimed` counters
227
+ 6. Emits `FeeClaimed` event
228
+
229
+ ---
230
+
231
+
232
+ ## Important Notes
233
+
234
+ 1. **Rate Sum**: The sum of `rateFounder`, `rateHolder`, `rateBurn`, and `rateLiquidity` must equal 100.
235
+
236
+ 2. **Minimum Share**: Addresses with token balance below `minShare` do not participate in rewards (their `share` is set to 0).
237
+
238
+ 3. **Blacklist**: Blacklisted addresses cannot claim rewards, even if they have claimable amounts.
239
+
240
+ 4. **Fee Accumulation**: Due to rounding errors, `feeAccumulated` may contain a small remainder after dispatch.
241
+
242
+ ---
243
+
244
+ ## Example Usage
245
+
246
+ ### Query User Rewards
247
+
248
+ ```solidity
249
+ // Get claimable rewards
250
+ uint256 claimable = token.claimableFee(userAddress);
251
+
252
+ // Get claimed rewards
253
+ uint256 claimed = token.claimedFee(userAddress);
254
+
255
+ // Get user info
256
+ (uint256 share, uint256 rewardDebt, uint256 claimable, uint256 claimed) = token.userInfo(userAddress);
257
+ ```
258
+
259
+ ### Claim Rewards
260
+
261
+ ```solidity
262
+ // User calls claimFee() to claim their rewards
263
+ token.claimFee();
264
+ ```
265
+
266
+ ### Monitor Fee Distribution
267
+
268
+ ```solidity
269
+ // Listen for FeeDispatched events
270
+ token.FeeDispatched().watch((event) => {
271
+ console.log("Founder allocated:", event.returnValues.amountFounder);
272
+ console.log("Holder allocated:", event.returnValues.amountHolder);
273
+ console.log("Quote tokens for founder:", event.returnValues.quoteFounder);
274
+ console.log("Quote tokens for holders:", event.returnValues.quoteHolder);
275
+ });
276
+ ```
277
+
@@ -0,0 +1,285 @@
1
+ ## API Endpoint Overview
2
+
3
+ | Endpoint | Method | Description |
4
+ |----------|--------|-------------|
5
+ | `/v1/private/user/nonce/generate` | POST | Generate nonce for login |
6
+ | `/v1/private/user/login/dex` | POST | User login to get access token |
7
+ | `/v1/private/token/upload` | POST | Upload token image |
8
+ | `/v1/private/token/create` | POST | Create token and get signature parameters |
9
+
10
+ ## Complete API Flow
11
+
12
+ ### 1. Get Nonce
13
+ **Endpoint**: `https://four.meme/meme-api/v1/private/user/nonce/generate`
14
+ **Method**: POST
15
+ **Parameters**:
16
+ ```json
17
+ {
18
+ "accountAddress": "user wallet address",
19
+ "verifyType": "LOGIN",
20
+ "networkCode": "BSC"
21
+ }
22
+ ```
23
+ **Response**:
24
+ ```json
25
+ {
26
+ "code": "0",
27
+ "data": "generated nonce value"
28
+ }
29
+ ```
30
+
31
+ ### 2. User Login
32
+ **Endpoint**: `https://four.meme/meme-api/v1/private/user/login/dex`
33
+ **Method**: POST
34
+ **Parameters**:
35
+ ```json
36
+ {
37
+ "region": "WEB",
38
+ "langType": "EN",
39
+ "loginIp": "",
40
+ "inviteCode": "",
41
+ "verifyInfo": {
42
+ "address": "user wallet address",
43
+ "networkCode": "BSC",
44
+ "signature": "signature of 'You are sign in Meme {nonce}' signed with private key",
45
+ "verifyType": "LOGIN"
46
+ },
47
+ "walletName": "MetaMask"
48
+ }
49
+ ```
50
+ **Response**:
51
+ ```json
52
+ {
53
+ "code": "0",
54
+ "data": "access_token"
55
+ }
56
+ ```
57
+
58
+ ### 3. Upload Token Image
59
+ **Endpoint**: `https://four.meme/meme-api/v1/private/token/upload`
60
+ **Method**: POST
61
+ **Headers**:
62
+ ```
63
+ Content-Type: multipart/form-data
64
+ meme-web-access: {access_token}
65
+ ```
66
+ **Parameters**:
67
+ - `file`: Image file data (supports jpeg, png, gif, bmp, webp formats)
68
+
69
+ **Response**:
70
+ ```json
71
+ {
72
+ "code": "0",
73
+ "data": "uploaded image URL"
74
+ }
75
+ ```
76
+
77
+ ### 4. Create Token
78
+ **Endpoint**: `https://four.meme/meme-api/v1/private/token/create`
79
+ **Method**: POST
80
+ **Headers**:
81
+ ```
82
+ meme-web-access: {access_token}
83
+ Content-Type: application/json
84
+ ```
85
+
86
+ **Request Body Example**:
87
+ ```json
88
+ {
89
+ "name": "RELEASE",
90
+ "shortName": "RELS",
91
+ "desc": "RELEASE DESC",
92
+ "imgUrl": "https://static.four.meme/market/...",
93
+ "launchTime": 1740708849097,
94
+ "label": "AI",
95
+ "lpTradingFee": 0.0025,
96
+ "webUrl": "https://example.com",
97
+ "twitterUrl": "https://x.com/example",
98
+ "telegramUrl": "https://telegram.com/example",
99
+ "preSale": "0.1",
100
+ "onlyMPC": false,
101
+ "feePlan": false,
102
+ "tokenTaxInfo": {
103
+ "burnRate": 20,
104
+ "divideRate": 30,
105
+ "feeRate": 5,
106
+ "liquidityRate": 40,
107
+ "minSharing": 100000,
108
+ "recipientAddress": "0x1234567890123456789012345678901234567890",
109
+ "recipientRate": 10
110
+ },
111
+ "raisedToken": {
112
+ "symbol": "BNB",
113
+ "nativeSymbol": "BNB",
114
+ "symbolAddress": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
115
+ "deployCost": "0",
116
+ "buyFee": "0.01",
117
+ "sellFee": "0.01",
118
+ "minTradeFee": "0",
119
+ "b0Amount": "8",
120
+ "totalBAmount": "24",
121
+ "totalAmount": "1000000000",
122
+ "logoUrl": "https://static.four.meme/market/68b871b6-96f7-408c-b8d0-388d804b34275092658264263839640.png",
123
+ "tradeLevel": ["0.1", "0.5", "1"],
124
+ "status": "PUBLISH",
125
+ "buyTokenLink": "https://pancakeswap.finance/swap",
126
+ "reservedNumber": 10,
127
+ "saleRate": "0.8",
128
+ "networkCode": "BSC",
129
+ "platform": "MEME"
130
+ }
131
+ }
132
+ ```
133
+
134
+ **Response**:
135
+ ```json
136
+ {
137
+ "code": "0",
138
+ "data": {
139
+ "createArg": "encoded parameters for blockchain",
140
+ "signature": "signature for blockchain transaction"
141
+ }
142
+ }
143
+ ```
144
+
145
+ ## Parameter Explanation (Distinguishing Fixed and Customizable Parameters)
146
+
147
+ ### Customizable Parameters
148
+
149
+ | Parameter | Description | Example Value | Limitations |
150
+ |-----------|-------------|---------------|-------------|
151
+ | name | Token name | "RELEASE" | Customizable |
152
+ | shortName | Token symbol/ticker | "RELS" | Customizable |
153
+ | desc | Token description | "RELEASE DESC" | Customizable |
154
+ | imgUrl | Token image URL | "https://static.four.meme/market/..." | Must be uploaded to the platform |
155
+ | launchTime | Launch timestamp | 1740708849097 | Customizable |
156
+ | label | Token category | "AI" | Must be one of the platform-supported categories: Meme/AI/Defi/Games/Infra/De-Sci/Social/Depin/Charity/Others |
157
+ | lpTradingFee | Trading fee rate | 0.0025 | Fixed as 0.0025 |
158
+ | webUrl | Project website | "https://example.com" | Customizable |
159
+ | twitterUrl | Project Twitter | "https://x.com/example" | Customizable |
160
+ | telegramUrl | Project Telegram | "https://telegram.com/example" | Customizable |
161
+ | preSale | Presale amount | "0.1" | Pre-purchased BNB amount by the creator; "0" if not purchased |
162
+ | onlyMPC | X Mode Token | false | Whether to create a token in X Mode | Customizable
163
+ | feePlan | AntiSniperFeeMode | false | Anti-sniper fee mode switch for opening block high tax. Set to true to enable dynamic fee system (fees automatically decrease block by block after token creation), false to disable. See [Product Update](https://four-meme.gitbook.io/four.meme/product-update/6-product-update-25-10-30) for detailed block-by-block fee rates | Customizable
164
+ | tokenTaxInfo | Tax Token Configuration | See below | Configuration object for creating tax-type tokens | Customizable
165
+
166
+ ### Fixed Parameters (Cannot be Adjusted or Customized by Thirdparties)
167
+
168
+ | Parameter | Fixed Value | Description |
169
+ |-----------|-------------|-------------|
170
+ | totalSupply | 1000000000 | Total token supply is fixed at 1 billion |
171
+ | raisedAmount | 24 | Raised amount is fixed at 24 BNB |
172
+ | saleRate | 0.8 | Sale ratio is fixed at 80% |
173
+ | reserveRate | 0 | Reserved ratio is fixed at 0 |
174
+ | funGroup | false | Fixed parameter |
175
+ | clickFun | false | Fixed parameter |
176
+ | symbol | "BNB" | Fixed use of BNB as base currency |
177
+
178
+ ### feePlan Parameter Details
179
+
180
+ The `feePlan` parameter enables **AntiSniperFeeMode** (also known as **X Mode Dynamic Fee System**), which implements a dynamic fee mechanism that automatically decreases transaction fees block by block after token creation.
181
+
182
+ **How it works:**
183
+ - When `feePlan` is set to `true`, the token will use a dynamic fee system
184
+ - Transaction fees start at a higher rate at the opening blocks
185
+ - Fees automatically decrease block by block after token creation
186
+ - This mechanism ensures fair launches and helps counter sniper bots
187
+
188
+ **Block-by-block fee rates:**
189
+ For detailed information about the specific fee rates applied at different block intervals, please refer to the [Product Update documentation](https://four-meme.gitbook.io/four.meme/product-update/6-product-update-25-10-30).
190
+
191
+ **Note:** The fee rate parameters may be adjusted for future launches.
192
+
193
+ ### tokenTaxInfo Parameter Details
194
+
195
+ The `tokenTaxInfo` parameter is an object used to configure tax-type tokens. Rate values represent percentages directly (e.g., 5 = 5%, 10 = 10%).
196
+
197
+ | Parameter | Description | Example Value | Notes |
198
+ |-----------|-------------|---------------|-------|
199
+ | feeRate | Trading fee rate | 5 | Fixed options: 1, 3, 5, or 10 (representing 1%, 3%, 5%, or 10%) |
200
+ | burnRate | Burn rate | 20 | Customizable rate value (20 = 20%) |
201
+ | divideRate | Dividend distribution rate | 30 | Customizable rate value (30 = 30%) |
202
+ | liquidityRate | Liquidity pool rate | 0 | Customizable rate value (0 = 0%) |
203
+ | minSharing | Minimum sharing threshold | 100000 | Minimum token amount required to participate in dividends (in ether). Must satisfy: minSharing = d × 10ⁿ (n ≥ 5, 1 ≤ d ≤ 9). Examples: 100000 (1×10⁵), 200000 (2×10⁵), 500000 (5×10⁵), 1000000 (1×10⁶), 9000000 (9×10⁶) |
204
+ | recipientAddress | Recipient address | "0x..." | Address to receive allocated tokens (can be empty string if not used) |
205
+ | recipientRate | Recipient allocation rate | 50 | Customizable rate value (50 = 50%) |
206
+
207
+ **Example tokenTaxInfo object:**
208
+
209
+ ```json
210
+ {
211
+ "tokenTaxInfo": {
212
+ "burnRate": 20,
213
+ "divideRate": 30,
214
+ "feeRate": 5,
215
+ "liquidityRate": 40,
216
+ "minSharing": 100000,
217
+ "recipientAddress": "0x1234567890123456789012345678901234567890",
218
+ "recipientRate": 10
219
+ }
220
+ }
221
+ ```
222
+
223
+ **Note:** In this example, `burnRate` (20) + `divideRate` (30) + `liquidityRate` (40) + `recipientRate` (10) = 100, which satisfies the requirement that the sum of burnRate, divideRate, liquidityRate, and recipientRate must equal 100.
224
+
225
+ **Notes:**
226
+ - `feeRate` is a fixed option: must be one of 1, 3, 5, or 10 (representing 1%, 3%, 5%, or 10%)
227
+ - Other rate values (`burnRate`, `divideRate`, `liquidityRate`, `recipientRate`) are customizable and represent percentages directly (e.g., 5 = 5%, 10 = 10%)
228
+ - The sum of `burnRate`, `divideRate`, `liquidityRate`, and `recipientRate` must equal 100
229
+ - If `recipientAddress` is not used, set it to empty string `""` and `recipientRate` to 0
230
+ - `minSharing` is specified in ether, must satisfy: minSharing = d × 10ⁿ (n ≥ 5, 1 ≤ d ≤ 9). Examples: 100000 (1×10⁵), 200000 (2×10⁵), 500000 (5×10⁵), 1000000 (1×10⁶), 9000000 (9×10⁶), 10000000 (1×10⁷)
231
+
232
+ ### Fixed Parameters for raisedToken. Different raised token configs can be queried by https://four.meme/meme-api/v1/public/config (Cannot modify internal params)
233
+
234
+ ```json
235
+ "raisedToken": {
236
+ "symbol": "BNB",
237
+ "nativeSymbol": "BNB",
238
+ "symbolAddress": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
239
+ "deployCost": "0",
240
+ "buyFee": "0.01",
241
+ "sellFee": "0.01",
242
+ "minTradeFee": "0",
243
+ "b0Amount": "8",
244
+ "totalBAmount": "24",
245
+ "totalAmount": "1000000000",
246
+ "logoUrl": "https://static.four.meme/market/68b871b6-96f7-408c-b8d0-388d804b34275092658264263839640.png",
247
+ "tradeLevel": ["0.1", "0.5", "1"],
248
+ "status": "PUBLISH",
249
+ "buyTokenLink": "https://pancakeswap.finance/swap",
250
+ "reservedNumber": 10,
251
+ "saleRate": "0.8",
252
+ "networkCode": "BSC",
253
+ "platform": "MEME"
254
+ }
255
+ ```
256
+
257
+ ## Blockchain Interaction
258
+
259
+ After obtaining the API signature, you need to call the chain contract `TokenManager2`'s `createToken` method:
260
+
261
+ ```java
262
+ TokenManager2 contract = TokenManager2.load(tokenManagerAddress, web3j, credentials, gasProvider);
263
+ TransactionReceipt receipt = contract.createToken(createArg, sign).send();
264
+ ```
265
+
266
+ Where:
267
+ - `createArg`: The `createArg` returned by the API converted into byte array
268
+ - `sign`: The `signature` returned by the API converted into byte array
269
+
270
+ ## Notes
271
+
272
+ 1. Token creation requires meeting the minimum BNB balance requirement. The latest creation fee is 0.01 BNB.
273
+ 2. Images must be uploaded to the four.meme platform.
274
+ 3. There are certain creation fees for creating tokens (which are currently free).
275
+ 4. Most technical parameters are fixed and cannot be adjusted (including total supply, raised amount, sale ratio, etc.).
276
+ 5. Only display information like token name, symbol, description, and image can be customized.
277
+ 6. The token label must be one of the platform-supported categories.
278
+ 7. The trading fee rate can only be 0.0025.
279
+ 8. **feePlan**: Set to `true` to enable AntiSniperFeeMode (dynamic fee adjustment with high tax at opening blocks), or `false` to disable. When enabled, transaction fees automatically decrease block by block after token creation to ensure fair launches and counter bots. For detailed block-by-block fee rate information, refer to the [Product Update](https://four-meme.gitbook.io/four.meme/product-update/6-product-update-25-10-30).
280
+ 9. **tokenTaxInfo**: When creating a tax-type token:
281
+ - `feeRate` must be one of the fixed options: 1, 3, 5, or 10 (representing 1%, 3%, 5%, or 10%)
282
+ - Other rate values (`burnRate`, `divideRate`, `liquidityRate`, `recipientRate`) represent percentages directly (e.g., 5 = 5%, 10 = 10%)
283
+ - The sum of `burnRate`, `divideRate`, `liquidityRate`, and `recipientRate` must equal 100
284
+
285
+ With the above API flow, users can complete the entire process of logging in and creating tokens on the four.meme platform, but they should note that most technical parameters are preset and fixed by the platform.