web3_multicall
Description
web3_multicall
Install
pip install web3_multicall
# or
pip3 install web3_multicall
Usage
from kw3 import KWeb3
from web3_multicall import Multicall
w3 = KWeb3('https://bsc-dataseed.binance.org/')
busd = w3.busd()
multicall = Multicall(w3.eth) # address is not needed, unless you are on an unsupported chain (check 'web3_multicall/models/enums/network.py')
multicall_result = multicall.aggregate([
busd.name_method(),
busd.symbol_method(),
busd.decimals_method(),
busd.total_supply_method(),
busd.balance_of_method('YOUR_ADDRESS')
])
multicall_result.jsonprint()
# Prints
#
# {
# "block_number": 7714239,
# "results": [
# {
# "contract_address": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",
# "function_name": "name",
# "inputs": [],
# "results": [
# "BUSD Token"
# ]
# },
# {
# "contract_address": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",
# "function_name": "symbol",
# "inputs": [],
# "results": [
# "BUSD"
# ]
# },
# {
# "contract_address": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",
# "function_name": "decimals",
# "inputs": [],
# "results": [
# 18
# ]
# },
# {
# "contract_address": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",
# "function_name": "totalSupply",
# "inputs": [],
# "results": [
# 4200999999996203280118545633
# ]
# },
# {
# "contract_address": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",
# "function_name": "balanceOf",
# "inputs": [
# {
# "name": "account",
# "value": "YOUR_ADDRESS",
# "solidity_type": "address"
# }
# ],
# "results": [
# 0
# ]
# }
# ]
# }
Dependencies
eth-abi, eth-utils, jsoncodable, kw3, web3, web3-wrapped-contract
Metadata
Release files for web3-multicall 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| web3_multicall-0.0.7.tar.gz | 6.4 kB | Without provenance | Details for web3_multicall-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| web3_multicall-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for web3_multicall-0.0.7-py3-none-any.whl |
Total release size: 15.2 kB
Release files / web3_multicall-0.0.7.tar.gz
| Download URL | web3_multicall-0.0.7.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ee823cd1fd25a84976a467a0b8b71103252e3f15d17b2147f55a28b0e025d17
|
|
BLAKE2b-256 checksum How to use checksums |
9990232af4ba5d4ce53b690844c14794611f6d5a28c30e3b99972908e581e311
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.11
|
Release files / web3_multicall-0.0.7-py3-none-any.whl
| Download URL | web3_multicall-0.0.7-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
818016a382a4adc761272c651ab65d7aa7ef30b87654ff4fad5d084c28b3a500
|
|
BLAKE2b-256 checksum How to use checksums |
8b1c485bbcd20fd0275cd8d6b2366f75fc811d6634a8bb1e3a87458017100507
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.11
|
Security for web3-multicall 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.