Skip to content

Commit

Permalink
clippy cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
FloppyDisck committed Nov 6, 2024
1 parent d415b2d commit dc1a653
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions packages/chain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ mod bindings;
pub mod module;

pub use archway_proto;
use archway_proto::tendermint::abci::ExecTxResult;
use cosmrs::proto::tendermint::abci::ResponseFinalizeBlock;
use std::ffi::CString;
use std::str::FromStr;

// TODO: add a with_module::<Wasm>(FnOnce(msg) -> Response) -> Response

use crate::bindings::SkipBlock;
use base64::engine::general_purpose::STANDARD as BASE64_STANDARD;
use base64::Engine;
Expand All @@ -21,7 +18,6 @@ use test_tube::bindings::{
GetValidatorPrivateKey, IncreaseTime, InitAccount, InitTestEnv, Query, Simulate,
};
use test_tube::cosmrs::crypto::secp256k1::SigningKey;
use test_tube::cosmrs::proto::tendermint::v0_37::abci::{Event, EventAttribute, ResponseDeliverTx};
use test_tube::cosmrs::tx::{Fee, SignerInfo};
use test_tube::cosmrs::{tx, AccountId};
use test_tube::runner::error::DecodeError;
Expand All @@ -48,38 +44,6 @@ pub fn arch(amount: u128) -> Coin {
aarch(amount * 10u128.pow(18))
}

fn convert_to_response_deliver_tx(res: ExecTxResult) -> ResponseDeliverTx {
let mut events = Vec::with_capacity(res.events.len());

for event in res.events {
let mut attrs = Vec::with_capacity(event.attributes.len());

for attr in event.attributes {
attrs.push(EventAttribute {
key: attr.key,
value: attr.value,
index: attr.index,
})
}

events.push(Event {
r#type: event.r#type.clone(),
attributes: attrs,
})
}

ResponseDeliverTx {
code: res.code,
data: res.data,
log: res.log,
info: res.info,
gas_wanted: res.gas_wanted,
gas_used: res.gas_used,
events,
codespace: res.codespace,
}
}

pub struct ArchwayApp {
id: u64,
fee_denom: String,
Expand Down

0 comments on commit dc1a653

Please sign in to comment.