Intro to NFT Metadata
Prerequisites & Repos
Setup & information all types developers should be familiar with before diving into the Tableland tech.
In order to interact with Tableland, developers should ensure the following exist:
- General familiarity with relational data & SQL — and have at least glossed over the Tableland SQL spec
- Desire to build on the supported EVM-compatible chains in which Tableland currently has smart contracts deployed to.
- Browser wallet extension — such as MetaMask — when using the JS SDK
- Wallet private key access when using the CLI — see exporting wallet private keys in MetaMask for more details
- Testnet currency (use faucets for our supported EVM-compatible blockchains)
It is also recommended to leverage node providers like Alchemy, Infura, or Etherscan and create API keys to establish a connection to a chain. This avoids rate limiting by avoiding the default API keys provided.
Additionally, Tableland supports
hardhat local development environments. See the information below for more details.
For all of our tech, the default EVM network is
ethereum-goerli. When using the SDK on the client side, if MetaMask does not show this or the other supported chains, check out how to add custom network RPCs and also how to find the chainId & RPCs.
For those new to web3 development,
hardhat is a great framework for interacting the chains locally as well as on live testnets/mainnets. The hardhat website has plenty of great starter tutorial information.
The basic flow starts with the following
npx command to create a new project, and then follow the prompts (e.g., Create a basic sample project)
@tableland/sdk offers a top-level export called
SUPPORTED_CHAINS, which defines the supported chains and Tableland smart contract addresses. For developers using
hardhat, this can be useful when interacting with local or live contract deployments since it easily provides a way to retrieve the chain information.
For more information on
SUPPORTED_CHAINS, see the dedicated section in the SDK docs. Note that spinning up a
hardhat environment is not required to use the SDK itself but is a best practice for those using a local development setup.
All Tableland smart contracts are located at
@tableland/evm-tableland. This repository also leverages
hardhat. It uses a
hardhat.config.ts that defines the network config information described above along with an
.env file for key management, making it easy for developers to spin up the Tableland smart contracts & chain connections.
Simply clone the repo below, and you’ll have access to the Tableland smart contracts with a
hardhat environment already configured.
The Tableland JS SDK & CLI heavily rely on
ethers under the hood. The concept of a provider is required to connect to a chain, which is simply an API to a node (running a chain client) that can then access the chain. The
ethers library provides a no config way to do this using default, rate limited API providers (e.g., Alchemy). Thus, it is recommended to set up your own provider for any production or even development application by creating and specifying your own provider API keys.