ETH Price: $2,064.10 (-2.98%)

Contract Diff Checker

Contract Name:
Migrations

Contract Source Code:

File 1 of 1 : Migrations

// File: contracts/Migrations.sol

pragma solidity 0.5.0;

contract Migrations {
    address public owner;
    uint public last_completed_migration;

    constructor() public {
        owner = msg.sender;
    }

    modifier restricted() {
        if (msg.sender == owner) _;
    }

    function setCompleted(uint completed) public restricted {
        last_completed_migration = completed;
    }

    function upgrade(address new_address) public restricted {
        Migrations upgraded = Migrations(new_address);
        upgraded.setCompleted(last_completed_migration);
    }
}

Please enter a contract address above to load the contract details and source code.

Context size (optional):