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.18; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@api3/airnode-protocol/contracts/rrp/requesters/RrpRequesterV0.sol"; | |
contract RandomSurfaceReachT1 is ERC721URIStorage, Ownable, RrpRequesterV0 { | |
event RequestedRandom(bytes32 indexed requestId); | |
event MintedRandomNFT(bytes32 indexed requestId, uint256 response); |
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
from bitcoinutils.utils import to_satoshis | |
from bitcoinutils.setup import setup | |
from bitcoinutils.transactions import Transaction, TxInput, TxOutput | |
from bitcoinutils.script import Script | |
from bitcoinutils.keys import PrivateKey as utilPrivKey | |
from bitcoinutils.constants import SIGHASH_ALL, SIGHASH_ANYONECANPAY | |
setup('testnet') | |
# private key for tb1qj6zz96g8xgrwpgmdlvmkrjlwzz54sf47086yc9 |
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
const provider = new ethers.providers.Web3Provider(window.ethereum); | |
const signer = provider.getSigner(); | |
const contract = new ethers.Contract(contractAddrs, MyNFT.abi, signer); | |
const response = await contract.mintFunction(hexProof); |
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
pragma solidity ^0.8.18; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
contract RandomSurfaceReachT1 is ERC721URIStorage { | |
struct WhitelistedNft { | |
uint256 nonce; | |
address from; | |
} |
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
import { ethers } from "hardhat"; | |
const hre = require("hardhat"); | |
const dotenv = require("dotenv"); | |
dotenv.config(); | |
async function main() { | |
const SurfaceReachT1NFT = await hre.ethers.getContractFactory("RandomSurfaceReachT1"); | |
const surfaceReachT1NFT = await SurfaceReachT1NFT.deploy(process.env.AIRNODE_NODARY_ADDRESS); | |
await surfaceReachT1NFT.deployed(); |
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.18; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@api3/airnode-protocol/contracts/rrp/requesters/RrpRequesterV0.sol"; | |
contract RandomSurfaceReachT1 is ERC721URIStorage, Ownable, RrpRequesterV0 { | |
event RequestedUint256(bytes32 indexed requestId); | |
event ReturnedSurfaceReachT1(bytes32 indexed requestId, uint256 response); |
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
import Layout from './components/Layout'; | |
import './App.css'; | |
import NotSignedInHero from './components/NotSignedInHero'; | |
import { useAccount } from 'wagmi'; | |
import SignedInHero from './components/SignedInHero'; | |
import { EmailContextProvider } from './context/EmailContextManagement'; | |
function App() { | |
const { isConnected } = useAccount(); | |
if (isConnected) { |
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
import { createContext, useState } from 'react' | |
export const EmailContext = createContext({ | |
email: "none", | |
setEmail: () => {} | |
}) | |
export const EmailContextProvider = (props: any) => { | |
const setEmail = (email: string) => { |
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
wid = QtWidgets.QWidget() | |
grid = QtWidgets.QVBoxLayout(wid) | |
# setting the inner widget and layout | |
grid_inner = QtWidgets.QVBoxLayout(wid) | |
wid_inner = QtWidgets.QWidget(wid) | |
wid_inner.setLayout(grid_inner) | |
# add the inner widget to the outer layout | |
grid.addWidget(wid_inner) |
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
var express = require('express'); | |
var router = express.Router(); | |
router.post('/', function findAnagramsInArray(req, res) { | |
var words = JSON.parse(JSON.stringify(req.body)); | |
let result = {} | |
for (const word of words) { | |
const sorted = word.split("").sort().join(""); |