Documentation Index
Fetch the complete documentation index at: https://docs.polygon.technology/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Complete the environment variable setup in the quickstart before following the steps below.Smart contract framework
Contracts are written in Solidity and run in a Hardhat environment. They live in thesmart-contracts directory.
- Tests are in the
testsdirectory, written in JavaScript or TypeScript. An example test is included. - Deploy scripts are in the
scriptsdirectory, also in JavaScript or TypeScript. Required scripts are already in place to get started.
Deploy to a local test chain
Follow the start developing instructions to spin up a local chain. Thedev command runs the scripts/deploy_localhost script internally, which deploys all contracts in the correct sequence.
For all available options:
Enable a local block explorer with Ethernal
You can optionally start a local blockchain explorer that auto-indexes transactions and provides a dashboard with an overview of the chain.Set up Ethernal
- Create an account and a workspace at https://app.tryethernal.com/.
- Add your login email, password, and workspace name to the
.envfile in thesmart-contractsdirectory.
dev command: --ethernal-login-email, --ethernal-login-password, and --ethernal-workspace. These flags override the environment variables if both are set.
Start the block explorer
Run thedev command with the -e flag:
Deploy to production
Thedeploy command deploys to any EVM-compatible chain. It runs scripts/deploy_prod to deploy all contracts in the correct sequence.
For all available options: