Skip to content

Instantly share code, notes, and snippets.

@yhuag
Last active September 17, 2018 08:28
Show Gist options
  • Save yhuag/6cee2ee80d78ffdc129372920996d7da to your computer and use it in GitHub Desktop.
Save yhuag/6cee2ee80d78ffdc129372920996d7da to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.24;
import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
/* great reference: OpenZeppelin's SimpleToken contract */
contract FakeToken is ERC20 {
string public constant name = "FakeToken";
string public constant symbol = "FAK";
uint8 public constant decimals = 18;
uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals));
constructor() public { _mint(msg.sender, INITIAL_SUPPLY); }
/* This is where you do the TRICK */
function fakeTransfer(address _sender, address _receiver, uint256 _value) public {
emit Transfer(_sender, _receiver, _value);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment