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
import '../styles/globals.css' | |
import type { AppProps } from 'next/app' | |
import { Provider, createClient } from 'urql' | |
const client = createClient({ | |
url: '/api/graphql', | |
}) | |
function MyApp({ Component, pageProps }: AppProps) { | |
return ( |
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
import { ApolloServer } from 'apollo-server-micro' | |
import type { NextApiRequest, NextApiResponse, PageConfig } from 'next' | |
import schema from '../../api/schema' | |
const server = new ApolloServer({ schema }) | |
const serverHandler = server.start() | |
.then(() => server.createHandler({ path: '/api/graphql' })) | |
export default async function handler( | |
req: NextApiRequest, |
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
import '../styles/globals.css' | |
import type { AppProps } from 'next/app' | |
import { ApolloClient, ApolloProvider, InMemoryCache } from '@apollo/client' | |
const client = new ApolloClient({ | |
uri: '/api/graphql', | |
cache: new InMemoryCache(), | |
}) | |
function MyApp({ Component, pageProps }: AppProps) { |
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
COOKIE_NAME="web3login_session" | |
COOKIE_PASSWORD="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" |
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
出発地 | 到着地 | 利用カード種別 | 運賃 | マイル | プレミアムポイント | |
---|---|---|---|---|---|---|
新潟 | 札幌(新千歳) | ANAカード ゴールド | 運賃1 | 691 | 1507 | |
新潟 | 札幌(新千歳) | ANAカード ゴールド | 運賃2 | 576 | 1322 | |
新潟 | 札幌(新千歳) | ANAカード ゴールド | 運賃3 | 461 | 1138 | |
新潟 | 札幌(新千歳) | ANAカード ゴールド | 運賃4 | 461 | 738 | |
新潟 | 札幌(新千歳) | ANAカード ゴールド | 運賃5 | 345 | 953 | |
新潟 | 札幌(新千歳) | ANAカード ゴールド | 運賃6 | 345 | 753 | |
新潟 | 札幌(新千歳) | ANAカード ゴールド | 運賃7 | 345 | 553 | |
新潟 | 札幌(新千歳) | ANAカード ゴールド | 運賃8 | 230 | 369 | |
新潟 | 札幌(新千歳) | ANAカード ゴールド | 運賃9 | 691 | 1107 |
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
import { useState } from "react" | |
import { ethers } from "ethers" | |
export default function Sign() { | |
const [isVerified, setIsVerified] = useState(false) | |
const onClick = async () => { | |
if (!window.ethereum) { | |
console.error('!window.ethereum') | |
return |
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
NEXT_PUBLIC_CONTRACT_ADDRESS="0x037f3Aed2C172baAe64792A56e9a5f84a16005fb" |
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
API_URL="https://eth-rinkeby.alchemyapi.io/v2/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
PRIVATE_KEY="0000000000000000000000000000000000000000000000000000000000000000" | |
ETHERSCAN_API_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
CONTRACT_ADDRESS="0x0000000000000000000000000000000000000000" | |
TOKEN_URI="https://gateway.pinata.cloud/ipfs/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" |
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
import { useState } from "react" | |
import Web3 from "web3" | |
export default function Sign () { | |
const [isVerified, setIsVerified] = useState(false) | |
const onClick = async () => { | |
const provider = window.ethereum || window.web3?.provider || null | |
if (!provider) { |
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 http = require('http') | |
main() | |
function main () { | |
const server = http.createServer() | |
server.on('request', (_, res) => { | |
const content = 'main.js' |