diff --git a/hasura/metadata/databases/auratestnet/tables/m_view_ibc_relayer_statistic.yaml b/hasura/metadata/databases/auratestnet/tables/m_view_ibc_relayer_statistic.yaml index 91a0b69ac..5c4018fa8 100644 --- a/hasura/metadata/databases/auratestnet/tables/m_view_ibc_relayer_statistic.yaml +++ b/hasura/metadata/databases/auratestnet/tables/m_view_ibc_relayer_statistic.yaml @@ -11,6 +11,7 @@ select_permissions: - send_asset_transfer - total_asset_transfer - total_channel + - created_at filter: {} limit: 100 allow_aggregations: true diff --git a/hasura/metadata/databases/euphoria/tables/m_view_ibc_relayer_statistic.yaml b/hasura/metadata/databases/euphoria/tables/m_view_ibc_relayer_statistic.yaml index 91a0b69ac..5c4018fa8 100644 --- a/hasura/metadata/databases/euphoria/tables/m_view_ibc_relayer_statistic.yaml +++ b/hasura/metadata/databases/euphoria/tables/m_view_ibc_relayer_statistic.yaml @@ -11,6 +11,7 @@ select_permissions: - send_asset_transfer - total_asset_transfer - total_channel + - created_at filter: {} limit: 100 allow_aggregations: true diff --git a/hasura/metadata/databases/nois/tables/m_view_ibc_relayer_statistic.yaml b/hasura/metadata/databases/nois/tables/m_view_ibc_relayer_statistic.yaml index 91a0b69ac..5c4018fa8 100644 --- a/hasura/metadata/databases/nois/tables/m_view_ibc_relayer_statistic.yaml +++ b/hasura/metadata/databases/nois/tables/m_view_ibc_relayer_statistic.yaml @@ -11,6 +11,7 @@ select_permissions: - send_asset_transfer - total_asset_transfer - total_channel + - created_at filter: {} limit: 100 allow_aggregations: true diff --git a/hasura/metadata/databases/sei/tables/m_view_ibc_relayer_statistic.yaml b/hasura/metadata/databases/sei/tables/m_view_ibc_relayer_statistic.yaml index 91a0b69ac..5c4018fa8 100644 --- a/hasura/metadata/databases/sei/tables/m_view_ibc_relayer_statistic.yaml +++ b/hasura/metadata/databases/sei/tables/m_view_ibc_relayer_statistic.yaml @@ -11,6 +11,7 @@ select_permissions: - send_asset_transfer - total_asset_transfer - total_channel + - created_at filter: {} limit: 100 allow_aggregations: true diff --git a/hasura/metadata/databases/serenity/tables/m_view_ibc_relayer_statistic.yaml b/hasura/metadata/databases/serenity/tables/m_view_ibc_relayer_statistic.yaml index 91a0b69ac..5c4018fa8 100644 --- a/hasura/metadata/databases/serenity/tables/m_view_ibc_relayer_statistic.yaml +++ b/hasura/metadata/databases/serenity/tables/m_view_ibc_relayer_statistic.yaml @@ -11,6 +11,7 @@ select_permissions: - send_asset_transfer - total_asset_transfer - total_channel + - created_at filter: {} limit: 100 allow_aggregations: true diff --git a/hasura/metadata/databases/xstaxy/tables/m_view_ibc_relayer_statistic.yaml b/hasura/metadata/databases/xstaxy/tables/m_view_ibc_relayer_statistic.yaml index 91a0b69ac..5c4018fa8 100644 --- a/hasura/metadata/databases/xstaxy/tables/m_view_ibc_relayer_statistic.yaml +++ b/hasura/metadata/databases/xstaxy/tables/m_view_ibc_relayer_statistic.yaml @@ -11,6 +11,7 @@ select_permissions: - send_asset_transfer - total_asset_transfer - total_channel + - created_at filter: {} limit: 100 allow_aggregations: true diff --git a/migrations/20231122062744_create_m_view_ibc_relayer_statistic.ts b/migrations/20231122062744_create_m_view_ibc_relayer_statistic.ts index 1f296852d..5147cc44d 100644 --- a/migrations/20231122062744_create_m_view_ibc_relayer_statistic.ts +++ b/migrations/20231122062744_create_m_view_ibc_relayer_statistic.ts @@ -9,7 +9,8 @@ export async function up(knex: Knex): Promise { SUM(COALESCE(open_channel.open_channel, 0)) AS open_channel, SUM(COALESCE(ics20.total_asset_transfer, 0)) AS total_asset_transfer, SUM(COALESCE(ics20.send_asset_transfer, 0)) AS send_asset_transfer, - SUM(COALESCE(ics20.receive_asset_transfer, 0)) AS receive_asset_transfer + SUM(COALESCE(ics20.receive_asset_transfer, 0)) AS receive_asset_transfer, + NOW() AS created_at FROM ibc_channel INNER JOIN ibc_connection ON ibc_connection.id = ibc_channel.ibc_connection_id @@ -18,7 +19,7 @@ export async function up(knex: Knex): Promise { ( SELECT ibc_channel.channel_id, Count(ibc_channel.id) AS open_channel FROM ibc_channel - WHERE ibc_channel.state = 'OPEN' + WHERE ibc_channel.state IN('OPEN', 'STATE_OPEN') GROUP BY ibc_channel.channel_id ) AS open_channel ON ibc_channel.channel_id = open_channel.channel_id