We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERC20.sol file's 'function _transfer ' is different from github file
in my 'ERC20.sol' _balances[sender] = _balances[sender].sub(amount);
but github _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
The text was updated successfully, but these errors were encountered:
Hi @skqksh,
The difference is that with the package you are using the latest release version which is 2.3 https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v2.3.0
Whilst on GitHub you are looking at the master branch. You should always use code from a release version.
2.3 version: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.3.0/contracts/token/ERC20/ERC20.sol#L156
master version: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol#L158
For questions it is best to ask in the Community Forum as anyone from the community can help. https://forum.openzeppelin.com/
Sorry, something went wrong.
thank you so much
This particular change was introduced in #1828 and is part of the 2.4 release.
This release has been in beta for a few months (longer than normal) but will be finally released next week.
No branches or pull requests
ERC20.sol file's 'function _transfer ' is different from github file
in my 'ERC20.sol'
_balances[sender] = _balances[sender].sub(amount);
but github
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
The text was updated successfully, but these errors were encountered: