deploy

द्वारा convex-dev

Convex नेटवर्क पर एक एक्टर (स्मार्ट कॉन्ट्रैक्ट) तैनात करें। जब उपयोगकर्ता निर्यातित फ़ंक्शनों के साथ एक नया ऑन-चेन एक्टर बनाना चाहे तब इसका उपयोग करें।

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

Deploy a Convex Actor

Actors are autonomous on-chain programs with their own address, state, and callable functions.

See the convex-lisp skill for CVM conventions and error codes. Deploying is a transaction, so it needs a key the user has supplied — see transact.

Actor Structure

A typical actor deployment:

(deploy
  '(do
     ;; Internal state (private to the actor)
     (def counter 0)

     ;; Callable functions: mark each with ^:callable so it can be
     ;; invoked from outside the actor via (call ...)
     (defn ^:callable increment []
       (set! counter (+ counter 1))
       counter)

     (defn ^:callable get-count []
       counter)))

Key Rules

  • deploy returns the new actor's address (e.g. #12345)
  • Only functions tagged with ^:callable metadata can be called from outside (there is no export form). The equivalent map form is ^{:callable true}
  • Use set! to update an existing def from inside a function; plain defs declared in the actor body are private state
  • Actors have their own *address* and *balance*
  • Use (set-controller #ADDR) inside the actor to set who can upgrade it
  • deploy also accepts a vector of code forms, which is how library builders are composed into one actor: (deploy [(@convex.fungible/build-token {…}) (@convex.fungible/add-mint {…})])

After Deployment

  1. Note the returned address for the user
  2. Optionally register a CNS name: (*registry*/create 'my.actor.name #NEW-ADDR) — needs control of the parent namespace; see the cns skill
  3. Test by calling a ^:callable function: (call #NEW-ADDR (get-count))

Workflow

  1. Help the user design the actor based on $ARGUMENTS
  2. Write the Convex Lisp source
  3. Deploy using transact with the (deploy ...) expression
  4. Verify the deployment with a test query

convex-dev की और Skills

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