-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EIP-1594/1644/1643/1410 implementation (#524)
* EIP-1594/1644/1643 implementation * small fix * addition on delegate * minor fix * rename the verifyTransfer * accessing storage * fixed mapping storage read * minor fix * test fixes * fix to work with dev-3.0.0 * test fixes after merge * re-arrangement * improved balanceOfPartition * change the function name * change function name and return address as asc * fix tests
- Loading branch information
1 parent
28fdd92
commit 957b9e3
Showing
101 changed files
with
2,564 additions
and
1,037 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
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,28 @@ | ||
pragma solidity ^0.5.0; | ||
|
||
/** | ||
* @title Standard Interface of ERC1594 | ||
*/ | ||
interface IERC1594 { | ||
|
||
// Transfers | ||
function transferWithData(address _to, uint256 _value, bytes calldata _data) external; | ||
function transferFromWithData(address _from, address _to, uint256 _value, bytes calldata _data) external; | ||
|
||
// Token Issuance | ||
function isIssuable() external view returns (bool); | ||
function issue(address _tokenHolder, uint256 _value, bytes calldata _data) external; | ||
|
||
// Token Redemption | ||
function redeem(uint256 _value, bytes calldata _data) external; | ||
function redeemFrom(address _tokenHolder, uint256 _value, bytes calldata _data) external; | ||
|
||
// Transfer Validity | ||
function canTransfer(address _to, uint256 _value, bytes calldata _data) external view returns (bool, byte, bytes32); | ||
function canTransferFrom(address _from, address _to, uint256 _value, bytes calldata _data) external view returns (bool, byte, bytes32); | ||
|
||
// Issuance / Redemption Events | ||
event Issued(address indexed _operator, address indexed _to, uint256 _value, bytes _data); | ||
event Redeemed(address indexed _operator, address indexed _from, uint256 _value, bytes _data); | ||
|
||
} |
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,18 @@ | ||
pragma solidity ^0.5.0; | ||
|
||
// @title IERC1643 Document Management (part of the ERC1400 Security Token Standards) | ||
/// @dev See https://github.com/SecurityTokenStandard/EIP-Spec | ||
|
||
interface IERC1643 { | ||
|
||
// Document Management | ||
//function getDocument(bytes32 _name) external view returns (string memory, bytes32, uint256); | ||
function setDocument(bytes32 _name, string calldata _uri, bytes32 _documentHash) external; | ||
function removeDocument(bytes32 _name) external; | ||
//function getAllDocuments() external view returns (bytes32[] memory); | ||
|
||
// Document Events | ||
event DocumentRemoved(bytes32 indexed _name, string _uri, bytes32 _documentHash); | ||
event DocumentUpdated(bytes32 indexed _name, string _uri, bytes32 _documentHash); | ||
|
||
} |
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,28 @@ | ||
pragma solidity ^0.5.0; | ||
|
||
interface IERC1644 { | ||
|
||
// Controller Operation | ||
function isControllable() external view returns (bool); | ||
function controllerTransfer(address _from, address _to, uint256 _value, bytes calldata _data, bytes calldata _operatorData) external; | ||
function controllerRedeem(address _tokenHolder, uint256 _value, bytes calldata _data, bytes calldata _operatorData) external; | ||
|
||
// Controller Events | ||
event ControllerTransfer( | ||
address _controller, | ||
address indexed _from, | ||
address indexed _to, | ||
uint256 _value, | ||
bytes _data, | ||
bytes _operatorData | ||
); | ||
|
||
event ControllerRedemption( | ||
address _controller, | ||
address indexed _tokenHolder, | ||
uint256 _value, | ||
bytes _data, | ||
bytes _operatorData | ||
); | ||
|
||
} |
Oops, something went wrong.