Skip to content

Commit

Permalink
Feature/proposals with latest snapshot (#8)
Browse files Browse the repository at this point in the history
* test: separate_number_and_test and test_timestamp_to_date_string

* proposals_with_latest_snapshot

* @petersalomonsen

* test: compare with RPC

* fix: test in github action uses local result

* remove unused files

* remove unused file

* add ENV to ci.yml

* fix clippy warnings

* test: check for 600 transactions

* fix: remove inner joins from rust strings

* cargo sqlx prepare
  • Loading branch information
Tguntenaar authored Dec 16, 2024
1 parent e41d6f4 commit 4b6c500
Show file tree
Hide file tree
Showing 23 changed files with 420 additions and 611 deletions.
6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
},
"customizations": {
"vscode": {
"extensions": ["rust-lang.rust-analyzer", "github.vscode-github-actions"]
"extensions": [
"rust-lang.rust-analyzer",
"github.vscode-github-actions",
"ms-python.python"
]
}
},
"postCreateCommand": "./.devcontainer/install-dependencies.sh"
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
sudo apt update
sudo apt install -y postgresql
sudo apt install libudev-dev

cargo install sqlx-cli

Expand Down
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

ENV=LOCAL # for testing
DATABASE_URL=
CONTRACT=devhub.near
ROCKET_DATABASES={devhub_cache_api_rs={url="postgres://devhub_cache_api_rs:password@localhost/devhub_cache_api_rs"}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
CONTRACT: devhub.near
DATABASE_URL: postgres://devhub_cache_api_rs:[email protected]:5432/devhub_cache_api_rs
NEARBLOCKS_API_KEY: ${{ secrets.NEARBLOCKS_API_KEY }}
ENV: GH_ACTION

- name: Run clippy and audit
run:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ near-api = { git = "https://github.com/near/near-api-rs" }
near-jsonrpc-client = "0.14.0"
regex = "1.11.1"
base64 = "0.22.1"
futures = "0.3.31"

[features]
default = ["workspaces"]
Expand Down
5 changes: 4 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ cargo watch -q -c -w src/ -x 'run '

### Create and run migrations

*Github codespace*: If the database server is not running, you can start it by typing `sudo service postgresql start`.

```bash
sqlx migrate add <name>
```
Expand Down Expand Up @@ -56,6 +58,7 @@ fly deploy -c fly.*.toml
```



How to deploy when Starting from a blockheight. For instance templar we added proposals removed everything and rebuild it
Templar contract was deleted after https://nearblocks.io/txns/FzKXtDhvR3oFWxqDvfXNVp8HUgmcrNkYtmccEjbaFCMj this txn. So we only want to indexer after this.


75 changes: 0 additions & 75 deletions src/api_background_service.rs

This file was deleted.

Loading

0 comments on commit 4b6c500

Please sign in to comment.