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

Multi chain api #25

Merged
merged 43 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0a1aa5d
WIP
jtourkos May 21, 2024
6486837
solve merge conflicts
jtourkos May 23, 2024
3c4eb5f
WIP
jtourkos May 24, 2024
7bd92d0
WIP
jtourkos May 29, 2024
022c504
Merge branch 'accounts-and-streams' into try3
jtourkos May 29, 2024
d5c83d5
add multi chain totalEarded queries
jtourkos May 30, 2024
381fa86
refactor: add multi chain support for projects and drip list by IDs q…
jtourkos May 30, 2024
d12c485
refactor: add multi chain support for total minted and earned funds q…
jtourkos May 31, 2024
40765e9
refactor: support multi chain one time donation support queries
jtourkos Jun 3, 2024
6fdbd3a
refactor: add user and streams multi chain query support
jtourkos Jun 3, 2024
f4b1d22
refactor: remove hardcoded chains in stream queries and schema proper…
jtourkos Jun 5, 2024
8a2fdfe
Merge branch 'accounts-and-streams' into try3
jtourkos Jun 5, 2024
90220b8
refactor: abstract Given event queries logic
jtourkos Jun 5, 2024
a7d692f
refactor: abstract queries
jtourkos Jun 6, 2024
e00f5ef
fix: runtime error
jtourkos Jun 6, 2024
ea247d5
refactor: abstract SQL queries
jtourkos Jun 6, 2024
7543284
refactor: minor polish
jtourkos Jun 7, 2024
263d273
refactor: add missing total earned resolver in claimed project
jtourkos Jun 7, 2024
1b453c0
Merge branch 'accounts-and-streams' into multi-chain-api
jtourkos Jun 7, 2024
efd7b74
refactor: remove limit in queries
jtourkos Jun 7, 2024
53c96f8
refactor: remove limit in queries (leftovers)
jtourkos Jun 7, 2024
c9a0670
fix: wrong query where conditions
jtourkos Jun 11, 2024
45ad690
fix: wrong queries
jtourkos Jun 11, 2024
eb25d95
fix: compilation errors
jtourkos Jun 11, 2024
30d1c1d
fix: wrong resolvers's logic after comparing with the current working…
jtourkos Jun 17, 2024
6956ae3
refactor: remove direct usage of endpoint chain argument
jtourkos Jun 20, 2024
104ec17
Merge branch 'main' into multi-chain-api
jtourkos Jun 20, 2024
12cf3dc
fix: wrong query
jtourkos Jun 21, 2024
1fdafaa
refactor: simplify drip list queries responses
jtourkos Jun 21, 2024
950a589
fix: DataLoader return order in cases that nulls were not handled
jtourkos Jun 24, 2024
8620f95
solve merge confilicts
jtourkos Jun 27, 2024
a617d25
refactor: flatten stream response
jtourkos Jul 5, 2024
bb53668
refactor: add base sepolia support
jtourkos Jul 5, 2024
da6cc6e
fix: wrong identification of claimed projects and stream chain return…
jtourkos Jul 11, 2024
b5dff78
fix: correctly resolve user latest ipfs hash
jtourkos Jul 11, 2024
96d2a16
refactor: return non existing projects in DB as unclaimed
jtourkos Jul 11, 2024
4fb8637
feat: add support for filecoin
jtourkos Aug 20, 2024
2871329
refactor: update the env template
jtourkos Aug 20, 2024
a6c9bca
fix: wrong provider creation logic
jtourkos Aug 21, 2024
d5e43ea
fix: wrong project status calculation
jtourkos Aug 21, 2024
f60f905
fix: logic error when trying to get cross chain property
jtourkos Sep 27, 2024
05b3824
refactor: update Filecoin contract addresses
jtourkos Oct 3, 2024
fa82875
fix: rpc endpoint validation
jtourkos Oct 7, 2024
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
48 changes: 31 additions & 17 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
PORT=string
NETWORK=string # See 'SupportedNetwork' type.
PUBLIC_API_KEYS=string # comma-separated list of strings
DRIPS_API_KEY=string
INFURA_API_KEY=string
POSTGRES_CONNECTION_STRING=string
REPO_DRIVER_ADDRESS=string # optional, defaults to mainnet address of latest deployment
DRIPS_ADDRESS=string # optional, defaults to mainnet address of latest deployment
RPC_URL=string # optional, defaults to infura mainnet
PRETEND_ALL_REPOS_EXIST=boolean # true or false. If true, app will always assume all GitHub repos exist. Used in E2E tests. Defaults to false.
NODE_ENV=string # 'development' or 'production'.
RATE_LIMIT_WINDOW_IN_MINUTES=number # optional, defaults to 2.
RATE_LIMIT_MAX_REQUESTS_PER_WINDOW=number # optional, defaults to 1000.
MAX_QUERY_DEPTH=number # optional, defaults to 4.
TIMEOUT_IN_SECONDS=number # optional, defaults to 20.
ADDRESS_DRIVER_ADDRESS=string # required, address of the `AddressDriver` contract.
IPFS_GATEWAY_URL=string # required, URL of the IPFS gateway.
PORT=string # Optional. The API server port. Defaults to 8080.

NETWORK=string # Required. The network to connect to. See `SupportedChains` in `types.ts` for supported networks.

# You should provide at least one of the following RPC URLs:
RPC_URL_MAINNET=string # The RPC URL for the Mainnet provider.
RPC_ACCESS_TOKEN_MAINNET=string # Optional. The access token to use for the RPC. If specified, it will be used as a bearer token in the `Authorization` header.
RPC_URL_SEPOLIA=string # The RPC URL for the Sepolia provider.
RPC_ACCESS_TOKEN_SEPOLIA=string # Optional. The access token to use for the RPC. If specified, it will be used as a bearer token in the `Authorization` header.
RPC_URL_OPTIMISM_SEPOLIA=string # The RPC URL for the Optimism Sepolia provider.
RPC_ACCESS_TOKEN_OPTIMISM_SEPOLIA=string # Optional. The access token to use for the RPC. If specified, it will be used as a bearer token in the `Authorization` header.
RPC_URL_POLYGON_AMOY=string # The RPC URL for the Polygon Amoy provider.
RPC_ACCESS_TOKEN_POLYGON_AMOY=string # Optional. The access token to use for the RPC. If specified, it will be used as a bearer token in the `Authorization` header.
RPC_URL_FILECOIN=string # The RPC URL for the Filecoin provider.
RPC_ACCESS_TOKEN_FILECOIN=string # Optional. The access token to use for the RPC. If specified, it will be used as a bearer token in the `Authorization` header.

PUBLIC_API_KEYS=string # Required. Comma-separated list of strings API keys that rate limit is applied to.
DRIPS_API_KEY=string # Required. API key withouth rate limit.

NODE_ENV=string # Required. 'development' or 'production'.

POSTGRES_CONNECTION_STRING=string # Required. The connection string for the database.

PRETEND_ALL_REPOS_EXIST=boolean # If true, app will always assume all GitHub repos exist. Used in E2E tests. Defaults to false.

RATE_LIMIT_WINDOW_IN_MINUTES=number # Optional. defaults to 2.
RATE_LIMIT_MAX_REQUESTS_PER_WINDOW=number # Optional. defaults to 1000.
MAX_QUERY_DEPTH=number # Optional. defaults to 4.
TIMEOUT_IN_SECONDS=number # Optional. defaults to 20.

IPFS_GATEWAY_URL=string # Optional. The IPFS gateway URL to use for fetching IPFS data. Defaults to 'https://drips.mypinata.cloud'.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ web_modules/
.yarn-integrity

# dotenv environment variable files
.env
.env.*
!.env.template

Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ RUN npm ci
ENV PORT=8080
ENV NETWORK=localtestnet
ENV PUBLIC_API_KEYS=afdb8b7e-8fa7-4de9-bd95-b650b839e745
ENV INFURA_API_KEY=ef24377ad66642b8a0dcdaa42ea95e7c
ENV POSTGRES_CONNECTION_STRING=postgresql://user:admin@postgres-event-processor:5432/dripsdb
ENV PRETEND_ALL_REPOS_EXIST=true
ENV REPO_DRIVER_ADDRESS=0xb9C8e18E82687a564Ac4D26E22D28a4C95057CE9
Expand Down
Loading
Loading