Name | sapysol-jupiter-dao JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | sapysol Jupiter LFG DAO Vote implementation |
upload_time | 2024-04-18 21:21:22 |
maintainer | None |
docs_url | None |
author | Anton Platonov |
requires_python | <4.0,>=3.10 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# sapysol_jupiter_dao
`sapysol` Jupiter LFG DAO Vote implementation. Based on JavaScript from [Jupiter DAO Website](https://vote.jup.ag) _(from Chrome developer tools)_, written from scratch with the help of [AnchorPy](https://github.com/kevinheavey/anchorpy).
WARNING! `sapysol_jupiter_dao` is currently in `alpha` version, so, bugs, lack of tests and descriptions are expected. Some things may not work, future versions may bring breaking changes.
WARNING! only casting initial vote is implemented! Changing vote, depositing JUP, withdrawing JUP is yet to be implemented!
# Installation
```sh
pip install sapysol-jupiter-dao
```
Note: Requires Python >= 3.10.
# Usage
```py
# DAO Voting (Round #1 of LFG Voting example)
# Automatically claims tokens for a list of wallets/keypairs.
# Can use multiple parallel threads.
#
from solana.rpc.api import Client
from sapysol import *
from sapysol.token_cache import *
from typing import List
from sapysol_jupiter_dao.batcher import SapysolJupiterDaoBatcher
SetupLogging()
connection: Client = Client("https://api.mainnet-beta.solana.com")
# Prepare a list of keypairs to claim tokens
keypairsList: List[Keypair] = [
MakeKeypair("/path/to/keypair1.json"),
MakeKeypair("/path/to/keypair2.json"),
MakeKeypair("/path/to/keypair3.json"),
MakeKeypair("/path/to/keypair4.json"),
]
# Set as you please
voteSide: int = 2
# Prepare batcher that automatically performs votes for all keypairs using
# `numThreads` number of threads.
batcher = SapysolJupiterDaoBatcher(connection = connection,
proposalAddress = "6txWyf3guJrhnNJXcAHxnV2oVxBcvebuSbfYsgB3yUKc",
votersList = keypairsList,
voteSide = voteSide,
numThreads = 10)
# Start voting
batcher.Start()
```
TODO
# Changelog
v.0.2.0 - Add `voteOverride` param to `SapysolJupiterDaoBatcher` which allows to change existing votes.
# Contributing
TODO
# Tests
TODO
# Contact
[Telegram](https://t.me/sapysol)
Donations: `SAxxD7JGPQWqDihYDfD6mFp7JWz5xGrf9RXmE4BJWTS`
# Disclaimer
### Intended Purpose and Use
The Content is provided solely for educational, informational, and general purposes. It is not intended for use in making any business, investment, or legal decisions. Although every effort has been made to keep the information up-to-date and accurate, no representations or warranties, express or implied, are made regarding the completeness, accuracy, reliability, suitability, or availability of the Content.
### Opinions and Views
The views and opinions expressed herein are those of Anton Platonov and do not necessarily reflect the official policy, position, or views of any other agency, organization, employer, or company. These views are subject to change, revision, and rethinking at any time.
### Third-Party Content and Intellectual Property
Some Content may include or link to third-party materials. The User agrees to respect all applicable intellectual property laws, including copyrights and trademarks, when engaging with this Content.
### Amendments
Anton Platonov reserves the right to update or change this disclaimer at any time without notice. Continued use of the Content following modifications to this disclaimer will constitute acceptance of the revised terms.
Raw data
{
"_id": null,
"home_page": null,
"name": "sapysol-jupiter-dao",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Anton Platonov",
"author_email": "anton@platonov.io",
"download_url": "https://files.pythonhosted.org/packages/30/2f/d823abcbbb509e79c2f6c9772dc8abfe8f2175698507c80ac87b6ef83cb0/sapysol_jupiter_dao-0.2.0.tar.gz",
"platform": null,
"description": "# sapysol_jupiter_dao\n\n`sapysol` Jupiter LFG DAO Vote implementation. Based on JavaScript from [Jupiter DAO Website](https://vote.jup.ag) _(from Chrome developer tools)_, written from scratch with the help of [AnchorPy](https://github.com/kevinheavey/anchorpy).\n\nWARNING! `sapysol_jupiter_dao` is currently in `alpha` version, so, bugs, lack of tests and descriptions are expected. Some things may not work, future versions may bring breaking changes.\n\nWARNING! only casting initial vote is implemented! Changing vote, depositing JUP, withdrawing JUP is yet to be implemented!\n\n# Installation\n\n```sh\npip install sapysol-jupiter-dao\n```\n\nNote: Requires Python >= 3.10.\n\n# Usage\n\n```py\n# DAO Voting (Round #1 of LFG Voting example)\n# Automatically claims tokens for a list of wallets/keypairs.\n# Can use multiple parallel threads.\n#\nfrom solana.rpc.api import Client\nfrom sapysol import *\nfrom sapysol.token_cache import *\nfrom typing import List\nfrom sapysol_jupiter_dao.batcher import SapysolJupiterDaoBatcher\n\nSetupLogging()\n\nconnection: Client = Client(\"https://api.mainnet-beta.solana.com\")\n\n# Prepare a list of keypairs to claim tokens\nkeypairsList: List[Keypair] = [\n MakeKeypair(\"/path/to/keypair1.json\"),\n MakeKeypair(\"/path/to/keypair2.json\"),\n MakeKeypair(\"/path/to/keypair3.json\"),\n MakeKeypair(\"/path/to/keypair4.json\"),\n]\n\n# Set as you please\nvoteSide: int = 2\n\n# Prepare batcher that automatically performs votes for all keypairs using \n# `numThreads` number of threads.\nbatcher = SapysolJupiterDaoBatcher(connection = connection,\n proposalAddress = \"6txWyf3guJrhnNJXcAHxnV2oVxBcvebuSbfYsgB3yUKc\",\n votersList = keypairsList,\n voteSide = voteSide,\n numThreads = 10)\n\n# Start voting\nbatcher.Start()\n```\n\nTODO\n\n# Changelog\n\nv.0.2.0 - Add `voteOverride` param to `SapysolJupiterDaoBatcher` which allows to change existing votes.\n\n# Contributing\n\nTODO\n\n# Tests\n\nTODO\n\n# Contact\n\n[Telegram](https://t.me/sapysol)\n\nDonations: `SAxxD7JGPQWqDihYDfD6mFp7JWz5xGrf9RXmE4BJWTS`\n\n# Disclaimer\n\n### Intended Purpose and Use\nThe Content is provided solely for educational, informational, and general purposes. It is not intended for use in making any business, investment, or legal decisions. Although every effort has been made to keep the information up-to-date and accurate, no representations or warranties, express or implied, are made regarding the completeness, accuracy, reliability, suitability, or availability of the Content.\n\n### Opinions and Views\nThe views and opinions expressed herein are those of Anton Platonov and do not necessarily reflect the official policy, position, or views of any other agency, organization, employer, or company. These views are subject to change, revision, and rethinking at any time.\n\n### Third-Party Content and Intellectual Property\nSome Content may include or link to third-party materials. The User agrees to respect all applicable intellectual property laws, including copyrights and trademarks, when engaging with this Content.\n\n### Amendments\nAnton Platonov reserves the right to update or change this disclaimer at any time without notice. Continued use of the Content following modifications to this disclaimer will constitute acceptance of the revised terms.",
"bugtrack_url": null,
"license": "MIT",
"summary": "sapysol Jupiter LFG DAO Vote implementation",
"version": "0.2.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "102a5e4d0e969c5eef039a701470a8667007ca5ca668f4a857bc62a3d259a8f9",
"md5": "53ea00ac80a7e2a408eec3883c24f3c3",
"sha256": "f70fff1f42f184e9c607ae011645c7fa20be7bf839d0ebaba4198278fdd96570"
},
"downloads": -1,
"filename": "sapysol_jupiter_dao-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "53ea00ac80a7e2a408eec3883c24f3c3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 67095,
"upload_time": "2024-04-18T21:21:20",
"upload_time_iso_8601": "2024-04-18T21:21:20.445442Z",
"url": "https://files.pythonhosted.org/packages/10/2a/5e4d0e969c5eef039a701470a8667007ca5ca668f4a857bc62a3d259a8f9/sapysol_jupiter_dao-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "302fd823abcbbb509e79c2f6c9772dc8abfe8f2175698507c80ac87b6ef83cb0",
"md5": "df13da06232f1970642d879868ee36ba",
"sha256": "ce709b5f3e1125b7776872a88dfb751d0189cfaa24cfe9d5cb0ddec3f6d1e861"
},
"downloads": -1,
"filename": "sapysol_jupiter_dao-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "df13da06232f1970642d879868ee36ba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 38258,
"upload_time": "2024-04-18T21:21:22",
"upload_time_iso_8601": "2024-04-18T21:21:22.111368Z",
"url": "https://files.pythonhosted.org/packages/30/2f/d823abcbbb509e79c2f6c9772dc8abfe8f2175698507c80ac87b6ef83cb0/sapysol_jupiter_dao-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-18 21:21:22",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "sapysol-jupiter-dao"
}