Coder Social home page Coder Social logo

pinksale-python's Introduction

pinksale-python

The unofficial Python client for Pinksale.

Functionalty

  • A Python wrapper for any presale contract.
  • Easy access to the necessary data about the presale.
  • Supports BSC and ETH for now.

Installation

pip install pinksale-python

Supports

  • Binance Smart Chain

    • Supports ETH (BNB)
  • Ethereum

    • Supports ETH (ETH)

Donation

You can support the project by donating :)
for ETH/BSC/ARBI/AVAX/POLYGON chains: 0x09a27f3647aD2Fd081e515F9D2d785292Fba38C1

Usage/Examples

Write functions

To make a contribution, you only need to enter the amount in ether:

from pinksale.pinksale import Pinksale


client = Pinksale("0x0A8527e4A1e3f8b56508e26b8Dc332e067916108", "your_private_key", provider="https://bsc-dataseed1.ninicoin.io")
tx_receipt = client.contribute(1) # Contribute with 1 BNB

Emergency withdraw:

client.emergency_withdraw()

You can claim your tokens when pool finalizes:

client.claim()

View Functions

A simple call example for view functions. Contract address is your presale address.

from pinksale.pinksale import Pinksale


client = Pinksale("0x0A8527e4A1e3f8b56508e26b8Dc332e067916108", provider="https://bsc-dataseed1.ninicoin.io")
contributors = client.get_all_contributors()
>> ['0x0080b399E21475a7ca6d6cf9081C983BE51Bdead', '0xA8617881a6914b59000f279e4425F0E8E84BeBa5', ...]

You can get Pool Details: Total raised, Details (image, links, etc.), KYC

client.get_pool_details()
>> {'total_raised': 120222334187259780175, 'details': {'a': 'https://photos.pinksale.finance/file/pinksale-logo-upload/1696947582061-36b70f470f30f10fb3055f7c2a32ca88.jpg', 'b': 'https://zhaodavinci.com/', 'd': 'https://twitter.com/Zhao_DaVinci', 'e': 'https://github.com/AnalytixAudit/Solidity/blob/main/20231009_AnalytixAudit_ZhaoDaVinc_VINCI_Audit.pdf', 'f': 'https://t.me/ZhaoDaVinci', 'h': "♠️ Hottest Meta of the Month ♠️\nWhy did CZ tokenize the Mona Lisa? To blend Da Vinci's genius with crypto magic, creating a masterpiece of digital value ♠️ Top Trending ♠️ Audited Contract ♠️ Top Tier Listings ♠️ CMC & CG Fast track ♠️ Top Incubator ♠️ Based Team ♠️ Buy Back & Burn ♠️ 100x Target ♠️", 's': 'https://youtu.be/HYnUI5dDyeo'}, 'kyc': {'a': '', 'b': 'https://app.analytixaudit.com/zhao-da-vinc', 'c': '', 'd': '', 'e': '', 'f': ''}}

Also pool settings: "token", "currency", "start_time", "end_time", "soft_cap", "total_selling_tokens", "max_contribution"

client.get_pool_settings()

Get current rate returns amount of tokens for 1 bnb.

client.get_current_rate()

Get all contributor addresses:

client.get_all_contributors()

Get contribution amount of an address:

address = ""
client.get_contribution_of(address)

Changelog

0.1.0

  • Support for BSC (BNB) and ETH (ETH)

pinksale-python's People

Contributors

hkey0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pinksale-python's Issues

Error when installing using pip

$ pip install pinksale-python
Collecting pinksale-python
Downloading pinksale-python-0.1.7.tar.gz (7.3 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-c4o87b3m/pinksale-python_02ec33d9c7ab4645be7ec546c4b6bf03/setup.py", line 14, in
long_description=open('readme.md').read(),
^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'readme.md'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Solana support?

Hello, any plans to update it to support solana? I haven't tried your code yet, but it would be better if we can update the script to support solana. Thanks

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.