This will generally speed up the tests as further test will be able to revert back to the full deployment. The runAtTheEnd is a boolean that if set to true, will queue that script to be executed after all other scripts are executed. Creating smart contracts requires a development environment for testing and deploying the contract on the Testnet. I want to deploy the first one, then pass the address of the first into the constructor of the second one. First, you have deploy the library using the deploy function, then when we deploy a contract that needs the linked library, we can pass the deployed library name and address in as an argument to the libraries object. Then if another deploy script has such tag as a dependency, then when this latter deploy script has a specific tag and that tag is requested, the dependency will be executed first. hardhat deploy add several task to hardhat. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Before starting the tests and deploying the escrow smart contract, you need to initiate the MockDaiToken smart contract. For your test you could have the companion networks pointing to the same hardhat network, for test deployment, you could have rinkeby acting like your l2 while goerli act as your l1. Every smart contract has a wallet where you can store your funds. The line you showed only executes the script and does little else - all the actual deployment logic is inside the script itself. Code for the default Proxy can be found here. The deployments folder will contains the resulting deployments (contract addresses along their abi, bytecode, metadata). Did you manage to find out anything about this? This has changed and upgrading to 0.6 will require you to change the folder name and add the '.chainId' file. You can add the connection details inside the hardhat.config.js: Ideally, you want to contain the RPC URL and the deployer private keys inside your environment variable. But if you add folders to the include field in tsconfig.json, you ll also need to include hardhat.config.ts like : "include": ["./hardhat.config.ts", "./scripts", "./deploy", "./test"]. Later this task might instead pin the metadata to ipfs, so sourcify can automatically verify them. deployment dependency system (allowing you to only deploy what is needed). You can for example set them in a beforeEach. You can define which network you want to deploy your smart contract to using the --network flag. hardhat deploy-zksync --script 001_deploy.ts. Now that the library is deployed, we can link it in our next deployed contract. An added advantage of hardhat deployment scripts is, when you run npx hardhat node, it will automatically deploy all the contracts, and your local node will be ready with all the contracts ready to test. You can deploy in the localhostnetwork following these steps: Start a local node npx hardhat node Open a new terminal and deploy the smart contract in the localhostnetwork npx hardhat run --network localhost scripts/deploy.js As general rule, you can target any network configured in the hardhat.config.js To perform such proxy deployment, you just need to invoke the deploy function with the following options : {, proxy: true}. contract? getUnnamedAccounts: () => Promise