Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
jbhv12 committed May 3, 2024
1 parent c09be0f commit e4aab9a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 111 deletions.
92 changes: 3 additions & 89 deletions contract/contracts/Flatten.sol
Original file line number Diff line number Diff line change
Expand Up @@ -213,58 +213,6 @@ interface IERC721 is IERC165 {
*/
function ownerOf(uint256 tokenId) external view returns (address owner);

/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
* a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
* {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
* a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;

/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;

/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
Expand Down Expand Up @@ -1290,36 +1238,6 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er
return _operatorApprovals[owner][operator];
}

/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(address from, address to, uint256 tokenId) public virtual {
if (to == address(0)) {
revert ERC721InvalidReceiver(address(0));
}
// Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists
// (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
address previousOwner = _update(to, tokenId, _msgSender());
if (previousOwner != from) {
revert ERC721IncorrectOwner(from, tokenId, previousOwner);
}
}

/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public {
safeTransferFrom(from, to, tokenId, "");
}

/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual {
transferFrom(from, to, tokenId);
_checkOnERC721Received(from, to, tokenId, data);
}

/**
* @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
*
Expand Down Expand Up @@ -1857,6 +1775,8 @@ abstract contract ReviewToken is
}

function referUser(address referred) public {
require(referred != _msgSender(), "You cannot refer yourself!");
// todo cant refer already existing user
require(
_reviewEligibleUsers[_msgSender()],
"You aren't eligible for referring someone, you must use some functionality first"
Expand Down Expand Up @@ -1933,13 +1853,7 @@ abstract contract ReviewToken is
_setTokenURI(tokenId, uri);
return tokenId;
}

// soulbound functionality

// function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) public override {}
// function safeTransferFrom(address from, address to, uint256 tokenId) public override {}
// function transferFrom(address from, address to, uint256 tokenId) public override {}


// overrdies for gelato relay

function _msgSender()
Expand Down
2 changes: 1 addition & 1 deletion contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jbhv12-web3-testimonials",
"version": "0.0.1",
"version": "0.0.2",
"description": "Smart contract for web3 testimonials!",
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit e4aab9a

Please sign in to comment.