Skip to content

Commit

Permalink
experimentation version with hardcoded Certifier contract
Browse files Browse the repository at this point in the history
  • Loading branch information
SurfingNerd committed Jul 31, 2024
1 parent 8c75682 commit 8c7d346
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/concensus/miner/src/service_transaction_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use ethereum_types::Address;
use parking_lot::RwLock;
use std::{collections::HashMap, mem, sync::Arc};
use types::{ids::BlockId, transaction::SignedTransaction};
use std::str::FromStr;

use_contract!(
service_transaction,
Expand Down Expand Up @@ -67,12 +68,8 @@ impl ServiceTransactionChecker {
{
return Ok(*allowed);
}
let contract_address = client
.registry_address(
SERVICE_TRANSACTION_CONTRACT_REGISTRY_NAME.to_owned(),
BlockId::Latest,
)
.ok_or_else(|| "Certifier contract is not configured")?;
let x = Address::from_str("5000000000000000000000000000000000000001".into()).unwrap();
let contract_address = x;
self.call_contract(client, contract_address, sender)
.and_then(|allowed| {
if let Some(mut cache) = self.certified_addresses_cache.try_write() {
Expand Down

0 comments on commit 8c7d346

Please sign in to comment.