Git Product home page Git Product logo

tipjarcontracts's Introduction

Tipjar Collection

Different contracts for recieving tips. I want to help creators find new ways to fund themselves without relying on larger services.

TipJarNft.sol

Send tip -> get NFT

Inspired by POAP and Gitcoin Kudos except that when the NFT is transferred, the new owner is "rugged".

This contract uses the metadata extension (ERC721Metadata) to disincentivize buying credibility. This isn't a big concern for smaller creators but may be a concern if you are a larger creator.

This works by having a specific URI, following the ERC721 Metadata JSON Schema, for the original tipper and one for the collector on the secondary market.

If you have no interest in disincentivizing credibility purchases, you can use the same URI for tipper and collector.

This is the expected process that would be followed:

Diagram showing Alice tipping you, receiving an NFT, and then selling that NFT to Bob

  1. Alice tips you with ETH
  2. As a thank you, an NFT is minted and assigned to Alice. The associated metadata is located at the 'tipper URI (sample)'.
  3. At some point later, Alice decides to sell the NFT to Bob
  4. When Bob becomes an owner of the NFT, the tokenURI return value will now be located at the 'collector URI (sample)'.

Any time the owner of a token is not the minter of the token, the 'collector URI' is used as the metadata resource.

Here is the JSON Metadata schema from EIP-721:

{
    "title": "Asset Metadata",
    "type": "object",
    "properties": {
        "name": {
            "type": "string",
            "description": "Identifies the asset to which this NFT represents"
        },
        "description": {
            "type": "string",
            "description": "Describes the asset to which this NFT represents"
        },
        "image": {
            "type": "string",
            "description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
        }
    }
}

Example on Ropsten network

Caveats and words of warning

I have a number of tests but it isn't perfectly covered yet. I also have not done gas optimization. This is an alpha product, and not alpha in the fun way were you are making a bunch of money.

TipJarLeaderboard.sol

Your top tippers receive a kickback on each withdrawl

Inspired by Twitch leaderboards for Gifters and Cheerers. The goal is to provide an incentive for tipping higher amounts by providing a percentage of the tips back to the top of the leaderboard.

Absolutely alpha product, missing many tests

tipjarcontracts's People

Contributors

0xcharchar avatar

Watchers

 avatar

Forkers

dashbaord202401

tipjarcontracts's Issues

Landing page

Needs:

  • framework to be used for rest of dapp
  • simple landing page layout
  • content:
    • about the project
    • describe each tipjar

Deployed contract details

Needs:

  • take in a contract address and parse for tipjar type
  • show details about tipjar (so that user doesn't need to go to etherscan)
    • amount in tipjar
    • tipper count
  • link to etherscan

Page to deploy NFT tipjar

Needs:

  • in-depth description of tipjar
  • set minimum tip amount to generate NFT
  • upload tipper and collector badges
  • set metadata
  • allow user to use pinata instead of manual upload
  • set name and symbol of token
  • deploy through web3 wallet (metamask at minimum)

Page to deploy Leaderboard tipjar

Needs:

  • set percent of tips to share back
  • in-depth description of how the tipjar works
  • deploy through web3 wallet (metamask at minimum)
  • display contract address after deployment

Deploy dapp to IPFS

Needs:

  • automatic deploy when repo is tagged
  • use Github Actions
  • IPNS support

Maybe use Fleek if there is a reasonable free tier

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.