many-abis


Namemany-abis JSON
Version 0.1.8 PyPI version JSON
download
home_pagehttps://github.com/ackness/many_abis
SummaryA simple way to get different DEXs abis for block chains.
upload_time2023-08-01 04:09:00
maintainer
docs_urlNone
authorYong
requires_python>=3.8
licenseMIT
keywords abi dex block chain bsc eth matic heco kcc pancakeswap mdex quickswap uniswap koffeeswap
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Many Abis

![Version](https://img.shields.io/badge/many--abis-v0.1.8-green)
![Pypi](https://img.shields.io/pypi/dm/many-abis)

![GitHub Org's stars](https://img.shields.io/github/stars/ackness/many_abis?style=social)
![GitHub forks](https://img.shields.io/github/forks/ackness/many_abis?style=social)

---

Get different DEX abis easily for blockchain developers.

---

Now we support dex:

---

- arbitrum:
  - [1] [SushiSwap](https://app.sushi.com/en/swap)
- avalanche:
  - [1] [traderjoexyz](https://traderjoexyz.com/#/home)
- bsc:
  - [1] [ApeSwap Finance](https://app.apeswap.finance/swap)
  - [2] [BiSwap](https://exchange.biswap.org/#/swap)
  - [3] [MDEX (BSC)](https://bsc.mdex.co/#/swap/)
  - [4] [PancakeSwap v2](https://pancakeswap.finance/swap)
  - [5] [PancakeSwap v3](https://pancakeswap.finance/swap)
  - [6] [Uniswap](https://app.uniswap.org/#/swap)
- bsc-test:
  - [1] [PancakeSwap v2 (TEST)]()
  - [2] [PancakeSwap v3 (TEST)](https://pancakeswap.finance/swap?chain:bscTestnet)
- cronos:
  - [1] [Mad Meerkat Finance](https://mm.finance/swap)
- eth:
  - [1] [Uniswap V2](https://app.uniswap.org/)
  - [2] [Uniswap V3](https://app.uniswap.org/)
- fantom:
  - [1] [SpiritSwap](https://www.spiritswap.finance/)
  - [2] [SpookySwap](https://spookyswap.finance/)
- heco:
  - [1] [MDEX (HECO)](https://ht.mdex.co/#/swap/)
- kcc:
  - [1] [KoffeeSwap](https://koffeeswap.exchange/)
- moonriver:
  - [1] [Solarbeam](https://app.solarbeam.io/exchange/swap)
- okx:
  - [1] [CherrySwap](https://www.cherryswap.net/)
- polygon:
  - [1] [QuickSwap](https://quickswap.exchange/)
- optimism:
  - [1] [Uniswap V3](https://app.uniswap.org/#/swap)
  - [2] [Velodrome V1](https://app.velodrome.finance/swap)

---

## Installation

- Download

```bash
pip install many-abis

# pypi
pip install -i https://pypi.org/simple many-abis

# update
pip install -U many-abis
# or
pip install -U -i https://pypi.org/simple many-abis
```

## Usage

```python
import many_abis as ma

# ======================================================================
# get all abi names
print(ma.ALL_ABIS_NAME)

# get all abis
print(ma.ABIS)

# you can access ABI by dot name
print(ma.ABIS.ERC20)


# ======================================================================
# get abi from address using etherscan api
ma.get_abi_from_address(
    "0x0841BD0B734E4F5853f0dD8d7Ea041c241fb0Da6",
    "YOUR API KEY",
    ma.CHAIN_CONTRACT_API.BSC
)

# ======================================================================
# chains
chains = ma.all_chains()
print(chains)
# ['arbitrum', 'avalanche', 'bsc', 'bsc-test', 'cronos', 'eth', 'fantom', 'heco', 'kcc', 'moonriver', 'okx', 'polygon', 'optimism']

# different methods to get chain
bsc = ma.get_chain_by_id(chain_id=56)
bsc = ma.get_chain_by_name(name="bsc")
bsc = ma.get_chain(name="bsc")
bsc = ma.get_chain(chain_id=56)
bsc = ma.chain(name="bsc")
bsc = ma.chain(chain_id=56)
print(bsc)

# use ['key'] or dot key name to access chain info
print(bsc['chain_id'])
# 56
print(bsc.name)
# Binance Smart Chain Mainnet
print(bsc.dex.pancake_v2.router_address)
# 0x10ED43C718714eb63d5aA57B78B54704E256024E

# to get some items from chain
eth_weth = ma.get('eth', 'weth')
print(eth_weth)
# {'address': '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 'name': 'Wrapped ETH', 'symbol': 'WETH'}

ds = ma.get('bsc', 'dex', 'pancake_v2')
print(ds)
# {'factory_address': '0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73', 'name': 'PancakeSwap v2', 'router_address': '0x10ED43C718714eb63d5aA57B78B54704E256024E', 'website': 'https://pancakeswap.finance/swap'}

# print all dex
ma.print_all_dex()

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ackness/many_abis",
    "name": "many-abis",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "abi,dex,block chain,bsc,eth,matic,heco,kcc,pancakeswap,mdex,quickswap,uniswap,koffeeswap",
    "author": "Yong",
    "author_email": "ackness8@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/fa/42/78edae3d0015349a9ba1a7f0c396bac0dee3658ee2f3dd91f12146999ed7/many_abis-0.1.8.tar.gz",
    "platform": null,
    "description": "# Many Abis\n\n![Version](https://img.shields.io/badge/many--abis-v0.1.8-green)\n![Pypi](https://img.shields.io/pypi/dm/many-abis)\n\n![GitHub Org's stars](https://img.shields.io/github/stars/ackness/many_abis?style=social)\n![GitHub forks](https://img.shields.io/github/forks/ackness/many_abis?style=social)\n\n---\n\nGet different DEX abis easily for blockchain developers.\n\n---\n\nNow we support dex:\n\n---\n\n- arbitrum:\n  - [1] [SushiSwap](https://app.sushi.com/en/swap)\n- avalanche:\n  - [1] [traderjoexyz](https://traderjoexyz.com/#/home)\n- bsc:\n  - [1] [ApeSwap Finance](https://app.apeswap.finance/swap)\n  - [2] [BiSwap](https://exchange.biswap.org/#/swap)\n  - [3] [MDEX (BSC)](https://bsc.mdex.co/#/swap/)\n  - [4] [PancakeSwap v2](https://pancakeswap.finance/swap)\n  - [5] [PancakeSwap v3](https://pancakeswap.finance/swap)\n  - [6] [Uniswap](https://app.uniswap.org/#/swap)\n- bsc-test:\n  - [1] [PancakeSwap v2 (TEST)]()\n  - [2] [PancakeSwap v3 (TEST)](https://pancakeswap.finance/swap?chain:bscTestnet)\n- cronos:\n  - [1] [Mad Meerkat Finance](https://mm.finance/swap)\n- eth:\n  - [1] [Uniswap V2](https://app.uniswap.org/)\n  - [2] [Uniswap V3](https://app.uniswap.org/)\n- fantom:\n  - [1] [SpiritSwap](https://www.spiritswap.finance/)\n  - [2] [SpookySwap](https://spookyswap.finance/)\n- heco:\n  - [1] [MDEX (HECO)](https://ht.mdex.co/#/swap/)\n- kcc:\n  - [1] [KoffeeSwap](https://koffeeswap.exchange/)\n- moonriver:\n  - [1] [Solarbeam](https://app.solarbeam.io/exchange/swap)\n- okx:\n  - [1] [CherrySwap](https://www.cherryswap.net/)\n- polygon:\n  - [1] [QuickSwap](https://quickswap.exchange/)\n- optimism:\n  - [1] [Uniswap V3](https://app.uniswap.org/#/swap)\n  - [2] [Velodrome V1](https://app.velodrome.finance/swap)\n\n---\n\n## Installation\n\n- Download\n\n```bash\npip install many-abis\n\n# pypi\npip install -i https://pypi.org/simple many-abis\n\n# update\npip install -U many-abis\n# or\npip install -U -i https://pypi.org/simple many-abis\n```\n\n## Usage\n\n```python\nimport many_abis as ma\n\n# ======================================================================\n# get all abi names\nprint(ma.ALL_ABIS_NAME)\n\n# get all abis\nprint(ma.ABIS)\n\n# you can access ABI by dot name\nprint(ma.ABIS.ERC20)\n\n\n# ======================================================================\n# get abi from address using etherscan api\nma.get_abi_from_address(\n    \"0x0841BD0B734E4F5853f0dD8d7Ea041c241fb0Da6\",\n    \"YOUR API KEY\",\n    ma.CHAIN_CONTRACT_API.BSC\n)\n\n# ======================================================================\n# chains\nchains = ma.all_chains()\nprint(chains)\n# ['arbitrum', 'avalanche', 'bsc', 'bsc-test', 'cronos', 'eth', 'fantom', 'heco', 'kcc', 'moonriver', 'okx', 'polygon', 'optimism']\n\n# different methods to get chain\nbsc = ma.get_chain_by_id(chain_id=56)\nbsc = ma.get_chain_by_name(name=\"bsc\")\nbsc = ma.get_chain(name=\"bsc\")\nbsc = ma.get_chain(chain_id=56)\nbsc = ma.chain(name=\"bsc\")\nbsc = ma.chain(chain_id=56)\nprint(bsc)\n\n# use ['key'] or dot key name to access chain info\nprint(bsc['chain_id'])\n# 56\nprint(bsc.name)\n# Binance Smart Chain Mainnet\nprint(bsc.dex.pancake_v2.router_address)\n# 0x10ED43C718714eb63d5aA57B78B54704E256024E\n\n# to get some items from chain\neth_weth = ma.get('eth', 'weth')\nprint(eth_weth)\n# {'address': '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 'name': 'Wrapped ETH', 'symbol': 'WETH'}\n\nds = ma.get('bsc', 'dex', 'pancake_v2')\nprint(ds)\n# {'factory_address': '0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73', 'name': 'PancakeSwap v2', 'router_address': '0x10ED43C718714eb63d5aA57B78B54704E256024E', 'website': 'https://pancakeswap.finance/swap'}\n\n# print all dex\nma.print_all_dex()\n\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A simple way to get different DEXs abis for block chains.",
    "version": "0.1.8",
    "project_urls": {
        "Homepage": "https://github.com/ackness/many_abis"
    },
    "split_keywords": [
        "abi",
        "dex",
        "block chain",
        "bsc",
        "eth",
        "matic",
        "heco",
        "kcc",
        "pancakeswap",
        "mdex",
        "quickswap",
        "uniswap",
        "koffeeswap"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "69f0ac1b82ebb1b31f94125723fde51b86a6a84833aa581e6b65bd5e00f7b35e",
                "md5": "be948ed3262dba261028618eeb79a905",
                "sha256": "e1bfe724f4d9fff7598086dea2fbcc403b26023e0b23a95d42ed8d24d4e4409e"
            },
            "downloads": -1,
            "filename": "many_abis-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "be948ed3262dba261028618eeb79a905",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 2529,
            "upload_time": "2023-08-01T04:08:59",
            "upload_time_iso_8601": "2023-08-01T04:08:59.084130Z",
            "url": "https://files.pythonhosted.org/packages/69/f0/ac1b82ebb1b31f94125723fde51b86a6a84833aa581e6b65bd5e00f7b35e/many_abis-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fa4278edae3d0015349a9ba1a7f0c396bac0dee3658ee2f3dd91f12146999ed7",
                "md5": "306447bb6408dc0631aa564969a1eb23",
                "sha256": "e9ce4f990c716333bfb67e36a7d67735382c52a35435e62f22438092b1fd1fcc"
            },
            "downloads": -1,
            "filename": "many_abis-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "306447bb6408dc0631aa564969a1eb23",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 2726,
            "upload_time": "2023-08-01T04:09:00",
            "upload_time_iso_8601": "2023-08-01T04:09:00.534908Z",
            "url": "https://files.pythonhosted.org/packages/fa/42/78edae3d0015349a9ba1a7f0c396bac0dee3658ee2f3dd91f12146999ed7/many_abis-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-01 04:09:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ackness",
    "github_project": "many_abis",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "many-abis"
}
        
Elapsed time: 0.12489s