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

Deploy Production #238

Merged
merged 60 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
288a110
Rolled back version orm and kit, change type of the user_performance …
kilgaloon Jul 25, 2024
a874e62
Merge pull request #219 from metaDAOproject/feat/user_performance
kilgaloon Aug 4, 2024
8839de2
Change type of the colums and regenerate total_volume column
kilgaloon Aug 5, 2024
f4b2383
Merge pull request #220 from metaDAOproject/feat/user_performance
LukasDeco Aug 5, 2024
431ed07
Create socials column and migrate old columns to new socials colum
kilgaloon Aug 6, 2024
a7ebff4
Merge pull request #221 from metaDAOproject/feat/socials
LukasDeco Aug 13, 2024
73d88b2
user deposits migration
kilgaloon Aug 13, 2024
3276eba
user deposits migration
kilgaloon Aug 13, 2024
84f8f11
Minor updates
kilgaloon Aug 13, 2024
245cd77
Merge pull request #223 from metaDAOproject/feat/deposits
LukasDeco Aug 13, 2024
04a8cf8
feat: put token and expiry in auth endpoint response
LukasDeco Aug 9, 2024
4faf3c5
feat: reaction_id
LukasDeco Aug 12, 2024
baff8f8
feat: comments and users schema perm updates
LukasDeco Aug 12, 2024
eae7284
feat: reactions hasura metadata update
LukasDeco Aug 13, 2024
cc2bce0
fix: rectify migrations
LukasDeco Aug 13, 2024
717f7a5
feat: gql socials column
LukasDeco Aug 13, 2024
fe0e448
fix: migrations
LukasDeco Aug 13, 2024
271aaf3
fix: already existing session response is wrong
LukasDeco Aug 13, 2024
98c84a0
feat: roles for users to insert proposals, and creations, and comments
LukasDeco Aug 13, 2024
50016c5
chore: sync hasura metadata
LukasDeco Aug 13, 2024
6e970a2
Merge pull request #222 from metaDAOproject/feat/expiry-and-jwt-on-au…
LukasDeco Aug 13, 2024
923ccea
feat: improved pnl to include last leg for any remaining inventory
R-K-H Aug 14, 2024
9773ec7
feat: launch.json for all to see
LukasDeco Aug 14, 2024
87b28b4
Merge pull request #225 from metaDAOproject/feat/commit-launch-json-e…
LukasDeco Aug 14, 2024
2b9d142
Merge pull request #224 from metaDAOproject/feat/notional-pnl
LukasDeco Aug 14, 2024
7a83f3f
fix: only example.launch.json remember
LukasDeco Aug 14, 2024
6a88d86
fix: launchjson typo
LukasDeco Aug 14, 2024
d52cc36
Merge pull request #226 from metaDAOproject/fix/launch.json-forget
LukasDeco Aug 14, 2024
6d00f9a
fix: wrong permissions config for proposal inserts
LukasDeco Aug 15, 2024
83f741d
testing hasura metadata cicd
LukasDeco Aug 15, 2024
140d22b
fix: missing select permission for user
LukasDeco Aug 15, 2024
07bca23
omg testing hasura
LukasDeco Aug 15, 2024
125b2e8
try to test hasura build omg
LukasDeco Aug 15, 2024
ac54a98
fix: bad config hasura build cicd
LukasDeco Aug 15, 2024
0c5b8be
fix hasura build plz
LukasDeco Aug 15, 2024
457921a
fix: cleanup testing build staging action
LukasDeco Aug 15, 2024
4daa944
Merge pull request #227 from metaDAOproject/fix/bad-permissions-for-p…
LukasDeco Aug 15, 2024
3a2033e
feat: always run hasura metadata on every staging PR
LukasDeco Aug 15, 2024
f644d3a
Merge pull request #228 from metaDAOproject/fix/staging-hasura-run-ev…
LukasDeco Aug 15, 2024
9cad259
fix: uncomment indexer processes
LukasDeco Aug 15, 2024
0c0778b
Merge pull request #229 from metaDAOproject/fix/stopped-running-much-…
LukasDeco Aug 15, 2024
ed077a4
feat: indexing more fields on daos + proposals
LukasDeco Aug 14, 2024
fb85fae
feat: hasura metadata updates needed
LukasDeco Aug 14, 2024
4b74eac
fix: proposal indexing bugs
LukasDeco Aug 15, 2024
34f99c2
Merge pull request #230 from metaDAOproject/feat/indexing-more-dao-an…
LukasDeco Aug 15, 2024
9918c42
feat: top dao traders native query
LukasDeco Aug 16, 2024
276ca29
Merge pull request #231 from metaDAOproject/feat/native-top-dao-trade…
LukasDeco Aug 16, 2024
21318c5
feat: user deposits metadata in table
LukasDeco Aug 16, 2024
6bfea99
Merge pull request #232 from metaDAOproject/feat/track-user-deposits-…
LukasDeco Aug 16, 2024
0213655
feat: use normal numbers and math
R-K-H Aug 17, 2024
f0be5db
Merge pull request #233 from metaDAOproject/fix/number-size-volume
R-K-H Aug 17, 2024
2fe071d
fix: missing string for insert
R-K-H Aug 17, 2024
d015124
Merge pull request #234 from metaDAOproject/fix/strings-not-numbers-n…
R-K-H Aug 17, 2024
9d19d43
fix: do not need to convert many times
R-K-H Aug 17, 2024
cf71eef
Merge pull request #235 from metaDAOproject/fix/converting-twice
R-K-H Aug 17, 2024
3ed3840
fix: ordering of the select
R-K-H Aug 17, 2024
5fc5657
Merge pull request #236 from metaDAOproject/fix/ordering-of-tokens
R-K-H Aug 17, 2024
4b4f19d
fix: working on something
R-K-H Aug 17, 2024
2c095a4
fix: spot price query on user perf calc
LukasDeco Aug 17, 2024
931e0b6
Merge pull request #237 from metaDAOproject/fix/attempts
LukasDeco Aug 17, 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
2 changes: 1 addition & 1 deletion .github/workflows/hasura-build-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches: [staging]
paths:
- "/packages/hasura/**"
- "**"
jobs:
update_hasura:
name: Update Hasura Configuration based on any metadata changes
Expand Down
48 changes: 48 additions & 0 deletions .vscode/example.launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "bun",
"request": "launch",
"name": "Run the indexer",

// The path to a JavaScript or TypeScript file to run.
"program": "${workspaceFolder}/packages/indexer/src/index.ts",

// The arguments to pass to the program, if any.
"args": [],

// The working directory of the program.
"cwd": "${workspaceFolder}",

"env": {
"BIRDEYE_API_KEY": "",
"FUTARCHY_PG_URL": "",
"RPC_ENDPOINT": "",
"INDEXER_URL": "",
"INDEXER_WSS_URL": "l"
},

// If the environment variables should not be inherited from the parent process.
"strictEnv": false,

// If the program should be run in watch mode.
// This is equivalent to passing `--watch` to the `bun` executable.
// You can also set this to "hot" to enable hot reloading using `--hot`.
"watchMode": false,

// If the debugger should stop on the first line of the program.
"stopOnEntry": false,

// If the debugger should be disabled. (for example, breakpoints will not be hit)
"noDebug": false,

// The path to the `bun` executable, defaults to your `PATH` environment variable.
"runtime": "bun",

// The arguments to pass to the `bun` executable, if any.
// Unlike `args`, these are passed to the executable itself, not the program.
"runtimeArgs": []
}
]
}
8 changes: 8 additions & 0 deletions packages/database/drizzle/0057_odd_lilandra.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ALTER TABLE "user_performance" DROP COLUMN "total_volume";

ALTER TABLE "user_performance" ALTER COLUMN "tokens_bought" SET DATA TYPE bigint;--> statement-breakpoint
ALTER TABLE "user_performance" ALTER COLUMN "tokens_sold" SET DATA TYPE bigint;--> statement-breakpoint
ALTER TABLE "user_performance" ALTER COLUMN "volume_bought" SET DATA TYPE bigint;--> statement-breakpoint
ALTER TABLE "user_performance" ALTER COLUMN "volume_sold" SET DATA TYPE bigint;--> statement-breakpoint

ALTER TABLE "user_performance" ADD COLUMN "total_volume" bigint GENERATED ALWAYS AS (volume_sold + volume_bought) STORED;
4 changes: 4 additions & 0 deletions packages/database/drizzle/0058_last_randall_flagg.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ALTER TABLE "dao_details" ADD COLUMN "socials" jsonb;

-- This will transfer data from x_account and github columns to new format and into the socials column
UPDATE "dao_details" SET socials = format('[{"id": "x", "value": "%s"},{"id": "github", "value": "%s"}]', x_account, github)::jsonb;
25 changes: 25 additions & 0 deletions packages/database/drizzle/0059_narrow_tag.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CREATE TABLE IF NOT EXISTS "user_deposits" (
"tx_sig" varchar(88) NOT NULL,
"user_acct" varchar(44) NOT NULL,
"token_amount" bigint NOT NULL,
"mint_acct" varchar(44) NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "user_deposits" ADD CONSTRAINT "user_deposits_tx_sig_transactions_tx_sig_fk" FOREIGN KEY ("tx_sig") REFERENCES "transactions"("tx_sig") ON DELETE no action ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "user_deposits" ADD CONSTRAINT "user_deposits_user_acct_users_user_acct_fk" FOREIGN KEY ("user_acct") REFERENCES "users"("user_acct") ON DELETE no action ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "user_deposits" ADD CONSTRAINT "user_deposits_mint_acct_tokens_mint_acct_fk" FOREIGN KEY ("mint_acct") REFERENCES "tokens"("mint_acct") ON DELETE no action ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
2 changes: 2 additions & 0 deletions packages/database/drizzle/0060_ordinary_mystique.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE "reactions" DROP CONSTRAINT "reactions_proposal_acct_reaction_reactor_acct_pk";--> statement-breakpoint
ALTER TABLE "reactions" ADD COLUMN "reaction_id" uuid DEFAULT gen_random_uuid() NOT NULL;
8 changes: 8 additions & 0 deletions packages/database/drizzle/0061_bored_crusher_hogan.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ALTER TABLE "daos" ADD COLUMN "twap_initial_observation" bigint;--> statement-breakpoint
ALTER TABLE "daos" ADD COLUMN "min_quote_futarchic_liquidity" bigint;--> statement-breakpoint
ALTER TABLE "daos" ADD COLUMN "min_base_futarchic_liquidity" bigint;--> statement-breakpoint
ALTER TABLE "proposals" ADD COLUMN "duration_in_slots" bigint;--> statement-breakpoint
ALTER TABLE "proposals" ADD COLUMN "pass_threshold_bps" bigint;--> statement-breakpoint
ALTER TABLE "proposals" ADD COLUMN "twap_initial_observation" bigint;--> statement-breakpoint
ALTER TABLE "proposals" ADD COLUMN "min_quote_futarchic_liquidity" bigint;--> statement-breakpoint
ALTER TABLE "proposals" ADD COLUMN "min_base_futarchic_liquidity" bigint;
2 changes: 2 additions & 0 deletions packages/database/drizzle/0062_ambitious_adam_destine.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE "daos" ADD COLUMN "twap_max_observation_change_per_update" bigint;--> statement-breakpoint
ALTER TABLE "proposals" ADD COLUMN "twap_max_observation_change_per_update" bigint;
6 changes: 6 additions & 0 deletions packages/database/drizzle/0063_wonderful_blue_shield.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ALTER TABLE "user_performance" ALTER COLUMN "tokens_bought" SET DATA TYPE numeric(40, 20);--> statement-breakpoint
ALTER TABLE "user_performance" ALTER COLUMN "tokens_sold" SET DATA TYPE numeric(40, 20);--> statement-breakpoint
ALTER TABLE "user_performance" ALTER COLUMN "volume_bought" SET DATA TYPE numeric(40, 20);--> statement-breakpoint
ALTER TABLE "user_performance" ALTER COLUMN "volume_sold" SET DATA TYPE numeric(40, 20);--> statement-breakpoint
ALTER TABLE "user_performance" ADD COLUMN "total_volume" numeric(40, 20) NOT NULL;
ALTER TABLE "user_performance" ADD COLUMN "updated_at" timestamp with time zone DEFAULT now() NOT NULL;
Loading
Loading