SOCI4L

Sandbox

solidity 0.8.24
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

contract Counter {
    uint256 public total;
    address public lastCaller;

    event Bumped(address indexed by, uint256 to);

    function bump(uint256 n) external {
        require(n > 0, "n must be positive");
        total += n;
        lastCaller = msg.sender;
        emit Bumped(msg.sender, total);
    }
}
Waiting for a contract. Start typing.

Contract storage

Nothing deployed yet. Run the code to put a contract on this chain.