transact

โดย convex-dev

ดำเนินการธุรกรรม CVM บนเครือข่าย Convex ใช้เมื่อผู้ใช้ต้องการแก้ไขสถานะบนเชน เรียกใช้ฟังก์ชันของแอคเตอร์ หรือกำหนดค่า

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

Execute a Convex Transaction

Transactions modify global state atomically. They consume juice, paid in copper by the origin account, and must be signed.

Source: $ARGUMENTS

See the convex-lisp skill for CVM conventions and error codes.

Authorisation

A transaction requires a key. You have one only if the user has supplied it — a signing-service passphrase, or a raw seed. There is no ambient authority here, so:

  1. User has a key in the signing service — use the MCP signingTransact tool with their address and passphrase.
  2. User has a raw seed — use the MCP transact tool with address and seed.
  3. Neither — you cannot execute. Use prepare to build the unsigned transaction, or the CLI below, and hand it back for the user to sign.

Do not treat case 3 as a blocker to work around. Preparing the transaction and returning it is the correct outcome.

Via the CLI

Works from a built convex.jar and needs no MCP server:

java -jar convex.jar client transact -a #13 '(def my-var 42)'
java -jar convex.jar client transact -a #13 -k <key> -p <keypass> '(transfer #42 1000000000)'

-k / --key selects the key from the keystore and -p / --keypass is its passphrase; --keystore and --storepass select the keystore itself. Add --host / --port for a non-default network.

Common Patterns

TaskSource
Transfer coins(transfer #DEST AMOUNT)
Define a value(def my-var 42)
Call an actor(call #ACTOR (function-name arg1 arg2))
Call a library(@convex.fungible/transfer #TOKEN #DEST AMOUNT)
Set controller(set-controller #ADDR)

Confirm source, destination and amount with the user before executing anything that moves value or changes account control. State what will happen in CVM units, not copper.

Skills เพิ่มเติมจาก convex-dev

convex-lisp
convex-dev
เอกสารอ้างอิงภาษา Convex Lisp — ข้อกำหนด CVM, การเรียกใช้โค้ดไลบรารี, นิยามแอ็กเตอร์, juice และรหัสข้อผิดพลาด ใช้เมื่อเขียนหรือดีบักซอร์ส CVM สำหรับ…
ecosystem
convex-dev
การปฐมนิเทศในระบบนิเวศ Convex — อะไรอยู่ใน repository ใด, เอกสาร spec และ docs อยู่ที่ไหน, และมี client libraries ใดบ้าง ใช้เมื่อคุณต้องการบริบท...
local-network
convex-dev
เรียกใช้เครือข่ายทดสอบ Convex ในเครื่องเพื่อการพัฒนา ใช้เมื่อทดสอบการเปลี่ยนแปลงกับเครือข่ายจริง จำลองปัญหาจากเพียร์ หรือเมื่อไม่มีเครือข่ายระยะไกล…
protocol-versions
convex-dev
โปรโตคอลเวอร์ชัน การย้ายข้อมูล และการอัปเกรด v1 — ควรเขียนตามความหมายใด และจะเปลี่ยนพฤติกรรมของ CVM ได้อย่างไรโดยไม่ต้องแยกเครือข่าย ใช้เมื่อ…
etch
convex-dev
ตรวจสอบและบำรุงรักษา Etch store — ฐานข้อมูลแบบ content-addressed ของ Convex ใช้เมื่อตรวจสอบพื้นที่จัดเก็บของ peer วินิจฉัยความเสียหายของข้อมูล การเก็บขยะ หรือ…
juice
convex-dev
การคิดบัญชี Juice — ต้นทุนของการคำนวณและแบนด์วิดท์บน CVM ใช้เมื่อพิจารณาเกี่ยวกับต้นทุนการดำเนินการธุรกรรม วินิจฉัยความล้มเหลว :JUICE หรือ…
trust
convex-dev
Trust monitors — โมเดลการอนุญาตบนเชนที่ประกอบได้ของ Convex ใช้เมื่อเขียนการควบคุมการเข้าถึง จำกัดฟังก์ชันของนักแสดง กำหนดว่าใครสามารถ mint หรือ…
memory
convex-dev
การบันทึกบัญชีหน่วยความจำและวงเงิน — ต้นทุนของการจัดเก็บข้อมูลบนเชน และวิธีลดและเรียกคืนต้นทุนดังกล่าว ใช้เมื่อพิจารณาเกี่ยวกับการเติบโตของสถานะ วิเคราะห์…