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 { FC, useEffect, useState } from "react"; | |
import { Connection, PublicKey, clusterApiUrl } from "@solana/web3.js"; | |
type PhantomEvent = "disconnect" | "connect" | "accountChanged"; | |
interface ConnectOpts { | |
onlyIfTrusted: boolean; | |
} |
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.4; | |
import "@openzeppelin/[email protected]/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/[email protected]/token/ERC20/extensions/draft-ERC20Permit.sol"; | |
contract MyToken is ERC20, ERC20Permit { | |
constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {} | |
function mint(address to, uint256 value) external { |
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 React, { useEffect, useState } from "react"; | |
import { ToastContainer, toast } from "react-toastify"; | |
import { ethers } from "ethers"; | |
import "react-toastify/dist/ReactToastify.css"; | |
import Head from "next/head"; | |
export default function Home() { | |
/** |