{"_id":"@bitsocial/evm-contract-challenge","_rev":"7-9f5384fb8673b400b1606de9805b94e8","name":"@bitsocial/evm-contract-challenge","dist-tags":{"latest":"0.1.7"},"versions":{"0.1.0":{"name":"@bitsocial/evm-contract-challenge","version":"0.1.0","keywords":["bitsocial","plebbit","pkc","challenge","evm","viem"],"author":{"name":"Rinse"},"license":"GPL-3.0-only","_id":"@bitsocial/evm-contract-challenge@0.1.0","maintainers":[{"name":"rinse12","email":"rinse12@tutanota.com"}],"homepage":"https://github.com/bitsocialnet/evm-contract-call#readme","bugs":{"url":"https://github.com/bitsocialnet/evm-contract-call/issues"},"dist":{"shasum":"6b033019be0be94d6f96e44154548285ce1ef38f","tarball":"https://registry.npmjs.org/@bitsocial/evm-contract-challenge/-/evm-contract-challenge-0.1.0.tgz","fileCount":13,"integrity":"sha512-vf1A7Xq3N0/GD4bdEKj3lc7+LXTaX1uNmmv5SkM3HhfByjyPenRbF3IY2HVrVrbVKDNqa00fy1SCPpYOw2R5uA==","signatures":[{"sig":"MEUCIBfYWaf9siyuywvt7ABRZBwSPno94e3csOuhu3KOHsLvAiEA2vHh333F0Yjcfq3NqAbWalmedgOgK53N2QcW82E4lYY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66145},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"d2cc62f419ad334d85eb6912a3e7373df73fdf5f","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepare":"husky","release":"HUSKY=0 release-it --config config/.release-it.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"rinse12","email":"rinse12@tutanota.com"},"repository":{"url":"git+https://github.com/bitsocialnet/evm-contract-call.git","type":"git"},"_npmVersion":"10.9.4","description":"Standalone EVM contract call challenge for pkc-js","directories":{},"_nodeVersion":"22.22.0","dependencies":{"viem":"2.47.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"9.1.7","vitest":"4.0.18","commitizen":"4.3.1","release-it":"19.2.4","typescript":"5.9.3","@types/node":"25.3.5","@commitlint/cli":"20.4.3","@pkcprotocol/pkc-js":"github:pkcprotocol/pkc-js#7932a96bf","cz-conventional-changelog":"3.3.0","@commitlint/config-conventional":"20.4.3","@release-it/conventional-changelog":"10.0.5"},"_npmOperationalInternal":{"tmp":"tmp/evm-contract-challenge_0.1.0_1775816669935_0.30995332019127675","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@bitsocial/evm-contract-challenge","version":"0.1.3","keywords":["bitsocial","plebbit","pkc","challenge","evm","viem"],"author":{"name":"Rinse"},"license":"GPL-3.0-or-later","_id":"@bitsocial/evm-contract-challenge@0.1.3","maintainers":[{"name":"rinse12","email":"rinse12@tutanota.com"}],"homepage":"https://github.com/bitsocialnet/evm-contract-challenge#readme","bugs":{"url":"https://github.com/bitsocialnet/evm-contract-challenge/issues"},"dist":{"shasum":"c97729be3cee7e98233700dec3525daa5477a3fd","tarball":"https://registry.npmjs.org/@bitsocial/evm-contract-challenge/-/evm-contract-challenge-0.1.3.tgz","fileCount":13,"integrity":"sha512-igI2gVBwr4M2k9m8Xi5cOrD6IV01G5dictgelbOatYD46ykmcdk8q64xyzI4jcrOR77pF6r0y06xykGsVoSUdw==","signatures":[{"sig":"MEYCIQC99dTHeeO970aoZ6vI5WqcAJ3QT4HNbQXSAjzVRb1VUgIhAOLIyWF0/zTYJRcdtOXAS7LmzB/HP7vA8jde40lw+k3t","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bitsocial%2fevm-contract-challenge@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":77153},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"e72c62e71509efe1d849038947dfb387153ead2d","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepare":"husky","release":"HUSKY=0 release-it --config config/.release-it.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1b352472-a03c-4afd-9e2a-6719b184eff7"}},"repository":{"url":"git+https://github.com/bitsocialnet/evm-contract-challenge.git","type":"git"},"_npmVersion":"11.12.1","description":"Standalone EVM contract call challenge for pkc-js","directories":{},"_nodeVersion":"22.22.2","dependencies":{"viem":"2.47.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"9.1.7","vitest":"4.0.18","commitizen":"4.3.1","release-it":"19.2.4","typescript":"5.9.3","@types/node":"25.3.5","@commitlint/cli":"20.4.3","@pkcprotocol/pkc-js":"0.0.13","cz-conventional-changelog":"3.3.0","@commitlint/config-conventional":"20.4.3","@release-it/conventional-changelog":"10.0.5"},"_npmOperationalInternal":{"tmp":"tmp/evm-contract-challenge_0.1.3_1775896312462_0.5524919075453099","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@bitsocial/evm-contract-challenge","version":"0.1.4","keywords":["bitsocial","plebbit","pkc","challenge","evm","viem"],"author":{"name":"Rinse"},"license":"GPL-3.0-or-later","_id":"@bitsocial/evm-contract-challenge@0.1.4","maintainers":[{"name":"tomcasaburi","email":"tom@plebbitlabs.com"},{"name":"rinse12","email":"rinse12@tutanota.com"}],"homepage":"https://github.com/bitsocialnet/evm-contract-challenge#readme","bugs":{"url":"https://github.com/bitsocialnet/evm-contract-challenge/issues"},"dist":{"shasum":"d01ddedfcd31a6241c54bc4da1300fb3ee25139e","tarball":"https://registry.npmjs.org/@bitsocial/evm-contract-challenge/-/evm-contract-challenge-0.1.4.tgz","fileCount":13,"integrity":"sha512-4XGB5hOON6U1MOTxO3ifvwOM7eTAsdkktbKMBjyu2QSQQctbux/XG7egp5+W7bn8LhFUmMK6CjSV47VS65JxQQ==","signatures":[{"sig":"MEUCIQCWdCJYqFAZa5M5nWXnS2FGo71iIH7/E+BY/b/ms6ZzEAIgG69YsfT2HETDpQA+Zy7lRrd2eMoPNwMfv8mU+DU+1Og=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bitsocial%2fevm-contract-challenge@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":77046},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"187bc44404bcb95c242077e43ad1e6f836dc81c4","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepare":"husky","release":"HUSKY=0 release-it --config config/.release-it.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1b352472-a03c-4afd-9e2a-6719b184eff7"}},"repository":{"url":"git+https://github.com/bitsocialnet/evm-contract-challenge.git","type":"git"},"_npmVersion":"11.13.0","description":"Standalone EVM contract call challenge for pkc-js","directories":{},"_nodeVersion":"22.22.2","dependencies":{"viem":"2.47.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"9.1.7","vitest":"4.0.18","commitizen":"4.3.1","release-it":"19.2.4","typescript":"5.9.3","@types/node":"25.3.5","@commitlint/cli":"20.4.3","@pkcprotocol/pkc-js":"0.0.13","cz-conventional-changelog":"3.3.0","@commitlint/config-conventional":"20.4.3","@release-it/conventional-changelog":"10.0.5"},"_npmOperationalInternal":{"tmp":"tmp/evm-contract-challenge_0.1.4_1777024226663_0.41635736568359727","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@bitsocial/evm-contract-challenge","version":"0.1.5","keywords":["bitsocial","plebbit","pkc","challenge","evm","viem"],"author":{"name":"Rinse"},"license":"GPL-3.0-or-later","_id":"@bitsocial/evm-contract-challenge@0.1.5","maintainers":[{"name":"tomcasaburi","email":"tom@bitsocial.net"},{"name":"rinse12","email":"rinse12@tutanota.com"}],"homepage":"https://github.com/bitsocialnet/evm-contract-challenge#readme","bugs":{"url":"https://github.com/bitsocialnet/evm-contract-challenge/issues"},"dist":{"shasum":"bbd922cb84edf4a4850b468e8cbdc3e278d4b444","tarball":"https://registry.npmjs.org/@bitsocial/evm-contract-challenge/-/evm-contract-challenge-0.1.5.tgz","fileCount":13,"integrity":"sha512-Y4/PZ6Jy/+5b8VE2T4PPEP2TrLgGyjS7ref2sHS1rapr7kqwo78RX20dtB4CaWS1ZBX05M+GQiz0UJ7Ix86X+Q==","signatures":[{"sig":"MEQCICEPuYHbyiJPE7z5PnBdqgABMuFvmix+PtuJnhDpUTkcAiBSTxsLLAvp6bwFPB5bB+2byCd7EBOOmwtuB8q3hCvlSg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bitsocial%2fevm-contract-challenge@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":96847},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"e636339b55cd001eb7a8d39d2bd1ebf9b0231cea","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepare":"husky","release":"HUSKY=0 release-it --config config/.release-it.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1b352472-a03c-4afd-9e2a-6719b184eff7"}},"repository":{"url":"git+https://github.com/bitsocialnet/evm-contract-challenge.git","type":"git"},"_npmVersion":"12.0.2","description":"Standalone EVM contract call challenge for pkc-js","directories":{},"_nodeVersion":"22.23.2","dependencies":{"viem":"2.47.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"9.1.7","vitest":"4.0.18","commitizen":"4.3.1","release-it":"19.2.4","typescript":"5.9.3","@types/node":"25.3.5","@commitlint/cli":"20.4.3","@pkcprotocol/pkc-js":"0.0.85","cz-conventional-changelog":"3.3.0","@commitlint/config-conventional":"20.4.3","@release-it/conventional-changelog":"10.0.5"},"_npmOperationalInternal":{"tmp":"tmp/evm-contract-challenge_0.1.5_1787301721047_0.8768364575108689","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@bitsocial/evm-contract-challenge","version":"0.1.6","keywords":["bitsocial","plebbit","pkc","challenge","evm","viem"],"author":{"name":"Rinse"},"license":"GPL-3.0-or-later","_id":"@bitsocial/evm-contract-challenge@0.1.6","maintainers":[{"name":"tomcasaburi","email":"tom@bitsocial.net"},{"name":"rinse12","email":"rinse12@tutanota.com"}],"homepage":"https://github.com/bitsocialnet/evm-contract-challenge#readme","bugs":{"url":"https://github.com/bitsocialnet/evm-contract-challenge/issues"},"dist":{"shasum":"6a11eeded6335d664cfaa18eaacfeac975815a34","tarball":"https://registry.npmjs.org/@bitsocial/evm-contract-challenge/-/evm-contract-challenge-0.1.6.tgz","fileCount":13,"integrity":"sha512-ez6/Jn6JOBxAW1Z9PlEp5neZDsvfEi5k+ryTi40HqKqjlTYesi3FGVD/sj4VyFwz4lsOZd0bgXQAvG4UHR4ARw==","signatures":[{"sig":"MEUCIQClyqlgVlmDfk/L24lTwwqjO2V2EsTStm1O+jzyLNJ4rAIgByS7kwx7Zbe9gM/k1SPxC4PZmNNeipJuPjI/co02H9Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bitsocial%2fevm-contract-challenge@0.1.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":96848},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","config":{"commitizen":{"path":"cz-conventional-changelog"}},"engines":{"node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"5755512431387d2ac7fbe451645d1d50c9e2488a","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepare":"husky","release":"HUSKY=0 release-it --config config/.release-it.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1b352472-a03c-4afd-9e2a-6719b184eff7"}},"repository":{"url":"git+https://github.com/bitsocialnet/evm-contract-challenge.git","type":"git"},"_npmVersion":"12.0.2","description":"Standalone EVM contract call challenge for pkc-js","directories":{},"_nodeVersion":"22.23.2","dependencies":{"viem":"2.55.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"husky":"9.1.7","vitest":"4.1.11","commitizen":"4.3.2","release-it":"21.0.2","typescript":"5.9.3","@types/node":"25.3.5","@commitlint/cli":"21.2.2","@pkcprotocol/pkc-js":"0.0.85","cz-conventional-changelog":"3.3.0","@commitlint/config-conventional":"21.2.2","@release-it/conventional-changelog":"12.0.0"},"_npmOperationalInternal":{"tmp":"tmp/evm-contract-challenge_0.1.6_1787303111139_0.15425125880178747","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@bitsocial/evm-contract-challenge","version":"0.1.7","description":"Standalone EVM contract call challenge for pkc-js","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json --noEmit","test":"vitest run","test:watch":"vitest","clean":"rm -rf dist","prepare":"husky","release":"HUSKY=0 release-it --config config/.release-it.json"},"keywords":["bitsocial","plebbit","pkc","challenge","evm","viem"],"author":{"name":"Rinse"},"license":"GPL-3.0-or-later","engines":{"node":">=22.0.0"},"dependencies":{"viem":"2.55.19"},"devDependencies":{"@commitlint/cli":"21.2.2","@commitlint/config-conventional":"21.2.2","@pkcprotocol/pkc-js":"0.0.85","@release-it/conventional-changelog":"12.0.0","@types/node":"25.3.5","commitizen":"4.3.2","cz-conventional-changelog":"3.3.0","husky":"9.1.7","release-it":"21.0.2","typescript":"5.9.3","vitest":"4.1.11"},"overrides":{"@protobufjs/utf8@1.1.0":"1.1.1","fast-uri@3.1.5":"3.1.6","protobufjs@6.11.4":"7.6.5","undici@7.24.7":"7.29.0","uuid@13.0.0":"13.0.1","ws@8.20.0":"8.21.0"},"repository":{"type":"git","url":"git+https://github.com/bitsocialnet/evm-contract-challenge.git"},"publishConfig":{"access":"public"},"config":{"commitizen":{"path":"cz-conventional-changelog"}},"gitHead":"2b11a694e119957da299f193620ce7c65f2c5ec0","_id":"@bitsocial/evm-contract-challenge@0.1.7","bugs":{"url":"https://github.com/bitsocialnet/evm-contract-challenge/issues"},"homepage":"https://github.com/bitsocialnet/evm-contract-challenge#readme","_nodeVersion":"22.23.2","_npmVersion":"12.0.2","dist":{"integrity":"sha512-fSrKj+Pd66lPJEMvgoKVGJZf4Zpx2T/dlq9dYL/k4Ub3aFmGW7ziU2M21DskCHPPIvzGVUaaIw2Y1S63dX4KRA==","shasum":"42e10cf016e5c1c1dbb73fcea6ae7b144db9be15","tarball":"https://registry.npmjs.org/@bitsocial/evm-contract-challenge/-/evm-contract-challenge-0.1.7.tgz","fileCount":13,"unpackedSize":97060,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bitsocial%2fevm-contract-challenge@0.1.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCz/dv1LTyjt6qO+b1xME66cMNDsjHG5Pf5XcnI8eJGVgIhANRhrDJP9qlRcyt8XhBb0LsOFz33VgCqoM8wQQhjKPgS"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1b352472-a03c-4afd-9e2a-6719b184eff7"}},"directories":{},"maintainers":[{"name":"tomcasaburi","email":"tom@bitsocial.net"},{"name":"rinse12","email":"rinse12@tutanota.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/evm-contract-challenge_0.1.7_1788469372886_0.8245325700561335"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-10T10:24:29.804Z","modified":"2026-09-03T21:02:53.395Z","0.1.0":"2026-04-10T10:24:30.075Z","0.1.3":"2026-04-11T08:31:52.625Z","0.1.4":"2026-04-24T09:50:26.807Z","0.1.5":"2026-08-21T08:42:01.185Z","0.1.6":"2026-08-21T09:05:11.286Z","0.1.7":"2026-09-03T21:02:53.011Z"},"bugs":{"url":"https://github.com/bitsocialnet/evm-contract-challenge/issues"},"author":{"name":"Rinse"},"license":"GPL-3.0-or-later","homepage":"https://github.com/bitsocialnet/evm-contract-challenge#readme","keywords":["bitsocial","plebbit","pkc","challenge","evm","viem"],"repository":{"type":"git","url":"git+https://github.com/bitsocialnet/evm-contract-challenge.git"},"description":"Standalone EVM contract call challenge for pkc-js","maintainers":[{"name":"tomcasaburi","email":"tom@bitsocial.net"},{"name":"rinse12","email":"rinse12@tutanota.com"}],"readme":"# @bitsocial/evm-contract-challenge\n\nAn automatic challenge for `@pkcprotocol/pkc-js` communities that verifies an author's EVM wallet address meets a condition from a smart contract call.\n\n## How it works\n\nWhen an author publishes to a community with this challenge enabled, the community node calls a read-only smart contract method with the author's wallet address as the argument and compares the return value against a configured condition (e.g. `>1000`). The challenge tries three sources for the wallet address:\n\n1. **Wallet address** — the `author.wallets[chainTicker]` address, verified via EIP-191 signature\n2. **ENS/BSO domain** — if the author's address is a `.eth` or `.bso` domain, it resolves to an on-chain address\n3. **NFT avatar** — the current owner of the author's avatar NFT\n\nIf any source produces a wallet that passes the contract call condition, the challenge succeeds. No user interaction is required.\n\n## Requirements\n\n- Node.js `>=22`\n- ESM-only environment\n\n## Install\n\n### With bitsocial-cli\n\n```bash\nbitsocial challenge install @bitsocial/evm-contract-challenge\n```\n\nEdit your community to use the challenge:\n\n```bash\nbitsocial community edit your-community.bso \\\n  '--settings.challenges[0].name' @bitsocial/evm-contract-challenge \\\n  '--settings.challenges[0].options.chainTicker' eth \\\n  '--settings.challenges[0].options.address' '0xEA81DaB2e0EcBc6B5c4172DE4c22B6Ef6E55Bd8f' \\\n  '--settings.challenges[0].options.abi' '{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}' \\\n  '--settings.challenges[0].options.condition' '>10000000000000000000' \\\n  '--settings.challenges[0].options.error' 'You need at least 10 Bitsocial tokens to post.'\n```\n\n### With pkc-js over RPC\n\nIf your RPC server is already running, first install the challenge on the server:\n\n```bash\nbitsocial challenge install @bitsocial/evm-contract-challenge\n```\n\nThen from your RPC client, connect and set the challenge on your community by name — no npm install or challenge registration needed on the client side:\n\n```ts\nimport PKC from \"@pkcprotocol/pkc-js\";\n\nconst pkc = await PKC({\n  pkcRpcClientsOptions: [\"ws://localhost:9138\"]\n});\n\nconst community = await pkc.createCommunity({ address: \"your-community-address.bso\" });\n\nawait community.edit({\n  settings: {\n    challenges: [\n      {\n        name: \"@bitsocial/evm-contract-challenge\",\n        options: {\n          chainTicker: \"eth\",\n          address: \"0xEA81DaB2e0EcBc6B5c4172DE4c22B6Ef6E55Bd8f\",\n          abi: '{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}',\n          condition: \">10000000000000000000\",\n          error: \"You need at least 10 Bitsocial tokens to post.\"\n        }\n      }\n    ]\n  }\n});\n```\n\n### With pkc-js (TypeScript)\n\nIf you are running your own node locally without connecting over RPC, you can install via npm and register the challenge manually:\n\n```bash\nnpm install @bitsocial/evm-contract-challenge\n```\n\n```ts\nimport PKC from \"@pkcprotocol/pkc-js\";\nimport { evmContractChallenge } from \"@bitsocial/evm-contract-challenge\";\n\nPKC.challenges[\"@bitsocial/evm-contract-challenge\"] = evmContractChallenge;\n```\n\nThen set the challenge on your community:\n\n```ts\nawait community.edit({\n  settings: {\n    challenges: [\n      {\n        name: \"@bitsocial/evm-contract-challenge\",\n        options: {\n          chainTicker: \"eth\",\n          address: \"0xEA81DaB2e0EcBc6B5c4172DE4c22B6Ef6E55Bd8f\",\n          abi: '{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}',\n          condition: \">10000000000000000000\",\n          error: \"You need at least 10 Bitsocial tokens to post.\"\n        }\n      }\n    ]\n  }\n});\n```\n\n## Example Challenges\n\nEach example uses a read-only contract function that takes a single `address` argument. The `condition` compares against the raw return value including decimal places (e.g. 10 USDC with 6 decimals = `10000000` raw).\n\n### Common ABIs\n\n<a id=\"balanceof-abi\"></a>**`balanceOf`** — standard ERC-20 / ERC-721 token balance:\n\n```json\n{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}\n```\n\n<a id=\"getscore-abi\"></a>**`getScore`** — Gitcoin Passport score (returns `uint256` with 4 decimals):\n\n```json\n{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getScore\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}\n```\n\n### Examples\n\n| Description | `chainTicker` | `address` | ABI | `condition` |\n|---|---|---|---|---|\n| At least 10 Bitsocial (BSO) tokens | `eth` | `0xEA81DaB2e0EcBc6B5c4172DE4c22B6Ef6E55Bd8f` | [`balanceOf`](#balanceof-abi) | `>10000000000000000000` |\n| Minimum 10 USDC | `eth` | `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48` | [`balanceOf`](#balanceof-abi) | `>10000000` |\n| Any WETH balance | `eth` | `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2` | [`balanceOf`](#balanceof-abi) | `>0` |\n| Gitcoin Passport score above 20 (proof of personhood) | `op` | `0xd6c51bB9E23bD7f1fEa22A3F2f85E3BFC8338Cb0` | [`getScore`](#getscore-abi) | `>200000` |\n| At least 10 MATIC on Polygon | `matic` | `0x0000000000000000000000000000000000001010` | [`balanceOf`](#balanceof-abi) | `>10000000000000000000` |\n| Any stETH balance (Lido staked ETH) | `eth` | `0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84` | [`balanceOf`](#balanceof-abi) | `>0` |\n\n> Setting `rpcUrls` is recommended on every chain, including Ethereum mainnet. See [Challenge Options](#challenge-options).\n\n## Challenge Options\n\nAll option values must be strings.\n\n| Option | Required | Default | Description |\n|--------|----------|---------|-------------|\n| `chainTicker` | yes | `\"eth\"` | The chain ticker (e.g. `eth`, `matic`) |\n| `rpcUrls` | see below | — | Comma-separated JSON-RPC URLs for the chain |\n| `address` | yes | — | The contract address to call |\n| `abi` | yes | — | The ABI of the contract method as a JSON object (not an array) |\n| `condition` | yes | — | Condition the return value must pass (`=`, `>`, or `<` followed by a value, e.g. `>1000`) |\n| `error` | no | `\"Contract call response doesn't pass condition.\"` | Custom error message shown when the condition fails |\n\n### When `rpcUrls` is required\n\n`rpcUrls` is **required unless `chainTicker` is one of the tickers below**, which have a built-in RPC endpoint:\n\n`eth`, `matic` / `pol`, `op`, `arb`, `base`, `avax`, `bnb` / `bsc`, `gno` / `xdai`, `celo`, `ftm`, `linea`, `scroll`, `zksync`, `blast`\n\nSetting it is still **recommended even for those**: the built-in endpoints are shared public RPCs and will rate-limit a busy community, which shows up as authors being rejected at random rather than as an obvious failure.\n\nAn unsupported ticker with no `rpcUrls` is rejected when you save the challenge settings, rather than failing later for every author who tries to publish.\n\n## Publishing Options\n\n`community.settings.challenges[i].options` is private. Nothing in it is published unless you name the option in `publicOptions`, which copies it into the public `community.challenges[i].publicOptions` record.\n\n**Recommended: publish everything except `rpcUrls`.**\n\n```ts\nawait community.edit({\n  settings: {\n    challenges: [\n      {\n        name: \"@bitsocial/evm-contract-challenge\",\n        options: {\n          /* ... */\n        },\n        publicOptions: [\"chainTicker\", \"address\", \"abi\", \"condition\", \"error\"]\n      }\n    ]\n  }\n});\n```\n\n| Option | Publish? | Why |\n|--------|----------|-----|\n| `chainTicker` | recommended | Already public in effect — the challenge's `type` is `chain/<chainTicker>` |\n| `address` | recommended | A contract address is public on-chain data; hiding it buys no security |\n| `abi` | recommended | The signature of a public method on that contract |\n| `condition` | recommended | The threshold that makes the other three actionable |\n| `error` | recommended | Authors see this string anyway when they fail |\n| `rpcUrls` | **never — refused** | RPC URLs commonly embed a provider API key |\n\nPublished together, `chainTicker` + `address` + `abi` + `condition` let a client tell an author exactly what they are missing *before* they publish and burn a challenge attempt. Published partially, none of that works, so treat the four as one unit.\n\nKeeping them private is a legitimate choice — you may not want the exact threshold known — and this package will not stop you. `rpcUrls` is the one exception: naming it in `publicOptions` is refused outright, because publishing a URL like `https://eth-mainnet.g.alchemy.com/v2/<KEY>` leaks a paid credential to everyone, permanently, and no client ever uses these endpoints. Only the community node does.\n\n## Settings Validation\n\nThe challenge validates its own settings whenever you create a community, edit one, or start one, via pkc-js's `validateChallengeSettings` hook. A bad setting is rejected as a failed edit instead of silently rejecting every author at publish time.\n\nRejected settings:\n\n- `publicOptions` naming `rpcUrls`\n- `rpcUrls` entries that are not valid URLs, or that do not use `http:` / `https:`\n- `rpcUrls` omitted for a `chainTicker` with no built-in RPC\n- `address` that is not a well-formed EVM address\n- `abi` that is not valid JSON, or not a single function entry taking one `address` and returning at least one value\n- `condition` with no supported operator (`=`, `>`, `<`), no value after the operator, or an ordering comparison against a non-numeric value (e.g. `>abc`, which would otherwise compare as text)\n\npkc-js additionally rejects an option name that no option above declares, and any required option left unset, before this challenge's own validation runs.\n\n## Multiple RPC URLs\n\nYou can provide multiple RPC endpoints as a comma-separated string:\n\n```\nhttps://eth.llamarpc.com,https://rpc.ankr.com/eth,https://eth.drpc.org\n```\n\nWhen multiple URLs are provided, viem's [`fallback`](https://viem.sh/docs/clients/transports/fallback) transport is used with automatic ranking enabled (`rank: true`). This means:\n\n- Requests are sent to the highest-ranked RPC endpoint\n- If a request fails, it automatically falls back to the next endpoint\n- viem periodically pings all endpoints in the background and reorders them by latency and stability\n- A single URL works the same as before (no fallback overhead)\n- If `rpcUrls` is omitted, the chain's built-in RPC is used, which requires a supported `chainTicker` (see [When `rpcUrls` is required](#when-rpcurls-is-required))\n\nThis improves reliability — if one RPC provider goes down, the challenge automatically uses the next available endpoint.\n\n## Scripts\n\n```bash\nnpm run typecheck\nnpm run build\nnpm test\n```\n","readmeFilename":"README.md"}