Skip to content

Commit

Permalink
delete returned id by purchaseExistingDomain
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandroscifoni committed Jan 5, 2024
1 parent 9f11f6a commit d890965
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions smart_contract/GethDomain.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;

import "../node_modules/@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol";
import "../node_modules/@openzeppelin/contracts/access/Ownable.sol";
import "../node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./node_modules/@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol";
import "./node_modules/@openzeppelin/contracts/access/Ownable.sol";
import "./node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract DomainMarketplace is ERC721Royalty {

Expand Down Expand Up @@ -65,7 +65,7 @@ contract DomainMarketplace is ERC721Royalty {
// }

// Funzione per acquistare un dominio ex novo
function purchaseNewDomain(bytes calldata domain, bytes calldata torOrIpfs, bool isTor) external returns (uint256 current){
function purchaseNewDomain(bytes calldata domain, bytes calldata torOrIpfs, bool isTor) external {
// Verifica che il dominio non sia già stato creato
// require(ownerOf(_domains[domain].id) == address(0), "Domain already created");
require(_domains[domain].resoldTimes == 0, "Domain already created");
Expand All @@ -80,10 +80,9 @@ contract DomainMarketplace is ERC721Royalty {
_setTokenRoyalty(nextId, msg.sender, feeNumerator);
_domains[domain] = Domain(false, 0, 0,dominiotor, isTor);
keys.push(domain);
_domains[domain].resoldTimes++;
uint256 idAssociated = nextId;
_domains[domain].resoldTimes++;
nextId++;
return idAssociated;


}

Expand Down

0 comments on commit d890965

Please sign in to comment.