Code Monkey home page Code Monkey logo

lottery-contract's Introduction

Lottery-Contract


Repository setup

Install

To install the needed packages run:

yarn or npm install

Build

To build the smart contracts run:

yarn build or npm run build

Test

To run the tests for the smart contracts run:

yarn test or npm run test

Test coverage

For the test converge of the contracts run:

yarn cover or npm run cover

There are multiple mock contracts that have been created for testing purposes. These have been excluded from the coverage. For more information check the .solcover.js.

Deploy

To deploy the contracts locally run:

yarn deploy:local or npm run deploy:local

Note that deploying the contracts locally does not require any inputs.

Design Notes

The Lottery and LotteryNFT contracts both inherit from a contract called Testable. This contract allows for simple time manipulation for testing purposes. For a non-local deployment the address of this contract can simply be set to 0 in the constructor and the contracts will use the current block.timestamp.

lottery-contract's People

Contributors

nicca42 avatar pancake-swap avatar chefnyan avatar

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.