forked from completium/try-archetype
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2-exec_condition.arl
More file actions
32 lines (25 loc) · 1.27 KB
/
2-exec_condition.arl
File metadata and controls
32 lines (25 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
archetype exec_condition
variable value : nat = 0
constant admin : address = tz1MZrh8CvYkp7BfLQMcm6mg5FvL5HRZfACw
entry main(v : nat) {
////////////////////////////////////////////////////////////////////
// //
// FIXME: this entry must //
// ** be called only by admin address, //
// ** the value v must be between 10 (included) and 20 (strictly) //
// ** this value must be even, otherwise it fails //
// with this following message : `Expected even value` //
// //
////////////////////////////////////////////////////////////////////
}
// Solution at the following address:
// https://completium.com/docs/contract/tuto/archetype-execcond
// (ctrl+click to follow link)
// Commands to DEPLOY contract (in Terminal window below):
// cd tutorial
// completium-cli deploy 2-exec_condition.arl
// Command to CALL the contract (in Terminal window below):
// completium-cli call 2-exec_condition --entry main --arg '{"v" : 14}'
// Command to VIEW the contract in BETTER CALL DEV
// (ctrl+click the generated URL)
// completium-cli show contract 2-exec_condition