-
Notifications
You must be signed in to change notification settings - Fork 6
/
try.html
90 lines (84 loc) · 4.39 KB
/
try.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SC Simulator - Assembly simulator</title>
<link rel="stylesheet" href="style.css">
<script type="module" src="lib/index.js"></script>
<script src="3rd-party/winbox.bundle.js"></script>
<script src="3rd-party/highlight.min.js"></script>
<link rel="stylesheet" href="3rd-party/tomorrow.css">
</head>
<body data-version="9999.9.4">
<h1 class="gdrow1 gdcol12 gmrow1">SC Simulator 3.1.0-alpha - Simulator and debugger (SmartC 9999.9.4)</h1>
<fieldset id="source_fieldset" class="gdrow26 gdcol1 gmrow2"><legend id="source_legend">❐ Source code:</legend>
<div id="source_window" class="div_window_source">
<textarea id="source-code" placeholder="Paste C or assembly code" class="inc_height" spellcheck="false" wrap="soft"></textarea>
<div id="color_code"></div>
<div id="inspectorID"></div>
</div>
</fieldset>
<fieldset id="actions_fieldset" class="gdrow2 gdcol2 gmrow3"><legend id="actions_legend">❐ Actions:</legend>
<div id="actions_window" class="div_window_grid">
<button id="stepinto" accesskey="s" title="Alt+Shift+s Advance one instruction" class="btn_class grow1 gcol1" disabled="true"><u>S</u>tep into</button><br />
<button id="togSource" title="Toggle Source/Color mode" class="btn_class grow1 gcol2">Tog source</button><br />
<button id="deploy" title="Deploy / reset" class="btn_class grow2 gcol2">Deploy</button>
<button id="forge" accesskey="f" class="btn_class grow1 gcol4" title="Forge one block" disabled="true"><u>F</u>orge</button>
<button id="run" accesskey="r" title="Alt+Shift+r - Run until end (one block)" class="btn_class grow1 gcol3" disabled="true"><u>R</u>un</button>
<button id="stepover" accesskey="1" title="Alt+Shift+1 Advance but not enter functions" class="btn_class grow2 gcol1" disabled="true">Step over</button>
<button id="addbp" class="btn_class grow2 gcol3" title="Add breakpoint (or double click on line)" disabled="true">Add BP</button>
<button id="stepout" title="Return from current function" class="btn_class grow3 gcol1">Step out</button>
<button id="loadSlot" title="Load contract slot" class="btn_class grow2 gcol4" disabled="true">Load Slot</button>
<button id="detachAll" accesskey="a" class="btn_class grow3 gcol4">Detach all</button>
<span class="grow3 gcol24">Simulator said: <output id="simsaid">Contract not loaded</output></span>
</div>
</fieldset>
<fieldset id="memory_fieldset" class="gdrow3 gdcol2 gmrow4"><legend id="memory_legend">❐ ContractState:</legend>
<div id="memory_window" class="div_window_normal">
</div>
</fieldset>
<fieldset id="blockchain_fieldset" class="gdrow4 gdcol2 gmrow5"><legend id="blockchain_legend">❐ Blockchain status:</legend>
<div id="blockchain_window" class="div_window_normal">
<pre id="blockchain_output"></pre>
</div>
</fieldset>
<fieldset id="transaction_fieldset" class="gdrow5 gdcol2 gmrow6"><legend id="transaction_legend">❐ Transaction:</legend>
<div id="transaction_window" class="div_window_normal">
<textarea id="transactions" placeholder="Transactions object here" style="width: 100%; height: 200px;" spellcheck="false" wrap="soft">[
// Read the complete help at https://github.com/deleterium/SC-Simulator/blob/main/README.md
{
// Yes, comments are allowed! Here sending a text message.
"blockheight": 2,
"sender": "10000n",
"recipient": "999n",
"amount": "100_0000_0000n",
"messageText": "bid const"
},
{
// Here, sending a binary message.
"blockheight": 3,
"sender": "0xaaBBn",
"recipient": "0x100",
"amount": "3000_0000",
"messageHex": "636f6e73742061756374696f6e20676f74203173742062696421000000000000"
},
{
// Support for sending up to 4 tokens, just like in the real world.
// You can specify a txid
"txid": "2345678233322",
"blockheight": 4,
"sender": "10000n",
"recipient": "999",
"amount": "1_0000_0000n",
"tokens": [
{"asset": 123456, "quantity": 1000000},
{"asset": 123412, "quantity": 1000000}
]
}
]
</textarea>
</div>
</fieldset>
</body>
</html>