Coder Social home page Coder Social logo

contracts's Introduction

Introduction

In NSTLGIA, the participants of techno events can collect and check their POAP as a proof of attendance. This raffle contract picks winners out of those POAP holders for each event and mint/distribute newly created NFTs to them. Those NFTs are rights to claim promo code for the next event ticket on NSTLGIA app.

We believe that this raffle functionality not only incentivizes more people to claim POAP but entertain them. Minted NFTs can also be anything like NFT art, music and community membership ( being used as a voting right, too).

POAP has its own off chain raffle function. But on-chain way of picking winner is complex and challenging to implement but more transparent and composable with other on-chain dapps.

Deployment

1- install dependencies : npm i
2- compile : npx hardhat compile
3- deploy : npx hardhat run deploy/deploy.js --network gnosis

4- test : npx hardhat run scripts/raffle.js
you can test smart contract by runnnig javascript code with expected parameters.

As a preparetion, you need to do:
1- send funds to wallet on Gnosis chain: Testing only can be done on Gnosis chain since poap contract exists there.
*It won't bother you that much because it's way cheaper and faster than Ethereum mainnet.
2- create sample POAP on poap.xyz: this raffle contract should interact with real poap contract.

Issuing POAP: https://app.poap.xyz/admin/events/new/
POAP contract on Gnosis chain: 0x22c1f6050e56d2876009903609a2cc3fef83b415

  • Main Function s
    โ‘  createRaffle(eventNum, winnersNum, expiry, participants, tokenURI)
    โ‘ก pickAndMint(raffleNum)

In details, please check out source codes.

contracts's People

Contributors

porco-rosso-j avatar nostalgia-xyz avatar

Watchers

 avatar  avatar

Forkers

porco-rosso-j

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.