Skip to content

Commit

Permalink
added some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
AnastasiyaTarasova committed Nov 28, 2024
1 parent 2650b23 commit f0ff759
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/neon_rpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@ async def emulate_neon_call(
sol_account_dict=emul_sol_acct_dict,
slot=self._get_slot(block),
)


_LOG.info("emulate_neon_call, req = %+v", req)


resp: EmulNeonCallResp = await self._send_request("emulate", req, EmulNeonCallResp)
if check_result:
self._check_emulator_result(resp)
Expand Down
6 changes: 6 additions & 0 deletions proxy/rpc/np_call_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
from .server_abc import NeonProxyApi
from ..base.rpc_api import RpcEthTxRequest
from ..base.rpc_gas_limit_calculator import RpcNeonGasLimitCalculator
import logging

_LOG = logging.getLogger(__name__)

class _RpcEthAccountModel(BaseJsonRpcModel):
nonce: HexUIntField = Field(0)
Expand Down Expand Up @@ -109,14 +111,18 @@ async def eth_call(
) -> EthBinStrField:
_ = object_state
chain_id = self._get_tx_chain_id(ctx, tx)
_LOG.info("eth_call, chain_id = %d", chain_id)
block = await self.get_block_by_tag(block_tag)
_LOG.info("eth_call, block.slot = %d", block.slot)
evm_cfg = await self._get_evm_cfg()
resp = await self._core_api_client.emulate_neon_call(
evm_cfg,
tx.to_core_tx(chain_id),
check_result=True,
block=block,
)
_LOG.info("eth_call, resp.result = %d", resp.result)
_LOG.info("eth_call, resp.result = %d", resp.result)
return resp.result

@NeonProxyApi.method(name="eth_estimateGas")
Expand Down

0 comments on commit f0ff759

Please sign in to comment.