Perelyn-sama / yul_by_example

Code examples in Yul

Home Page:https://yul-by-example.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Write a simple Yul fallback function that increments a counter by 1 and sends 1 wei to the caller.

0xfps opened this issue · comments

commented

See here.

    fallback() external {
        ++count;
        (bool success, ) = payable(msg.sender).call{value: 1}("");
        require(success);
    }