Setup
1. Install dependencies
First, install forgesource ~/.zshenv or whatever your shell environment is) or just open a new terminal window and run:
2. Get Your Pinata Credentials
- Go to Pinata
- Create a new API key. If you don’t just make an admin key, make sure the API key has write permissions for files and read permission for gateways.
- Copy the API Key, API Secret, and JWT
- Login in your terminal via
pinata auth - Note your gateway domain (e.g.,
your-subdomain.mypinata.cloud), this is in a different tab than API keys
3. Configure Environment Variables
Create a file.env by copying and renaming .env.example
.env file with your Pinata credentials:
RPC_URL variable is chain dependent. Make sure it applies to the deployment you’re making (either to sepolia testnet or mainnet).
4. Provide Policy Files
Put your policy files in thepolicy-files folder. You can look in policy-examples for some example files to start you off or read the following quickstart guide. See Policy Files for an explanation of what each file is for.
Usage
Deploy your Policy contract
If everything inpolicy-files is good to go, you can deploy your sample policy contract using the following command.
"policy": "0x7a3C8Bb03B7F2BFe270c53643d7133D378fA8b57", (will show your contract address instead of