dao-to-earth / d2d-deal-v1

D2D Deal Protocol.
https://d2d-deal-v1.web.app/
1 stars 2 forks source link

Add deployment scripts for each network #46

Open Willgg opened 2 years ago

Willgg commented 2 years ago
aiinkiestism commented 2 years ago

there are almost already actually, although some network configs are necessary. Greeter is an example. I added Swapper deploy script on the feat/contract-deploy branch. https://github.com/dao-to-earth/d2d-deal-v1/blob/feat/contract-deploy/deploy/Swapper.ts

example of fuji below. need to set DEPLOYER_PRIVATE_KEY and explorer api key in .env, and just run npx hardhat deploy --tags Swapper --network [network name in hardhat config] or yarn run hardhat:deploy:Swapper --network [network name in hardhat config] verifying can be done with npx hardhat verify --network [network name in hardhat config] [contract address], which will appear in the deploy log.

https://github.com/dao-to-earth/d2d-deal-v1/blob/3429a566a1838ff1d62def08900df53422cef70b/hardhat.config.ts#L82 https://testnet.snowtrace.io/address/0x2D596e821fE587CE3308848A05D6895bdC021fDb#code

aiinkiestism commented 2 years ago

I'll write this as a wiki if you guys see this and agree with deployment flow