Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link to add and instructions #2

Merged
merged 1 commit into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ This is a fork of the [original network list by Anton Nell](https://github.com/a

## Adding a subnet

To add a subnet, fork this repo and add a new object in the `components/chain/subnets.json` file with the details below. Create a PR to merge your change into this repo.
To add a subnet, fork this repo and add a new object in the `components/chain/subnets.json` file with the details below. Create a PR to merge your change into this repo and it'll automatically go live.

Subnet attributes details:

Expand All @@ -17,7 +17,7 @@ Subnet attributes details:
"nativeCurrency.name": "", // name of the project token
"nativeCurrency.symbol": "", // symbol of the project token
"nativeCurrency.decimals":"", //
"chainId": 123 // required for the button to add to metamask
"chainId": 0x12345 // required for the button to add to metamask. 0x format
"rpc": "", // RPC endpoint. Required for button to add to metamask
"blockchain" : "", // optional. provided by Avalanche
"subnetId" : "", // optional. provided by Avalanche
Expand All @@ -27,10 +27,10 @@ Subnet attributes details:
}
```

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

First, run the development server:

```bash
Expand Down
35 changes: 13 additions & 22 deletions components/chain/chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,35 +213,26 @@ export default function Chain({ chain }) {
</div>
)}

{/* {chain.projectURL && (
<p>
Project site:
<IconButton
underline="hover"
href={chain.projectURL}
target="_blank"
rel="noreferrer"
>
<LinkIcon />
</IconButton>
</p>
)} */}

{chain.projectURL && (
<div className={classes.chainDescContainer}>
<Link href={chain.projectURL} align="center" classList="mb5">
Visit project website
</Link>
</div>
)}

{chain.projec}

<div className={classes.addButton}>
<Button variant="outlined" color="primary" onClick={addToNetwork}>
{renderProviderText()}
</Button>
</div>

{chain.projectURL && (
<div className={classes.chainDescContainer}>
<Link
href={chain.projectURL}
align="center"
classList="mb5"
target="_blank"
>
Visit project website
</Link>
</div>
)}
</Paper>
</Badge>
)
Expand Down
1 change: 1 addition & 0 deletions components/chain/chain.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
width: 100%;
display: flex;
justify-content: center;
padding-bottom: 20px;
}

.chipNet {
Expand Down
28 changes: 1 addition & 27 deletions components/chain/subnets.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"description": "Subnet created for the Crabada project, a play and earn idle game.",
"projectURL": "https://www.crabada.com/",
"chain": "Swimmer Test Subnet",
"isLive": true,
"isLive": false,
"rpc": [
"https://testnet-rpc.swimmer.network/ext/bc/2Sk6j8TYVQc2oR1TtUz64EWHAYjDUoDQ4hpbu6FMN2JBKC77xa/rpc"
],
Expand All @@ -48,31 +48,5 @@
"standard": "EIP3091"
}
]
},
{
"name": "Bthereum",
"chain": "Bthereum",
"description": "",
"isLive": false,
"rpc": [
"https://api.avax.network/ext/bc/C/rpc"
],
"faucets": [],
"nativeCurrency": {
"name": "Avalanche",
"symbol": "SUB-1",
"decimals": 18
},
"infoURL": "https://www.avax.network/",
"shortName": "avax",
"chainId": 43114,
"networkId": 43114,
"explorers": [
{
"name": "Snowtrace",
"url": "https://snowtrace.io/",
"standard": "EIP3091"
}
]
}
]
2 changes: 1 addition & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function Home({ changeTheme, theme }) {

const addNetwork = () => {
window.open(
'https://github.com/akegaviar/subnet-tech/blob/master/components/chain/chains.json',
'https://github.com/akegaviar/subnet-tech#adding-a-subnet',
'_blank'
)
}
Expand Down