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

[Release] @subql/[email protected], @subql/[email protected], @subql/[email protected] #232

Merged
merged 4 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
nodeLinker: node-modules

npmAuthToken: "${NPM_AUTH_TOKEN:-}"

httpTimeout: 30000

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"

npmAuthToken: "${NPM_AUTH_TOKEN:-}"

yarnPath: .yarn/releases/yarn-3.2.4.cjs
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@apollo/client": "^3.7.0",
"@metamask/eth-sig-util": "^4.0.1",
"@octokit/request": "^5.6.3",
"@subql/contract-sdk": "^0.100.2",
"@subql/contract-sdk": "^0.111.0",
"@testing-library/react": "^14.0.0",
"@types/jest": "^28.1.6",
"@types/react": "^18.2.28",
Expand Down
5 changes: 4 additions & 1 deletion packages/network-clients/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.111.0] - 2023-12-15

## [0.100.2] - 2023-11-24

## [0.100.0] - 2023-11-01
Expand Down Expand Up @@ -49,7 +51,8 @@ Upgrade @subql/contracts

- Release first version

[unreleased]: https://github.com/subquery/network-clients/compare/v0.100.2...HEAD
[unreleased]: https://github.com/subquery/network-clients/compare/v0.111.0...HEAD
[0.111.0]: https://github.com/subquery/network-clients/compare/v0.100.2...v0.111.0
[0.100.2]: https://github.com/subquery/network-clients/compare/v0.100.0...v0.100.2
[0.100.0]: https://github.com/subquery/network-clients/compare/v0.3.18...v0.100.0
[0.3.18]: https://github.com/subquery/network-clients/compare/v0.3.17...v0.3.18
Expand Down
4 changes: 2 additions & 2 deletions packages/network-clients/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@subql/network-clients",
"version": "0.100.2",
"version": "0.111.0",
"description": "SubQuery client sdk for network",
"main": "dist/index.js",
"author": "SubQuery Pte Limited",
Expand All @@ -25,7 +25,7 @@
"typescript": "^4.6.4"
},
"peerDependencies": {
"@subql/contract-sdk": "^0.100.2",
"@subql/contract-sdk": "^0.111.0",
"ipfs-http-client": "^53.0.1"
},
"stableVersion": "0.100.0"
Expand Down
5 changes: 4 additions & 1 deletion packages/network-config/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.111.0] - 2023-12-15

## [0.100.2] - 2023-11-24

## [0.100.0] - 2023-11-01
Expand Down Expand Up @@ -41,7 +43,8 @@ Add `LEADERBOARD_SUBQL_ENDPOINTS`

- Release first version

[unreleased]: https://github.com/subquery/network-clients/compare/v0.100.2...HEAD
[unreleased]: https://github.com/subquery/network-clients/compare/v0.111.0...HEAD
[0.111.0]: https://github.com/subquery/network-clients/compare/v0.100.2...v0.111.0
[0.100.2]: https://github.com/subquery/network-clients/compare/v0.100.0...v0.100.2
[0.100.0]: https://github.com/subquery/network-clients/compare/v0.3.16...v0.100.0
[0.3.16]: https://github.com/subquery/network-clients/compare/v0.3.14...v0.3.16
Expand Down
4 changes: 2 additions & 2 deletions packages/network-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@subql/network-config",
"version": "0.100.2",
"version": "0.111.0",
"main": "dist/index.js",
"description": "SubQuery package containing network configuration",
"author": "SubQuery Pte Limited",
Expand All @@ -12,7 +12,7 @@
"typescript": "^4.8.4"
},
"peerDependencies": {
"@subql/contract-sdk": "^0.100.2",
"@subql/contract-sdk": "^0.111.0",
"ipfs-http-client": "^53.0.1"
},
"stableVersion": "0.100.0"
Expand Down
17 changes: 7 additions & 10 deletions packages/network-config/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { GQLEndpoint, IPFS_URLS, RPC_ENDPOINTS, SQNetworks, gqlEndpoints } from

import { SdkOptions } from '@subql/contract-sdk/types';

import keplerDeploymentDetails from '@subql/contract-sdk/publish/kepler.json';
import mainnetDeploymentDetails from '@subql/contract-sdk/publish/mainnet.json';
import testnetDeploymentDetails from '@subql/contract-sdk/publish/testnet.json';

Expand All @@ -21,19 +20,17 @@ export const NETWORK_CONFIGS: Record<SQNetworks, NetworkConfig> = {
// TODO: FIXME
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
sdkOptions: { network: 'mainnet', deploymentDetails: mainnetDeploymentDetails },
sdkOptions: { network: 'mainnet', deploymentDetails: mainnetDeploymentDetails.child },
gql: gqlEndpoints(SQNetworks.MAINNET),
},
[SQNetworks.KEPLER]: {
defaultEndpoint: RPC_ENDPOINTS.kepler,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
sdkOptions: { network: 'kepler', deploymentDetails: keplerDeploymentDetails },
gql: gqlEndpoints(SQNetworks.KEPLER),
},
[SQNetworks.TESTNET]: {
defaultEndpoint: RPC_ENDPOINTS.testnet,
sdkOptions: { network: 'testnet', deploymentDetails: testnetDeploymentDetails },
sdkOptions: { network: 'testnet', deploymentDetails: testnetDeploymentDetails.child },
gql: gqlEndpoints(SQNetworks.TESTNET),
},
[SQNetworks.LOCAL]: {
defaultEndpoint: RPC_ENDPOINTS.testnet,
sdkOptions: { network: 'testnet', deploymentDetails: testnetDeploymentDetails.child },
gql: gqlEndpoints(SQNetworks.TESTNET),
},
};
Expand Down
24 changes: 12 additions & 12 deletions packages/network-config/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

export enum SQNetworks {
TESTNET = 'testnet',
KEPLER = 'kepler',
MAINNET = 'mainnet',
LOCAL = 'local',
}

export enum GQLEndpoint {
Expand All @@ -19,39 +19,39 @@ export const IPFS_URLS = {

export const RPC_ENDPOINTS = {
[SQNetworks.MAINNET]: 'https://polygon-rpc.com/',
[SQNetworks.KEPLER]: 'https://polygon-rpc.com/',
[SQNetworks.TESTNET]: 'https://rpc.ankr.com/polygon_mumbai',
[SQNetworks.LOCAL]: 'https://polygon-rpc.com/',
};

export const NETWORK_SUBQL_ENDPOINTS = {
[SQNetworks.MAINNET]: 'https://api.subquery.network/sq/subquery/kepler-network',
[SQNetworks.KEPLER]: 'https://api.subquery.network/sq/subquery/kepler-network',
[SQNetworks.LOCAL]: 'https://api.subquery.network/sq/subquery/kepler-network',
// TODO: change back to testnet-prod endpoint
[SQNetworks.TESTNET]: 'https://api.subquery.network/sq/subquery/kepler-testnet',
};

export const LEADERBOARD_SUBQL_ENDPOINTS = {
[SQNetworks.MAINNET]: 'https://leaderboard-api.subquery.network/graphql',
[SQNetworks.KEPLER]: 'https://leaderboard-api.subquery.network/graphql',
[SQNetworks.LOCAL]: 'https://leaderboard-api.subquery.network/graphql',
[SQNetworks.TESTNET]: 'https://leaderboard-api.thechaindata.com/graphql',
};

export const STABLE_COIN_ADDRESSES = {
[SQNetworks.MAINNET]: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174',
[SQNetworks.KEPLER]: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174',
[SQNetworks.TESTNET]: '0x7E65A71046170A5b1AaB5C5cC64242EDF95CaBEA',
[SQNetworks.LOCAL]: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174',
} as const;

export const STABLE_COIN_SYMBOLS = {
[SQNetworks.MAINNET]: 'USDC',
[SQNetworks.KEPLER]: 'USDC',
[SQNetworks.TESTNET]: 'USDC',
[SQNetworks.LOCAL]: 'USDC',
} as const;

export const TOKEN_SYMBOLS = {
[SQNetworks.MAINNET]: 'SQT',
[SQNetworks.KEPLER]: 'kSQT',
[SQNetworks.TESTNET]: 'kSQT',
[SQNetworks.TESTNET]: 'SQT',
[SQNetworks.LOCAL]: 'kSQT',
} as const;

export const STABLE_COIN_DECIMAL = 6;
Expand All @@ -77,10 +77,10 @@ export const NETWORKS_CONFIG_INFO = {
decimals: 18,
},
},
[SQNetworks.KEPLER]: {
[SQNetworks.MAINNET]: {
chainId: '0x89',
chainName: 'Polygon',
rpcUrls: ['https://polygon-rpc.com'],
rpcUrls: ['https://polygon-rpc.com/'],
iconUrls: ['https://icons.llamao.fi/icons/chains/rsz_polygon.jpg'],
blockExplorerUrls: ['https://polygonscan.com/'],
nativeCurrency: {
Expand All @@ -89,10 +89,10 @@ export const NETWORKS_CONFIG_INFO = {
decimals: 18,
},
},
[SQNetworks.MAINNET]: {
[SQNetworks.LOCAL]: {
chainId: '0x89',
chainName: 'Polygon',
rpcUrls: ['https://polygon-rpc.com/'],
rpcUrls: ['https://polygon-rpc.com'],
iconUrls: ['https://icons.llamao.fi/icons/chains/rsz_polygon.jpg'],
blockExplorerUrls: ['https://polygonscan.com/'],
nativeCurrency: {
Expand Down
2 changes: 1 addition & 1 deletion packages/network-query/leaderboard.codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CodegenConfig } from '@graphql-codegen/cli';
import { NETWORK_CONFIGS } from '@subql/network-config';

const config: CodegenConfig = {
schema: NETWORK_CONFIGS.kepler.gql.leaderboard,
schema: NETWORK_CONFIGS.mainnet.gql.leaderboard,
documents: './queries/leaderboard/*.gql',
config: {
preResolveTypes: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/network-query/types.codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CodegenConfig } from '@graphql-codegen/cli';
import { NETWORK_CONFIGS } from '@subql/network-config';

const config: CodegenConfig = {
schema: [`${NETWORK_CONFIGS.testnet.gql.network}`, `${NETWORK_CONFIGS.kepler.gql.leaderboard}`],
schema: [`${NETWORK_CONFIGS.testnet.gql.network}`, `${NETWORK_CONFIGS.mainnet.gql.leaderboard}`],
documents: ['./queries/network/*.gql', './queries/leaderboard/*.gql'],
config: {
preResolveTypes: true,
Expand Down
5 changes: 4 additions & 1 deletion packages/react-hooks/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.111.0] - 2023-12-15

## [0.100.2] - 2023-11-24

## [0.100.0] - 2023-11-01
Expand Down Expand Up @@ -35,7 +37,8 @@ Add `leaderboard`.

- Release first version

[unreleased]: https://github.com/subquery/network-clients/compare/v0.100.2...HEAD
[unreleased]: https://github.com/subquery/network-clients/compare/v0.111.0...HEAD
[0.111.0]: https://github.com/subquery/network-clients/compare/v0.100.2...v0.111.0
[0.100.2]: https://github.com/subquery/network-clients/compare/v0.100.0...v0.100.2
[0.100.0]: https://github.com/subquery/network-clients/compare/v0.3.15...v0.100.0
[0.3.15]: https://github.com/subquery/network-clients/compare/v0.3.13...v0.3.15
Expand Down
2 changes: 1 addition & 1 deletion packages/react-hooks/leaderboard.codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { NETWORK_CONFIGS } from '@subql/network-config';

const config: CodegenConfig = {
// FIXME: use `NETWORK_CONFIGS.kepler.gql.network`
schema: NETWORK_CONFIGS.kepler.gql.leaderboard,
schema: NETWORK_CONFIGS.mainnet.gql.leaderboard,
documents: '../network-query/queries/leaderboard/*.gql',
config: {
preResolveTypes: true,
Expand Down
4 changes: 2 additions & 2 deletions packages/react-hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@subql/react-hooks",
"version": "0.100.3-1",
"version": "0.111.0",
"description": "SubQuery client sdk for react hooks",
"main": "dist/index.js",
"author": "SubQuery Pte Limited",
Expand Down Expand Up @@ -35,7 +35,7 @@
"typescript": "^4.6.4"
},
"peerDependencies": {
"@subql/contract-sdk": "^0.100.2",
"@subql/contract-sdk": "^0.111.0",
"graphql": "^16.5.0",
"react": "^18"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-hooks/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function mapAsync<O, T>(scope: (t: T) => O, data: AsyncData<T>): AsyncDat
return { ...data, data: data.data ? scope(data.data) : undefined };
}

export type RenderResult = ReactElement | null;
export type RenderResult = ReactElement | React.ReactNode | null;

export type Handlers<T> = {
loading: () => RenderResult;
Expand Down
Loading
Loading