Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evmos stg #1

Merged
merged 208 commits into from
Sep 5, 2024
Merged

Evmos stg #1

merged 208 commits into from
Sep 5, 2024

Conversation

DenSmolonski
Copy link
Collaborator

No description provided.

iamacook and others added 30 commits May 16, 2024 12:35
Adds and uses JSON conversion helpers for converting non-JSON datatypes (e.g. Date objects) in locking tests:

- Add `Campaign`-specific `toJson` helper
- Add `LockEventItem | UnlockEventItem | WithdrawEventItem`-specific `toJson` helper
- Use the above in their respective tests
Migrates from static to dynamic mock data for the imitation transaction tests.
Changes Campaign.lastUpdated to optional.
Ensures that the mocked imitation transfers _always_ have a `value` above `0`:

- Set a minimum value of >0 for transfers in imitation transaction tests
Adds GET /v1/locking/campaigns/:campaignId/leaderboard endpoint mapping.
…l#1560)

Moves all Locking Service-related routes under `/community`, aligning with the domain of the Activity Program:

- Rename `Locking-` module, controller, service to `Community-`.
- Rename the following (as of yet unused) routes:
  - `GET` `/v1/locking/campaigns` ->`/v1/community/campaigns`
  - `GET` `/v1/locking/campaigns/:campaignId` ->`/v1/community/campaigns/:campaignId`
  - `GET` `/v1/locking/campaigns/:campaignId/leaderboard` -> `/v1/community/campaigns/:campaignId/leaderboard`
- Rename the following (and deprecate with a redirection of the currently used) routes:
  - `GET` `/v1/locking/leaderboard` -> `/v1/community/locking/leaderboard`
  - `GET` `/v1/locking/leaderboard/rank/:safeAddress` -> `/v1/community/locking/:safeAddress/rank`
  - `GET` `/v1/locking/:safeAddress/history` -> `/v1/community/locking/:safeAddress/history`
Adds validation of the campaign retrieved by ID:

- Add `CampaignSchema` parsing to `ILockingService['getCampaignById']`
- Unskip relevant test
Renames "locking" domain to "community" - the folder and all related components within it:

- `/src/domain/locking` -> `/src/domain/community`
- `ILockingRepository`-> `ICommunityRepository`
- `LockingRepository` -> `CommunityRepository`
- `LockingDomainModule` -> `CommunityDomainModule`
Renames all instances of "rank" to be lock-specific:

- `ILockingApi['getRank']` -> `ILockingApi['getLockingRank']`
- `ICommunityRepository['getRank']` -> `ICommunityRepository['getLockingRank']`
- `RankSchema` -> `LockingRankSchema`
- `RankPageSchema` -> `LockingRankPageSchema`
- `Rank` -> `LockingRank`
- `RankPage` -> `LockingRankPage`
- `rankBuilder` -> `lockRankBuilder`
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
updated-dependencies:
- dependency-name: "@safe-global/safe-deployments"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
updated-dependencies:
- dependency-name: viem
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Aligns `ActivityMetadata` entity by removing `resourceId` and changing `maxPoints` to a number:

- Remove `resourceId` and change `maxPoints` to number in `ActivityMetadataSchema`
- Update `ActivityMetadata` to reflect changes
- Update tests accordingly
Add ICommunityRespository['getCampaignRank'] and implementation
Add CommunityController['getCampaignRank]` under aforementioned route
Change boost, points, and boostedPoints to numbers in CampaignRank.
Renames points to totalPoints and boostedPoints to totalBoostedPoints in CampaignRankSchema.
…lobal#1567)

Checksums the incoming `safeAddress` of `BalancesController['getBalances']` and propagates the stricter (`0x${string}`) type throughout the project accordingly:

- Add validation pipe checksum to incoming `safeAddress` of `BalancesController['getBalances']`
- Update `safeAddress` argument of `BalancesService['getBalances | clearBalance']`
- Update `safeAddress` argument type of `IBalancesRepository['getBalances | clearBalance']` and all implementor
- Update `safeAddress` argument type of `IBalancesApi['getBalances']` and all implementors (Safe/Zerion)
- Update `safeAddress` type of Safe/Zerion balance cache
- Propagate type through getting Safe overviews, after checksumming address in `Caip10AddressesPipe`
- Update types/tests accordingly
Moves locking entities from `/routes/locking` to `/routes/community` folder for consistency:

- Move `/routes/locking/entities` to `/routes/community/entities`
- Update imports accordingly
Removes "legacy" locking routes:

- Remove `LockingController` (and test coverage)
- Remove `LockingModule` (and registration)
Pivots from using `getAddress` to parsing against a designated schema for CAIP-10 addresses, also adding verification of the `chainId`:

- Create `Caip10AddressPipeSchema`
- Parse incoming CAIP-10 addresses against schema
- Add test coverage
…obal#1566)

Enables `@typescript-eslint/no-unsafe-enum-comparison` lint rule and addresses instances where "unsafe" enum comparison occurs:

- Enable `@typescript-eslint/no-unsafe-enum-comparison` rule in `eslint.config.mjs`
- Fix all "unsafe" enum comparison
Enables the `@typescript-eslint/require-await` line rule and addresses instances where unnecessary `async` is used:

- Enable `@typescript-eslint/require-await` rule in `eslint.config.mjs`
- Remove all unnecessary uses of `async` and associated changes
…`null` (safe-global#1584)

Changes the validation of `MultisigTransaction['confirmationsRequired']` to also expect nullish values and default to `null` if no number is returned:

- Change `MultisigTransactionSchema['confirmationsRequired']` to expect a number or nullish values, defaulting to `null`
- Update instances where `confirmationsRequired` is references, falling back to the threshold of the Safe
- Add relative test coverage
…1585)

Changes the mock `appCode` value in "Gets Generic confirmation view if swap app is restricted" test of the `TransactionsViewController` tests to ensure it isn't the same as that of mocked `verifiedApp` value.
…tion is …" (safe-global#1586)

Reverts safe-global#1584

This adjustment is no longer necessary as it solved what was later to be deemed indexing issues.
dependabot bot and others added 28 commits July 16, 2024 09:09
Bumps [eslint](https://github.com/eslint/eslint) from 9.5.0 to 9.7.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v9.5.0...v9.7.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.2 to 5.5.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](microsoft/TypeScript@v5.5.2...v5.5.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [viem](https://github.com/wevm/viem) from 2.17.3 to 2.17.4.
- [Release notes](https://github.com/wevm/viem/releases)
- [Commits](https://github.com/wevm/viem/compare/viem@2.17.3...viem@2.17.4)

---
updated-dependencies:
- dependency-name: viem
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 7.15.0 to 7.16.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Adds cache management to AccountDatasource, along with its associated tests.
…afe-global#1771)

- Adds `dataTypeId` to `AccountDataSetting`.
- Changes `UpsertAccountDataSettingDto.id` to `UpsertAccountDataSettingDto.dataTypeId`.
- Both `AccountDataSetting.name` and `AccountDataSetting.description` were removed.
…e-global#1772)

Rename `Account.accountId` to `Account.id` on the route-level `Account` entity.
Adds a new `IPushNotificationsApi` datasource, initially implemented by FIrebase (Cloud Messaging).

## Changes

- Add new `IPushNotificationsApi` interface
- Implement above interface in `FirebaseCloudMessagingApiService`
- Add relative push notification configuration
Refactors `JwtService` to allow manually setting the issuer/secret when signing a token:

- Expose the option to specify issuer/secret to `JwtClient`, otherwise defaulting to env. vars. in `JwtService`
- Remove `options` that override claims on token, instead opting for their spec, e.g. `iat`, `nbf`, `exp` (instead of `issuedAt`, `notBefore`, `expiresIn`)
- Accept/return dates for the all spec. specific dateclaims
- Use `JwtService` in `FirebaseCloudMessagingApiService` instead of `jsonwebtoken`
- Update tests accordingly
…l#1775)

Removes `PUSH_NOTIFICATIONS_API_BASE_URI` from the environment variables checked at the service startup time, as a default value is provided on the `configuration.ts` file.
Add according test coverage for `FirebaseCloudMessagingApiService`.
Moves domain-considered logic from `CacheHooksService` to a new `HooksRepository` in the domain:

- Move domain logic from `CacheHooksService` to `HooksRepository`
- Propagate changes accordingly
Refactor route "cache-hooks" to be a more generic, also adding distinction between Transaction Service and Config. Service events:

- Rename `cache-hooks` to `hook` and the associated controller, service(s) and module accordingly
- Separate `EventType` into `TransactionEventType` and `ConfigEventType` and propagate changes
Adds `CounterfactualSafesDatasource`, database migration, and associated tests.
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](docker/setup-qemu-action@v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.2.2 to 29.2.3.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](kulshekhar/ts-jest@v29.2.2...v29.2.3)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [winston](https://github.com/winstonjs/winston) from 3.13.0 to 3.13.1.
- [Release notes](https://github.com/winstonjs/winston/releases)
- [Changelog](https://github.com/winstonjs/winston/blob/master/CHANGELOG.md)
- [Commits](winstonjs/winston@v3.13.0...v3.13.1)

---
updated-dependencies:
- dependency-name: winston
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [husky](https://github.com/typicode/husky) from 9.0.11 to 9.1.1.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](typicode/husky@v9.0.11...v9.1.1)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [semver](https://github.com/npm/node-semver) from 7.6.2 to 7.6.3.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.6.2...v7.6.3)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@nestjs/swagger](https://github.com/nestjs/swagger) from 7.3.1 to 7.4.0.
- [Release notes](https://github.com/nestjs/swagger/releases)
- [Changelog](https://github.com/nestjs/swagger/blob/master/.release-it.json)
- [Commits](nestjs/swagger@7.3.1...7.4.0)

---
updated-dependencies:
- dependency-name: "@nestjs/swagger"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Adds a feature flag to control Chain-related debugging logs: `configHooksDebugLogs`.
- Adds optional logging to `ConfigApi` when the `clearChain` function is executed (after the reception of a `CHAIN_UPDATED` event).
- Adds optional logging to `CacheFirstDatasource` when the `chain/chains` cache key is written in the cache.
)

- Adds `CachedQueryResolver` class, to be used to retrieve data from the service cache before executing a query.
Copy link

coderabbitai bot commented Sep 5, 2024

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@DenSmolonski DenSmolonski merged commit 593f715 into evmos Sep 5, 2024
9 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants