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
const fetch = require("node-fetch"); | |
async function getJson() { | |
return await fetch('https://mcot.aq1.co/api/sure.json') | |
.then(response => response.json()) | |
.then(data => { | |
let arr = []; | |
console.log(data) // Prints result from `response.json()` in getRequest | |
data.output.forEach(function(v, i) { | |
let title = v.title; |
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.7; | |
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; | |
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol"; | |
contract NftStaker { | |
IERC1155 public parentNFT; | |
struct Stake { |