Comment on page
ERC20InterfaceUpgaradable.sol
/**
* @dev gAVAX ERC20 interface doesn't use balance info, catches it from ERC1155.
* mapping(address => uint256) private _balances;
**/
function _transfer(...) internal virtual {
...
unchecked {
_ERC1155.safeTransferFrom(sender,recipient,_id,amount,"0x00");
}
...
}
function pricePerShare() public view returns(uint){
return _ERC1155.pricePerShare(_id);
}
function balanceOf(address account) public view virtual override returns (uint256) {
return _ERC1155.balanceOf(account,_id);
}
/**
* @dev gAVAX ERC20 interface doesn't use totalSupply info, catches it from ERC1155.
* uint256 private _totalSupply;
**/
function totalSupply() public view virtual override returns (uint256) {
return _ERC1155.totalSupply(_id);
}
Note, these code pieces should NOT be used in production.
Last modified 9mo ago