From abstract-skills
Deploys smart contracts on Abstract Ethereum L2 using Foundry (default) or Hardhat. Covers zksolc compilation, Abscan verification, testnet faucets, and zkSync-specific forge commands.
How this skill is triggered — by the user, by Claude, or both
Slash command
/abstract-skills:deploying-contracts-on-abstractThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Default: Foundry.** Abstract uses the ZK Stack VM — contracts must be compiled with `zksolc`, not standard `solc`. For Hardhat, see `references/hardhat.md`. For EVM differences, see `references/evm-differences.md`.
Default: Foundry. Abstract uses the ZK Stack VM — contracts must be compiled with zksolc, not standard solc. For Hardhat, see references/hardhat.md. For EVM differences, see references/evm-differences.md.
curl -L https://raw.githubusercontent.com/matter-labs/foundry-zksync/main/install-foundry-zksync | bash
foundryup-zksync
Warning: This overwrites standard Foundry. Switch back with
foundryupif needed.
forge init my-abstract-project && cd my-abstract-project
foundry.toml[profile.default]
src = 'src'
libs = ['lib']
fallback_oz = true
is_system = false
mode = "3"
[etherscan]
abstractTestnet = { chain = "11124", url = "https://api-sepolia.abscan.org/api", key = "${ABSCAN_API_KEY}" }
abstractMainnet = { chain = "2741", url = "https://api.abscan.org/api", key = "${ABSCAN_API_KEY}" }
forge build --zksync
Outputs to zkout/ (not out/).
cast wallet import myKeystore --interactive
forge create src/Counter.sol:Counter \
--account myKeystore \
--rpc-url https://api.testnet.abs.xyz \
--chain 11124 \
--zksync \
--verify \
--verifier etherscan \
--verifier-url https://api-sepolia.abscan.org/api \
--etherscan-api-key ${ABSCAN_API_KEY}
forge create src/Counter.sol:Counter \
--account myKeystore \
--rpc-url https://api.mainnet.abs.xyz \
--chain 2741 \
--zksync \
--verify \
--verifier etherscan \
--verifier-url https://api.abscan.org/api \
--etherscan-api-key ${ABSCAN_API_KEY}
Append --constructor-args <arg1> <arg2> in the order defined in the constructor.
forge verify-contract <address> src/Counter.sol:Counter \
--chain 11124 \
--etherscan-api-key ${ABSCAN_API_KEY} \
--zksync
Use --chain 2741 for mainnet. Chain names (abstract-testnet, abstract) also work.
forge test --zksync
Fork testing against live networks:
forge test --zksync --fork-url https://api.testnet.abs.xyz
Local node:
anvil-zksync
forge test --zksync --fork-url http://localhost:8011
Cheatcode limitation: On Abstract's ZK VM, cheatcodes (
vm.prank,vm.roll, etc.) only work at the root test level — not from within contracts being tested.
| Scenario | Use |
|---|---|
| Solidity-first, fast iteration | Foundry (default) |
| TypeScript preference | Hardhat (references/hardhat.md) |
| Existing Hardhat project | Hardhat (references/hardhat.md) |
| Existing Foundry project | Foundry |
| Need JS plugin ecosystem | Hardhat (references/hardhat.md) |
forge commands need --zksync — without it, you get standard EVM bytecode that won't run on Abstractfoundryup-zksync overwrites standard Foundry — use foundryup to switch backexport ABSCAN_API_KEY=<key> or .envzkout/ not out/ — compiled artifacts go to a different directorycast wallet import or environment variablesnpx claudepluginhub abstract-foundation/abstract-skillsProvides Abstract Ethereum L2 mainnet/testnet configs: chain IDs (2741/11124), RPC/WebSocket URLs, Abscan explorers, viem/chains imports, faucets, and wallet setup for clients/dev environments.
Guides writing production-grade Solidity smart contracts with defensive patterns, custom errors, fuzz testing, and structured code layout.
Develops secure smart contracts by integrating OpenZeppelin libraries for ERC tokens, access control, pausability, governance, and accounts. Supports Solidity, Cairo, Stylus, Stellar.