File tree 1 file changed +10
-0
lines changed
stackslib/src/chainstate/stacks/db
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1264,6 +1264,16 @@ impl StacksChainState {
1264
1264
. expect ( "BUG: total block cost decreased" ) ;
1265
1265
let sponsor = tx. sponsor_address ( ) . map ( |a| a. to_account_principal ( ) ) ;
1266
1266
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
+
1267
1277
// execution -- if this fails due to a runtime error, then the transaction is still
1268
1278
// accepted, but the contract does not materialize (but the sender is out their fee).
1269
1279
let initialize_resp = clarity_tx. initialize_smart_contract (
You can’t perform that action at this time.
0 commit comments