Add ENS, allow updating address while connected
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
"@testing-library/user-event": "^12.1.10",
|
||||
"@walletconnect/client": "^1.6.2",
|
||||
"ethereum-checksum-address": "^0.0.6",
|
||||
"ethers": "^5.4.5",
|
||||
"framer-motion": "^4",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import {
|
||||
Container,
|
||||
InputGroup,
|
||||
Input,
|
||||
InputRightElement,
|
||||
FormControl,
|
||||
useColorMode,
|
||||
FormLabel,
|
||||
@@ -17,6 +19,7 @@ import {
|
||||
Center,
|
||||
} from "@chakra-ui/react";
|
||||
import WalletConnect from "@walletconnect/client";
|
||||
import { ethers } from "ethers";
|
||||
import networkInfo from "./networkInfo";
|
||||
|
||||
function Body() {
|
||||
@@ -24,9 +27,12 @@ function Body() {
|
||||
const bgColor = { light: "white", dark: "gray.700" };
|
||||
const toast = useToast();
|
||||
|
||||
const [address, setAddress] = useState("");
|
||||
const [provider, setProvider] = useState();
|
||||
const [showAddress, setShowAddress] = useState(""); // gets displayed in input. ENS name remains as it is
|
||||
const [address, setAddress] = useState(""); // internal resolved address
|
||||
const [isAddressValid, setIsAddressValid] = useState(true);
|
||||
const [uri, setUri] = useState("");
|
||||
const [chainIdIndex, setChainIdIndex] = useState(0);
|
||||
const [networkIndex, setNetworkIndex] = useState(0);
|
||||
const [connector, setConnector] = useState();
|
||||
const [peerMeta, setPeerMeta] = useState();
|
||||
const [isConnected, setIsConnected] = useState(false);
|
||||
@@ -34,7 +40,6 @@ function Body() {
|
||||
|
||||
useEffect(() => {
|
||||
const session = getCachedSession();
|
||||
|
||||
if (session) {
|
||||
let _connector = new WalletConnect({ session });
|
||||
|
||||
@@ -48,8 +53,8 @@ function Body() {
|
||||
|
||||
const chainId = _connector.chainId.chainID;
|
||||
for (let i = 0; i < networkInfo.length; i++) {
|
||||
if (networkInfo[i].chainID === chainId) {
|
||||
setChainIdIndex(i);
|
||||
if (getChainId(i) === chainId) {
|
||||
setNetworkIndex(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -59,6 +64,10 @@ function Body() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setProvider(
|
||||
new ethers.providers.JsonRpcProvider(process.env.REACT_APP_PROVIDER_URL)
|
||||
);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -67,6 +76,43 @@ function Body() {
|
||||
}
|
||||
}, [connector]);
|
||||
|
||||
const resolveAndValidateAddress = async () => {
|
||||
let isValid;
|
||||
let _address = address;
|
||||
if (!address) {
|
||||
isValid = false;
|
||||
} else {
|
||||
// Resolve ENS
|
||||
const resolvedAddress = await provider.resolveName(address);
|
||||
if (resolvedAddress) {
|
||||
setAddress(resolvedAddress);
|
||||
_address = resolvedAddress;
|
||||
isValid = true;
|
||||
} else if (ethers.utils.isAddress(address)) {
|
||||
isValid = true;
|
||||
} else {
|
||||
isValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
setIsAddressValid(isValid);
|
||||
if (!isValid) {
|
||||
toast({
|
||||
title: "Invalid Address",
|
||||
description: "Address is not an ENS or Ethereum address",
|
||||
status: "error",
|
||||
isClosable: true,
|
||||
duration: 4000,
|
||||
});
|
||||
}
|
||||
|
||||
return { isValid, _address: _address };
|
||||
};
|
||||
|
||||
const getChainId = (networkIndex) => {
|
||||
return networkInfo[networkIndex].chainID;
|
||||
};
|
||||
|
||||
const getCachedSession = () => {
|
||||
const local = localStorage ? localStorage.getItem("walletconnect") : null;
|
||||
|
||||
@@ -83,24 +129,30 @@ function Body() {
|
||||
|
||||
const initWalletConnect = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
let _connector = new WalletConnect({ uri });
|
||||
const { isValid } = await resolveAndValidateAddress();
|
||||
|
||||
if (!_connector.connected) {
|
||||
await _connector.createSession();
|
||||
if (isValid) {
|
||||
try {
|
||||
let _connector = new WalletConnect({ uri });
|
||||
|
||||
if (!_connector.connected) {
|
||||
await _connector.createSession();
|
||||
}
|
||||
|
||||
setConnector(_connector);
|
||||
setUri(_connector.uri);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
toast({
|
||||
title: "Couldn't Connect",
|
||||
description: "Refresh DApp and Connect again",
|
||||
status: "error",
|
||||
isClosable: true,
|
||||
duration: 2000,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
setConnector(_connector);
|
||||
setUri(_connector.uri);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
toast({
|
||||
title: "Couldn't Connect",
|
||||
description: "Refresh DApp and Connect again",
|
||||
status: "error",
|
||||
isClosable: true,
|
||||
duration: 2000,
|
||||
});
|
||||
} else {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
@@ -125,6 +177,7 @@ function Body() {
|
||||
|
||||
connector.on("session_update", (error) => {
|
||||
console.log("EVENT", "session_update");
|
||||
setLoading(false);
|
||||
|
||||
if (error) {
|
||||
throw error;
|
||||
@@ -167,7 +220,7 @@ function Body() {
|
||||
const approveSession = () => {
|
||||
console.log("ACTION", "approveSession");
|
||||
if (connector) {
|
||||
let chainId = networkInfo[chainIdIndex].chainID;
|
||||
let chainId = getChainId(networkIndex);
|
||||
if (!chainId) {
|
||||
chainId = 1; // default to ETH Mainnet if no network selected
|
||||
}
|
||||
@@ -184,6 +237,29 @@ function Body() {
|
||||
}
|
||||
};
|
||||
|
||||
const updateSession = ({ newChainId, newAddress }) => {
|
||||
let _chainId = newChainId || getChainId(networkIndex);
|
||||
let _address = newAddress || address;
|
||||
|
||||
if (connector && connector.connected) {
|
||||
connector.updateSession({
|
||||
chainId: _chainId,
|
||||
accounts: [_address],
|
||||
});
|
||||
} else {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const updateAddress = async () => {
|
||||
setLoading(true);
|
||||
const { isValid, _address } = await resolveAndValidateAddress();
|
||||
|
||||
if (isValid) {
|
||||
updateSession({ newAddress: _address });
|
||||
}
|
||||
};
|
||||
|
||||
const killSession = () => {
|
||||
console.log("ACTION", "killSession");
|
||||
|
||||
@@ -204,16 +280,30 @@ function Body() {
|
||||
return (
|
||||
<Container my="16" minW={["0", "0", "2xl", "2xl"]}>
|
||||
<FormControl>
|
||||
<FormLabel>Enter Address to Impersonate</FormLabel>
|
||||
<Input
|
||||
placeholder="Address"
|
||||
aria-label="address"
|
||||
autoComplete="off"
|
||||
value={address}
|
||||
onChange={(e) => setAddress(e.target.value)}
|
||||
bg={bgColor[colorMode]}
|
||||
isDisabled={isConnected}
|
||||
/>
|
||||
<FormLabel>Enter Address or ENS to Impersonate</FormLabel>
|
||||
<InputGroup>
|
||||
<Input
|
||||
placeholder="Address"
|
||||
aria-label="address"
|
||||
autoComplete="off"
|
||||
value={showAddress}
|
||||
onChange={(e) => {
|
||||
const _showAddress = e.target.value;
|
||||
setShowAddress(_showAddress);
|
||||
setAddress(_showAddress);
|
||||
setIsAddressValid(true); // remove inValid warning when user types again
|
||||
}}
|
||||
bg={bgColor[colorMode]}
|
||||
isInvalid={!isAddressValid}
|
||||
/>
|
||||
{isConnected && (
|
||||
<InputRightElement width="4.5rem" mr="1rem">
|
||||
<Button h="1.75rem" size="sm" onClick={updateAddress}>
|
||||
Update
|
||||
</Button>
|
||||
</InputRightElement>
|
||||
)}
|
||||
</InputGroup>
|
||||
</FormControl>
|
||||
<FormControl my={4}>
|
||||
<FormLabel>WalletConnect URI</FormLabel>
|
||||
@@ -232,15 +322,11 @@ function Body() {
|
||||
placeholder="Select Network"
|
||||
variant="filled"
|
||||
_hover={{ cursor: "pointer" }}
|
||||
value={chainIdIndex}
|
||||
value={networkIndex}
|
||||
onChange={(e) => {
|
||||
setChainIdIndex(e.target.value);
|
||||
if (connector && connector.connected) {
|
||||
connector.updateSession({
|
||||
chainId: networkInfo[e.target.value].chainID,
|
||||
accounts: [address],
|
||||
});
|
||||
}
|
||||
const _networkIndex = e.target.value;
|
||||
setNetworkIndex(_networkIndex);
|
||||
updateSession({ newChainId: getChainId(_networkIndex) });
|
||||
}}
|
||||
>
|
||||
{networkInfo.map((network, i) => (
|
||||
@@ -258,16 +344,18 @@ function Body() {
|
||||
<Box>
|
||||
<CircularProgress isIndeterminate />
|
||||
</Box>
|
||||
<Box pt={6}>
|
||||
<Button
|
||||
onClick={() => {
|
||||
setLoading(false);
|
||||
reset();
|
||||
}}
|
||||
>
|
||||
Stop Loading ☠
|
||||
</Button>
|
||||
</Box>
|
||||
{!isConnected && (
|
||||
<Box pt={6}>
|
||||
<Button
|
||||
onClick={() => {
|
||||
setLoading(false);
|
||||
reset();
|
||||
}}
|
||||
>
|
||||
Stop Loading ☠
|
||||
</Button>
|
||||
</Box>
|
||||
)}
|
||||
</VStack>
|
||||
</Center>
|
||||
)}
|
||||
|
||||
404
yarn.lock
404
yarn.lock
@@ -1825,6 +1825,345 @@
|
||||
minimatch "^3.0.4"
|
||||
strip-json-comments "^3.1.1"
|
||||
|
||||
"@ethersproject/abi@5.4.0", "@ethersproject/abi@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.4.0.tgz#a6d63bdb3672f738398846d4279fa6b6c9818242"
|
||||
integrity sha512-9gU2H+/yK1j2eVMdzm6xvHSnMxk8waIHQGYCZg5uvAyH0rsAzxkModzBSpbAkAuhKFEovC2S9hM4nPuLym8IZw==
|
||||
dependencies:
|
||||
"@ethersproject/address" "^5.4.0"
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/constants" "^5.4.0"
|
||||
"@ethersproject/hash" "^5.4.0"
|
||||
"@ethersproject/keccak256" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
"@ethersproject/strings" "^5.4.0"
|
||||
|
||||
"@ethersproject/abstract-provider@5.4.1", "@ethersproject/abstract-provider@^5.4.0":
|
||||
version "5.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.1.tgz#e404309a29f771bd4d28dbafadcaa184668c2a6e"
|
||||
integrity sha512-3EedfKI3LVpjSKgAxoUaI+gB27frKsxzm+r21w9G60Ugk+3wVLQwhi1LsEJAKNV7WoZc8CIpNrATlL1QFABjtQ==
|
||||
dependencies:
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/networks" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
"@ethersproject/transactions" "^5.4.0"
|
||||
"@ethersproject/web" "^5.4.0"
|
||||
|
||||
"@ethersproject/abstract-signer@5.4.1", "@ethersproject/abstract-signer@^5.4.0":
|
||||
version "5.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.4.1.tgz#e4e9abcf4dd4f1ba0db7dff9746a5f78f355ea81"
|
||||
integrity sha512-SkkFL5HVq1k4/25dM+NWP9MILgohJCgGv5xT5AcRruGz4ILpfHeBtO/y6j+Z3UN/PAjDeb4P7E51Yh8wcGNLGA==
|
||||
dependencies:
|
||||
"@ethersproject/abstract-provider" "^5.4.0"
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
|
||||
"@ethersproject/address@5.4.0", "@ethersproject/address@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.4.0.tgz#ba2d00a0f8c4c0854933b963b9a3a9f6eb4a37a3"
|
||||
integrity sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q==
|
||||
dependencies:
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/keccak256" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/rlp" "^5.4.0"
|
||||
|
||||
"@ethersproject/base64@5.4.0", "@ethersproject/base64@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.4.0.tgz#7252bf65295954c9048c7ca5f43e5c86441b2a9a"
|
||||
integrity sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ==
|
||||
dependencies:
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
|
||||
"@ethersproject/basex@5.4.0", "@ethersproject/basex@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.4.0.tgz#0a2da0f4e76c504a94f2b21d3161ed9438c7f8a6"
|
||||
integrity sha512-J07+QCVJ7np2bcpxydFVf/CuYo9mZ7T73Pe7KQY4c1lRlrixMeblauMxHXD0MPwFmUHZIILDNViVkykFBZylbg==
|
||||
dependencies:
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
|
||||
"@ethersproject/bignumber@5.4.1", "@ethersproject/bignumber@^5.4.0":
|
||||
version "5.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.4.1.tgz#64399d3b9ae80aa83d483e550ba57ea062c1042d"
|
||||
integrity sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg==
|
||||
dependencies:
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
bn.js "^4.11.9"
|
||||
|
||||
"@ethersproject/bytes@5.4.0", "@ethersproject/bytes@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.4.0.tgz#56fa32ce3bf67153756dbaefda921d1d4774404e"
|
||||
integrity sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA==
|
||||
dependencies:
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
|
||||
"@ethersproject/constants@5.4.0", "@ethersproject/constants@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.4.0.tgz#ee0bdcb30bf1b532d2353c977bf2ef1ee117958a"
|
||||
integrity sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q==
|
||||
dependencies:
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
|
||||
"@ethersproject/contracts@5.4.1":
|
||||
version "5.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.1.tgz#3eb4f35b7fe60a962a75804ada2746494df3e470"
|
||||
integrity sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w==
|
||||
dependencies:
|
||||
"@ethersproject/abi" "^5.4.0"
|
||||
"@ethersproject/abstract-provider" "^5.4.0"
|
||||
"@ethersproject/abstract-signer" "^5.4.0"
|
||||
"@ethersproject/address" "^5.4.0"
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/constants" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
"@ethersproject/transactions" "^5.4.0"
|
||||
|
||||
"@ethersproject/hash@5.4.0", "@ethersproject/hash@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.4.0.tgz#d18a8e927e828e22860a011f39e429d388344ae0"
|
||||
integrity sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA==
|
||||
dependencies:
|
||||
"@ethersproject/abstract-signer" "^5.4.0"
|
||||
"@ethersproject/address" "^5.4.0"
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/keccak256" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
"@ethersproject/strings" "^5.4.0"
|
||||
|
||||
"@ethersproject/hdnode@5.4.0", "@ethersproject/hdnode@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.4.0.tgz#4bc9999b9a12eb5ce80c5faa83114a57e4107cac"
|
||||
integrity sha512-pKxdS0KAaeVGfZPp1KOiDLB0jba11tG6OP1u11QnYfb7pXn6IZx0xceqWRr6ygke8+Kw74IpOoSi7/DwANhy8Q==
|
||||
dependencies:
|
||||
"@ethersproject/abstract-signer" "^5.4.0"
|
||||
"@ethersproject/basex" "^5.4.0"
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/pbkdf2" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
"@ethersproject/sha2" "^5.4.0"
|
||||
"@ethersproject/signing-key" "^5.4.0"
|
||||
"@ethersproject/strings" "^5.4.0"
|
||||
"@ethersproject/transactions" "^5.4.0"
|
||||
"@ethersproject/wordlists" "^5.4.0"
|
||||
|
||||
"@ethersproject/json-wallets@5.4.0", "@ethersproject/json-wallets@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.4.0.tgz#2583341cfe313fc9856642e8ace3080154145e95"
|
||||
integrity sha512-igWcu3fx4aiczrzEHwG1xJZo9l1cFfQOWzTqwRw/xcvxTk58q4f9M7cjh51EKphMHvrJtcezJ1gf1q1AUOfEQQ==
|
||||
dependencies:
|
||||
"@ethersproject/abstract-signer" "^5.4.0"
|
||||
"@ethersproject/address" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/hdnode" "^5.4.0"
|
||||
"@ethersproject/keccak256" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/pbkdf2" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
"@ethersproject/random" "^5.4.0"
|
||||
"@ethersproject/strings" "^5.4.0"
|
||||
"@ethersproject/transactions" "^5.4.0"
|
||||
aes-js "3.0.0"
|
||||
scrypt-js "3.0.1"
|
||||
|
||||
"@ethersproject/keccak256@5.4.0", "@ethersproject/keccak256@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.4.0.tgz#7143b8eea4976080241d2bd92e3b1f1bf7025318"
|
||||
integrity sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A==
|
||||
dependencies:
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
js-sha3 "0.5.7"
|
||||
|
||||
"@ethersproject/logger@5.4.0", "@ethersproject/logger@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.0.tgz#f39adadf62ad610c420bcd156fd41270e91b3ca9"
|
||||
integrity sha512-xYdWGGQ9P2cxBayt64d8LC8aPFJk6yWCawQi/4eJ4+oJdMMjEBMrIcIMZ9AxhwpPVmnBPrsB10PcXGmGAqgUEQ==
|
||||
|
||||
"@ethersproject/networks@5.4.2", "@ethersproject/networks@^5.4.0":
|
||||
version "5.4.2"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.4.2.tgz#2247d977626e97e2c3b8ee73cd2457babde0ce35"
|
||||
integrity sha512-eekOhvJyBnuibfJnhtK46b8HimBc5+4gqpvd1/H9LEl7Q7/qhsIhM81dI9Fcnjpk3jB1aTy6bj0hz3cifhNeYw==
|
||||
dependencies:
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
|
||||
"@ethersproject/pbkdf2@5.4.0", "@ethersproject/pbkdf2@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.4.0.tgz#ed88782a67fda1594c22d60d0ca911a9d669641c"
|
||||
integrity sha512-x94aIv6tiA04g6BnazZSLoRXqyusawRyZWlUhKip2jvoLpzJuLb//KtMM6PEovE47pMbW+Qe1uw+68ameJjB7g==
|
||||
dependencies:
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/sha2" "^5.4.0"
|
||||
|
||||
"@ethersproject/properties@5.4.0", "@ethersproject/properties@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.4.0.tgz#38ba20539b44dcc5d5f80c45ad902017dcdbefe7"
|
||||
integrity sha512-7jczalGVRAJ+XSRvNA6D5sAwT4gavLq3OXPuV/74o3Rd2wuzSL035IMpIMgei4CYyBdialJMrTqkOnzccLHn4A==
|
||||
dependencies:
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
|
||||
"@ethersproject/providers@5.4.4":
|
||||
version "5.4.4"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.4.4.tgz#6729120317942fc0ab0ecdb35e944ec6bbedb795"
|
||||
integrity sha512-mQevyXj2X2D3l8p/JGDYFZbODhZjW6On15DnCK4Xc9y6b+P0vqorQC/j46omWSm4cyo7BQ/rgfhXNYmvAfyZoQ==
|
||||
dependencies:
|
||||
"@ethersproject/abstract-provider" "^5.4.0"
|
||||
"@ethersproject/abstract-signer" "^5.4.0"
|
||||
"@ethersproject/address" "^5.4.0"
|
||||
"@ethersproject/basex" "^5.4.0"
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/constants" "^5.4.0"
|
||||
"@ethersproject/hash" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/networks" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
"@ethersproject/random" "^5.4.0"
|
||||
"@ethersproject/rlp" "^5.4.0"
|
||||
"@ethersproject/sha2" "^5.4.0"
|
||||
"@ethersproject/strings" "^5.4.0"
|
||||
"@ethersproject/transactions" "^5.4.0"
|
||||
"@ethersproject/web" "^5.4.0"
|
||||
bech32 "1.1.4"
|
||||
ws "7.4.6"
|
||||
|
||||
"@ethersproject/random@5.4.0", "@ethersproject/random@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.4.0.tgz#9cdde60e160d024be39cc16f8de3b9ce39191e16"
|
||||
integrity sha512-pnpWNQlf0VAZDEOVp1rsYQosmv2o0ITS/PecNw+mS2/btF8eYdspkN0vIXrCMtkX09EAh9bdk8GoXmFXM1eAKw==
|
||||
dependencies:
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
|
||||
"@ethersproject/rlp@5.4.0", "@ethersproject/rlp@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.4.0.tgz#de61afda5ff979454e76d3b3310a6c32ad060931"
|
||||
integrity sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg==
|
||||
dependencies:
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
|
||||
"@ethersproject/sha2@5.4.0", "@ethersproject/sha2@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.4.0.tgz#c9a8db1037014cbc4e9482bd662f86c090440371"
|
||||
integrity sha512-siheo36r1WD7Cy+bDdE1BJ8y0bDtqXCOxRMzPa4bV1TGt/eTUUt03BHoJNB6reWJD8A30E/pdJ8WFkq+/uz4Gg==
|
||||
dependencies:
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
hash.js "1.1.7"
|
||||
|
||||
"@ethersproject/signing-key@5.4.0", "@ethersproject/signing-key@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.4.0.tgz#2f05120984e81cf89a3d5f6dec5c68ee0894fbec"
|
||||
integrity sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A==
|
||||
dependencies:
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
bn.js "^4.11.9"
|
||||
elliptic "6.5.4"
|
||||
hash.js "1.1.7"
|
||||
|
||||
"@ethersproject/solidity@5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.4.0.tgz#1305e058ea02dc4891df18b33232b11a14ece9ec"
|
||||
integrity sha512-XFQTZ7wFSHOhHcV1DpcWj7VXECEiSrBuv7JErJvB9Uo+KfCdc3QtUZV+Vjh/AAaYgezUEKbCtE6Khjm44seevQ==
|
||||
dependencies:
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/keccak256" "^5.4.0"
|
||||
"@ethersproject/sha2" "^5.4.0"
|
||||
"@ethersproject/strings" "^5.4.0"
|
||||
|
||||
"@ethersproject/strings@5.4.0", "@ethersproject/strings@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.4.0.tgz#fb12270132dd84b02906a8d895ae7e7fa3d07d9a"
|
||||
integrity sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA==
|
||||
dependencies:
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/constants" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
|
||||
"@ethersproject/transactions@5.4.0", "@ethersproject/transactions@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.4.0.tgz#a159d035179334bd92f340ce0f77e83e9e1522e0"
|
||||
integrity sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ==
|
||||
dependencies:
|
||||
"@ethersproject/address" "^5.4.0"
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/constants" "^5.4.0"
|
||||
"@ethersproject/keccak256" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
"@ethersproject/rlp" "^5.4.0"
|
||||
"@ethersproject/signing-key" "^5.4.0"
|
||||
|
||||
"@ethersproject/units@5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.4.0.tgz#d57477a4498b14b88b10396062c8cbbaf20c79fe"
|
||||
integrity sha512-Z88krX40KCp+JqPCP5oPv5p750g+uU6gopDYRTBGcDvOASh6qhiEYCRatuM/suC4S2XW9Zz90QI35MfSrTIaFg==
|
||||
dependencies:
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
"@ethersproject/constants" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
|
||||
"@ethersproject/wallet@5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.4.0.tgz#fa5b59830b42e9be56eadd45a16a2e0933ad9353"
|
||||
integrity sha512-wU29majLjM6AjCjpat21mPPviG+EpK7wY1+jzKD0fg3ui5fgedf2zEu1RDgpfIMsfn8fJHJuzM4zXZ2+hSHaSQ==
|
||||
dependencies:
|
||||
"@ethersproject/abstract-provider" "^5.4.0"
|
||||
"@ethersproject/abstract-signer" "^5.4.0"
|
||||
"@ethersproject/address" "^5.4.0"
|
||||
"@ethersproject/bignumber" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/hash" "^5.4.0"
|
||||
"@ethersproject/hdnode" "^5.4.0"
|
||||
"@ethersproject/json-wallets" "^5.4.0"
|
||||
"@ethersproject/keccak256" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
"@ethersproject/random" "^5.4.0"
|
||||
"@ethersproject/signing-key" "^5.4.0"
|
||||
"@ethersproject/transactions" "^5.4.0"
|
||||
"@ethersproject/wordlists" "^5.4.0"
|
||||
|
||||
"@ethersproject/web@5.4.0", "@ethersproject/web@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.4.0.tgz#49fac173b96992334ed36a175538ba07a7413d1f"
|
||||
integrity sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og==
|
||||
dependencies:
|
||||
"@ethersproject/base64" "^5.4.0"
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
"@ethersproject/strings" "^5.4.0"
|
||||
|
||||
"@ethersproject/wordlists@5.4.0", "@ethersproject/wordlists@^5.4.0":
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.4.0.tgz#f34205ec3bbc9e2c49cadaee774cf0b07e7573d7"
|
||||
integrity sha512-FemEkf6a+EBKEPxlzeVgUaVSodU7G0Na89jqKjmWMlDB0tomoU8RlEMgUvXyqtrg8N4cwpLh8nyRnm1Nay1isA==
|
||||
dependencies:
|
||||
"@ethersproject/bytes" "^5.4.0"
|
||||
"@ethersproject/hash" "^5.4.0"
|
||||
"@ethersproject/logger" "^5.4.0"
|
||||
"@ethersproject/properties" "^5.4.0"
|
||||
"@ethersproject/strings" "^5.4.0"
|
||||
|
||||
"@fortawesome/fontawesome-common-types@^0.2.36":
|
||||
version "0.2.36"
|
||||
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz#b44e52db3b6b20523e0c57ef8c42d315532cb903"
|
||||
@@ -3045,6 +3384,11 @@ adjust-sourcemap-loader@3.0.0:
|
||||
loader-utils "^2.0.0"
|
||||
regex-parser "^2.2.11"
|
||||
|
||||
aes-js@3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d"
|
||||
integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=
|
||||
|
||||
aes-js@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a"
|
||||
@@ -3598,6 +3942,11 @@ bcrypt-pbkdf@^1.0.0:
|
||||
dependencies:
|
||||
tweetnacl "^0.14.3"
|
||||
|
||||
bech32@1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9"
|
||||
integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==
|
||||
|
||||
bfj@^7.0.2:
|
||||
version "7.0.2"
|
||||
resolved "https://registry.yarnpkg.com/bfj/-/bfj-7.0.2.tgz#1988ce76f3add9ac2913fd8ba47aad9e651bfbb2"
|
||||
@@ -5171,7 +5520,7 @@ electron-to-chromium@^1.3.564, electron-to-chromium@^1.3.649:
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.671.tgz#8feaed6eae42d279fa4611f58c42a5a1eb81b2a0"
|
||||
integrity sha512-RTD97QkdrJKaKwRv9h/wGAaoR2lGxNXEcBXS31vjitgTPwTWAbLdS7cEsBK68eEQy7p6YyT8D5BxBEYHu2SuwQ==
|
||||
|
||||
elliptic@^6.5.3:
|
||||
elliptic@6.5.4, elliptic@^6.5.3:
|
||||
version "6.5.4"
|
||||
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb"
|
||||
integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==
|
||||
@@ -5638,6 +5987,42 @@ ethereum-checksum-address@^0.0.6:
|
||||
keccak256 "^1.0.0"
|
||||
meow "^5.0.0"
|
||||
|
||||
ethers@^5.4.5:
|
||||
version "5.4.5"
|
||||
resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.5.tgz#cec133b9f5b514dc55e2561ee7aa7218c33affd7"
|
||||
integrity sha512-PPZ6flOAj230sXEWf/r/It6ZZ5c7EOVWx+PU87Glkbg79OtT7pLE1WgL4MRdwx6iF7HzSOvUUI+8cAmcdzo12w==
|
||||
dependencies:
|
||||
"@ethersproject/abi" "5.4.0"
|
||||
"@ethersproject/abstract-provider" "5.4.1"
|
||||
"@ethersproject/abstract-signer" "5.4.1"
|
||||
"@ethersproject/address" "5.4.0"
|
||||
"@ethersproject/base64" "5.4.0"
|
||||
"@ethersproject/basex" "5.4.0"
|
||||
"@ethersproject/bignumber" "5.4.1"
|
||||
"@ethersproject/bytes" "5.4.0"
|
||||
"@ethersproject/constants" "5.4.0"
|
||||
"@ethersproject/contracts" "5.4.1"
|
||||
"@ethersproject/hash" "5.4.0"
|
||||
"@ethersproject/hdnode" "5.4.0"
|
||||
"@ethersproject/json-wallets" "5.4.0"
|
||||
"@ethersproject/keccak256" "5.4.0"
|
||||
"@ethersproject/logger" "5.4.0"
|
||||
"@ethersproject/networks" "5.4.2"
|
||||
"@ethersproject/pbkdf2" "5.4.0"
|
||||
"@ethersproject/properties" "5.4.0"
|
||||
"@ethersproject/providers" "5.4.4"
|
||||
"@ethersproject/random" "5.4.0"
|
||||
"@ethersproject/rlp" "5.4.0"
|
||||
"@ethersproject/sha2" "5.4.0"
|
||||
"@ethersproject/signing-key" "5.4.0"
|
||||
"@ethersproject/solidity" "5.4.0"
|
||||
"@ethersproject/strings" "5.4.0"
|
||||
"@ethersproject/transactions" "5.4.0"
|
||||
"@ethersproject/units" "5.4.0"
|
||||
"@ethersproject/wallet" "5.4.0"
|
||||
"@ethersproject/web" "5.4.0"
|
||||
"@ethersproject/wordlists" "5.4.0"
|
||||
|
||||
eventemitter3@^4.0.0:
|
||||
version "4.0.7"
|
||||
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
|
||||
@@ -6407,7 +6792,7 @@ hash-base@^3.0.0:
|
||||
readable-stream "^3.6.0"
|
||||
safe-buffer "^5.2.0"
|
||||
|
||||
hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7:
|
||||
hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7:
|
||||
version "1.1.7"
|
||||
resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42"
|
||||
integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==
|
||||
@@ -7631,6 +8016,11 @@ jest@26.6.0:
|
||||
import-local "^3.0.2"
|
||||
jest-cli "^26.6.0"
|
||||
|
||||
js-sha3@0.5.7:
|
||||
version "0.5.7"
|
||||
resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7"
|
||||
integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=
|
||||
|
||||
js-sha3@0.8.0:
|
||||
version "0.8.0"
|
||||
resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840"
|
||||
@@ -10854,6 +11244,11 @@ schema-utils@^3.0.0:
|
||||
ajv "^6.12.5"
|
||||
ajv-keywords "^3.5.2"
|
||||
|
||||
scrypt-js@3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312"
|
||||
integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==
|
||||
|
||||
select-hose@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca"
|
||||
@@ -12642,6 +13037,11 @@ write-file-atomic@^3.0.0:
|
||||
signal-exit "^3.0.2"
|
||||
typedarray-to-buffer "^3.1.5"
|
||||
|
||||
ws@7.4.6:
|
||||
version "7.4.6"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c"
|
||||
integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==
|
||||
|
||||
ws@7.5.3:
|
||||
version "7.5.3"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74"
|
||||
|
||||
Reference in New Issue
Block a user