Skip to content

Commit

Permalink
update tokenURI
Browse files Browse the repository at this point in the history
  • Loading branch information
Wagalidoom committed Sep 1, 2023
1 parent ab01c27 commit caf2e96
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 6 additions & 2 deletions contracts/NumberRunnerClub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ import "@ensdomains/ens-contracts/contracts/registry/ENS.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@chainlink/contracts/src/v0.8/VRFV2WrapperConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

using Strings for uint256;


contract KingAuction is VRFV2WrapperConsumerBase, Ownable {
using ABDKMath64x64 for int128;

Expand Down Expand Up @@ -262,7 +266,7 @@ contract NumberRunnerClub is ERC721URIStorage, Ownable, ReentrancyGuard {
for (uint8 i = 0; i < _n; i++) {
uint256 newItemId = startId + 2 * i;
_mint(msg.sender, newItemId);
_setTokenURI(newItemId, string(abi.encodePacked("ipfs://QmPp5WG6DFfXM1sHshkA9sU6je8rWbjivrZjQmmGBXVEr7/NumberRunner#", newItemId, ".json")));
_setTokenURI(newItemId, string(abi.encodePacked("ipfs://QmUSL1sxdiSPMUL1s39qpjENXi6kQTmLY1icq9KVjYmc4N/NumberRunner", newItemId.toString(), ".json")));
pieceDetails[5].totalMinted++;
userColor[msg.sender] == 1 ? pieceDetails[5].blackMinted++ : pieceDetails[5].whiteMinted++;
totalMinted++;
Expand Down Expand Up @@ -316,7 +320,7 @@ contract NumberRunnerClub is ERC721URIStorage, Ownable, ReentrancyGuard {
}

_mint(msg.sender, newItemId);
_setTokenURI(newItemId, string(abi.encodePacked("ipfs://QmPp5WG6DFfXM1sHshkA9sU6je8rWbjivrZjQmmGBXVEr7/NumberRunner#", newItemId, ".json")));
_setTokenURI(newItemId, string(abi.encodePacked("ipfs://QmUSL1sxdiSPMUL1s39qpjENXi6kQTmLY1icq9KVjYmc4N/NumberRunner", newItemId.toString(), ".json")));
pieceDetails[_pieceType].totalMinted++;
userColor[msg.sender] == 1 ? pieceDetails[_pieceType].blackMinted++ : pieceDetails[_pieceType].whiteMinted++;
totalMinted++;
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"devDependencies": {
"@chainlink/contracts": "^0.5.1",
"@ensdomains/ens-contracts": "^0.0.21",
"@openzeppelin/contracts": "^4.9.1",
"@openzeppelin/contracts": "^4.9.3",
"truffle": "^5.8.4"
}
}

0 comments on commit caf2e96

Please sign in to comment.