mrlucciola / link-hack-ccip

FLIP: an omni-chain browser wallet. Send digital assets from multiple keys and addresses as if they were one.
MIT License
3 stars 0 forks source link

Create `yarn` scripts for `hardhat` for **local** testing and deployment #122

Closed mrlucciola closed 9 months ago

mrlucciola commented 9 months ago

Documentation: https://hardhat.org/hardhat-runner/docs/guides/test-contracts

Description

We want to automate deployment to the various blockchains. To facilitate development and deployment we will create scripts that use the appropriate environment variables to remove the potential error and latency when manually typing in the commands into terminal.

Creating these scripts will serve as the template for when we modify them for live testnet testing and deployment.

In a future ticket, we will be toggling config vars in the hardhat.config.ts file to handle deployments to different networks.

Definition of done

Create both test:local and deploy:local scripts.

Add localnet config that points to the locally-created blockchain network (https://hardhat.org/hardhat-network/docs/overview).

In /blockchain dir:

{
    // ...
    "scripts": {
        // ...
        "test:local": "REPORT_GAS=true npx hardhat test",
        "deploy:local": "<deploy script>"
    }
}