Learn about how to develop on Sophon using Hardhat
We recommend scaffolding your project using the zksync-cli.
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:
Here’s how to deploy a contract without using the paymaster:
During the alpha stage, you’ll need to use our Paymaster to sponsor transactions. Here’s how to deploy using the paymaster:
To deploy proxy contracts with paymaster support:
To interact with deployed contracts using the paymaster:
You can verify contracts on both Sophscan and Sophon’s explorer:
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: