eth¶
Eth related features
-
class
aioethereum.management.eth.
EthMixin
¶ Bases:
object
-
coroutine
eth_accounts
()¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_accounts
Returns: accounts Return type: list
-
coroutine
eth_blockNumber
()¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_blocknumber
Returns: bnumber Return type: int
-
coroutine
eth_call
(from_, to=None, gas=None, gas_price=None, value=None, data=None, block='latest')¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_call
Parameters: - from (str) – From account address
- to (str) – To account address (optional)
- gas (int) – Gas amount for current transaction (optional)
- gas_price (int) – Gas price for current transaction (optional)
- value (int) – Amount of ether to send (optional)
- data (hex) – Additional data for transaction (optional)
- block (int or BLOCK_TAGS) – Block tag or number (optional)
Return type: str
-
coroutine
eth_coinbase
()¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_coinbase
Returns: address Return type: str
-
coroutine
eth_compileLLL
(code)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_compilelll
DEPRECATED
-
coroutine
eth_compileSerpent
(code)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_compileserpent
DEPRECATED
-
coroutine
eth_compileSolidity
(code)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_compilesolidity
DEPRECATED
-
coroutine
eth_estimateGas
(from_, to=None, gas=None, gas_price=None, value=None, data=None)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_estimategas
Parameters: - from (str) – From account address
- to (str) – To account address (optional)
- gas (int) – Gas amount for current transaction (optional)
- gas_price (int) – Gas price for current transaction (optional)
- value (int) – Amount of ether to send (optional)
- data (hex) – Additional data for transaction (optional)
Returns: gas amount
Return type: int
-
coroutine
eth_gasPrice
()¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gasprice
Returns: wei Return type: int
-
coroutine
eth_getBalance
(address, block='latest')¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getbalance
Parameters: - address (str) – Account address
- block (int or BLOCK_TAGS) – Block tag or number (optional)
Returns: wei
Return type: int
-
coroutine
eth_getBlockByHash
(bhash, tx_objects=True)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblockbyhash
Parameters: - bhash (str) – Block hash
- tx_objects (bool) – Return txs full object (optional)
Returns: block
Return type: dict or None
-
coroutine
eth_getBlockByNumber
(block='latest', tx_objects=True)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblockbynumber
Parameters: - block (int or BLOCK_TAGS) – Block tag or number (optional)
- tx_objects (bool) – Return txs full object (optional)
Returns: block
Return type: dict or None
-
coroutine
eth_getBlockTransactionCountByHash
(bhash)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblocktransactioncountbyhash
Parameters: bhash (str) – Block hash Returns: count Return type: int or None
-
coroutine
eth_getBlockTransactionCountByNumber
(block='latest')¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getblocktransactioncountbynumber
Parameters: block (int or BLOCK_TAGS) – Block tag or number (optional) Returns: count Return type: int
-
coroutine
eth_getCode
(address, block='latest')¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getcode
Parameters: - address (str) – Address of contract
- block (int or BLOCK_TAGS) – Block tag or number (optional)
Returns: code
Return type: str
-
coroutine
eth_getCompilers
()¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getcompilers
DEPRECATED
-
coroutine
eth_getFilterChanges
(filter_id)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterchanges
Parameters: filter_id (str) – Id of created filter Returns: logs Return type: list
-
coroutine
eth_getFilterLogs
(filter_id)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getfilterlogs
Parameters: filter_id (str) – Id of created filter Returns: logs Return type: list
-
coroutine
eth_getLogs
(from_block='latest', to_block='latest', address=None, topics=None)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs
Parameters: - from_block (int or BLOCK_TAGS) – Block tag or number (optional)
- to_block (int or BLOCK_TAGS) – Block tag or number (optional)
- address (str) – Contract address (optional)
- topics (list) – Topics (optional)
Returns: logs
Return type: list
-
coroutine
eth_getStorageAt
(address, position=0, block='latest')¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getstorageat
Parameters: - address (str) – Storage address
- position (int) – Position in storage (optional)
- block (int or BLOCK_TAGS) – Block tag or number (optional)
Return type: int
-
coroutine
eth_getTransactionByBlockHashAndIndex
(bhash, index=0)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionbyblockhashandindex
Parameters: - bhash (str) – Block hash
- index (int) – Index position (optional)
-
coroutine
eth_getTransactionByBlockNumberAndIndex
(block='latest', index=0)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionbyblocknumberandindex
Parameters: - block (int or BLOCK_TAGS) – Block tag or number (optional)
- index (int) – Index position (optional)
Returns: transaction
Return type: dict or None
-
coroutine
eth_getTransactionByHash
(txhash)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionbyhash
Parameters: txhash (str) – Transaction hash Returns: transaction Return type: dict or None
-
coroutine
eth_getTransactionCount
(address, block='latest')¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactioncount
Parameters: - address (str) – Account address
- block (int or BLOCK_TAGS) – Block tag or number (optional)
Returns: count
Return type: int
-
coroutine
eth_getTransactionReceipt
(txhash)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionreceipt
Parameters: txhash (str) – Transaction hash Returns: transaction Return type: dict or None
-
coroutine
eth_getUncleByBlockHashAndIndex
(bhash, index=0)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getunclebyblockhashandindex
Parameters: - bhash (str) – Block hash
- index (int) – Index position (optional)
Returns: block
Return type: dict or None
-
coroutine
eth_getUncleByBlockNumberAndIndex
(block='latest', index=0)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getunclebyblocknumberandindex
Parameters: - block (int or BLOCK_TAGS) – Block tag or number (optional)
- index (int) – Index position (optional)
Returns: block
Return type: dict or None
-
coroutine
eth_getUncleCountByBlockHash
(bhash)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getunclecountbyblockhash
Parameters: bhash (str) – Block hash Returns: count Return type: int or None
-
coroutine
eth_getUncleCountByBlockNumber
(block='latest')¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getunclecountbyblocknumber
Parameters: block (int or BLOCK_TAGS) – Block tag or number (optional) Returns: count Return type: int
-
coroutine
eth_getWork
()¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getwork
Returns: work Return type: list
-
coroutine
eth_hashrate
()¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_hashrate
Returns: hashrate Return type: int
-
coroutine
eth_mining
()¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_mining
Return type: bool
-
coroutine
eth_newBlockFilter
()¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newblockfilter
Returns: filter_id Return type: str
-
coroutine
eth_newFilter
(from_block='latest', to_block='latest', address=None, topics=None)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newfilter
Parameters: - from_block (int or BLOCK_TAGS) – Block tag or number (optional)
- to_block (int or BLOCK_TAGS) – Block tag or number (optional)
- address (str) – Contract address (optional)
- topics (list) – Topics (optional)
Returns: filter_id
Return type: str
-
coroutine
eth_newPendingTransactionFilter
()¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_newpendingtransactionfilter
Returns: filter_id Return type: str
-
coroutine
eth_protocolVersion
()¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_protocolversion
Return type: int
-
coroutine
eth_sendRawTransaction
(data)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendrawtransaction
Parameters: data (str) – Signed transaction data Returns: txhash Return type: str
-
coroutine
eth_sendTransaction
(from_, to=None, gas=None, gas_price=None, value=None, data=None, nonce=None)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sendtransaction
Parameters: - from (str) – From account address
- to (str) – To account address (optional)
- gas (int) – Gas amount for current transaction (optional)
- gas_price (int) – Gas price for current transaction (optional)
- value (int) – Amount of ether to send (optional)
- data (hex) – Additional data for transaction (optional)
- nonce (int) – Unique nonce for transaction (optional)
Returns: txhash
Return type: str
-
coroutine
eth_sign
(address, data)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign
Parameters: - address (str) – Account address
- data (str) – Message to sign
Returns: signature
Return type: str
-
coroutine
eth_submitHashrate
(hashrate, id_)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_submithashrate
Parameters: - hashrate (str) – Hash rate
- id (str) – Random hex
Returns: success
Return type: bool
-
coroutine
eth_submitWork
(nonce, header, mix_digest)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_submitwork
Parameters: - nonce (int) – Nonce of work
- header (str) – Pow-hash header
- mix_digest (str) – Mix digest
Returns: success
Return type: bool
-
coroutine
eth_syncing
()¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_syncing
Returns: sync status or false Return type: dict or bool
-
coroutine
eth_uninstallFilter
(filter_id)¶ https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_uninstallfilter
Parameters: filter_id (str) – Id of created filter Returns: success Return type: bool
-
coroutine