You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
account: LocalAccount=Account.from_key(self.private_key)
# Get chain id of zkSync networkchain_id=self.web3.zksync.chain_id# Signer is used to generate signature of provided transactionsigner=PrivateKeyEthSigner(account, chain_id)
# Get nonce of ETH address on zkSync networknonce=self.web3.zksync.get_transaction_count(
account.address, ZkBlockParams.COMMITTED.value
)
# Get current gas price in Weigas_price=self.web3.zksync.gas_price# Create transactiontx_func_call=TxFunctionCall(
chain_id=chain_id,
nonce=nonce,
from_=account.address,
to=to_checksum_address(to_address),
value=self.web3.to_wei(amount, "ether"),
data=HexStr("0x8722b9f70000000000000000000000000000000000000000000000000000000000000001"),
gas_limit=10000000, # UNKNOWN AT THIS STATEgas_price=gas_price,
max_priority_fee_per_gas=100000000,
)
# ZkSync transaction gas estimationestimate_gas=self.web3.zksync.eth_estimate_gas(tx_func_call.tx)
print(f"Fee for transaction is: {estimate_gas*gas_price}")
# Convert transaction to EIP-712 formattx_712=tx_func_call.tx712(estimate_gas)
# Sign message & encode itsigned_message=signer.sign_typed_data(tx_712.to_eip712_struct())
# Encode signed messagemsg=tx_712.encode(signed_message)
# Transfer ETHtx_hash=self.web3.zksync.send_raw_transaction(msg)
print(f"Transaction hash is : {tx_hash.hex()}")
the error message is weird, i have enough eth in my wallet for gas use
The text was updated successfully, but these errors were encountered:
This is problem to the ZkSync network: eth_call was not fully compatible with common dev tools used in L1. Because of that errors like cannot estimate gas occurs. This bug is fixed and ZkSync nodes are patched on testnet, so this should no longer be an issue on testnet.
This is problem to the ZkSync network: eth_call was not fully compatible with common dev tools used in L1. Because of that errors like cannot estimate gas occurs. This bug is fixed and ZkSync nodes are patched on testnet, so this should no longer be an issue on testnet.
the error message is weird, i have enough eth in my wallet for gas use
The text was updated successfully, but these errors were encountered: