Skip to content

Conversation

@Kayanski
Copy link
Contributor

@Kayanski Kayanski commented Dec 4, 2023

  • Change parse_network return type + exposed supported networks
  • Allows possibility to not enable any logs (using env)
  • Add the possiblity to set a fee_granter for transactions (Closes ORC-20)
  • Sort contracts by id in snapshot testing (for stability purposes)

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 4, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: e358fc5
Status:🚫  Build failed.

View logs

@codecov
Copy link

codecov bot commented Dec 4, 2023

Codecov Report

Merging #282 (e358fc5) into main (060a861) will increase coverage by 0.4%.
The diff coverage is 78.5%.

Additional details and impacted files
Files Coverage Δ
cw-orch-daemon/src/builder.rs 87.5% <100.0%> (ø)
cw-orch-daemon/src/log.rs 54.5% <100.0%> (+4.5%) ⬆️
cw-orch-daemon/src/sender.rs 61.8% <100.0%> (-0.2%) ⬇️
cw-orch-daemon/src/tx_builder.rs 69.0% <100.0%> (+3.2%) ⬆️
cw-orch/src/snapshots.rs 100.0% <ø> (ø)
packages/cw-orch-core/src/env.rs 79.6% <75.0%> (-0.7%) ⬇️
packages/cw-orch-networks/src/networks/mod.rs 0.0% <0.0%> (ø)

Copy link
Contributor

@Buckram123 Buckram123 left a comment

Choose a reason for hiding this comment

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

Will be nice to have a little test with 3+ contracts ( could be in another PR )

use ::cw_orch::environment::{ChainState as _, StateInterface as _};
let all_contract_addresses = $chain.state().get_all_addresses()?;
let mut all_storage = ::std::collections::HashMap::new();
let mut all_storage = vec![];
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use BTreeMap?
and nit: you can pass capacity of all_contract_addresses length for Vec here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, yeah better like so

Comment on lines +31 to +42
let all_contracts = $chain.state().get_all_addresses()?;
let all_storage: ::std::collections::BTreeMap<_, _> = all_contracts
.iter()
.map(|(id, contract_addr)| {
(
id,
::cw_orch::snapshots::parse_storage(
&$chain.app.borrow().dump_wasm_raw(&contract_addr),
),
)
})
.collect();
Copy link
Contributor

Choose a reason for hiding this comment

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

🔥

@Kayanski Kayanski merged commit 40a19ac into main Dec 8, 2023
@Kayanski Kayanski deleted the update/small-updates branch December 8, 2023 11:24
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.

3 participants