Skip to content

Latest commit

 

History

History
239 lines (225 loc) · 8.38 KB

Mutex.md

File metadata and controls

239 lines (225 loc) · 8.38 KB

Mutex.sol

View Source: contracts/reentrancy/Mutex.sol

Mutex contract

Contract Members

Constants & Variables

uint256 public value;

Functions


incrementAndGetValue

function incrementAndGetValue() external nonpayable
returns(uint256)
Source Code
function incrementAndGetValue() external returns (uint256) {
        /*
         * increment value using unsafe math. This is safe because we are
         * pretty certain no one will ever increment the value 2^256 times
         * in a single transaction.
         */
        return ++value;
    }

Contracts