Skip to content

Commit 6f6ccdb

Browse files
Added MegaETH testnet (#101)
* added megaeth testnet * validate web3icon against id, not fileName * update manta logo --------- Co-authored-by: YaroShkvorets <[email protected]>
1 parent 6199066 commit 6f6ccdb

File tree

4 files changed

+30
-7
lines changed

4 files changed

+30
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.6.53",
2+
"version": "0.6.54",
33
"private": true,
44
"type": "module",
55
"scripts": {

registry/eip155/manta.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
"evmExtendedModel": false,
2929
"bufUrl": "https://buf.build/streamingfast/firehose-ethereum",
3030
"bytesEncoding": "hex"
31-
}
31+
},
32+
"icon": { "web3Icons": { "name": "manta-pacific" } }
3233
}

registry/eip155/megaeth-testnet.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"id": "megaeth-testnet",
3+
"shortName": "MegaETH",
4+
"secondName": "Testnet",
5+
"fullName": "MegaETH Testnet",
6+
"aliases": ["evm-6342"],
7+
"caip2Id": "eip155:6342",
8+
"networkType": "testnet",
9+
"graphNode": { "protocol": "ethereum" },
10+
"explorerUrls": ["https://www.megaexplorer.xyz/"],
11+
"rpcUrls": ["https://carrot.megaeth.com/rpc"],
12+
"services": { "subgraphs": ["https://api.studio.thegraph.com/deploy"] },
13+
"issuanceRewards": false,
14+
"nativeToken": "ETH",
15+
"genesis": {
16+
"hash": "0xe56bd7ae2a26376ed01d4775edcec3fc18817451137e4a06a5899bf478b75500",
17+
"height": 0
18+
},
19+
"firehose": {
20+
"blockType": "sf.ethereum.type.v2.Block",
21+
"evmExtendedModel": true,
22+
"bufUrl": "https://buf.build/streamingfast/firehose-ethereum",
23+
"bytesEncoding": "hex"
24+
},
25+
"icon": { "web3Icons": { "name": "mega-eth" } }
26+
}

src/validate_logic.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,7 @@ async function validateWeb3Icons(networks: Network[]) {
279279
}
280280
if (network.icon.web3Icons.name) {
281281
const ourIcon = network.icon.web3Icons;
282-
/**
283-
* in web3icons the fileName is better point of reference than "id"
284-
* since id can differ from fileName, using id would prevent loading icons from github urls
285-
*/
286-
const web3Icon = web3Icons.find((i) => i.fileName === ourIcon.name);
282+
const web3Icon = web3Icons.find((i) => i.id === ourIcon.name);
287283
if (!web3Icon) {
288284
ERRORS.push(
289285
`\`${network.id}\` - web3icon id does not exist on web3Icons: \`${ourIcon.name}\``,

0 commit comments

Comments
 (0)