zkSync-Community-Hub / zksync-developers

Project for Discussions with the ZKsync Community.
369 stars 233 forks source link

### Environment #543

Closed danielCalbonero12345 closed 5 months ago

danielCalbonero12345 commented 5 months ago

Environment

Mainnet

Provide a brief description of the functionality you're trying to implement and the issue you are running into.

Hi i am trying to run test transfer function.

contract TestMWC {
    function testTransfer(
        address to
    ) external payable {
        require(msg.value > 0, "fee required");

        (bool success, ) = payable(to).call{value: msg.value}("");
        require(success, "fee failed.");
    }
}

and this error is coming


 Error: processing response error (body="{\"jsonrpc\":\"2.0\",\"error\":{\"code\":3,\"message\":\"failed to validate the transaction. reason: Validation revert: Account validation error: Not enough gas for transaction validation```
 it only runs when i give 400000 gasLimit which is huge for a transfer function ,FYI i have 0.02 ETH balance

### Repo Link (Optional)

_No response_

### Additional Details

_No response_

_Originally posted by @ktarun1419 in https://github.com/zkSync-Community-Hub/zksync-developers/discussions/541_
bxpana commented 5 months ago

This seems to be a copy of https://github.com/zkSync-Community-Hub/zksync-developers/discussions/541

You can follow the conversation happening there

bydemir1 commented 5 months ago

good jobs