From 147f9f1e09b44da22d01cce77cf0c6b6ea271581 Mon Sep 17 00:00:00 2001 From: c9s Date: Sat, 20 Nov 2021 23:08:52 +0800 Subject: [PATCH] add constracts/Migrations --- sol/contracts/Migrations.sol | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 sol/contracts/Migrations.sol diff --git a/sol/contracts/Migrations.sol b/sol/contracts/Migrations.sol new file mode 100644 index 000000000..9aac9750f --- /dev/null +++ b/sol/contracts/Migrations.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.4.22 <0.9.0; + +contract Migrations { + address public owner = msg.sender; + uint public last_completed_migration; + + modifier restricted() { + require( + msg.sender == owner, + "This function is restricted to the contract's owner" + ); + _; + } + + function setCompleted(uint completed) public restricted { + last_completed_migration = completed; + } +}