Verifying Contracts

Contracts can be verified as they are deployed as described in Deploying Contracts. This page outlines how to verify contracts that have already been deployed on Abstract.

1

Get an Abscan API key

Follow the Abscan documentation to get an API key.

2

Verify an existing contract

Verify an existing contract by running the following command:

forge verify-contract 0x85717893A18F255285AB48d7bE245ddcD047dEAE \
    src/Counter.sol:Counter \
    --verifier etherscan \
    --verifier-url https://api-sepolia.abscan.org/api \
    --etherscan-api-key TACK2D1RGYX9U7MC31SZWWQ7FCWRYQ96AD \
    --zksync

Note: Replace the contract path, address, and API key with your own.

Verifying Contracts

Contracts can be verified as they are deployed as described in Deploying Contracts. This page outlines how to verify contracts that have already been deployed on Abstract.

1

Get an Abscan API key

Follow the Abscan documentation to get an API key.

2

Verify an existing contract

Verify an existing contract by running the following command:

forge verify-contract 0x85717893A18F255285AB48d7bE245ddcD047dEAE \
    src/Counter.sol:Counter \
    --verifier etherscan \
    --verifier-url https://api-sepolia.abscan.org/api \
    --etherscan-api-key TACK2D1RGYX9U7MC31SZWWQ7FCWRYQ96AD \
    --zksync

Note: Replace the contract path, address, and API key with your own.