Skip to content

Instantly share code, notes, and snippets.

View amplicity's full-sized avatar

James Diecidue amplicity

View GitHub Profile
@amplicity
amplicity / contracts...4_HeavyMellow.sol
Created January 7, 2022 03:52
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.1+commit.df193b15.js&optimize=false&runs=200&gist=
// 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 {
@amplicity
amplicity / about-james.txt
Last active December 9, 2020 22:29
About James
___ ______ _ _ _
|_ | | _ (_) (_) | |
| | __ _ _ __ ___ ___ ___ | | | |_ ___ ___ _ __| |_ _ ___
| |/ _` | '_ ` _ \ / _ \/ __| | | | | |/ _ \/ __| |/ _` | | | |/ _ \
/\__/ / (_| | | | | | | __/\__ \ | |/ /| | __/ (__| | (_| | |_| | __/
\____/ \__,_|_| |_| |_|\___||___/ |___/ |_|\___|\___|_|\__,_|\__,_|\___|
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.
class Store{
constructor(){
this.store = new Map();
}
put(key, value, ttl){
ttl = Date.now() + ttl;
this.store.set(key, {value,ttl});
this._cleanOldKeys();
}