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

Add missing endpoints and restructure logic #1592

Merged
merged 13 commits into from
Jun 14, 2024
16 changes: 8 additions & 8 deletions docs/build/isc/v1.1/docs/_partials/_hardhat_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import TabItem from '@theme/TabItem';
{`
networks: {
'iotaevm-testnet': {
url: '${Networks['iota_testnet'].evm.rpcUrls[0]}',
chainId: ${parseInt(Networks['iota_testnet'].evm.chainId)},
url: '${Networks['iota_testnet'].evm.core.rpcUrls[0]}',
chainId: ${parseInt(Networks['iota_testnet'].evm.core.chainId)},
accounts: [YOUR PRIVATE KEY],
},
}
Expand All @@ -25,8 +25,8 @@ networks: {
{`
networks: {
'shimmerevm-testnet': {
url: '${Networks['shimmer_testnet'].evm.rpcUrls[0]}',
chainId: ${parseInt(Networks['shimmer_testnet'].evm.chainId)},
url: '${Networks['shimmer_testnet'].evm.core.rpcUrls[0]}',
chainId: ${parseInt(Networks['shimmer_testnet'].evm.core.chainId)},
accounts: [YOUR PRIVATE KEY],
},
}
Expand All @@ -40,8 +40,8 @@ networks: {
{`
networks: {
'iotaevm': {
url: '${Networks['iota'].evm.rpcUrls[0]}',
chainId: ${parseInt(Networks['iota'].evm.chainId)},
url: '${Networks['iota'].evm.core.rpcUrls[0]}',
chainId: ${parseInt(Networks['iota'].evm.core.chainId)},
accounts: [YOUR PRIVATE KEY],
},
}
Expand All @@ -55,8 +55,8 @@ networks: {
{`
networks: {
'shimmerevm': {
url: '${Networks['shimmer'].evm.rpcUrls[0]}',
chainId: ${parseInt(Networks['shimmer'].evm.chainId)},
url: '${Networks['shimmer'].evm.core.rpcUrls[0]}',
chainId: ${parseInt(Networks['shimmer'].evm.core.chainId)},
accounts: [YOUR PRIVATE KEY],
},
}
Expand Down
8 changes: 4 additions & 4 deletions docs/build/isc/v1.1/docs/getting-started/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ Visit the corresponding Block Explorer to monitor the chain, track transactions,

<Tabs groupId='network' queryString>
<TabItem value='iota' label='IOTA EVM'>
<Link to={Networks['iota'].evm.blockExplorerUrls[0]}>Explorer</Link>
<Link to={Networks['iota'].evm.core.blockExplorerUrls[0]}>Explorer</Link>
</TabItem>
<TabItem value='iota_testnet' label='IOTA EVM Testnet'>
<Link to={Networks['iota_testnet'].evm.blockExplorerUrls[0]}>Explorer</Link>
<Link to={Networks['iota_testnet'].evm.core.blockExplorerUrls[0]}>Explorer</Link>
</TabItem>
<TabItem value='shimmer' label='ShimmerEVM'>
<Link to={Networks['shimmer'].evm.blockExplorerUrls[0]}>Explorer</Link>
<Link to={Networks['shimmer'].evm.core.blockExplorerUrls[0]}>Explorer</Link>
</TabItem>
<TabItem value='shimmer_testnet' label='ShimmerEVM Testnet'>
<Link to={Networks['shimmer_testnet'].evm.blockExplorerUrls[0]}>Explorer</Link>
<Link to={Networks['shimmer_testnet'].evm.core.blockExplorerUrls[0]}>Explorer</Link>
</TabItem>
</Tabs>

Expand Down
16 changes: 8 additions & 8 deletions docs/build/isc/v1.3-alpha/docs/_partials/_hardhat_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import TabItem from '@theme/TabItem';
{`
networks: {
'iotaevm-testnet': {
url: '${Networks['iota_testnet'].evm.rpcUrls[0]}',
chainId: ${parseInt(Networks['iota_testnet'].evm.chainId)},
url: '${Networks['iota_testnet'].evm.core.rpcUrls[0]}',
chainId: ${parseInt(Networks['iota_testnet'].evm.core.chainId)},
accounts: [YOUR PRIVATE KEY],
},
}
Expand All @@ -25,8 +25,8 @@ networks: {
{`
networks: {
'shimmerevm-testnet': {
url: '${Networks['shimmer_testnet'].evm.rpcUrls[0]}',
chainId: ${parseInt(Networks['shimmer_testnet'].evm.chainId)},
url: '${Networks['shimmer_testnet'].evm.core.rpcUrls[0]}',
chainId: ${parseInt(Networks['shimmer_testnet'].evm.core.chainId)},
accounts: [YOUR PRIVATE KEY],
},
}
Expand All @@ -40,8 +40,8 @@ networks: {
{`
networks: {
'iotaevm': {
url: '${Networks['iota'].evm.rpcUrls[0]}',
chainId: ${parseInt(Networks['iota'].evm.chainId)},
url: '${Networks['iota'].evm.core.rpcUrls[0]}',
chainId: ${parseInt(Networks['iota'].evm.core.chainId)},
accounts: [YOUR PRIVATE KEY],
},
}
Expand All @@ -55,8 +55,8 @@ networks: {
{`
networks: {
'shimmerevm': {
url: '${Networks['shimmer'].evm.rpcUrls[0]}',
chainId: ${parseInt(Networks['shimmer'].evm.chainId)},
url: '${Networks['shimmer'].evm.core.rpcUrls[0]}',
chainId: ${parseInt(Networks['shimmer'].evm.core.chainId)},
accounts: [YOUR PRIVATE KEY],
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ Visit the corresponding Block Explorer to monitor the chain, track transactions,

<Tabs groupId='network' queryString>
<TabItem value='iota' label='IOTA EVM'>
<Link to={Networks['iota'].evm.blockExplorerUrls[0]}>Explorer</Link>
<Link to={Networks['iota'].evm.core.blockExplorerUrls[0]}>Explorer</Link>
</TabItem>
<TabItem value='iota_testnet' label='IOTA EVM Testnet'>
<Link to={Networks['iota_testnet'].evm.blockExplorerUrls[0]}>Explorer</Link>
<Link to={Networks['iota_testnet'].evm.core.blockExplorerUrls[0]}>Explorer</Link>
</TabItem>
<TabItem value='shimmer' label='ShimmerEVM'>
<Link to={Networks['shimmer'].evm.blockExplorerUrls[0]}>Explorer</Link>
<Link to={Networks['shimmer'].evm.core.blockExplorerUrls[0]}>Explorer</Link>
</TabItem>
<TabItem value='shimmer_testnet' label='ShimmerEVM Testnet'>
<Link to={Networks['shimmer_testnet'].evm.blockExplorerUrls[0]}>Explorer</Link>
<Link to={Networks['shimmer_testnet'].evm.core.blockExplorerUrls[0]}>Explorer</Link>
</TabItem>
</Tabs>

Expand Down
2 changes: 1 addition & 1 deletion src/theme/AddToMetaMaskButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function AddToMetaMaskButton(props: NetworkProps) {
try {
await window.ethereum.request({
method: 'wallet_addEthereumChain',
params: [props.evm],
params: [props.evm.core],
});
} catch (error) {
console.error(error);
Expand Down
28 changes: 15 additions & 13 deletions src/theme/NetworkInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@ function Evm(props: NetworkProps) {
<tr>
<th>Chain ID</th>
<td>
<ChainId url={props.evm.rpcUrls[0]} />
<ChainId url={props.evm.core.rpcUrls[0]} />
</td>
</tr>
<tr>
<th>RPC URL</th>
<td>
{props.evm.rpcUrls.map((url, index) => (
{props.evm.core.rpcUrls.map((url, index) => (
<CodeBlock key={index}>{url}</CodeBlock>
))}
</td>
</tr>
{props.evmCustom.blastApiUrls && (
{props.evm.tools && props.evm.tools.blastApiUrls && (
<tr>
<th>
<Admonition type='tip' title='Blast API URLs'>
Expand All @@ -84,7 +84,7 @@ function Evm(props: NetworkProps) {
</Admonition>
</th>
<td>
{props.evmCustom.blastApiUrls.map((object, index) =>
{props.evm.tools.blastApiUrls.map((object, index) =>
typeof object === 'string' ? (
<CodeBlock key={index}> {object as string} </CodeBlock>
) : (
Expand All @@ -101,32 +101,34 @@ function Evm(props: NetworkProps) {
<th>Explorer</th>
<td>
<a
href={props.evm.blockExplorerUrls[0]}
href={props.evm.core.blockExplorerUrls[0]}
target='_blank'
rel='noopener noreferrer'
>
{props.evm.blockExplorerUrls[0]}
{props.evm.core.blockExplorerUrls[0]}
</a>
</td>
</tr>
<tr>
<th>
{props.evmCustom.toolkit.hasFaucet ? 'Toolkit & Faucet' : 'Toolkit'}
{props.evm.custom.toolkit.hasFaucet
? 'Toolkit & Faucet'
: 'Toolkit'}
</th>
<td>
<a
href={props.evmCustom.toolkit.url}
href={props.evm.custom.toolkit.url}
target='_blank'
rel='noopener noreferrer'
>
{props.evmCustom.toolkit.url}
{props.evm.custom.toolkit.url}
</a>
</td>
</tr>
<tr>
<th>WASP API</th>
<td>
<CodeBlock> {props.evmCustom.api} </CodeBlock>
<CodeBlock> {props.evm.custom.api} </CodeBlock>
</td>
</tr>
</tbody>
Expand All @@ -142,17 +144,17 @@ function EvmCustom(props: NetworkProps) {
<th>Chain Address</th>
<td>
<a
href={props.explorer + '/addr/' + props.evmCustom.chainAddress}
href={props.explorer + '/addr/' + props.evm.custom.chainAddress}
target='_blank'
rel='noopener noreferrer'
>
{props.evmCustom.chainAddress}
{props.evm.custom.chainAddress}
</a>
</td>
</tr>
<tr>
<th>Alias ID</th>
<td>{props.evmCustom.aliasId}</td>
<td>{props.evm.custom.aliasId}</td>
</tr>
</tbody>
</table>
Expand Down
Loading
Loading