OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add convex-dev/convex --skill deploy
Deploy an actor (smart contract) to the Convex network. Use when the user wants to create a new on-chain actor with exported functions.
npx skills add convex-dev/convex --skill deploy
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.
A typical actor deployment:
deploy returns the new actor's address (e.g. #12345)^:callable metadata can be called from outside (there is no export form). The equivalent map form is ^{:callable true}set! to update an existing def from inside a function; plain defs declared in the actor body are private state*address* and *balance*(set-controller #ADDR) inside the actor to set who can upgrade itdeploy 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 {…})])(*registry*/create 'my.actor.name #NEW-ADDR)
— needs control of the parent namespace; see the cns skill^:callable function: (call #NEW-ADDR (get-count))$ARGUMENTStransact with the (deploy ...) expression