pyBaseSwap
pyBaseSwap is a Python library designed to facilitate interaction with ERC-20 tokens on the Base L2 Ethereum blockchain. It provides an easy-to-use interface for managing token balances, allowances, and transactions, allowing developers to focus on building their applications without worrying about the complexities of blockchain interactions.
Warning
Warning: You will be charged a 1% fee on your swap volume during the initial phase. This fee is temporarily set higher to cover server costs and other expenses.
Supported DEXs
| DEX Name | Versions |
|---|---|
| SushiSwap | v2 & v3 |
| BaseSwap | v2 & v3 |
| PancakeSwap | v2 & v3 |
| AlienBase | v2 & v3 |
| SwapBased | v2 & v3 |
Documentation
Examples
Pypi Realese
Installation
You can install the package using pip:
pip install pyBaseSwap
Installing from Source
If you prefer to install pyBaseSwap from the source, follow these steps:
Clone the repository:
git clone https://github.com/BaseTools/pyBaseSwap
cd pyBaseSwap
python setup.py install
EXAMPLE USE
from pyBaseSwap import BaseSwap
BS = BaseSwap() # No Token Addresss Provided fallback to USDC
BS.changeToken(
"0x65e570b560027F493f2b1907e8e8e3B9546053bD" #Tyler Token
)
usdPrice = BS.getUSDPrice() # fetch usd price
print(usdPrice)
LICENSE
MIT License
Copyright (c) [2024] [BasedTools]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Metadata
Release files for pyBaseSwap 0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pybaseswap-0.14.tar.gz | 20.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyBaseSwap-0.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.3 kB
Release files / pybaseswap-0.14.tar.gz
| Download URL | pybaseswap-0.14.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
368f1dce7085cc1fa7bfd15f9bf276f60a7d0ed19b87a333161cfe69af26af56
|
|
BLAKE2b-256 checksum How to use checksums |
947cdefd828ed43d240d4ae0292fa37c61ba477120986b741ccd2fda84c8fb4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.18
|
Release files / pyBaseSwap-0.14-py3-none-any.whl
| Download URL | pyBaseSwap-0.14-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33043e6041c1376d5c18e9f9e83edac450200f684187e643cb15e7dffb6f111e
|
|
BLAKE2b-256 checksum How to use checksums |
d69d82b9be5228a8d8d8dd54c5e91c70c6de47616d817737b8758e929ed57752
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.18
|