Moralis Documentation
ArchivedSeptember 1, 2021
A fork of the Moralis documentation — Moralis being the platform that solved one of blockchain development's hardest problems: indexing on-chain data so you can actually query it. A look at what blockchain indexing is, why it is brutally hard, and the honest reality that skills you do not use for five years atrophy.
Purpose
Forked the Moralis docs, likely to improve or reference them while building dApps. Moralis was the tool that made blockchain data usable — without it, reading anything beyond basic balances from the blockchain was an exercise in pain.
Stack
What I Learned
- The fundamental problem Moralis solves: blockchains are append-only ledgers, not databases. Ethereum stores transactions and state changes, but it does not have a query layer. You cannot ask the blockchain "show me all NFTs owned by this address" or "list all transfers of this token in the last 24 hours" the way you would query a SQL database. Someone has to read every block, extract the relevant events, index them into a queryable format, and keep the index in sync as new blocks arrive. That is blockchain indexing.
- Without indexing, reading blockchain data means running a full node (hundreds of gigabytes of storage, days to sync), replaying transactions to reconstruct state, and writing custom parsers for each contract's event logs. Moralis collapsed all of that into REST API calls: GET /nft/{address} returns all NFTs for a wallet. GET /erc20/{address}/transfers returns token transfer history. What would take weeks of infrastructure work became a single API call.
- The indexing pipeline is technically demanding: a blockchain indexer must monitor the chain tip for new blocks, decode transaction logs using contract ABIs, handle chain reorganizations (when the blockchain forks temporarily and your indexed data becomes invalid), support multiple chains (Ethereum, Polygon, BSC, Arbitrum, etc.), and serve queries at API-level latency. Moralis, The Graph, Alchemy, and QuickNode each solve this differently.
- The Graph takes a decentralized approach — developers write "subgraphs" (custom indexing schemas in GraphQL + AssemblyScript) that run on a decentralized network of indexers. Moralis took a centralized approach — pre-indexed common data patterns (NFTs, tokens, transactions, balances) and exposed them via REST. The tradeoff: Moralis is faster to start but less customizable. The Graph is more flexible but requires writing and deploying your own indexing logic.
- Event logs (Solidity's emit keyword) are the primary data source for blockchain indexers. When a smart contract emits an event (Transfer, Approval, Mint, etc.), it is recorded in the transaction receipt as a log entry. Indexers subscribe to these logs, decode them, and store the structured data. If a contract does not emit events for its state changes, that data is effectively invisible to indexers. This is why well-designed contracts emit events for every meaningful state transition.
Key Insights
- Blockchain indexing is the unsexy infrastructure that makes every "cool" Web3 product possible. OpenSea cannot show you your NFTs without an indexer. Etherscan cannot display transaction history without an indexer. Every wallet, every portfolio tracker, every DeFi dashboard depends on someone solving the indexing problem. The products get the attention. The indexers do the work.
- I do not relentlessly pursue this stack anymore, and therefore I am not proficient in it. This is the honest reality of technology: skills decay when you stop using them. Five years ago, I could write Solidity, deploy contracts, set up Moralis webhooks, and build dApps. Today, I could not do any of that without significant relearning. The tools have changed (Hardhat replaced Truffle, ethers.js replaced Web3.js, Moralis pivoted its product), the ecosystem has evolved, and my muscle memory is gone.
- This is not a failure — it is a natural consequence of choosing where to invest. Depth in everything is impossible. You pick your lanes, go deep, and accept that the lanes you leave will overgrow behind you. The crypto lane taught me smart contracts, decentralized architectures, and market dynamics. Those concepts transfer even if the specific tools do not. The Flutter and Swift lanes stayed active. The Solidity lane did not.
- For anyone two years into their career reading this: it is normal to explore broadly, go deep in several directions, and then prune. The pruning is not admitting defeat — it is focusing. The projects in this blog are not all successes. They are the full map of exploration, including the dead ends. The dead ends are what make the chosen path legible.
This post was composed through a conversation between Brett Owers and Claude Code (Anthropic). The content reflects Brett's recollection of each project and the lessons drawn from it. Some details may be approximate or omitted — the purpose is to paint an honest picture of a software engineer's development over time, not to serve as a precise historical record.