-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: create external swap template * fix: lpTokenAmount of removeOneToken * feat: staging subgraph for lp token * fix: LpToken subgraph * feat: add snapshot to lp transfer events * feat: v0 stableswap subgraph * feat: graph-client build * Revert "feat: graph-client build" This reverts commit da0c931. * feat: rebuild graph-client * feat: migration for lp transfers * feat: database for lp transfers * feat: subgraph for lp transfers * feat: poller for lp transfer * fix: add more unit tests to database * fix: add unit tests for poller * chore: lint * feat: rebuild graph-client
- Loading branch information
1 parent
1fe2310
commit 11ff45e
Showing
100 changed files
with
461,792 additions
and
224,224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"extends": "../../../.nycrc.json", | ||
"exclude": ["src/index.ts", "test/**/*.ts"], | ||
"exclude": ["src/index.ts", "src/zapatos/schema.d.ts", "test/**/*.ts"], | ||
"all": true | ||
} |
36 changes: 36 additions & 0 deletions
36
packages/adapters/database/db/migrations/20230519155643_refactor_stableswap_lp_balances.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
-- migrate:up | ||
DROP VIEW IF EXISTS public.stableswap_lp_balances; | ||
|
||
CREATE TABLE IF NOT EXISTS public.stableswap_lp_transfers ( | ||
id character varying(255) NOT NULL UNIQUE, | ||
pool_id character(66) NOT NULL, | ||
domain character varying (255) NOT NULL, | ||
lp_token character (42) NOT NULL, | ||
from_address character (42) NOT NULL, | ||
to_address character (42) NOT NULL, | ||
pooled_tokens text [], | ||
amount numeric NOT NULL, | ||
balances numeric [], | ||
block_number integer NOT NULL, | ||
transaction_hash character(66) NOT NULL, | ||
timestamp integer NOT NULL, | ||
PRIMARY KEY(id) | ||
); | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS public.stableswap_lp_balances ( | ||
pool_id character(66) NOT NULL, | ||
domain character varying (255) NOT NULL, | ||
provider character (42) NOT NULL, | ||
lp_token character (42) NOT NULL, | ||
balance numeric NOT NULL, | ||
last_timestamp integer NOT NULL, | ||
PRIMARY KEY(pool_id, domain, provider) | ||
); | ||
|
||
GRANT SELECT ON public.stableswap_lp_transfers to query; | ||
GRANT SELECT ON public.stableswap_lp_transfers to reader; | ||
|
||
-- migrate:down | ||
DROP TABLE IF EXISTS public.stableswap_lp_transfers; | ||
DROP TABLE IF EXISTS public.stableswap_lp_balances; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.