Skip to content

Commit 4424a10

Browse files
committed
Add a few comments
1 parent 58b564d commit 4424a10

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Diff for: erc20.v

+8-5
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ Module Primitives.
3636
World ->
3737
TokenQuantity token_kind.
3838

39+
(** Get the number of token that a [spender] is allowed to spend from a [user] *)
3940
Parameter get_allowance :
4041
forall (token_kind : TokenKind),
41-
User -> (* user *)
42-
User -> (* spender *)
42+
forall (user : User),
43+
forall (spender : User),
4344
World ->
4445
TokenQuantity token_kind.
4546

@@ -53,10 +54,11 @@ Module Primitives.
5354
World ->
5455
option World.
5556

57+
(** Set the allowance for a certain [spender] at a certain amount from the account of a [user] *)
5658
Parameter approve :
5759
forall (token_kind : TokenKind),
58-
User -> (* user *)
59-
User -> (* spender *)
60+
forall (user : User),
61+
forall (spender : User),
6062
TokenQuantity token_kind ->
6163
World ->
6264
World.
@@ -274,7 +276,7 @@ Module Erc20.
274276
(* We run the action to get the balance *)
275277
let! balance := M.MakeAction (Action.GetBalance token_kind user) in
276278
M.Pure (Some (balance, state))
277-
(* "getAllowance" *)
279+
(* The "allowance" entrypoint *)
278280
| Command.GetAllowance user spender =>
279281
let! allowance := M.MakeAction (Action.GetAllowance token_kind user spender) in
280282
M.Pure (Some (allowance, state))
@@ -286,6 +288,7 @@ Module Erc20.
286288
M.Pure (Some (tt, state))
287289
else
288290
M.Pure None
291+
(* The "approve" entrypoint *)
289292
| Command.Approve spender value =>
290293
let! _ := M.MakeAction (Action.Approve token_kind sender spender value) in
291294
M.Pure (Some (tt, state))

0 commit comments

Comments
 (0)