-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathbuy-ticket-after-deadline.scen.json
More file actions
106 lines (106 loc) · 3.72 KB
/
buy-ticket-after-deadline.scen.json
File metadata and controls
106 lines (106 loc) · 3.72 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
"name": "buy ticket after deadline",
"gasSchedule": "dummy",
"steps": [
{
"step": "externalSteps",
"path": "buy-ticket.scen.json"
},
{
"step": "setState",
"accounts": {
"address:acc2": {
"nonce": "0",
"balance": "1,000,000",
"esdt": {
"str:LOTTERY-123456": "100"
}
}
},
"currentBlockInfo": {
"blockTimestampMs": "123,567"
}
},
{
"step": "scCall",
"id": "buy-ticket-after-deadline",
"tx": {
"from": "address:acc2",
"to": "sc:lottery#42",
"esdtValue": [
{
"tokenIdentifier": "str:LOTTERY-123456",
"value": "100"
}
],
"function": "buy_ticket",
"arguments": [
"str:lottery_name"
],
"gasLimit": "100,000,000",
"gasPrice": "0"
},
"expect": {
"out": [],
"status": "4",
"message": "str:Lottery entry period has ended! Awaiting winner announcement.",
"gas": "*",
"refund": "*"
}
},
{
"step": "checkState",
"accounts": {
"address:my_address": {
"nonce": "2",
"balance": "1,000,000",
"storage": {}
},
"address:other_shard_address#41": {
"nonce": "0",
"balance": "1,000,000",
"storage": {}
},
"address:acc1": {
"nonce": "1",
"balance": "1,000,000",
"storage": {}
},
"address:acc2": {
"nonce": "1",
"balance": "1,000,000",
"esdt": {
"str:LOTTERY-123456": "100"
},
"storage": {}
},
"sc:lottery#42": {
"nonce": "0",
"balance": "0",
"esdt": {
"str:LOTTERY-123456": "100"
},
"storage": {
"str:lotteryInfo|nested:str:lottery_name": {
"0-token_identifier": "nested:str:LOTTERY-123456",
"1-ticket_price": "biguint:100",
"2-tickets-left": "u32:1",
"3-deadline": "u64:123,456",
"4-max_entries_per_user": "u32:800",
"5-prize_distribution": "nested:u8:100",
"6-prize_pool": "biguint:100",
"7-unawarded_amount": "biguint:100"
},
"str:ticketHolder|nested:str:lottery_name|str:.len": "1",
"str:ticketHolder|nested:str:lottery_name|str:.item|u32:1": "1",
"str:numberOfEntriesForUser|u32:12|str:lottery_name|u64:1": "1",
"str:addressToIdMapper|str:lastId": "1",
"str:addressToIdMapper|str:addr|address:acc1": "1",
"str:addressToIdMapper|str:addrId|u64:1": "address:acc1"
},
"code": "mxsc:../output/lottery-esdt.mxsc.json"
}
}
}
]
}