mvx_sdk_js_contracts_skill

This skill helps you manage MultiversX JS smart contracts by loading ABIs, deploying, calling, querying, and parsing results safely.

10

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill multiversx/mx-ai-skills --skill mvx_sdk_js_contracts

  • SKILL.md3.4 KB

Overview

This skill implements smart contract operations for the MultiversX TypeScript/JavaScript SDK. It provides ABI loading, deployment, execute calls, read-only VM queries, upgrades, relayed calls, and utilities for transfers and token operations. The goal is to make contract interactions type-safe, predictable, and easy to integrate into JS/TS apps.

How this skill works

Load an ABI from file, URL, or construct it manually to enable typed inputs and outputs. Create a Smart Contract Controller from the ABI to generate transactions for deploy, execute, upgrade, and queries. The controller can build transactions using plain values (when ABI available) or TypedValue objects, send them through an entrypoint, and await parsed outcomes with helper methods.

When to use it

  • Deploying new smart contracts or upgrading existing WASM bytecode
  • Executing state-changing contract endpoints, including token transfers and native EGLD transfers
  • Running read-only VM queries to fetch on-chain data without gas costs
  • Building relayed transactions that require a relayer signature
  • Simulating transactions before sending to reduce failed executions

Best practices

  • Always use the ABI when available to get automatic type parsing and safer argument handling
  • Estimate gas conservatively at first (start high), then optimize after profiling
  • Simulate transactions using simulateTransaction() to catch errors before consuming gas
  • Use awaitCompletedExecute()/awaitCompletedDeploy() to parse return values and verify outcomes
  • Include a small extra gas buffer for relayed calls (+50,000 gas typical)

Example use cases

  • Load a contract ABI from a URL, create a controller, and query a getter to display on a dashboard
  • Deploy a new contract with constructor args, wait for completion, and record the deployed address
  • Execute a deposit endpoint that sends 1 EGLD and a fungible token transfer in a single transaction
  • Upgrade an existing contract by sending new WASM bytecode with proper constructor args
  • Create a relayed transaction, attach relayerSignature, and submit it via the relayer infrastructure

FAQ

No — you can use TypedValue objects to call endpoints without an ABI, but using an ABI provides automatic type conversion and parsed outputs.

How do I get return values from a contract call?

Use awaitCompletedExecute() or queryContract(); when an ABI is present returned values are automatically parsed into typed JS/TS values.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
mvx_sdk_js_contracts skill by multiversx/mx-ai-skills | VeilStrat