Skip to content

Commit

Permalink
Merge pull request #558 from alleslabs/feat/module-tx-table
Browse files Browse the repository at this point in the history
[Checked out from #545] feat: wireup module transaction history table
  • Loading branch information
evilpeach committed Oct 18, 2023
2 parents 9e44981 + 2411c9e commit eea60e1
Show file tree
Hide file tree
Showing 22 changed files with 5,578 additions and 1,144 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Features

- [#558](https://github.com/alleslabs/celatone-frontend/pull/558) Wireup module transaction history table
- [#556](https://github.com/alleslabs/celatone-frontend/pull/556) Fully functional deploy script page
- [#550](https://github.com/alleslabs/celatone-frontend/pull/550) Add modules and resources in account detail
- [#540](https://github.com/alleslabs/celatone-frontend/pull/540) Wireup publish module tx
Expand Down
5 changes: 5 additions & 0 deletions src/lib/app-provider/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ export enum CELATONE_QUERY_KEYS {
MODULE_VERIFICATION = "CELATONE_QUERY_MODULE_VERIFICATION",
FUNCTION_VIEW = "CELATONE_QUERY_FUNCTION_VIEW",
MODULE_DECODE = "CELATONE_QUERY_MODULE_DECODE",
MODULE_ID = "CELATONE_QUERY_MODULE_ID",
MODULE_TXS = "CELATONE_QUERY_MODULE_TXS",
MODULE_TXS_COUNT = "CELATONE_QUERY_MODULE_TXS_COUNT",
MODULE_HISTORIES = "CELATONE_QUERY_MODULE_HISTORIES",
MODULE_HISTORIES_COUNT = "CELATONE_QUERY_MODULE_HISTORIES_COUNT",
SCRIPT_DECODE = "CELATONE_QUERY_SCRIPT_DECODE",
// RESOURCE
ACCOUNT_RESOURCES = "CELATONE_QUERY_ACCOUNT_RESOURCES",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/Breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const Breadcrumb = ({ items, mb = 0 }: BreadcrumbProps) => (
</ChakraBreadcrumbItem>
)
) : (
<ChakraBreadcrumbItem isCurrentPage key={`bc-${item.href}`}>
<ChakraBreadcrumbItem isCurrentPage key={`bc-${item.text}`}>
<Text
variant={{ base: "body3", md: "body2" }}
className="ellipsis"
Expand Down
25 changes: 25 additions & 0 deletions src/lib/gql/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ const documents = {
types.GetContractListByAdminPaginationDocument,
"\n query getContractListCountByAdmin($walletAddress: String!) {\n contracts_aggregate(\n where: { account: { address: { _eq: $walletAddress } } }\n ) {\n aggregate {\n count\n }\n }\n }\n":
types.GetContractListCountByAdminDocument,
"\n query getModuleIdByNameAndVmAddressQuery(\n $name: String!\n $vmAddress: String!\n ) {\n modules(\n where: {\n name: { _eq: $name }\n vm_address: { vm_address: { _eq: $vmAddress } }\n }\n ) {\n id\n }\n }\n":
types.GetModuleIdByNameAndVmAddressQueryDocument,
"\n query getModuleHistoriesQuery(\n $moduleId: Int!\n $pageSize: Int!\n $offset: Int!\n ) {\n module_histories(\n where: { module_id: { _eq: $moduleId } }\n limit: $pageSize\n offset: $offset\n order_by: { block: { height: desc } }\n ) {\n remark\n block {\n height\n timestamp\n }\n upgrade_policy\n }\n }\n":
types.GetModuleHistoriesQueryDocument,
"\n query getModuleHistoriesCountQuery($moduleId: Int!) {\n module_histories_aggregate(where: { module_id: { _eq: $moduleId } }) {\n aggregate {\n count\n }\n }\n }\n":
types.GetModuleHistoriesCountQueryDocument,
"\n query getPoolList(\n $expression: pools_bool_exp\n $order: order_by\n $offset: Int!\n $pageSize: Int!\n ) {\n pools(\n where: $expression\n order_by: { id: $order }\n offset: $offset\n limit: $pageSize\n ) {\n id\n type\n is_superfluid\n liquidity\n contract_address\n }\n }\n":
types.GetPoolListDocument,
"\n query getPoolListCount($expression: pools_bool_exp) {\n pools_aggregate(where: $expression) {\n aggregate {\n count\n }\n }\n }\n":
Expand Down Expand Up @@ -97,6 +103,10 @@ const documents = {
types.GetBlockTransactionsByHeightQueryDocument,
"\n query getBlockTransactionCountByHeightQuery($height: Int!) {\n transactions_aggregate(where: { block_height: { _eq: $height } }) {\n aggregate {\n count\n }\n }\n }\n":
types.GetBlockTransactionCountByHeightQueryDocument,
"\n query getModuleTransactionsQuery(\n $moduleId: Int!\n $pageSize: Int!\n $offset: Int!\n ) {\n module_transactions(\n where: { module_id: { _eq: $moduleId } }\n limit: $pageSize\n offset: $offset\n order_by: { block_height: desc }\n ) {\n block {\n height\n timestamp\n }\n transaction {\n account {\n address\n }\n hash\n success\n messages\n is_clear_admin\n is_execute\n is_ibc\n is_instantiate\n is_migrate\n is_send\n is_store_code\n is_update_admin\n is_move_execute\n is_move_execute_event\n is_move_publish\n is_move_script\n is_move_upgrade\n }\n }\n }\n":
types.GetModuleTransactionsQueryDocument,
"\n query getModuleTransactionsCountQuery($moduleId: Int!) {\n module_transactions_aggregate(where: { module_id: { _eq: $moduleId } }) {\n aggregate {\n count\n }\n }\n }\n":
types.GetModuleTransactionsCountQueryDocument,
"\n query getValidators {\n validators {\n commission_max_change\n commission_max_rate\n commission_rate\n consensus_address\n details\n identity\n jailed\n min_self_delegation\n moniker\n operator_address\n website\n }\n }\n":
types.GetValidatorsDocument,
};
Expand Down Expand Up @@ -179,6 +189,15 @@ export function graphql(
export function graphql(
source: "\n query getContractListCountByAdmin($walletAddress: String!) {\n contracts_aggregate(\n where: { account: { address: { _eq: $walletAddress } } }\n ) {\n aggregate {\n count\n }\n }\n }\n"
): typeof documents["\n query getContractListCountByAdmin($walletAddress: String!) {\n contracts_aggregate(\n where: { account: { address: { _eq: $walletAddress } } }\n ) {\n aggregate {\n count\n }\n }\n }\n"];
export function graphql(
source: "\n query getModuleIdByNameAndVmAddressQuery(\n $name: String!\n $vmAddress: String!\n ) {\n modules(\n where: {\n name: { _eq: $name }\n vm_address: { vm_address: { _eq: $vmAddress } }\n }\n ) {\n id\n }\n }\n"
): typeof documents["\n query getModuleIdByNameAndVmAddressQuery(\n $name: String!\n $vmAddress: String!\n ) {\n modules(\n where: {\n name: { _eq: $name }\n vm_address: { vm_address: { _eq: $vmAddress } }\n }\n ) {\n id\n }\n }\n"];
export function graphql(
source: "\n query getModuleHistoriesQuery(\n $moduleId: Int!\n $pageSize: Int!\n $offset: Int!\n ) {\n module_histories(\n where: { module_id: { _eq: $moduleId } }\n limit: $pageSize\n offset: $offset\n order_by: { block: { height: desc } }\n ) {\n remark\n block {\n height\n timestamp\n }\n upgrade_policy\n }\n }\n"
): typeof documents["\n query getModuleHistoriesQuery(\n $moduleId: Int!\n $pageSize: Int!\n $offset: Int!\n ) {\n module_histories(\n where: { module_id: { _eq: $moduleId } }\n limit: $pageSize\n offset: $offset\n order_by: { block: { height: desc } }\n ) {\n remark\n block {\n height\n timestamp\n }\n upgrade_policy\n }\n }\n"];
export function graphql(
source: "\n query getModuleHistoriesCountQuery($moduleId: Int!) {\n module_histories_aggregate(where: { module_id: { _eq: $moduleId } }) {\n aggregate {\n count\n }\n }\n }\n"
): typeof documents["\n query getModuleHistoriesCountQuery($moduleId: Int!) {\n module_histories_aggregate(where: { module_id: { _eq: $moduleId } }) {\n aggregate {\n count\n }\n }\n }\n"];
export function graphql(
source: "\n query getPoolList(\n $expression: pools_bool_exp\n $order: order_by\n $offset: Int!\n $pageSize: Int!\n ) {\n pools(\n where: $expression\n order_by: { id: $order }\n offset: $offset\n limit: $pageSize\n ) {\n id\n type\n is_superfluid\n liquidity\n contract_address\n }\n }\n"
): typeof documents["\n query getPoolList(\n $expression: pools_bool_exp\n $order: order_by\n $offset: Int!\n $pageSize: Int!\n ) {\n pools(\n where: $expression\n order_by: { id: $order }\n offset: $offset\n limit: $pageSize\n ) {\n id\n type\n is_superfluid\n liquidity\n contract_address\n }\n }\n"];
Expand Down Expand Up @@ -242,6 +261,12 @@ export function graphql(
export function graphql(
source: "\n query getBlockTransactionCountByHeightQuery($height: Int!) {\n transactions_aggregate(where: { block_height: { _eq: $height } }) {\n aggregate {\n count\n }\n }\n }\n"
): typeof documents["\n query getBlockTransactionCountByHeightQuery($height: Int!) {\n transactions_aggregate(where: { block_height: { _eq: $height } }) {\n aggregate {\n count\n }\n }\n }\n"];
export function graphql(
source: "\n query getModuleTransactionsQuery(\n $moduleId: Int!\n $pageSize: Int!\n $offset: Int!\n ) {\n module_transactions(\n where: { module_id: { _eq: $moduleId } }\n limit: $pageSize\n offset: $offset\n order_by: { block_height: desc }\n ) {\n block {\n height\n timestamp\n }\n transaction {\n account {\n address\n }\n hash\n success\n messages\n is_clear_admin\n is_execute\n is_ibc\n is_instantiate\n is_migrate\n is_send\n is_store_code\n is_update_admin\n is_move_execute\n is_move_execute_event\n is_move_publish\n is_move_script\n is_move_upgrade\n }\n }\n }\n"
): typeof documents["\n query getModuleTransactionsQuery(\n $moduleId: Int!\n $pageSize: Int!\n $offset: Int!\n ) {\n module_transactions(\n where: { module_id: { _eq: $moduleId } }\n limit: $pageSize\n offset: $offset\n order_by: { block_height: desc }\n ) {\n block {\n height\n timestamp\n }\n transaction {\n account {\n address\n }\n hash\n success\n messages\n is_clear_admin\n is_execute\n is_ibc\n is_instantiate\n is_migrate\n is_send\n is_store_code\n is_update_admin\n is_move_execute\n is_move_execute_event\n is_move_publish\n is_move_script\n is_move_upgrade\n }\n }\n }\n"];
export function graphql(
source: "\n query getModuleTransactionsCountQuery($moduleId: Int!) {\n module_transactions_aggregate(where: { module_id: { _eq: $moduleId } }) {\n aggregate {\n count\n }\n }\n }\n"
): typeof documents["\n query getModuleTransactionsCountQuery($moduleId: Int!) {\n module_transactions_aggregate(where: { module_id: { _eq: $moduleId } }) {\n aggregate {\n count\n }\n }\n }\n"];
export function graphql(
source: "\n query getValidators {\n validators {\n commission_max_change\n commission_max_rate\n commission_rate\n consensus_address\n details\n identity\n jailed\n min_self_delegation\n moniker\n operator_address\n website\n }\n }\n"
): typeof documents["\n query getValidators {\n validators {\n commission_max_change\n commission_max_rate\n commission_rate\n consensus_address\n details\n identity\n jailed\n min_self_delegation\n moniker\n operator_address\n website\n }\n }\n"];
Expand Down
Loading

1 comment on commit eea60e1

@vercel
Copy link

@vercel vercel bot commented on eea60e1 Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.