From e6066a3fb549ba826726e292a472d8d123d141c2 Mon Sep 17 00:00:00 2001 From: rdlrt <3169068+rdlrt@users.noreply.github.com> Date: Tue, 30 Jul 2024 13:45:10 +1000 Subject: [PATCH] Add deposit field to pool_info and pool_info_cache --- files/grest/rpc/01_cached_tables/pool_info_cache.sql | 6 ++++++ files/grest/rpc/pool/pool_info.sql | 2 ++ specs/results/koiosapi-guild.yaml | 6 ++++++ specs/results/koiosapi-mainnet.yaml | 6 ++++++ specs/results/koiosapi-preprod.yaml | 6 ++++++ specs/results/koiosapi-preview.yaml | 6 ++++++ specs/templates/4-api-schemas.yaml | 6 ++++++ 7 files changed, 38 insertions(+) diff --git a/files/grest/rpc/01_cached_tables/pool_info_cache.sql b/files/grest/rpc/01_cached_tables/pool_info_cache.sql index ca50c57d..4589d6bb 100644 --- a/files/grest/rpc/01_cached_tables/pool_info_cache.sql +++ b/files/grest/rpc/01_cached_tables/pool_info_cache.sql @@ -14,6 +14,7 @@ CREATE TABLE grest.pool_info_cache ( margin double precision NOT NULL, fixed_cost lovelace NOT NULL, pledge lovelace NOT NULL, + deposit lovelace NOT NULL, reward_addr character varying, owners character varying [], relays jsonb [], @@ -35,6 +36,7 @@ CREATE OR REPLACE FUNCTION grest.pool_info_insert( _margin double precision, _fixed_cost lovelace, _pledge lovelace, + _deposit lovelace, _reward_addr_id bigint, _meta_id bigint ) @@ -76,6 +78,7 @@ BEGIN margin, fixed_cost, pledge, + deposit, reward_addr, owners, relays, @@ -98,6 +101,7 @@ BEGIN _margin, _fixed_cost, _pledge, + _deposit, sa.view, ARRAY( SELECT sa.view @@ -213,6 +217,7 @@ BEGIN new.margin, new.fixed_cost, new.pledge, + new.deposit, new.reward_addr_id, new.meta_id ); @@ -313,6 +318,7 @@ BEGIN rec.margin, rec.fixed_cost, rec.pledge, + rec.deposit, rec.reward_addr_id, rec.meta_id ); diff --git a/files/grest/rpc/pool/pool_info.sql b/files/grest/rpc/pool/pool_info.sql index e3792668..f2528ebf 100644 --- a/files/grest/rpc/pool/pool_info.sql +++ b/files/grest/rpc/pool/pool_info.sql @@ -7,6 +7,7 @@ RETURNS TABLE ( margin double precision, fixed_cost text, pledge text, + deposit text, reward_addr character varying, owners character varying [], relays jsonb [], @@ -58,6 +59,7 @@ BEGIN api.margin, api.fixed_cost::text, api.pledge::text, + api.deposit::text, api.reward_addr, api.owners, api.relays, diff --git a/specs/results/koiosapi-guild.yaml b/specs/results/koiosapi-guild.yaml index f29ceb6f..f238c4e9 100644 --- a/specs/results/koiosapi-guild.yaml +++ b/specs/results/koiosapi-guild.yaml @@ -2947,6 +2947,12 @@ components: - 'null' description: Pool pledge in lovelace example: "64000000000000" + deposit: + type: + - string + - 'null' + description: Pool's registration deposit in lovelace + example: "500000000" reward_addr: type: - string diff --git a/specs/results/koiosapi-mainnet.yaml b/specs/results/koiosapi-mainnet.yaml index 815f7bae..d3125489 100644 --- a/specs/results/koiosapi-mainnet.yaml +++ b/specs/results/koiosapi-mainnet.yaml @@ -2947,6 +2947,12 @@ components: - 'null' description: Pool pledge in lovelace example: "64000000000000" + deposit: + type: + - string + - 'null' + description: Pool's registration deposit in lovelace + example: "500000000" reward_addr: type: - string diff --git a/specs/results/koiosapi-preprod.yaml b/specs/results/koiosapi-preprod.yaml index a7b42c29..ea2aa357 100644 --- a/specs/results/koiosapi-preprod.yaml +++ b/specs/results/koiosapi-preprod.yaml @@ -2947,6 +2947,12 @@ components: - 'null' description: Pool pledge in lovelace example: "64000000000000" + deposit: + type: + - string + - 'null' + description: Pool's registration deposit in lovelace + example: "500000000" reward_addr: type: - string diff --git a/specs/results/koiosapi-preview.yaml b/specs/results/koiosapi-preview.yaml index 705bd8c0..e3db89a3 100644 --- a/specs/results/koiosapi-preview.yaml +++ b/specs/results/koiosapi-preview.yaml @@ -2947,6 +2947,12 @@ components: - 'null' description: Pool pledge in lovelace example: "64000000000000" + deposit: + type: + - string + - 'null' + description: Pool's registration deposit in lovelace + example: "500000000" reward_addr: type: - string diff --git a/specs/templates/4-api-schemas.yaml b/specs/templates/4-api-schemas.yaml index 2895bd57..13cd2961 100644 --- a/specs/templates/4-api-schemas.yaml +++ b/specs/templates/4-api-schemas.yaml @@ -304,6 +304,12 @@ schemas: - 'null' description: Pool pledge in lovelace example: "64000000000000" + deposit: + type: + - string + - 'null' + description: Pool's registration deposit in lovelace + example: "500000000" reward_addr: type: - string