Skip to content

Commit

Permalink
Add deposit field to pool_info and pool_info_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlrt committed Jul 30, 2024
1 parent a14598c commit e6066a3
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 0 deletions.
6 changes: 6 additions & 0 deletions files/grest/rpc/01_cached_tables/pool_info_cache.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 [],
Expand All @@ -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
)
Expand Down Expand Up @@ -76,6 +78,7 @@ BEGIN
margin,
fixed_cost,
pledge,
deposit,
reward_addr,
owners,
relays,
Expand All @@ -98,6 +101,7 @@ BEGIN
_margin,
_fixed_cost,
_pledge,
_deposit,
sa.view,
ARRAY(
SELECT sa.view
Expand Down Expand Up @@ -213,6 +217,7 @@ BEGIN
new.margin,
new.fixed_cost,
new.pledge,
new.deposit,
new.reward_addr_id,
new.meta_id
);
Expand Down Expand Up @@ -313,6 +318,7 @@ BEGIN
rec.margin,
rec.fixed_cost,
rec.pledge,
rec.deposit,
rec.reward_addr_id,
rec.meta_id
);
Expand Down
2 changes: 2 additions & 0 deletions files/grest/rpc/pool/pool_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 [],
Expand Down Expand Up @@ -58,6 +59,7 @@ BEGIN
api.margin,
api.fixed_cost::text,
api.pledge::text,
api.deposit::text,
api.reward_addr,
api.owners,
api.relays,
Expand Down
6 changes: 6 additions & 0 deletions specs/results/koiosapi-guild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions specs/results/koiosapi-mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions specs/results/koiosapi-preprod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions specs/results/koiosapi-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions specs/templates/4-api-schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e6066a3

Please sign in to comment.