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

Update starknet #10

Draft
wants to merge 70 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
c56d6b4
call viewRefresher every 3 seconds
thecotne Aug 22, 2022
6f5ec9a
Add dockerfile for actions
kotso Aug 23, 2022
c7df75a
Add actions file
kotso Aug 23, 2022
4de47af
Update actions to main branch
kotso Aug 23, 2022
436d079
Changed dockerhub repository name
kotso Aug 24, 2022
3a5ec1f
fix infinite view and stylistic changes to creator view
thecotne Aug 24, 2022
af44511
add typeorm migration:run in yarn start
thecotne Aug 24, 2022
c20af65
fix cell_revived events in infinite view
thecotne Aug 25, 2022
9ce92c9
update transaction table
thecotne Aug 26, 2022
a53e35d
refresh views immediately after block update
thecotne Sep 18, 2022
373dffc
¯\_(ツ)_/¯
thecotne Sep 19, 2022
fd6decd
Revert "refresh views immediately after block update"
thecotne Sep 20, 2022
c1fa5d6
don't check for updates after transaction is ACCEPTED_ON_L2
thecotne Sep 20, 2022
5143771
refresh views immediately after block update
thecotne Oct 10, 2022
f5656d3
fix infinite view updates
thecotne Feb 8, 2023
08df419
fix yarn version
thecotne Feb 8, 2023
51ef67d
DO migration
bgharbi-globalpos Nov 20, 2023
8ee6b72
fix if statement
bgharbi-globalpos Nov 20, 2023
0569e29
add DO database certificate
bgharbi-globalpos Nov 20, 2023
a61b771
fix stage name
bgharbi-globalpos Nov 20, 2023
812c13c
redeploy
bgharbi-globalpos Nov 20, 2023
21953c7
Merge pull request #1 from yuki-wtf/feature/review
CreatedByBdr Nov 20, 2023
9639bba
redeploy
bgharbi-globalpos Nov 20, 2023
a3fb5b0
add migration config
CreatedByBdr Jan 30, 2024
e44fa92
Update CI/CD workflow to Google Actions
CreatedByBdr Feb 6, 2024
93fc921
Migrate CI/CD workflow from DigitalOcean to Google Actions
CreatedByBdr Feb 6, 2024
5717dc2
Migrate CI/CD workflow from DigitalOcean to Google Actions
CreatedByBdr Feb 6, 2024
9fe0fc6
Remove SSL configuration and fs module from db.ts
CreatedByBdr Feb 7, 2024
8df24ed
Remove certificate modification in Dockerfile, add new CI/CD for prod…
CreatedByBdr Feb 7, 2024
5dd0635
Update Docker image path in Prod CI/CD workflow
CreatedByBdr Feb 7, 2024
ed7d7d9
Refactor CI/CD workflows and consolidate in one file
CreatedByBdr Feb 8, 2024
826eb3a
Update project name in CI/CD workflow file
CreatedByBdr Feb 8, 2024
f5888fe
Update tagging strategy in CI/CD workflow file
CreatedByBdr Feb 8, 2024
2bd00ab
Update tagging strategy in CI/CD workflow file
CreatedByBdr Feb 8, 2024
361a7ce
Improve image tagging in CI/CD workflow
CreatedByBdr Feb 8, 2024
f5f83e7
Remove unnecessary comments from CI/CD workflow
CreatedByBdr Feb 8, 2024
6150d96
Update starknet version to the latest
lorcan-codes Dec 25, 2023
a4fbf00
Update indexer events wip
lorcan-codes Dec 29, 2023
71ce6ba
Handle when block is not found
lorcan-codes Jan 2, 2024
f47ea7c
Update event name and content retrieval
lorcan-codes Jan 3, 2024
a53f51e
Fix parsing extra details from contract abi
lorcan-codes Jan 8, 2024
bc89039
Fix event details parsing
lorcan-codes Jan 15, 2024
a077efc
Fix gameplay delay
lorcan-codes Jan 22, 2024
b8334aa
Revert pending evolve delay fix
lorcan-codes Jan 25, 2024
189e29c
Handle parsing the events created before upgraded contract
lorcan-codes Jan 27, 2024
469ffe3
add function to update pending snapshots
lorcan-codes Jan 29, 2024
b5e2b52
Add logs to updatePendingMints
lorcan-codes Jan 29, 2024
3a56cb7
Update console logs
lorcan-codes Jan 30, 2024
efec9d3
Add script to save whitelist to db && create whitelist db
lorcan-codes Jan 31, 2024
1a527d0
Revert local dotenv import
lorcan-codes Jan 31, 2024
7aed5a0
Improve event parsing and fix cell revived event parsing
lorcan-codes Feb 2, 2024
210fe32
Fix old parser issue && fix error
lorcan-codes Feb 2, 2024
d324c8b
pull events from pending block
thecotne Feb 2, 2024
891e25d
Add nullable option to blockHash column in Event entity
thecotne Feb 2, 2024
acc6f57
Fix block number comparison in parseEvent function
thecotne Feb 2, 2024
6cb3f20
merge migration files
thecotne Feb 2, 2024
e61333a
Code cleanup and make parsing more reliable
lorcan-codes Feb 2, 2024
9c8b870
fix eventIndex
thecotne Feb 2, 2024
6d8bd90
Add whitelist generation script
lorcan-codes Feb 8, 2024
18318ca
Merge pull request #12 from yuki-wtf/add-whitelist-scripts
lorcan-codes Feb 8, 2024
50d06bd
Insert proofs to db automatically if whitelist table is empty
lorcan-codes Feb 8, 2024
0c42ff9
Merge pull request #13 from yuki-wtf/whitelist-proofs-checker
lorcan-codes Feb 8, 2024
d54b906
Save whitelist proofs to db by chunks
lorcan-codes Feb 9, 2024
b61f178
Add new CI/CD workflow for 'update-starknet' branch
CreatedByBdr Feb 10, 2024
7a95259
Merge pull request #14 from yuki-wtf/save-whitelist-by-chunks
lorcan-codes Feb 10, 2024
0409797
Fix whitelist migration issue
lorcan-codes Feb 10, 2024
f6c9836
inlcude gamestate and timestamp in whitelist table && update scripts
lorcan-codes Feb 11, 2024
8b1d185
Handle reverted transactions and delete old transactions
lorcan-codes Feb 12, 2024
7d10f7c
Remove wait in indexer && remove any transactions older than 15 min
lorcan-codes Feb 12, 2024
737f75a
Merge pull request #15 from yuki-wtf/remove-wait
lorcan-codes Feb 14, 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
57 changes: 57 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: gol2

on:
push:
tags:
- v*
branches:
- 'main'
- 'update-starknet'
workflow_dispatch:
env:
GAR: europe-west9-docker.pkg.dev
Project: gol2-indexer
GCP_Project_ID: ${{ startsWith(github.event.ref, 'refs/tags/v') && 'gol2-production' || 'gol2-development' }}
jobs:
Build:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.meta.outputs.version }}
environment:
name: ${{ startsWith(github.event.ref, 'refs/tags/v') && 'production' || 'development' }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.GAR }}/${{ env.GCP_Project_ID }}/${{ env.Project }}/${{ github.head_ref && 'feature' || startsWith(github.event.ref, 'refs/tags/v') && github.event.repository.default_branch || github.ref_name }}
flavor: latest=false
tags: |
type=sha,event=branch
type=ref,suffix=-{{sha}},event=pr
type=ref,event=tag

- uses: 'google-github-actions/auth@v2'
id: auth
with:
token_format: access_token
project_id: ${{ env.Project }}
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'

- name: Login to GAR
uses: docker/login-action@v3
with:
registry: ${{ env.GAR }}
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}

- name: Build and push
uses: docker/build-push-action@v5
with:
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
28 changes: 28 additions & 0 deletions .github/workflows/old-infra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: ci

on:
push:
branches:
- 'update-starknet'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: yukilabs/gol2-indexer:update-starknet
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,9 @@ dmypy.json
.pyre/

# indexer modules
node_modules/
node_modules/

certificates
*.crt

*/whitelist/*.json
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:16.15.1

ADD indexer/ /app
WORKDIR /app

RUN yarn install && yarn build

CMD ["yarn","start"]
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,6 @@ protostar test ./tests
```

To learn more about protostar usage please consult [the docs](https://docs.swmansion.com/protostar/docs/tutorials/introduction)



10 changes: 10 additions & 0 deletions indexer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# dependencies
node_modules
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
whitelist.json
Loading