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

[Checked out from #545] feat: wireup module transaction history table #558

Merged
merged 8 commits into from
Oct 18, 2023
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
- [#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
- [#544](https://github.com/alleslabs/celatone-frontend/pull/544) Show module source code if available
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",
poomthiti marked this conversation as resolved.
Show resolved Hide resolved
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",
// RESOURCE
ACCOUNT_RESOURCES = "CELATONE_QUERY_ACCOUNT_RESOURCES",
}
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}`}>
poomthiti marked this conversation as resolved.
Show resolved Hide resolved
<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