Hello All -
I deployed dDice to mainnet and have had over 300 plays already…
Please enjoy.
/* dDice.bas
Original Version: https://github.com/Nelbert442/dero-smartcontracts/tree/main/DERO-Dice
Updated Version: https://github.com/newvcas8372/dDice
Updated Author: newvcas8372
*/
contract/dDice.bas
Attempt at similar product as Ether Dice etc. Dice rolling game in which you can choose between a 2x and a 10x multiplier (increment by 1s [e.g. 2x, 3x, 4x, … 10x]) and roll high or low.
The high and low numbers are defined as such:
2x --> 50 or over --> 49 or under
3x --> 67 or over --> 33 or under
4x --> 75 or over --> 25 or under
5x --> 80 or over --> 20 or under
6x --> 84 or over --> 16 or under
7x --> 86 or over --> 14 or under
8x --> 88 or over --> 12 or under
9x --> 89 or over --> 11 or under
10x --> 90 or over --> 10 or under
Disclaimer
We are not responsible for any lost funds through the usage of this contract. Please deploy and utilize at your own risk. ALWAYS USE RINGSIZE=2 when interacting with this contract to prevent loss of funds, see line 16 in each roll function. You CAN donate anonymously with ringsize > 2.
SCID (Contract ID)
ae55db1581b79f02f86b70fc338a7b91b14ded071a31972d9cfdb0eca6e302af
e.x.1 (Roll High with 2x Multiplier - Wagering 0.05 DERO):
TX Fee: ~0.00258
curl http://127.0.0.1:10103/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"scinvoke","params":{"sc_dero_deposit":5000,"ringsize":2,"scid":"ae55db1581b79f02f86b70fc338a7b91b14ded071a31972d9cfdb0eca6e302af","sc_rpc":[{"name":"entrypoint","datatype":"S","value":"RollDiceHigh"},{"name":"multiplier","datatype":"U","value":2}] }}' -H 'Content-Type: application/json'
e.x.2 (Roll Low with 5x Multiplier - Wagering 0.1 DERO):
TX Fee: ~0.00258
curl http://127.0.0.1:10103/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"scinvoke","params":{"sc_dero_deposit":10000,"ringsize":2,"scid":"ae55db1581b79f02f86b70fc338a7b91b14ded071a31972d9cfdb0eca6e302af","sc_rpc":[{"name":"entrypoint","datatype":"S","value":"RollDiceLow"},{"name":"multiplier","datatype":"U","value":5}] }}' -H 'Content-Type: application/json'
DONATE (Donates DERO to dDice Liquidity Anonymously - Donating 1 DERO):
TX Fee: ~0.00289
curl http://127.0.0.1:10103/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"scinvoke","params":{"sc_dero_deposit":100000,"ringsize":16,"scid":"ae55db1581b79f02f86b70fc338a7b91b14ded071a31972d9cfdb0eca6e302af","sc_rpc":[{"name":"entrypoint","datatype":"S","value":"Donate"}] }}' -H 'Content-Type: application/json'