-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ark-metadata): collection filters with metadata (#422)
## Description 1. add elastic search manager to insert data in elastic search <!-- Please do not leave this blank. Describe the changes in this PR. What does it [add/remove/fix/replace]? For crafting a good description, consider using ChatGPT to help articulate your changes. --> ## What type of PR is this? (check all applicable) - [ ] 🍕 Feature (`feat:`) - [ ] 🐛 Bug Fix (`fix:`) - [ ] 📝 Documentation Update (`docs:`) - [ ] 🎨 Style (`style:`) - [ ] 🧑💻 Code Refactor (`refactor:`) - [ ] 🔥 Performance Improvements (`perf:`) - [ ] ✅ Test (`test:`) - [ ] 🤖 Build (`build:`) - [ ] 🔁 CI (`ci:`) - [ ] 📦 Chore (`chore:`) - [ ] ⏩ Revert (`revert:`) - [ ] 🚀 Breaking Changes (`BREAKING CHANGE:`) ## Related Tickets & Documents <!-- Please use this format to link related issues: Fixes #<issue_number> More info: https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword --> ## Added tests? - [ ] 👍 yes - [ ] 🙅 no, because they aren't needed - [ ] 🙋 no, because I need help ## Added to documentation? - [ ] 📜 README.md - [ ] 📓 Documentation - [ ] 🙅 no documentation needed ## [optional] Are there any post-deployment tasks we need to perform? <!-- Describe any additional tasks, if any, and provide steps. --> ## [optional] What gif best describes this PR or how it makes you feel? <!-- Share a fun gif related to your PR! --> ### PR Title and Description Guidelines: - Ensure your PR title follows semantic versioning standards. This helps automate releases and changelogs. - Use types like `feat:`, `fix:`, `chore:`, `BREAKING CHANGE:` etc. in your PR title. - Your PR title will be used as a commit message when merging. Make sure it adheres to [Conventional Commits standards](https://www.conventionalcommits.org/). ## Closing Issues <!-- Use keywords to close related issues. This ensures that the associated issues will automatically close when the PR is merged. - `Fixes #123` will close issue 123 when the PR is merged. - `Closes #123` will also close issue 123 when the PR is merged. - `Resolves #123` will also close issue 123 when the PR is merged. You can also use multiple keywords in one comment: - `Fixes #123, Resolves #456` More info: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue -->
- Loading branch information
Showing
5 changed files
with
101 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use crate::types::{RequestError, TokenMetadata}; | ||
use async_trait::async_trait; | ||
|
||
#[cfg(any(test, feature = "mock"))] | ||
use mockall::automock; | ||
|
||
#[cfg_attr(any(test, feature = "mock"), automock)] | ||
#[async_trait] | ||
pub trait ElasticsearchManager { | ||
async fn upsert_token_metadata( | ||
&self, | ||
contract_address: &str, | ||
token_id: &str, | ||
chain_id: &str, | ||
metadata: TokenMetadata, | ||
) -> Result<(), RequestError>; | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub mod elasticsearch_manager; | ||
pub mod file_manager; | ||
pub mod metadata_manager; | ||
pub mod storage; | ||
|
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 |
---|---|---|
@@ -1,14 +1,12 @@ | ||
// This file is auto-generated. Do not edit directly. | ||
|
||
export const SEPOLIA_CONTRACTS = { | ||
messaging: | ||
"0x74f13f1dffb5ad3c051d535ba03514e653b6dcac68e30b2db66a0aa0217c815", | ||
executor: "0xb86ab357c15c12fb78f9b0a19fa974c730fcbab96f17881827dde871665f0b", | ||
orderbook: "0x795b605fa3144afd6f11a4499f71b9cf373bcba3f1b2835d51f65ab59392261" | ||
"messaging": "0x74f13f1dffb5ad3c051d535ba03514e653b6dcac68e30b2db66a0aa0217c815", | ||
"executor": "0xb86ab357c15c12fb78f9b0a19fa974c730fcbab96f17881827dde871665f0b", | ||
"orderbook": "0x795b605fa3144afd6f11a4499f71b9cf373bcba3f1b2835d51f65ab59392261" | ||
}; | ||
export const MAINNET_CONTRACTS = { | ||
messaging: | ||
"0x57d45cc46de463f7ae63b74ce9b6b6b496a1178b02e7ad04d7c307caa698b7b", | ||
executor: "0x7b42945bc47001db92fe1b9739d753925263f2f1036c2ae1f87536c916ee6a", | ||
orderbook: "0x5add3084bb8664eb2a641cf26a28f60588c3ccd63af0632aafefcbb2332c345" | ||
"messaging": "0x57d45cc46de463f7ae63b74ce9b6b6b496a1178b02e7ad04d7c307caa698b7b", | ||
"executor": "0x7b42945bc47001db92fe1b9739d753925263f2f1036c2ae1f87536c916ee6a", | ||
"orderbook": "0x5add3084bb8664eb2a641cf26a28f60588c3ccd63af0632aafefcbb2332c345" | ||
}; |