diff --git a/.github/workflows/contracts-confidential-token-wrappers-registry-tests.yml b/.github/workflows/contracts-confidential-token-wrappers-registry-tests.yml index c36c132..66a8b44 100644 --- a/.github/workflows/contracts-confidential-token-wrappers-registry-tests.yml +++ b/.github/workflows/contracts-confidential-token-wrappers-registry-tests.yml @@ -3,7 +3,9 @@ name: contracts-confidential-token-wrappers-registry-tests on: pull_request: - + paths: + - '.github/workflows/contracts-confidential-token-wrappers-registry-tests.yml' + - 'contracts/confidential-token-wrappers-registry/**' push: branches: - main @@ -16,31 +18,8 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: - check-changes: - name: contracts-confidential-token-wrappers-registry-tests/check-changes - permissions: - actions: 'read' # Required to read workflow run information - contents: 'read' # Required to checkout repository code - pull-requests: 'read' # Required to read pull request information - runs-on: ubuntu-latest - outputs: - changes-contracts-confidential-token-wrappers-registry: ${{ steps.filter.outputs.contracts-confidential-token-wrappers-registry }} - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: 'false' - fetch-depth: ${{ github.event_name == 'push' && 0 || 1 }} - - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 - id: filter - with: - filters: | - contracts-confidential-token-wrappers-registry: - - .github/workflows/contracts-confidential-token-wrappers-registry-tests.yml - - contracts/confidential-token-wrappers-registry/** tests: name: contracts-confidential-token-wrappers-registry-tests/tests (bpr) - needs: check-changes - if: ${{ needs.check-changes.outputs.changes-contracts-confidential-token-wrappers-registry == 'true' }} runs-on: ubuntu-latest permissions: contents: 'read' # Required to checkout repository code diff --git a/.github/workflows/contracts-confidential-wrapper-tests.yml b/.github/workflows/contracts-confidential-wrapper-tests.yml index 477712b..51d8c39 100644 --- a/.github/workflows/contracts-confidential-wrapper-tests.yml +++ b/.github/workflows/contracts-confidential-wrapper-tests.yml @@ -3,7 +3,9 @@ name: contracts-confidential-wrapper-tests on: pull_request: - + paths: + - '.github/workflows/contracts-confidential-wrapper-tests.yml' + - 'contracts/confidential-wrapper/**' push: branches: - main @@ -16,31 +18,8 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: - check-changes: - name: contracts-confidential-wrapper-tests/check-changes - permissions: - actions: 'read' # Required to read workflow run information - contents: 'read' # Required to checkout repository code - pull-requests: 'read' # Required to read pull request information - runs-on: ubuntu-latest - outputs: - changes-contracts-confidential-wrapper: ${{ steps.filter.outputs.contracts-confidential-wrapper }} - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: 'false' - fetch-depth: ${{ github.event_name == 'push' && 0 || 1 }} - - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 - id: filter - with: - filters: | - contracts-confidential-wrapper: - - .github/workflows/contracts-confidential-wrapper-tests.yml - - contracts/confidential-wrapper/** tests: name: contracts-confidential-wrapper-tests/tests (bpr) - needs: check-changes - if: ${{ needs.check-changes.outputs.changes-contracts-confidential-wrapper == 'true' }} runs-on: ubuntu-latest permissions: contents: 'read' # Required to checkout repository code diff --git a/.github/workflows/contracts-fees-burner-tests.yml b/.github/workflows/contracts-fees-burner-tests.yml new file mode 100644 index 0000000..08dfd61 --- /dev/null +++ b/.github/workflows/contracts-fees-burner-tests.yml @@ -0,0 +1,38 @@ +# Run tests +name: contracts-fees-burner-tests + +on: + pull_request: + paths: + - '.github/workflows/contracts-fees-burner-tests.yml' + - 'contracts/feesBurner/**' + push: + branches: + - main + workflow_dispatch: + +permissions: {} + +concurrency: + group: ci-contracts-fees-burner-tests-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + tests: + name: contracts-fees-burner-tests/tests (bpr) + runs-on: ubuntu-latest + permissions: + contents: 'read' # Required to checkout repository code + steps: + - name: Checkout project + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: 'false' + + - name: Install dependencies + working-directory: contracts/feesBurner + run: npm ci + + - name: Run unit tests + working-directory: contracts/feesBurner + run: npx hardhat test diff --git a/.github/workflows/contracts-governance-tests.yml b/.github/workflows/contracts-governance-tests.yml new file mode 100644 index 0000000..ee471cf --- /dev/null +++ b/.github/workflows/contracts-governance-tests.yml @@ -0,0 +1,54 @@ +# Run tests +name: contracts-governance-tests + +on: + pull_request: + paths: + - '.github/workflows/contracts-governance-tests.yml' + - 'contracts/governance/**' + push: + branches: + - main + workflow_dispatch: + +permissions: {} + +concurrency: + group: ci-contracts-governance-tests-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + tests: + name: contracts-governance-tests/tests (bpr) + runs-on: ubuntu-latest + permissions: + contents: 'read' # Required to checkout repository code + steps: + - name: Checkout project + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: 'false' + + - name: Install pnpm + uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 + with: + version: 9 + + - name: Setup Node + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version: 20.x + cache: pnpm + cache-dependency-path: contracts/governance/pnpm-lock.yaml + + - name: Install dependencies + working-directory: contracts/governance + run: pnpm install --frozen-lockfile + + - name: Run compile + working-directory: contracts/governance + run: pnpm run compile + + - name: Run unit tests + working-directory: contracts/governance + run: pnpm test diff --git a/.github/workflows/contracts-pauser-set-wrapper-tests.yml b/.github/workflows/contracts-pauser-set-wrapper-tests.yml new file mode 100644 index 0000000..e5ded07 --- /dev/null +++ b/.github/workflows/contracts-pauser-set-wrapper-tests.yml @@ -0,0 +1,38 @@ +# Run tests +name: contracts-pauser-set-wrapper-tests + +on: + pull_request: + paths: + - '.github/workflows/contracts-pauser-set-wrapper-tests.yml' + - 'contracts/pauserSetWrapper/**' + push: + branches: + - main + workflow_dispatch: + +permissions: {} + +concurrency: + group: ci-contracts-pauser-set-wrapper-tests-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + tests: + name: contracts-pauser-set-wrapper-tests/tests (bpr) + runs-on: ubuntu-latest + permissions: + contents: 'read' # Required to checkout repository code + steps: + - name: Checkout project + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: 'false' + + - name: Install dependencies + working-directory: contracts/pauserSetWrapper + run: npm ci + + - name: Run unit tests + working-directory: contracts/pauserSetWrapper + run: make test diff --git a/.github/workflows/contracts-safe-hardhat-tests.yml b/.github/workflows/contracts-safe-hardhat-tests.yml new file mode 100644 index 0000000..693cb4c --- /dev/null +++ b/.github/workflows/contracts-safe-hardhat-tests.yml @@ -0,0 +1,42 @@ +# Run tests +name: contracts-safe-tests + +on: + pull_request: + paths: + - '.github/workflows/contracts-safe-hardhat-tests.yml' + - 'contracts/safe/**' + push: + branches: + - main + workflow_dispatch: + +permissions: {} + +concurrency: + group: ci-contracts-safe-tests-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + tests: + name: contracts-safe-tests/tests (bpr) + runs-on: ubuntu-latest + permissions: + contents: 'read' # Required to checkout repository code + steps: + - name: Checkout project + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: 'false' + + - name: Setup env + working-directory: contracts/safe + run: cp .env.example.test .env.example + + - name: Install dependencies + working-directory: contracts/safe + run: npm ci + + - name: Run unit tests + working-directory: contracts/safe + run: make test diff --git a/.github/workflows/contracts-solana-oft-tests.yml b/.github/workflows/contracts-solana-oft-tests.yml new file mode 100644 index 0000000..68434f9 --- /dev/null +++ b/.github/workflows/contracts-solana-oft-tests.yml @@ -0,0 +1,53 @@ +# Run tests +name: contracts-solana-oft-tests + +on: + pull_request: + paths: + - '.github/workflows/contracts-solana-oft-tests.yml' + - 'contracts/solanaOFT/**' + push: + branches: + - main + workflow_dispatch: + +permissions: {} + +concurrency: + group: ci-contracts-solana-oft-tests-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + tests: + name: contracts-solana-oft-tests/tests (bpr) + runs-on: ubuntu-latest + permissions: + contents: 'read' # Required to checkout repository code + steps: + - name: Checkout project + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: 'false' + + - name: Install pnpm + uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 + with: + version: 9 + + - name: Setup Node + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version: 20.x + cache: pnpm + cache-dependency-path: contracts/solanaOFT/pnpm-lock.yaml + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@8789b3e21e6c11b2697f5eb56eddae542f746c10 # v1.7.0 + + - name: Install dependencies + working-directory: contracts/solanaOFT + run: pnpm install --frozen-lockfile + + - name: Run unit tests + working-directory: contracts/solanaOFT + run: pnpm run test:forge diff --git a/.github/workflows/contracts-staking-hardhat-tests.yml b/.github/workflows/contracts-staking-hardhat-tests.yml index a88c38d..8fdbb67 100644 --- a/.github/workflows/contracts-staking-hardhat-tests.yml +++ b/.github/workflows/contracts-staking-hardhat-tests.yml @@ -3,7 +3,9 @@ name: contracts-staking-tests on: pull_request: - + paths: + - '.github/workflows/contracts-staking-hardhat-tests.yml' + - 'contracts/staking/**' push: branches: - main @@ -16,31 +18,8 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: - check-changes: - name: contracts-staking-tests/check-changes - permissions: - actions: 'read' # Required to read workflow run information - contents: 'read' # Required to checkout repository code - pull-requests: 'read' # Required to read pull request information - runs-on: ubuntu-latest - outputs: - changes-contracts-staking: ${{ steps.filter.outputs.contracts-staking }} - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: 'false' - fetch-depth: ${{ github.event_name == 'push' && 0 || 1 }} - - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 - id: filter - with: - filters: | - contracts-staking: - - .github/workflows/contracts-staking-tests.yml - - contracts/staking/** tests: name: contracts-staking-tests/tests (bpr) - needs: check-changes - if: ${{ needs.check-changes.outputs.changes-contracts-staking == 'true' }} runs-on: ubuntu-latest permissions: contents: 'read' # Required to checkout repository code diff --git a/.github/workflows/contracts-token-tests.yml b/.github/workflows/contracts-token-tests.yml new file mode 100644 index 0000000..c1e7f63 --- /dev/null +++ b/.github/workflows/contracts-token-tests.yml @@ -0,0 +1,54 @@ +# Run tests +name: contracts-token-tests + +on: + pull_request: + paths: + - '.github/workflows/contracts-token-tests.yml' + - 'contracts/token/**' + push: + branches: + - main + workflow_dispatch: + +permissions: {} + +concurrency: + group: ci-contracts-token-tests-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + tests: + name: contracts-token-tests/tests (bpr) + runs-on: ubuntu-latest + permissions: + contents: 'read' # Required to checkout repository code + steps: + - name: Checkout project + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: 'false' + + - name: Install pnpm + uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 + with: + version: 9 + + - name: Setup Node + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version: 20.x + cache: pnpm + cache-dependency-path: contracts/token/pnpm-lock.yaml + + - name: Install dependencies + working-directory: contracts/token + run: pnpm install --frozen-lockfile + + - name: Run compile + working-directory: contracts/token + run: pnpm run compile + + - name: Run unit tests + working-directory: contracts/token + run: pnpm test diff --git a/contracts/solanaOFT/foundry.toml b/contracts/solanaOFT/foundry.toml index 9819f07..24b00e5 100644 --- a/contracts/solanaOFT/foundry.toml +++ b/contracts/solanaOFT/foundry.toml @@ -1,5 +1,5 @@ [profile.default] -solc-version = '0.8.22' +solc = '0.8.24' src = 'contracts' out = 'out' test = 'test/foundry'