Skip to content

Commit 2613a7b

Browse files
authored
Merge pull request #616 from api3dao/main
Initiate release
2 parents dc5a8e7 + 1f92dd6 commit 2613a7b

File tree

108 files changed

+1173
-1756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1173
-1756
lines changed

.changeset/curvy-wolves-draw.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@api3/contracts': patch
3+
---
4+
5+
Updates RPC provider configurations:
6+
7+
- Remove drpc from all
8+
- Remove blastapi from all
9+
- Add quicknode for linea, soneium, and sonic
10+
- Add blockpi for arbitrum, avalanche, base, berachain, blast, bsc, ethereum, gnosis, hyperliquid, ink, linea, mantle, metis, optimism, polygon-zkevm, polygon, scroll, sei, sonic, taiko, unichain, and x-layer
11+
- Add publicnode for arbitrum, avalanche, berachain, blast, bsc, optimism, scroll, and sonic
12+
- Add tenderly for apechain, berachain, ethereum, katana, metis, moonbeam, moonriver, optimism, polygon, scroll, taiko, and unichain
13+
- Add 0xrpc for gnosis
14+
- Remove alchemy from berachain, ink, optimism, polygon-zkevm, sonic, and unichain
15+
- Use publicnode as default provider for unichain
16+
- Add reblok for moonbeam and sei

.changeset/loud-cobras-feel.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@api3/contracts': patch
3+
---
4+
5+
Updates RPC provider configurations:
6+
7+
- Add publicnode and validationcloud providers for somnia chain.

.changeset/petite-dodos-drum.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@api3/contracts': patch
3+
---
4+
5+
Update block explorer and verification API for following chains:
6+
7+
- avalanche
8+
- avalanche-testnet
9+
- katana
10+
- monad-testnet
11+
- moonbeam
12+
- sei
13+
- sei-testnet
14+
15+
Update verification API for:
16+
17+
- polygon-zkevm-sepolia-testnet

.changeset/slick-words-remain.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@api3/contracts': major
3+
---
4+
5+
Update hardhat config to use Etherscan V2 API
6+
Update chains schema to use verificationApi instead of api
7+
Update chains schema to use blockExplorerUrl instead of browserUrl

.github/workflows/validate-verify.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
run: pnpm build
3434
id: build
3535

36+
- name: Validate verification API
37+
run: pnpm validate-verification-api
38+
if: steps.build.outcome == 'success'
39+
3640
- name: Validate deployments
3741
run: pnpm validate-deployments
3842
if: steps.build.outcome == 'success'

README.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,28 @@ console.log(address);
290290
*/
291291
```
292292

293+
### hardhatConfig.blockscout()
294+
295+
Returns an object that can be used as the `blockscout` field of [`hardhat.config.js`](https://hardhat.org/hardhat-runner/docs/config) (requires the [`hardhat-etherscan` plugin](https://v2.hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify)).
296+
297+
It includes a `customChains` field that includes all chains that support Blockscout contract verification API.
298+
299+
```ts
300+
import { hardhatConfig } from '@api3/contracts';
301+
console.log(hardhatConfig.blockscout());
302+
/*
303+
{
304+
enabled: true,
305+
customChains: [
306+
...
307+
]
308+
}
309+
*/
310+
```
311+
293312
### hardhatConfig.networks()
294313

295-
Returns an object where the key is each chain's alias and the value is an object that can be used as the `networks` field of [`hardhat.config.js`](https://hardhat.org/hardhat-runner/docs/config).
314+
Returns an object where the key is each chain's alias and the value is an object that can be used as the `networks` field of [`hardhat.config.js`](https://v2.hardhat.org/hardhat-runner/docs/config).
296315

297316
The default `url` values can be overridden with chain specific environment variables. These environment variables take the form of `HARDHAT_HTTP_RPC_URL_${toUpperSnakeCase(chain.alias)}`. e.g. `HARDHAT_HTTP_RPC_URL_ARBITRUM_SEPOLIA_TESTNET`.
298317

@@ -313,18 +332,16 @@ console.log(hardhatConfig.networks());
313332

314333
### hardhatConfig.etherscan()
315334

316-
Returns an object where the key is each chain's alias and the value is an object that can be used as the `etherscan` field of [`hardhat.config.js`](https://hardhat.org/hardhat-runner/docs/config) (requires the [`hardhat-etherscan` plugin](https://hardhat.org/hardhat-runner/plugins/nomiclabs-hardhat-etherscan)).
335+
Returns an object that can be used as the `etherscan` field of [`hardhat.config.js`](https://v2.hardhat.org/hardhat-runner/docs/config) (requires the [`hardhat-etherscan` plugin](https://v2.hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify)).
317336

318-
NOTE: [hardhat-etherscan](https://www.npmjs.com/package/@nomiclabs/hardhat-etherscan) requires us to use a dummy API key with Blockscout block explorer APIs. We use "DUMMY_VALUE" but it could have been anything else.
337+
It includes an `apiKey` field that can be set through the `ETHERSCAN_API_KEY` environment variable. And a `customChains` field that includes all chains that support Etherscan V2 contract verification API.
319338

320339
```ts
321340
import { hardhatConfig } from '@api3/contracts';
322341
console.log(hardhatConfig.etherscan());
323342
/*
324343
{
325-
apiKey: {
326-
'arbitrumSepolia': { ... }
327-
},
344+
apiKey: someApiKey,
328345
customChains: [
329346
...
330347
]
@@ -334,19 +351,16 @@ console.log(hardhatConfig.etherscan());
334351

335352
### hardhatConfig.getEnvVariableNames()
336353

337-
Returns an array of expected environment variable names for chains that have an API key required for the explorer. The array also includes a single `MNEMONIC` variable that can be used to configure all networks.
338-
339-
NOTE: Each `ETHERSCAN_API_KEY_` and `HARDHAT_HTTP_RPC_URL_` environment variable has the chain alias as a suffix, where the alias has been converted to upper snake case.
354+
Returns an API key required for Etherscan V2 contract verification API and a single `MNEMONIC` variable that can be used to configure all networks.
340355

341356
```ts
342357
import { hardhatConfig } from '@api3/contracts';
343358
console.log(hardhatConfig.getEnvVariableNames());
344359
/*
345360
[
346361
'MNEMONIC',
347-
'ETHERSCAN_API_KEY_ARBITRUM_SEPOLIA_TESTNET',
348-
...
349-
'HARDHAT_HTTP_RPC_URL_ARBITRUM_SEPOLIA_TESTNET',
362+
'ETHERSCAN_API_KEY',
363+
'HARDHAT_HTTP_RPC_URL_APECHAIN_ARBITRUM_SEPOLIA_TESTNET',
350364
...
351365
]
352366
*/
Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
{
22
"alias": "apechain-arbitrum-sepolia-testnet",
3+
"blockExplorerUrl": "https://curtis.apescan.io/",
34
"decimals": 18,
4-
"explorer": {
5-
"api": {
6-
"key": {
7-
"required": true
8-
},
9-
"url": "https://api-curtis.apescan.io/api"
10-
},
11-
"browserUrl": "https://curtis.apescan.io/"
12-
},
135
"id": "33111",
146
"name": "ApeChain testnet",
157
"providers": [
@@ -19,5 +11,8 @@
1911
}
2012
],
2113
"symbol": "APE",
22-
"testnet": true
14+
"testnet": true,
15+
"verificationApi": {
16+
"type": "etherscan"
17+
}
2318
}

data/chains/apechain.json

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
{
22
"alias": "apechain",
3+
"blockExplorerUrl": "https://apescan.io/",
34
"decimals": 18,
4-
"explorer": {
5-
"api": {
6-
"key": {
7-
"required": true
8-
},
9-
"url": "https://api.apescan.io/api"
10-
},
11-
"browserUrl": "https://apescan.io/"
12-
},
135
"id": "33139",
146
"name": "ApeChain",
157
"providers": [
@@ -26,14 +18,13 @@
2618
"homepageUrl": "https://alchemy.com"
2719
},
2820
{
29-
"alias": "blastapi",
30-
"homepageUrl": "https://blastapi.io"
31-
},
32-
{
33-
"alias": "drpc",
34-
"homepageUrl": "https://drpc.org"
21+
"alias": "tenderly",
22+
"homepageUrl": "https://tenderly.co/"
3523
}
3624
],
3725
"symbol": "APE",
38-
"testnet": false
26+
"testnet": false,
27+
"verificationApi": {
28+
"type": "etherscan"
29+
}
3930
}
Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
{
22
"alias": "arbitrum-sepolia-testnet",
3+
"blockExplorerUrl": "https://sepolia.arbiscan.io/",
34
"decimals": 18,
4-
"explorer": {
5-
"api": {
6-
"key": {
7-
"hardhatEtherscanAlias": "arbitrumSepolia",
8-
"required": true
9-
},
10-
"url": "https://api-sepolia.arbiscan.io/api"
11-
},
12-
"browserUrl": "https://sepolia.arbiscan.io/"
13-
},
145
"id": "421614",
156
"name": "Arbitrum testnet",
167
"providers": [
@@ -24,5 +15,8 @@
2415
}
2516
],
2617
"symbol": "ETH",
27-
"testnet": true
18+
"testnet": true,
19+
"verificationApi": {
20+
"type": "etherscan"
21+
}
2822
}

data/chains/arbitrum.json

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
{
22
"alias": "arbitrum",
3+
"blockExplorerUrl": "https://arbiscan.io/",
34
"decimals": 18,
4-
"explorer": {
5-
"api": {
6-
"key": {
7-
"hardhatEtherscanAlias": "arbitrumOne",
8-
"required": true
9-
},
10-
"url": "https://api.arbiscan.io/api"
11-
},
12-
"browserUrl": "https://arbiscan.io/"
13-
},
145
"id": "42161",
156
"name": "Arbitrum One",
167
"providers": [
@@ -19,12 +10,8 @@
1910
"rpcUrl": "https://arb1.arbitrum.io/rpc"
2011
},
2112
{
22-
"alias": "blastapi",
23-
"homepageUrl": "https://blastapi.io"
24-
},
25-
{
26-
"alias": "drpc",
27-
"homepageUrl": "https://drpc.org"
13+
"alias": "publicnode",
14+
"rpcUrl": "https://arbitrum-one-rpc.publicnode.com"
2815
},
2916
{
3017
"alias": "quicknode",
@@ -33,8 +20,15 @@
3320
{
3421
"alias": "reblok",
3522
"homepageUrl": "https://reblok.io"
23+
},
24+
{
25+
"alias": "blockpi",
26+
"homepageUrl": "https://blockpi.io"
3627
}
3728
],
3829
"symbol": "ETH",
39-
"testnet": false
30+
"testnet": false,
31+
"verificationApi": {
32+
"type": "etherscan"
33+
}
4034
}

0 commit comments

Comments
 (0)