From 5baaaf7bf01b4ecde5e273e16fec4ee94157b336 Mon Sep 17 00:00:00 2001 From: drewstone Date: Mon, 10 Jul 2023 03:54:14 -0600 Subject: [PATCH] Update events for ease of relayer operations (#669) * Update events for ease of relayer operations * Add comment * Clippy * Updates for CI and version bumps in test suite * Update yarn.lock * Fix lint * Fix up README --- .dockerignore | 1 - .github/workflows/e2e.yml | 164 - .licenserc.yaml | 2 - README.md | 188 +- dkg-runtime-primitives/src/proposal.rs | 2 +- dkg-test-suite/.envrc | 5 - dkg-test-suite/.gitignore | 1 - dkg-test-suite/.husky/pre-commit | 4 - dkg-test-suite/.mocharc.json | 4 - dkg-test-suite/.nvmrc | 1 - dkg-test-suite/.prettierrc.json | 6 - dkg-test-suite/README.md | 16 - dkg-test-suite/package.json | 62 - dkg-test-suite/scripts/submitProposals.ts | 137 - dkg-test-suite/solidity-fixtures.dvc | 12 - dkg-test-suite/tests/blueprint.test.ts | 25 - .../tests/e2e/keygenChanges.test.ts | 222 - .../tests/e2e/misbehaviourReporting.test.ts | 282 - .../tests/maxDepositLimitProposal.test.ts | 115 - .../tests/minWithdrawalLimit.test.ts | 113 - dkg-test-suite/tests/proposals.test.ts | 65 - .../tests/rescueTokensProposal.test.ts | 289 - .../tests/resourceIdUpdateProposal.test.ts | 147 - dkg-test-suite/tests/threshold.test.ts | 59 - .../tests/tokenUpdateProposal.test.ts | 209 - .../tests/updateAnchorProposal.test.ts | 197 - dkg-test-suite/tests/updateGovernor.test.ts | 72 - dkg-test-suite/tests/utils/constants.ts | 23 - dkg-test-suite/tests/utils/setup.ts | 418 - dkg-test-suite/tests/utils/util.ts | 258 - .../tests/wrappingFeeUpdateProposal.test.ts | 112 - dkg-test-suite/tsconfig.json | 101 - dkg-test-suite/yarn.lock | 16742 ---------------- pallets/dkg-metadata/src/benchmarking.rs | 6 +- pallets/dkg-metadata/src/lib.rs | 80 +- types/package.json | 6 +- types/src/interfaces/augment-api-consts.ts | 37 +- types/src/interfaces/augment-api-errors.ts | 12 +- types/src/interfaces/augment-api-events.ts | 29 +- types/src/interfaces/augment-api-query.ts | 48 +- types/src/interfaces/augment-api-tx.ts | 50 +- types/src/interfaces/lookup.ts | 189 +- types/src/interfaces/registry.ts | 4 +- types/src/interfaces/types-lookup.ts | 209 +- types/src/metadata/metadata.json | 2 +- types/src/metadata/static-latest.ts | 2 +- 46 files changed, 293 insertions(+), 20435 deletions(-) delete mode 100644 .github/workflows/e2e.yml delete mode 100644 dkg-test-suite/.envrc delete mode 100644 dkg-test-suite/.gitignore delete mode 100755 dkg-test-suite/.husky/pre-commit delete mode 100644 dkg-test-suite/.mocharc.json delete mode 100644 dkg-test-suite/.nvmrc delete mode 100644 dkg-test-suite/.prettierrc.json delete mode 100644 dkg-test-suite/README.md delete mode 100644 dkg-test-suite/package.json delete mode 100755 dkg-test-suite/scripts/submitProposals.ts delete mode 100644 dkg-test-suite/solidity-fixtures.dvc delete mode 100644 dkg-test-suite/tests/blueprint.test.ts delete mode 100644 dkg-test-suite/tests/e2e/keygenChanges.test.ts delete mode 100644 dkg-test-suite/tests/e2e/misbehaviourReporting.test.ts delete mode 100644 dkg-test-suite/tests/maxDepositLimitProposal.test.ts delete mode 100644 dkg-test-suite/tests/minWithdrawalLimit.test.ts delete mode 100644 dkg-test-suite/tests/proposals.test.ts delete mode 100644 dkg-test-suite/tests/rescueTokensProposal.test.ts delete mode 100644 dkg-test-suite/tests/resourceIdUpdateProposal.test.ts delete mode 100644 dkg-test-suite/tests/threshold.test.ts delete mode 100644 dkg-test-suite/tests/tokenUpdateProposal.test.ts delete mode 100644 dkg-test-suite/tests/updateAnchorProposal.test.ts delete mode 100644 dkg-test-suite/tests/updateGovernor.test.ts delete mode 100644 dkg-test-suite/tests/utils/constants.ts delete mode 100644 dkg-test-suite/tests/utils/setup.ts delete mode 100644 dkg-test-suite/tests/utils/util.ts delete mode 100644 dkg-test-suite/tests/wrappingFeeUpdateProposal.test.ts delete mode 100644 dkg-test-suite/tsconfig.json delete mode 100644 dkg-test-suite/yarn.lock diff --git a/.dockerignore b/.dockerignore index a445c6680..ce3552ba4 100644 --- a/.dockerignore +++ b/.dockerignore @@ -22,4 +22,3 @@ scripts/ docker/ .github/ docs/ -dkg-test-suite/ diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml deleted file mode 100644 index 1bcc14abb..000000000 --- a/.github/workflows/e2e.yml +++ /dev/null @@ -1,164 +0,0 @@ -name: run - -on: - push: - branches: [master] - pull_request: - workflow_dispatch: - -env: - CARGO_REGISTRIES_CRATES_IO_PROTOCOL: git - -jobs: - # dkg-substrate integration tests - e2e: - name: e2e-tests - runs-on: ubuntu-latest - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} - - - name: Checkout Code - uses: actions/checkout@v3 - - - name: Configure sccache - run: | - echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV - echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV - - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.3 - - - name: Restore Cache - if: always() - uses: actions/cache/restore@v3 - with: - path: | - ~/.cargo/registry - target/release - target/debug - key: ${{ runner.os }}-cargo-index-${{ github.ref_name }}-e2e - - - name: Install toolchain - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - - - name: Install Nodejs - uses: actions/setup-node@v3 - with: - node-version-file: "./dkg-test-suite/.nvmrc" - cache: "yarn" - cache-dependency-path: "./dkg-test-suite/yarn.lock" - - - name: Setup DVC - uses: iterative/setup-dvc@v1 - - - name: Populate fixtures - run: dvc pull - - - name: Install Protobuf - run: sudo apt-get install protobuf-compiler - - - name: Install Packages - run: cd dkg-test-suite && yarn install --frozen-lockfile - - - name: Setup DVC - uses: iterative/setup-dvc@v1 - - - name: Populate Fixtures - run: dvc pull - - - name: Build Standalone Node for E2E Tests (Release) - run: cargo build --release -p dkg-standalone-node --features integration-tests - - - name: Run E2E Tests - run: cd dkg-test-suite && yarn test:e2e - - - name: Save Cache - if: ${{ !cancelled() }} - uses: actions/cache/save@v3 - with: - path: | - ~/.cargo/registry - target/release - target/debug - key: ${{ runner.os }}-cargo-index-${{ github.ref_name }}-e2e - - integration-tests: - name: integration-tests - runs-on: ubuntu-latest - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} - - - name: Checkout Code - uses: actions/checkout@v3 - - - name: Configure sccache - run: | - echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV - echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV - - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.3 - - - name: Restore Cache - if: always() - uses: actions/cache/restore@v3 - with: - path: | - ~/.cargo/registry - target/release - target/debug - key: ${{ runner.os }}-cargo-index-${{ github.ref_name }}-integration-tests - - - name: Install toolchain - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - - - name: Install Nodejs - uses: actions/setup-node@v3 - with: - node-version-file: "./dkg-test-suite/.nvmrc" - cache: "yarn" - cache-dependency-path: "./dkg-test-suite/yarn.lock" - - - name: Setup DVC - uses: iterative/setup-dvc@v1 - - - name: Populate fixtures - run: dvc pull - - - name: Install Protobuf - run: sudo apt-get install protobuf-compiler - - - name: Install Packages - run: cd dkg-test-suite && yarn install --frozen-lockfile - - - name: Setup DVC - uses: iterative/setup-dvc@v1 - - - name: Populate Fixtures - run: dvc pull - - - name: Build Standalone Node for Integration Tests (Release) - run: cargo build --release -p dkg-standalone-node - - - name: Run Proposals E2E Tests - run: cd dkg-test-suite && yarn test:proposals - - - name: Save Cache - if: ${{ !cancelled() }} - uses: actions/cache/save@v3 - with: - path: | - ~/.cargo/registry - target/release - target/debug - key: ${{ runner.os }}-cargo-index-${{ github.ref_name }}-integration-tests diff --git a/.licenserc.yaml b/.licenserc.yaml index 990cff876..16e075539 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -31,8 +31,6 @@ header: - '**/*.lock' - '**/*.toml' - '**/*.yaml' - - 'dkg-test-suite/.husky/pre-commit' - - 'dkg-test-suite/solidity-fixtures/*' - '.nvmrc' - 'jest.config.js' - '**/*.sh' diff --git a/README.md b/README.md index db67979fd..58bfe2a01 100644 --- a/README.md +++ b/README.md @@ -17,20 +17,14 @@
Table of Contents