Skip to content

Commit 087d569

Browse files
cgilbe27k-yangsemantic-release-botCalicoNinoUnique-Divine
authored
chore: develop -> main (remove stats + update default feature flags) (#380)
* revert: cosmos submodule only (#362) * revert: cosmos submodule only * fix: rem * fix: rem * fix: update * feat: add msg client * fix: paths * fix: try chaosnet ibc * fix: path again * fix: try hm * fix: fixes to pass * feat: eth protos (#366) * fix: eth protos * fix: client * fix: fixes * fix: try older nibiru * fix: index * fix: mainnet * fix: import * revert: build change * chore: tests (#367) * fix: all query tests * chore: final tests * fix: buf * fix: fix * fix: pull latest * fix: build * fix: build * refactor(faucet)!: set default tokens (#369) * chore: develop -> main (#368) * revert: cosmos submodule only (#362) * revert: cosmos submodule only * fix: rem * fix: rem * fix: update * feat: add msg client * fix: paths * fix: try chaosnet ibc * fix: path again * fix: try hm * fix: fixes to pass * feat: eth protos (#366) * fix: eth protos * fix: client * fix: fixes * fix: try older nibiru * fix: index * fix: mainnet * fix: import * revert: build change * chore: tests (#367) * fix: all query tests * chore: final tests * fix: buf * fix: fix * fix: pull latest * fix: build * fix: build * chore(release): 4.5.1 ### [4.5.1](v4.5.0...v4.5.1) (2024-08-09) ### Miscellaneous Chores * develop -> main ([#368](#368)) ([c6d6570](c6d6570)), closes [#362](#362) [#366](#366) [#367](#367) [skip ci] * fix(faucet): remove unused tokens from default faucet request * fix: bump test --------- Co-authored-by: Cameron Gilbert <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> * chore: main to develop (#375) * chore: develop -> main (#370) * revert: cosmos submodule only (#362) * revert: cosmos submodule only * fix: rem * fix: rem * fix: update * feat: add msg client * fix: paths * fix: try chaosnet ibc * fix: path again * fix: try hm * fix: fixes to pass * feat: eth protos (#366) * fix: eth protos * fix: client * fix: fixes * fix: try older nibiru * fix: index * fix: mainnet * fix: import * revert: build change * chore: tests (#367) * fix: all query tests * chore: final tests * fix: buf * fix: fix * fix: pull latest * fix: build * fix: build * refactor(faucet)!: set default tokens (#369) * chore: develop -> main (#368) * revert: cosmos submodule only (#362) * revert: cosmos submodule only * fix: rem * fix: rem * fix: update * feat: add msg client * fix: paths * fix: try chaosnet ibc * fix: path again * fix: try hm * fix: fixes to pass * feat: eth protos (#366) * fix: eth protos * fix: client * fix: fixes * fix: try older nibiru * fix: index * fix: mainnet * fix: import * revert: build change * chore: tests (#367) * fix: all query tests * chore: final tests * fix: buf * fix: fix * fix: pull latest * fix: build * fix: build * chore(release): 4.5.1 ### [4.5.1](v4.5.0...v4.5.1) (2024-08-09) ### Miscellaneous Chores * develop -> main ([#368](#368)) ([c6d6570](c6d6570)), closes [#362](#362) [#366](#366) [#367](#367) [skip ci] * fix(faucet): remove unused tokens from default faucet request * fix: bump test --------- Co-authored-by: Cameron Gilbert <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> --------- Co-authored-by: Kevin Yang <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> * chore(github): Add project automation for https://tinyurl.com/25uty9w5 * chore(release): 4.5.2 ### [4.5.2](v4.5.1...v4.5.2) (2024-09-24) ### Miscellaneous Chores * develop -> main ([#370](#370)) ([ec2a25b](ec2a25b)), closes [#362](#362) [#366](#366) [#367](#367) [#369](#369) [#368](#368) [#362](#362) [#366](#366) [#367](#367) [#362](#362) [#366](#366) [#367](#367) * **github:** Add project automation for https://tinyurl.com/25uty9w5 ([c2c27e5](c2c27e5)) [skip ci] --------- Co-authored-by: Cameron Gilbert <[email protected]> Co-authored-by: Kevin Yang <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> Co-authored-by: Unique Divine <[email protected]> * feat: account parser (#374) * chore: develop -> main (#370) * revert: cosmos submodule only (#362) * revert: cosmos submodule only * fix: rem * fix: rem * fix: update * feat: add msg client * fix: paths * fix: try chaosnet ibc * fix: path again * fix: try hm * fix: fixes to pass * feat: eth protos (#366) * fix: eth protos * fix: client * fix: fixes * fix: try older nibiru * fix: index * fix: mainnet * fix: import * revert: build change * chore: tests (#367) * fix: all query tests * chore: final tests * fix: buf * fix: fix * fix: pull latest * fix: build * fix: build * refactor(faucet)!: set default tokens (#369) * chore: develop -> main (#368) * revert: cosmos submodule only (#362) * revert: cosmos submodule only * fix: rem * fix: rem * fix: update * feat: add msg client * fix: paths * fix: try chaosnet ibc * fix: path again * fix: try hm * fix: fixes to pass * feat: eth protos (#366) * fix: eth protos * fix: client * fix: fixes * fix: try older nibiru * fix: index * fix: mainnet * fix: import * revert: build change * chore: tests (#367) * fix: all query tests * chore: final tests * fix: buf * fix: fix * fix: pull latest * fix: build * fix: build * chore(release): 4.5.1 ### [4.5.1](v4.5.0...v4.5.1) (2024-08-09) ### Miscellaneous Chores * develop -> main ([#368](#368)) ([c6d6570](c6d6570)), closes [#362](#362) [#366](#366) [#367](#367) [skip ci] * fix(faucet): remove unused tokens from default faucet request * fix: bump test --------- Co-authored-by: Cameron Gilbert <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> --------- Co-authored-by: Kevin Yang <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> * chore(github): Add project automation for https://tinyurl.com/25uty9w5 * chore(release): 4.5.2 ### [4.5.2](v4.5.1...v4.5.2) (2024-09-24) ### Miscellaneous Chores * develop -> main ([#370](#370)) ([ec2a25b](ec2a25b)), closes [#362](#362) [#366](#366) [#367](#367) [#369](#369) [#368](#368) [#362](#362) [#366](#366) [#367](#367) [#362](#362) [#366](#366) [#367](#367) * **github:** Add project automation for https://tinyurl.com/25uty9w5 ([c2c27e5](c2c27e5)) [skip ci] * feat: nibiru account parser * refactor: throw if baseaccount is undefined * test: fixing tests * chore: removing unnecessary ? * refactor: matching cosmjs implementation * chore: removing t.json * chore: pr comments --------- Co-authored-by: Cameron Gilbert <[email protected]> Co-authored-by: Kevin Yang <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> Co-authored-by: Unique Divine <[email protected]> * chore: remove stats and update default feature flags * feat: cosmwasmclient extension & signingcosmwasmclient implementation (#379) * feat: nibicosmwasmclient * feat: nibi signing cosm wasm client * refactor: adding nibi account parser to nibi signingcosmwasmclient * test: remove unused test file * test: take signingcosmwasmclient from coverage * chore: fix coverage --------- Co-authored-by: Kevin Yang <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> Co-authored-by: Calico Nino <[email protected]> Co-authored-by: Unique Divine <[email protected]>
1 parent 470262f commit 087d569

File tree

15 files changed

+1069
-358
lines changed

15 files changed

+1069
-358
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
. "$(dirname "$0")/_/husky.sh"
33

44
yarn lint-staged
5+
yarn generate-barrels

jest.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ const config: Config = {
2222
"!jest.config.ts",
2323
"!**/src/gql/utils/generated.ts",
2424
"!**/src/sdk/utils/testutil.ts",
25+
"!**/src/sdk/core/cosmwasmclient.ts", // Implementation from Cosmjs
26+
"!**/src/sdk/core/signingcosmwasmclient.ts", // Implementation from Cosmjs
2527
],
2628
testPathIgnorePatterns: ["/node_modules/", "/dist/", "/nibiru/"],
2729
coverageReporters: ["json-summary", "text", "html", "lcov"],

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"bignumber.js": "^9.1.1",
4747
"cross-fetch": "4.0.0",
4848
"graphql": "^16.7.1",
49-
"graphql-ws": "^5.14.0"
49+
"graphql-ws": "^5.14.0",
50+
"pako": "^2.1.0"
5051
},
5152
"peerDependencies": {
5253
"@cosmjs/cosmwasm-stargate": "^0.32.3",
@@ -67,6 +68,7 @@
6768
"@types/jest": "^29.1.2",
6869
"@types/long": "^4.0.0",
6970
"@types/node": "^16.11.7",
71+
"@types/pako": "^2.0.3",
7072
"@typescript-eslint/eslint-plugin": "^5.59.7",
7173
"@typescript-eslint/parser": "^5.30.7",
7274
"barrelsby": "^2.8.1",

src/gql/heart-monitor/heart-monitor.test.ts

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {
77
QueryGovernanceArgs,
88
QueryIbcArgs,
99
QueryOracleArgs,
10-
QueryStatsArgs,
11-
GQLStatsFields,
1210
communityPoolQueryString,
1311
QueryWasmArgs,
1412
GqlWasmFields,
@@ -24,19 +22,12 @@ import {
2422
defaultIbcTransfer,
2523
defaultOracleEntry,
2624
defaultOraclePrice,
27-
defaultPerpOpenInterest,
28-
defaultPerpPnl,
2925
defaultRedelegations,
30-
defaultStatsFees,
3126
defaultToken,
32-
defaultTotals,
33-
defaultTvl,
3427
defaultUnbondings,
3528
defaultUser,
3629
defaultUserContract,
37-
defaultUsers,
3830
defaultValidator,
39-
defaultVolume,
4031
GQLDistributionCommission,
4132
GQLOraclePrice,
4233
GQLQueryGqlCommunityPoolArgs,
@@ -414,28 +405,6 @@ test("queryBatchHandler", async () => {
414405
}
415406
})
416407

417-
const testStats = async (args: QueryStatsArgs, fields: GQLStatsFields) => {
418-
const resp = await heartMonitor.stats(args, fields)
419-
expect(resp).toHaveProperty("stats")
420-
421-
if (resp.GQLStats) {
422-
const { GQLStats } = resp
423-
424-
checkFields(
425-
[GQLStats],
426-
[
427-
"totals",
428-
"fees",
429-
"perpOpenInterest",
430-
"tvl",
431-
"perpPnl",
432-
"users",
433-
"volume",
434-
]
435-
)
436-
}
437-
}
438-
439408
const testStaking = async (
440409
args: QueryStakingArgs,
441410
fields: GQLStakingFields
@@ -501,55 +470,6 @@ test.skip("staking", async () => {
501470
)
502471
})
503472

504-
test("stats", async () => {
505-
await testStats(
506-
{
507-
totals: {
508-
limit: 1,
509-
},
510-
fees: {
511-
limit: 1,
512-
},
513-
perpOpenInterest: {
514-
limit: 1,
515-
},
516-
tvl: {
517-
limit: 1,
518-
},
519-
perpPnl: {
520-
limit: 1,
521-
},
522-
users: {
523-
limit: 1,
524-
},
525-
volume: {
526-
limit: 1,
527-
},
528-
},
529-
{
530-
totals: defaultTotals,
531-
fees: defaultStatsFees,
532-
perpOpenInterest: defaultPerpOpenInterest,
533-
tvl: defaultTvl,
534-
perpPnl: defaultPerpPnl,
535-
users: defaultUsers,
536-
volume: defaultVolume,
537-
}
538-
)
539-
await testStats(
540-
{},
541-
{
542-
totals: defaultTotals,
543-
fees: defaultStatsFees,
544-
perpOpenInterest: defaultPerpOpenInterest,
545-
tvl: defaultTvl,
546-
perpPnl: defaultPerpPnl,
547-
users: defaultUsers,
548-
volume: defaultVolume,
549-
}
550-
)
551-
})
552-
553473
const testWasm = async (args: QueryWasmArgs, fields: GqlWasmFields) => {
554474
const resp = await heartMonitor.wasm(args, fields)
555475
expect(resp).toHaveProperty("wasm")

src/gql/heart-monitor/heart-monitor.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ import {
1616
communityPool,
1717
distributionCommissions,
1818
users,
19-
GqlOutStats,
20-
QueryStatsArgs,
21-
GQLStatsFields,
22-
stats,
2319
GqlOutGovernance,
2420
QueryGovernanceArgs,
2521
governance,
@@ -118,11 +114,6 @@ export interface IHeartMonitor {
118114
fields: DeepPartial<GQLStakingFields>
119115
) => Promise<GqlOutStaking>
120116

121-
readonly stats: (
122-
args: QueryStatsArgs,
123-
fields: DeepPartial<GQLStatsFields>
124-
) => Promise<GqlOutStats>
125-
126117
readonly user: (
127118
args: GQLQueryGqlUserArgs,
128119
fields: DeepPartial<GQLUser>
@@ -213,9 +204,6 @@ export class HeartMonitor implements IHeartMonitor {
213204
fields: DeepPartial<GQLStakingFields>
214205
) => staking(args, this.gqlEndpt, fields)
215206

216-
stats = async (args: QueryStatsArgs, fields: DeepPartial<GQLStatsFields>) =>
217-
stats(args, this.gqlEndpt, fields)
218-
219207
user = async (args: GQLQueryGqlUserArgs, fields: DeepPartial<GQLUser>) =>
220208
user(args, this.gqlEndpt, fields)
221209

src/gql/query/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export * from "./inflation"
1111
export * from "./oracle"
1212
export * from "./proxies"
1313
export * from "./staking"
14-
export * from "./stats"
1514
export * from "./user"
1615
export * from "./users"
1716
export * from "./wasm"

src/gql/query/stats.ts

Lines changed: 0 additions & 147 deletions
This file was deleted.

0 commit comments

Comments
 (0)