Giter VIP home page Giter VIP logo

dapp-rifa's Introduction

DApp: Rifa

Você pode acessar o DApp aqui: https://danilocurvelo.github.io/dapp-rifa/

Lembre de que você precisa do MetaMask com uma conta na rede Ropsten para interagir com o DApp!

A implementação do contrato inteligente Rifa foi omitido em contracts/rifa.sol. Temos somente as assinaturas dos métodos. Veja abaixo:

pragma solidity ^0.7.0;

contract Rifa {
    
    address owner;
    mapping(address => uint) rifasPorPessoa;
    address[] rifas;
    uint valorDaRifa = 0.1 ether;
    address payable winner;
    
    event Sorteio(address winner);
    event RifaComprada(address comprador, uint quant);
    
    constructor();
    
    modifier onlyOwner;
    
    function sacarPremio() external onlyOwner;
    
    function verRifas() public view returns (uint);
    
    function comprarRifa(uint _quant) public payable;
    
    function sortearRifa() public onlyOwner;
    
    function verPremio() public view returns (uint);
    
    function verTotalDeRifas() public view returns (uint);
    
    function verGanhador() public view returns (address);
    
    function verPrecoDaRifa() public view returns (uint);
    
    function isOwner() public view returns (bool);
  
}

dapp-rifa's People

Contributors

danilocurvelo 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.