This file contains 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
class Store{ | |
constructor(){ | |
this.store = new Map(); | |
} | |
put(key, value, ttl){ | |
ttl = Date.now() + ttl; | |
this.store.set(key, {value,ttl}); | |
this._cleanOldKeys(); | |
} |
This file contains 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
___ ______ _ _ _ | |
|_ | | _ (_) (_) | | | |
| | __ _ _ __ ___ ___ ___ | | | |_ ___ ___ _ __| |_ _ ___ | |
| |/ _` | '_ ` _ \ / _ \/ __| | | | | |/ _ \/ __| |/ _` | | | |/ _ \ | |
/\__/ / (_| | | | | | | __/\__ \ | |/ /| | __/ (__| | (_| | |_| | __/ | |
\____/ \__,_|_| |_| |_|\___||___/ |___/ |_|\___|\___|_|\__,_|\__,_|\___| | |
I'm a founder, artist, and software engineer who is passionate about furthering humanity through innovation, providing greater access to equality, and solving climate change. |
This file contains 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: MIT | |
pragma solidity ^0.8.1; | |
// i think the problem here is that the base uri will change the base uri for all tokens. | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract HeavyMellow is ERC721, Ownable { |