multiversx-blockchain-data

Read on-chain state in MultiversX smart contracts via self.blockchain().

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive reference for interacting with and reading on-chain state within MultiversX smart contracts, simplifying access to crucial blockchain data.

Core Features & Use Cases

  • On-Chain Data Access: Retrieve caller information, account balances, block timestamps, ESDT token metadata, and more directly from self.blockchain().
  • Smart Contract Development: Essential for building smart contracts that need to query current blockchain conditions, user states, or token properties.
  • Use Case: A smart contract needs to verify the caller's EGLD balance before allowing a specific action. This Skill's methods enable that check.

Quick Start

Use the multiversx-blockchain-data skill to get the caller's address.

Frequently Asked Questions about multiversx-blockchain-data

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

FAQPage Schema
How do I read caller and account balances in MultiversX smart contracts?

You can read caller and account balances in MultiversX smart contracts by using the `self.blockchain()` interface, which provides typed access to on-chain account state and EGLD balances directly within the contract logic.

What on-chain data is available through the MultiversX blockchain API?

The MultiversX blockchain API provides typed access to caller info, account balances, block and transaction details, ESDT token metadata, and contract code inspection through the `self.blockchain()` interface.

How do I check ESDT token metadata inside a MultiversX smart contract?

You check ESDT token metadata inside a MultiversX smart contract by calling the specific methods provided by the `self.blockchain()` interface to retrieve token properties directly from the on-chain state.

Can I retrieve block timestamps and transaction details using the MultiversX SDK?

Yes, you can retrieve block timestamps and transaction details using the MultiversX SDK by accessing the `self.blockchain()` interface, which exposes current block and transaction information for smart contract execution.

How do I verify a user's EGLD balance before allowing a smart contract action?

To verify a user's EGLD balance before allowing a smart contract action, use the `self.blockchain()` interface methods to query the caller's current account balance and enforce conditional logic based on the returned state.