-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
273 additions
and
148 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
pragma solidity ^0.4.23; | ||
|
||
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); | ||
} | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
pragma solidity ^0.4.24; | ||
|
||
/** | ||
* @title Interface of ERC777 standard | ||
* @dev ref. https://eips.ethereum.org/EIPS/eip-777 | ||
*/ | ||
|
||
interface ERC777Token { | ||
function name() external view returns (string); | ||
function symbol() external view returns (string); | ||
function totalSupply() external view returns (uint256); | ||
function balanceOf(address owner) external view returns (uint256); | ||
function granularity() external view returns (uint256); | ||
|
||
function defaultOperators() external view returns (address[]); | ||
function authorizeOperator(address operator) public; | ||
function revokeOperator(address operator) public; | ||
function isOperatorFor(address operator, address tokenHolder) public view returns (bool); | ||
|
||
function send(address to, uint256 amount, bytes data) external; | ||
function operatorSend(address from, address to, uint256 amount, bytes data, bytes operatorData) external; | ||
|
||
function burn(uint256 amount, bytes data) public; | ||
function operatorBurn(address from, uint256 amount, bytes data, bytes operatorData) external; | ||
|
||
event Sent( | ||
address indexed operator, | ||
address indexed from, | ||
address indexed to, | ||
uint256 amount, | ||
bytes data, | ||
bytes operatorData | ||
); | ||
event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData); | ||
event Burned(address indexed operator, address indexed from, uint256 amount, bytes operatorData); | ||
event AuthorizedOperator(address indexed operator, address indexed tokenHolder); | ||
event RevokedOperator(address indexed operator, address indexed tokenHolder); | ||
} |
Oops, something went wrong.