Skip to content

Commit

Permalink
feat: add debug prints to evmlib
Browse files Browse the repository at this point in the history
  • Loading branch information
ermineJose committed Dec 5, 2024
1 parent 5a137c3 commit e7877eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions evmlib/src/contract/data_payments/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ where
let contract = DataPaymentsContract::deploy(provider, payment_token_address)
.await
.expect("Could not deploy contract");
debug!("DataPayments contract deployed at: {:?}", contract.address());

DataPaymentsHandler { contract }
}
Expand All @@ -66,6 +67,7 @@ where
data_payments: I,
) -> Result<TxHash, Error> {
let (calldata, to) = self.pay_for_quotes_calldata(data_payments)?;
debug!("Data payments calldata is processed to the address {:?}", to);

let transaction_request = self
.contract
Expand Down
2 changes: 2 additions & 0 deletions evmlib/src/cryptography.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ pub fn sign_message(evm_secret_key_str: &str, message: &[u8]) -> Result<Vec<u8>,

let message_hash = to_eth_signed_message_hash(message);
let (signature, _) = sign_message_recoverable(&signer.into_credential(), message_hash)?;
debug!("Message signed successfully with {message_hash:?} and {signature:?}");

Ok(signature.to_vec())
}

Expand Down
1 change: 1 addition & 0 deletions evmlib/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub async fn get_transaction_receipt_by_hash(
.get_transaction_receipt(transaction_hash)
.await
.inspect_err(|err| error!("Error getting transaction receipt for transaction_hash: {transaction_hash:?} : {err:?}", ))?;
debug!("Transaction receipt for {transaction_hash:?}: {maybe_receipt:?}");
Ok(maybe_receipt)
}

Expand Down

0 comments on commit e7877eb

Please sign in to comment.