|
14 | 14 | ).sort(
|
15 | 15 | function(a, b){return parseInt(Eos.modules.format.encodeName(a, false)) - parseInt(Eos.modules.format.encodeName(b, false));}
|
16 | 16 | );
|
| 17 | + |
| 18 | + let main_token_symbol = 'EOS'; |
| 19 | + let stake_net_quantity = document.getElementById('stake_net_quantity').value; |
| 20 | + let stake_cpu_quantity = document.getElementById('stake_cpu_quantity').value; |
| 21 | + |
17 | 22 | let expireInSeconds = 60 * document.getElementById('minutes_before_expiration').value;
|
18 | 23 | let block_num = +document.getElementById('block_num').value;
|
19 | 24 | let chainId = document.getElementById('chainId').value;
|
|
49 | 54 |
|
50 | 55 | EOS.transaction(
|
51 | 56 | function(tr){
|
| 57 | + tr.delegatebw({ |
| 58 | + 'from': account_name, |
| 59 | + 'receiver': account_name, |
| 60 | + 'stake_net_quantity': stake_net_quantity.toString() + ' ' + main_token_symbol, |
| 61 | + 'stake_cpu_quantity': stake_cpu_quantity.toString() + ' ' + main_token_symbol, |
| 62 | + 'transfer': 0 |
| 63 | + }); |
| 64 | + |
52 | 65 | tr.voteproducer({
|
53 | 66 | 'voter': account_name,
|
54 | 67 | 'proxy': '',
|
@@ -110,6 +123,16 @@ <h1>Step 2: Generate your voting transaction while being OFF-LINE</h1>
|
110 | 123 | <label for="minutes_before_expiration">Transaction will expire in</label>
|
111 | 124 | <input type="number" min="1" max="60" step="1" name="minutes_before_expiration" id="minutes_before_expiration" value="10" required> minutes<br>
|
112 | 125 |
|
| 126 | + <h3>Staking</h3> |
| 127 | + |
| 128 | + <label for="stake_net_quantity">Stake Net Quantity</label> |
| 129 | + <input type="number" min="0" step="1" name="stake_net_quantity" id="stake_net_quantity" value="0" required> EOS<br> |
| 130 | + |
| 131 | + <label for="stake_cpu_quantity">Stake CPU Quantity</label> |
| 132 | + <input type="number" min="0" step="1" name="stake_cpu_quantity" id="stake_cpu_quantity" value="0" required> EOS<br> |
| 133 | + |
| 134 | + <h3>Voting</h3> |
| 135 | + |
113 | 136 | <label for="bp">Block Producers</label>
|
114 | 137 | <input type="text" name="bp" id="bp" value="" style="width: 700px;" placeholder="Coma separated list of block producers account names (no more than 30). Example: alpha, beta, gamma" required><br>
|
115 | 138 |
|
|
0 commit comments