Skip to content

Commit

Permalink
Add blockscout apis
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyJLin95 committed Sep 1, 2023
1 parent 668d5ff commit add8f06
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ You'll need to get a Lineascan (Linea instance of Etherscan) API key by creating

## Verify your smart contract

:::note

These instructions verify using Etherscan, which currently does not support Yul. If you would like to verify using Blockscout, please use the API URLs referenced [here](../../../use-mainnet/info-contracts.md#block-explorers).

:::

### Verify a contract that has already been deployed

If you want to verify a contract that has already been deployed, you can use the following commands:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ const { PRIVATE_KEY, LINEASCAN_API_KEY } = process.env;

## Add the custom chain

:::note

These instructions verify using Etherscan, which currently does not support Yul. If you would like to verify using Blockscout, please use the API URLs referenced [here](../../../use-mainnet/info-contracts.md#block-explorers).

:::

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ To verify your contracts, you can use Truffle's verification plugin [truffle-plu

These steps assume you stored your secret keys in a `.env` file, which you can read more about [here](./../deploy-smart-contract/truffle.mdx/#truffle-configjs).

:::note

These instructions verify using Etherscan, which currently does not support Yul. If you would like to verify using Blockscout, please use the API URLs referenced [here](../../../use-mainnet/info-contracts.md#block-explorers).

:::

## Download the plugin

In your Truffle project, install the plugin:
Expand Down
47 changes: 17 additions & 30 deletions docs/use-mainnet/info-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,46 +341,33 @@ If you want to drip Goerli ETH directly to Linea, you can use the [Infura Linea
<Tabs groupId="Mainnet-Testnet" className="my-tabs">
<TabItem value="Mainnet" label="Mainnet" default>

| Explorer name | URL |
| ----------- | ----------- |
| Lineascan | [https://lineascan.build](https://lineascan.build) |
| L2Scan | [https://linea.l2scan.co](https://linea.l2scan.co) |
| Explorer name | URL | API URL |
| ----------- | ----------- | ----------- |
| Lineascan | https://lineascan.build | https://api.lineascan.build/api |
| L2Scan | https://linea.l2scan.co |
| Blockscout | https://explorer.linea.build | https://explorer.linea.build/api |

</TabItem>
<TabItem value="Testnet" label="Testnet" default>

| Explorer name | URL |
| ----------- | ----------- |
| Lineascan | [https://goerli.lineascan.build](https://goerli.lineascan.build) |
| Explorer name | URL | API URL |
| ----------- | ----------- | ----------- |
| Lineascan | https://goerli.lineascan.build | https://api-testnet.lineascan.build/api |
| Blockscout | https://explorer.goerli.linea.build | https://explorer.goerli.linea.build/api |

</TabItem>
</Tabs>

If you're new to public blockchain networks, you might not be familiar with _block explorers_. It's helpful to remember that the network is keeping track of a _ledger_ of accounts, with tokens attributed to them, sent between them, created by them, etc.

So as users take actions on the network, there are changes to those accounts and tokens. A block explorer is an interface through which you can look at that information in all its raw, gritty detail.
:::note

>
> If you want to learn more about explorers and how to use them, check out MetaMask's article on the topic: [How to check my wallet activity on the blockchain explorer](https://support.metamask.io/hc/en-us/articles/360057536611-How-to-check-my-wallet-activity-on-the-blockchain-explorer)
>
Learn how to verify your contracts in our [quickstart](../build-on-linea/quickstart/).

## Smart contract verification

You can find more details on how to verify your contracts [in our quickstart](../build-on-linea/quickstart/).

<Tabs groupId="Mainnet-Testnet" className="my-tabs">
<TabItem value="Mainnet" label="Mainnet" default>
:::

| apiURL | browserURL |
| ----------- | ----------- |
| `https://api.lineascan.build/api` | `https://lineascan.build/address` |

</TabItem>
<TabItem value="Testnet" label="Testnet" default>
If you're new to public blockchain networks, you might not be familiar with _block explorers_. It's helpful to remember that the network is keeping track of a _ledger_ of accounts, with tokens attributed to them, sent between them, created by them, etc.

| apiURL | browserURL |
| ----------- | ----------- |
| `https://api-testnet.lineascan.build/api` | `https://goerli.lineascan.build/address` |
So, as users take actions on the network, there are changes to those accounts and tokens. A block explorer is an interface through which you can look at that information in all its raw, gritty detail.

</TabItem>
</Tabs>
>
> If you want to learn more about explorers and how to use them, check out MetaMask's article on the topic: [How to check my wallet activity on the blockchain explorer](https://support.metamask.io/hc/en-us/articles/360057536611-How-to-check-my-wallet-activity-on-the-blockchain-explorer)
>
4 changes: 2 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ const config = {
},
{
type: "dropdown",
label: "Learn",
label: "Tutorials",
position: "left",
items: [
{
label: "Community tutorials",
label: "Community Guides",
to: "blog",
},
{
Expand Down

0 comments on commit add8f06

Please sign in to comment.