diff --git a/content/00.build/40.tooling/30.foundry/20.getting-started.md b/content/00.build/40.tooling/30.foundry/20.getting-started.md index f039cdb7..57a1ed38 100644 --- a/content/00.build/40.tooling/30.foundry/20.getting-started.md +++ b/content/00.build/40.tooling/30.foundry/20.getting-started.md @@ -115,6 +115,24 @@ contract Greeter { forge create src/Greeter.sol:Greeter --constructor-args "Hello ZKsync" --account myKeystore --sender --rpc-url %%zk_testnet_rpc_url%% --chain %%zk_testnet_chain_id%% --zksync ``` +### Verifying Contracts with `forge` + +You can verify your contracts on the ZKsync block explorer using `forge` by specifying the `zksync` verifier and the appropriate `verifier-url`. +Here's an example command: + +```sh +forge create src/Greeter.sol:Greeter \ + --constructor-args "Hello ZKsync" \ + --account myKeystore \ + --sender \ + --rpc-url %%zk_testnet_rpc_url%% \ + --chain %%zk_testnet_chain_id%% \ + --verifier zksync \ + --verifier-url https://explorer.sepolia.era.zksync.dev/contract_verification \ + --verify \ + --zksync +``` + ### Deploying Factory Contracts To deploy contracts like `GreeterFactory.sol`, use the `--zk-enable-eravm-extensions` flag.