Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use solana instead of client
  • Loading branch information
afalaleev committed Feb 21, 2022
commit 3611be8c9f3a88b547036e9324c7603b5a9ffaf0
4 changes: 2 additions & 2 deletions proxy/common_neon/estimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def evm_step_cost(signature_cnt):

@logged_group("neon.Proxy")
class GasEstimate:
def __init__(self, request, db, client, evm_step_count):
def __init__(self, request, db, solana, evm_step_count):
self.sender: bytes = bytes.fromhex(request.get('from', "0x%040x" % 0x0)[2:])
self.step_count = evm_step_count

Expand All @@ -46,7 +46,7 @@ def __init__(self, request, db, client, evm_step_count):
signed_trx = w3.eth.account.sign_transaction(unsigned_trx, eth_keys.PrivateKey(os.urandom(32)))
trx = EthTrx.fromString(signed_trx.rawTransaction)

self.tx_sender = NeonTxSender(db, client, trx, steps=evm_step_count)
self.tx_sender = NeonTxSender(db, solana, trx, steps=evm_step_count)

def iteration_info(self) -> Tuple[int, int]:
if self.tx_sender.steps_emulated > 0:
Expand Down
2 changes: 1 addition & 1 deletion proxy/plugin/solana_rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def eth_gasPrice(self):

def eth_estimateGas(self, param):
try:
calculator = GasEstimate(param, self._db, self._client, evm_step_count)
calculator = GasEstimate(param, self._db, self._solana, evm_step_count)
return calculator.estimate()

except EthereumError:
Expand Down