pancakeswap / lottery-contract Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi, I get the following error on running yarn deploy:local
.
TypeError: lotteryInstance.init is not a function
at main (/home/eth/lottery-contract/scripts/deploy.js:85:27)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
error Command failed with exit code 1.
Any suggestions why this is the case?
After buying some tickets, I've noticed that one number of a ticket was repeated.
After checking this file: Lottery.sol
Thanks.
Hey guys,
I'm new to solidity and I was looking at your code to try to understand how things work.
Anyway, isn't this test incorrect:
lottery-contract/contracts/Lottery.sol
Line 430 in d2ebe90
if(_startingTimestamp >= getCurrentTime()) {
lotteryStatus = Status.Open;
} else {
lotteryStatus = Status.NotStarted;
}
If the starting timestamp is bigger than the current time, then the status should be NotStarted. It should be like this:
if(_startingTimestamp >= getCurrentTime()) {
lotteryStatus = Status.NotStarted;
} else {
lotteryStatus = Status.Open;
}
And maybe I would add a "require" to make sure that _closingTimestamp is bigger than getCurrentTime(). Because there is no point to create a lottery that is already closed.
Can you add the option to buy fractions of lottery tickets?
how to understand the issueIndex mean in lotteryNFT.sol?
The lottery logic currently relies on a ERC721 token to handle NFT tickets.
https://bscscan.com/token/0x5e74094cd416f55179dbd0e45b1a8ed030e396a1
Owing to technical limitations (no batch minting) in the ERC721 standard, it is essential to update the lottery logic with a new LotteryNFT built under the ERC1155 standard.
The purpose of this change is to batch mint tickets, which will result in massive gas reduction for users, and allow greater participation from users.
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.