-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathbug_213.liq
More file actions
53 lines (51 loc) · 1.16 KB
/
bug_213.liq
File metadata and controls
53 lines (51 loc) · 1.16 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
module FA12 = struct
contract type ContractType =
sig
[%%entry
:val main : address]
end
contract type ContractType3 =
sig
[%%entry
:val main : nat]
end
contract type ContractType4 =
sig
[%%entry
:val main : nat]
end
contract type ContractType5 =
sig
[%%entry
:val main : nat]
end
contract type Fa12 = sig
val%entry main:
((address * (address * nat)),
((address * nat),
(((address * address) * address),
((address * address),
((unit * address),
(bool,
(address,
((unit * address),
((address * nat), (address * nat)) variant) variant)
variant)
variant)
variant)
variant)
variant)
variant)
variant
end
end
type storage = unit
let%entry test_token (addr: address) storage =
begin match [%handle FA12.Fa12.main] addr with
| None -> failwith ("Cannot recover bool contract from:", addr)
| Some token_contract ->
let op =
token_contract.main (Left (addr, (addr, 2p))) ~amount:0tz
in
[op], storage
end