diff --git a/Cargo.lock b/Cargo.lock index b1f0c74b5..115a1dd3d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2672,7 +2672,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forc-index" -version = "0.20.11" +version = "0.21.0" dependencies = [ "actix-web", "anyhow", @@ -2705,7 +2705,7 @@ dependencies = [ [[package]] name = "forc-postgres" -version = "0.20.11" +version = "0.21.0" dependencies = [ "anyhow", "clap 3.2.25", @@ -3203,7 +3203,7 @@ dependencies = [ [[package]] name = "fuel-indexer" -version = "0.20.11" +version = "0.21.0" dependencies = [ "anyhow", "async-std", @@ -3235,7 +3235,7 @@ dependencies = [ [[package]] name = "fuel-indexer-api-server" -version = "0.20.11" +version = "0.21.0" dependencies = [ "anyhow", "async-graphql 5.0.10", @@ -3293,7 +3293,7 @@ dependencies = [ [[package]] name = "fuel-indexer-database" -version = "0.20.11" +version = "0.21.0" dependencies = [ "fuel-indexer-database-types", "fuel-indexer-lib", @@ -3305,7 +3305,7 @@ dependencies = [ [[package]] name = "fuel-indexer-database-types" -version = "0.20.11" +version = "0.21.0" dependencies = [ "async-graphql-parser 5.0.10", "async-graphql-value 5.0.10", @@ -3318,7 +3318,7 @@ dependencies = [ [[package]] name = "fuel-indexer-graphql" -version = "0.20.11" +version = "0.21.0" dependencies = [ "async-graphql 5.0.10", "async-graphql-parser 5.0.10", @@ -3336,7 +3336,7 @@ dependencies = [ [[package]] name = "fuel-indexer-lib" -version = "0.20.11" +version = "0.21.0" dependencies = [ "anyhow", "async-graphql-parser 5.0.10", @@ -3361,7 +3361,7 @@ dependencies = [ [[package]] name = "fuel-indexer-macro-utils" -version = "0.20.11" +version = "0.21.0" dependencies = [ "proc-macro-error", "proc-macro2", @@ -3371,7 +3371,7 @@ dependencies = [ [[package]] name = "fuel-indexer-macros" -version = "0.20.11" +version = "0.21.0" dependencies = [ "async-graphql-parser 5.0.10", "async-graphql-value 5.0.10", @@ -3393,7 +3393,7 @@ dependencies = [ [[package]] name = "fuel-indexer-metrics" -version = "0.20.11" +version = "0.21.0" dependencies = [ "axum 0.6.20", "lazy_static", @@ -3403,7 +3403,7 @@ dependencies = [ [[package]] name = "fuel-indexer-plugin" -version = "0.20.11" +version = "0.21.0" dependencies = [ "anyhow", "async-trait", @@ -3426,7 +3426,7 @@ dependencies = [ [[package]] name = "fuel-indexer-postgres" -version = "0.20.11" +version = "0.21.0" dependencies = [ "bigdecimal", "chrono", @@ -3441,7 +3441,7 @@ dependencies = [ [[package]] name = "fuel-indexer-schema" -version = "0.20.11" +version = "0.21.0" dependencies = [ "async-graphql-parser 5.0.10", "fuel-indexer-database", @@ -3518,7 +3518,7 @@ dependencies = [ [[package]] name = "fuel-indexer-types" -version = "0.20.11" +version = "0.21.0" dependencies = [ "bytes", "fuel-tx 0.35.3", @@ -3531,7 +3531,7 @@ dependencies = [ [[package]] name = "fuel-indexer-utils" -version = "0.20.11" +version = "0.21.0" dependencies = [ "fuel-indexer-macros", "fuel-indexer-plugin", diff --git a/Cargo.toml b/Cargo.toml index 6af964147..1861e2b69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,29 +61,29 @@ homepage = "https://fuel.network/" license = "Apache-2.0" repository = "https://github.com/FuelLabs/fuel-indexer" rust-version = "1.72.1" -version = "0.20.11" +version = "0.21.0" [workspace.dependencies] async-graphql-parser = "5.0" async-graphql-value = "5.0" bincode = "1.3" clap = "3.1" -forc-index = { version = "0.20.11", path = "./plugins/forc-index" } -forc-postgres = { version = "0.20.11", path = "./plugins/forc-postgres" } -fuel-indexer = { version = "0.20.11", path = "./packages/fuel-indexer" } -fuel-indexer-api-server = { version = "0.20.11", path = "./packages/fuel-indexer-api-server" } -fuel-indexer-database = { version = "0.20.11", path = "./packages/fuel-indexer-database" } -fuel-indexer-database-types = { version = "0.20.11", path = "./packages/fuel-indexer-database/database-types" } -fuel-indexer-graphql = { version = "0.20.11", path = "./packages/fuel-indexer-graphql" } -fuel-indexer-lib = { version = "0.20.11", path = "./packages/fuel-indexer-lib" } -fuel-indexer-macro-utils = { version = "0.20.11", path = "./packages/fuel-indexer-macros/macro-utils" } -fuel-indexer-macros = { version = "0.20.11", path = "./packages/fuel-indexer-macros", default-features = false } -fuel-indexer-metrics = { version = "0.20.11", path = "./packages/fuel-indexer-metrics" } -fuel-indexer-plugin = { version = "0.20.11", path = "./packages/fuel-indexer-plugin", default-features = false } -fuel-indexer-postgres = { version = "0.20.11", path = "./packages/fuel-indexer-database/postgres" } -fuel-indexer-schema = { version = "0.20.11", path = "./packages/fuel-indexer-schema", default-features = false } -fuel-indexer-types = { version = "0.20.11", path = "./packages/fuel-indexer-types" } -fuel-indexer-utils = { version = "0.20.11", path = "./packages/fuel-indexer-utils" } +forc-index = { version = "0.21.0", path = "./plugins/forc-index" } +forc-postgres = { version = "0.21.0", path = "./plugins/forc-postgres" } +fuel-indexer = { version = "0.21.0", path = "./packages/fuel-indexer" } +fuel-indexer-api-server = { version = "0.21.0", path = "./packages/fuel-indexer-api-server" } +fuel-indexer-database = { version = "0.21.0", path = "./packages/fuel-indexer-database" } +fuel-indexer-database-types = { version = "0.21.0", path = "./packages/fuel-indexer-database/database-types" } +fuel-indexer-graphql = { version = "0.21.0", path = "./packages/fuel-indexer-graphql" } +fuel-indexer-lib = { version = "0.21.0", path = "./packages/fuel-indexer-lib" } +fuel-indexer-macro-utils = { version = "0.21.0", path = "./packages/fuel-indexer-macros/macro-utils" } +fuel-indexer-macros = { version = "0.21.0", path = "./packages/fuel-indexer-macros", default-features = false } +fuel-indexer-metrics = { version = "0.21.0", path = "./packages/fuel-indexer-metrics" } +fuel-indexer-plugin = { version = "0.21.0", path = "./packages/fuel-indexer-plugin", default-features = false } +fuel-indexer-postgres = { version = "0.21.0", path = "./packages/fuel-indexer-database/postgres" } +fuel-indexer-schema = { version = "0.21.0", path = "./packages/fuel-indexer-schema", default-features = false } +fuel-indexer-types = { version = "0.21.0", path = "./packages/fuel-indexer-types" } +fuel-indexer-utils = { version = "0.21.0", path = "./packages/fuel-indexer-utils" } fuel-tx = { version = "=0.35.3", default-features = false } fuel-types = { version = "=0.35.3", default-features = false, features = ["serde"] } fuel-vm = { version = "=0.35.3", default-features = false } diff --git a/packages/fuel-indexer-schema/src/lib.rs b/packages/fuel-indexer-schema/src/lib.rs index 1605e5452..6ccf24b93 100644 --- a/packages/fuel-indexer-schema/src/lib.rs +++ b/packages/fuel-indexer-schema/src/lib.rs @@ -178,7 +178,7 @@ impl FtColumn { }, FtColumn::Bytes(value) => match value { Some(blob) => { - let x = hex::encode(blob.as_ref()); + let x = hex::encode(blob); format!("'{x}'") } None => String::from(NULL_VALUE), diff --git a/packages/fuel-indexer-types/src/lib.rs b/packages/fuel-indexer-types/src/lib.rs index b99bfe746..eb4c6a491 100644 --- a/packages/fuel-indexer-types/src/lib.rs +++ b/packages/fuel-indexer-types/src/lib.rs @@ -1,4 +1,3 @@ -#![deny(unused_crate_dependencies)] pub mod ffi; pub mod fuel; pub mod graphql; diff --git a/packages/fuel-indexer-types/src/scalar.rs b/packages/fuel-indexer-types/src/scalar.rs index 78383b012..5e8bf7fc0 100644 --- a/packages/fuel-indexer-types/src/scalar.rs +++ b/packages/fuel-indexer-types/src/scalar.rs @@ -1,4 +1,3 @@ -use bytes::Bytes as _Bytes; pub use fuel_types::{ Address, AssetId, BlockHeight, Bytes32, Bytes4, Bytes64, Bytes8, ContractId, MessageId, Nonce, Salt, Word, @@ -43,7 +42,7 @@ pub type I8 = i8; pub type U8 = u8; /// Scalar for arbitrarily-sized byte payloads. -pub type Bytes = _Bytes; +pub type Bytes = Vec; /// JSON type used to store arbitrary object payloads. #[derive(Deserialize, Serialize, Clone, Eq, PartialEq, Debug, Hash)] diff --git a/plugins/forc-index/src/defaults.rs b/plugins/forc-index/src/defaults.rs index 62db4fb63..67059da3e 100644 --- a/plugins/forc-index/src/defaults.rs +++ b/plugins/forc-index/src/defaults.rs @@ -31,8 +31,8 @@ path = "src/main.rs" [dependencies] async-trait = {{ version = "0.1" }} -fuel-indexer = {{ version = "0.20", default-features = false }} -fuel-indexer-utils = {{ version = "0.20", features = ["native-execution"] }} +fuel-indexer = {{ version = "0.21", default-features = false }} +fuel-indexer-utils = {{ version = "0.21", features = ["native-execution"] }} fuels = {{ version = "0.46", default-features = false, features = ["std"] }} getrandom = {{ version = "0.2", features = ["js"] }} serde = {{ version = "1.0", default-features = false, features = ["derive"] }} @@ -54,7 +54,7 @@ rust-version = "1.72.1" crate-type = ['cdylib'] [dependencies] -fuel-indexer-utils = {{ version = "0.20" }} +fuel-indexer-utils = {{ version = "0.21" }} fuels = {{ version = "0.46", default-features = false }} getrandom = {{ version = "0.2", features = ["js"] }} serde = {{ version = "1.0", default-features = false, features = ["derive"] }}