This repository has been archived by the owner on Apr 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
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
8 changed files
with
110 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
pragma solidity ^0.4.18; | ||
|
||
contract ERC820ImplementerInterface { | ||
|
||
bytes32 constant ERC820_ACCEPT_MAGIC = keccak256("ERC820_ACCEPT_MAGIC"); | ||
/// @notice Contracts that implement an interferce in behalf of another contract must return true | ||
/// @param addr Address that the contract woll implement the interface in behalf of | ||
/// @param interfaceHash keccak256 of the name of the interface | ||
/// @return true if the contract can implement the interface represented by | ||
/// @return ERC820_ACCEPT_MAGIC if the contract can implement the interface represented by | ||
/// `ìnterfaceHash` in behalf of `addr` | ||
function canImplementInterfaceForAddress(address addr, bytes32 interfaceHash) view public returns(bool); | ||
function canImplementInterfaceForAddress(address addr, bytes32 interfaceHash) view public returns(bytes32); | ||
} |
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
pragma solidity ^0.4.18; | ||
|
||
contract ExampleImplementer { | ||
function canImplementInterfaceForAddress(address addr, bytes32 interfaceHash) view public returns(bool) { | ||
return true; | ||
import "./ERC820ImplementerInterface.sol"; | ||
|
||
|
||
contract ExampleImplementer is ERC820ImplementerInterface { | ||
function canImplementInterfaceForAddress(address addr, bytes32 interfaceHash) view public returns(bytes32) { | ||
return ERC820_ACCEPT_MAGIC; | ||
} | ||
} |
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
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