Code Monkey home page Code Monkey logo

soltip's Introduction

Soltip

Soltip logo

A tipping DApp for Solana and OBS Studio users.

Quick Links

Introduction

Solana's first tipping app, SolTip, is a frontend only tipping solution with real-time prices using Pyth API. SolTip provides streamers with an alert box for every donation, allowing for immediate audience engagement. Featuring extremely low transaction fees second only to IOTA, SolTip is fast, accurate, and easy to use.

Feature

  • Customized accepted minimal price
  • Customized token watch list
  • Bad-words Filter
  • Support SNS Domain (.sol)

Demo

  1. Setting up CLR Browser for OBS. The link is https://soltip.tw/alertbox/?address=ADDRESS. Replace ADDRESS with your SOL address or domain name. For example:
https://soltip.tw/alertbox/?address=gura.sol

Or

https://soltip.tw/alertbox/?address=ARJC7RU7vYcgZ2HPA2dANyD4pcNzQmMaLFKYSKnsAZ6B&imgurl=https://i.imgur.com/tsvPcg8.gif

Query Parameters

Name Required Description
address O Address of receiver. Can be SOL address or domain name.
imgurl Url of image.
soundurl Url of alert sound.
  1. Tipping someone. Open
https://soltip.tw/tip

Or

https://soltip.tw/tip?address=ADDRESS

and connect with your wallet, try to send any token with a message. Only the tip with a price above the threshold and accepted tokens will display on alert-box page. The minimal accepted price is $0.1 and these accepted tokens are SOL, USDC, RAY by default.

  1. Wait for 10s to see the result. If not, one of the reasons is that the RPC endpoint (mainnet-beta) rejects your request, you should try to build by yourself and then increase POLLING_INTERVAL.

Build And Setup

Build from Source

  1. Clone the project:
git clone https://github.com/7h2x5e/soltip.git
  1. Install dependencies:
  • For alert box
    cd packages/alert-box/ && yarn
    
  • For tipping page
    cd packages/tip/ && yarn
    
  1. Build:
yarn build
  1. Run locally:
yarn start

Setup

In package/alert-box/src/config.js:

export const POLLING_INTERVAL = 10000;
export const PRICE_POLLING_INTERVAL = 30000;
export const ALERT_BOX_DELAY = 8000;
export const ALERT_BOX_INTERVAL = 1000;
export const MINIMAL_ACCEPTED_PRICE_IN_USD = 0.03; // 0 = unlimited
export const ORACLE_MAPPING_PUBLIC_KEY = 'AHtgzX45WTKfkPG53L6WYhGEXwQkN1BVknET3sVsLL8J'; // For mainnet-beta
export const ANIME_GIF_LOCATION = './gura.gif'
export const ENABLE_BAD_WORDS_FILTER = true;

// [ token mint address, price account key ]
export const SOL_PRICE_ACCOUNT_KEY = "H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG";
export const WATCH_LIST = [ 
    // USDC 
    ["EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD"],
    // RAY
    ["4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R", "AnLf8tVYCM816gmBjiy8n53eXKKEDydT5piYjjQDPgTB"]
]

export const CUSTOM_BAD_WORDS = [
    "BTC"
]
  • Token mint address can be retrieved from spl-token-wallet.
  • Price account key can be retrieved from pyth.

For example, to accept FTT tips:

export const WATCH_LIST = [
    ...,
    [
        // FTT
        "AGFEad2et2ZJif9jaGpdMixQqvW5i81aBdvKe7PHNfz3",
        "8JPJJkmDScpcNmBRKGZuPuG2GYAveQgP3t5gFuMymwvF"
    ]
]

Credits

Technical Support: @wei

Netlify

1y VPS support: @Seamus

Netlify

soltip's People

Contributors

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