Skip to content

Commit c3c3af4

Browse files
authored
Merge pull request #5167 from stacks-network/chore/use-nontesting-parse-fn
Clarity-Wasm: avoid using testing-gated parse function
2 parents a86bb99 + 1b15bb4 commit c3c3af4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

clarity/src/vm/clarity_wasm.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use stacks_common::util::secp256k1::{secp256k1_recover, secp256k1_verify, Secp25
1111
use wasmtime::{AsContextMut, Caller, Engine, Linker, Memory, Module, Store, Trap, Val, ValType};
1212

1313
use super::analysis::{CheckError, CheckErrors};
14-
use super::ast::parse;
14+
use super::ast::{build_ast_with_rules, ASTRules};
1515
use super::callables::{DefineType, DefinedFunction};
1616
use super::contracts::Contract;
1717
use super::costs::{constants as cost_constants, CostTracker, LimitedCostTracker};
@@ -1679,12 +1679,15 @@ pub fn signature_from_string(
16791679
version: ClarityVersion,
16801680
epoch: StacksEpochId,
16811681
) -> Result<TypeSignature, Error> {
1682-
let expr = parse(
1682+
let expr = build_ast_with_rules(
16831683
&QualifiedContractIdentifier::transient(),
16841684
val,
1685+
&mut (),
16851686
version,
16861687
epoch,
1687-
)?;
1688+
ASTRules::Typical,
1689+
)?
1690+
.expressions;
16881691
let expr = expr.first().ok_or(CheckErrors::InvalidTypeDescription)?;
16891692
Ok(TypeSignature::parse_type_repr(
16901693
StacksEpochId::latest(),

0 commit comments

Comments
 (0)