statechannels / SCBridge-Wallet

MIT License
1 stars 2 forks source link

add simple deterministic deployment script #99

Closed lalexgap closed 11 months ago

lalexgap commented 11 months ago

Fixes #76

This adds a basic deployment script that can be used to deploy the necessary contracts on-chain. It makes use of hardhat-deploy's deterministic helper to deploy the contracts to fixed, known addresses:

❯ yarn deploy:local
yarn run v1.22.19
$ yarn hardhat deploy --network localhost
$ /Users/lagap/code/nitro-smart-contract-wallet/node_modules/.bin/hardhat deploy --network localhost
Nothing to compile
No need to generate any newer typings.
Starting deployment...
Using salt 0x5374617465206368616e6e656c732061726520636f6f6c210000000000000000 based on salt string 'State channels are cool!'
EntryPoint deployed to: 0xaB75004123C3A0fA64D9B3975517F911D3A22Ae6
Alice (0xAAA6628Ec4) SCBridgeWallet deployed to: 0xddD1c83704F49773e1044ad632CFCFad7e9D9DD4
Bob (0xBBB676f9cF) SCBridgeWallet deployed to: 0xDEBbb26Cc71773E04BCE50B7149Dd3447afB5a7C
Deployment complete!
✨  Done in 0.71s.

To use:

  1. In one console start the hardhat chain by running yarn chain:local
  2. In another console deploy the contracts by running yarn deploy:local