-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alfonso de la Rocha <[email protected]> Co-authored-by: Mikers <[email protected]> Co-authored-by: raulk <[email protected]> Co-authored-by: snissn <[email protected]> Co-authored-by: auto-commit <[email protected]> Co-authored-by: Alfonso de la Rocha <[email protected]> Co-authored-by: adlrocha <[email protected]> Co-authored-by: raulk <[email protected]>
- Loading branch information
1 parent
003ac8f
commit 62f0d64
Showing
53 changed files
with
1,191 additions
and
590 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,44 @@ | ||
name: Contracts Deployment Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' # Adjust this as needed for your project | ||
|
||
- name: Install dependencies | ||
run: cd contracts && npm install | ||
|
||
- name: Install Foundry | ||
run: | | ||
cd contracts | ||
curl -L https://foundry.paradigm.xyz | bash | ||
export PATH="$PATH:/home/runner/.config/.foundry/bin" | ||
foundryup | ||
forge install | ||
- name: Generate Ethereum Private Key and Create .env File and run make | ||
run: | | ||
cd contracts | ||
PRIVATE_KEY=$(node -e "console.log(require('crypto').randomBytes(32).toString('hex'))") | ||
echo "export PRIVATE_KEY=0x$PRIVATE_KEY" > .env | ||
echo "export RPC_URL=http://127.0.0.1:1337" >> .env | ||
echo "export CHAIN_ID=1337" >> .env | ||
export PATH="$PATH:/home/runner/.config/.foundry/bin" | ||
npx ganache-cli -g0 -p1337 --account 0x$PRIVATE_KEY,1001901919191919191 & | ||
sleep 5 | ||
make deploy-ipc |
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,4 +1,4 @@ | ||
name: NPM Audit | ||
name: Contracts NPM Audit | ||
|
||
# This workflow is triggered from the main CI workflow. | ||
on: | ||
|
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
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,4 +1,4 @@ | ||
name: Storage check | ||
name: Contracts Storage check | ||
|
||
# This workflow is triggered from the main CI workflow. | ||
on: | ||
|
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,4 +1,4 @@ | ||
name: Tests | ||
name: Contracts Tests | ||
|
||
# This workflow is triggered from the main CI workflow. | ||
on: | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,19 @@ | ||
#!/bin/bash | ||
# Upgrades IPC Gateway Diamond Facets on an EVM-compatible subnet using hardhat | ||
set -e | ||
|
||
if [ $# -ne 1 ] | ||
then | ||
echo "Expected a single argument with the name of the network to deploy (localnet, calibrationnet, mainnet)" | ||
exit 1 | ||
fi | ||
|
||
NETWORK=$1 | ||
|
||
if [ "$NETWORK" = "auto" ]; then | ||
echo "[*] Automatically getting chainID for network" | ||
source ops/chain-id.sh | ||
fi | ||
|
||
|
||
npx hardhat deploy-subnet-registry --network ${NETWORK} |
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,20 @@ | ||
#!/bin/bash | ||
# Upgrades IPC Gateway Diamond Facets on an EVM-compatible subnet using hardhat | ||
set -e | ||
|
||
if [ $# -ne 1 ] | ||
then | ||
echo "Expected a single argument with the name of the network to deploy (localnet, calibrationnet, mainnet)" | ||
exit 1 | ||
fi | ||
|
||
NETWORK=$1 | ||
|
||
if [ "$NETWORK" = "auto" ]; then | ||
echo "[*] Automatically getting chainID for network" | ||
source ops/chain-id.sh | ||
fi | ||
|
||
|
||
npx hardhat deploy-sa-diamond-and-facets --network ${NETWORK} | ||
|
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
Oops, something went wrong.