Skip to content

Commit

Permalink
Update and add endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-tortora authored Jun 4, 2024
1 parent 5b4597c commit 2ef269d
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 30 deletions.
54 changes: 37 additions & 17 deletions src/theme/NetworkInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@ function L1(props: NetworkProps) {
<tr>
<th>HTTP REST API</th>
<td>
<a
href={props.httpRestApi}
target='_blank'
rel='noopener noreferrer'
>
<p>{props.httpRestApi}</p>
</a>
<CodeBlock>{props.httpRestApi}</CodeBlock>
</td>
</tr>
<tr>
<th>Event API</th>
<td>{props.eventApi}</td>
<td>
<CodeBlock>{props.eventApi}</CodeBlock>
</td>
</tr>
<tr>
<th>Permanode API</th>
<td>
<a
href={props.permaNodeApi}
target='_blank'
rel='noopener noreferrer'
>
{props.permaNodeApi}
</a>
<CodeBlock>{props.permaNodeApi}</CodeBlock>
</td>
</tr>
{props.faucet && (
<tr>
<th>Faucet</th>
<td>
<a href={props.faucet} target='_blank' rel='noopener noreferrer'>
{props.faucet}
</a>
</td>
</tr>
)}
</tbody>
</table>
);
Expand Down Expand Up @@ -75,7 +75,7 @@ function Evm(props: NetworkProps) {
))}
</td>
</tr>
{props.evm.blastApiUrls && (
{props.evmCustom.blastApiUrls && (
<tr>
<th>
<Admonition type='tip' title='Blast API URLs'>
Expand All @@ -84,7 +84,7 @@ function Evm(props: NetworkProps) {
</Admonition>
</th>
<td>
{props.evm.blastApiUrls.map((object, index) =>
{props.evmCustom.blastApiUrls.map((object, index) =>
typeof object === 'string' ? (
<CodeBlock key={index}> {object as string} </CodeBlock>
) : (
Expand All @@ -109,6 +109,26 @@ function Evm(props: NetworkProps) {
</a>
</td>
</tr>
<tr>
<th>
{props.evmCustom.toolkit.hasFaucet ? 'Toolkit & Faucet' : 'Toolkit'}
</th>
<td>
<a
href={props.evmCustom.toolkit.url}
target='_blank'
rel='noopener noreferrer'
>
{props.evmCustom.toolkit.url}
</a>
</td>
</tr>
<tr>
<th>WASP API</th>
<td>
<CodeBlock> {props.evmCustom.api} </CodeBlock>
</td>
</tr>
</tbody>
</table>
);
Expand Down
53 changes: 40 additions & 13 deletions src/theme/constant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ export const Networks = {
'wss://ws.json-rpc.evm.iotaledger.net',
],
blockExplorerUrls: ['https://explorer.evm.iota.org'],
},
evmCustom: {
chainAddress:
'iota1pzt3mstq6khgc3tl0mwuzk3eqddkryqnpdxmk4nr25re2466uxwm28qqxu5',
aliasId:
'0x971dc160d5ae8c457f7eddc15a39035b6190130b4dbb5663550795575ae19db5',
blastApiUrls: [
'https://iota-mainnet-evm.public.blastapi.io',
'wss://iota-mainnet-evm.public.blastapi.io',
Expand All @@ -27,12 +33,11 @@ export const Networks = {
'https://iota-mainnet-evm.blastapi.io/e7596858-fc63-4a54-8727-b885a2af4ec8',
},
],
},
evmCustom: {
chainAddress:
'iota1pzt3mstq6khgc3tl0mwuzk3eqddkryqnpdxmk4nr25re2466uxwm28qqxu5',
aliasId:
'0x971dc160d5ae8c457f7eddc15a39035b6190130b4dbb5663550795575ae19db5',
toolkit: {
url: 'https://evm-toolkit.evm.iotaledger.net',
hasFaucet: false,
},
api: 'https://api.evm.iotaledger.net',
},
},
iota_2_testnet: {
Expand Down Expand Up @@ -65,6 +70,12 @@ export const Networks = {
'wss://ws.json-rpc.evm.testnet.iotaledger.net',
],
blockExplorerUrls: ['https://explorer.evm.testnet.iotaledger.net'],
},
evmCustom: {
chainAddress:
'tst1pzxsrr7apqkdzz633dyntmvxwtyvk029p39te5j0m33q6946h7akzv663zu',
aliasId:
'0x8d018fdd082cd10b518b4935ed8672c8cb3d450c4abcd24fdc620d16babfbb61',
blastApiUrls: [
'https://iota-testnet-evm.public.blastapi.io',
'wss://iota-testnet-evm.public.blastapi.io',
Expand All @@ -73,12 +84,11 @@ export const Networks = {
'https://iota-testnet-evm.blastapi.io/e7596858-fc63-4a54-8727-b885a2af4ec8',
},
],
},
evmCustom: {
chainAddress:
'tst1pzxsrr7apqkdzz633dyntmvxwtyvk029p39te5j0m33q6946h7akzv663zu',
aliasId:
'0x8d018fdd082cd10b518b4935ed8672c8cb3d450c4abcd24fdc620d16babfbb61',
toolkit: {
url: 'https://evm-toolkit.evm.testnet.iotaledger.net',
hasFaucet: false,
},
api: 'https://api.evm.testnet.iotaledger.net',
},
},
shimmer: {
Expand Down Expand Up @@ -107,6 +117,11 @@ export const Networks = {
'smr1prxvwqvwf7nru5q5xvh5thwg54zsm2y4wfnk6yk56hj3exxkg92mx20wl3s',
aliasId:
'0xccc7018e4fa63e5014332f45ddc8a5450da89572676d12d4d5e51c98d64155b3',
toolkit: {
url: 'https://evm-toolkit.evm.shimmer.network',
hasFaucet: false,
},
api: 'https://api.evm.shimmer.network',
},
},
shimmer_testnet: {
Expand All @@ -133,10 +148,20 @@ export const Networks = {
'rms1ppp00k5mmd2m8my8ukkp58nd3rskw6rx8l09aj35984k74uuc5u2cywn3ex',
aliasId:
'0x42f7da9bdb55b3ec87e5ac1a1e6d88e16768663fde5eca3429eb6f579cc538ac',
toolkit: {
url: 'https://evm-toolkit.evm.testnet.shimmer.network',
hasFaucet: true,
},
api: 'https://api.evm.testnet.shimmer.network',
},
},
};

export interface Toolkit {
url: string;
hasFaucet: boolean;
}

export interface AddEthereumChainParameter {
chainId: string; // A 0x-prefixed hexadecimal string
chainName: string;
Expand All @@ -146,7 +171,6 @@ export interface AddEthereumChainParameter {
decimals: number;
};
rpcUrls?: string[];
blastApiUrls?: Array<string | object>;
blockExplorerUrls?: string[];
iconUrls?: string[]; // Currently ignored.
}
Expand All @@ -163,5 +187,8 @@ export interface NetworkProps {
evmCustom: {
chainAddress: string;
aliasId: string;
blastApiUrls?: Array<string | object>;
toolkit?: Toolkit;
api?: string;
};
}

0 comments on commit 2ef269d

Please sign in to comment.