Skip to content

Commit

Permalink
chore: develop -> main (remove stats + update default feature flags) (#…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
5 people authored Oct 18, 2024
1 parent 470262f commit 087d569
Show file tree
Hide file tree
Showing 15 changed files with 1,069 additions and 358 deletions.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
yarn generate-barrels
2 changes: 2 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const config: Config = {
"!jest.config.ts",
"!**/src/gql/utils/generated.ts",
"!**/src/sdk/utils/testutil.ts",
"!**/src/sdk/core/cosmwasmclient.ts", // Implementation from Cosmjs
"!**/src/sdk/core/signingcosmwasmclient.ts", // Implementation from Cosmjs
],
testPathIgnorePatterns: ["/node_modules/", "/dist/", "/nibiru/"],
coverageReporters: ["json-summary", "text", "html", "lcov"],
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"bignumber.js": "^9.1.1",
"cross-fetch": "4.0.0",
"graphql": "^16.7.1",
"graphql-ws": "^5.14.0"
"graphql-ws": "^5.14.0",
"pako": "^2.1.0"
},
"peerDependencies": {
"@cosmjs/cosmwasm-stargate": "^0.32.3",
Expand All @@ -67,6 +68,7 @@
"@types/jest": "^29.1.2",
"@types/long": "^4.0.0",
"@types/node": "^16.11.7",
"@types/pako": "^2.0.3",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.30.7",
"barrelsby": "^2.8.1",
Expand Down
80 changes: 0 additions & 80 deletions src/gql/heart-monitor/heart-monitor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import {
QueryGovernanceArgs,
QueryIbcArgs,
QueryOracleArgs,
QueryStatsArgs,
GQLStatsFields,
communityPoolQueryString,
QueryWasmArgs,
GqlWasmFields,
Expand All @@ -24,19 +22,12 @@ import {
defaultIbcTransfer,
defaultOracleEntry,
defaultOraclePrice,
defaultPerpOpenInterest,
defaultPerpPnl,
defaultRedelegations,
defaultStatsFees,
defaultToken,
defaultTotals,
defaultTvl,
defaultUnbondings,
defaultUser,
defaultUserContract,
defaultUsers,
defaultValidator,
defaultVolume,
GQLDistributionCommission,
GQLOraclePrice,
GQLQueryGqlCommunityPoolArgs,
Expand Down Expand Up @@ -414,28 +405,6 @@ test("queryBatchHandler", async () => {
}
})

const testStats = async (args: QueryStatsArgs, fields: GQLStatsFields) => {
const resp = await heartMonitor.stats(args, fields)
expect(resp).toHaveProperty("stats")

if (resp.GQLStats) {
const { GQLStats } = resp

checkFields(
[GQLStats],
[
"totals",
"fees",
"perpOpenInterest",
"tvl",
"perpPnl",
"users",
"volume",
]
)
}
}

const testStaking = async (
args: QueryStakingArgs,
fields: GQLStakingFields
Expand Down Expand Up @@ -501,55 +470,6 @@ test.skip("staking", async () => {
)
})

test("stats", async () => {
await testStats(
{
totals: {
limit: 1,
},
fees: {
limit: 1,
},
perpOpenInterest: {
limit: 1,
},
tvl: {
limit: 1,
},
perpPnl: {
limit: 1,
},
users: {
limit: 1,
},
volume: {
limit: 1,
},
},
{
totals: defaultTotals,
fees: defaultStatsFees,
perpOpenInterest: defaultPerpOpenInterest,
tvl: defaultTvl,
perpPnl: defaultPerpPnl,
users: defaultUsers,
volume: defaultVolume,
}
)
await testStats(
{},
{
totals: defaultTotals,
fees: defaultStatsFees,
perpOpenInterest: defaultPerpOpenInterest,
tvl: defaultTvl,
perpPnl: defaultPerpPnl,
users: defaultUsers,
volume: defaultVolume,
}
)
})

const testWasm = async (args: QueryWasmArgs, fields: GqlWasmFields) => {
const resp = await heartMonitor.wasm(args, fields)
expect(resp).toHaveProperty("wasm")
Expand Down
12 changes: 0 additions & 12 deletions src/gql/heart-monitor/heart-monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ import {
communityPool,
distributionCommissions,
users,
GqlOutStats,
QueryStatsArgs,
GQLStatsFields,
stats,
GqlOutGovernance,
QueryGovernanceArgs,
governance,
Expand Down Expand Up @@ -118,11 +114,6 @@ export interface IHeartMonitor {
fields: DeepPartial<GQLStakingFields>
) => Promise<GqlOutStaking>

readonly stats: (
args: QueryStatsArgs,
fields: DeepPartial<GQLStatsFields>
) => Promise<GqlOutStats>

readonly user: (
args: GQLQueryGqlUserArgs,
fields: DeepPartial<GQLUser>
Expand Down Expand Up @@ -213,9 +204,6 @@ export class HeartMonitor implements IHeartMonitor {
fields: DeepPartial<GQLStakingFields>
) => staking(args, this.gqlEndpt, fields)

stats = async (args: QueryStatsArgs, fields: DeepPartial<GQLStatsFields>) =>
stats(args, this.gqlEndpt, fields)

user = async (args: GQLQueryGqlUserArgs, fields: DeepPartial<GQLUser>) =>
user(args, this.gqlEndpt, fields)

Expand Down
1 change: 0 additions & 1 deletion src/gql/query/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export * from "./inflation"
export * from "./oracle"
export * from "./proxies"
export * from "./staking"
export * from "./stats"
export * from "./user"
export * from "./users"
export * from "./wasm"
147 changes: 0 additions & 147 deletions src/gql/query/stats.ts

This file was deleted.

Loading

0 comments on commit 087d569

Please sign in to comment.