Skip to content

Commit

Permalink
initialize logging
Browse files Browse the repository at this point in the history
  • Loading branch information
imabdulbasit committed Dec 18, 2024
1 parent 014da42 commit 1ece6b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sequencer/src/bin/update-permissioned-stake-table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::Result;
use clap::Parser;
use espresso_types::parse_duration;
use ethers::types::Address;
use sequencer_utils::stake_table::{update_stake_table, PermissionedStakeTableUpdate};
use sequencer_utils::{logging, stake_table::{update_stake_table, PermissionedStakeTableUpdate}};
use std::{path::PathBuf, time::Duration};
use url::Url;

Expand Down Expand Up @@ -79,14 +79,17 @@ struct Options {
verbatim_doc_comment
)]
update_toml_path: PathBuf,
#[clap(flatten)]
logging: logging::Config,
}

#[tokio::main]
async fn main() -> Result<()> {
let opts = Options::parse();

opts.logging.init();
let update = PermissionedStakeTableUpdate::from_toml_file(&opts.update_toml_path)?;


update_stake_table(
opts.rpc_url,
opts.l1_polling_interval,
Expand Down
3 changes: 3 additions & 0 deletions utils/src/stake_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ pub async fn update_stake_table(
let l1 = Arc::new(SignerMiddleware::new(provider.clone(), wallet));

let contract = PermissionedStakeTable::new(contract_address, l1);

tracing::info!("sending stake table update transaction");

let tx_receipt = contract
.update(update.stakers_to_remove(), update.new_stakers())
.send()
Expand Down

0 comments on commit 1ece6b6

Please sign in to comment.