// SPDX-License-Identifier: LGPL-3.0-or-later pragma solidity ^0.7.1; contract Migrations { address public owner; uint public lastCompletedMigration; modifier restricted() { if (msg.sender == owner) _; } constructor() { owner = msg.sender; } function setCompleted(uint completed) public restricted { lastCompletedMigration = completed; } function upgrade(address newAddress) public restricted { Migrations upgraded = Migrations(newAddress); upgraded.setCompleted(lastCompletedMigration); } }