@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,288 @@
|
|
|
1
|
+
|
|
2
|
+
(define-read-only (get-random-83)
|
|
3
|
+
(ok u83))
|
|
4
|
+
|
|
5
|
+
(define-read-only (get-random-86)
|
|
6
|
+
(ok u86))
|
|
7
|
+
|
|
8
|
+
(define-read-only (get-random-66)
|
|
9
|
+
(ok u66))
|
|
10
|
+
|
|
11
|
+
(define-read-only (get-random-81)
|
|
12
|
+
(ok u81))
|
|
13
|
+
|
|
14
|
+
(define-read-only (get-random-150)
|
|
15
|
+
(ok u150))
|
|
16
|
+
|
|
17
|
+
(define-public (ping-45)
|
|
18
|
+
(ok true))
|
|
19
|
+
|
|
20
|
+
(define-read-only (get-random-65)
|
|
21
|
+
(ok u65))
|
|
22
|
+
|
|
23
|
+
(define-read-only (get-random-132)
|
|
24
|
+
(ok u132))
|
|
25
|
+
|
|
26
|
+
(define-read-only (get-random-136)
|
|
27
|
+
(ok u136))
|
|
28
|
+
|
|
29
|
+
(define-read-only (get-random-141)
|
|
30
|
+
(ok u141))
|
|
31
|
+
|
|
32
|
+
(define-read-only (get-random-50)
|
|
33
|
+
(ok u50))
|
|
34
|
+
|
|
35
|
+
(define-read-only (get-random-91)
|
|
36
|
+
(ok u91))
|
|
37
|
+
|
|
38
|
+
(define-read-only (get-random-108)
|
|
39
|
+
(ok u108))
|
|
40
|
+
|
|
41
|
+
(define-public (ping-140)
|
|
42
|
+
(ok true))
|
|
43
|
+
|
|
44
|
+
(define-read-only (get-random-6)
|
|
45
|
+
(ok u6))
|
|
46
|
+
|
|
47
|
+
(define-read-only (get-random-19)
|
|
48
|
+
(ok u19))
|
|
49
|
+
|
|
50
|
+
(define-read-only (get-random-13)
|
|
51
|
+
(ok u13))
|
|
52
|
+
|
|
53
|
+
(define-public (ping-68)
|
|
54
|
+
(ok true))
|
|
55
|
+
|
|
56
|
+
(define-read-only (get-random-76)
|
|
57
|
+
(ok u76))
|
|
58
|
+
|
|
59
|
+
(define-read-only (get-random-83)
|
|
60
|
+
(ok u83))
|
|
61
|
+
|
|
62
|
+
(define-public (ping-6)
|
|
63
|
+
(ok true))
|
|
64
|
+
|
|
65
|
+
(define-read-only (get-random-29)
|
|
66
|
+
(ok u29))
|
|
67
|
+
|
|
68
|
+
(define-public (ping-51)
|
|
69
|
+
(ok true))
|
|
70
|
+
|
|
71
|
+
(define-read-only (get-random-28)
|
|
72
|
+
(ok u28))
|
|
73
|
+
|
|
74
|
+
(define-public (ping-27)
|
|
75
|
+
(ok true))
|
|
76
|
+
|
|
77
|
+
(define-read-only (get-random-13)
|
|
78
|
+
(ok u13))
|
|
79
|
+
|
|
80
|
+
(define-read-only (get-random-85)
|
|
81
|
+
(ok u85))
|
|
82
|
+
|
|
83
|
+
(define-read-only (get-random-88)
|
|
84
|
+
(ok u88))
|
|
85
|
+
|
|
86
|
+
(define-read-only (get-random-37)
|
|
87
|
+
(ok u37))
|
|
88
|
+
|
|
89
|
+
(define-read-only (get-random-29)
|
|
90
|
+
(ok u29))
|
|
91
|
+
|
|
92
|
+
(define-read-only (get-random-71)
|
|
93
|
+
(ok u71))
|
|
94
|
+
|
|
95
|
+
(define-read-only (get-random-84)
|
|
96
|
+
(ok u84))
|
|
97
|
+
|
|
98
|
+
(define-read-only (get-random-96)
|
|
99
|
+
(ok u96))
|
|
100
|
+
|
|
101
|
+
(define-read-only (get-random-5)
|
|
102
|
+
(ok u5))
|
|
103
|
+
|
|
104
|
+
(define-read-only (get-random-2)
|
|
105
|
+
(ok u2))
|
|
106
|
+
|
|
107
|
+
(define-read-only (get-random-139)
|
|
108
|
+
(ok u139))
|
|
109
|
+
|
|
110
|
+
(define-read-only (get-random-238)
|
|
111
|
+
(ok u238))
|
|
112
|
+
|
|
113
|
+
(define-read-only (get-random-261)
|
|
114
|
+
(ok u261))
|
|
115
|
+
|
|
116
|
+
(define-read-only (get-random-10)
|
|
117
|
+
(ok u10))
|
|
118
|
+
|
|
119
|
+
(define-read-only (get-random-13)
|
|
120
|
+
(ok u13))
|
|
121
|
+
|
|
122
|
+
(define-read-only (get-random-33)
|
|
123
|
+
(ok u33))
|
|
124
|
+
|
|
125
|
+
(define-read-only (get-random-61)
|
|
126
|
+
(ok u61))
|
|
127
|
+
|
|
128
|
+
(define-read-only (get-random-191)
|
|
129
|
+
(ok u191))
|
|
130
|
+
|
|
131
|
+
(define-read-only (get-random-6)
|
|
132
|
+
(ok u6))
|
|
133
|
+
|
|
134
|
+
(define-read-only (get-random-81)
|
|
135
|
+
(ok u81))
|
|
136
|
+
|
|
137
|
+
(define-read-only (get-random-91)
|
|
138
|
+
(ok u91))
|
|
139
|
+
|
|
140
|
+
(define-read-only (get-random-92)
|
|
141
|
+
(ok u92))
|
|
142
|
+
|
|
143
|
+
(define-read-only (get-random-108)
|
|
144
|
+
(ok u108))
|
|
145
|
+
|
|
146
|
+
(define-read-only (get-random-141)
|
|
147
|
+
(ok u141))
|
|
148
|
+
|
|
149
|
+
(define-read-only (get-random-5)
|
|
150
|
+
(ok u5))
|
|
151
|
+
|
|
152
|
+
(define-read-only (get-random-48)
|
|
153
|
+
(ok u48))
|
|
154
|
+
|
|
155
|
+
(define-read-only (get-random-59)
|
|
156
|
+
(ok u59))
|
|
157
|
+
|
|
158
|
+
(define-read-only (get-random-97)
|
|
159
|
+
(ok u97))
|
|
160
|
+
|
|
161
|
+
(define-read-only (get-random-4)
|
|
162
|
+
(ok u4))
|
|
163
|
+
|
|
164
|
+
(define-read-only (get-random-75)
|
|
165
|
+
(ok u75))
|
|
166
|
+
|
|
167
|
+
(define-read-only (get-random-28)
|
|
168
|
+
(ok u28))
|
|
169
|
+
|
|
170
|
+
(define-read-only (get-random-58)
|
|
171
|
+
(ok u58))
|
|
172
|
+
|
|
173
|
+
(define-read-only (get-random-59)
|
|
174
|
+
(ok u59))
|
|
175
|
+
|
|
176
|
+
(define-read-only (get-random-125)
|
|
177
|
+
(ok u125))
|
|
178
|
+
|
|
179
|
+
(define-public (ping-163)
|
|
180
|
+
(ok true))
|
|
181
|
+
|
|
182
|
+
(define-read-only (get-random-199)
|
|
183
|
+
(ok u199))
|
|
184
|
+
|
|
185
|
+
(define-read-only (get-random-202)
|
|
186
|
+
(ok u202))
|
|
187
|
+
|
|
188
|
+
(define-read-only (get-random-44)
|
|
189
|
+
(ok u44))
|
|
190
|
+
|
|
191
|
+
(define-read-only (get-random-1)
|
|
192
|
+
(ok u1))
|
|
193
|
+
|
|
194
|
+
(define-read-only (get-random-25)
|
|
195
|
+
(ok u25))
|
|
196
|
+
|
|
197
|
+
(define-read-only (get-random-28)
|
|
198
|
+
(ok u28))
|
|
199
|
+
|
|
200
|
+
(define-read-only (get-random-44)
|
|
201
|
+
(ok u44))
|
|
202
|
+
|
|
203
|
+
(define-read-only (get-random-51)
|
|
204
|
+
(ok u51))
|
|
205
|
+
|
|
206
|
+
(define-public (ping-122)
|
|
207
|
+
(ok true))
|
|
208
|
+
|
|
209
|
+
(define-public (ping-147)
|
|
210
|
+
(ok true))
|
|
211
|
+
|
|
212
|
+
(define-read-only (get-random-204)
|
|
213
|
+
(ok u204))
|
|
214
|
+
|
|
215
|
+
(define-read-only (get-random-248)
|
|
216
|
+
(ok u248))
|
|
217
|
+
|
|
218
|
+
(define-read-only (get-random-19)
|
|
219
|
+
(ok u19))
|
|
220
|
+
|
|
221
|
+
(define-read-only (get-random-26)
|
|
222
|
+
(ok u26))
|
|
223
|
+
|
|
224
|
+
(define-read-only (get-random-27)
|
|
225
|
+
(ok u27))
|
|
226
|
+
|
|
227
|
+
(define-read-only (get-random-141)
|
|
228
|
+
(ok u141))
|
|
229
|
+
|
|
230
|
+
(define-read-only (get-random-238)
|
|
231
|
+
(ok u238))
|
|
232
|
+
|
|
233
|
+
(define-read-only (get-random-12)
|
|
234
|
+
(ok u12))
|
|
235
|
+
|
|
236
|
+
(define-read-only (get-random-20)
|
|
237
|
+
(ok u20))
|
|
238
|
+
|
|
239
|
+
(define-read-only (get-random-47)
|
|
240
|
+
(ok u47))
|
|
241
|
+
|
|
242
|
+
(define-read-only (get-random-105)
|
|
243
|
+
(ok u105))
|
|
244
|
+
|
|
245
|
+
(define-read-only (get-random-143)
|
|
246
|
+
(ok u143))
|
|
247
|
+
|
|
248
|
+
(define-read-only (get-random-156)
|
|
249
|
+
(ok u156))
|
|
250
|
+
|
|
251
|
+
(define-read-only (get-random-172)
|
|
252
|
+
(ok u172))
|
|
253
|
+
|
|
254
|
+
(define-read-only (get-random-183)
|
|
255
|
+
(ok u183))
|
|
256
|
+
|
|
257
|
+
(define-public (ping-202)
|
|
258
|
+
(ok true))
|
|
259
|
+
|
|
260
|
+
(define-read-only (get-random-212)
|
|
261
|
+
(ok u212))
|
|
262
|
+
|
|
263
|
+
(define-read-only (get-random-240)
|
|
264
|
+
(ok u240))
|
|
265
|
+
|
|
266
|
+
(define-read-only (get-random-54)
|
|
267
|
+
(ok u54))
|
|
268
|
+
|
|
269
|
+
(define-read-only (get-random-73)
|
|
270
|
+
(ok u73))
|
|
271
|
+
|
|
272
|
+
(define-read-only (get-random-52)
|
|
273
|
+
(ok u52))
|
|
274
|
+
|
|
275
|
+
(define-read-only (get-random-145)
|
|
276
|
+
(ok u145))
|
|
277
|
+
|
|
278
|
+
(define-read-only (get-random-250)
|
|
279
|
+
(ok u250))
|
|
280
|
+
|
|
281
|
+
(define-read-only (get-random-282)
|
|
282
|
+
(ok u282))
|
|
283
|
+
|
|
284
|
+
(define-read-only (get-random-132)
|
|
285
|
+
(ok u132))
|
|
286
|
+
|
|
287
|
+
(define-read-only (get-random-135)
|
|
288
|
+
(ok u135))
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
;; ===============================
|
|
2
|
+
;; GENESIS BOOST V1
|
|
3
|
+
;; Modular XP Lock System
|
|
4
|
+
;; ===============================
|
|
5
|
+
|
|
6
|
+
(define-map locked-xp
|
|
7
|
+
principal
|
|
8
|
+
uint
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
(define-map boost-level
|
|
12
|
+
principal
|
|
13
|
+
uint
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
(define-read-only (get-locked (user principal))
|
|
17
|
+
(default-to u0 (map-get? locked-xp user))
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
(define-read-only (get-boost (user principal))
|
|
21
|
+
(default-to u0 (map-get? boost-level user))
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
;; Lock XP (simulated)
|
|
25
|
+
(define-public (lock-xp (amount uint))
|
|
26
|
+
(let (
|
|
27
|
+
(current (default-to u0 (map-get? locked-xp tx-sender)))
|
|
28
|
+
)
|
|
29
|
+
(map-set locked-xp tx-sender (+ current amount))
|
|
30
|
+
(map-set boost-level tx-sender (+ u1 (/ amount u100)))
|
|
31
|
+
(ok true)
|
|
32
|
+
)
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
;; Unlock XP
|
|
36
|
+
(define-public (unlock-xp)
|
|
37
|
+
(begin
|
|
38
|
+
(map-delete locked-xp tx-sender)
|
|
39
|
+
(map-delete boost-level tx-sender)
|
|
40
|
+
(ok true)
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
(define-public (ping-78)
|
|
45
|
+
(ok true))
|
|
46
|
+
|
|
47
|
+
(define-public (ping-14)
|
|
48
|
+
(ok true))
|
|
49
|
+
|
|
50
|
+
(define-public (ping-133)
|
|
51
|
+
(ok true))
|
|
52
|
+
|
|
53
|
+
(define-public (ping-26)
|
|
54
|
+
(ok true))
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
;; genesis-badges-v10.clar
|
|
2
|
+
(impl-trait 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait)
|
|
3
|
+
|
|
4
|
+
(define-non-fungible-token genesis-badge uint)
|
|
5
|
+
|
|
6
|
+
(define-constant err-admin-only (err u100))
|
|
7
|
+
(define-constant err-not-token-owner (err u101))
|
|
8
|
+
(define-constant err-not-authorized (err u102))
|
|
9
|
+
|
|
10
|
+
(define-data-var admin principal tx-sender)
|
|
11
|
+
(define-data-var game-core-address principal tx-sender)
|
|
12
|
+
(define-data-var last-token-id uint u0)
|
|
13
|
+
|
|
14
|
+
(define-map token-uri uint (string-ascii 256))
|
|
15
|
+
|
|
16
|
+
(define-public (set-game-core (new-core principal))
|
|
17
|
+
(begin
|
|
18
|
+
(asserts! (is-eq tx-sender (var-get admin)) err-admin-only)
|
|
19
|
+
(var-set game-core-address new-core)
|
|
20
|
+
(ok true)))
|
|
21
|
+
|
|
22
|
+
(define-public (transfer-admin (new-admin principal))
|
|
23
|
+
(begin
|
|
24
|
+
(asserts! (is-eq tx-sender (var-get admin)) err-admin-only)
|
|
25
|
+
(var-set admin new-admin)
|
|
26
|
+
(ok true)))
|
|
27
|
+
|
|
28
|
+
(define-public (mint-badge (recipient principal) (uri (string-ascii 256)))
|
|
29
|
+
(let ((token-id (+ (var-get last-token-id) u1)))
|
|
30
|
+
(asserts! (is-eq tx-sender (var-get game-core-address)) err-not-authorized)
|
|
31
|
+
(try! (nft-mint? genesis-badge token-id recipient))
|
|
32
|
+
(map-set token-uri token-id uri)
|
|
33
|
+
(var-set last-token-id token-id)
|
|
34
|
+
(ok token-id)))
|
|
35
|
+
|
|
36
|
+
(define-read-only (get-last-token-id) (ok (var-get last-token-id)))
|
|
37
|
+
(define-read-only (get-token-uri (token-id uint)) (ok (map-get? token-uri token-id)))
|
|
38
|
+
(define-read-only (get-owner (token-id uint)) (ok (nft-get-owner? genesis-badge token-id)))
|
|
39
|
+
(define-public (transfer (token-id uint) (sender principal) (recipient principal))
|
|
40
|
+
(begin
|
|
41
|
+
(asserts! (is-eq tx-sender sender) err-not-token-owner)
|
|
42
|
+
(nft-transfer? genesis-badge token-id sender recipient)))
|
|
43
|
+
|
|
44
|
+
(define-public (ping-112)
|
|
45
|
+
(ok true))
|
|
46
|
+
|
|
47
|
+
(define-public (ping-54)
|
|
48
|
+
(ok true))
|
|
49
|
+
|
|
50
|
+
(define-public (ping-10)
|
|
51
|
+
(ok true))
|
|
52
|
+
|
|
53
|
+
(define-public (ping-50)
|
|
54
|
+
(ok true))
|
|
55
|
+
|
|
56
|
+
(define-public (ping-4)
|
|
57
|
+
(ok true))
|
|
58
|
+
|
|
59
|
+
(define-public (ping-86)
|
|
60
|
+
(ok true))
|
|
61
|
+
|
|
62
|
+
(define-public (ping-124)
|
|
63
|
+
(ok true))
|
|
64
|
+
|
|
65
|
+
(define-public (ping-8)
|
|
66
|
+
(ok true))
|
|
67
|
+
|
|
68
|
+
(define-public (ping-125)
|
|
69
|
+
(ok true))
|
|
70
|
+
|
|
71
|
+
(define-public (ping-33)
|
|
72
|
+
(ok true))
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
;; genesis-badges-v3.clar
|
|
2
|
+
(impl-trait 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait)
|
|
3
|
+
|
|
4
|
+
(define-non-fungible-token genesis-badge uint)
|
|
5
|
+
|
|
6
|
+
(define-constant err-owner-only (err u100))
|
|
7
|
+
(define-constant err-not-token-owner (err u101))
|
|
8
|
+
(define-constant err-not-authorized (err u102))
|
|
9
|
+
|
|
10
|
+
(define-data-var last-token-id uint u0)
|
|
11
|
+
(define-data-var game-core-address principal tx-sender)
|
|
12
|
+
|
|
13
|
+
(define-map token-uri uint (string-ascii 256))
|
|
14
|
+
|
|
15
|
+
(define-read-only (get-last-token-id) (ok (var-get last-token-id)))
|
|
16
|
+
(define-read-only (get-token-uri (token-id uint)) (ok (map-get? token-uri token-id)))
|
|
17
|
+
(define-read-only (get-owner (token-id uint)) (ok (nft-get-owner? genesis-badge token-id)))
|
|
18
|
+
|
|
19
|
+
(define-public (transfer (token-id uint) (sender principal) (recipient principal))
|
|
20
|
+
(begin
|
|
21
|
+
(asserts! (is-eq tx-sender sender) err-not-token-owner)
|
|
22
|
+
(nft-transfer? genesis-badge token-id sender recipient)))
|
|
23
|
+
|
|
24
|
+
(define-public (set-game-core (new-core principal))
|
|
25
|
+
(begin
|
|
26
|
+
(asserts! (is-eq tx-sender (var-get game-core-address)) err-owner-only)
|
|
27
|
+
(var-set game-core-address new-core)
|
|
28
|
+
(ok true)))
|
|
29
|
+
|
|
30
|
+
(define-public (mint-badge (recipient principal) (uri (string-ascii 256)))
|
|
31
|
+
(let ((token-id (+ (var-get last-token-id) u1)))
|
|
32
|
+
(asserts! (is-eq tx-sender (var-get game-core-address)) err-not-authorized)
|
|
33
|
+
(try! (nft-mint? genesis-badge token-id recipient))
|
|
34
|
+
(map-set token-uri token-id uri)
|
|
35
|
+
(var-set last-token-id token-id)
|
|
36
|
+
(ok token-id)))
|
|
37
|
+
|
|
38
|
+
(define-public (ping-146)
|
|
39
|
+
(ok true))
|
|
40
|
+
|
|
41
|
+
(define-public (ping-12)
|
|
42
|
+
(ok true))
|
|
43
|
+
|
|
44
|
+
(define-public (ping-114)
|
|
45
|
+
(ok true))
|
|
46
|
+
|
|
47
|
+
(define-public (ping-61)
|
|
48
|
+
(ok true))
|
|
49
|
+
|
|
50
|
+
(define-public (ping-29)
|
|
51
|
+
(ok true))
|
|
52
|
+
|
|
53
|
+
(define-public (ping-129)
|
|
54
|
+
(ok true))
|
|
55
|
+
|
|
56
|
+
(define-public (ping-66)
|
|
57
|
+
(ok true))
|
|
58
|
+
|
|
59
|
+
(define-public (ping-120)
|
|
60
|
+
(ok true))
|
|
61
|
+
|
|
62
|
+
(define-public (ping-2)
|
|
63
|
+
(ok true))
|
|
64
|
+
|
|
65
|
+
(define-public (ping-5)
|
|
66
|
+
(ok true))
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
;; genesis-badges-v5.clar
|
|
2
|
+
;; Standar SIP-009 NFT dengan sistem Admin yang aman
|
|
3
|
+
(impl-trait 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait)
|
|
4
|
+
|
|
5
|
+
(define-non-fungible-token genesis-badge uint)
|
|
6
|
+
|
|
7
|
+
;; Error Codes
|
|
8
|
+
(define-constant err-admin-only (err u100))
|
|
9
|
+
(define-constant err-not-token-owner (err u101))
|
|
10
|
+
(define-constant err-not-authorized (err u102))
|
|
11
|
+
|
|
12
|
+
;; Data Vars
|
|
13
|
+
(define-data-var admin principal tx-sender) ;; Wallet Anda sebagai Admin permanen
|
|
14
|
+
(define-data-var game-core-address principal tx-sender) ;; Alamat kontrak Core v5
|
|
15
|
+
(define-data-var last-token-id uint u0)
|
|
16
|
+
|
|
17
|
+
;; Mapping Metadata
|
|
18
|
+
(define-map token-uri uint (string-ascii 256))
|
|
19
|
+
|
|
20
|
+
;; --- ADMINISTRATIVE FUNCTIONS ---
|
|
21
|
+
|
|
22
|
+
;; Hanya Admin (Wallet) yang bisa mengganti Game Core
|
|
23
|
+
(define-public (set-game-core (new-core principal))
|
|
24
|
+
(begin
|
|
25
|
+
(asserts! (is-eq tx-sender (var-get admin)) err-admin-only)
|
|
26
|
+
(var-set game-core-address new-core)
|
|
27
|
+
(ok true)))
|
|
28
|
+
|
|
29
|
+
;; Jika ingin mengganti wallet admin di masa depan
|
|
30
|
+
(define-public (transfer-admin (new-admin principal))
|
|
31
|
+
(begin
|
|
32
|
+
(asserts! (is-eq tx-sender (var-get admin)) err-admin-only)
|
|
33
|
+
(var-set admin new-admin)
|
|
34
|
+
(ok true)))
|
|
35
|
+
|
|
36
|
+
;; --- CORE FUNCTIONS ---
|
|
37
|
+
|
|
38
|
+
(define-public (mint-badge (recipient principal) (uri (string-ascii 256)))
|
|
39
|
+
(let ((token-id (+ (var-get last-token-id) u1)))
|
|
40
|
+
;; Hanya Game Core yang diizinkan untuk memanggil fungsi ini
|
|
41
|
+
(asserts! (is-eq tx-sender (var-get game-core-address)) err-not-authorized)
|
|
42
|
+
|
|
43
|
+
(try! (nft-mint? genesis-badge token-id recipient))
|
|
44
|
+
(map-set token-uri token-id uri)
|
|
45
|
+
(var-set last-token-id token-id)
|
|
46
|
+
(ok token-id)))
|
|
47
|
+
|
|
48
|
+
;; --- SIP-009 STANDARD FUNCTIONS ---
|
|
49
|
+
|
|
50
|
+
(define-read-only (get-last-token-id) (ok (var-get last-token-id)))
|
|
51
|
+
(define-read-only (get-token-uri (token-id uint)) (ok (map-get? token-uri token-id)))
|
|
52
|
+
(define-read-only (get-owner (token-id uint)) (ok (nft-get-owner? genesis-badge token-id)))
|
|
53
|
+
|
|
54
|
+
(define-public (transfer (token-id uint) (sender principal) (recipient principal))
|
|
55
|
+
(begin
|
|
56
|
+
(asserts! (is-eq tx-sender sender) err-not-token-owner)
|
|
57
|
+
(nft-transfer? genesis-badge token-id sender recipient)))
|
|
58
|
+
|
|
59
|
+
(define-public (ping-50)
|
|
60
|
+
(ok true))
|
|
61
|
+
|
|
62
|
+
(define-public (ping-62)
|
|
63
|
+
(ok true))
|
|
64
|
+
|
|
65
|
+
(define-public (ping-122)
|
|
66
|
+
(ok true))
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
;; genesis-badges-v8.clar
|
|
2
|
+
(impl-trait 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait)
|
|
3
|
+
|
|
4
|
+
(define-non-fungible-token genesis-badge uint)
|
|
5
|
+
|
|
6
|
+
;; Error Codes
|
|
7
|
+
(define-constant err-admin-only (err u100))
|
|
8
|
+
(define-constant err-not-token-owner (err u101))
|
|
9
|
+
(define-constant err-not-authorized (err u102))
|
|
10
|
+
|
|
11
|
+
;; Data Vars
|
|
12
|
+
(define-data-var admin principal tx-sender) ;; Wallet Anda (Admin Permanen)
|
|
13
|
+
(define-data-var game-core-address principal tx-sender) ;; Kontrak Core yang diizinkan mint
|
|
14
|
+
(define-data-var last-token-id uint u0)
|
|
15
|
+
|
|
16
|
+
(define-map token-uri uint (string-ascii 256))
|
|
17
|
+
|
|
18
|
+
;; --- ADMINISTRATIVE FUNCTIONS (FLEKSIBEL) ---
|
|
19
|
+
|
|
20
|
+
;; Mengganti kontrak Core yang diizinkan melakukan mint
|
|
21
|
+
(define-public (set-game-core (new-core principal))
|
|
22
|
+
(begin
|
|
23
|
+
(asserts! (is-eq tx-sender (var-get admin)) err-admin-only)
|
|
24
|
+
(var-set game-core-address new-core)
|
|
25
|
+
(ok true)))
|
|
26
|
+
|
|
27
|
+
;; Memindahkan hak admin ke wallet lain (misal jika ganti wallet)
|
|
28
|
+
(define-public (transfer-admin (new-admin principal))
|
|
29
|
+
(begin
|
|
30
|
+
(asserts! (is-eq tx-sender (var-get admin)) err-admin-only)
|
|
31
|
+
(var-set admin new-admin)
|
|
32
|
+
(ok true)))
|
|
33
|
+
|
|
34
|
+
;; --- CORE FUNCTIONS ---
|
|
35
|
+
|
|
36
|
+
(define-public (mint-badge (recipient principal) (uri (string-ascii 256)))
|
|
37
|
+
(let ((token-id (+ (var-get last-token-id) u1)))
|
|
38
|
+
;; Cek apakah pemanggil adalah Game Core yang sah
|
|
39
|
+
(asserts! (is-eq tx-sender (var-get game-core-address)) err-not-authorized)
|
|
40
|
+
(try! (nft-mint? genesis-badge token-id recipient))
|
|
41
|
+
(map-set token-uri token-id uri)
|
|
42
|
+
(var-set last-token-id token-id)
|
|
43
|
+
(ok token-id)))
|
|
44
|
+
|
|
45
|
+
;; --- SIP-009 STANDARD FUNCTIONS ---
|
|
46
|
+
(define-read-only (get-last-token-id) (ok (var-get last-token-id)))
|
|
47
|
+
(define-read-only (get-token-uri (token-id uint)) (ok (map-get? token-uri token-id)))
|
|
48
|
+
(define-read-only (get-owner (token-id uint)) (ok (nft-get-owner? genesis-badge token-id)))
|
|
49
|
+
(define-public (transfer (token-id uint) (sender principal) (recipient principal))
|
|
50
|
+
(begin
|
|
51
|
+
(asserts! (is-eq tx-sender sender) err-not-token-owner)
|
|
52
|
+
(nft-transfer? genesis-badge token-id sender recipient)))
|
|
53
|
+
|
|
54
|
+
(define-public (ping-25)
|
|
55
|
+
(ok true))
|
|
56
|
+
|
|
57
|
+
(define-public (ping-93)
|
|
58
|
+
(ok true))
|
|
59
|
+
|
|
60
|
+
(define-public (ping-11)
|
|
61
|
+
(ok true))
|
|
62
|
+
|
|
63
|
+
(define-public (ping-94)
|
|
64
|
+
(ok true))
|
|
65
|
+
|
|
66
|
+
(define-public (ping-19)
|
|
67
|
+
(ok true))
|
|
68
|
+
|
|
69
|
+
(define-public (ping-35)
|
|
70
|
+
(ok true))
|
|
71
|
+
|
|
72
|
+
(define-public (ping-22)
|
|
73
|
+
(ok true))
|
|
74
|
+
|
|
75
|
+
(define-public (ping-88)
|
|
76
|
+
(ok true))
|
|
77
|
+
|
|
78
|
+
(define-public (ping-95)
|
|
79
|
+
(ok true))
|
|
80
|
+
|
|
81
|
+
(define-public (ping-97)
|
|
82
|
+
(ok true))
|
|
83
|
+
|
|
84
|
+
(define-public (ping-114)
|
|
85
|
+
(ok true))
|
|
86
|
+
|
|
87
|
+
(define-public (ping-87)
|
|
88
|
+
(ok true))
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
;; genesis-badges-v9.clar
|
|
2
|
+
(use-trait nft-trait 'SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait.nft-trait)
|
|
3
|
+
(impl-trait nft-trait)
|
|
4
|
+
|
|
5
|
+
(define-non-fungible-token genesis-badge uint)
|
|
6
|
+
|
|
7
|
+
;; Error Codes
|
|
8
|
+
(define-constant err-admin-only (err u100))
|
|
9
|
+
(define-constant err-not-token-owner (err u101))
|
|
10
|
+
(define-constant err-not-authorized (err u102))
|
|
11
|
+
|
|
12
|
+
;; Data Vars
|
|
13
|
+
(define-data-var admin principal tx-sender)
|
|
14
|
+
(define-data-var game-core-address principal tx-sender)
|
|
15
|
+
(define-data-var last-token-id uint u0)
|
|
16
|
+
|
|
17
|
+
(define-map token-uri uint (string-ascii 256))
|
|
18
|
+
|
|
19
|
+
;; --- ADMINISTRATIVE ---
|
|
20
|
+
(define-public (set-game-core (new-core principal))
|
|
21
|
+
(begin
|
|
22
|
+
(asserts! (is-eq tx-sender (var-get admin)) err-admin-only)
|
|
23
|
+
(var-set game-core-address new-core)
|
|
24
|
+
(ok true)))
|
|
25
|
+
|
|
26
|
+
(define-public (transfer-admin (new-admin principal))
|
|
27
|
+
(begin
|
|
28
|
+
(asserts! (is-eq tx-sender (var-get admin)) err-admin-only)
|
|
29
|
+
(var-set admin new-admin)
|
|
30
|
+
(ok true)))
|
|
31
|
+
|
|
32
|
+
;; --- CORE FUNCTIONS ---
|
|
33
|
+
(define-public (mint-badge (recipient principal) (uri (string-ascii 256)))
|
|
34
|
+
(let ((token-id (+ (var-get last-token-id) u1)))
|
|
35
|
+
(asserts! (is-eq tx-sender (var-get game-core-address)) err-not-authorized)
|
|
36
|
+
(try! (nft-mint? genesis-badge token-id recipient))
|
|
37
|
+
(map-set token-uri token-id uri)
|
|
38
|
+
(var-set last-token-id token-id)
|
|
39
|
+
(ok token-id)))
|
|
40
|
+
|
|
41
|
+
;; --- SIP-009 STANDARD ---
|
|
42
|
+
(define-read-only (get-last-token-id) (ok (var-get last-token-id)))
|
|
43
|
+
(define-read-only (get-token-uri (token-id uint)) (ok (map-get? token-uri token-id)))
|
|
44
|
+
(define-read-only (get-owner (token-id uint)) (ok (nft-get-owner? genesis-badge token-id)))
|
|
45
|
+
(define-public (transfer (token-id uint) (sender principal) (recipient principal))
|
|
46
|
+
(begin
|
|
47
|
+
(asserts! (is-eq tx-sender sender) err-not-token-owner)
|
|
48
|
+
(nft-transfer? genesis-badge token-id sender recipient)))
|
|
49
|
+
|
|
50
|
+
(define-public (ping-189)
|
|
51
|
+
(ok true))
|
|
52
|
+
|
|
53
|
+
(define-public (ping-86)
|
|
54
|
+
(ok true))
|
|
55
|
+
|
|
56
|
+
(define-public (ping-165)
|
|
57
|
+
(ok true))
|
|
58
|
+
|
|
59
|
+
(define-public (ping-78)
|
|
60
|
+
(ok true))
|
|
61
|
+
|
|
62
|
+
(define-public (ping-20)
|
|
63
|
+
(ok true))
|
|
64
|
+
|
|
65
|
+
(define-public (ping-197)
|
|
66
|
+
(ok true))
|