Skip to main content

token-gate-ucashpay

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-ucashpay

From source: pip install git+https://github.com/UdotCASH/token-gate-ucashpay.

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-ucashpay 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for token-gate-ucashpay 0.1.0
File Size Uploaded Provenance
token_gate_ucashpay-0.1.0.tar.gz 5.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for token-gate-ucashpay 0.1.0
File Interpreter ABI Platform
token_gate_ucashpay-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / token_gate_ucashpay-0.1.0.tar.gz

Download URL token_gate_ucashpay-0.1.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9931813de0cd485b0be3b3896babbfa585c3a233eb99c6a3b7bc5372a384d56c
BLAKE2b-256 checksum
How to use checksums
9a481c97bbffab7b935ec54d51cafe9ea483ff2f25e908c30f15b1c69683da07
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_ucashpay-0.1.0-py3-none-any.whl

Download URL token_gate_ucashpay-0.1.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
240d545de12f91dcf8bdc666ad0812b020d633619e9961624a2f2a6b1e59242a
BLAKE2b-256 checksum
How to use checksums
fa32dfd9f11d62dcdd1715cfe94c50068e8142ce09fc409264a1d1968ed0ca36
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-ucashpay 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page