tweaks
This commit is contained in:
parent
74ed3d2efb
commit
7c7e65d86a
10
GameData.sol
10
GameData.sol
|
|
@ -8,6 +8,8 @@ import "@openzeppelin/contracts/access/Ownable.sol";
|
||||||
|
|
||||||
contract GameData is ERC1155, Ownable, ERC1155Burnable {
|
contract GameData is ERC1155, Ownable, ERC1155Burnable {
|
||||||
|
|
||||||
|
string public name = "Sekret Game Launcher";
|
||||||
|
string public symbol = "SGL";
|
||||||
|
|
||||||
//------------------------------ ERC1155 COLLECTION-------------------------------
|
//------------------------------ ERC1155 COLLECTION-------------------------------
|
||||||
|
|
||||||
|
|
@ -47,6 +49,10 @@ contract GameData is ERC1155, Ownable, ERC1155Burnable {
|
||||||
return string(abi.encodePacked("http://linode.playpoolstudios.com/begula/nft_data/", Strings.toString(_tokenid), ".json"));
|
return string(abi.encodePacked("http://linode.playpoolstudios.com/begula/nft_data/", Strings.toString(_tokenid), ".json"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setCollectionName(string memory _name) public{
|
||||||
|
name= _name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------Game Management -------------------------------
|
//------------------------------Game Management -------------------------------
|
||||||
|
|
||||||
|
|
@ -86,7 +92,7 @@ contract GameData is ERC1155, Ownable, ERC1155Burnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
function MintUser(uint256 newUserId,address newUserAddress) public{
|
function MintUser(uint256 newUserId,address newUserAddress) public{
|
||||||
require(msg.sender == operator, "Only the operator can do this");
|
require(msg.sender == operator || msg.sender == owner(), "Only the operator can do this");
|
||||||
|
|
||||||
_mint(newUserAddress, newUserId, 1, "");
|
_mint(newUserAddress, newUserId, 1, "");
|
||||||
nextUserId++;
|
nextUserId++;
|
||||||
|
|
@ -104,7 +110,7 @@ contract GameData is ERC1155, Ownable, ERC1155Burnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
function startTournament(uint256 tournament_id) public{
|
function startTournament(uint256 tournament_id) public{
|
||||||
require(msg.sender == operator, "Only the operator can do this");
|
require(msg.sender == operator , "Only the operator can do this");
|
||||||
|
|
||||||
expiredTournaments.push(tournament_id);
|
expiredTournaments.push(tournament_id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user