pragma solidity ^0.5.17; import "./ERC20.sol"; import "./PortLibrary.sol"; //import "./StarSystemControls.sol"; contract rbitToken is ERC20 { using PortLibrary for PortLibrary.PortStorage; PortLibrary.PortStorage Ports; // when this contract runs for the first time. // It deposits 1000 tokens into the contract owner address constructor() public { _mint(msg.sender, 1000); } function claimPortRewards(uint256 id,address owner) public returns(bool) { // Idea is to get port owner's address and check whether it is empty. // As of now ports are not being traded so once claimed owner will always remain the same. owner = Ports.ports[id].owner; require(owner != address(0)); // if the condition satisfies then mint 100 tokens to his name _mint(owner,100); return true; } }
0.5.17