generated from PaulRBerg/hardhat-template
-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add deployment workflow for ERC-20 token
build: set up Etherscan API and Infura PRC in Foundry config chore: add mnemonic in ".env.example"
- Loading branch information
Showing
3 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export ETH_FROM="YOUR_DEFAULT_SENDER_ACCOUNT" | ||
export ETH_RPC_URL="https://rinkeby.infura.io/v3/INFURA_API_KEY" | ||
API_KEY_ETHERSCAN="YOUR_API_KEY_ETHERSCAN" | ||
API_KEY_INFURA="YOUR_API_KEY_INFURA" | ||
MNEMONIC="YOUR_MNEMONIC" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: "Deploy Test Token" | ||
|
||
env: | ||
API_KEY_ETHERSCAN: ${{ secrets.API_KEY_ETHERSCAN }} | ||
API_KEY_INFURA: ${{ secrets.API_KEY_INFURA }} | ||
MNEMONIC: ${{ secrets.MNEMONIC }} | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
chain: | ||
default: "goerli" | ||
description: 'Chain name. Defaults to "goerli" if unspecified' | ||
required: false | ||
|
||
jobs: | ||
deploy-test-token: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Check out the repo" | ||
uses: "actions/checkout@v3" | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: "Install Foundry" | ||
uses: "foundry-rs/foundry-toolchain@v1" | ||
|
||
- name: "Deploy a test ERC-20 token contract" | ||
run: >- | ||
forge script script/deploy/DeployTestToken.s.sol --broadcast --rpc-url "${{ github.event.inputs.chain }}" | ||
-vvvv | ||
- name: "Add summary" | ||
run: | | ||
echo "## Deployment result" >> $GITHUB_STEP_SUMMARY | ||
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters