Smart contracts must be compiled to Zksync VM-compatible bytecode using the zksolc
compiler to prepare them for deployment on Abstract.
Configure foundry.toml
Update your foundry.toml
file to include the following options:
[profile.default]
src = 'src'
libs = ['lib']
fallback_oz = true
is_system = false # Note: NonceHolder and the ContractDeployer system contracts can only be called with a special is_system flag as true
mode = "3"
[etherscan]
abstractTestnet = { chain = "11124", url = "", key = ""} # You can replace these values or leave them blank to override via CLI
abstractMainnet = { chain = "2741", url = "", key = ""} # You can replace these values or leave them blank to override via CLI
Compile contracts
Compile your contracts using the following command:
This will generate the zkout
directory containing the compiled smart contracts.
Responses are generated using AI and may contain mistakes.