- Home
- Skills
- Multiversx
- Mx Ai Skills
- Mvx Sdk Go Core
mvx_sdk_go_core_skill
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_go_core- SKILL.md2.0 KB
Overview
This skill explains core network operations for the MultiversX Go SDK, focusing on proxy client setup, VM queries, and shard coordination. It summarizes how to create and reuse a proxy, perform smart contract read queries, and compute shard IDs for addresses. The guidance highlights practical workflows and safety considerations for reliable network interactions.
How this skill works
You configure a Proxy client that wraps HTTP connections, caching, and sync checks to interact with gateway endpoints. For reading smart contract state, the VmQueryGetter executes queries via the proxy and returns raw byte responses without creating transactions. A ShardCoordinator maps addresses to shard IDs so you can route requests or partition logic across shards.
When to use it
- When you need to read account, network, or transaction data from a MultiversX gateway.
- When you want to read smart contract state without submitting a transaction (free, instant reads).
- When building services that must reuse HTTP connections and caches for efficiency.
- When you must determine shard placement for addresses or shard-aware request routing.
- When you need reliable timeouts and context-aware network calls to avoid hangs.
Best practices
- Create and reuse a single Proxy instance to leverage connection pooling and caching.
- Always pass a context with timeouts for proxy calls and VM queries to prevent indefinite waits.
- Prefer VM queries for reads to avoid gas costs and transaction latency.
- Handle network errors explicitly and implement retry/backoff for transient failures.
- Cache stable results (like network config) and respect cache expiration to reduce gateway load.
Example use cases
- A backend service fetching user account nonces and balances before building transactions.
- A dashboard performing contract state reads (via VM queries) to display real-time info.
- A microservice that routes requests to shard-specific workers using shard IDs.
- A CLI tool that fetches transaction details and network configuration for diagnostics.
- Automated monitoring that polls gateway endpoints with timeouts and controlled retries.
FAQ
No. VM queries read contract state via the gateway and do not create on-chain transactions, so they do not consume gas or require signing.
Should I create a new Proxy for each request?
No. Reuse a single Proxy instance to benefit from connection pooling, caching, and reduced resource use.