International Blockchain Lottery
firelotto / firelotto Goto Github PK
View Code? Open in Web Editor NEWInternational Blockchain Lottery
International Blockchain Lottery
you should post your source on etherscan. we dont even know if this source corresponds to your actual contracts
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:
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).
你这个合约代码都没法通过etherscan验证??三个游戏合约全试了一遍,都不行
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:
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
.
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
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);
^------------^
Hello, what is being used as a source of randomness?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.