Skip to content

Commit

Permalink
Update KaliBerger.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
audsssy committed Oct 11, 2023
1 parent 52bcde1 commit 8293f80
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/KaliBerger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ contract KaliBerger is Storage {
setTimeAcquired(token, tokenId, block.timestamp);
setOwner(token, tokenId, address(this));
if (sale) setTokenPurchaseStatus(token, tokenId, sale);
if (bytes(detail).length > 0) setTokenDetail(token, tokenId, detail);
if (bytes(detail).length > 0) _setTokenDetail(token, tokenId, detail);
}
}

Expand Down Expand Up @@ -352,7 +352,11 @@ contract KaliBerger is Storage {
this.setAddress(keccak256(abi.encode(token, tokenId, ".creator")), creator);
}

function setTokenDetail(address token, uint256 tokenId, string calldata detail) internal {
function setTokenDetail(address token, uint256 tokenId, string calldata detail) external payable onlyOperator {
this.setString(keccak256(abi.encode(token, tokenId, ".detail")), detail);
}

function _setTokenDetail(address token, uint256 tokenId, string calldata detail) internal {
this.setString(keccak256(abi.encode(token, tokenId, ".detail")), detail);
}

Expand Down Expand Up @@ -411,7 +415,7 @@ contract KaliBerger is Storage {

function getTax(address token, uint256 tokenId) external view returns (uint256 _tax) {
_tax = this.getUint(keccak256(abi.encode(token, tokenId, ".tax")));
return (_tax == 0) ? _tax = 50 : _tax; // default tax rate is hardcoded to 50%
return (_tax == 0) ? _tax = 10 : _tax; // default tax rate is hardcoded to 10%
}

function getPrice(address token, uint256 tokenId) external view returns (uint256) {
Expand Down

0 comments on commit 8293f80

Please sign in to comment.