@@ -20,7 +20,7 @@ use clarity_types::representations::ClarityName;
2020use clarity_types:: types:: { QualifiedContractIdentifier , TraitIdentifier } ;
2121use stacks_common:: types:: StacksEpochId ;
2222
23- use crate :: vm:: analysis:: errors:: { CheckError , CheckErrorKind } ;
23+ use crate :: vm:: analysis:: errors:: { CheckErrorKind , StaticCheckError } ;
2424use crate :: vm:: analysis:: type_checker:: ContractAnalysis ;
2525use crate :: vm:: database:: {
2626 ClarityBackingStore , ClarityDeserializable , ClaritySerializable , RollbackWrapper ,
@@ -63,13 +63,13 @@ impl<'a> AnalysisDatabase<'a> {
6363 self . store . nest ( ) ;
6464 }
6565
66- pub fn commit ( & mut self ) -> Result < ( ) , CheckError > {
66+ pub fn commit ( & mut self ) -> Result < ( ) , StaticCheckError > {
6767 self . store
6868 . commit ( )
6969 . map_err ( |e| CheckErrorKind :: Expects ( format ! ( "{e:?}" ) ) . into ( ) )
7070 }
7171
72- pub fn roll_back ( & mut self ) -> Result < ( ) , CheckError > {
72+ pub fn roll_back ( & mut self ) -> Result < ( ) , StaticCheckError > {
7373 self . store
7474 . rollback ( )
7575 . map_err ( |e| CheckErrorKind :: Expects ( format ! ( "{e:?}" ) ) . into ( ) )
@@ -99,11 +99,11 @@ impl<'a> AnalysisDatabase<'a> {
9999 pub fn load_contract_non_canonical (
100100 & mut self ,
101101 contract_identifier : & QualifiedContractIdentifier ,
102- ) -> Result < Option < ContractAnalysis > , CheckError > {
102+ ) -> Result < Option < ContractAnalysis > , StaticCheckError > {
103103 self . store
104104 . get_metadata ( contract_identifier, AnalysisDatabase :: storage_key ( ) )
105105 // treat NoSuchContract error thrown by get_metadata as an Option::None --
106- // the analysis will propagate that as a CheckError anyways.
106+ // the analysis will propagate that as a StaticCheckError anyways.
107107 . ok ( )
108108 . flatten ( )
109109 . map ( |x| {
@@ -118,12 +118,12 @@ impl<'a> AnalysisDatabase<'a> {
118118 & mut self ,
119119 contract_identifier : & QualifiedContractIdentifier ,
120120 epoch : & StacksEpochId ,
121- ) -> Result < Option < ContractAnalysis > , CheckError > {
121+ ) -> Result < Option < ContractAnalysis > , StaticCheckError > {
122122 Ok ( self
123123 . store
124124 . get_metadata ( contract_identifier, AnalysisDatabase :: storage_key ( ) )
125125 // treat NoSuchContract error thrown by get_metadata as an Option::None --
126- // the analysis will propagate that as a CheckError anyways.
126+ // the analysis will propagate that as a StaticCheckError anyways.
127127 . ok ( )
128128 . flatten ( )
129129 . map ( |x| {
@@ -141,7 +141,7 @@ impl<'a> AnalysisDatabase<'a> {
141141 & mut self ,
142142 contract_identifier : & QualifiedContractIdentifier ,
143143 contract : & ContractAnalysis ,
144- ) -> Result < ( ) , CheckError > {
144+ ) -> Result < ( ) , StaticCheckError > {
145145 let key = AnalysisDatabase :: storage_key ( ) ;
146146 if self . store . has_metadata_entry ( contract_identifier, key) {
147147 return Err (
@@ -158,7 +158,7 @@ impl<'a> AnalysisDatabase<'a> {
158158 pub fn get_clarity_version (
159159 & mut self ,
160160 contract_identifier : & QualifiedContractIdentifier ,
161- ) -> Result < ClarityVersion , CheckError > {
161+ ) -> Result < ClarityVersion , StaticCheckError > {
162162 // TODO: this function loads the whole contract to obtain the function type.
163163 // but it doesn't need to -- rather this information can just be
164164 // stored as its own entry. the analysis cost tracking currently only
@@ -176,7 +176,7 @@ impl<'a> AnalysisDatabase<'a> {
176176 contract_identifier : & QualifiedContractIdentifier ,
177177 function_name : & str ,
178178 epoch : & StacksEpochId ,
179- ) -> Result < Option < FunctionType > , CheckError > {
179+ ) -> Result < Option < FunctionType > , StaticCheckError > {
180180 // TODO: this function loads the whole contract to obtain the function type.
181181 // but it doesn't need to -- rather this information can just be
182182 // stored as its own entry. the analysis cost tracking currently only
@@ -196,7 +196,7 @@ impl<'a> AnalysisDatabase<'a> {
196196 contract_identifier : & QualifiedContractIdentifier ,
197197 function_name : & str ,
198198 epoch : & StacksEpochId ,
199- ) -> Result < Option < FunctionType > , CheckError > {
199+ ) -> Result < Option < FunctionType > , StaticCheckError > {
200200 // TODO: this function loads the whole contract to obtain the function type.
201201 // but it doesn't need to -- rather this information can just be
202202 // stored as its own entry. the analysis cost tracking currently only
@@ -216,7 +216,7 @@ impl<'a> AnalysisDatabase<'a> {
216216 contract_identifier : & QualifiedContractIdentifier ,
217217 trait_name : & str ,
218218 epoch : & StacksEpochId ,
219- ) -> Result < Option < BTreeMap < ClarityName , FunctionSignature > > , CheckError > {
219+ ) -> Result < Option < BTreeMap < ClarityName , FunctionSignature > > , StaticCheckError > {
220220 // TODO: this function loads the whole contract to obtain the function type.
221221 // but it doesn't need to -- rather this information can just be
222222 // stored as its own entry. the analysis cost tracking currently only
@@ -237,7 +237,7 @@ impl<'a> AnalysisDatabase<'a> {
237237 pub fn get_implemented_traits (
238238 & mut self ,
239239 contract_identifier : & QualifiedContractIdentifier ,
240- ) -> Result < BTreeSet < TraitIdentifier > , CheckError > {
240+ ) -> Result < BTreeSet < TraitIdentifier > , StaticCheckError > {
241241 let contract = self
242242 . load_contract_non_canonical ( contract_identifier) ?
243243 . ok_or ( CheckErrorKind :: NoSuchContract (
0 commit comments