-
Notifications
You must be signed in to change notification settings - Fork 11
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
build: Add contracts compile and deploy job #114
Conversation
5425fa7
to
f06e431
Compare
f06e431
to
b3551c7
Compare
echo "# TODO" | ||
cd hardhat | ||
npm ci | ||
doppler run -- npx hardhat deploy --network geth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy implicitly compiles the contracts.
@@ -27,16 +27,16 @@ const config: HardhatUserConfig = { | |||
geth: { | |||
url: 'http://localhost:8545', | |||
chainId: 1337, | |||
accounts: PRIVATE_KEYS, | |||
accounts: [getAccount('admin').privateKey] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have my suspicions that these may affect the development setup of the blockchain node.
Could you clear, run, fund and boot to verify this did not impact anything there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked and run, fund, and boot for the chain all work with this change in local development.
The reason I think this is safe is the deploy scripts (https://github.com/Lilypad-Tech/lilypad/tree/main/hardhat/deploy) only deploy and excute commands from admin
.
The public addresses for the other users appear to be configured here:
lilypad/hardhat/hardhat.config.ts
Line 24 in afbf4f8
namedAccounts: ACCOUNT_ADDRESSES, |
And they are referenced, but admin does all the work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for verifying.
hardhat/hardhat.config.ts
Outdated
@@ -15,6 +15,7 @@ const ENV_FILE = process.env.DOTENV_CONFIG_PATH || '../.env' | |||
dotenv.config({ path: ENV_FILE }) | |||
|
|||
const NETWORK = process.env.NETWORK || "geth"; | |||
const NETWORK_URL = process.env.WEB3_RPC_URL || 'http://localhost:8545'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we give this a different name? From the way the env var WEB3_RPC_URL
is used all around it points to the websocket endpoint (which for dev is localhost:8546
), maybe WEB3_HTTP_URL
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good point. Updated it to WEB3_HTTP_URL
.
fd76524
to
6860a24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 🎉 thank you @bgins !
6860a24
to
340c32f
Compare
Review Type Requested (choose one):
Summary
This pull request adds a GH action job to compile and deploy smart contracts to devnet.
Task/Issue reference
Closes: #92
Details (optional)
This pull request implements the following changes:
Note that this version of the job will deploy every time. We will want to check if re-deployment is necessary in a future PR.
We'll test this on
main
when we merge in #111, but a test run on this branch can be seen here: https://github.com/Lilypad-Tech/lilypad/actions/runs/9212958660/job/25345761697