Use wat instead of wabt to avoid CI cmake error (and use supported dep) (#1980)

This commit is contained in:
James Wilson
2025-04-03 10:22:46 +01:00
committed by GitHub
parent 054140be1d
commit cdab21e8c3
4 changed files with 78 additions and 56 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ test-runtime = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
wabt = { workspace = true }
wat = { workspace = true }
substrate-runner = { workspace = true }
subxt-test-macro = { path = "subxt-test-macro" }
@@ -47,7 +47,7 @@ impl ContractsTestContext {
}
async fn upload_code(&self) -> Result<Hash, Error> {
let code = wabt::wat2wasm(CONTRACT).expect("invalid wabt");
let code = wat::parse_str(CONTRACT).expect("invalid wat");
let upload_tx =
node_runtime::tx()
@@ -74,8 +74,7 @@ impl ContractsTestContext {
}
async fn instantiate_with_code(&self) -> Result<(Hash, AccountId), Error> {
tracing::info!("instantiate_with_code:");
let code = wabt::wat2wasm(CONTRACT).expect("invalid wabt");
let code = wat::parse_str(CONTRACT).expect("invalid wat");
let instantiate_tx = node_runtime::tx().contracts().instantiate_with_code(
100_000_000_000_000_000, // endowment