@bayybays/stacksone-sdk 1.0.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.
- package/.github/workflows/clarinet.yaml +33 -0
- package/README.md +444 -0
- package/docs/ARCHITECTURE.md +69 -0
- package/docs/CONTRACT_REGISTRY.md +11 -0
- package/docs/MODULE_OVERVIEW.md +38 -0
- package/docs/ROADMAP_Q1_2026.md +21 -0
- package/docs/SECURITY.md +47 -0
- package/docs/devlog.md +925 -0
- package/docs/notes.md +5 -0
- package/eslint.config.js +29 -0
- package/index.html +24 -0
- package/nonce.txt +1 -0
- package/nonce_store/nonce_1.txt +1 -0
- package/nonce_store/nonce_10.txt +1 -0
- package/nonce_store/nonce_2.txt +1 -0
- package/nonce_store/nonce_3.txt +1 -0
- package/nonce_store/nonce_4.txt +1 -0
- package/nonce_store/nonce_5.txt +1 -0
- package/nonce_store/nonce_6.txt +1 -0
- package/nonce_store/nonce_7.txt +1 -0
- package/nonce_store/nonce_8.txt +1 -0
- package/nonce_store/nonce_9.txt +1 -0
- package/package.json +62 -0
- package/package.json.save +60 -0
- package/postcss.config.js +6 -0
- package/public/logo.png +0 -0
- package/public/vite.svg +1 -0
- package/smart-contracts/.gitattributes +3 -0
- package/smart-contracts/.vscode/settings.json +4 -0
- package/smart-contracts/.vscode/tasks.json +19 -0
- package/smart-contracts/Clarinet.toml +11 -0
- package/smart-contracts/Mainnet.toml +5 -0
- package/smart-contracts/contracts/chaintap.clar +200 -0
- package/smart-contracts/contracts/contract-0.clar +35 -0
- package/smart-contracts/contracts/contract-1.clar +26 -0
- package/smart-contracts/contracts/contract-10.clar +31 -0
- package/smart-contracts/contracts/contract-12.clar +50 -0
- package/smart-contracts/contracts/contract-13.clar +25 -0
- package/smart-contracts/contracts/contract-14.clar +14 -0
- package/smart-contracts/contracts/contract-15.clar +20 -0
- package/smart-contracts/contracts/contract-16.clar +22 -0
- package/smart-contracts/contracts/contract-17.clar +23 -0
- package/smart-contracts/contracts/contract-18.clar +30 -0
- package/smart-contracts/contracts/contract-19.clar +49 -0
- package/smart-contracts/contracts/contract-2.clar +34 -0
- package/smart-contracts/contracts/contract-20.clar +7 -0
- package/smart-contracts/contracts/contract-21.clar +17 -0
- package/smart-contracts/contracts/contract-22.clar +23 -0
- package/smart-contracts/contracts/contract-23.clar +41 -0
- package/smart-contracts/contracts/contract-24.clar +30 -0
- package/smart-contracts/contracts/contract-28.clar +34 -0
- package/smart-contracts/contracts/contract-3.clar +36 -0
- package/smart-contracts/contracts/contract-30.clar +21 -0
- package/smart-contracts/contracts/contract-32.clar +26 -0
- package/smart-contracts/contracts/contract-33.clar +43 -0
- package/smart-contracts/contracts/contract-34.clar +29 -0
- package/smart-contracts/contracts/contract-35.clar +17 -0
- package/smart-contracts/contracts/contract-36.clar +47 -0
- package/smart-contracts/contracts/contract-37.clar +33 -0
- package/smart-contracts/contracts/contract-38.clar +26 -0
- package/smart-contracts/contracts/contract-4.clar +16 -0
- package/smart-contracts/contracts/contract-40.clar +19 -0
- package/smart-contracts/contracts/contract-42.clar +26 -0
- package/smart-contracts/contracts/contract-43.clar +23 -0
- package/smart-contracts/contracts/contract-44.clar +47 -0
- package/smart-contracts/contracts/contract-45.clar +32 -0
- package/smart-contracts/contracts/contract-46.clar +31 -0
- package/smart-contracts/contracts/contract-47.clar +33 -0
- package/smart-contracts/contracts/contract-48.clar +16 -0
- package/smart-contracts/contracts/contract-49.clar +36 -0
- package/smart-contracts/contracts/contract-5.clar +17 -0
- package/smart-contracts/contracts/contract-6.clar +52 -0
- package/smart-contracts/contracts/contract-7.clar +6 -0
- package/smart-contracts/contracts/contract-8.clar +27 -0
- package/smart-contracts/contracts/faucet-distributor-v2.clar +133 -0
- package/smart-contracts/contracts/faucet-distributor-v3.clar +129 -0
- package/smart-contracts/contracts/faucet-distributor-v4.clar +86 -0
- package/smart-contracts/contracts/faucet-distributor-v5.clar +90 -0
- package/smart-contracts/contracts/faucet-distributor-v6.clar +123 -0
- package/smart-contracts/contracts/faucet-distributor-v7.clar +88 -0
- package/smart-contracts/contracts/faucet-distributor.clar +64 -0
- package/smart-contracts/contracts/genesis-0.clar +297 -0
- package/smart-contracts/contracts/genesis-1.clar +342 -0
- package/smart-contracts/contracts/genesis-2.clar +297 -0
- package/smart-contracts/contracts/genesis-3.clar +282 -0
- package/smart-contracts/contracts/genesis-4.clar +291 -0
- package/smart-contracts/contracts/genesis-5.clar +276 -0
- package/smart-contracts/contracts/genesis-6.clar +273 -0
- package/smart-contracts/contracts/genesis-7.clar +261 -0
- package/smart-contracts/contracts/genesis-8.clar +279 -0
- package/smart-contracts/contracts/genesis-9.clar +288 -0
- package/smart-contracts/contracts/genesis-ascension-v1.clar +54 -0
- package/smart-contracts/contracts/genesis-badges-v10.clar +72 -0
- package/smart-contracts/contracts/genesis-badges-v4.clar +66 -0
- package/smart-contracts/contracts/genesis-badges-v5.clar +66 -0
- package/smart-contracts/contracts/genesis-badges-v8.clar +88 -0
- package/smart-contracts/contracts/genesis-badges-v9.clar +66 -0
- package/smart-contracts/contracts/genesis-badges.clar +73 -0
- package/smart-contracts/contracts/genesis-boost-v1.clar +58 -0
- package/smart-contracts/contracts/genesis-core-v10.clar +87 -0
- package/smart-contracts/contracts/genesis-core-v2.clar +86 -0
- package/smart-contracts/contracts/genesis-core-v4.clar +80 -0
- package/smart-contracts/contracts/genesis-core-v5.clar +86 -0
- package/smart-contracts/contracts/genesis-core-v6.clar +98 -0
- package/smart-contracts/contracts/genesis-core-v8.clar +106 -0
- package/smart-contracts/contracts/genesis-core-v9.clar +80 -0
- package/smart-contracts/contracts/genesis-core.clar +93 -0
- package/smart-contracts/contracts/genesis-missions-v4.clar +104 -0
- package/smart-contracts/contracts/genesis-missions-v5.clar +86 -0
- package/smart-contracts/contracts/genesis-missions-v6.clar +80 -0
- package/smart-contracts/contracts/genesis-missions-v8.clar +81 -0
- package/smart-contracts/contracts/genesis-missions-v9.clar +73 -0
- package/smart-contracts/contracts/genesis-missions.clar +68 -0
- package/smart-contracts/contracts/mission-mini-001.clar +32 -0
- package/smart-contracts/contracts/mission-mini-002.clar +42 -0
- package/smart-contracts/contracts/mission-mini-003.clar +39 -0
- package/smart-contracts/contracts/mission-mini-004.clar +39 -0
- package/smart-contracts/contracts/mission-mini-005.clar +36 -0
- package/smart-contracts/contracts/modules/genesis-badge-lite-v1.clar +17 -0
- package/smart-contracts/contracts/modules/genesis-counter-v1.clar +21 -0
- package/smart-contracts/contracts/modules/genesis-duel-v1.clar +16 -0
- package/smart-contracts/contracts/modules/genesis-flag-v1.clar +21 -0
- package/smart-contracts/contracts/modules/genesis-leaderboard-v1.clar +88 -0
- package/smart-contracts/contracts/modules/genesis-lucky-v1.clar +16 -0
- package/smart-contracts/contracts/modules/genesis-points-v1.clar +21 -0
- package/smart-contracts/contracts/modules/genesis-predict-v1.clar +14 -0
- package/smart-contracts/contracts/modules/genesis-score-lite-v1.clar +21 -0
- package/smart-contracts/contracts/modules/module-1.clar +2 -0
- package/smart-contracts/contracts/modules/module-10.clar +2 -0
- package/smart-contracts/contracts/modules/module-100.clar +2 -0
- package/smart-contracts/contracts/modules/module-101.clar +2 -0
- package/smart-contracts/contracts/modules/module-102.clar +2 -0
- package/smart-contracts/contracts/modules/module-103.clar +2 -0
- package/smart-contracts/contracts/modules/module-104.clar +2 -0
- package/smart-contracts/contracts/modules/module-105.clar +2 -0
- package/smart-contracts/contracts/modules/module-106.clar +2 -0
- package/smart-contracts/contracts/modules/module-107.clar +2 -0
- package/smart-contracts/contracts/modules/module-108.clar +2 -0
- package/smart-contracts/contracts/modules/module-109.clar +2 -0
- package/smart-contracts/contracts/modules/module-11.clar +2 -0
- package/smart-contracts/contracts/modules/module-110.clar +2 -0
- package/smart-contracts/contracts/modules/module-111.clar +2 -0
- package/smart-contracts/contracts/modules/module-112.clar +2 -0
- package/smart-contracts/contracts/modules/module-113.clar +2 -0
- package/smart-contracts/contracts/modules/module-114.clar +2 -0
- package/smart-contracts/contracts/modules/module-115.clar +2 -0
- package/smart-contracts/contracts/modules/module-116.clar +2 -0
- package/smart-contracts/contracts/modules/module-117.clar +2 -0
- package/smart-contracts/contracts/modules/module-118.clar +2 -0
- package/smart-contracts/contracts/modules/module-119.clar +2 -0
- package/smart-contracts/contracts/modules/module-12.clar +2 -0
- package/smart-contracts/contracts/modules/module-120.clar +2 -0
- package/smart-contracts/contracts/modules/module-121.clar +2 -0
- package/smart-contracts/contracts/modules/module-122.clar +2 -0
- package/smart-contracts/contracts/modules/module-123.clar +2 -0
- package/smart-contracts/contracts/modules/module-124.clar +2 -0
- package/smart-contracts/contracts/modules/module-125.clar +2 -0
- package/smart-contracts/contracts/modules/module-126.clar +2 -0
- package/smart-contracts/contracts/modules/module-127.clar +2 -0
- package/smart-contracts/contracts/modules/module-128.clar +2 -0
- package/smart-contracts/contracts/modules/module-129.clar +2 -0
- package/smart-contracts/contracts/modules/module-13.clar +2 -0
- package/smart-contracts/contracts/modules/module-130.clar +2 -0
- package/smart-contracts/contracts/modules/module-131.clar +2 -0
- package/smart-contracts/contracts/modules/module-132.clar +2 -0
- package/smart-contracts/contracts/modules/module-133.clar +2 -0
- package/smart-contracts/contracts/modules/module-134.clar +2 -0
- package/smart-contracts/contracts/modules/module-135.clar +2 -0
- package/smart-contracts/contracts/modules/module-136.clar +2 -0
- package/smart-contracts/contracts/modules/module-137.clar +2 -0
- package/smart-contracts/contracts/modules/module-138.clar +2 -0
- package/smart-contracts/contracts/modules/module-14.clar +2 -0
- package/smart-contracts/contracts/modules/module-140.clar +2 -0
- package/smart-contracts/contracts/modules/module-141.clar +2 -0
- package/smart-contracts/contracts/modules/module-142.clar +2 -0
- package/smart-contracts/contracts/modules/module-143.clar +2 -0
- package/smart-contracts/contracts/modules/module-144.clar +2 -0
- package/smart-contracts/contracts/modules/module-145.clar +2 -0
- package/smart-contracts/contracts/modules/module-146.clar +2 -0
- package/smart-contracts/contracts/modules/module-147.clar +2 -0
- package/smart-contracts/contracts/modules/module-148.clar +2 -0
- package/smart-contracts/contracts/modules/module-149.clar +2 -0
- package/smart-contracts/contracts/modules/module-15.clar +2 -0
- package/smart-contracts/contracts/modules/module-150.clar +2 -0
- package/smart-contracts/contracts/modules/module-152.clar +2 -0
- package/smart-contracts/contracts/modules/module-153.clar +2 -0
- package/smart-contracts/contracts/modules/module-154.clar +2 -0
- package/smart-contracts/contracts/modules/module-156.clar +2 -0
- package/smart-contracts/contracts/modules/module-157.clar +2 -0
- package/smart-contracts/contracts/modules/module-158.clar +2 -0
- package/smart-contracts/contracts/modules/module-159.clar +2 -0
- package/smart-contracts/contracts/modules/module-16.clar +2 -0
- package/smart-contracts/contracts/modules/module-160.clar +2 -0
- package/smart-contracts/contracts/modules/module-161.clar +2 -0
- package/smart-contracts/contracts/modules/module-162.clar +2 -0
- package/smart-contracts/contracts/modules/module-163.clar +2 -0
- package/smart-contracts/contracts/modules/module-164.clar +2 -0
- package/smart-contracts/contracts/modules/module-165.clar +2 -0
- package/smart-contracts/contracts/modules/module-166.clar +2 -0
- package/smart-contracts/contracts/modules/module-167.clar +2 -0
- package/smart-contracts/contracts/modules/module-168.clar +2 -0
- package/smart-contracts/contracts/modules/module-169.clar +2 -0
- package/smart-contracts/contracts/modules/module-17.clar +2 -0
- package/smart-contracts/contracts/modules/module-171.clar +2 -0
- package/smart-contracts/contracts/modules/module-172.clar +2 -0
- package/smart-contracts/contracts/modules/module-173.clar +2 -0
- package/smart-contracts/contracts/modules/module-174.clar +2 -0
- package/smart-contracts/contracts/modules/module-175.clar +2 -0
- package/smart-contracts/contracts/modules/module-176.clar +2 -0
- package/smart-contracts/contracts/modules/module-178.clar +2 -0
- package/smart-contracts/contracts/modules/module-179.clar +2 -0
- package/smart-contracts/contracts/modules/module-18.clar +2 -0
- package/smart-contracts/contracts/modules/module-180.clar +2 -0
- package/smart-contracts/contracts/modules/module-181.clar +2 -0
- package/smart-contracts/contracts/modules/module-182.clar +2 -0
- package/smart-contracts/contracts/modules/module-183.clar +2 -0
- package/smart-contracts/contracts/modules/module-184.clar +2 -0
- package/smart-contracts/contracts/modules/module-186.clar +2 -0
- package/smart-contracts/contracts/modules/module-188.clar +2 -0
- package/smart-contracts/contracts/modules/module-189.clar +2 -0
- package/smart-contracts/contracts/modules/module-19.clar +2 -0
- package/smart-contracts/contracts/modules/module-190.clar +2 -0
- package/smart-contracts/contracts/modules/module-191.clar +2 -0
- package/smart-contracts/contracts/modules/module-192.clar +2 -0
- package/smart-contracts/contracts/modules/module-193.clar +2 -0
- package/smart-contracts/contracts/modules/module-195.clar +2 -0
- package/smart-contracts/contracts/modules/module-196.clar +2 -0
- package/smart-contracts/contracts/modules/module-197.clar +2 -0
- package/smart-contracts/contracts/modules/module-198.clar +2 -0
- package/smart-contracts/contracts/modules/module-199.clar +2 -0
- package/smart-contracts/contracts/modules/module-2.clar +2 -0
- package/smart-contracts/contracts/modules/module-20.clar +2 -0
- package/smart-contracts/contracts/modules/module-200.clar +2 -0
- package/smart-contracts/contracts/modules/module-201.clar +2 -0
- package/smart-contracts/contracts/modules/module-202.clar +2 -0
- package/smart-contracts/contracts/modules/module-203.clar +2 -0
- package/smart-contracts/contracts/modules/module-204.clar +2 -0
- package/smart-contracts/contracts/modules/module-205.clar +2 -0
- package/smart-contracts/contracts/modules/module-207.clar +2 -0
- package/smart-contracts/contracts/modules/module-209.clar +2 -0
- package/smart-contracts/contracts/modules/module-21.clar +2 -0
- package/smart-contracts/contracts/modules/module-210.clar +2 -0
- package/smart-contracts/contracts/modules/module-212.clar +2 -0
- package/smart-contracts/contracts/modules/module-213.clar +2 -0
- package/smart-contracts/contracts/modules/module-215.clar +2 -0
- package/smart-contracts/contracts/modules/module-216.clar +2 -0
- package/smart-contracts/contracts/modules/module-218.clar +2 -0
- package/smart-contracts/contracts/modules/module-219.clar +2 -0
- package/smart-contracts/contracts/modules/module-22.clar +2 -0
- package/smart-contracts/contracts/modules/module-222.clar +2 -0
- package/smart-contracts/contracts/modules/module-223.clar +2 -0
- package/smart-contracts/contracts/modules/module-224.clar +2 -0
- package/smart-contracts/contracts/modules/module-226.clar +2 -0
- package/smart-contracts/contracts/modules/module-227.clar +2 -0
- package/smart-contracts/contracts/modules/module-228.clar +2 -0
- package/smart-contracts/contracts/modules/module-23.clar +2 -0
- package/smart-contracts/contracts/modules/module-230.clar +2 -0
- package/smart-contracts/contracts/modules/module-231.clar +2 -0
- package/smart-contracts/contracts/modules/module-232.clar +2 -0
- package/smart-contracts/contracts/modules/module-234.clar +2 -0
- package/smart-contracts/contracts/modules/module-235.clar +2 -0
- package/smart-contracts/contracts/modules/module-24.clar +2 -0
- package/smart-contracts/contracts/modules/module-241.clar +2 -0
- package/smart-contracts/contracts/modules/module-243.clar +2 -0
- package/smart-contracts/contracts/modules/module-244.clar +2 -0
- package/smart-contracts/contracts/modules/module-245.clar +2 -0
- package/smart-contracts/contracts/modules/module-246.clar +2 -0
- package/smart-contracts/contracts/modules/module-247.clar +2 -0
- package/smart-contracts/contracts/modules/module-25.clar +2 -0
- package/smart-contracts/contracts/modules/module-251.clar +2 -0
- package/smart-contracts/contracts/modules/module-252.clar +2 -0
- package/smart-contracts/contracts/modules/module-253.clar +2 -0
- package/smart-contracts/contracts/modules/module-254.clar +2 -0
- package/smart-contracts/contracts/modules/module-256.clar +2 -0
- package/smart-contracts/contracts/modules/module-257.clar +2 -0
- package/smart-contracts/contracts/modules/module-258.clar +2 -0
- package/smart-contracts/contracts/modules/module-26.clar +2 -0
- package/smart-contracts/contracts/modules/module-260.clar +2 -0
- package/smart-contracts/contracts/modules/module-262.clar +2 -0
- package/smart-contracts/contracts/modules/module-266.clar +2 -0
- package/smart-contracts/contracts/modules/module-267.clar +2 -0
- package/smart-contracts/contracts/modules/module-269.clar +2 -0
- package/smart-contracts/contracts/modules/module-27.clar +2 -0
- package/smart-contracts/contracts/modules/module-272.clar +2 -0
- package/smart-contracts/contracts/modules/module-275.clar +2 -0
- package/smart-contracts/contracts/modules/module-276.clar +2 -0
- package/smart-contracts/contracts/modules/module-277.clar +2 -0
- package/smart-contracts/contracts/modules/module-279.clar +2 -0
- package/smart-contracts/contracts/modules/module-28.clar +2 -0
- package/smart-contracts/contracts/modules/module-280.clar +2 -0
- package/smart-contracts/contracts/modules/module-282.clar +2 -0
- package/smart-contracts/contracts/modules/module-283.clar +2 -0
- package/smart-contracts/contracts/modules/module-286.clar +2 -0
- package/smart-contracts/contracts/modules/module-29.clar +2 -0
- package/smart-contracts/contracts/modules/module-291.clar +2 -0
- package/smart-contracts/contracts/modules/module-295.clar +2 -0
- package/smart-contracts/contracts/modules/module-296.clar +2 -0
- package/smart-contracts/contracts/modules/module-3.clar +2 -0
- package/smart-contracts/contracts/modules/module-30.clar +2 -0
- package/smart-contracts/contracts/modules/module-31.clar +2 -0
- package/smart-contracts/contracts/modules/module-32.clar +2 -0
- package/smart-contracts/contracts/modules/module-33.clar +2 -0
- package/smart-contracts/contracts/modules/module-34.clar +2 -0
- package/smart-contracts/contracts/modules/module-35.clar +2 -0
- package/smart-contracts/contracts/modules/module-36.clar +2 -0
- package/smart-contracts/contracts/modules/module-37.clar +2 -0
- package/smart-contracts/contracts/modules/module-38.clar +2 -0
- package/smart-contracts/contracts/modules/module-39.clar +2 -0
- package/smart-contracts/contracts/modules/module-4.clar +2 -0
- package/smart-contracts/contracts/modules/module-40.clar +2 -0
- package/smart-contracts/contracts/modules/module-41.clar +2 -0
- package/smart-contracts/contracts/modules/module-42.clar +2 -0
- package/smart-contracts/contracts/modules/module-43.clar +2 -0
- package/smart-contracts/contracts/modules/module-44.clar +2 -0
- package/smart-contracts/contracts/modules/module-45.clar +2 -0
- package/smart-contracts/contracts/modules/module-46.clar +2 -0
- package/smart-contracts/contracts/modules/module-47.clar +2 -0
- package/smart-contracts/contracts/modules/module-48.clar +2 -0
- package/smart-contracts/contracts/modules/module-49.clar +2 -0
- package/smart-contracts/contracts/modules/module-5.clar +2 -0
- package/smart-contracts/contracts/modules/module-50.clar +2 -0
- package/smart-contracts/contracts/modules/module-51.clar +2 -0
- package/smart-contracts/contracts/modules/module-52.clar +2 -0
- package/smart-contracts/contracts/modules/module-53.clar +2 -0
- package/smart-contracts/contracts/modules/module-54.clar +2 -0
- package/smart-contracts/contracts/modules/module-55.clar +2 -0
- package/smart-contracts/contracts/modules/module-56.clar +2 -0
- package/smart-contracts/contracts/modules/module-57.clar +2 -0
- package/smart-contracts/contracts/modules/module-58.clar +2 -0
- package/smart-contracts/contracts/modules/module-59.clar +2 -0
- package/smart-contracts/contracts/modules/module-6.clar +2 -0
- package/smart-contracts/contracts/modules/module-60.clar +2 -0
- package/smart-contracts/contracts/modules/module-61.clar +2 -0
- package/smart-contracts/contracts/modules/module-62.clar +2 -0
- package/smart-contracts/contracts/modules/module-63.clar +2 -0
- package/smart-contracts/contracts/modules/module-64.clar +2 -0
- package/smart-contracts/contracts/modules/module-65.clar +2 -0
- package/smart-contracts/contracts/modules/module-66.clar +2 -0
- package/smart-contracts/contracts/modules/module-67.clar +2 -0
- package/smart-contracts/contracts/modules/module-68.clar +2 -0
- package/smart-contracts/contracts/modules/module-69.clar +2 -0
- package/smart-contracts/contracts/modules/module-7.clar +2 -0
- package/smart-contracts/contracts/modules/module-70.clar +2 -0
- package/smart-contracts/contracts/modules/module-71.clar +2 -0
- package/smart-contracts/contracts/modules/module-72.clar +2 -0
- package/smart-contracts/contracts/modules/module-73.clar +2 -0
- package/smart-contracts/contracts/modules/module-74.clar +2 -0
- package/smart-contracts/contracts/modules/module-75.clar +2 -0
- package/smart-contracts/contracts/modules/module-76.clar +2 -0
- package/smart-contracts/contracts/modules/module-77.clar +2 -0
- package/smart-contracts/contracts/modules/module-78.clar +2 -0
- package/smart-contracts/contracts/modules/module-79.clar +2 -0
- package/smart-contracts/contracts/modules/module-8.clar +2 -0
- package/smart-contracts/contracts/modules/module-80.clar +2 -0
- package/smart-contracts/contracts/modules/module-81.clar +2 -0
- package/smart-contracts/contracts/modules/module-82.clar +2 -0
- package/smart-contracts/contracts/modules/module-83.clar +2 -0
- package/smart-contracts/contracts/modules/module-84.clar +2 -0
- package/smart-contracts/contracts/modules/module-85.clar +2 -0
- package/smart-contracts/contracts/modules/module-86.clar +2 -0
- package/smart-contracts/contracts/modules/module-87.clar +2 -0
- package/smart-contracts/contracts/modules/module-88.clar +2 -0
- package/smart-contracts/contracts/modules/module-89.clar +2 -0
- package/smart-contracts/contracts/modules/module-9.clar +2 -0
- package/smart-contracts/contracts/modules/module-90.clar +2 -0
- package/smart-contracts/contracts/modules/module-91.clar +2 -0
- package/smart-contracts/contracts/modules/module-92.clar +2 -0
- package/smart-contracts/contracts/modules/module-93.clar +2 -0
- package/smart-contracts/contracts/modules/module-94.clar +2 -0
- package/smart-contracts/contracts/modules/module-95.clar +2 -0
- package/smart-contracts/contracts/modules/module-96.clar +2 -0
- package/smart-contracts/contracts/modules/module-97.clar +2 -0
- package/smart-contracts/contracts/modules/module-98.clar +2 -0
- package/smart-contracts/contracts/modules/module-99.clar +2 -0
- package/smart-contracts/contracts/reputation-engine.clar +131 -0
- package/smart-contracts/contracts/sip-010-trait.clar +38 -0
- package/smart-contracts/contracts/staking-refinery-v3.clar +138 -0
- package/smart-contracts/contracts/staking-refinery-v4.clar +125 -0
- package/smart-contracts/contracts/staking-refinery-v5.clar +153 -0
- package/smart-contracts/contracts/staking-refinery-v6.clar +122 -0
- package/smart-contracts/contracts/staking-refinery-v7.clar +144 -0
- package/smart-contracts/contracts/staking-refinery.clar +80 -0
- package/smart-contracts/contracts/token-one-v3.clar +74 -0
- package/smart-contracts/contracts/token-one-v4.clar +51 -0
- package/smart-contracts/contracts/token-one-v5.clar +78 -0
- package/smart-contracts/contracts/token-one-v6.clar +91 -0
- package/smart-contracts/contracts/token-one-v7.clar +79 -0
- package/smart-contracts/contracts/token-one.clar +86 -0
- package/smart-contracts/contracts/token-poin-trait.clar +35 -0
- package/smart-contracts/contracts/token-poin-v3.clar +87 -0
- package/smart-contracts/contracts/token-poin-v4.clar +72 -0
- package/smart-contracts/contracts/token-poin-v5.clar +68 -0
- package/smart-contracts/contracts/token-poin-v6.clar +61 -0
- package/smart-contracts/contracts/token-poin-v7.clar +55 -0
- package/smart-contracts/contracts/token-poin.clar +85 -0
- package/smart-contracts/contracts/utility-gacha.clar +69 -0
- package/smart-contracts/deployments/default.mainnet-plan.yaml +18 -0
- package/smart-contracts/mission-mini-001.clar +0 -0
- package/smart-contracts/mission-mini-002.clar +0 -0
- package/smart-contracts/mission-mini-003.clar +0 -0
- package/smart-contracts/mission-mini-004.clar +0 -0
- package/smart-contracts/mission-mini-005.clar +0 -0
- package/smart-contracts/package-lock.json +2990 -0
- package/smart-contracts/package.json +24 -0
- package/smart-contracts/scripts/interact-modules.ts +1 -0
- package/smart-contracts/settings/Devnet.toml +155 -0
- package/smart-contracts/tests/genesis-badges.test.ts +21 -0
- package/smart-contracts/tests/genesis-core.test.ts +21 -0
- package/smart-contracts/tests/genesis-missions.test.ts +21 -0
- package/smart-contracts/tests/interact-reputation.ts +8 -0
- package/smart-contracts/tests/reputation-engine.test.ts +41 -0
- package/smart-contracts/tests/reputation.test.ts +15 -0
- package/smart-contracts/tests/token-one.test.ts +102 -0
- package/smart-contracts/tsconfig.json +26 -0
- package/smart-contracts/vitest.config.js +42 -0
- package/src/App.css +42 -0
- package/src/App.jsx +357 -0
- package/src/assets/react.svg +1 -0
- package/src/components/Layout.jsx +114 -0
- package/src/helper.js +153 -0
- package/src/index.css +21 -0
- package/src/main.jsx +160 -0
- package/src/pages/Gaming.jsx +177 -0
- package/src/pages/Home.jsx +153 -0
- package/src/pages/LeaderboardCard.tsx +93 -0
- package/src/pages/Profile.jsx +299 -0
- package/src/pages/Tasks.jsx +128 -0
- package/src/pages/Vault.jsx +524 -0
- package/src/polyfills.js +126 -0
- package/src/supabaseClient.js +141 -0
- package/src/utils.js +166 -0
- package/tailwind.config.js +42 -0
- package/temp-log.txt +4 -0
- package/vercel.json +8 -0
- package/vite.config.js +34 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
(define-read-only (get-value-55)
|
|
2
|
+
(ok u55))
|
|
3
|
+
|
|
4
|
+
(define-public (ping-70)
|
|
5
|
+
(ok true))
|
|
6
|
+
|
|
7
|
+
(define-public (ping-7)
|
|
8
|
+
(ok true))
|
|
9
|
+
|
|
10
|
+
(define-public (ping-9)
|
|
11
|
+
(ok true))
|
|
12
|
+
|
|
13
|
+
(define-public (ping-55)
|
|
14
|
+
(ok true))
|
|
15
|
+
|
|
16
|
+
(define-public (ping-219)
|
|
17
|
+
(ok true))
|
|
18
|
+
|
|
19
|
+
(define-public (ping-9)
|
|
20
|
+
(ok true))
|
|
21
|
+
|
|
22
|
+
(define-public (ping-87)
|
|
23
|
+
(ok true))
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
(define-read-only (get-value-22)
|
|
2
|
+
(ok u22))
|
|
3
|
+
(define-public (hello-46)
|
|
4
|
+
(ok true))
|
|
5
|
+
(define-read-only (get-value-154)
|
|
6
|
+
(ok u154))
|
|
7
|
+
(define-read-only (get-value-22)
|
|
8
|
+
(ok u22))
|
|
9
|
+
|
|
10
|
+
(define-public (ping-80)
|
|
11
|
+
(ok true))
|
|
12
|
+
|
|
13
|
+
(define-public (ping-71)
|
|
14
|
+
(ok true))
|
|
15
|
+
|
|
16
|
+
(define-public (ping-8)
|
|
17
|
+
(ok true))
|
|
18
|
+
|
|
19
|
+
(define-public (ping-63)
|
|
20
|
+
(ok true))
|
|
21
|
+
|
|
22
|
+
(define-public (ping-186)
|
|
23
|
+
(ok true))
|
|
24
|
+
|
|
25
|
+
(define-public (ping-68)
|
|
26
|
+
(ok true))
|
|
27
|
+
|
|
28
|
+
(define-public (ping-263)
|
|
29
|
+
(ok true))
|
|
30
|
+
|
|
31
|
+
(define-public (ping-200)
|
|
32
|
+
(ok true))
|
|
33
|
+
|
|
34
|
+
(define-public (ping-93)
|
|
35
|
+
(ok true))
|
|
36
|
+
|
|
37
|
+
(define-public (ping-45)
|
|
38
|
+
(ok true))
|
|
39
|
+
|
|
40
|
+
(define-public (ping-113)
|
|
41
|
+
(ok true))
|
|
42
|
+
|
|
43
|
+
(define-public (ping-204)
|
|
44
|
+
(ok true))
|
|
45
|
+
|
|
46
|
+
(define-public (ping-121)
|
|
47
|
+
(ok true))
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
(define-read-only (get-value-20)
|
|
2
|
+
(ok u20))
|
|
3
|
+
(define-public (hello-159)
|
|
4
|
+
(ok true))
|
|
5
|
+
(define-read-only (get-value-37)
|
|
6
|
+
(ok u37))
|
|
7
|
+
(define-read-only (get-value-44)
|
|
8
|
+
(ok u44))
|
|
9
|
+
|
|
10
|
+
(define-public (ping-23)
|
|
11
|
+
(ok true))
|
|
12
|
+
|
|
13
|
+
(define-public (ping-139)
|
|
14
|
+
(ok true))
|
|
15
|
+
|
|
16
|
+
(define-public (ping-102)
|
|
17
|
+
(ok true))
|
|
18
|
+
|
|
19
|
+
(define-public (ping-73)
|
|
20
|
+
(ok true))
|
|
21
|
+
|
|
22
|
+
(define-public (ping-206)
|
|
23
|
+
(ok true))
|
|
24
|
+
|
|
25
|
+
(define-public (ping-246)
|
|
26
|
+
(ok true))
|
|
27
|
+
|
|
28
|
+
(define-public (ping-86)
|
|
29
|
+
(ok true))
|
|
30
|
+
|
|
31
|
+
(define-public (ping-222)
|
|
32
|
+
(ok true))
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
(define-public (hello-34)
|
|
2
|
+
(ok true))
|
|
3
|
+
(define-read-only (get-value-59)
|
|
4
|
+
(ok u59))
|
|
5
|
+
|
|
6
|
+
(define-public (ping-14)
|
|
7
|
+
(ok true))
|
|
8
|
+
|
|
9
|
+
(define-public (ping-41)
|
|
10
|
+
(ok true))
|
|
11
|
+
|
|
12
|
+
(define-public (ping-121)
|
|
13
|
+
(ok true))
|
|
14
|
+
|
|
15
|
+
(define-public (ping-35)
|
|
16
|
+
(ok true))
|
|
17
|
+
|
|
18
|
+
(define-public (ping-24)
|
|
19
|
+
(ok true))
|
|
20
|
+
|
|
21
|
+
(define-public (ping-110)
|
|
22
|
+
(ok true))
|
|
23
|
+
|
|
24
|
+
(define-public (ping-13)
|
|
25
|
+
(ok true))
|
|
26
|
+
|
|
27
|
+
(define-public (ping-231)
|
|
28
|
+
(ok true))
|
|
29
|
+
|
|
30
|
+
(define-public (ping-29)
|
|
31
|
+
(ok true))
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
(define-read-only (get-value-98)
|
|
2
|
+
(ok u98))
|
|
3
|
+
(define-public (hello-108)
|
|
4
|
+
(ok true))
|
|
5
|
+
(define-public (hello-133)
|
|
6
|
+
(ok true))
|
|
7
|
+
|
|
8
|
+
(define-public (ping-35)
|
|
9
|
+
(ok true))
|
|
10
|
+
|
|
11
|
+
(define-public (ping-84)
|
|
12
|
+
(ok true))
|
|
13
|
+
|
|
14
|
+
(define-public (ping-32)
|
|
15
|
+
(ok true))
|
|
16
|
+
|
|
17
|
+
(define-public (ping-268)
|
|
18
|
+
(ok true))
|
|
19
|
+
|
|
20
|
+
(define-public (ping-64)
|
|
21
|
+
(ok true))
|
|
22
|
+
|
|
23
|
+
(define-public (ping-156)
|
|
24
|
+
(ok true))
|
|
25
|
+
|
|
26
|
+
(define-public (ping-136)
|
|
27
|
+
(ok true))
|
|
28
|
+
|
|
29
|
+
(define-public (ping-138)
|
|
30
|
+
(ok true))
|
|
31
|
+
|
|
32
|
+
(define-public (ping-233)
|
|
33
|
+
(ok true))
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
(define-read-only (get-value-12)
|
|
2
|
+
(ok u12))
|
|
3
|
+
(define-public (hello-15)
|
|
4
|
+
(ok true))
|
|
5
|
+
|
|
6
|
+
(define-public (ping-81)
|
|
7
|
+
(ok true))
|
|
8
|
+
|
|
9
|
+
(define-public (ping-28)
|
|
10
|
+
(ok true))
|
|
11
|
+
|
|
12
|
+
(define-public (ping-88)
|
|
13
|
+
(ok true))
|
|
14
|
+
|
|
15
|
+
(define-public (ping-248)
|
|
16
|
+
(ok true))
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
(define-public (hello-89)
|
|
2
|
+
(ok true))
|
|
3
|
+
(define-public (hello-40)
|
|
4
|
+
(ok true))
|
|
5
|
+
(define-public (hello-49)
|
|
6
|
+
(ok true))
|
|
7
|
+
|
|
8
|
+
(define-public (ping-87)
|
|
9
|
+
(ok true))
|
|
10
|
+
|
|
11
|
+
(define-public (ping-61)
|
|
12
|
+
(ok true))
|
|
13
|
+
|
|
14
|
+
(define-public (ping-13)
|
|
15
|
+
(ok true))
|
|
16
|
+
|
|
17
|
+
(define-public (ping-62)
|
|
18
|
+
(ok true))
|
|
19
|
+
|
|
20
|
+
(define-public (ping-3)
|
|
21
|
+
(ok true))
|
|
22
|
+
|
|
23
|
+
(define-public (ping-138)
|
|
24
|
+
(ok true))
|
|
25
|
+
|
|
26
|
+
(define-public (ping-282)
|
|
27
|
+
(ok true))
|
|
28
|
+
|
|
29
|
+
(define-public (ping-133)
|
|
30
|
+
(ok true))
|
|
31
|
+
|
|
32
|
+
(define-public (ping-169)
|
|
33
|
+
(ok true))
|
|
34
|
+
|
|
35
|
+
(define-public (ping-180)
|
|
36
|
+
(ok true))
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
(define-public (hello-68)
|
|
2
|
+
(ok true))
|
|
3
|
+
(define-public (hello-71)
|
|
4
|
+
(ok true))
|
|
5
|
+
(define-read-only (get-value-117)
|
|
6
|
+
(ok u117))
|
|
7
|
+
(define-public (hello-118)
|
|
8
|
+
(ok true))
|
|
9
|
+
|
|
10
|
+
(define-public (ping-109)
|
|
11
|
+
(ok true))
|
|
12
|
+
|
|
13
|
+
(define-public (ping-156)
|
|
14
|
+
(ok true))
|
|
15
|
+
|
|
16
|
+
(define-public (ping-91)
|
|
17
|
+
(ok true))
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
(define-public (hello-101)
|
|
2
|
+
(ok true))
|
|
3
|
+
(define-public (hello-152)
|
|
4
|
+
(ok true))
|
|
5
|
+
|
|
6
|
+
(define-public (ping-72)
|
|
7
|
+
(ok true))
|
|
8
|
+
|
|
9
|
+
(define-public (ping-41)
|
|
10
|
+
(ok true))
|
|
11
|
+
|
|
12
|
+
(define-public (ping-93)
|
|
13
|
+
(ok true))
|
|
14
|
+
|
|
15
|
+
(define-public (ping-136)
|
|
16
|
+
(ok true))
|
|
17
|
+
|
|
18
|
+
(define-public (ping-263)
|
|
19
|
+
(ok true))
|
|
20
|
+
|
|
21
|
+
(define-public (ping-38)
|
|
22
|
+
(ok true))
|
|
23
|
+
|
|
24
|
+
(define-public (ping-54)
|
|
25
|
+
(ok true))
|
|
26
|
+
|
|
27
|
+
(define-public (ping-124)
|
|
28
|
+
(ok true))
|
|
29
|
+
|
|
30
|
+
(define-public (ping-74)
|
|
31
|
+
(ok true))
|
|
32
|
+
|
|
33
|
+
(define-public (ping-116)
|
|
34
|
+
(ok true))
|
|
35
|
+
|
|
36
|
+
(define-public (ping-34)
|
|
37
|
+
(ok true))
|
|
38
|
+
|
|
39
|
+
(define-public (ping-80)
|
|
40
|
+
(ok true))
|
|
41
|
+
|
|
42
|
+
(define-public (ping-72)
|
|
43
|
+
(ok true))
|
|
44
|
+
|
|
45
|
+
(define-public (ping-127)
|
|
46
|
+
(ok true))
|
|
47
|
+
|
|
48
|
+
(define-public (ping-74)
|
|
49
|
+
(ok true))
|
|
50
|
+
|
|
51
|
+
(define-public (ping-113)
|
|
52
|
+
(ok true))
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
(define-read-only (get-value-119)
|
|
2
|
+
(ok u119))
|
|
3
|
+
(define-read-only (get-value-144)
|
|
4
|
+
(ok u144))
|
|
5
|
+
(define-public (hello-148)
|
|
6
|
+
(ok true))
|
|
7
|
+
|
|
8
|
+
(define-public (ping-10)
|
|
9
|
+
(ok true))
|
|
10
|
+
|
|
11
|
+
(define-public (ping-91)
|
|
12
|
+
(ok true))
|
|
13
|
+
|
|
14
|
+
(define-public (ping-109)
|
|
15
|
+
(ok true))
|
|
16
|
+
|
|
17
|
+
(define-public (ping-37)
|
|
18
|
+
(ok true))
|
|
19
|
+
|
|
20
|
+
(define-public (ping-66)
|
|
21
|
+
(ok true))
|
|
22
|
+
|
|
23
|
+
(define-public (ping-76)
|
|
24
|
+
(ok true))
|
|
25
|
+
|
|
26
|
+
(define-public (ping-4)
|
|
27
|
+
(ok true))
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
;; faucet-v2.clar
|
|
2
|
+
;; Faucet dengan Cooldown 8 Jam (48 Blok) dan Fitur Timer untuk Frontend
|
|
3
|
+
|
|
4
|
+
(define-constant err-too-early (err u200))
|
|
5
|
+
|
|
6
|
+
;; Constants reward & waktu
|
|
7
|
+
(define-constant base-amount u100000000)
|
|
8
|
+
(define-constant streak-bonus u10000000)
|
|
9
|
+
(define-constant cooldown-blocks u48)
|
|
10
|
+
(define-constant streak-max-window u144)
|
|
11
|
+
|
|
12
|
+
(define-map last-claim-height principal uint)
|
|
13
|
+
(define-map streak-count principal uint)
|
|
14
|
+
|
|
15
|
+
;; ==========================================
|
|
16
|
+
;; READ-ONLY FUNCTIONS
|
|
17
|
+
;; ==========================================
|
|
18
|
+
|
|
19
|
+
(define-read-only (get-user-status (user principal))
|
|
20
|
+
(let
|
|
21
|
+
(
|
|
22
|
+
(current-height burn-block-height)
|
|
23
|
+
(last-height (default-to u0 (map-get? last-claim-height user)))
|
|
24
|
+
(current-streak (default-to u0 (map-get? streak-count user)))
|
|
25
|
+
(next-claim-height (+ last-height cooldown-blocks))
|
|
26
|
+
|
|
27
|
+
(blocks-remaining
|
|
28
|
+
(if (>= current-height next-claim-height)
|
|
29
|
+
u0
|
|
30
|
+
(- next-claim-height current-height)
|
|
31
|
+
)
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
(is-ready
|
|
35
|
+
(or (is-eq last-height u0)
|
|
36
|
+
(>= current-height next-claim-height)
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
(projected-streak
|
|
41
|
+
(if (is-eq last-height u0)
|
|
42
|
+
u1
|
|
43
|
+
(if (<= (- current-height last-height) streak-max-window)
|
|
44
|
+
(+ current-streak u1)
|
|
45
|
+
u1
|
|
46
|
+
)
|
|
47
|
+
)
|
|
48
|
+
)
|
|
49
|
+
)
|
|
50
|
+
{
|
|
51
|
+
last-claim-block: last-height,
|
|
52
|
+
next-claim-block: (if (is-eq last-height u0) u0 next-claim-height),
|
|
53
|
+
current-block: current-height,
|
|
54
|
+
blocks-left: blocks-remaining,
|
|
55
|
+
can-claim: is-ready,
|
|
56
|
+
current-streak: current-streak,
|
|
57
|
+
next-streak-projection: projected-streak
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
;; ==========================================
|
|
63
|
+
;; PUBLIC FUNCTIONS
|
|
64
|
+
;; ==========================================
|
|
65
|
+
|
|
66
|
+
(define-public (claim)
|
|
67
|
+
(let
|
|
68
|
+
(
|
|
69
|
+
(user tx-sender)
|
|
70
|
+
(current-height burn-block-height)
|
|
71
|
+
(last-height (default-to u0 (map-get? last-claim-height user)))
|
|
72
|
+
(current-streak (default-to u0 (map-get? streak-count user)))
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
;; cooldown check
|
|
76
|
+
(asserts!
|
|
77
|
+
(or (is-eq last-height u0)
|
|
78
|
+
(>= current-height (+ last-height cooldown-blocks))
|
|
79
|
+
)
|
|
80
|
+
err-too-early
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
(let
|
|
84
|
+
(
|
|
85
|
+
(new-streak
|
|
86
|
+
(if (is-eq last-height u0)
|
|
87
|
+
u1
|
|
88
|
+
(if (<= (- current-height last-height) streak-max-window)
|
|
89
|
+
(+ current-streak u1)
|
|
90
|
+
u1
|
|
91
|
+
)
|
|
92
|
+
)
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
(bonus (* streak-bonus new-streak))
|
|
96
|
+
(total-mint (+ base-amount bonus))
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
;; update data
|
|
100
|
+
(map-set last-claim-height user current-height)
|
|
101
|
+
(map-set streak-count user new-streak)
|
|
102
|
+
|
|
103
|
+
;; mint token dari kontrak mainnet
|
|
104
|
+
(contract-call?
|
|
105
|
+
'SP3GHKMV4GSYNA8WGBX83DACG80K1RRVQZAZMB9J3.token-poin
|
|
106
|
+
mint
|
|
107
|
+
total-mint
|
|
108
|
+
user
|
|
109
|
+
)
|
|
110
|
+
)
|
|
111
|
+
)
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
(define-public (ping-132)
|
|
115
|
+
(ok true))
|
|
116
|
+
|
|
117
|
+
(define-public (ping-28)
|
|
118
|
+
(ok true))
|
|
119
|
+
|
|
120
|
+
(define-public (ping-21)
|
|
121
|
+
(ok true))
|
|
122
|
+
|
|
123
|
+
(define-public (ping-4)
|
|
124
|
+
(ok true))
|
|
125
|
+
|
|
126
|
+
(define-public (ping-51)
|
|
127
|
+
(ok true))
|
|
128
|
+
|
|
129
|
+
(define-public (ping-195)
|
|
130
|
+
(ok true))
|
|
131
|
+
|
|
132
|
+
(define-public (ping-242)
|
|
133
|
+
(ok true))
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
;; faucet-distributor-v3.clar
|
|
2
|
+
|
|
3
|
+
(define-constant err-too-early (err u200))
|
|
4
|
+
|
|
5
|
+
(define-constant base-amount u100000000)
|
|
6
|
+
(define-constant streak-bonus u10000000)
|
|
7
|
+
(define-constant cooldown-blocks u48)
|
|
8
|
+
(define-constant streak-max-window u144)
|
|
9
|
+
|
|
10
|
+
(define-map last-claim-height principal uint)
|
|
11
|
+
(define-map streak-count principal uint)
|
|
12
|
+
|
|
13
|
+
(define-read-only (get-user-status (user principal))
|
|
14
|
+
(let
|
|
15
|
+
(
|
|
16
|
+
(current-height burn-block-height)
|
|
17
|
+
(last-height (default-to u0 (map-get? last-claim-height user)))
|
|
18
|
+
(current-streak (default-to u0 (map-get? streak-count user)))
|
|
19
|
+
(next-claim-height (+ last-height cooldown-blocks))
|
|
20
|
+
|
|
21
|
+
(blocks-remaining
|
|
22
|
+
(if (>= current-height next-claim-height)
|
|
23
|
+
u0
|
|
24
|
+
(- next-claim-height current-height)
|
|
25
|
+
)
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
(is-ready
|
|
29
|
+
(or (is-eq last-height u0)
|
|
30
|
+
(>= current-height next-claim-height)
|
|
31
|
+
)
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
(projected-streak
|
|
35
|
+
(if (is-eq last-height u0)
|
|
36
|
+
u1
|
|
37
|
+
(if (<= (- current-height last-height) streak-max-window)
|
|
38
|
+
(+ current-streak u1)
|
|
39
|
+
u1
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
)
|
|
44
|
+
{
|
|
45
|
+
last-claim-block: last-height,
|
|
46
|
+
next-claim-block: (if (is-eq last-height u0) u0 next-claim-height),
|
|
47
|
+
current-block: current-height,
|
|
48
|
+
blocks-left: blocks-remaining,
|
|
49
|
+
can-claim: is-ready,
|
|
50
|
+
current-streak: current-streak,
|
|
51
|
+
next-streak-projection: projected-streak
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
(define-public (claim)
|
|
57
|
+
(let
|
|
58
|
+
(
|
|
59
|
+
(user tx-sender)
|
|
60
|
+
(current-height burn-block-height)
|
|
61
|
+
(last-height (default-to u0 (map-get? last-claim-height user)))
|
|
62
|
+
(current-streak (default-to u0 (map-get? streak-count user)))
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
(asserts!
|
|
66
|
+
(or (is-eq last-height u0)
|
|
67
|
+
(>= current-height (+ last-height cooldown-blocks))
|
|
68
|
+
)
|
|
69
|
+
err-too-early
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
(let
|
|
73
|
+
(
|
|
74
|
+
(new-streak
|
|
75
|
+
(if (is-eq last-height u0)
|
|
76
|
+
u1
|
|
77
|
+
(if (<= (- current-height last-height) streak-max-window)
|
|
78
|
+
(+ current-streak u1)
|
|
79
|
+
u1
|
|
80
|
+
)
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
(bonus (* streak-bonus new-streak))
|
|
85
|
+
(total-mint (+ base-amount bonus))
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
(map-set last-claim-height user current-height)
|
|
89
|
+
(map-set streak-count user new-streak)
|
|
90
|
+
|
|
91
|
+
(contract-call?
|
|
92
|
+
.token-poin-v3
|
|
93
|
+
mint
|
|
94
|
+
total-mint
|
|
95
|
+
user
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
)
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
(define-public (ping-17)
|
|
102
|
+
(ok true))
|
|
103
|
+
|
|
104
|
+
(define-public (ping-70)
|
|
105
|
+
(ok true))
|
|
106
|
+
|
|
107
|
+
(define-public (ping-16)
|
|
108
|
+
(ok true))
|
|
109
|
+
|
|
110
|
+
(define-public (ping-110)
|
|
111
|
+
(ok true))
|
|
112
|
+
|
|
113
|
+
(define-public (ping-83)
|
|
114
|
+
(ok true))
|
|
115
|
+
|
|
116
|
+
(define-public (ping-167)
|
|
117
|
+
(ok true))
|
|
118
|
+
|
|
119
|
+
(define-public (ping-185)
|
|
120
|
+
(ok true))
|
|
121
|
+
|
|
122
|
+
(define-public (ping-265)
|
|
123
|
+
(ok true))
|
|
124
|
+
|
|
125
|
+
(define-public (ping-5)
|
|
126
|
+
(ok true))
|
|
127
|
+
|
|
128
|
+
(define-public (ping-190)
|
|
129
|
+
(ok true))
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
(define-constant err-too-early (err u200))
|
|
2
|
+
|
|
3
|
+
(define-constant base-amount u100000000)
|
|
4
|
+
(define-constant streak-bonus u10000000)
|
|
5
|
+
|
|
6
|
+
(define-constant cooldown-blocks u48)
|
|
7
|
+
(define-constant streak-window u144)
|
|
8
|
+
|
|
9
|
+
(define-map last-claim principal uint)
|
|
10
|
+
(define-map streak principal uint)
|
|
11
|
+
|
|
12
|
+
(define-read-only (get-user-status (user principal))
|
|
13
|
+
(let
|
|
14
|
+
(
|
|
15
|
+
(current burn-block-height)
|
|
16
|
+
(last (default-to u0 (map-get? last-claim user)))
|
|
17
|
+
(current-streak (default-to u0 (map-get? streak user)))
|
|
18
|
+
(next (+ last cooldown-blocks))
|
|
19
|
+
)
|
|
20
|
+
{
|
|
21
|
+
current-block: current,
|
|
22
|
+
next-claim-block: next,
|
|
23
|
+
blocks-left:
|
|
24
|
+
(if (>= current next)
|
|
25
|
+
u0
|
|
26
|
+
(- next current)
|
|
27
|
+
),
|
|
28
|
+
streak: current-streak
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
(define-public (claim)
|
|
34
|
+
(let
|
|
35
|
+
(
|
|
36
|
+
(user tx-sender)
|
|
37
|
+
(current burn-block-height)
|
|
38
|
+
(last (default-to u0 (map-get? last-claim user)))
|
|
39
|
+
(current-streak (default-to u0 (map-get? streak user)))
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
(asserts!
|
|
43
|
+
(or (is-eq last u0)
|
|
44
|
+
(>= current (+ last cooldown-blocks))
|
|
45
|
+
)
|
|
46
|
+
err-too-early
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
(let
|
|
50
|
+
(
|
|
51
|
+
(new-streak
|
|
52
|
+
(if (<= (- current last) streak-window)
|
|
53
|
+
(+ current-streak u1)
|
|
54
|
+
u1
|
|
55
|
+
)
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
(bonus (* streak-bonus new-streak))
|
|
59
|
+
(total (+ base-amount bonus))
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
(map-set last-claim user current)
|
|
63
|
+
(map-set streak user new-streak)
|
|
64
|
+
|
|
65
|
+
(contract-call? .token-poin-v4 mint total user)
|
|
66
|
+
)
|
|
67
|
+
)
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
(define-public (ping-106)
|
|
71
|
+
(ok true))
|
|
72
|
+
|
|
73
|
+
(define-public (ping-86)
|
|
74
|
+
(ok true))
|
|
75
|
+
|
|
76
|
+
(define-public (ping-140)
|
|
77
|
+
(ok true))
|
|
78
|
+
|
|
79
|
+
(define-public (ping-23)
|
|
80
|
+
(ok true))
|
|
81
|
+
|
|
82
|
+
(define-public (ping-176)
|
|
83
|
+
(ok true))
|
|
84
|
+
|
|
85
|
+
(define-public (ping-37)
|
|
86
|
+
(ok true))
|