Skip to content

Commit

Permalink
feat: shared package & remove samples (#2)
Browse files Browse the repository at this point in the history
# 🤖 Linear

Closes GIT-72

## Description
Base `shared` package with events structure and removed samples

## Checklist before requesting a review

- [X] I have conducted a self-review of my code.
- [X] I have conducted a QA.
- [X] If it is a core feature, I have included comprehensive tests.
  • Loading branch information
0xkenj1 authored Oct 7, 2024
2 parents 8500783 + ce24c18 commit e7544bc
Show file tree
Hide file tree
Showing 37 changed files with 321 additions and 382 deletions.
1 change: 0 additions & 1 deletion apps/sample-app/.env.example

This file was deleted.

43 changes: 0 additions & 43 deletions apps/sample-app/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions apps/sample-app/package.json

This file was deleted.

18 changes: 0 additions & 18 deletions apps/sample-app/src/config/env.ts

This file was deleted.

1 change: 0 additions & 1 deletion apps/sample-app/src/config/index.ts

This file was deleted.

32 changes: 0 additions & 32 deletions apps/sample-app/src/index.ts

This file was deleted.

14 changes: 0 additions & 14 deletions apps/sample-app/src/stats/balances.controller.ts

This file was deleted.

1 change: 0 additions & 1 deletion apps/sample-app/src/stats/index.ts

This file was deleted.

39 changes: 0 additions & 39 deletions apps/sample-app/test/stats/controller/balances.controller.spec.ts

This file was deleted.

8 changes: 0 additions & 8 deletions apps/sample-app/tsconfig.build.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/sample-lib/src/exceptions/index.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/sample-lib/src/exceptions/invalidRpcUrl.exception.ts

This file was deleted.

5 changes: 0 additions & 5 deletions packages/sample-lib/src/external.ts

This file was deleted.

13 changes: 0 additions & 13 deletions packages/sample-lib/src/interfaces/blockchainProvider.interface.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/sample-lib/src/interfaces/index.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/sample-lib/src/internal.ts

This file was deleted.

26 changes: 0 additions & 26 deletions packages/sample-lib/src/providers/blockchainProvider.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/sample-lib/src/providers/index.ts

This file was deleted.

52 changes: 0 additions & 52 deletions packages/sample-lib/test/unit/blockchainProvider.spec.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/sample-lib/tsconfig.json

This file was deleted.

22 changes: 0 additions & 22 deletions packages/sample-lib/vitest.config.ts

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@ts-turborepo-boilerplate/sample-lib",
"name": "@grants-stack-indexer/shared",
"version": "0.0.1",
"private": true,
"description": "",
Expand Down Expand Up @@ -28,6 +28,6 @@
"test:cov": "vitest run --config vitest.config.ts --coverage"
},
"dependencies": {
"viem": "2.21.4"
"viem": "2.21.19"
}
}
1 change: 1 addition & 0 deletions packages/shared/src/external.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type { AnyProtocolEvent, Address } from "./internal.js";
File renamed without changes.
2 changes: 2 additions & 0 deletions packages/shared/src/internal.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export type { Address } from "viem";
export * from "./types/index.js";
20 changes: 20 additions & 0 deletions packages/shared/src/types/events/allo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Address } from "../../internal.js";

/**
* This type is used to represent a Allo events.
*/
export type AlloEvent = "PoolCreated";

/**
* This type maps Allo events to their respective parameters.
*/
export type AlloEventParams<T extends AlloEvent> = T extends "PoolCreated"
? PoolCreatedParams
: never;

// =============================================================================
// =============================== Event Parameters ============================
// =============================================================================
export type PoolCreatedParams = {
contractAddress: Address;
};
Loading

0 comments on commit e7544bc

Please sign in to comment.