Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/summa-tx/riemann-ether
ethereum rapid prototyping toolbox 🎈 🎈
https://github.com/summa-tx/riemann-ether
Last synced: 4 months ago
JSON representation
ethereum rapid prototyping toolbox 🎈 🎈
- Host: GitHub
- URL: https://github.com/summa-tx/riemann-ether
- Owner: summa-tx
- License: other
- Created: 2019-01-27T18:21:29.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T03:16:30.000Z (about 2 years ago)
- Last Synced: 2024-09-30T12:42:28.866Z (4 months ago)
- Language: Python
- Homepage:
- Size: 398 KB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE2.md
Awesome Lists containing this project
README
### riemann-ether
This is a simple library for building, signing, and reading logs from Ether
transactions quickly. It also includes geth and infura RPC clients.It is intended for quickly developing MVP applications, and may not be suitable
for production applications or use at scale.### Development
Clone and then run `pipenv install -d`
#### Basic Usage
```python
from ether import transactionsmy_tx = transactions.UnsignedEthTx(
to='0x' + '20' * 20,
value=10**18,
gas=21000,
gasPrice=15 * 1000000000, # 15 GWEI
nonce=0,
data=b'',
chainId=1)signed_tx = transactions.sign_transaction(my_tx, key=b'\x32' * 32)
hex_tx = transactions.serialize(signed_tx)
sender_address = transactions.recover_sender(signed_tx)
``````python
import json
from ether import calldataabi = json.loads(f'{SOME_ABI_DATA_HERE}')
tx_data = calldata.call('transfer', ['0x' + '20' * 20, 60000000], abi)
``````python
import json
from ether import eventsevent = {'data': '0xdeadbeef'} # event dict from api or wherever
abi = json.loads('SOME_ABI_DATA_HERE')decoded_event = events.decode_event(event, abi)
``````python
from ether import ethrpcinfura_client = ethrpc.get_client('ropsten', infura_key=f'{INFURA_KEY}')
infura_https = ethrpc.get_client(
'ropsten',
infura_key=f'{INFURA_KEY}',
force_https=True)
node_client = ethrpc.get_client('ropsten', uri=f'{URI}:{PORT}')async def do(client):
rpc_client =
```