This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Gigantic Lizards", | |
"symbol": "GLZ", | |
"description": "This is the Gigantic Lizards collection", | |
"image": "https://some-url", | |
"external_link": "https://some-url", | |
"contract_uri": "https://some-url", | |
"base_uri": "https://some-url" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.20; | |
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; | |
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | |
import {OperatorAllowlistEnforced} from "./OperatorAllowlistEnforced.sol"; | |
contract ClashOfCatsERC1155Upgradable is ERC1155Upgradeable, OperatorAllowlistEnforced { | |
function initialize() public initializer { | |
__ERC1155_init(""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.19; | |
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; | |
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | |
import {OperatorAllowlistEnforced} from "@imtbl/contracts/contracts/allowlist/OperatorAllowlistEnforced.sol"; | |
contract ClashOfCats1155 is ERC1155, Ownable, OperatorAllowlistEnforced { | |
constructor( | |
string memory baseTokenURI, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.20; | |
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; | |
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | |
import {OperatorAllowlistEnforced} from "./OperatorAllowlistEnforced.sol"; | |
contract ClashOfCats is ERC721Upgradeable, OperatorAllowlistEnforced { | |
function initialize() public initializer { | |
__ERC721_init("ClashOfCats", "CATs"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using "@imtbl/contracts": "2.2.7" - https://github.com/immutable/contracts/releases/tag/v2.2.7 | |
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.19; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | |
import {OperatorAllowlistEnforced} from "@imtbl/contracts/contracts/allowlist/OperatorAllowlistEnforced.sol"; | |
contract ClashOfCats is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function areThereDuplicates(...values) { | |
let counter = {}; | |
for(let i=0; i<values.length; i++) { | |
if (counter[values[i]] === undefined) { | |
counter[values[i]] += 1; | |
} else { | |
return true; | |
} | |
} | |
return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sameFrequency(num1, num2){ | |
const num1Str = num1.toString(); | |
const num2Str = num2.toString(); | |
if (num1Str.length !== num2Str.length) { | |
return false; | |
} | |
// {1: 1, 8: 1, 2: 1} | |
let numbers = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class YetAnotherStack<E> { | |
private List<? super E>[] elements; | |
private int size = 0; | |
private static final int DEFAULT_INITIAL_CAPACITY = 16; | |
public YetAnotherStack() { | |
elements = (List<? super E>[]) new Object[DEFAULT_INITIAL_CAPACITY]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AnotherStack<E> { | |
private Either<? super E, String>[] elements; | |
private int size = 0; | |
private static final int DEFAULT_INITIAL_CAPACITY = 16; | |
public AnotherStack() { | |
elements = (Either<? super E, String>[]) new Object[DEFAULT_INITIAL_CAPACITY]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Stack<E> { | |
private E[] elements; | |
private int size = 0; | |
private static final int DEFAULT_INITIAL_CAPACITY = 16; | |
public Stack() { | |
elements = (E[]) new Object[DEFAULT_INITIAL_CAPACITY]; | |
} |
NewerOlder