Skip to content

Instantly share code, notes, and snippets.

View jjohnson5253's full-sized avatar
👽

Jake Johnson jjohnson5253

👽
View GitHub Profile
@jjohnson5253
jjohnson5253 / index.js
Created February 19, 2022 05:02
Mint NFT with node.js and ThirdWeb
/*
npm init -y
npm install @3rdweb/sdk ethers dotenv
npm install --save-dev typescript @types/node ts-node tslib
run:
node index.js
*/
const { ethers } = require("ethers");
@jjohnson5253
jjohnson5253 / Bloodlines.sol
Created September 27, 2022 17:45
These are the "adventure" contracts for minting a hero. The main file is HeroAdventure.sol. You must stake a spirit digidaigaku to start the quest.
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
struct Quest {
bool isActive;
uint32 questId;
uint64 startTimestamp;
uint32 arrayIndex;
}
@jjohnson5253
jjohnson5253 / AdventureERC721.sol
Created September 27, 2022 18:21
AdventureERC721 protocol used on the DigiDaigaku Hero NFT
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "./IQuestStaking.sol";
import "./AdventurePermissions.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
abstract contract AdventureERC721 is ERC721, AdventurePermissions, IQuestStaking {
uint256 public constant MAX_UINT32 = type(uint32).max;