Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
move code
Browse files Browse the repository at this point in the history
  • Loading branch information
lostman committed Oct 27, 2023
1 parent 1f59c21 commit 7bea7ec
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 80 deletions.
11 changes: 1 addition & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ default-members = [
"packages/fuel-indexer-graphql",
"packages/fuel-indexer-lib",
"packages/fuel-indexer-macros",
"packages/fuel-indexer-metrics-macros",
"packages/fuel-indexer-metrics-macros",
"packages/fuel-indexer-metrics",
"packages/fuel-indexer-plugin",
"packages/fuel-indexer-schema",
Expand Down
1 change: 0 additions & 1 deletion packages/fuel-indexer-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ async-graphql-parser = { workspace = true }
async-graphql-value = { workspace = true }
bincode = { workspace = true }
clap = { features = ["cargo", "derive", "env"], workspace = true }
fuel-abi-types = "0.3"
fuel-indexer-types = { workspace = true }
http = { version = "0.2", default-features = false }
lazy_static = { version = "1.4" }
Expand Down
47 changes: 0 additions & 47 deletions packages/fuel-indexer-lib/src/helpers.rs

This file was deleted.

1 change: 0 additions & 1 deletion packages/fuel-indexer-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pub mod config;
pub mod constants;
pub mod defaults;
pub mod graphql;
pub mod helpers;
pub mod manifest;
pub mod utils;

Expand Down
1 change: 1 addition & 0 deletions packages/fuel-indexer-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ async-graphql-value = "5.0"
fuel-abi-types = "0.3"
fuel-indexer-database-types = { workspace = true }
fuel-indexer-lib = { workspace = true, default-features = true }
fuel-indexer-macro-utils = { workspace = true }
fuel-indexer-schema = { workspace = true, default-features = false }
fuel-indexer-types = { workspace = true }
fuels = { workspace = true }
Expand Down
9 changes: 0 additions & 9 deletions packages/fuel-indexer-macros/macro-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,7 @@ rust-version = { workspace = true }
description = "Fuel Indexer Macro Utils"

[dependencies]
async-graphql-parser = "5.0"
async-graphql-value = "5.0"
fuel-abi-types = "0.3"
fuel-indexer-lib = { workspace = true, default-features = true }
fuels = { workspace = true }
fuels-code-gen = { version = "0.46", default-features = false }
lazy_static = "1.4"
proc-macro-error = "1.0"
proc-macro2 = "1.0"
quote = "1.0"
serde_json = { workspace = true }
sha2 = "0.10"
syn = { version = "2.0", features = ["full"] }
4 changes: 3 additions & 1 deletion packages/fuel-indexer-macros/macro-utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
pub mod schema;
#![deny(unused_crate_dependencies)]
pub mod helpers;
pub mod schema;
7 changes: 2 additions & 5 deletions packages/fuel-indexer-macros/macro-utils/src/schema.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
use fuel_abi_types::abi::program::{ProgramABI, TypeDeclaration};
use fuel_indexer_lib::{
constants, graphql,
helpers::{is_unit_type, strip_callpath_from_type_field},
};
use fuel_indexer_lib::{constants, graphql};
use std::collections::HashMap;

// Given a `TypeDeclaration` for an ABI enum, generate a corresponding GraphQL
Expand Down Expand Up @@ -112,7 +109,7 @@ pub fn generate_schema(json_abi: &std::path::Path) -> String {
let abi_types: Vec<TypeDeclaration> = abi
.types
.into_iter()
.map(strip_callpath_from_type_field)
.map(crate::helpers::strip_callpath_from_type_field)
.collect();

let mut output: Vec<String> = vec![];
Expand Down
8 changes: 4 additions & 4 deletions packages/fuel-indexer-macros/src/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ use crate::{
};
use fuel_abi_types::abi::program::TypeDeclaration;
use fuel_indexer_lib::{
constants::*,
helpers::{is_non_decodable_type, is_tuple_type, strip_callpath_from_type_field},
manifest::ContractIds,
manifest::Manifest,
constants::*, manifest::ContractIds, manifest::Manifest,
utils::workspace_manifest_prefix,
};
use fuel_indexer_macro_utils::helpers::{
is_non_decodable_type, is_tuple_type, strip_callpath_from_type_field,
};
use fuel_indexer_types::{type_id, FUEL_TYPES_NAMESPACE};
use fuels::{core::codec::resolve_fn_selector, types::param_types::ParamType};
use fuels_code_gen::{Abigen, AbigenTarget, ProgramType};
Expand Down
2 changes: 1 addition & 1 deletion packages/fuel-indexer-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ use proc_macro::TokenStream;
#[proc_macro_attribute]
pub fn indexer(attrs: TokenStream, item: TokenStream) -> TokenStream {
process_indexer_module(attrs, item)
}
}

0 comments on commit 7bea7ec

Please sign in to comment.