Hello, I can’t verify my contract on etherscan, could you help me ?
Here is the error message I get:
Error! Unable to generate Contract ByteCode and ABI (General Exception, unable to get compiled [bytecode])
Here is my code:
pragma solidity ^0.5.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v2.x/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/docs-v2.x/contracts/token/ERC20/ERC20Detailed.sol";
/**
* @title TRUST
*/
contract TRT is ERC20, ERC20Detailed {
uint256 private _minimumSupply = 1000 * (10 ** 18);
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
constructor () public ERC20Detailed("TRUST", "TRT", 18) {
_mint(msg.sender, 17000 * (10 ** uint256(decimals())));
}
function transfer(address to, uint256 amount) public returns (bool) {
return super.transfer(to, _partialBurn(amount));
}
function transferFrom(address from, address to, uint256 amount) public returns (bool) {
return super.transferFrom(from, to, _partialBurn(amount));
}
function _partialBurn(uint256 amount) internal returns (uint256) {
uint256 burnAmount = _calculateBurnAmount(amount);
if (burnAmount > 0) {
_burn(msg.sender, burnAmount);
}
return amount.sub(burnAmount);
}
function _calculateBurnAmount(uint256 amount) internal view returns (uint256) {
uint256 burnAmount = 0;
// burn amount calculations
if (totalSupply() > _minimumSupply) {
burnAmount = amount.mul(25).div(1000);
uint256 availableBurn = totalSupply().sub(_minimumSupply);
if (burnAmount > availableBurn) {
burnAmount = availableBurn;
}
}
return burnAmount;
}
}
Here is the address of the contract:
0xadd42c3a88a347b7a7df7bb57a2a76ecb6ef39cd
Kind Regards.