Giter Club home page Giter Club logo

firelotto's Introduction

firelotto

International Blockchain Lottery

firelotto's People

Contributors

firelotto avatar polovaikin avatar tolya-yanot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

firelotto's Issues

post source on etherscan

you should post your source on etherscan. we dont even know if this source corresponds to your actual contracts

bug: Biased random generator

Based on one of our research scientific posts, the utilised random generation algorithm is biased (modulo bias) and the distribution is skewed, favouring the smaller numbers.

The modulo operation is performed between the numbers’ decreasing list length and the the next byte. At this stage, we can detect a modulo bias issue, because:

  • n does not divide 256.
  • even if it did, n is constantly decreasing in each iteration and apparently some of them if not all won’t divide 256.

Randomness

Hello, what is being used as a source of randomness?

bug: owner can arbitrarily choose winner

owner (drawer) can end the game choosing whatever bitcoin block hash they want, allowing them to precompute and choose an arbitrary winner. instead choose a block number in advance (in solidity) and read the blockhash from an oracle (after ticket purchases have ended).

bug: lottery.sol does not compile

As of cf5a207 the provided Lottery.sol contract does not compile.

There are two undefined symbols checkTickets and checkGameIndex.

lottery.sol:354:9: DeclarationError: Undeclared identifier.
        checkTickets();
        ^----------^

lottery.sol:391:32: DeclarationError: Undeclared identifier.
                LogReserveUsed(checkGameIndex, fromReserve);
                               ^------------^

Update to support EIP-1102

Hi,

Paul from @MetaMask here. On November 2nd, 2018, MetaMask and other dapp browsers gave users the option to stop automatically exposing user accounts to dapps. Instead, dapps must request access to user accounts using a new asynchronous provider method: provider.enable(). Soon, this private browsing mode will be "on" by default, meaning all dapps must call provider.enable() or they will no longer work properly. We noticed that your dapp has not been updated to call this new method, so we wanted to reach out to you directly.

To make sure your dapp continues to work with MetaMask, Coinbase Wallet, Status, Mist, and other dapp browsers, the following changes should be made as soon as possible:

  1. Use window.ethereum

Previously, dapps would access the MetaMask provider by using window.web3.currentProvider. While this will still work, the new, standard way to access the Ethereum provider in a Web browser is to use window.ethereum.

  1. Call ethereum.enable()

The MetaMask provider won’t be populated with user accounts on page load. This means that any Web3 call or underlying RPC call that requires an account — such as sending transactions or signing messages — will fail by default. To access user accounts and initiate account-requiring RPC calls, dapps must first call ethereum.enable(). This method returns a Promise that resolves to an array of user accounts once access is approved for a given dapp. Once this approval happens, MetaMask will populate its injected provider with user accounts like normal.

For additional information, you can also check out the original blog post we put together that describes these updates in greater detail and provides example code (https://medium.com/metamask/https-medium-com-metamask-breaking-change-injecting-web3-7722797916a8). Please feel free to reach out to us directly with any questions, comments, or concerns while implementing this required change. The best way to contact us is through our official support channel at https://metamask.zendesk.com/hc/en-us/requests/new; we'll be able to quickly see and respond to messages there.

Best,

Paul

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.