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.
npx claudepluginhub abstract-foundation/abstract-skillsThis skill uses the workspace's default tool permissions.
**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`.
Build and test Solidity smart contracts using Foundry toolkit (forge, cast, anvil) for Ethereum/EVM development, Forge tests (*.t.sol), deployment scripts (*.s.sol), and debugging.
Develops secure smart contracts by integrating OpenZeppelin libraries for ERC tokens, access control, pausability, governance, and accounts. Supports Solidity, Cairo, Stylus, Stellar.
Deploys, imports, interacts with, and monitors smart contracts using Circle SCP SDKs. Supports bytecode, ERC-20/721/1155/Airdrop templates, ABI read/write calls, and webhook events.
Share bugs, ideas, or general feedback.
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 variables