Skip to content

Commit

Permalink
datasource/ethereum: Move to chain/ethereum, rename crate
Browse files Browse the repository at this point in the history
We'll be adding multi-blockchain in the not too distant future and
we have discussed using more clearly separated terminology for the
different components of The Graph. We'll be calling different
technologies like Ethereum, Cosmos etc. "chains" and their specific
instances (like Ethereum mainnet, Kovan, POA) "networks".
  • Loading branch information
Jannis committed Nov 20, 2019
1 parent 1600b21 commit 1959990
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 23 deletions.
28 changes: 14 additions & 14 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
@@ -1,7 +1,7 @@
[workspace]
members = [
"core",
"datasource/ethereum",
"chain/ethereum",
"graphql",
"mock",
"node",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ the environment variables that can be configured.
common data.
- `core` — A library providing implementations for core components, used by all
nodes.
- `datasource/ethereum` — A library with components for obtaining data from
- `chain/ethereum` — A library with components for obtaining data from
Ethereum.
- `graphql` — A GraphQL implementation with API schema generation,
introspection, and more.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "graph-datasource-ethereum"
name = "graph-chain-ethereum"
version = "0.16.1"
edition = "2018"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use ethabi::{Function, Param, ParamType, Token};
use graph::components::ethereum::EthereumContractCall;
use graph::prelude::EthereumAdapter as EthereumAdapterTrait;
use graph::prelude::*;
use graph_datasource_ethereum::EthereumAdapter;
use graph_chain_ethereum::EthereumAdapter;
use mock::MockMetricsRegistry;
use web3::helpers::*;
use web3::types::*;
Expand Down
2 changes: 1 addition & 1 deletion graph/src/log/elastic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pub struct ElasticDrainConfig {
/// "timestamp": "2018-11-08T00:54:52.589258000Z",
/// "subgraphId": "Qmb31zcpzqga7ERaUTp83gVdYcuBasz4rXUHFufikFTJGU",
/// "meta": {
/// "module": "graph_datasource_ethereum::block_stream",
/// "module": "graph_chain_ethereum::block_stream",
/// "line": 220,
/// "column": 9
/// },
Expand Down
2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ url = "1.7.1"
crossbeam-channel = "0.3.9"
graph = { path = "../graph" }
graph-core = { path = "../core" }
graph-datasource-ethereum = { path = "../datasource/ethereum" }
graph-chain-ethereum = { path = "../chain/ethereum" }
graph-mock = { path = "../mock" }
graph-runtime-wasm = { path = "../runtime/wasm" }
graph-server-http = { path = "../server/http" }
Expand Down
6 changes: 3 additions & 3 deletions node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ use graph::prelude::{
EthereumAdapter as EthereumAdapterTrait, IndexNodeServer as _, JsonRpcServer as _, *,
};
use graph::util::security::SafeDisplay;
use graph_chain_ethereum::{BlockIngestor, BlockStreamBuilder, Transport};
use graph_core::{
LinkResolver, MetricsRegistry, SubgraphAssignmentProvider as IpfsSubgraphAssignmentProvider,
SubgraphInstanceManager, SubgraphRegistrar as IpfsSubgraphRegistrar,
};
use graph_datasource_ethereum::{BlockStreamBuilder, Transport};
use graph_runtime_wasm::RuntimeHostBuilder as WASMRuntimeHostBuilder;
use graph_server_http::GraphQLServer as GraphQLQueryServer;
use graph_server_index_node::IndexNodeServer;
Expand Down Expand Up @@ -563,7 +563,7 @@ fn async_main() -> impl Future<Item = (), Error = ()> + Send + 'static {

// Create Ethereum block ingestors and spawn a thread to run each
eth_adapters.iter().for_each(|(network_name, eth_adapter)| {
let block_ingestor = graph_datasource_ethereum::BlockIngestor::new(
let block_ingestor = BlockIngestor::new(
stores.get(network_name).expect("network with name").clone(),
eth_adapter.clone(),
*ANCESTOR_COUNT,
Expand Down Expand Up @@ -797,7 +797,7 @@ fn parse_ethereum_networks_and_nodes(

Ok((
name.to_string(),
Arc::new(graph_datasource_ethereum::EthereumAdapter::new(
Arc::new(graph_chain_ethereum::EthereumAdapter::new(
transport,
eth_rpc_metrics.clone(),
)) as Arc<dyn EthereumAdapter>,
Expand Down

0 comments on commit 1959990

Please sign in to comment.