mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 11:20:36 +08:00
Replace Rinkeby testnet with Goerli
Rinkeby has been sunsetted in favour of Goerli after the Ethereum merge. Deployed `phase0` from radicle-contracts, some vesting contracts and the faucet from `radicle-faucet` to the Goerli testnet and adjusted the code. The `reverseRegistrar` was obtained from: https://app.ens.domains/name/addr.reverse/details Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
+2
-2
@@ -189,9 +189,9 @@
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
{#if config && config.network.name === "rinkeby"}
|
||||
{#if config && config.network.name === "goerli"}
|
||||
<a use:link href="/faucet">
|
||||
<span class="network">Rinkeby</span>
|
||||
<span class="network">Goerli</span>
|
||||
</a>
|
||||
{:else if config && config.network.name === "homestead"}
|
||||
<!-- Don't show anything -->
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import type { Config } from "@app/config";
|
||||
|
||||
import { session } from "@app/session";
|
||||
import { setOpenGraphMetaTag, toWei } from "@app/utils";
|
||||
import { setOpenGraphMetaTag, toWei, capitalize } from "@app/utils";
|
||||
import { formatEther } from "@ethersproject/units";
|
||||
import { navigate } from "svelte-routing";
|
||||
import {
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
setOpenGraphMetaTag([
|
||||
{ prop: "og:title", content: "Radicle Faucet" },
|
||||
{ prop: "og:description", content: "Rinkeby Testnet Faucet" },
|
||||
{ prop: "og:description", content: "Goerli Testnet Faucet" },
|
||||
{ prop: "og:url", content: window.location.href },
|
||||
]);
|
||||
|
||||
@@ -120,14 +120,14 @@
|
||||
<main>
|
||||
<div class="title">
|
||||
Obtain RAD tokens on <span class="txt-bold">
|
||||
{config.network.name}
|
||||
{capitalize(config.network.name)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{#if config.network.name === "homestead"}
|
||||
<div class="subtitle">
|
||||
To get RAD tokens on <span class="txt-bold">
|
||||
{config.network.name},
|
||||
{capitalize(config.network.name)},
|
||||
</span>
|
||||
please
|
||||
<br />
|
||||
@@ -140,7 +140,7 @@
|
||||
{:else if !$session}
|
||||
<div class="subtitle">
|
||||
To get RAD tokens on <span class="txt-bold">
|
||||
{config.network.name}
|
||||
{capitalize(config.network.name)}
|
||||
</span>
|
||||
​,
|
||||
<br />
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
<div class="subtitle">
|
||||
Register a unique name with our ENS registrar, under <br />
|
||||
the
|
||||
<span class="txt-bold">radicle.eth</span>
|
||||
domain (e.g. cloudhead.radicle.eth).
|
||||
<span class="txt-bold">{config.registrar.domain}</span>
|
||||
domain (e.g. cloudhead.{config.registrar.domain}).
|
||||
<br />
|
||||
Radicle names never expire and free to register.
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
const registrationOwner = owner || session.address;
|
||||
|
||||
const view = () =>
|
||||
navigate(`/registrations/${name}.radicle.eth`, { state: { retry: true } });
|
||||
navigate(`/registrations/${name}.${config.registrar.domain}`, {
|
||||
state: { retry: true },
|
||||
});
|
||||
|
||||
onMount(async () => {
|
||||
try {
|
||||
|
||||
+6
-6
@@ -16,20 +16,20 @@
|
||||
"tokens": [],
|
||||
"alchemy": { "key": "cQFlLK8EokIGlJhd_soImwEyUoC7Ec8r" }
|
||||
},
|
||||
"rinkeby": {
|
||||
"goerli": {
|
||||
"registrar": {
|
||||
"domain": "radicle.eth",
|
||||
"address": "0x80b68878442b6510D768Be1bd88712710B86eAcD"
|
||||
"domain": "radicle-goerli.eth",
|
||||
"address": "0xD88303A92577bFDF5A82FddeF342F3A27A972405"
|
||||
},
|
||||
"radToken": {
|
||||
"address": "0x7b6CbebC5646D996d258dcD4ca1d334B282e9948",
|
||||
"faucet": "0x9Aa75397eD632A3060aCb5dE7f96e2457bceED8d"
|
||||
"address": "0x3EE94D192397aAFAe438C9803825eb1Aa4402e09",
|
||||
"faucet": "0xc627191d2BB8839eAcbb7191f9500B84d201A066"
|
||||
},
|
||||
"users": {
|
||||
"pinned": []
|
||||
},
|
||||
"reverseRegistrar": {
|
||||
"address": "0x6F628b68b30Dc3c17f345c9dbBb1E483c2b7aE5c"
|
||||
"address": "0xD5610A08E370051a01fdfe4bB3ddf5270af1aA48"
|
||||
},
|
||||
"tokens": [],
|
||||
"alchemy": { "key": "1T6h-0rxu7SRzKEtmukIoxaJOXazLDNs" }
|
||||
|
||||
+6
-1
@@ -5,6 +5,7 @@ import type { TypedDataSigner } from "@ethersproject/abstract-signer";
|
||||
import WalletConnect from "@walletconnect/client";
|
||||
import config from "@app/config.json";
|
||||
import { WalletConnectSigner } from "./WalletConnectSigner";
|
||||
import { capitalize } from "@app/utils";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
@@ -241,7 +242,11 @@ export async function getConfig(): Promise<Config> {
|
||||
|
||||
const networkConfig = (<Record<string, any>>config)[network.name];
|
||||
if (!networkConfig) {
|
||||
throw new Error(`Network ${network.name} is not supported`);
|
||||
throw new Error(
|
||||
`${capitalize(
|
||||
network.name,
|
||||
)} is not supported. Connect to Homestead or Goerli instead.`,
|
||||
);
|
||||
}
|
||||
|
||||
const provider = getProvider(network, networkConfig, metamask);
|
||||
|
||||
+2
-2
@@ -159,9 +159,9 @@ describe("String Assertions", () => {
|
||||
describe("Others", () => {
|
||||
test.each([
|
||||
{
|
||||
name: "rinkeby",
|
||||
name: "goerli",
|
||||
expected:
|
||||
"https://rinkeby.etherscan.io/address/0x5E813e48a81977c6Fdd565ed5097eb600C73C4f0",
|
||||
"https://goerli.etherscan.io/address/0x5E813e48a81977c6Fdd565ed5097eb600C73C4f0",
|
||||
},
|
||||
{
|
||||
name: "",
|
||||
|
||||
+2
-2
@@ -292,8 +292,8 @@ export function getSearchParam(
|
||||
|
||||
// Get the explorer link of an address, eg. Etherscan.
|
||||
export function explorerLink(addr: string, config: Config): string {
|
||||
if (config.network.name === "rinkeby") {
|
||||
return `https://rinkeby.etherscan.io/address/${addr}`;
|
||||
if (config.network.name === "goerli") {
|
||||
return `https://goerli.etherscan.io/address/${addr}`;
|
||||
}
|
||||
return `https://etherscan.io/address/${addr}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user