[audit]#1 add decimals and name to lptoken

This commit is contained in:
mingda
2020-07-08 17:04:48 +08:00
parent 44d1f28606
commit 11eb3d7103
4 changed files with 34 additions and 5 deletions

View File

@@ -20,6 +20,9 @@ import {Ownable} from "../lib/Ownable.sol";
contract DODOLpToken is Ownable {
using SafeMath for uint256;
string public name;
uint8 public decimals;
uint256 public totalSupply;
mapping(address => uint256) internal balances;
mapping(address => mapping(address => uint256)) internal allowed;
@@ -36,6 +39,11 @@ contract DODOLpToken is Ownable {
// ============ Functions ============
constructor(string memory _name, uint8 _decimals) public {
name = _name;
decimals = _decimals;
}
/**
* @dev transfer token for a specified address
* @param to The address to transfer to.