This release is a pre-release and may not be stable for production use.
Introduction
This is a library used to use web3.py on conflux-bridge(?). This library hacks the signing machanism of web3.py.
Install
This library requires python >= 3.7
It is recommended to use this library in a virtual environment.
python -m venv venv
source ./venv/bin/activate
or
conda create -n venv python=3.7
conda activate venv
Then install in the virtual environment
pip install conflux-web3py-signer
How to use
Basic Usage
Import conflux_we3py_signer before import web3.
import conflux_web3py_signer
import web3
Use with Brownie
Firstly, you are supposed to install brownie and add conflux-bridge endpoints to brownie networks
pip install conflux_web3py_signer[brownie]
cfx-brownie networks add Conflux cfx-testnet-bridge host=https://cfx2ethtest.nftrainbow.cn chainid=1
Then use with command-line with target network.
cfx-brownie --network cfx-testnet-bridge
What is Done
Transaction Cast
When the modified construct_sign_and_send_raw_middleware is going to sign a transaction, it will convert an EIP-1559 transaction to conflux transaction following the rule:
- If
gasPriceis missing, usemaxFeePerGasas gas price. - Fill
epochHeightwithw3.eth.block_number, which correspondes toepoch_numberin conflux. - Estimate the transaction and fill
storageLimitfrom estimate result.
Address Cast
EOA account addresses are all converted to begin with 0x1 and is encoded in checksum format
Metadata
Release files for conflux-web3py-signer 1.0.0b3
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 |
|---|---|---|---|---|
| conflux-web3py-signer-1.0.0b3.tar.gz | 5.9 kB | Without provenance | Details for conflux-web3py-signer-1.0.0b3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| conflux_web3py_signer-1.0.0b3-py3-none-any.whl | Python 3 | none | any | Details for conflux_web3py_signer-1.0.0b3-py3-none-any.whl |
Total release size: 13.2 kB
Release files / conflux-web3py-signer-1.0.0b3.tar.gz
| Download URL | conflux-web3py-signer-1.0.0b3.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b62587c46222e53d2ea394953214ebfb618d653fc27f1c011c762aab30e29dcb
|
|
BLAKE2b-256 checksum How to use checksums |
19be903c226809c6863318432967e72b2b53f227d30456744b60a4a5d438565f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / conflux_web3py_signer-1.0.0b3-py3-none-any.whl
| Download URL | conflux_web3py_signer-1.0.0b3-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8da0a3b96eade2e9425f9435ed4618f482f4e6b4fb14384212a7e0e0997a2270
|
|
BLAKE2b-256 checksum How to use checksums |
d4d970c47692a1fd10b0531155f3a30bbe9244a7317d64f90c0213d9c41607fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for conflux-web3py-signer 1.0.0b3
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.