Merge pull request #393 from hirosystems/beta

beta to develop
This commit is contained in:
Rafael Cárdenas
2025-02-03 14:43:41 -06:00
committed by GitHub
3 changed files with 28 additions and 4 deletions

View File

@@ -1,3 +1,28 @@
## [3.0.0-beta.5](https://github.com/hirosystems/ordhook/compare/v3.0.0-beta.4...v3.0.0-beta.5) (2025-01-29)
### Bug Fixes
* store inscription content as is ([#391](https://github.com/hirosystems/ordhook/issues/391)) ([3f10607](https://github.com/hirosystems/ordhook/commit/3f10607ba9ef1d6b0d6fd68f9779031e239c0596))
## [3.0.0-beta.4](https://github.com/hirosystems/ordhook/compare/v3.0.0-beta.3...v3.0.0-beta.4) (2025-01-28)
### Bug Fixes
* **brc20:** add to_address index to operations table ([#390](https://github.com/hirosystems/ordhook/issues/390)) ([67c6035](https://github.com/hirosystems/ordhook/commit/67c6035828994dd72e7ffa72b4e405c04465acb3))
## [3.0.0-beta.3](https://github.com/hirosystems/ordhook/compare/v3.0.0-beta.2...v3.0.0-beta.3) (2025-01-14)
### ⚠ BREAKING CHANGES
* store inscription data in postgres instead of sqlite (#375)
### Code Refactoring
* store inscription data in postgres instead of sqlite ([#375](https://github.com/hirosystems/ordhook/issues/375)) ([4afb201](https://github.com/hirosystems/ordhook/commit/4afb2010068770078c7d9fd2ab37533352379c15))
## [3.0.0-beta.2](https://github.com/hirosystems/ordhook/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2024-09-24)

View File

@@ -43,9 +43,7 @@ impl DbInscription {
tx_index: usize,
timestamp: u32,
) -> Self {
// Remove null bytes from `content` and `content_type`
let mut content = hex::decode(&reveal.content_bytes[2..]).unwrap();
content.retain(|&x| x != 0);
// Remove null bytes from `content_type`
let mut content_type_bytes = reveal.content_type.clone().into_bytes();
content_type_bytes.retain(|&x| x != 0);
let content_type = String::from_utf8(content_type_bytes).unwrap();
@@ -62,7 +60,7 @@ impl DbInscription {
mime_type: content_type.split(';').nth(0).unwrap().to_string(),
content_type,
content_length: PgBigIntU32(reveal.content_length as u32),
content,
content: hex::decode(&reveal.content_bytes[2..]).unwrap(),
fee: PgNumericU64(reveal.inscription_fee),
curse_type: reveal.curse_type.as_ref().map(|c| match c {
OrdinalInscriptionCurseType::DuplicateField => "duplicate_field".to_string(),

View File

@@ -0,0 +1 @@
CREATE INDEX operations_to_address_index ON operations (to_address);