Skip to content

Commit

Permalink
pumped arch3.rs version
Browse files Browse the repository at this point in the history
  • Loading branch information
FloppyDisck committed Nov 6, 2024
1 parent 3c1e477 commit e207571
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 6 additions & 2 deletions packages/archway-test-tube/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl ArchwayApp {

pub fn increase_time(&self, seconds: u64) {
unsafe {
IncreaseTime(self.id, seconds.try_into().unwrap());
IncreaseTime(self.id, seconds);
}
}

Expand Down Expand Up @@ -397,7 +397,11 @@ impl<'a> Runner<'a> for ArchwayApp {
let res = ResponseFinalizeBlock::decode(res.as_slice())
.map_err(DecodeError::ProtoDecodeError)?;

let tx_result = res.tx_results.get(0).cloned().expect("tx_result not found");
let tx_result = res
.tx_results
.first()
.cloned()
.expect("tx_result not found");

if !tx_result.codespace.is_empty() {
return Err(RunnerError::ExecuteError {
Expand Down
6 changes: 2 additions & 4 deletions packages/archway-test-tube/src/module/gov.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ where
type_url: type_url(&msg_type_url),
value: msg
.to_bytes()
.map_err(|e| RunnerError::EncodeError(e.into()))?
.into(),
.map_err(|e| RunnerError::EncodeError(e.into()))?,
}),
initial_deposit: initial_deposit
.into_iter()
Expand Down Expand Up @@ -117,8 +116,7 @@ impl<'a> GovWithAppAccess<'a> {
type_url: format!("/{}", msg_type_url),
value: msg
.to_bytes()
.map_err(|e| RunnerError::EncodeError(e.into()))?
.into(),
.map_err(|e| RunnerError::EncodeError(e.into()))?,
}),
initial_deposit: min_deposit,
proposer,
Expand Down
2 changes: 1 addition & 1 deletion packages/archway-test-tube/src/module/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ where
pub fn query<M, Res>(&self, contract: &str, msg: &M) -> RunnerResult<Res>
where
M: ?Sized + Serialize,
Res: ?Sized + DeserializeOwned,
Res: DeserializeOwned,
{
let res = self
.runner
Expand Down

0 comments on commit e207571

Please sign in to comment.