Skip to content

Instantly share code, notes, and snippets.

Last active Apr 21, 2021
What would you like to do?
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