multiversx-blockchain-data
Installation
SKILL.md
MultiversX Blockchain Data — self.blockchain() API Reference
Complete reference for reading on-chain state in MultiversX smart contracts (SDK v0.64+).
Caller & Account Info
| Method | Returns | Description |
|---|---|---|
.get_caller() |
ManagedAddress |
Address that initiated the current call |
.get_sc_address() |
ManagedAddress |
This contract's own address |
.get_owner_address() |
ManagedAddress |
Contract owner address |
.check_caller_is_owner() |
() |
Panics if caller != owner. Equivalent to #[only_owner]. |
.check_caller_is_user_account() |
() |
Panics if caller is a smart contract (not an EOA). |
.is_smart_contract(address) |
bool |
Check if an address is a smart contract |
.get_shard_of_address(address) |
u32 |
Get shard ID for an address |
// Owner-only guard (manual alternative to #[only_owner])
self.blockchain().check_caller_is_owner();