AN-1865/bridge fix (#52)

* seed update

* usdc fix
This commit is contained in:
Jack Forgash 2022-08-18 13:55:31 -06:00 committed by GitHub
parent 779baa4122
commit c5e8289666
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 66 additions and 57 deletions

View File

@ -0,0 +1,9 @@
teleport_contract,blockchain
A.04ee69443dedf0e4.TeleportCustody,Ethereum
A.0ac14a822e54cc4e.TeleportCustodyBSC,BSC
A.0ac14a822e54cc4e.TeleportCustodySolana,Solana
A.475755d2c9dccc3a.TeleportedSportiumToken,Ethereum
A.bd7e596b12e277df.TeleportCustody,Ethereum
A.c2fa71c36fd5b840.TeleportCustodyBSC,BSC
A.cfdd90d4a00f7b5b.TeleportedTetherToken,Ethereum
A.aad831d03d67904c.TeleportCustodyEthereum,Ethereum
1 teleport_contract blockchain
2 A.04ee69443dedf0e4.TeleportCustody Ethereum
3 A.0ac14a822e54cc4e.TeleportCustodyBSC BSC
4 A.0ac14a822e54cc4e.TeleportCustodySolana Solana
5 A.475755d2c9dccc3a.TeleportedSportiumToken Ethereum
6 A.bd7e596b12e277df.TeleportCustody Ethereum
7 A.c2fa71c36fd5b840.TeleportCustodyBSC BSC
8 A.cfdd90d4a00f7b5b.TeleportedTetherToken Ethereum
9 A.aad831d03d67904c.TeleportCustodyEthereum Ethereum

View File

@ -0,0 +1,10 @@
chain_id,blockchain
1,Ethereum
56,BSC
137,Polygon
250,Fantom
1284,Moonbeam
2222,Kava
9001,Evmos
43114,Avalanche
12340001,Flow
1 chain_id blockchain
2 1 Ethereum
3 56 BSC
4 137 Polygon
5 250 Fantom
6 1284 Moonbeam
7 2222 Kava
8 9001 Evmos
9 43114 Avalanche
10 12340001 Flow

View File

@ -121,7 +121,7 @@ blocto_inbound AS (
WHERE
d.rn = 1
),
teleports_out_withdraw AS (
teleports_out_withdraw_non_fiat AS (
SELECT
tx_id,
event_contract,
@ -139,6 +139,44 @@ teleports_out_withdraw AS (
teleport_direction = 0
)
AND event_index = 0
AND event_contract != 'A.b19436aae4d94622.FiatToken'
),
teleports_out_withdraw_fiat AS (
SELECT
tx_id,
event_contract,
event_data :amount :: DOUBLE AS amount_withdraw,
event_data :from :: STRING AS from_withdraw
FROM
events
WHERE
tx_id IN (
SELECT
tx_id
FROM
teleport_events
WHERE
teleport_direction = 0
)
AND event_index = 1
AND event_contract = 'A.b19436aae4d94622.FiatToken'
),
teleports_out_withdraw AS (
SELECT
tx_id,
event_contract,
amount_withdraw,
from_withdraw
FROM
teleports_out_withdraw_non_fiat
UNION
SELECT
tx_id,
event_contract,
amount_withdraw,
from_withdraw
FROM
teleports_out_withdraw_fiat
),
teleports_out AS (
SELECT
@ -223,32 +261,10 @@ tbl_union AS (
),
tele_labels AS (
SELECT
'A.04ee69443dedf0e4.TeleportCustody' AS teleport_contract,
'Ethereum' AS blockchain
UNION
SELECT
'A.0ac14a822e54cc4e.TeleportCustodyBSC' AS teleport_contract,
'BSC' AS blockchain
UNION
SELECT
'A.0ac14a822e54cc4e.TeleportCustodySolana' AS teleport_contract,
'Solana' AS blockchain
UNION
SELECT
'A.475755d2c9dccc3a.TeleportedSportiumToken' AS teleport_contract,
'Ethereum' AS blockchain
UNION
SELECT
'A.bd7e596b12e277df.TeleportCustody' AS teleport_contract,
'Ethereum' AS blockchain
UNION
SELECT
'A.c2fa71c36fd5b840.TeleportCustodyBSC' AS teleport_contract,
'BSC' AS blockchain
UNION
SELECT
'A.cfdd90d4a00f7b5b.TeleportedTetherToken' AS teleport_contract,
'Ethereum' AS blockchain
teleport_contract,
blockchain
FROM
{{ ref('seeds__blocto_teleport_labels') }}
),
FINAL AS (
SELECT

View File

@ -131,36 +131,10 @@ tbl_union AS (
),
chain_ids AS (
SELECT
1 AS chain_id,
'Ethereum' AS blockchain
UNION
SELECT
56 AS chain_id,
'BSC' AS blockchain
UNION
SELECT
137 AS chain_id,
'Polygon' AS blockchain
UNION
SELECT
250 AS chain_id,
'Fantom' AS blockchain
UNION
SELECT
2222 AS chain_id,
'Kava' AS blockchain
UNION
SELECT
9001 AS chain_id,
'Evmos' AS blockchain
UNION
SELECT
43114 AS chain_id,
'Avalanche' AS blockchain
UNION
SELECT
12340001 AS chain_id,
'Flow' AS blockchain
chain_id,
blockchain
FROM
{{ ref('seeds__celer_chain_ids') }}
),
FINAL AS (
SELECT