Documentation Index Fetch the complete documentation index at: https://docs.abs.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Smart contracts must be compiled to Zksync VM -compatible bytecode using the zksolc compiler to prepare them for deployment on Abstract.
Update Hardhat configuration
Ensure your Hardhat configuration file is configured to use zksolc, as outlined in the installation guide : import { HardhatUserConfig } from "hardhat/config" ;
import "@matterlabs/hardhat-zksync" ;
const config : HardhatUserConfig = {
zksolc: {
version: "latest" ,
settings: {
// find all available options in the official documentation
// https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-solc#configuration
},
},
defaultNetwork: "abstractTestnet" ,
networks: {
abstractTestnet: {
url: "https://api.testnet.abs.xyz" ,
ethNetwork: "sepolia" ,
zksync: true ,
chainId: 11124 ,
},
abstractMainnet: {
url: "https://api.mainnet.abs.xyz" ,
ethNetwork: "mainnet" ,
zksync: true ,
chainId: 2741 ,
},
},
solidity: {
version: "0.8.24" ,
},
};
export default config ;
See all 32 lines
Compile contracts
Compile your contracts with zksolc : npx hardhat clean && npx hardhat compile --network abstractTestnet
This will generate the artifacts-zk and cache-zk directories containing the compilation artifacts (including contract ABIs) and compiler cache files respectively.