Skip to content

Commit

Permalink
Update namada_apps to use test wasm utility code
Browse files Browse the repository at this point in the history
  • Loading branch information
james-chf committed Feb 7, 2023
1 parent 47ff43c commit da1152e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ rust_decimal_macros = "1.26.1"

[dev-dependencies]
namada = {path = "../shared", default-features = false, features = ["testing", "wasm-runtime"]}
namada_test_utils = {path = "../test_utils"}
bit-set = "0.5.2"
# A fork with state machime testing
proptest = {git = "https://github.com/heliaxdev/proptest", branch = "tomas/sm"}
Expand Down
6 changes: 2 additions & 4 deletions apps/src/lib/node/ledger/shell/finalize_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ mod test_finalize_block {
InitProposalData, VoteProposalData,
};
use namada::types::transaction::{EncryptionKey, Fee, WrapperTx, MIN_FEE};
use namada_test_utils::TestWasms;

use super::*;
use crate::node::ledger::shell::test_utils::*;
Expand Down Expand Up @@ -703,10 +704,7 @@ mod test_finalize_block {
.unwrap();

// create two decrypted txs
let mut wasm_path = top_level_directory();
wasm_path.push("wasm_for_tests/tx_no_op.wasm");
let tx_code = std::fs::read(wasm_path)
.expect("Expected a file at given code path");
let tx_code = TestWasms::TxNoOp.read_bytes();
for i in 0..2 {
let raw_tx = Tx::new(
tx_code.clone(),
Expand Down
37 changes: 19 additions & 18 deletions wasm/checksums.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"tx_bond.wasm": "tx_bond.f0094b887c57565472bede01d98fb77f6faac2f72597e2efb2ebfe9b1bf7c234.wasm",
"tx_change_validator_commission.wasm": "tx_change_validator_commission.02dca468021b1ec811d0f35cc4b55a24f7c3f7b5e51f16399709257421f4a1f4.wasm",
"tx_ibc.wasm": "tx_ibc.a1735e3221f1ae055c74bb52327765dd37e8676e15fab496f9ab0ed4d0628f51.wasm",
"tx_init_account.wasm": "tx_init_account.7b6eafeceb81b679c382279a5d9c40dfd81fcf37e5a1940340355c9f55af1543.wasm",
"tx_init_proposal.wasm": "tx_init_proposal.f2ed71fe70fc564e1d67e4e7d2ea25466327b62ba2eee18ece0021abff9e2c82.wasm",
"tx_init_validator.wasm": "tx_init_validator.fedcfaecaf37e3e7d050c76a4512baa399fc528710a27038573df53596613a2c.wasm",
"tx_reveal_pk.wasm": "tx_reveal_pk.3e5417561e8108d4045775bf6d095cbaad22c73ff17a5ba2ad11a1821665a58a.wasm",
"tx_transfer.wasm": "tx_transfer.833a3849ca2c417f4e907c95c6eb15e6b52827458cf603e1c4f5511ab3e4fe76.wasm",
"tx_unbond.wasm": "tx_unbond.d4fd6c94abb947533a2728940b43fb021a008ad593c7df7a3886c4260cac39b5.wasm",
"tx_update_vp.wasm": "tx_update_vp.6d1eabab15dc6d04eec5b25ad687f026a4d6c3f118a1d7aca9232394496bd845.wasm",
"tx_vote_proposal.wasm": "tx_vote_proposal.54b594f686a72869b0d7f15492591854f26e287a1cf3b6e543b0246d5ac61003.wasm",
"tx_withdraw.wasm": "tx_withdraw.342c222d0707eb5b5a44b89fc1245f527be3fdf841af64152a9ab35a4766e1b5.wasm",
"vp_implicit.wasm": "vp_implicit.73678ac01aa009ac4e0d4a49eecaa19b49cdd3d95f6862a9558c9b175ae68260.wasm",
"vp_masp.wasm": "vp_masp.85446251f8e1defed81549dab37edfe8e640339c7230e678b65340cf71ce1369.wasm",
"vp_testnet_faucet.wasm": "vp_testnet_faucet.573b882a806266d6cdfa635fe803e46d6ce89c99321196c231c61d05193a086d.wasm",
"vp_token.wasm": "vp_token.8c6e5a86f047e7b1f1004f0d8a4e91fad1b1c0226a6e42d7fe350f98dc84359b.wasm",
"vp_user.wasm": "vp_user.75c68f018f163d18d398cb4082b261323d115aae43ec021c868d1128e4b0ee29.wasm",
"vp_validator.wasm": "vp_validator.2dc9f1c8f106deeef5ee988955733955444d16b400ebb16a25e7d71e4b1be874.wasm"
"tx_bond.wasm": "tx_bond.e12fae2744ac427944901868f62f53926680ea9a7c2424adcd5c2e02aae89836.wasm",
"tx_bridge_pool.wasm": "tx_bridge_pool.31624135f5bd960433e0bf2bfd6c42bde4a47fdb7492b5bb2f840fc3b4ef3036.wasm",
"tx_change_validator_commission.wasm": "tx_change_validator_commission.38fdd95bb60c902c2d941a2963fb87fbb30642ea9b071aa25eef1819dd40e6dc.wasm",
"tx_ibc.wasm": "tx_ibc.fc6defd86f4df3418ded88e620a6ce89d2b39097974acd19cb104f79a3165095.wasm",
"tx_init_account.wasm": "tx_init_account.899112e6dae6880115e925fdf947e96e61f9b971a2a9c6732b911fe8c26a0d01.wasm",
"tx_init_proposal.wasm": "tx_init_proposal.5ace9668f903b861a2a7e117929a3094810c8ecf8863131bc63f34a1672131d9.wasm",
"tx_init_validator.wasm": "tx_init_validator.08bdb5804dfc33690778b2c5e4152fa45c2d829380a5f5e6c0ce6fd2dac12f9d.wasm",
"tx_reveal_pk.wasm": "tx_reveal_pk.ea64f0eacdac81c2144049d05795abd72a791e3a1c55cc716055098bb9f92db2.wasm",
"tx_transfer.wasm": "tx_transfer.5d9fa33466874048e55f9f34f9959fcee6715b8f5be1dc991471dcb1d527046e.wasm",
"tx_unbond.wasm": "tx_unbond.4dd861ce178f3bcb6c71ca6ad861893cbb223f6c1ddde08792c26e6fad564e01.wasm",
"tx_update_vp.wasm": "tx_update_vp.e91013a732051b2bc825285b97e8b00524a2d6a2472bac9a74202fc60433bd12.wasm",
"tx_vote_proposal.wasm": "tx_vote_proposal.d94b467bd64597e2a524dd5e861185a3ae9fcf97dfb4292b6b1446d7815b5b80.wasm",
"tx_withdraw.wasm": "tx_withdraw.4d982803b4d1e1be1773098b2399a53098dab1d7706e207506e19fefae2ac2cd.wasm",
"vp_implicit.wasm": "vp_implicit.929aa3f640411886be5a0c12e4d3c7ae18b3c83dc43c35dc5b25fe93b90c489c.wasm",
"vp_masp.wasm": "vp_masp.0aac80e827808aaf92ff841c0f4dde7517fcdc429d7bf1a3930eed6cfb663230.wasm",
"vp_testnet_faucet.wasm": "vp_testnet_faucet.9840665dcb3818b6f9de1c20113e5b5a03413d9ea5dc8f065feafc3798612d07.wasm",
"vp_token.wasm": "vp_token.ec14ab95bb3d21ae531204eb990694d7abd3857c8007d51d55ae8139617e87ba.wasm",
"vp_user.wasm": "vp_user.614787afdade760567a5fb6c63008e6c3aef69a2cd518c21e7515c8b9f81c8a2.wasm",
"vp_validator.wasm": "vp_validator.0561030577ad9a8a9cb13590e79c6dcc15c0ce8c2fca115418b61f36b55dc111.wasm"
}

0 comments on commit da1152e

Please sign in to comment.