In example dice at contracts directory, alice/bob should set permission to dice account for transferring EOS token from alice/bob to dice.

  alice                        dice contract       eosio.token contract
---------                      -------------        -------------------
    | set permission to dice       |                         |
    |                              |                         |
    |   offerbet(some eos)         |                         |
    |----------------------------->|  transfer(alice->dice)  |
    |                              |------------------------>|
    |                              |                         |

To play this game, alice/bob should grant privilege to dice for transferring EOS from alice/bob to dice.

Can alice/bob can transfer EOS to dice account directly and once dice can be triggered some action like fallback funciton in Ethereum?

1 Answer 1


The dice contract, as implemented, does not follow best practices. A better example is the exchange contract (also located in contracts folder) which has the user transfer funds to the exchange.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.