token

द्वारा convex-dev

Convex पर fungible token बनाएँ और प्रबंधित करें। जब उपयोगकर्ता नया token बनाना चाहे, token balances जाँचना चाहे, या token supply प्रबंधित करना चाहे, तब उपयोग करें।

npx skills add https://github.com/convex-dev/convex --skill token

Fungible Tokens on Convex

Fungible tokens use the @convex.fungible standard library (convex-core/src/main/cvx/convex/asset/fungible.cvx). See the convex-lisp skill for CVM conventions, and transact for how transactions are signed.

Create a New Token

Fixed supply — no further tokens can ever be minted:

(deploy (@convex.fungible/build-token {:supply 1000000}))

Mintablebuild-token alone provides no mint or burn capability. To allow minting you must compose add-mint into the same deployment:

(deploy [(@convex.fungible/build-token {:supply 1000000})
         (@convex.fungible/add-mint {:minter *address* :max-supply 1000000000})])

Decide which the user wants before deploying — the choice is permanent, and a token deployed without add-mint fails on any later mint attempt.

build-token config: :supply (defaults to 0), :initial-holder (defaults to *address*), :decimals. add-mint config: :minter (any trust monitor, defaults to *address*) and :max-supply (from protocol v1, defaults to unlimited).

Always set :max-supply explicitly. Before v1 activates, omitting it defaults the cap to 0 — and because 0 is truthy in CVM, that installs a zero cap which blocks all minting, silently producing a mintable-looking token that can never mint (#528). Setting it explicitly is correct under both genesis and v1. See the protocol-versions skill.

deploy returns the token's actor address.

Operations

TaskSource
Check balance(@convex.fungible/balance #TOKEN #HOLDER)
Total supply(@convex.fungible/total-supply #TOKEN)
Decimals(@convex.fungible/decimals #TOKEN)
Transfer(@convex.fungible/transfer #TOKEN #DEST AMOUNT)
Mint(@convex.fungible/mint #TOKEN AMOUNT)
Burn(@convex.fungible/burn #TOKEN AMOUNT)

There is no quantity function — it returns :UNDECLARED. Total supply is total-supply.

balance, total-supply and decimals are reads: use a query, not a transaction. transfer, mint and burn change state and must be transactions.

If a Convex MCP server is configured, its getBalance and transfer tools also accept a token parameter.

Authorisation

Minting requires the caller to satisfy the token's :minter trust monitor; anything else fails with :TRUST. :minter takes any trust monitor, not just an address — see the trust skill for composing them (a mint window, a multi-party whitelist, delegated revocation). Creating, transferring, minting and burning are all transactions, so they need a key the user has supplied — see the transact skill. Without one you can prepare the source but not execute it.

convex-dev की और Skills

account
convex-dev
Convex खाते बनाएँ या जाँचें। जब उपयोगकर्ता नया खाता सेट करना चाहे, खाता विवरण देखना चाहे, या कुंजियाँ प्रबंधित करना चाहे, तब उपयोग करें।
account
convex-dev
Convex खाते बनाएँ या जाँचें। उपयोग तब करें जब उपयोगकर्ता नया खाता सेट करना, खाते का विवरण देखना, या कुंजियाँ प्रबंधित करना चाहता हो।
token
convex-dev
Convex पर विनिमेय टोकन बनाएँ और प्रबंधित करें। इसका उपयोग तब करें जब उपयोगकर्ता नया टोकन बनाना, टोकन शेष जाँचना या टोकन आपूर्ति प्रबंधित करना चाहता है।
build-convex
convex-dev
कॉन्वेक्स प्रोजेक्ट को स्रोत से बनाएं। जब कोई योगदानकर्ता कॉन्वेक्स को संकलित, परीक्षण या पैकेज करना चाहे तो उपयोग करें।
convex-db
convex-dev
Convex DB का उपयोग करें — एक lattice-आधारित SQL डेटाबेस। उपयोग तब करें जब उपयोगकर्ताओं को क्वेरी लिखने, JDBC या PostgreSQL क्लाइंट के माध्यम से कनेक्ट करने, टेबल बनाने, डेटा इन्सर्ट/क्वेरी करने में सहायता कर रहे हों,…
convex-lisp
convex-dev
Convex Lisp भाषा संदर्भ — CVM प्रथाएँ, लाइब्रेरी कोड कॉल करना, एक्टर परिभाषाएँ, जूस और त्रुटि कोड। CVM स्रोत लिखने या डीबग करने के समय उपयोग करें…
deploy
convex-dev
कॉन्वेक्स नेटवर्क पर एक एक्टर (स्मार्ट कॉन्ट्रैक्ट) तैनात करें। उपयोग तब करें जब उपयोगकर्ता निर्यातित फ़ंक्शन के साथ एक नया ऑन-चेन एक्टर बनाना चाहता है।
ecosystem
convex-dev
Convex पारिस्थितिकी तंत्र में अभिविन्यास — कौन सी चीज़ किस रिपॉज़िटरी में है, स्पेक्स और दस्तावेज़ कहाँ हैं, और कौन से क्लाइंट लाइब्रेरी मौजूद हैं। जब आपको संदर्भ की आवश्यकता हो तो उपयोग करें…