Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a deployment script for app development purposes #83

Merged
merged 4 commits into from
Mar 19, 2024
Merged

Conversation

bpierre
Copy link
Contributor

@bpierre bpierre commented Mar 15, 2024

Two things to facilitate developing the app using a local node:

  • Allows to set the ACCOUNTS_BALANCE env var to an arbitrary ETH balance to be set on accounts (to use when starting Hardhat Network).
  • Add a script (utils/deploymentDev.js) that deploys the contracts, opens a certain amount of troves, and displays the env vars to be copied in the frontend app (currently living in scaffold).

Usage:

# Start the node and give 1000 ETH to each of the 2k accounts
$ ACCOUNTS_BALANCE=1000 yarn hardhat node
# Deploy contracts for development purposes
$ yarn hardhat run --network localhost utils/deploymentDev.js

Core contracts deployed.

PriceFeedTestnet    0xCF389CE0CD7DfF99689eeB56029A28fa965Fe89E
BoldToken           0x84A85A35AF520fC2884167Fc62Fb7605a454A102
SortedTroves        0xbEc2096Ef1FDfA8A5c876d900DDD9570d1471572
TroveManager        0x88400A8e74619127C301B3d8aC7BBd8A08b76f9f
ActivePool          0x6845beebdEc1B7EcB4e30Bc50467D9f7d66733Fd
StabilityPool       0xefaC809C80e25039799EB11b70E157752DC9869e
GasPool             0xC01B2841FAA908D2793676e71a6Bbb7D2838aeDa
DefaultPool         0x9E5888347B021cd487Ad6FE7b82691AEb2eC11de
CollSurplusPool     0x88b1d679771F0cD0bF80234e00073012F3a40f08
FunctionCaller      0xb0441e9262C2786db98a4A83bc5EF5Eb4A83aA17
BorrowerOperations  0x8826968921217d6813Bbd82EfCE983c99aF70BFF
HintHelpers         0x4B2E75cCdB46FEB86b474b49C8Cee7B430b310D4

Frontend vars (put this in frontend/*.env):

NEXT_PUBLIC_CONTRACT_PRICE_FEED_TESTNET=0xCF389CE0CD7DfF99689eeB56029A28fa965Fe89E
NEXT_PUBLIC_CONTRACT_BOLD_TOKEN=0x84A85A35AF520fC2884167Fc62Fb7605a454A102
NEXT_PUBLIC_CONTRACT_SORTED_TROVES=0xbEc2096Ef1FDfA8A5c876d900DDD9570d1471572
NEXT_PUBLIC_CONTRACT_TROVE_MANAGER=0x88400A8e74619127C301B3d8aC7BBd8A08b76f9f
NEXT_PUBLIC_CONTRACT_ACTIVE_POOL=0x6845beebdEc1B7EcB4e30Bc50467D9f7d66733Fd
NEXT_PUBLIC_CONTRACT_STABILITY_POOL=0xefaC809C80e25039799EB11b70E157752DC9869e
NEXT_PUBLIC_CONTRACT_GAS_POOL=0xC01B2841FAA908D2793676e71a6Bbb7D2838aeDa
NEXT_PUBLIC_CONTRACT_DEFAULT_POOL=0x9E5888347B021cd487Ad6FE7b82691AEb2eC11de
NEXT_PUBLIC_CONTRACT_COLL_SURPLUS_POOL=0x88b1d679771F0cD0bF80234e00073012F3a40f08
NEXT_PUBLIC_CONTRACT_FUNCTION_CALLER=0xb0441e9262C2786db98a4A83bc5EF5Eb4A83aA17
NEXT_PUBLIC_CONTRACT_BORROWER_OPERATIONS=0x8826968921217d6813Bbd82EfCE983c99aF70BFF
NEXT_PUBLIC_CONTRACT_HINT_HELPERS=0x4B2E75cCdB46FEB86b474b49C8Cee7B430b310D4

Copy link
Collaborator

@bingen bingen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bpierre bpierre merged commit 71e23f8 into main Mar 19, 2024
5 of 6 checks passed
@bpierre bpierre deleted the deployment-dev branch March 19, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants