Hardhat
Learn about how to develop on Sophon using Hardhat
Getting Started
Project Setup
We recommend scaffolding your project using the zksync-cli.
Configuration
In order to obtain a Sophscan API Key, you need to create an account and get an API Key here.
Set up your project with the following configuration:
Contract Deployment
Basic Deployment
Here’s how to deploy a contract without using the paymaster:
Deployment with Paymaster
During the alpha stage, you’ll need to use our Paymaster to sponsor transactions. Here’s how to deploy using the paymaster:
Proxy Deployment
To deploy proxy contracts with paymaster support:
Contract Interaction
To interact with deployed contracts using the paymaster:
Contract Verification
You can verify contracts on both Sophscan and Sophon’s explorer:
Check if a contract is whitelisted by the paymaster
Before making calls to a newly deployed contract using a paymaster, it’s important to verify that the contract has been added to the paymaster’s whitelist. Our automated contract whitelisting service typically takes 2-3 seconds to whitelist new contracts under normal network conditions. While optional, checking the whitelist status before proceeding makes deployment scripts more robust by ensuring contracts are ready to interact with the paymaster.
The code below provides a reference implementation for checking the whitelist status:
Was this page helpful?