Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions contracts/ERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ contract ERC20 is IERC20 {
emit Transfer(from, address(0), amount);
}

function mint(address to, uint256 amount) external {
function mint(address to, uint256 amount) internal {
_mint(to, amount);
}

function burn(address from, uint256 amount) external {
function burn(address from, uint256 amount) internal{
_burn(from, amount);
}
}
5 changes: 3 additions & 2 deletions contracts/ERC721.sol
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ contract ERC721 is IERC721 {
}

function ownerOf(uint256 id) external view returns (address owner) {
owner = _ownerOf[id];
require(owner != address(0), "token doesn't exist");
owner = _ownerOf[id];

}

function balanceOf(address owner) external view returns (uint256) {
Expand Down Expand Up @@ -118,7 +119,7 @@ contract ERC721 is IERC721 {

function transferFrom(address from, address to, uint256 id) public {
require(from == _ownerOf[id], "from != owner");
require(to != address(0), "transfer to zero address");


require(_isApprovedOrOwner(from, msg.sender, id), "not authorized");

Expand Down