@@ -71,16 +71,16 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
7171 // Declare the custom predicate
7272 let input = format ! (
7373 r#"
74- points (player, level, points, private: points_dict) = AND(
74+ has_points (player, level, points, private: points_dict) = AND(
7575 SignedBy(points_dict, PublicKey({game_pk}))
7676 Contains(points_dict, "player", player)
7777 Contains(points_dict, "level", level)
7878 Contains(points_dict, "points", points)
7979 )
8080
8181 over_9000(player, private: points_lvl_1, points_lvl_2, points_total) = AND(
82- points (player, 1, points_lvl_1)
83- points (player, 2, points_lvl_2)
82+ has_points (player, 1, points_lvl_1)
83+ has_points (player, 2, points_lvl_2)
8484 SumOf(points_total, points_lvl_1, points_lvl_2)
8585 Gt(points_total, 9000)
8686 )
@@ -90,10 +90,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
9090 println ! ( "# custom predicate batch:{}" , input) ;
9191 let module = load_module ( & input, "points_module" , & params, & [ ] ) ?;
9292 let batch = module. batch . clone ( ) ;
93- let points_pred = batch. predicate_ref_by_name ( "points " ) . unwrap ( ) ;
93+ let points_pred = batch. predicate_ref_by_name ( "has_points " ) . unwrap ( ) ;
9494 let over_9000_pred = batch. predicate_ref_by_name ( "over_9000" ) . unwrap ( ) ;
9595
96- // Build a pod to prove the statement `points ("Alice", 1, 3512)`
96+ // Build a pod to prove the statement `has_points ("Alice", 1, 3512)`
9797 let mut builder = MainPodBuilder :: new ( & params, vd_set) ;
9898 let st_signed_by = builder. priv_op ( Operation :: dict_signed_by ( & pod_points_lvl_1) ) ?;
9999 let st_player = builder. priv_op ( Operation :: dict_contains (
@@ -120,7 +120,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
120120 println ! ( "# pod_alice_lvl_1_points\n :{}" , pod_alice_lvl_1_points) ;
121121 pod_alice_lvl_1_points. pod . verify ( ) . unwrap ( ) ;
122122
123- // Build a pod to prove the statement `points ("Alice", 2, 5771)`
123+ // Build a pod to prove the statement `has_points ("Alice", 2, 5771)`
124124 let mut builder = MainPodBuilder :: new ( & params, vd_set) ;
125125 let st_signed_by = builder. priv_op ( Operation :: dict_signed_by ( & pod_points_lvl_2) ) ?;
126126 let st_player = builder. priv_op ( Operation :: dict_contains (
0 commit comments