Skip to content

Why is msg.sender equal to 0? #1345

@Subway2023

Description

@Subway2023

zksolc version: v1.5.10
description: solc + EVM will cause the transaction to revert, but zksolc +zkevm will not.

contract ErrorTrigger {
    function triggerError() public {
        require(msg.sender == address(0));
    }
}

node output

12:29:35  INFO ┌─────────────────────────┐
12:29:35  INFO │   TRANSACTION SUMMARY   │
12:29:35  INFO └─────────────────────────┘
12:29:35  INFO Transaction: SUCCESS
12:29:35  INFO Initiator: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
12:29:35  INFO Payer: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
12:29:35  INFO Gas - Limit: 309_928 | Used: 309_928 | Refunded: 0
12:29:35  INFO Use --show-gas-details flag or call config_setShowGasDetails to display more info
12:29:35  INFO 
12:29:35  INFO ==== Console logs: 
12:29:35  INFO 
12:29:35  INFO ==== 10 call traces.  Use --show-calls flag or call config_setShowCalls to display more info.
12:29:35  INFO 
12:29:35  INFO ==== 1 events
12:29:35  INFO L2 deployer                               
12:29:35  INFO   Topics:
12:29:35  INFO     0x290afdae231a3fc0bbae8b1af63698b0a1d79b21ad17df0342dfb952fe74f8e5
12:29:35  INFO     0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266
12:29:35  INFO     0x0100000dc893cde21ee0707a5efe1fb3456d495c29b9e4fe5377df410a5891fc
12:29:35  INFO     0x0000000000000000000000005dc759657022a3c2ae6cc419fc48d067df9b1f97
12:29:35  INFO   Data: EMPTY
12:29:35  INFO 
12:29:35  INFO Call: SUCCESS
12:29:35  INFO Output: "0x"
12:29:35  INFO === Console Logs: 
12:29:35  INFO === Call traces:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions