Skip to content

Commit

Permalink
feat(auction-server): Use sqlx to persist opportunities and bids (#37)
Browse files Browse the repository at this point in the history
* Insert opportunities and remove dashmap

* Remove bidders field from opportunity

* Bid table

* Refactor bidstore

* Commit sqlx files
  • Loading branch information
m30m authored Mar 28, 2024
1 parent 1815c6e commit 95ba434
Show file tree
Hide file tree
Showing 24 changed files with 1,130 additions and 195 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
- id: cargo-clippy-auction-server
name: Cargo clippy for auction server
language: "rust"
entry: cargo +nightly-2023-07-23 clippy --manifest-path ./auction-server/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
entry: cargo +stable clippy --manifest-path ./auction-server/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
pass_filenames: false
files: auction-server
# Hooks for vault-simulator
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/.sqlx/*.json
2 changes: 1 addition & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ local_resource(

local_resource(
"auction-server",
serve_cmd="source ../tilt-resources.env; cargo run -- run --relayer-private-key $RELAYER_PRIVATE_KEY",
serve_cmd="source ../tilt-resources.env; source ./.env; cargo run -- run --database-url $DATABASE_URL --relayer-private-key $RELAYER_PRIVATE_KEY",
serve_dir="auction-server",
resource_deps=["create-configs"],
readiness_probe=probe(period_secs=5, http_get=http_get_action(port=9000)),
Expand Down
1 change: 1 addition & 0 deletions auction-server/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DATABASE_URL=postgresql://postgres@localhost/postgres

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.

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

Loading

0 comments on commit 95ba434

Please sign in to comment.