-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…4011) * Perpetuals Migration - #1 - Migrate tests & seed * fix optimism market address seeds * test fix --------- Co-authored-by: Huang Geyang <Sukebeta@outlook.com>
- Loading branch information
1 parent
0a4016d
commit e33c0bd
Showing
7 changed files
with
70 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: 2 | ||
|
||
seeds: | ||
- name: perpetual_trades_seed | ||
config: | ||
tags: dunesql | ||
column_types: | ||
blockchain: varchar | ||
block_date: date | ||
underlying_asset: varchar | ||
market: varchar | ||
market_address: varbinary | ||
trade: varchar | ||
project: varchar | ||
version: varchar | ||
tx_hash: varbinary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
blockchain,block_date,underlying_asset,market,market_address,trade,project,version,tx_hash | ||
optimism,2022-05-13,APE,vAPE-USD,0x05b552c0a787c228624b389d51eb4277e1f0f348,long,Perpetual,2,0x79a343f6ae9e48a4de8b8f4060d342b823888fa2b179d26f67f2121db5af5dad | ||
optimism,2022-03-16,NEAR,vNEAR-USD,0x2534d4f1325aa7d3fc8d5d14f224e5c587a719b0,short,Perpetual,2,0x79cc4bf1262909a816afde7b313224fc29fb0a2c80363535b43e4871b3c10820 | ||
optimism,2022-05-31,NEAR,vNEAR-USD,0x2534d4f1325aa7d3fc8d5d14f224e5c587a719b0,short,Perpetual,2,0x7ecedaa8d8aece9a056e7d07d3f6a19a92595e44cadf8f7df7391fa3a4e4eed9 | ||
optimism,2022-08-09,DYDX,sDYDX,0x10305c1854d6db8a1060df60bdf8a8b2981249cf,close,Synthetix,1,0x293a72365eed95b166ac0e54ef08852d57fcd8ec1296b56cc8d34c0b34846946 | ||
optimism,2022-03-28,LINK,sLINK,0x1228c7d8bbc5bc53db181bd7b1fce765aa83bf8a,long,Synthetix,1,0x7c7c1860a3271b68a4add22ca9013cbe2113460718d3bfc27e57adf3c80dd287 | ||
optimism,2022-06-01,ETH,sETH,0xf86048dff23cf130107dfb4e6386f574231a5c65,short,Synthetix,1,0x57df95badcfaa7f68a40254143bc52d194577f892ca4c00c1ce94be428025353 | ||
optimism,2022-06-01,BTC,BTC-USD,0x2fae8c7edd26213ca1a88fc57b65352dbe353698,short,Pika,2,0x879aec5c670c66cba05251ba4ff81e01044dddf2a85379a4bb9bc72cd58061af | ||
optimism,2022-06-02,ETH,ETH-USD,0x2fae8c7edd26213ca1a88fc57b65352dbe353698,short,Pika,2,0x857d038fa975fad5b4a08f3dc1cff74a6bfd23a1f6b8e307354d8a0fc032f8ae | ||
optimism,2022-08-31,ETH,ETH-USD,0xd5a8f233cbddb40368d55c3320644fb36e597002,short,Pika,3,0x6a635f2ba13f6a47d7e1b8a6ebc2755dbd0377ed53ef00a1e4b705b36b185e2d | ||
optimism,2022-08-31,MATIC,MATIC-USD,0xd5a8f233cbddb40368d55c3320644fb36e597002,short,Pika,3,0x52177214ada09f58d3a0ea6cfdad27857c4e432a11f2307587e6a490eab3d28c | ||
optimism,2022-08-31,MATIC,MATIC-USD,0xd5a8f233cbddb40368d55c3320644fb36e597002,short,Pika,3,0xd50c2884035201c4e5643d1c4c4cd65e6c3dcbb9e0f3bee741d07a5e02eb3a9d | ||
optimism,2022-03-09,LINK,LINK-USD,0x365324e5045df8c886ebe6ad5449f5ceb5881a40,close,Pika,1,0x0d3906c14ebfc0b6da28e46699d54f7ba3ebdeaba0be90ddae8dfc5e0245adbc | ||
optimism,2022-01-13,BTC,BTC-USD,0x365324e5045df8c886ebe6ad5449f5ceb5881a40,long,Pika,1,0x60eb7268d68583307e262f39296acd179b84de52661036369ae5c95d8231a198 | ||
avalanche_c,2023-01-18,WAVAX,WAVAX,0x9ab2de34a33fb459b538c43f251eb825645e8595,open-long,gmx,1,0xfaef719c389269fd6a337f198432a5aa7e980fd9794a51bff163ca5fe66915b4 | ||
avalanche_c,2023-01-18,USDC,BTC.b-USDC,0x9ab2de34a33fb459b538c43f251eb825645e8595,open-short,gmx,1,0x0d0fe971ac1fc3fdee9f45477e263b44041d533461a790c69f3fba4de1ee4d58 | ||
arbitrum,2023-01-18,USDC,WBTC-USDC,0x489ee077994b6658eafa855c308275ead8097c4a,open-short,gmx,1,0x7451f1514a48d026d7065736539c521cdb7190d9eef6aacc27eebbe4b7387d47 | ||
arbitrum,2023-01-18,USDC,WETH-USDC,0x489ee077994b6658eafa855c308275ead8097c4a,open-short,gmx,1,0x0e75125d6b7009abe41a1d98858eebfdafe39a752bc14fe42f18838124492e34 | ||
avalanche_c,2023-01-27,,,0x3cf47469298b1630c192b2c8d3ffa087abcac8b2,close-short,emdx,1,0x50c2552219d637c954340425d11cfd9c633f60ea53a721c18e2b2fa9557f51c2 | ||
avalanche_c,2023-01-27,,,0x3cf47469298b1630c192b2c8d3ffa087abcac8b2,open-long,emdx,1,0xd456e4ab2ddfc1e877424869ed91f590c58779092d4514263b039e233c8d639a | ||
avalanche_c,2023-01-26,AVAX,AVAX,0x4e3535964cb5612a466d8bb25362d485452efcef,open-short,hubble_exchange,1,0x3f187beac116995fa84a8185fd5c220c9c0dd6b1b7af737ab83065ae3da81329 | ||
avalanche_c,2023-01-18,AVAX,AVAX,0x4e3535964cb5612a466d8bb25362d485452efcef,close-short,hubble_exchange,1,0x984182f9e697acc213bcaf6c87858ebe7e0cbeb99019a73b5100e0ec837e7e96 | ||
optimism,2023-02-26,DYDX,sDYDXPERP,0x139f94e4f0e1101c1464a321cba815c34d58b5d9,long,Synthetix,2,0xa9900b71d779aec64fc08fb96a770677e4b6402cc67ec5ab96e08baf25731b93 | ||
optimism,2023-02-26,ETH,sETHPERP,0x2b3bb4c683bfc5239b029131eef3b1d214478d93,short,Synthetix,2,0x67d7039204428c2c66e058c81fe6632261df3aba0ba04b82442ff2a62a6abbd9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% test perpetual_trades_market_address_legacy(model, column_name, perpetual_trades_seed_legacy) %} | ||
|
||
with unit_test as | ||
( | ||
select | ||
case | ||
when m.{{ column_name }} = seed.{{ column_name }} | ||
then True | ||
else False | ||
end as market_address_test | ||
from {{ model }} m | ||
inner join {{ perpetual_trades_seed_legacy }} seed | ||
on m.tx_hash = seed.tx_hash | ||
and m.block_date = seed.block_date | ||
and m.blockchain = seed.blockchain | ||
and m.project = seed.project | ||
and m.version = seed.version | ||
) | ||
select * | ||
from unit_test | ||
where market_address_test = False | ||
|
||
{% endtest %} |