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

feat: logger implementation for event feeder like cosmos icon eth substrate #130

Conversation

Prathiksha-Nataraja
Copy link
Contributor

Pull Request Template

Description

Logger implementation for the event feed

Please select the options that are relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • Pull Request follow only a single responsibility.
  • Code follows the style guidelines of this project
  • Performed a self-review of my own code
  • Commented my code, particularly in hard-to-understand areas
  • Made corresponding changes to the documentation
  • Changes generate no new warnings
  • Added tests that prove fix is effective or the feature works
  • New and existing unit tests pass locally with the changes
  • Any dependent changes have been merged and published in downstream modules
  • Checked the code and corrected any misspellings

@Prathiksha-Nataraja Prathiksha-Nataraja changed the base branch from next to aurras-runtime-lite-dev May 1, 2024 11:31
let events = chain_config
.event_filter
.split(',')
.map(|e| e.to_string())
.filter(|e| !e.is_empty())
.collect::<Vec<String>>();
// let logger = CoreLogger::new(Some("./event-feed.log"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code clean up

@@ -83,6 +90,10 @@ impl EthFeed {
let tx_receipt = client.get_transaction_receipt(tx_hash).await;

if let Ok(Some(tx_receipt)) = tx_receipt {
self.logger.info(&format!(
"Received trabsaction receipt for the tx_hash : {:?}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typographical error "transaction"

@@ -28,7 +32,10 @@ async fn test_filter_events_argument_with_no_method() {
event_filter: "balances=Transfer;system".to_string(),
contract_filter: "".to_string(),
};
let polkadot = PolkadotFeed::<PolkadotConfig>::new(config).await.unwrap();
let logger = CoreLogger::new(Some("./event-feed.log"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clear the created files after test

@shanithkk shanithkk merged commit a9e00f4 into aurras-runtime-lite-dev May 6, 2024
@shanithkk shanithkk deleted the AV-273-Logger-implementation-for-Event-Feeder-like-Cosmos-icon-eth-substrate branch May 6, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants