forked from provable-things/ptokens-erc777-smart-contract
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ERC777): <- add custom function call when minting
- Loading branch information
Showing
7 changed files
with
67 additions
and
18 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,16 @@ | ||
pragma solidity ^0.6.2; | ||
|
||
/** | ||
* @title IPReceiver | ||
* @author pNetwork | ||
* | ||
* @dev Interface for contracts excpecting cross-chain data | ||
*/ | ||
interface IPReceiver { | ||
/* | ||
* @dev Function called when userData.length > 0 when minting the pToken | ||
* | ||
* @param userData | ||
*/ | ||
function receiveUserData(bytes calldata userData) external; | ||
} |
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,11 @@ | ||
pragma solidity ^0.6.2; | ||
|
||
import {IPReceiver} from "../interfaces/IPReceiver.sol"; | ||
|
||
contract PReceiver is IPReceiver { | ||
event UserData(bytes data); | ||
|
||
function receiveUserData(bytes calldata userData) external override { | ||
emit UserData(userData); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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