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

fix: update deploy scripts to load env with env-cmd #58

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ jobs:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Write DEPLOYER_PRIVATE_KEY to .env
run: echo "DEPLOYER_PRIVATE_KEY=${{ vars.DEPLOYER_PRIVATE_KEY }}" >> packages/contracts/.env
- name: Run Tests
shell: bash
run: |
pnpm supersim &
pnpm deploy:contracts:ci
pnpm contracts:deploy:dev
pnpm e2e-test:ci
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@
"description": "",
"scripts": {
"dev": "mprocs",
"install:contracts": "cd packages/contracts && forge install",
"install:contracts": "pnpm nx run @superchainerc20-starter/contracts:install",
"contracts:update:rpcs": "pnpm nx run @superchainerc20-starter/contracts:update:rpcs",
"contracts:deploy:token": "pnpm nx run @superchainerc20-starter/contracts:deploy:token",
"update:toc": "doctoc README.md",
"e2e-test": "mprocs -c mprocs-e2e-test.yaml",
"init:env": "pnpm nx run-many --target=init:env",
"deploy:contracts:ci": "wait-port http://:8420/ready && cd packages/contracts && forge install && DEPLOY_CONFIG_PATH=/test/configs/test-deploy-config.toml forge script scripts/SuperchainERC20Deployer.s.sol --broadcast --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
"contracts:deploy:dev": "pnpm install:contracts && pnpm nx run @superchainerc20-starter/contracts:deploy:dev",
"e2e-test:ci": "pnpm nx run @superchainerc20-starter/e2e-test:test"
},
"license": "MIT",
"devDependencies": {
"cross-env": "^7.0.3",
"doctoc": "^2.2.1",
"env-cmd": "^10.1.0",
"mprocs": "^0.7.1",
"nx": "^20.0.7",
"prettier": "^3.3.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@superchainerc20-starter/contracts",
"main": "index.js",
"scripts": {
"deploy:dev": "source .env && wait-port http://:8420/ready && forge script scripts/SuperchainERC20Deployer.s.sol --broadcast --private-key $DEPLOYER_PRIVATE_KEY",
"deploy:token": "source .env && forge script scripts/SuperchainERC20Deployer.s.sol --broadcast --private-key $DEPLOYER_PRIVATE_KEY",
"deploy:dev": "env-cmd -f .env cross-env-shell 'wait-port http://:8420/ready && forge script scripts/SuperchainERC20Deployer.s.sol --broadcast --private-key $DEPLOYER_PRIVATE_KEY'",
"deploy:token": "env-cmd -f .env cross-env-shell 'forge script scripts/SuperchainERC20Deployer.s.sol --broadcast --private-key $DEPLOYER_PRIVATE_KEY'",
"update:rpcs": "cd ../.. && ./scripts/fetch-superchain-rpc-urls.sh",
"install": "forge install",
"build": "forge build",
Expand Down
25 changes: 25 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading