@wkalidev/trivia-quest-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,119 @@
1
+ # Trivia Q ๐ŸŽฎ
2
+
3
+ > Play. Learn. Earn on Celo.
4
+
5
+ Trivia Q is a blockchain-powered quiz game built on Celo where players earn real CELO rewards by answering questions about African culture, geography, Web3, science, sports, and general knowledge.
6
+
7
+ ## ๐ŸŒ Why Africa?
8
+
9
+ Celo's mission is financial inclusion for the unbanked. With 57% of African adults lacking bank accounts but owning smartphones, MiniPay is the perfect gateway. Trivia Q brings fun, education, and real micro-rewards to this audience.
10
+
11
+ ## ๐Ÿš€ Live Demo
12
+
13
+ ๐Ÿ‘‰ [trivia-quest-eight.vercel.app](https://trivia-quest-eight.vercel.app)
14
+
15
+ ## ๐ŸŽฎ Game Features
16
+
17
+ - โœ… 446 questions dans 6 catรฉgories
18
+ - โœ… 10 questions alรฉatoires par partie
19
+ - โœ… Timer de 15 secondes par question
20
+ - โœ… Systรจme de Streak x2 / x3 multiplicateur de points
21
+ - โœ… Animations Framer Motion
22
+ - โœ… Sons & feedback audio (๐Ÿ”Š/๐Ÿ”‡ toggle)
23
+ - โœ… Leaderboard on-chain en temps rรฉel
24
+ - โœ… Support 4 langues : ๐Ÿ‡ซ๐Ÿ‡ท FR / ๐Ÿ‡ฌ๐Ÿ‡ง EN / ๐Ÿ‡ช๐Ÿ‡ธ ES / ๐Ÿ‡ฎ๐Ÿ‡น IT
25
+ - โœ… MiniPay compatible (dรฉtection automatique)
26
+ - โœ… PWA installable sur Android
27
+
28
+ ## ๐Ÿ“š Question Categories
29
+
30
+ | Catรฉgorie | Nb questions |
31
+ |---|---|
32
+ | ๐ŸŒ Gรฉographie Africaine | ~80 |
33
+ | ๐Ÿ’ฐ Web3 & Crypto | ~100 |
34
+ | ๐Ÿ“– Histoire & Culture | ~60 |
35
+ | ๐Ÿ”ฌ Science & Tech | ~80 |
36
+ | โšฝ Sports | ~40 |
37
+ | ๐ŸŒ Culture Gรฉnรฉrale | ~86 |
38
+
39
+ ## ๐Ÿ—๏ธ Architecture
40
+
41
+ - **Smart Contract** โ€” Solidity 0.8.20 + OpenZeppelin sur Celo Mainnet
42
+ - **Frontend** โ€” Next.js 16 + TypeScript + TailwindCSS
43
+ - **Animations** โ€” Framer Motion
44
+ - **Wallet** โ€” RainbowKit + Wagmi + Viem + MiniPay hook
45
+ - **i18n** โ€” next-intl (FR, EN, ES, IT)
46
+ - **Deploy** โ€” Vercel
47
+
48
+ ## ๐Ÿ”— Smart Contracts
49
+
50
+ | Network | Address |
51
+ |---|---|
52
+ | Celo Mainnet | `0xb215c82de33f98b270455f21f7edb7780da0d47d` |
53
+ | Celo Sepolia (testnet) | `0x50b20728ba0ad803679b5428f267c89aede9a378` |
54
+
55
+ ## ๐Ÿ“ฑ MiniPay Compatible
56
+
57
+ Trivia Q detects MiniPay automatically and connects the wallet without any popup โ€” seamless UX for mobile users in Africa.
58
+
59
+ ## ๐Ÿ”ฅ Streak System
60
+
61
+ | Streak | Multiplicateur | Points par bonne rรฉponse |
62
+ |---|---|---|
63
+ | 0-2 | x1 | 100 pts |
64
+ | 3-4 | x2 ๐Ÿ”ฅ๐Ÿ”ฅ | 200 pts |
65
+ | 5+ | x3 ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ | 300 pts |
66
+
67
+ ## ๐Ÿ† Leaderboard On-Chain
68
+
69
+ Le leaderboard est stockรฉ directement sur la blockchain Celo. Chaque joueur accumule des points, et les 10 meilleurs sont affichรฉs en temps rรฉel.
70
+
71
+ ## ๐ŸŒ Multi-Language Support
72
+
73
+ | Language | Code |
74
+ |---|---|
75
+ | ๐Ÿ‡ซ๐Ÿ‡ท Franรงais | fr |
76
+ | ๐Ÿ‡ฌ๐Ÿ‡ง English | en |
77
+ | ๐Ÿ‡ช๐Ÿ‡ธ Espaรฑol | es |
78
+ | ๐Ÿ‡ฎ๐Ÿ‡น Italiano | it |
79
+
80
+ ## ๐Ÿ› ๏ธ Local Setup
81
+ ```bash
82
+ # Clone
83
+ git clone https://github.com/wkalidev/trivia-quest.git
84
+ cd trivia-quest
85
+
86
+ # Frontend
87
+ cd frontend
88
+ yarn install
89
+ yarn dev
90
+
91
+ # Contracts
92
+ cd ../contracts
93
+ npm install
94
+ npx hardhat compile
95
+ ```
96
+
97
+ ## ๐ŸŽฏ Proof of Ship Checklist
98
+
99
+ - โœ… Build For MiniPay โ€” MiniPay hook integrated
100
+ - โœ… Deploy On Celo โ€” Smart contract on Celo Mainnet
101
+ - โœ… Prove Your Humanity โ€” Coinbase Verification
102
+ - โœ… Submit Your Project
103
+
104
+ ## ๐Ÿ“‹ Tech Stack
105
+
106
+ | Layer | Tech |
107
+ |---|---|
108
+ | Blockchain | Celo Mainnet |
109
+ | Smart Contract | Solidity 0.8.20 + OpenZeppelin |
110
+ | Frontend | Next.js 16 + TypeScript |
111
+ | Styling | TailwindCSS |
112
+ | Animations | Framer Motion |
113
+ | Web3 | Wagmi + Viem + RainbowKit |
114
+ | i18n | next-intl |
115
+ | Deploy | Vercel |
116
+
117
+ ## ๐Ÿ‘ค Author
118
+
119
+ Built by [@wkalidev](https://github.com/wkalidev) for Celo Proof of Ship โ€” April 2026
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@wkalidev/trivia-quest-sdk",
3
+ "version": "1.0.0",
4
+ "description": "SDK for TriviaQuest - Blockchain quiz game on Celo",
5
+ "main": "sdk/index.js",
6
+ "types": "sdk/index.d.ts",
7
+ "files": [
8
+ "sdk"
9
+ ],
10
+ "scripts": {
11
+ "build:sdk": "tsc -p tsconfig.sdk.json"
12
+ },
13
+ "keywords": [
14
+ "celo",
15
+ "blockchain",
16
+ "quiz",
17
+ "web3",
18
+ "trivia",
19
+ "minipay",
20
+ "gamefi"
21
+ ],
22
+ "author": "wkalidev",
23
+ "license": "MIT",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/wkalidev/trivia-quest.git"
27
+ },
28
+ "homepage": "https://trivia-quest-eight.vercel.app",
29
+ "peerDependencies": {
30
+ "viem": "^2.0.0"
31
+ },
32
+ "devDependencies": {
33
+ "typescript": "^6.0.2"
34
+ }
35
+ }
package/sdk/index.d.ts ADDED
@@ -0,0 +1,161 @@
1
+ export declare const CONTRACT_ADDRESS_MAINNET: "0xb215c82de33f98b270455f21f7edb7780da0d47d";
2
+ export declare const CONTRACT_ADDRESS_TESTNET: "0x50b20728ba0ad803679b5428f267c89aede9a378";
3
+ export declare const CONTRACT_ABI: readonly [{
4
+ readonly name: "joinRound";
5
+ readonly type: "function";
6
+ readonly stateMutability: "payable";
7
+ readonly inputs: readonly [];
8
+ readonly outputs: readonly [];
9
+ }, {
10
+ readonly name: "getCurrentRound";
11
+ readonly type: "function";
12
+ readonly stateMutability: "view";
13
+ readonly inputs: readonly [];
14
+ readonly outputs: readonly [{
15
+ readonly type: "tuple";
16
+ readonly components: readonly [{
17
+ readonly name: "id";
18
+ readonly type: "uint256";
19
+ }, {
20
+ readonly name: "prizePool";
21
+ readonly type: "uint256";
22
+ }, {
23
+ readonly name: "startTime";
24
+ readonly type: "uint256";
25
+ }, {
26
+ readonly name: "endTime";
27
+ readonly type: "uint256";
28
+ }, {
29
+ readonly name: "winner";
30
+ readonly type: "address";
31
+ }, {
32
+ readonly name: "finished";
33
+ readonly type: "bool";
34
+ }];
35
+ }];
36
+ }, {
37
+ readonly name: "entryFee";
38
+ readonly type: "function";
39
+ readonly stateMutability: "view";
40
+ readonly inputs: readonly [];
41
+ readonly outputs: readonly [{
42
+ readonly type: "uint256";
43
+ }];
44
+ }, {
45
+ readonly name: "getLeaderboard";
46
+ readonly type: "function";
47
+ readonly stateMutability: "view";
48
+ readonly inputs: readonly [];
49
+ readonly outputs: readonly [{
50
+ readonly type: "tuple[]";
51
+ readonly components: readonly [{
52
+ readonly name: "player";
53
+ readonly type: "address";
54
+ }, {
55
+ readonly name: "totalPoints";
56
+ readonly type: "uint256";
57
+ }, {
58
+ readonly name: "bestScore";
59
+ readonly type: "uint256";
60
+ }, {
61
+ readonly name: "gamesPlayed";
62
+ readonly type: "uint256";
63
+ }];
64
+ }];
65
+ }, {
66
+ readonly name: "getPlayerStats";
67
+ readonly type: "function";
68
+ readonly stateMutability: "view";
69
+ readonly inputs: readonly [{
70
+ readonly name: "player";
71
+ readonly type: "address";
72
+ }];
73
+ readonly outputs: readonly [{
74
+ readonly type: "tuple";
75
+ readonly components: readonly [{
76
+ readonly name: "score";
77
+ readonly type: "uint256";
78
+ }, {
79
+ readonly name: "totalWinnings";
80
+ readonly type: "uint256";
81
+ }, {
82
+ readonly name: "totalPoints";
83
+ readonly type: "uint256";
84
+ }, {
85
+ readonly name: "gamesPlayed";
86
+ readonly type: "uint256";
87
+ }, {
88
+ readonly name: "bestScore";
89
+ readonly type: "uint256";
90
+ }, {
91
+ readonly name: "exists";
92
+ readonly type: "bool";
93
+ }];
94
+ }];
95
+ }, {
96
+ readonly name: "getTotalPlayers";
97
+ readonly type: "function";
98
+ readonly stateMutability: "view";
99
+ readonly inputs: readonly [];
100
+ readonly outputs: readonly [{
101
+ readonly type: "uint256";
102
+ }];
103
+ }, {
104
+ readonly name: "submitScore";
105
+ readonly type: "function";
106
+ readonly stateMutability: "nonpayable";
107
+ readonly inputs: readonly [{
108
+ readonly name: "player";
109
+ readonly type: "address";
110
+ }, {
111
+ readonly name: "score";
112
+ readonly type: "uint256";
113
+ }, {
114
+ readonly name: "points";
115
+ readonly type: "uint256";
116
+ }];
117
+ readonly outputs: readonly [];
118
+ }];
119
+ export type LeaderboardEntry = {
120
+ player: string;
121
+ totalPoints: bigint;
122
+ bestScore: bigint;
123
+ gamesPlayed: bigint;
124
+ };
125
+ export type PlayerStats = {
126
+ score: bigint;
127
+ totalWinnings: bigint;
128
+ totalPoints: bigint;
129
+ gamesPlayed: bigint;
130
+ bestScore: bigint;
131
+ exists: boolean;
132
+ };
133
+ export type Round = {
134
+ id: bigint;
135
+ prizePool: bigint;
136
+ startTime: bigint;
137
+ endTime: bigint;
138
+ winner: string;
139
+ finished: boolean;
140
+ };
141
+ export declare function isMiniPay(): boolean;
142
+ export declare function getMiniPayAccount(): Promise<string | null>;
143
+ export declare function getMultiplier(streak: number): number;
144
+ export declare function calculatePoints(correct: boolean, streak: number): number;
145
+ export declare function getStreakLabel(streak: number): string;
146
+ export declare const CELO_MAINNET: {
147
+ id: number;
148
+ name: string;
149
+ rpcUrl: string;
150
+ explorerUrl: string;
151
+ contractAddress: "0xb215c82de33f98b270455f21f7edb7780da0d47d";
152
+ };
153
+ export declare const CELO_TESTNET: {
154
+ id: number;
155
+ name: string;
156
+ rpcUrl: string;
157
+ explorerUrl: string;
158
+ contractAddress: "0x50b20728ba0ad803679b5428f267c89aede9a378";
159
+ };
160
+ export declare const SDK_VERSION = "1.0.0";
161
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../sdk-src/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB,EAAG,4CAAqD,CAAC;AAC9F,eAAO,MAAM,wBAAwB,EAAG,4CAAqD,CAAC;AAE9F,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwFf,CAAC;AAGX,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAGF,wBAAgB,SAAS,IAAI,OAAO,CAGnC;AAUD,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAUhE;AAGD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIpD;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGxE;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKrD;AAGD,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC;AAEF,eAAO,MAAM,WAAW,UAAU,CAAC"}
package/sdk/index.js ADDED
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+ // TriviaQuest SDK
3
+ // Blockchain quiz game on Celo
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.SDK_VERSION = exports.CELO_TESTNET = exports.CELO_MAINNET = exports.CONTRACT_ABI = exports.CONTRACT_ADDRESS_TESTNET = exports.CONTRACT_ADDRESS_MAINNET = void 0;
6
+ exports.isMiniPay = isMiniPay;
7
+ exports.getMiniPayAccount = getMiniPayAccount;
8
+ exports.getMultiplier = getMultiplier;
9
+ exports.calculatePoints = calculatePoints;
10
+ exports.getStreakLabel = getStreakLabel;
11
+ exports.CONTRACT_ADDRESS_MAINNET = "0xb215c82de33f98b270455f21f7edb7780da0d47d";
12
+ exports.CONTRACT_ADDRESS_TESTNET = "0x50b20728ba0ad803679b5428f267c89aede9a378";
13
+ exports.CONTRACT_ABI = [
14
+ {
15
+ name: "joinRound",
16
+ type: "function",
17
+ stateMutability: "payable",
18
+ inputs: [],
19
+ outputs: [],
20
+ },
21
+ {
22
+ name: "getCurrentRound",
23
+ type: "function",
24
+ stateMutability: "view",
25
+ inputs: [],
26
+ outputs: [
27
+ {
28
+ type: "tuple",
29
+ components: [
30
+ { name: "id", type: "uint256" },
31
+ { name: "prizePool", type: "uint256" },
32
+ { name: "startTime", type: "uint256" },
33
+ { name: "endTime", type: "uint256" },
34
+ { name: "winner", type: "address" },
35
+ { name: "finished", type: "bool" },
36
+ ],
37
+ },
38
+ ],
39
+ },
40
+ {
41
+ name: "entryFee",
42
+ type: "function",
43
+ stateMutability: "view",
44
+ inputs: [],
45
+ outputs: [{ type: "uint256" }],
46
+ },
47
+ {
48
+ name: "getLeaderboard",
49
+ type: "function",
50
+ stateMutability: "view",
51
+ inputs: [],
52
+ outputs: [
53
+ {
54
+ type: "tuple[]",
55
+ components: [
56
+ { name: "player", type: "address" },
57
+ { name: "totalPoints", type: "uint256" },
58
+ { name: "bestScore", type: "uint256" },
59
+ { name: "gamesPlayed", type: "uint256" },
60
+ ],
61
+ },
62
+ ],
63
+ },
64
+ {
65
+ name: "getPlayerStats",
66
+ type: "function",
67
+ stateMutability: "view",
68
+ inputs: [{ name: "player", type: "address" }],
69
+ outputs: [
70
+ {
71
+ type: "tuple",
72
+ components: [
73
+ { name: "score", type: "uint256" },
74
+ { name: "totalWinnings", type: "uint256" },
75
+ { name: "totalPoints", type: "uint256" },
76
+ { name: "gamesPlayed", type: "uint256" },
77
+ { name: "bestScore", type: "uint256" },
78
+ { name: "exists", type: "bool" },
79
+ ],
80
+ },
81
+ ],
82
+ },
83
+ {
84
+ name: "getTotalPlayers",
85
+ type: "function",
86
+ stateMutability: "view",
87
+ inputs: [],
88
+ outputs: [{ type: "uint256" }],
89
+ },
90
+ {
91
+ name: "submitScore",
92
+ type: "function",
93
+ stateMutability: "nonpayable",
94
+ inputs: [
95
+ { name: "player", type: "address" },
96
+ { name: "score", type: "uint256" },
97
+ { name: "points", type: "uint256" },
98
+ ],
99
+ outputs: [],
100
+ },
101
+ ];
102
+ // โ”€โ”€ MiniPay Utils โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
103
+ function isMiniPay() {
104
+ if (typeof window === "undefined")
105
+ return false;
106
+ return window.navigator.userAgent.includes("MiniPay");
107
+ }
108
+ async function getMiniPayAccount() {
109
+ if (!isMiniPay())
110
+ return null;
111
+ try {
112
+ const ethereum = window.ethereum;
113
+ if (!ethereum)
114
+ return null;
115
+ const accounts = await ethereum.request({ method: "eth_requestAccounts" });
116
+ return accounts[0] ?? null;
117
+ }
118
+ catch {
119
+ return null;
120
+ }
121
+ }
122
+ // โ”€โ”€ Score Utils โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
123
+ function getMultiplier(streak) {
124
+ if (streak >= 5)
125
+ return 3;
126
+ if (streak >= 3)
127
+ return 2;
128
+ return 1;
129
+ }
130
+ function calculatePoints(correct, streak) {
131
+ if (!correct)
132
+ return 0;
133
+ return 100 * getMultiplier(streak + 1);
134
+ }
135
+ function getStreakLabel(streak) {
136
+ if (streak >= 5)
137
+ return "๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ x3 MEGA";
138
+ if (streak >= 3)
139
+ return "๐Ÿ”ฅ๐Ÿ”ฅ x2 HOT";
140
+ if (streak >= 1)
141
+ return "๐Ÿ”ฅ Streak";
142
+ return "";
143
+ }
144
+ // โ”€โ”€ Network Config โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
145
+ exports.CELO_MAINNET = {
146
+ id: 42220,
147
+ name: "Celo Mainnet",
148
+ rpcUrl: "https://forno.celo.org",
149
+ explorerUrl: "https://celoscan.io",
150
+ contractAddress: exports.CONTRACT_ADDRESS_MAINNET,
151
+ };
152
+ exports.CELO_TESTNET = {
153
+ id: 11142220,
154
+ name: "Celo Sepolia",
155
+ rpcUrl: "https://forno.celo-sepolia.celo-testnet.org",
156
+ explorerUrl: "https://sepolia.celoscan.io",
157
+ contractAddress: exports.CONTRACT_ADDRESS_TESTNET,
158
+ };
159
+ exports.SDK_VERSION = "1.0.0";
160
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../sdk-src/index.ts"],"names":[],"mappings":";AAAA,kBAAkB;AAClB,+BAA+B;;;AA0H/B,8BAGC;AAUD,8CAUC;AAGD,sCAIC;AAED,0CAGC;AAED,wCAKC;AAlKY,QAAA,wBAAwB,GAAG,4CAAqD,CAAC;AACjF,QAAA,wBAAwB,GAAG,4CAAqD,CAAC;AAEjF,QAAA,YAAY,GAAG;IAC1B;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,SAAS;QAC1B,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;KACZ;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,EAAE;QACV,OAAO,EA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