Skip to content

Commit

Permalink
feat: add cover ipfs data column
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfutago committed Dec 8, 2024
1 parent 6180ced commit d4fceab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ models:
- &is_migrated
name: is_migrated
description: "is migrated flag"
- name: cover_ipfs_data
- name: trace_address
- *tx_hash

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ cover_sales as (
from_hex(json_query(c.params, 'lax $.commissionDestination' omit quotes)) as commission_destination,
cast(json_query(t.pool_allocation, 'lax $.coverAmountInAsset') as uint256) as cover_amount_in_asset,
cast(json_query(t.pool_allocation, 'lax $.skip') as boolean) as pool_allocation_skip,
cast(json_query(c.params, 'lax $.ipfsData' omit quotes) as varchar) as cover_ipfs_data,
c.call_trace_address as trace_address,
c.call_tx_hash as tx_hash
from {{ source('nexusmutual_ethereum', 'Cover_call_buyCover') }} c
Expand Down Expand Up @@ -99,6 +100,7 @@ cover_premiums as (
end as premium_asset,
c.cover_owner,
c.commission_destination,
c.cover_ipfs_data,
c.trace_address,
c.tx_hash
from cover_sales c
Expand Down Expand Up @@ -138,6 +140,7 @@ covers_v2 as (
cp.commission,
cp.commission_ratio,
cp.commission_destination,
cp.cover_ipfs_data,
cp.trace_address,
cp.tx_hash
from cover_premiums cp
Expand Down Expand Up @@ -195,6 +198,7 @@ covers as (
commission_ratio,
commission_destination,
false as is_migrated,
cover_ipfs_data,
trace_address,
tx_hash
from covers_v2
Expand Down Expand Up @@ -223,6 +227,7 @@ covers as (
commission_ratio,
commission_destination,
true as is_migrated,
null as cover_ipfs_data,
null as trace_address,
tx_hash
from covers_v1_migrated
Expand Down Expand Up @@ -255,6 +260,7 @@ select
commission_ratio,
commission_destination,
is_migrated,
cover_ipfs_data,
trace_address,
tx_hash
from covers

0 comments on commit d4fceab

Please sign in to comment.