Code Monkey home page Code Monkey logo

devlyn37 / daypass Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 4.0 13.66 MB

Send an NFT and automatically cover the recipients gas, built for ETHTokyo! Daypass allows the distribution and organization of gas sponsorship via NFTs or "Daypasses". We abstract paymaster deployment complexity, and leverage the composability of NFTs for AA based gas sponsorship.

Home Page: https://www.daypass.dev/

JavaScript 0.24% TypeScript 52.55% CSS 2.08% Solidity 44.16% Makefile 0.98%

daypass's Introduction

What is Daypass?

Send an NFT and automatically cover the recipients gas! Daypass allows the distribution and organization of gas sponsorship via NFTs or "Daypasses". We abstract paymaster deployment complexity, and leverage the composability of NFTs for AA based gas sponsorship.

Here's an example of a daypass NFT: Example Daypass NFT on OpenSea Testnet

We build this for ETHTokyo, Here's the showcase

How to use the Demo

Things are a little rough around the edges right now, and very much optimized for the happy path XD. Here are the steps:

  1. Visit daypass.dev, connect with a standard EAO account, then hit Get Started.

  2. Fill out the form (all of these may or may not apply XD) and hit Next, this will do four things:

    • Deploy a Daypass NFT contract
    • Deploy a Paymaster Contract
    • Stake and deposit 0.5 eth for the paymaster
    • Transfer ownership of both the NFT contract and paymaster contract to the caller (you!)
  3. After that's complete, you'll be redirected to the Airdrop page where you send these Daypass NFTs to different users. But here's where it gets a bit confusing, you won't know which address to send the NFT to yet!

  4. In a new tab, open daypass.dev/user/mint

    • Disconnect your wallet from only this page (yuck I know)
    • Hit Connect again and this time choose a social wallet.
    • Once that's connected, grab the address from the top right corner.
    • Sometimes this doesn't work do to some upstream issues with ZeroDev :(, You can still check the contracts that are deployed

    Here's proof that it works: https://www.jiffyscan.xyz/userOpHash/0x88a848130614fae589f4210f82189ab00ccfa06cd0f6b413c719bfd5b739834f?network=goerli

  5. Send this address an NFT from the airdrop page.

    • You'll get a cute little NFT that displays how much time it's valid for

Screenshot 2023-04-17 at 11 34 10 AM

  1. On the mint page you just connected your social wallet to, hit the mint button!

    • You're gonna see the paymaster address appear in the input, that's a little hackathon local storage magic for the purposes of the demo
  2. Voila, you just created a smart account via socials, then minted an NFT, all while paying zero gas because you hold a daypass!

Deployments

Ethereum Goerli

https://goerli.etherscan.io/address/0xac74de54Ae45Eb8dB7F34545C96CBcab59Be3a47

Polygon Mumbai

https://mumbai.polygonscan.com/address/0x1782a694bdb712237aed7b14d3ce93f12b0cffeb

Mantle Testnet

https://explorer.testnet.mantle.xyz/address/0x841b7A8ED11564E94815E069bA64084bF798C06b

Scroll Testnet

https://blockscout.scroll.io/address/0x841b7A8ED11564E94815E069bA64084bF798C06b

Celo Alfajores Testnet

https://explorer.celo.org/alfajores/address/0xD8A2E11a8C3776f1F74Ea898f54bA86Af25c1864

GNOSIS mainnet

https://gnosisscan.io/address/0xe13f6c3d9f95e1d0cb26050d587fba18d1f57958

daypass's People

Contributors

devlyn37 avatar kourin1996 avatar syahrul12345 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

daypass's Issues

Paymaster Contract Testing

We're missing tests for a lot of super core paymaster functionality, it's unclear that everything works how we'd expect.

Cleanup Client Contract Creation Interface

It looks great, but there's a few things wrong right now:

  • We don't have a way to input multiple allowlisted addresses/contracts
  • Not all of the on/off buttons work as you'd expect
  • USD spending limit is a complete mock aha, let's replace that

Display Daypasses

As a user of daypass.dev, I should be able to see my existing deployments including:

  • Contract address for paymaster
  • Contract address for Daypass contract
  • ETH left/used from paymaster
  • Configuration (allowed addresses, spending limits etc)

There should be a dedicated page /daypasses or something like that, that can be navigated to from the navbar

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.