Display erigon node url at homepage

This commit is contained in:
Willian Mitsuda 2021-07-03 23:02:04 -03:00
parent 85fd2dddcb
commit 21a086d395
2 changed files with 7 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import { ethers } from "ethers";
import Logo from "./Logo";
import Timestamp from "./components/Timestamp";
import { useLatestBlock } from "./useLatestBlock";
import { ERIGON_NODE } from "./ethersconfig";
const Home: React.FC = () => {
const [search, setSearch] = useState<string>();
@ -63,6 +64,9 @@ const Home: React.FC = () => {
<Timestamp value={latestBlock.timestamp} />
</NavLink>
)}
<span className="mx-auto mt-5 text-xs text-gray-500">
Using Erigon node at {ERIGON_NODE}
</span>
</form>
</div>
</div>

View File

@ -1,6 +1,8 @@
import { ethers } from "ethers";
export const ERIGON_NODE = "http://127.0.0.1:8545";
export const provider = new ethers.providers.JsonRpcProvider(
"http://127.0.0.1:8545",
ERIGON_NODE,
"mainnet"
);