-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up the package json and add some instructions to the README. Ch…
…eck in package-lock.json
- Loading branch information
1 parent
026170e
commit 2c79b9e
Showing
9 changed files
with
4,938 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
node_modules | ||
package-lock.json | ||
build/ | ||
flattened/ | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
# OptionsProtocol | ||
|
||
Smart contracts for the Opyn.co options protocol. | ||
|
||
# Installing dependencies | ||
|
||
Run `npm install` to install all dependencies. | ||
|
||
# Testing | ||
|
||
Run `npm test` to execute the test suite. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
pragma solidity >=0.4.21 <0.6.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); | ||
} | ||
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
"Nadir Akhtar <[email protected]>", | ||
"Aparna Krishnan <[email protected]>", | ||
"Zubin Koticha <[email protected]>" | ||
|
||
], | ||
"keywords": [ | ||
"ethereum", | ||
|
Oops, something went wrong.