Skip to content

Commit 6284320

Browse files
committed
feat: enable clarity-wasm for all epochs
1 parent 4a7b908 commit 6284320

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

stackslib/src/chainstate/stacks/db/transactions.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,16 @@ impl StacksChainState {
12641264
.expect("BUG: total block cost decreased");
12651265
let sponsor = tx.sponsor_address().map(|a| a.to_account_principal());
12661266

1267+
// Compile contracts to Wasm and
1268+
// execute using the Wasm runtime.
1269+
debug!("Compiling the contract to wasm binary");
1270+
let mut module = compile_contract(contract_analysis.clone()).map_err(|e| {
1271+
Error::ClarityError(clarity_error::Wasm(WasmError::WasmGeneratorError(
1272+
e.message(),
1273+
)))
1274+
})?;
1275+
contract_ast.wasm_module = Some(module.emit_wasm());
1276+
12671277
// execution -- if this fails due to a runtime error, then the transaction is still
12681278
// accepted, but the contract does not materialize (but the sender is out their fee).
12691279
let initialize_resp = clarity_tx.initialize_smart_contract(

0 commit comments

Comments
 (0)