token-gate-ucash
Zero-dependency on-chain token-gating for U.CASH. Verify a wallet holds a minimum amount of UCASH (or any ERC-20, or the native coin) to gate access: memberships, premium tiers, content paywalls, role grants. No keys, no signing, just a read-only RPC balance check.
Install
pip install token-gate-ucash
From source: pip install git+https://github.com/UdotCASH/token-gate-ucash.
Installs a token-gate CLI: token-gate 0xWALLET 100 any returns PASS/FAIL (exit code 0/1). Python and JavaScript, zero dependencies.
Use it to:
- Gate a Discord role, a membership, or a page by UCASH holdings.
- Verify any ERC-20 (or native) balance on any EVM chain.
- Tie into U.CASH's "verify holdings" premium tiers + custom-token gating.
UCASH gating
from token_gate import holds_ucash, holds_ucash_any_chain
ok, balance = holds_ucash("0xWALLET", 100, chain="ethereum") # one chain
ok, balance, chain = holds_ucash_any_chain("0xWALLET", 100) # ETH or Polygon or Base
if ok:
grant_access()
const { holdsUcash, holdsUcashAnyChain } = require('./token-gate.js');
const { ok, balance } = await holdsUcash('0xWALLET', 100, 'base');
const { ok, chain } = await holdsUcashAnyChain('0xWALLET', 100);
CLI: python token_gate.py 0xWALLET 100 any → PASS/FAIL.
Any token / native
holds(rpc_url, wallet, min_amount, token_address="0xTOKEN", decimals=18)
holds(rpc_url, wallet, min_amount) # native coin (ETH/MATIC/...), 18 decimals
UCASH contracts
Ethereum 0x92e52a1A235d9A103D970901066CE910AAceFD37, Polygon 0xA94880d3A4b39746E90Cdb57f8De3732c984DE14, Base 0x26cf750abAf38aF7109Effdbdf79bA50d2EE09A1 (8 decimals).
License
MIT.
Metadata
Release files for token-gate-ucash 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| token_gate_ucash-0.1.1.tar.gz | 5.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| token_gate_ucash-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.8 kB
Release files / token_gate_ucash-0.1.1.tar.gz
| Download URL | token_gate_ucash-0.1.1.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
451cf8e1dfbb366ab31bbb27b102170c9054e334c506266f2e4d4604e6cd6bb7
|
|
BLAKE2b-256 checksum How to use checksums |
4763a3f39bb6e8809940a032747b4ead238cf28ad87558f67ef4eaf5dda3a47b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / token_gate_ucash-0.1.1-py3-none-any.whl
| Download URL | token_gate_ucash-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
181f6e2c4287daea00b737d0012d6d787d633bd050721fa08c8f1cd1e5bd55bd
|
|
BLAKE2b-256 checksum How to use checksums |
fa0910c8df4c326fec80fee2650f9941063f68a612ec4312074ca6edb5a9f22e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for token-gate-ucash 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.