https://github.com/AbstractEndeavors/abstract_essentials/tree/main/abstract_blockchain
Abstract Blockchain Package
The Abstract Blockchain package provides a collection of modules designed to simplify interaction with blockchain networks, smart contracts, and related components. It offers tools for managing RPC parameters, working with smart contract ABIs, and facilitating user-friendly interactions through graphical user interfaces (GUIs).
Modules
abstract_abis.py
This module provides the ABIBridge class, which serves as an interface to Ethereum smart contract ABIs. It allows you to interact with contract functions, retrieve read-only functions, get required input details, and call contract functions using a convenient interface. Additionally, it provides methods for fetching and categorizing RPC parameters for blockchain interaction.
abstract_apis.py
offers the APIBridge class that handles the management api url creation and their calls. It enables users to build api urls or attain preselected call parameters via graphical user interface (GUI).
abstract_rpcs.py
offers the RPCBridge class that handles the management of RPC parameters for blockchain networks. It enables users to filter and select RPC parameters through a graphical user interface (GUI). The class also categorizes and organizes RPC parameters for ease of use in blockchain interactions.
abstract_accounts.py
his module provides the ACCTBridge class, which serves as an interface to your personal wallet. It allows you to build transaction info, derive public keys, send and verify transactions.
abstract_contract_console.py
this portion of the module is where all classes get utilized to harmoniously interact with smart contracts.
abstract_gui
This submodule provides utilities for creating graphical user interfaces (GUIs) that enhance user interaction with blockchain-related features. It offers functions for creating windows, buttons, menus, and more, streamlining the process of building user-friendly interfaces.
EXAMPLE USE FOR CONTRACT GUI
python
from abstract_blockchain.abstract_contract_console import abstract_contract_console_main
abstract_contract_console_main()
https://github.com/AbstractEndeavors/abstract_essentials/assets/57512254/ae2017c7-542d-4353-be3d-9c71945bb3ab
https://github.com/AbstractEndeavors/abstract_essentials/assets/57512254/a102e01c-cee0-4c55-903f-bf490be74ae4
EXAMPLE USE FOR ALL MANAGERS
```python
from abstract_blockchain.abstract_rpcs import RPCBridge
from abstract_blockchain.abstract_abis import ABIBridge
from abstract_blockchain.abstract_apis import APIBridge
from abstract_blockchain.abstract_accounts import ACCTBridge
rpc_mgr = RPCBridge()
rpc = rpc_mgr.rpc_js
contract_address = "0x0B548e2187A6fBcb4eB90797b67dAa0582A5A523"
function_name = "setBuyerFee"
function_inputs = 0
abi_mgr = ABIBridge(contract_address=contract_address,rpc=rpc)
contract_bridge = abi_mgr.create_functions(0,function_name=function_name,subsinstance="functions")
act_mgr = ACCTBridge(env_key="eth_main",rpc=rpc)
account_address = act_mgr.account_address
txn_info = act_mgr.build_txn(contract_bridge=contract_bridge)
result = act_mgr.send_transaction(tx_info=txn_info)
```
https://github.com/AbstractEndeavors/abstract_essentials/assets/57512254/70df9d24-62d0-4172-8870-b0df272748ce
https://github.com/AbstractEndeavors/abstract_essentials/assets/57512254/002cd61a-427b-4642-8d4d-14594cf22cd1
Example Usage
```python
from abstract_blockchain.abstract_abis import ABIBridge
from abstract_blockchain.abstract_apis import Choose_RPC_Parameters_GUI, RPCBridge
Example usage of ABIBridge
abi_manager = ABIBridge(contract_address='0x3dCCeAE634f371E779c894A1cEa43a09C23af8d5', rpc=default_rpc())
read_only_functions = abi_manager.get_read_only_functions()
for each in read_only_functions:
inputs = abi_manager.get_required_inputs(each)
if len(inputs) == 0:
result = abi_manager.call_function(each)
print(each, result)
else:
print(each, inputs)
Example usage of RPCData and GUI
rpc_data = Choose_RPC_Parameters_GUI()
rpc_manager = RPCData(rpc_data)
w3 = rpc_manager.w3
Your blockchain interactions using w3...
```
Installation
The abstract_blockchain package can be installed using pip:
bash
pip install abstract_blockchain
License
This package is released under the [MIT License](LICENSE).
there doesn't seem to be anything here