Skip to content

Commit

Permalink
Clean up the package json and add some instructions to the README. Ch…
Browse files Browse the repository at this point in the history
…eck in package-lock.json
  • Loading branch information
moodysalem committed Nov 30, 2019
1 parent 026170e commit 2c79b9e
Show file tree
Hide file tree
Showing 9 changed files with 4,938 additions and 61 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
package-lock.json
build/
flattened/
.idea
10 changes: 10 additions & 0 deletions README.md
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.
32 changes: 17 additions & 15 deletions contracts/Migrations.sol
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);
}
}
1 change: 0 additions & 1 deletion ethpm.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"Nadir Akhtar <[email protected]>",
"Aparna Krishnan <[email protected]>",
"Zubin Koticha <[email protected]>"

],
"keywords": [
"ethereum",
Expand Down
Loading

0 comments on commit 2c79b9e

Please sign in to comment.