Skip to content

Commit

Permalink
test code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
haider-rs committed Feb 26, 2025
1 parent ea3065e commit 8e47138
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 23 deletions.
1 change: 0 additions & 1 deletion chronicle/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ async fn main() -> Result<()> {
init_logger();
time_primitives::init_ss58_version();
let args = ChronicleArgs::parse();
tracing::info!("chronicle args are{:?}", args.cctp_sender);

if args.cctp_sender.is_some() && args.cctp_attestation.is_none() {
anyhow::bail!("Requires cctp attestation url with cctp sender");
Expand Down
5 changes: 0 additions & 5 deletions config/envs/local/local-evm.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
config:
chronicle_funds: 10.
# timechain_url: 'ws://127.0.0.1:9944'
timechain_url: 'ws://validator:9944'
prices_path: 'prices.csv'
contracts:
Expand All @@ -15,7 +14,6 @@ networks:
blockchain: "anvil"
network: "dev"
url: "ws://chain-2-evm:8545"
# url: "ws://127.0.0.1:8545"
admin_funds: 10.
gateway_funds: 1.
chronicle_funds: 1.
Expand All @@ -33,7 +31,6 @@ networks:
blockchain: "anvil"
network: "dev"
url: "ws://chain-3-evm:8545"
# url: "ws://127.0.0.1:8545"
admin_funds: 10.
gateway_funds: 1.
chronicle_funds: 1.
Expand All @@ -49,5 +46,3 @@ networks:
chronicles:
- http://timechain-chronicle-2-evm-1:8080
- http://timechain-chronicle-3-evm-1:8080
# - http://localhost:8080
# - http://localhost:8081
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,5 @@ services:
environment:
RUST_BACKTRACE: 1
RUST_LOG: 'gmp_evm=info'
RUST_MIN_STACK: "16777216"
profiles:
- never
16 changes: 0 additions & 16 deletions gmp/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,23 +401,16 @@ impl IConnectorBuilder for Connector {
let client = default_client(&params.url, None)
.await
.with_context(|| "Cannot get ws client for url: {url}")?;
if params.cctp_sender.is_some() {
tracing::info!("CCTP is enabled");
tracing::info!("params. {:?}", params.cctp_attestation)
}
let adapter = Adapter(client);
let cctp_sender: Result<Option<[u8; 32]>> = params
.cctp_sender
.map(|item| {
tracing::info!("cctp sender: {}", item);
let clean_hex = item.strip_prefix("0x").unwrap_or(&item);
let bytes = hex::decode(clean_hex)
.map_err(|e| anyhow::anyhow!("Hex decode error: {}", e))?;
tracing::info!("cctp bytes: {:?}", bytes);
let arr: Address = bytes
.try_into()
.map_err(|_| anyhow::anyhow!("Unable to make Address from hex bytes"))?;
tracing::info!("cctp bytes: {:?}", arr);
Ok(arr)
})
.transpose();
Expand Down Expand Up @@ -541,15 +534,6 @@ impl IConnector for Connector {
gas_cost: log.gasCost.into(),
bytes: log.data.data.into(),
};
tracing::info!("gmp created got hit: {:?}", gmp_message);
tracing::info!(
"gmp created got hit from source: {:?}",
hex::encode(gmp_message.src)
);
tracing::info!(
"gmp created cctp sender: {:?}",
hex::encode(cctp_sender.unwrap())
);
if Some(gmp_message.src) == cctp_sender {
let mut cctp_queue = self.cctp_queue.lock().await;
cctp_queue.push((gmp_message.clone(), 0));
Expand Down
2 changes: 2 additions & 0 deletions tc-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ impl Tc {
url: network.url.clone(),
mnemonic: env.target_mnemonic.clone(),
cctp_sender: None,
// TODO move to config?
// This params is for checking cctp attestation with tc-cli
cctp_attestation: Some(String::from(
"https://iris-api-sandbox.circle.com/attestations/",
)),
Expand Down

0 comments on commit 8e47138

Please sign in to comment.