Created
September 30, 2019 07:49
-
-
Save jitinics/5e1f3aded50565b2dfed677de359f200 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.11+commit.c082d0b4.js&optimize=true&gist=
This file contains hidden or 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
pragma solidity ^0.5.0; | |
import "github.com/OpenZeppelin/zeppelin-solidity/contracts/access/roles/MinterRole.sol"; | |
import "github.com/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/ERC20.sol"; | |
contract CoinFactory is MinterRole, ERC20 { | |
function createCoin(uint _coinBought, address clientWalletAddress) public onlyMinter { | |
_mint(msg.sender, _coinBought); | |
_transfer(msg.sender, clientWalletAddress, _coinBought); | |
} | |
function destroyCoin(uint _coinSold) public { | |
_burn(msg.sender, _coinSold); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment