Skip to content
Open
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
45 changes: 7 additions & 38 deletions .github/workflows/contract-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@ on:
push:
paths:
- "contracts/**"
- ".github/workflows/contract-test.yaml"
- ".github/workflows/contract-test.yml"
pull_request:
paths:
- "contracts/**"
- ".github/workflows/contract-test.yaml"

env:
ENDPOINT_URL: ${{ vars.ENDPOINT_URL }}
NFT_OWNER: ${{ vars.NFT_OWNER }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
- ".github/workflows/contract-test.yml"

permissions:
contents: read
Expand All @@ -26,30 +20,13 @@ jobs:
- uses: foundry-rs/foundry-toolchain@v1
- uses: oven-sh/setup-bun@v2

- name: "Install the Node.js dependencies"
- name: "Install dependencies"
working-directory: ./contracts
run: bun install

- name: Set Hardhat Variables
working-directory: ./contracts
run: |
npx hardhat vars set ENDPOINT_URL "${{ vars.ENDPOINT_URL }}"
npx hardhat vars set PRIVATE_KEY "${{ secrets.PRIVATE_KEY }}"
npx hardhat vars set ALCHEMY_KEY "${{ secrets.ALCHEMY_KEY }}"


- name: "Build the contracts"
working-directory: ./contracts
run: npx hardhat compile --force

# - name: "Build the contracts and print their size"
# working-directory: ./contracts
# run: forge build --sizes

# - name: "Add build summary"
# working-directory: ./contracts
# run: |
# echo "## Build result" >> $GITHUB_STEP_SUMMARY
# echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
run: forge build

test:
needs: ["build"]
Expand All @@ -58,23 +35,15 @@ jobs:
- uses: actions/checkout@v4
- uses: foundry-rs/foundry-toolchain@v1
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v4

- name: Install Dependencies
- name: "Install dependencies"
working-directory: ./contracts
run: bun install

- name: Set Hardhat Variables
working-directory: ./contracts
run: |
npx hardhat vars set ENDPOINT_URL "${{ vars.ENDPOINT_URL }}"
npx hardhat vars set PRIVATE_KEY "${{ secrets.PRIVATE_KEY }}"
npx hardhat vars set ALCHEMY_KEY "${{ secrets.ALCHEMY_KEY }}"

- name: "Show the Foundry config"
working-directory: ./contracts
run: forge config

- name: Run Tests
working-directory: ./contracts
run: npx hardhat test --network hardhat
run: forge test -vvv
3 changes: 1 addition & 2 deletions contracts/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Settlus Contracts

Smart contracts for [Settlus](https://settlus.org).
Smart contracts for [Settlus](https://settlus.org). Mostly migrating [settlement](https://github.com/settlus/chain/tree/main/x/settlement) module from Settlus chain.

## Getting Started

Expand Down