Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pragma solidity ^0.5.2;
- contract ScrumMeetingsAuthor {
- // Author Scrum Meetings LSP
- address payable public _addresAuthor;
- string public Authorized = "As author of the rights of the of the Scrum Meetings LSP © I authorize the title of 'Facilitator' by me declared for commercial or personal use, use of the content for educational materials. In Global territory.";
- function Author() private justAuthor {
- _addresAuthor = msg.sender;
- }
- modifier justAuthor() {
- require (msg.sender == _addresAuthor);
- _;
- }
- //delete contract
- function deleteContract() public justAuthor {
- selfdestruct (_addresAuthor);
- }
- }
- contract ScrumMeetingsFacilitator is ScrumMeetingsAuthor {
- mapping(string => Licensed) _facilitators;
- struct Licensed {
- string name;
- string email;
- uint256 timestamp;
- }
- function checkLicensed(string memory _name, string memory _email) public view returns(bool) {
- return _facilitators[_email].timestamp !=0;
- }
- function registerFacilitators(string memory _name, string memory _email) public {
- require(!checkLicensed(_email, _name));
- Licensed memory licensed = Licensed ({
- name: _name,
- email: _email,
- timestamp: now
- });
- _facilitators[_name] = licensed;
- }
- function seeFacilitator(string memory _name, string memory _email) public view returns(uint256 timestamp, string memory name, string memory email){
- Licensed memory lice = _facilitators[_name];
- return(lice.timestamp, lice.name, lice.email);
- }
- //receive payments
- function() external payable {
- }
- function _sake() public justAuthor {
- _addresAuthor.transfer(address(this).balance);
- }
- //money reversal
- event moneyReversal(address payable, uint change);
- function set(uint sent) public payable Royalty(1.000 ether) justAuthor {
- uint licensed = sent;
- if (msg.value > 1.000) {
- uint change = msg.value - 1.000;
- msg.sender.transfer(change);
- emit moneyReversal(msg.sender, change);
- }
- }
- modifier Royalty(uint min) {
- require(msg.value >= min, "Insufficient Value");
- _;
- }
- }
Add Comment
Please, Sign In to add comment