Display erigon node url at homepage
This commit is contained in:
parent
85fd2dddcb
commit
21a086d395
|
@ -4,6 +4,7 @@ import { ethers } from "ethers";
|
||||||
import Logo from "./Logo";
|
import Logo from "./Logo";
|
||||||
import Timestamp from "./components/Timestamp";
|
import Timestamp from "./components/Timestamp";
|
||||||
import { useLatestBlock } from "./useLatestBlock";
|
import { useLatestBlock } from "./useLatestBlock";
|
||||||
|
import { ERIGON_NODE } from "./ethersconfig";
|
||||||
|
|
||||||
const Home: React.FC = () => {
|
const Home: React.FC = () => {
|
||||||
const [search, setSearch] = useState<string>();
|
const [search, setSearch] = useState<string>();
|
||||||
|
@ -63,6 +64,9 @@ const Home: React.FC = () => {
|
||||||
<Timestamp value={latestBlock.timestamp} />
|
<Timestamp value={latestBlock.timestamp} />
|
||||||
</NavLink>
|
</NavLink>
|
||||||
)}
|
)}
|
||||||
|
<span className="mx-auto mt-5 text-xs text-gray-500">
|
||||||
|
Using Erigon node at {ERIGON_NODE}
|
||||||
|
</span>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
import { ethers } from "ethers";
|
import { ethers } from "ethers";
|
||||||
|
|
||||||
|
export const ERIGON_NODE = "http://127.0.0.1:8545";
|
||||||
|
|
||||||
export const provider = new ethers.providers.JsonRpcProvider(
|
export const provider = new ethers.providers.JsonRpcProvider(
|
||||||
"http://127.0.0.1:8545",
|
ERIGON_NODE,
|
||||||
"mainnet"
|
"mainnet"
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue