Remove unused and deprecated Parity methods
This commit is contained in:
parent
be3823e2e0
commit
74c617f463
4 changed files with 3 additions and 16 deletions
|
|
@ -114,8 +114,7 @@ class TokenBase(MMGenObject): # ERC20
|
|||
from .pyethereum.transactions import Transaction
|
||||
|
||||
if chain_id is None:
|
||||
chain_id_method = ('parity_chainId','eth_chainId')['eth_chainId' in self.rpc.caps]
|
||||
chain_id = int(await self.rpc.call(chain_id_method),16)
|
||||
chain_id = int(await self.rpc.call('eth_chainId'),16)
|
||||
tx = Transaction(**tx_in).sign(key,chain_id)
|
||||
hex_tx = rlp.encode(tx).hex()
|
||||
coin_txid = CoinTxID(tx.hash.hex())
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ class EthereumMMGenTX:
|
|||
return ETHNonce(int(await self.rpc.call('parity_nextNonce','0x'+self.inputs[0].addr),16))
|
||||
|
||||
async def make_txobj(self): # called by create_raw()
|
||||
chain_id_method = ('parity_chainId','eth_chainId')['eth_chainId' in self.rpc.caps]
|
||||
self.txobj = {
|
||||
'from': self.inputs[0].addr,
|
||||
'to': self.outputs[0].addr if self.outputs else Str(''),
|
||||
|
|
@ -96,7 +95,7 @@ class EthereumMMGenTX:
|
|||
'gasPrice': self.fee_abs2rel(self.usr_fee,to_unit='eth'),
|
||||
'startGas': self.start_gas,
|
||||
'nonce': await self.get_nonce(),
|
||||
'chainId': Int(await self.rpc.call(chain_id_method),16),
|
||||
'chainId': Int(await self.rpc.call('eth_chainId'),16),
|
||||
'data': self.usr_contract_data,
|
||||
}
|
||||
|
||||
|
|
|
|||
11
mmgen/rpc.py
11
mmgen/rpc.py
|
|
@ -643,21 +643,10 @@ class EthereumRPCClient(RPCClient,metaclass=aInitMeta):
|
|||
'net_version',
|
||||
'parity_chain',
|
||||
'parity_chainId', # superseded by eth_chainId
|
||||
'parity_chainStatus',
|
||||
'parity_composeTransaction',
|
||||
'parity_gasCeilTarget',
|
||||
'parity_gasFloorTarget',
|
||||
'parity_getBlockHeaderByNumber',
|
||||
'parity_localTransactions',
|
||||
'parity_minGasPrice',
|
||||
'parity_mode',
|
||||
'parity_netPeers',
|
||||
'parity_nextNonce',
|
||||
'parity_nodeKind',
|
||||
'parity_nodeName',
|
||||
'parity_pendingTransactions',
|
||||
'parity_pendingTransactionsStats',
|
||||
'parity_versionInfo',
|
||||
)
|
||||
|
||||
class MoneroRPCClient(RPCClient):
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class init_test:
|
|||
async def eth(proto,backend):
|
||||
rpc = await rpc_init(proto,backend)
|
||||
do_msg(rpc)
|
||||
await rpc.call('parity_versionInfo',timeout=300)
|
||||
await rpc.call('eth_blockNumber',timeout=300)
|
||||
|
||||
def run_test(coin,auth):
|
||||
proto = init_proto(coin,network=('mainnet','regtest')[coin=='eth']) # FIXME CoinDaemon's network handling broken
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue