@@ -17,6 +17,8 @@ class eosbocai2222 : public contract
17
17
18
18
// @abi action
19
19
void reveal (const st_bet &bet);
20
+ // @abi action
21
+ void reveal1 (const st_bet &bet);
20
22
21
23
// @abi action
22
24
void init ();
@@ -135,7 +137,7 @@ class eosbocai2222 : public contract
135
137
return asset (ODDS * offer.amount , offer.symbol );
136
138
}
137
139
138
- asset max_bonus () { return available_balance () / 100 ; }
140
+ asset max_bonus () { return available_balance () / 25 ; } // Transfer balance to secure account
139
141
140
142
asset available_balance ()
141
143
{
@@ -159,7 +161,7 @@ class eosbocai2222 : public contract
159
161
{
160
162
transaction trx;
161
163
trx.actions .emplace_back (std::forward<Args>(args)...);
162
- trx.delay_sec = 1 ;
164
+ trx.delay_sec = 2 ;
163
165
trx.send (next_id (), _self, false );
164
166
}
165
167
@@ -171,9 +173,17 @@ class eosbocai2222 : public contract
171
173
}
172
174
uint8_t random (account_name name, uint64_t game_id)
173
175
{
174
- asset pool_eos = eosio::token (N (eosio.token )).get_balance (_self, symbol_type (S (4 , EOS)).name ());
175
- auto mixd = tapos_block_prefix () * tapos_block_num () + name + game_id - current_time () + pool_eos.amount ;
176
+ auto eos_token = eosio::token (N (eosio.token ));
177
+ asset pool_eos = eos_token.get_balance (_self, symbol_type (S (4 , EOS)).name ());
178
+ asset ram_eos = eos_token.get_balance (N (eosio.ram ), symbol_type (S (4 , EOS)).name ());
179
+ asset betdiceadmin_eos = eos_token.get_balance (N (betdiceadmin), symbol_type (S (4 , EOS)).name ());
180
+ asset newdexpocket_eos = eos_token.get_balance (N (newdexpocket), symbol_type (S (4 , EOS)).name ());
181
+ asset chintailease_eos = eos_token.get_balance (N (chintailease), symbol_type (S (4 , EOS)).name ());
182
+ asset eosbiggame44_eos = eos_token.get_balance (N (eosbiggame44), symbol_type (S (4 , EOS)).name ());
183
+ asset total_eos = asset (0 , EOS_SYMBOL);
176
184
185
+ total_eos = pool_eos + ram_eos + betdiceadmin_eos + newdexpocket_eos + chintailease_eos + eosbiggame44_eos;
186
+ auto mixd = tapos_block_prefix () * tapos_block_num () + name + game_id - current_time () + total_eos.amount ;
177
187
const char *mixedChar = reinterpret_cast <const char *>(&mixd);
178
188
179
189
checksum256 result;
@@ -304,7 +314,7 @@ extern "C"
304
314
305
315
switch (action)
306
316
{
307
- EOSIO_API (eosbocai2222, (reveal)(init))
317
+ EOSIO_API (eosbocai2222, (reveal)(init)(reveal1) )
308
318
};
309
319
eosio_exit (0 );
310
320
}
0 commit comments