-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add deploy.yml|fix deploy gas estimate
- Loading branch information
Showing
3 changed files
with
52 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Test Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Test Deployment | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.20' | ||
|
||
- name: Install Go dependencies | ||
run: go get . | ||
|
||
- name: Setup Solidity Compiler v0.8.20 | ||
run: | | ||
wget https://github.com/ethereum/solidity/releases/download/v0.8.20/solc-static-linux | ||
chmod +x solc-static-linux | ||
sudo mv solc-static-linux /usr/local/bin/solc | ||
- name: Remove panic contracts | ||
run: | | ||
rm contracts/USDC.sol | ||
rm contracts/WETH.sol | ||
- name: Setup environment variables | ||
run: | | ||
echo "PRIVATE_KEY=${{ secrets.PRIVATE_KEY }}" >> $GITHUB_ENV | ||
echo "RPC_PROVIDER=${{ secrets.RPC_PROVIDER }}" >> $GITHUB_ENV | ||
echo "CHAIN_ID=59140" >> $GITHUB_ENV | ||
- name: Run script and Deployment contracts | ||
run: | | ||
go run main.go | ||
env: | ||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
RPC_PROVIDER: ${{ secrets.RPC_PROVIDER }} | ||
CHAIN_ID: 59140 |
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
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