Skip to content

Commit

Permalink
add contract
Browse files Browse the repository at this point in the history
  • Loading branch information
diewland committed Dec 27, 2023
1 parent 20e7284 commit 085947c
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions contracts/KilomilesWorld.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

contract KilomilesWorld is ERC721A, Ownable {

// config
constructor() ERC721A("KilomilesWorld", "KMW") {
_mint(MASTER_WALLET, MAX_SUPPLY);
}
uint256 public MAX_SUPPLY = 1_000;
uint256 public START_ID = 1;
address private MASTER_WALLET = 0x434740344349DDA8BA3ac0a945E6e7b7A0E5e1b4;
string public baseURI = "https://jigsaw-fam.github.io/kilomiles-world/json/";

// start token id
function _startTokenId() internal view virtual override returns (uint256) {
return START_ID;
}

// metadata
function setBaseURI(string calldata _newBaseURI) external onlyOwner {
baseURI = _newBaseURI;
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
return string.concat(baseURI, Strings.toString(tokenId), ".json");
}

// transfer ownership
function masterTransfer() external onlyOwner {
transferOwnership(MASTER_WALLET);
}

}

0 comments on commit 085947c

Please sign in to comment.