diff --git a/.env b/.env
index 3096b1504..e69de29bb 100644
--- a/.env
+++ b/.env
@@ -1,6 +0,0 @@
-# RPC_URL=https://rpc.bostrom.moon.cybernode.ai
-# LCD_URL=https://lcd.bostrom.moon.cybernode.ai
-# WEBSOCKET_URL=wss://rpc.bostrom.moon.cybernode.ai/websocket
-# INDEX_HTTPS=https://index.bostrom.moon.cybernode.ai/v1/graphql
-# INDEX_WEBSOCKET = wss://index.bostrom.moon.cybernode.ai/v1/graphql
-# CHAIN_ID = localbostrom
diff --git a/codegen.ts b/codegen.ts
index ef988e1f3..c736086b6 100644
--- a/codegen.ts
+++ b/codegen.ts
@@ -4,9 +4,7 @@ import { CodegenConfig } from '@graphql-codegen/cli';
// require('dotenv').config();
// TODO: need to use config variables somehow
-const schemaUrl = 'https://index.bostrom.moon.cybernode.ai/v1/graphql'; // process.env.NEXT_PUBLIC_GRAPHQL_HOST;
-
-console.log('url', schemaUrl);
+const schemaUrl = 'https://index.bostrom.cybernode.ai/v1/graphql'; // process.env.NEXT_PUBLIC_GRAPHQL_HOST;
const config: CodegenConfig = {
overwrite: true,
diff --git a/src/constants/config.ts b/src/constants/config.ts
index 30e5fee5a..0a387e524 100644
--- a/src/constants/config.ts
+++ b/src/constants/config.ts
@@ -16,8 +16,6 @@ const DEFAULT_CHAIN_ID: Networks.BOSTROM | Networks.SPACE_PUSSY =
export const CHAIN_ID = DEFAULT_CHAIN_ID;
-console.log('CHAIN_ID', CHAIN_ID);
-
export const LCD_URL =
process.env.LCD_URL || defaultNetworks[DEFAULT_CHAIN_ID].LCD_URL;
diff --git a/src/constants/defaultNetworks.ts b/src/constants/defaultNetworks.ts
index f24ab9878..ba52334a6 100644
--- a/src/constants/defaultNetworks.ts
+++ b/src/constants/defaultNetworks.ts
@@ -29,6 +29,13 @@ const defaultNetworks: NetworksList = {
// BECH32_PREFIX: 'bostrom',
// MEMO_KEPLR: '[bostrom] cyb.ai, using keplr',
// },
+ // RPC_URL=https://rpc.bostrom.moon.cybernode.ai
+ // LCD_URL=https://lcd.bostrom.moon.cybernode.ai
+ // WEBSOCKET_URL=wss://rpc.bostrom.moon.cybernode.ai/websocket
+ // INDEX_HTTPS=https://index.bostrom.moon.cybernode.ai/v1/graphql
+ // INDEX_WEBSOCKET = wss://index.bostrom.moon.cybernode.ai/v1/graphql
+ // CHAIN_ID = localbostrom
+
'space-pussy': {
CHAIN_ID: Networks.SPACE_PUSSY,
BASE_DENOM: 'pussy',
diff --git a/src/containers/validator/UptimeHook.tsx b/src/containers/validator/UptimeHook.tsx
index a0023b129..c8568c102 100644
--- a/src/containers/validator/UptimeHook.tsx
+++ b/src/containers/validator/UptimeHook.tsx
@@ -1,32 +1,28 @@
-// import { useUptimeByAddressQuery } from 'src/generated/graphql';
-// import { INFINITY } from 'src/constants/app';
-// import BigNumber from 'bignumber.js';
-// import { Dots } from '../../components';
-// import { consensusPubkey } from '../../utils/utils';
+import { useUptimeByAddressQuery } from 'src/generated/graphql';
+import { INFINITY } from 'src/constants/app';
+import BigNumber from 'bignumber.js';
+import { Dots } from '../../components';
+import { consensusPubkey } from '../../utils/utils';
-// function useUptime({ consensusPub }: { consensusPub: string }) {
-// const { loading, data, error } = useUptimeByAddressQuery({
-// variables: {
-// address: `${consensusPubkey(consensusPub)}`,
-// },
-// });
-
-// if (loading) {
-// return ;
-// }
+function useUptime({ consensusPub }: { consensusPub: string }) {
+ const { loading, data, error } = useUptimeByAddressQuery({
+ variables: {
+ address: `${consensusPubkey(consensusPub)}`,
+ },
+ });
-// if (error) {
-// return INFINITY;
-// }
+ if (loading) {
+ return ;
+ }
-// return `${new BigNumber(data?.uptime[0].uptime || 0)
-// .shiftedBy(2)
-// .dp(2, BigNumber.ROUND_FLOOR)
-// .toString()} %`;
-// }
+ if (error) {
+ return INFINITY;
+ }
-function useUptime({ consensusPub }: { consensusPub: string }) {
- return '';
+ return `${new BigNumber(data?.uptime[0].uptime || 0)
+ .shiftedBy(2)
+ .dp(2, BigNumber.ROUND_FLOOR)
+ .toString()} %`;
}
export default useUptime;
diff --git a/src/features/staking/delegation/useDelegation.ts b/src/features/staking/delegation/useDelegation.ts
index 24b10e120..a7c4dbca1 100644
--- a/src/features/staking/delegation/useDelegation.ts
+++ b/src/features/staking/delegation/useDelegation.ts
@@ -30,6 +30,7 @@ function useDelegationFunc(...[delegatorAddress, validatorAddress]: Params) {
};
}
+// TODO: add skip somewhere
function useDelegation(validatorAddress: string) {
const address = useAppSelector(selectCurrentAddress);
diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts
index 4ab8dcdd9..eb84f503c 100644
--- a/src/generated/graphql.ts
+++ b/src/generated/graphql.ts
@@ -19,6 +19,9 @@ export type Scalars = {
bigint: { input: any; output: any; }
coin: { input: any; output: any; }
coin_scalar: { input: any; output: any; }
+ date: { input: any; output: any; }
+ float8: { input: any; output: any; }
+ json: { input: any; output: any; }
jsonb: { input: any; output: any; }
numeric: { input: any; output: any; }
timestamp: { input: any; output: any; }
@@ -100,857 +103,886 @@ export type String_Comparison_Exp = {
_similar?: InputMaybe;
};
-/** columns and relationships of "account" */
-export type Account = {
- /** An object relationship */
- account_balance?: Maybe;
- address: Scalars['String']['output'];
- /** An array relationship */
- cyberlinks: Array;
- /** An aggregate relationship */
- cyberlinks_aggregate: Cyberlinks_Aggregate;
- /** An array relationship */
- investmints: Array;
- /** An aggregate relationship */
- investmints_aggregate: Investmints_Aggregate;
- /** An array relationship */
- particles: Array;
- /** An aggregate relationship */
- particles_aggregate: Particles_Aggregate;
- /** An array relationship */
- routes: Array;
- /** An array relationship */
- routesBySource: Array;
- /** An aggregate relationship */
- routesBySource_aggregate: Routes_Aggregate;
- /** An aggregate relationship */
- routes_aggregate: Routes_Aggregate;
- /** An array relationship */
- vesting_accounts: Array;
- /** An aggregate relationship */
- vesting_accounts_aggregate: Vesting_Account_Aggregate;
-};
-
-
-/** columns and relationships of "account" */
-export type AccountCyberlinksArgs = {
- distinct_on?: InputMaybe>;
- limit?: InputMaybe;
- offset?: InputMaybe;
- order_by?: InputMaybe>;
- where?: InputMaybe;
-};
-
-
-/** columns and relationships of "account" */
-export type AccountCyberlinks_AggregateArgs = {
- distinct_on?: InputMaybe>;
- limit?: InputMaybe;
- offset?: InputMaybe;
- order_by?: InputMaybe>;
- where?: InputMaybe;
-};
-
-
-/** columns and relationships of "account" */
-export type AccountInvestmintsArgs = {
- distinct_on?: InputMaybe>;
- limit?: InputMaybe;
- offset?: InputMaybe;
- order_by?: InputMaybe>;
- where?: InputMaybe;
-};
-
-
-/** columns and relationships of "account" */
-export type AccountInvestmints_AggregateArgs = {
- distinct_on?: InputMaybe>;
- limit?: InputMaybe;
- offset?: InputMaybe;
- order_by?: InputMaybe>;
- where?: InputMaybe;
-};
-
-
-/** columns and relationships of "account" */
-export type AccountParticlesArgs = {
- distinct_on?: InputMaybe>;
- limit?: InputMaybe;
- offset?: InputMaybe;
- order_by?: InputMaybe>;
- where?: InputMaybe;
-};
-
-
-/** columns and relationships of "account" */
-export type AccountParticles_AggregateArgs = {
- distinct_on?: InputMaybe>;
- limit?: InputMaybe;
- offset?: InputMaybe;
- order_by?: InputMaybe>;
- where?: InputMaybe;
-};
-
-
-/** columns and relationships of "account" */
-export type AccountRoutesArgs = {
- distinct_on?: InputMaybe>;
- limit?: InputMaybe;
- offset?: InputMaybe;
- order_by?: InputMaybe>;
- where?: InputMaybe;
-};
-
-
-/** columns and relationships of "account" */
-export type AccountRoutesBySourceArgs = {
- distinct_on?: InputMaybe>;
- limit?: InputMaybe;
- offset?: InputMaybe;
- order_by?: InputMaybe>;
- where?: InputMaybe;
-};
-
-
-/** columns and relationships of "account" */
-export type AccountRoutesBySource_AggregateArgs = {
- distinct_on?: InputMaybe>;
- limit?: InputMaybe;
- offset?: InputMaybe;
- order_by?: InputMaybe>;
- where?: InputMaybe;
+/** columns and relationships of "_transaction" */
+export type _Transaction = {
+ fee?: Maybe;
+ gas_used?: Maybe;
+ gas_wanted?: Maybe;
+ hash?: Maybe;
+ height?: Maybe;
+ index?: Maybe;
+ involved_accounts_addresses?: Maybe>;
+ logs?: Maybe;
+ memo?: Maybe;
+ messages?: Maybe;
+ partition_id?: Maybe;
+ raw_log?: Maybe;
+ signatures?: Maybe>;
+ signer_infos?: Maybe;
+ subject1?: Maybe;
+ subject2?: Maybe;
+ success?: Maybe;
+ transaction_hash?: Maybe;
+ type?: Maybe;
+ value?: Maybe;
};
-/** columns and relationships of "account" */
-export type AccountRoutes_AggregateArgs = {
- distinct_on?: InputMaybe>;
- limit?: InputMaybe;
- offset?: InputMaybe;
- order_by?: InputMaybe>;
- where?: InputMaybe;
+/** columns and relationships of "_transaction" */
+export type _TransactionFeeArgs = {
+ path?: InputMaybe;
};
-/** columns and relationships of "account" */
-export type AccountVesting_AccountsArgs = {
- distinct_on?: InputMaybe>;
- limit?: InputMaybe;
- offset?: InputMaybe;
- order_by?: InputMaybe>;
- where?: InputMaybe;
+/** columns and relationships of "_transaction" */
+export type _TransactionLogsArgs = {
+ path?: InputMaybe;
};
-/** columns and relationships of "account" */
-export type AccountVesting_Accounts_AggregateArgs = {
- distinct_on?: InputMaybe>;
- limit?: InputMaybe;
- offset?: InputMaybe;
- order_by?: InputMaybe>;
- where?: InputMaybe;
+/** columns and relationships of "_transaction" */
+export type _TransactionMessagesArgs = {
+ path?: InputMaybe;
};
-/** aggregated selection of "account" */
-export type Account_Aggregate = {
- aggregate?: Maybe;
- nodes: Array;
-};
-/** aggregate fields of "account" */
-export type Account_Aggregate_Fields = {
- count: Scalars['Int']['output'];
- max?: Maybe;
- min?: Maybe;
+/** columns and relationships of "_transaction" */
+export type _TransactionSigner_InfosArgs = {
+ path?: InputMaybe;
};
-/** aggregate fields of "account" */
-export type Account_Aggregate_FieldsCountArgs = {
- columns?: InputMaybe>;
- distinct?: InputMaybe;
-};
-
-/** columns and relationships of "account_balance" */
-export type Account_Balance = {
- /** An object relationship */
- account: Account;
- address: Scalars['String']['output'];
- coins: Array;
- height: Scalars['bigint']['output'];
+/** columns and relationships of "_transaction" */
+export type _TransactionValueArgs = {
+ path?: InputMaybe;
};
-/** aggregated selection of "account_balance" */
-export type Account_Balance_Aggregate = {
- aggregate?: Maybe;
- nodes: Array;
+/** aggregated selection of "_transaction" */
+export type _Transaction_Aggregate = {
+ aggregate?: Maybe<_Transaction_Aggregate_Fields>;
+ nodes: Array<_Transaction>;
};
-/** aggregate fields of "account_balance" */
-export type Account_Balance_Aggregate_Fields = {
- avg?: Maybe;
+/** aggregate fields of "_transaction" */
+export type _Transaction_Aggregate_Fields = {
+ avg?: Maybe<_Transaction_Avg_Fields>;
count: Scalars['Int']['output'];
- max?: Maybe;
- min?: Maybe;
- stddev?: Maybe;
- stddev_pop?: Maybe;
- stddev_samp?: Maybe;
- sum?: Maybe;
- var_pop?: Maybe;
- var_samp?: Maybe;
- variance?: Maybe;
+ max?: Maybe<_Transaction_Max_Fields>;
+ min?: Maybe<_Transaction_Min_Fields>;
+ stddev?: Maybe<_Transaction_Stddev_Fields>;
+ stddev_pop?: Maybe<_Transaction_Stddev_Pop_Fields>;
+ stddev_samp?: Maybe<_Transaction_Stddev_Samp_Fields>;
+ sum?: Maybe<_Transaction_Sum_Fields>;
+ var_pop?: Maybe<_Transaction_Var_Pop_Fields>;
+ var_samp?: Maybe<_Transaction_Var_Samp_Fields>;
+ variance?: Maybe<_Transaction_Variance_Fields>;
};
-/** aggregate fields of "account_balance" */
-export type Account_Balance_Aggregate_FieldsCountArgs = {
- columns?: InputMaybe>;
+/** aggregate fields of "_transaction" */
+export type _Transaction_Aggregate_FieldsCountArgs = {
+ columns?: InputMaybe>;
distinct?: InputMaybe;
};
/** aggregate avg on columns */
-export type Account_Balance_Avg_Fields = {
+export type _Transaction_Avg_Fields = {
+ gas_used?: Maybe;
+ gas_wanted?: Maybe;
height?: Maybe;
+ index?: Maybe;
+ partition_id?: Maybe;
};
-/** Boolean expression to filter rows from the table "account_balance". All fields are combined with a logical 'AND'. */
-export type Account_Balance_Bool_Exp = {
- _and?: InputMaybe>;
- _not?: InputMaybe;
- _or?: InputMaybe>;
- account?: InputMaybe;
- address?: InputMaybe;
- coins?: InputMaybe;
+/** Boolean expression to filter rows from the table "_transaction". All fields are combined with a logical 'AND'. */
+export type _Transaction_Bool_Exp = {
+ _and?: InputMaybe>;
+ _not?: InputMaybe<_Transaction_Bool_Exp>;
+ _or?: InputMaybe>;
+ fee?: InputMaybe;
+ gas_used?: InputMaybe;
+ gas_wanted?: InputMaybe;
+ hash?: InputMaybe;
height?: InputMaybe;
+ index?: InputMaybe;
+ involved_accounts_addresses?: InputMaybe;
+ logs?: InputMaybe;
+ memo?: InputMaybe;
+ messages?: InputMaybe;
+ partition_id?: InputMaybe;
+ raw_log?: InputMaybe;
+ signatures?: InputMaybe;
+ signer_infos?: InputMaybe;
+ subject1?: InputMaybe;
+ subject2?: InputMaybe;
+ success?: InputMaybe;
+ transaction_hash?: InputMaybe;
+ type?: InputMaybe;
+ value?: InputMaybe;
};
/** aggregate max on columns */
-export type Account_Balance_Max_Fields = {
- address?: Maybe;
- coins?: Maybe>;
+export type _Transaction_Max_Fields = {
+ gas_used?: Maybe;
+ gas_wanted?: Maybe;
+ hash?: Maybe;
height?: Maybe;
+ index?: Maybe;
+ involved_accounts_addresses?: Maybe>;
+ memo?: Maybe;
+ partition_id?: Maybe;
+ raw_log?: Maybe;
+ signatures?: Maybe>;
+ subject1?: Maybe;
+ subject2?: Maybe;
+ transaction_hash?: Maybe;
+ type?: Maybe;
};
/** aggregate min on columns */
-export type Account_Balance_Min_Fields = {
- address?: Maybe;
- coins?: Maybe>;
+export type _Transaction_Min_Fields = {
+ gas_used?: Maybe;
+ gas_wanted?: Maybe;
+ hash?: Maybe;
height?: Maybe;
+ index?: Maybe;
+ involved_accounts_addresses?: Maybe>;
+ memo?: Maybe;
+ partition_id?: Maybe;
+ raw_log?: Maybe;
+ signatures?: Maybe>;
+ subject1?: Maybe;
+ subject2?: Maybe;
+ transaction_hash?: Maybe;
+ type?: Maybe;
};
-/** Ordering options when selecting data from "account_balance". */
-export type Account_Balance_Order_By = {
- account?: InputMaybe;
- address?: InputMaybe;
- coins?: InputMaybe;
+/** Ordering options when selecting data from "_transaction". */
+export type _Transaction_Order_By = {
+ fee?: InputMaybe;
+ gas_used?: InputMaybe;
+ gas_wanted?: InputMaybe;
+ hash?: InputMaybe;
height?: InputMaybe;
+ index?: InputMaybe;
+ involved_accounts_addresses?: InputMaybe;
+ logs?: InputMaybe;
+ memo?: InputMaybe;
+ messages?: InputMaybe;
+ partition_id?: InputMaybe;
+ raw_log?: InputMaybe;
+ signatures?: InputMaybe;
+ signer_infos?: InputMaybe;
+ subject1?: InputMaybe;
+ subject2?: InputMaybe;
+ success?: InputMaybe;
+ transaction_hash?: InputMaybe;
+ type?: InputMaybe;
+ value?: InputMaybe;
};
-/** select columns of table "account_balance" */
-export enum Account_Balance_Select_Column {
+/** select columns of table "_transaction" */
+export enum _Transaction_Select_Column {
/** column name */
- Address = 'address',
+ Fee = 'fee',
/** column name */
- Coins = 'coins',
+ GasUsed = 'gas_used',
/** column name */
- Height = 'height'
+ GasWanted = 'gas_wanted',
+ /** column name */
+ Hash = 'hash',
+ /** column name */
+ Height = 'height',
+ /** column name */
+ Index = 'index',
+ /** column name */
+ InvolvedAccountsAddresses = 'involved_accounts_addresses',
+ /** column name */
+ Logs = 'logs',
+ /** column name */
+ Memo = 'memo',
+ /** column name */
+ Messages = 'messages',
+ /** column name */
+ PartitionId = 'partition_id',
+ /** column name */
+ RawLog = 'raw_log',
+ /** column name */
+ Signatures = 'signatures',
+ /** column name */
+ SignerInfos = 'signer_infos',
+ /** column name */
+ Subject1 = 'subject1',
+ /** column name */
+ Subject2 = 'subject2',
+ /** column name */
+ Success = 'success',
+ /** column name */
+ TransactionHash = 'transaction_hash',
+ /** column name */
+ Type = 'type',
+ /** column name */
+ Value = 'value'
}
/** aggregate stddev on columns */
-export type Account_Balance_Stddev_Fields = {
+export type _Transaction_Stddev_Fields = {
+ gas_used?: Maybe;
+ gas_wanted?: Maybe;
height?: Maybe;
+ index?: Maybe;
+ partition_id?: Maybe;
};
/** aggregate stddev_pop on columns */
-export type Account_Balance_Stddev_Pop_Fields = {
+export type _Transaction_Stddev_Pop_Fields = {
+ gas_used?: Maybe;
+ gas_wanted?: Maybe;
height?: Maybe;
+ index?: Maybe;
+ partition_id?: Maybe;
};
/** aggregate stddev_samp on columns */
-export type Account_Balance_Stddev_Samp_Fields = {
+export type _Transaction_Stddev_Samp_Fields = {
+ gas_used?: Maybe;
+ gas_wanted?: Maybe;
height?: Maybe;
+ index?: Maybe;
+ partition_id?: Maybe;
};
-/** Streaming cursor of the table "account_balance" */
-export type Account_Balance_Stream_Cursor_Input = {
+/** Streaming cursor of the table "_transaction" */
+export type _Transaction_Stream_Cursor_Input = {
/** Stream column input with initial value */
- initial_value: Account_Balance_Stream_Cursor_Value_Input;
+ initial_value: _Transaction_Stream_Cursor_Value_Input;
/** cursor ordering */
ordering?: InputMaybe;
};
/** Initial value of the column from where the streaming should start */
-export type Account_Balance_Stream_Cursor_Value_Input = {
- address?: InputMaybe;
- coins?: InputMaybe>;
+export type _Transaction_Stream_Cursor_Value_Input = {
+ fee?: InputMaybe;
+ gas_used?: InputMaybe;
+ gas_wanted?: InputMaybe;
+ hash?: InputMaybe;
height?: InputMaybe;
+ index?: InputMaybe;
+ involved_accounts_addresses?: InputMaybe>;
+ logs?: InputMaybe;
+ memo?: InputMaybe;
+ messages?: InputMaybe;
+ partition_id?: InputMaybe;
+ raw_log?: InputMaybe;
+ signatures?: InputMaybe>;
+ signer_infos?: InputMaybe;
+ subject1?: InputMaybe;
+ subject2?: InputMaybe;
+ success?: InputMaybe;
+ transaction_hash?: InputMaybe;
+ type?: InputMaybe;
+ value?: InputMaybe;
};
/** aggregate sum on columns */
-export type Account_Balance_Sum_Fields = {
+export type _Transaction_Sum_Fields = {
+ gas_used?: Maybe;
+ gas_wanted?: Maybe;
height?: Maybe;
+ index?: Maybe;
+ partition_id?: Maybe;
};
/** aggregate var_pop on columns */
-export type Account_Balance_Var_Pop_Fields = {
+export type _Transaction_Var_Pop_Fields = {
+ gas_used?: Maybe;
+ gas_wanted?: Maybe;
height?: Maybe;
+ index?: Maybe;
+ partition_id?: Maybe;
};
/** aggregate var_samp on columns */
-export type Account_Balance_Var_Samp_Fields = {
+export type _Transaction_Var_Samp_Fields = {
+ gas_used?: Maybe;
+ gas_wanted?: Maybe;
height?: Maybe;
+ index?: Maybe