@@ -9,32 +9,32 @@ describe("CairoFactRegistry", () => {
99 const { satellite } = await loadFixture ( deploy ) ;
1010 const { factsRegistry } = await ignition . deploy ( MockFactsRegistry ) ;
1111
12- expect ( await satellite . getCairoFactRegistryExternalContract ( ) ) . to . equal (
12+ expect ( await satellite . getCairoVerifiedFactRegistryContract ( ) ) . to . equal (
1313 "0x0000000000000000000000000000000000000000" ,
1414 ) ;
15- await satellite . setCairoFactRegistryExternalContract (
15+ await satellite . setCairoVerifiedFactRegistryContract (
1616 await factsRegistry . getAddress ( ) ,
1717 ) ;
18- expect ( await satellite . getCairoFactRegistryExternalContract ( ) ) . to . equal (
18+ expect ( await satellite . getCairoVerifiedFactRegistryContract ( ) ) . to . equal (
1919 await factsRegistry . getAddress ( ) ,
2020 ) ;
2121
2222 const hash = ethers . randomBytes ( 32 ) ;
2323
24- expect ( await satellite . isCairoFactValid ( hash ) ) . to . equal ( false ) ;
25- expect ( await satellite . isCairoFactStored ( hash ) ) . to . equal ( false ) ;
24+ expect ( await satellite . isCairoVerifiedFactValid ( hash ) ) . to . equal ( false ) ;
25+ expect ( await satellite . isCairoVerifiedFactStored ( hash ) ) . to . equal ( false ) ;
2626
2727 await factsRegistry . setValid ( hash ) ;
2828
29- expect ( await satellite . isCairoFactValid ( hash ) ) . to . equal ( true ) ;
30- expect ( await satellite . isCairoFactStored ( hash ) ) . to . equal ( false ) ;
29+ expect ( await satellite . isCairoVerifiedFactValid ( hash ) ) . to . equal ( true ) ;
30+ expect ( await satellite . isCairoVerifiedFactStored ( hash ) ) . to . equal ( false ) ;
3131
32- await expect ( satellite . storeCairoFact ( hash ) )
32+ await expect ( satellite . storeCairoVerifiedFact ( hash ) )
3333 . to . emit ( satellite , "CairoFactSet" )
3434 . withArgs ( hash ) ;
3535
36- expect ( await satellite . isCairoFactValid ( hash ) ) . to . equal ( true ) ;
37- expect ( await satellite . isCairoFactStored ( hash ) ) . to . equal ( true ) ;
36+ expect ( await satellite . isCairoVerifiedFactValid ( hash ) ) . to . equal ( true ) ;
37+ expect ( await satellite . isCairoVerifiedFactStored ( hash ) ) . to . equal ( true ) ;
3838 } ) ;
3939
4040 it ( "Mocked fact registry no fallback" , async ( ) => {
@@ -65,10 +65,10 @@ describe("CairoFactRegistry", () => {
6565 const [ owner , admin , user ] = await ethers . getSigners ( ) ;
6666 const { factsRegistry } = await ignition . deploy ( MockFactsRegistry ) ;
6767
68- await ( satellite . connect ( owner ) as S ) . setCairoFactRegistryExternalContract (
68+ await ( satellite . connect ( owner ) as S ) . setCairoVerifiedFactRegistryContract (
6969 await factsRegistry . getAddress ( ) ,
7070 ) ;
71- expect ( await satellite . getCairoFactRegistryExternalContract ( ) ) . to . equal (
71+ expect ( await satellite . getCairoVerifiedFactRegistryContract ( ) ) . to . equal (
7272 await factsRegistry . getAddress ( ) ,
7373 ) ;
7474
@@ -78,22 +78,38 @@ describe("CairoFactRegistry", () => {
7878 const hash2 = ethers . randomBytes ( 32 ) ;
7979
8080 await ( satellite . connect ( owner ) as S ) . setIsMockedForInternal ( true ) ;
81- expect ( await satellite . isCairoFactValidForInternal ( hash1 ) ) . to . equal ( false ) ;
82- expect ( await satellite . isCairoFactValidForInternal ( hash2 ) ) . to . equal ( false ) ;
81+ expect ( await satellite . isCairoVerifiedFactValidForInternal ( hash1 ) ) . to . equal (
82+ false ,
83+ ) ;
84+ expect ( await satellite . isCairoVerifiedFactValidForInternal ( hash2 ) ) . to . equal (
85+ false ,
86+ ) ;
8387
8488 await ( satellite . connect ( owner ) as S ) . setIsMockedForInternal ( false ) ;
85- expect ( await satellite . isCairoFactValidForInternal ( hash1 ) ) . to . equal ( false ) ;
86- expect ( await satellite . isCairoFactValidForInternal ( hash2 ) ) . to . equal ( false ) ;
89+ expect ( await satellite . isCairoVerifiedFactValidForInternal ( hash1 ) ) . to . equal (
90+ false ,
91+ ) ;
92+ expect ( await satellite . isCairoVerifiedFactValidForInternal ( hash2 ) ) . to . equal (
93+ false ,
94+ ) ;
8795
8896 await factsRegistry . setValid ( hash1 ) ;
8997 await ( satellite . connect ( admin ) as S ) . setCairoMockedFact ( hash2 ) ;
9098
9199 await ( satellite . connect ( owner ) as S ) . setIsMockedForInternal ( true ) ;
92- expect ( await satellite . isCairoFactValidForInternal ( hash1 ) ) . to . equal ( false ) ;
93- expect ( await satellite . isCairoFactValidForInternal ( hash2 ) ) . to . equal ( true ) ;
100+ expect ( await satellite . isCairoVerifiedFactValidForInternal ( hash1 ) ) . to . equal (
101+ false ,
102+ ) ;
103+ expect ( await satellite . isCairoVerifiedFactValidForInternal ( hash2 ) ) . to . equal (
104+ true ,
105+ ) ;
94106
95107 await ( satellite . connect ( owner ) as S ) . setIsMockedForInternal ( false ) ;
96- expect ( await satellite . isCairoFactValidForInternal ( hash1 ) ) . to . equal ( true ) ;
97- expect ( await satellite . isCairoFactValidForInternal ( hash2 ) ) . to . equal ( false ) ;
108+ expect ( await satellite . isCairoVerifiedFactValidForInternal ( hash1 ) ) . to . equal (
109+ true ,
110+ ) ;
111+ expect ( await satellite . isCairoVerifiedFactValidForInternal ( hash2 ) ) . to . equal (
112+ false ,
113+ ) ;
98114 } ) ;
99115} ) ;
0 commit comments