Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update torii params #120

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions cli/src/command/deployments/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ impl CreateArgs {
torii: Some(CreateToriiConfigInput {
rpc: Some(config.rpc.clone().unwrap_or("".to_string())),
world: format!("{:#x}", config.world),
start_block: Some(config.start_block.unwrap_or(0)),
contracts: config.contracts.clone(),
start_block: config.start_block,
index_pending: config.index_pending,
polling_interval: config.polling_interval,
index_transactions: config.index_transactions,
index_raw_events: config.index_raw_events,
}),
saya: None,
}),
Expand Down Expand Up @@ -132,8 +135,21 @@ impl CreateArgs {
println!("\nConfiguration:");
println!(" World: {}", config.world);
println!(" RPC: {}", config.rpc);
println!(" Start Block: {}", config.start_block.unwrap_or(0));
println!(" Index Pending: {}", config.index_pending.unwrap_or(false));
if let Some(contracts) = config.contracts {
println!(" Contracts: {}", contracts);
}
if let Some(start_block) = config.start_block {
println!(" Start Block: {}", start_block);
}
if let Some(index_pending) = config.index_pending {
println!(" Index Pending: {}", index_pending);
}
if let Some(index_raw_events) = config.index_raw_events {
println!(" Index Raw Events: {}", index_raw_events);
}
if let Some(index_transactions) = config.index_transactions {
println!(" Index Transactions: {}", index_transactions);
}
println!("\nEndpoints:");
println!(" GRAPHQL: {}", config.graphql);
println!(" GRPC: {}", config.grpc);
Expand Down
20 changes: 15 additions & 5 deletions cli/src/command/deployments/describe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,21 @@ impl DescribeArgs {
println!(" Version: {}", config.version);
println!(" World: {}", config.world);
println!(" RPC: {}", config.rpc);
println!(" Start Block: {}", config.start_block.unwrap_or(0));
println!(
" Indexing Pending: {}",
config.index_pending.unwrap_or(false)
);
if let Some(contracts) = config.contracts {
println!(" Contracts: {}", contracts);
}
if let Some(start_block) = config.start_block {
println!(" Start Block: {}", start_block);
}
if let Some(index_pending) = config.index_pending {
println!(" Index Pending: {}", index_pending);
}
if let Some(index_raw_events) = config.index_raw_events {
println!(" Index Raw Events: {}", index_raw_events);
}
if let Some(index_transactions) = config.index_transactions {
println!(" Index Transactions: {}", index_transactions);
}
println!("\nEndpoints:");
println!(" GraphQL: {}", config.graphql);
println!(" GRPC: {}", config.grpc);
Expand Down
15 changes: 15 additions & 0 deletions cli/src/command/deployments/services/torii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ pub struct ToriiCreateArgs {
#[arg(help = "World address.")]
pub world: Felt,

#[arg(short, long)]
#[arg(value_name = "contracts")]
#[arg(help = "Contract addresses to index")]
pub contracts: Option<String>,

#[arg(short, long)]
#[arg(help = "Specify a block to start indexing from.")]
pub start_block: Option<u64>,
Expand All @@ -29,6 +34,16 @@ pub struct ToriiCreateArgs {
#[arg(long)]
#[arg(help = "Polling interval in milliseconds.")]
pub polling_interval: Option<u64>,

#[arg(long)]
#[arg(value_name = "index_transactions")]
#[arg(help = "Whether or not to index world transactions")]
pub index_transactions: Option<bool>,

#[arg(long)]
#[arg(value_name = "index_raw_events")]
#[arg(help = "Whether or not to index raw events")]
pub index_raw_events: Option<bool>,
}

#[derive(Clone, Debug, Args, serde::Serialize)]
Expand Down
Loading
Loading