mvx_cross_contract_storage

Read MultiversX smart contract storage variables via storage_mapper_from_address.

12|5|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/multiversx/mx-ai-skills --skill mvx-cross-contract-storage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mvx_cross_contract_storage
Source: https://github.com/multiversx/mx-ai-skills/tree/main/antigravity/skills/mvx_cross_contract_storage
Command: npx skills add https://github.com/multiversx/mx-ai-skills --skill mvx-cross-contract-storage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables reading data directly from another smart contract's storage without incurring the gas costs and complexities associated with traditional proxy calls, specifically for same-shard contracts.

Core Features & Use Cases

  • Direct Storage Access: Utilizes storage_mapper_from_address to read storage variables.
  • Zero Gas Overhead: Avoids proxy call gas fees, only incurring the cost of a storage read.
  • Use Case: Efficiently retrieve the total_supply of a token or a user's balance from another contract on the same shard without making an external call.

Quick Start

Use the mvx_cross_contract_storage skill to read the external_total_supply from the contract at address erd1... for the token identifier 'MYTOKEN'.

Frequently Asked Questions about mvx_cross_contract_storage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read another smart contract's storage without paying proxy call gas fees on MultiversX?

Yes, you can retrieve token balances from another contract by directly accessing its storage using `storage_mapper_from_address`, provided both contracts are on the same shard and you know the exact storage key.

How do I retrieve a token's total supply from another contract on the same shard in Rust?

To retrieve a token's total supply from another same-shard contract in Rust, use `storage_mapper_from_address` to read the external contract's storage variable directly, matching the exact storage key where total supply is recorded.

What are the limitations of using direct cross-contract storage reads instead of proxy calls?

Limitations of direct cross-contract storage reads include strict same-shard requirements, exact storage key matching, and the risk of silent failures from stale data or key changes, requiring careful validation of the retrieved results.

When should I use direct storage access instead of standard proxy calls for cross-contract data retrieval?

Use direct storage access instead of standard proxy calls when you need zero-gas overhead retrieval of variables like total supply or balances from same-shard contracts, and when you can guarantee exact storage key matching and result validation.

Can I read storage variables from a contract on a different shard using storage_mapper_from_address?

No, `storage_mapper_from_address` is designed exclusively for same-shard contracts. Cross-shard storage reads are not supported by this direct access method and would require traditional proxy calls instead.