Contract Explorer
On the "Contract Explorer" page, you can take a deep dive into Stellar smart contracts. Here, you can view high-level contract information, invoke contract methods directly from the browser, explore the contract specification, source code, contract storage, build information, and version history.
RPC URL is required to view the contract information. You can update or set the RPC URL in the network selector in the top right corner.
Let's load CAJJZSGMMM3PD7N33TAPHGBUGTB43OC73HVIK2L2G6BNGGGYOSSYBXBD
contract ID on the Mainnet network, and see what we can learn about it.
Contract Info
In the "Contract Info" section, we can view the date when the contract was created and the creator's Stellar address. It also displays the Wasm hash and GitHub repository, along with a link to the source code of this contract. Also, you can see how many contract storage entries this contract has.
Invoke Contract
This feature allows you to directly interact with and execute methods of a Stellar smart contract from the Lab UI in your browser.
A connected wallet is required to invoke the contract.
Contract Spec
In this section, you can view Contract Meta, Contract Env Meta, and Contract Spec from the Wasm file. You can view each section in JSON or XDR formats, by selecting the type from the dropdown in the top-right corner of the editor view. You can also download each section individually in the chosen format (the download button is located next to the type dropdown), or download the entire Wasm file by clicking the "Download Wasm" button at the bottom of the section.
Source Code
In the code editor, you can view the README.md
file of the smart contract repository. You can further explore the code by opening it in a Dev Container, Codeanywhere, or by using the GitHub link (see the dropdown in the top right corner of the editor view).
Contract Storage
Here you can view stored data entries for this smart contract in human-readable format. You can filter this data by Key and Value, as well as sort it by Durability, TTL, or Updated columns. You can also export this data in XDR or JSON formats.
Build Info
If the smart contract has build verification configured (following the Contract Source Validation SEP), this section displays information from the GitHub attestation.
"Build Verified" only means that the GitHub Action run has attested to have built the Wasm, but does not verify the source code. Always make sure you fully understand what the smart contract does before using it.
Version History
In this section, you can find the Wasm history of changes.
Bindings
Bindings are a feature of the Stellar CLI that generate fully typed client libraries for your smart contracts, tailored to your chosen programming language, including TypeScript, JSON, Rust, Python, and Java. This makes it easy to integrate Stellar contracts into your application as if they were native modules. Each binding provides type-safe functions corresponding to your contract’s methods. To learn more about generating bindings, please see the Stellar CLI’s bindings command.