bisect_scanner
Determine crypro accounts balance history using bisection algorithm
Usage
>>> from bisect_scanner import EtherScanner, EthereumERC20Scanner
>>> account = '0x790370ff5045bCeCc2161f0913302FCCC7Ee256d'
>>> ETHEREUM_W3_URL = '...' # url for an archive node web3 or a web3 client instance
>>> scanner = EtherScanner(w3=ETHEREUM_W3_URL)
>>> [*scanner.balance_history(account='0x790370ff5045bCeCc2161f0913302FCCC7Ee256d')]
[(0, 0.0),
(11503731, 0.005),
(12103372, 0.015),
(12107610, 0.009),
(12425773, 0.0)]
>>> scanner = EthereumERC20Scanner(w3=ETHEREUM_W3_URL,
contract_address='0x0258f474786ddfd37abce6df6bbb1dd5dfc4434a')
>>> [*scanner.balance_history(account='0x790370ff5045bCeCc2161f0913302FCCC7Ee256d')]
[(10939214, 0.0), (11503719, 200.0), (12107610, 0.0)]
Installing bisect_scanner
bisect_scanner is available on PyPI:
$ pip install bisect-scanner
Command line utility
$ python -m bisect_scanner --help
usage: python -m bisecect_scanner [-h] --account ACCOUNT
[--contract_address CONTRACT_ADDRESS]
[--scan_step SCAN_STEP]
[--precission PRECISSION]
[--interpolation_step INTERPOLATION_STEP]
[--start_block START_BLOCK]
[--end_block END_BLOCK] [--polygon]
[--ethereum] [--fake]
Outputs account balance history on stdout in the csv format,Example: python -m
bisect_scanner --account=0xCD6909C37CCEA877a5c8e9a3ffd69d9D9943409F
optional arguments:
-h, --help show this help message and exit
--account ACCOUNT address
--contract_address CONTRACT_ADDRESS
ERC20 contract address
--scan_step SCAN_STEP
scan step
--precission PRECISSION
precission
--interpolation_step INTERPOLATION_STEP
interpolation step
--start_block START_BLOCK
Start Block
--end_block END_BLOCK
End Block
--polygon Polygon (MATIC native Token)
--ethereum Ethereum (default)
--fake fake chain for testing purposes only
An Example
$ python -m bisect_scanner --account='0x790370ff5045bCeCc2161f0913302FCCC7Ee256d'
block,balance
0,0.0
11503731,0.005
12103372,0.015
12107610,0.009
12425773,0.0
Configuration
Configuration can be stored in ~/.config/bisect_scanner.ini file
Example of bisect_scanner.ini file
[node_urls]
W3_URL=archive_node_url_for_general_w3scanner
POLYGON_URL=argive_node_url_for_polygonscanner
ETHEREUM_URL=archive_node_url_for_etherscanner
Authors
bisect_scanner was written by Karel Novak.
Metadata
Release files for bisect-scanner 0.2.5
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 |
|---|---|---|---|---|
| bisect_scanner-0.2.5.tar.gz | 11.5 kB | Without provenance | Details for bisect_scanner-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bisect_scanner-0.2.5-py3-none-any.whl | Python 3 | none | any | Details for bisect_scanner-0.2.5-py3-none-any.whl |
Total release size: 23.9 kB
Release files / bisect_scanner-0.2.5.tar.gz
| Download URL | bisect_scanner-0.2.5.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1388487796d55f8f9db838f79d79c2ecdab38b787392525b8b4d8c3c271a817
|
|
BLAKE2b-256 checksum How to use checksums |
94e091bddcf897cd0cbf140dbd0619979e1bfd8fe63062ce79b12aabe1905bb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.9
|
Release files / bisect_scanner-0.2.5-py3-none-any.whl
| Download URL | bisect_scanner-0.2.5-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36a3bda0458960e036f1960c11c39ca6f1603055a26f4f44ddd5a8def8a39c59
|
|
BLAKE2b-256 checksum How to use checksums |
825b89470ea77f8f3e71275a9de1332ccdea6e3f18006da17a81925d90144b55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.9
|
Security for bisect-scanner 0.2.5
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.