Skip to content

Instantly share code, notes, and snippets.

@Hebilicious
Last active April 21, 2021 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hebilicious/9820a921ce1b5c69bc16e27a06636bc9 to your computer and use it in GitHub Desktop.
Save Hebilicious/9820a921ce1b5c69bc16e27a06636bc9 to your computer and use it in GitHub Desktop.
function _transfer(
address from,
address to,
uint256 amount
) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
if(from != owner() && to != owner())
require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount.");
//...Rest of the logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment