-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add filter options for show_fungibles which will include token_info on assets where applicable. Integration tests cover variations of in query and valid responses. Set up entity orm relations between asset and token models. Co-authored-by: Kyle Espinola <[email protected]> Co-authored-by: Ahzam Akhtar <[email protected]>
- Loading branch information
1 parent
d914e4b
commit e436a14
Showing
44 changed files
with
1,098 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
use sea_orm::{EntityTrait, EnumIter, Related, RelationDef, RelationTrait}; | ||
|
||
use crate::dao::{asset, token_accounts}; | ||
|
||
#[derive(Copy, Clone, Debug, EnumIter)] | ||
pub enum Relation { | ||
Asset, | ||
} | ||
|
||
impl RelationTrait for Relation { | ||
fn def(&self) -> RelationDef { | ||
match self { | ||
Self::Asset => token_accounts::Entity::belongs_to(asset::Entity) | ||
.from(token_accounts::Column::Mint) | ||
.to(asset::Column::Id) | ||
.into(), | ||
} | ||
} | ||
} | ||
|
||
impl Related<asset::Entity> for token_accounts::Entity { | ||
fn to() -> RelationDef { | ||
Relation::Asset.def() | ||
} | ||
} |
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
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
Binary file added
BIN
+824 Bytes
...ts/get_asset_by_authority_with_show_fungible/7fXKY9tPpvYsdbSNyesUqo27WYC6ZsBEULdtngGHqLCK
Binary file not shown.
Binary file added
BIN
+312 Bytes
...ts/get_asset_by_authority_with_show_fungible/8Xv3SpX94HHf32Apg4TeSeS3i2p6wuXeE8FBZr168Hti
Binary file not shown.
Binary file added
BIN
+224 Bytes
...ts/get_asset_by_authority_with_show_fungible/AH6wj7T8Ke5nbukjtcobjjs1CDWUcQxndtnLkKAdrSrM
Binary file not shown.
Binary file added
BIN
+824 Bytes
...unts/get_asset_by_creator_with_show_fungible/7fXKY9tPpvYsdbSNyesUqo27WYC6ZsBEULdtngGHqLCK
Binary file not shown.
Binary file added
BIN
+312 Bytes
...unts/get_asset_by_creator_with_show_fungible/8Xv3SpX94HHf32Apg4TeSeS3i2p6wuXeE8FBZr168Hti
Binary file not shown.
Binary file added
BIN
+224 Bytes
...unts/get_asset_by_creator_with_show_fungible/AH6wj7T8Ke5nbukjtcobjjs1CDWUcQxndtnLkKAdrSrM
Binary file not shown.
Binary file added
BIN
+824 Bytes
...counts/get_asset_by_owner_with_show_fungible/7fXKY9tPpvYsdbSNyesUqo27WYC6ZsBEULdtngGHqLCK
Binary file not shown.
Binary file added
BIN
+312 Bytes
...counts/get_asset_by_owner_with_show_fungible/8Xv3SpX94HHf32Apg4TeSeS3i2p6wuXeE8FBZr168Hti
Binary file not shown.
Binary file added
BIN
+224 Bytes
...counts/get_asset_by_owner_with_show_fungible/AH6wj7T8Ke5nbukjtcobjjs1CDWUcQxndtnLkKAdrSrM
Binary file not shown.
Binary file added
BIN
+312 Bytes
...t_asset_by_owner_with_show_fungible_scenario/6BRNfDfdq1nKyU1TQiCEQLWyPtD8EwUH9Kt2ahsbidUx
Binary file not shown.
Binary file added
BIN
+824 Bytes
...t_asset_by_owner_with_show_fungible_scenario/7BajpcYgnxmWK91RhrfsdB3Tm83PcDwPvMC8ZinvtTY6
Binary file not shown.
Binary file added
BIN
+224 Bytes
...t_asset_by_owner_with_show_fungible_scenario/7EYnhQoR9YM3N7UoaKRoA44Uy8JeaZV3qyouov87awMs
Binary file not shown.
Binary file added
BIN
+824 Bytes
...unts/get_asset_with_show_fungible_scenario_1/7z6b5TE4WX4mgcQjuNBTDxK4SE75sbgEg5WWJwoUeie8
Binary file not shown.
Binary file added
BIN
+312 Bytes
...unts/get_asset_with_show_fungible_scenario_1/8myaCN6KcKVkMqroXuLJq6QsqRcPbvme4wV5Ubfr5mDC
Binary file not shown.
Binary file added
BIN
+224 Bytes
...unts/get_asset_with_show_fungible_scenario_1/Ca84nWhQu41DMRnjdhRrLZty1i9txepMhAhz5qLLGcBw
Binary file not shown.
Binary file added
BIN
+824 Bytes
...unts/get_asset_with_show_fungible_scenario_2/7fXKY9tPpvYsdbSNyesUqo27WYC6ZsBEULdtngGHqLCK
Binary file not shown.
Binary file added
BIN
+312 Bytes
...unts/get_asset_with_show_fungible_scenario_2/8Xv3SpX94HHf32Apg4TeSeS3i2p6wuXeE8FBZr168Hti
Binary file not shown.
Binary file added
BIN
+224 Bytes
...unts/get_asset_with_show_fungible_scenario_2/AH6wj7T8Ke5nbukjtcobjjs1CDWUcQxndtnLkKAdrSrM
Binary file not shown.
Binary file added
BIN
+1008 Bytes
...unts/get_asset_with_show_fungible_scenario_3/2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo
Binary file not shown.
Binary file added
BIN
+824 Bytes
...unts/get_asset_with_show_fungible_scenario_4/8yn5oqFMwYA8SgGqWwKq1Hia8aM5gh1DWmHEL34hMqBX
Binary file not shown.
Binary file added
BIN
+224 Bytes
...unts/get_asset_with_show_fungible_scenario_4/J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn
Binary file not shown.
Binary file added
BIN
+224 Bytes
...ata/accounts/token_extension_with_no_metadata/wKocBVvHQoVaiwWoCs9JYSVye4YZRrv5Cucf7fDqnz1
Binary file not shown.
Binary file added
BIN
+224 Bytes
.../accounts/token_keg_fungible_with_no_metadata/wKocBVvHQoVaiwWoCs9JYSVye4YZRrv5Cucf7fDqnz1
Binary file not shown.
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
Oops, something went wrong.