### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### ZKsync Foundry Configuration Example Source: https://docs.zksync.io/zksync-network/tooling/foundry/installation An example `foundry.toml` configuration file tailored for ZKsync projects, including settings for `zksolc`. ```toml [profile.default] src = 'src' out = 'out' libs = ['lib'] [profile.default.zksync] compile = true fallback_oz = true mode = '3' ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Create ZKsync Hardhat Solidity Project Source: https://docs.zksync.io/zksync-network/tooling/hardhat/guides/getting-started Initializes a new ZKsync Era project with a Hardhat template for Solidity development. This command automates the setup of necessary configurations and plugins. ```bash npx zksync-cli create demo --template hardhat_solidity ``` -------------------------------- ### Install Viem Package for ZKsync Source: https://docs.zksync.io/zksync-network/sdk/js/viem Installs the necessary Viem package for ZKsync integration. This is the first step to enable ZKsync functionalities within your project. ```bash npm i viem ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Install ZKsync Web3.js Plugin Source: https://docs.zksync.io/zksync-network/sdk/js/web3js/getting-started Install the Web3.js library and the specific Web3.js plugin for ZKsync using npm. This is the first step to enable ZKsync functionalities within your Web3.js project. ```bash npm install web3 web3-plugin-zksync ``` -------------------------------- ### Testing Smart Contracts with Forge on ZKsync Source: https://docs.zksync.io/zksync-network/tooling/foundry/getting-started Run tests written for your smart contracts on ZKsync using the `forge test --zksync` command. This assumes you have followed the Foundry testing guide for `foundry-zksync`. ```bash forge test --zksync ``` -------------------------------- ### Untitled No description -------------------------------- ### Create ZKsync Hardhat Vyper Project Source: https://docs.zksync.io/zksync-network/tooling/hardhat/guides/getting-started Initializes a new ZKsync Era project with a Hardhat template for Vyper development. This command automates the setup of necessary configurations and plugins for Vyper smart contracts. ```bash npx zksync-cli create demo --template hardhat_vyper ``` -------------------------------- ### Untitled No description -------------------------------- ### Start a ZKsync chain server Source: https://docs.zksync.io/zk-stack/running/gateway-settlement-layer Starts the server for a specific ZKsync chain. Ensure you replace `` with the correct chain identifier. Prerequisites are ignored. ```bash zkstack server --ignore-prerequisites --chain ``` -------------------------------- ### Install ZKsync CLI using npm Source: https://docs.zksync.io/build/start-coding/zksync-101 Installs the ZKsync Command Line Interface globally using npm. This tool is essential for developing and interacting with ZKsync from your local machine and is used throughout the 101 series for building and deploying contracts. ```bash npm install -g zksync-cli ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description -------------------------------- ### Initialize and Configure ZKsync Wallet (Go Example) Source: https://docs.zksync.io/zksync-network/sdk/go/api/accounts/wallet This example demonstrates initializing a ZKsync Wallet using a private key and connecting it to both L2 and L1 networks. It shows the setup process including client initialization and error handling. ```go PrivateKey := os.Getenv("PRIVATE_KEY") ZkSyncEraProvider := "https://sepolia.era.zksync.dev" EthereumProvider := "https://rpc.ankr.com/eth_sepolia" client, err := clients.Dial(ZkSyncEraProvider) if err != nil { log.Panic(err) } defer client.Close() ethClient, err := ethclient.Dial(EthereumProvider) if err != nil { log.Panic(err) } defer ethClient.Close() wallet, err := accounts.NewWallet(common.Hex2Bytes(PrivateKey), client, ethClient) if err != nil { log.Panic(err) } chainID, err := client.ChainID(context.Background()) if err != nil { log.Panic(err) } wallet, err = accounts.NewRandomWallet(chainID.Int64(), nil, nil) if err != nil { log.Panic(err) } ``` -------------------------------- ### Install ZKsync CLI globally Source: https://docs.zksync.io/zksync-network/tooling/hardhat/installation Installs the ZKsync CLI globally using npm or yarn, which simplifies project setup and local testing for ZKsync development. ```npm npm install -g zksync-cli ``` ```yarn yarn global add zksync-cli ``` -------------------------------- ### Create ZKsync 101 project with EVM template Source: https://docs.zksync.io/build/start-coding/zksync-101 Creates a new ZKsync 101 project using the EVM template. This command initializes a project structure suitable for EVM bytecode compilation and deployment on ZKsync. It requires the ZKsync CLI to be installed. ```bash zksync-cli create zksync-101 --template zksync-101-evm ``` -------------------------------- ### Untitled No description -------------------------------- ### Untitled No description