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

chore(deps): update dependency @api3/chains to v3 #1824

Merged
merged 6 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/wild-planets-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@api3/airnode-protocol': patch
---

Update airnode-protocol scripts with @api3/chains v3.0.0 changes
4 changes: 2 additions & 2 deletions packages/airnode-protocol/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require('hardhat-gas-reporter');
const api3Chains = require('@api3/chains');
require('dotenv').config();

const { apiKey: etherscanApiKey, customChains: etherscanCustomChains } = api3Chains.hardhatEtherscan();
const { apiKey: etherscanApiKey, customChains: etherscanCustomChains } = api3Chains.hardhatConfig.etherscan();
dcroote marked this conversation as resolved.
Show resolved Hide resolved
const etherscan = {
apiKey: Object.entries(etherscanApiKey).reduce((populatedApiKey, etherscanApiKeyEntry) => {
const hardhatEtherscanChainAlias = etherscanApiKeyEntry[0];
Expand All @@ -22,7 +22,7 @@ const etherscan = {
customChains: etherscanCustomChains,
};

const networks = Object.entries(api3Chains.hardhatConfigNetworks()).reduce((networksWithMnemonic, networkEntry) => {
const networks = Object.entries(api3Chains.hardhatConfig.networks()).reduce((networksWithMnemonic, networkEntry) => {
const chainAlias = networkEntry[0];
const network = networkEntry[1];
networksWithMnemonic[chainAlias] = {
Expand Down
2 changes: 1 addition & 1 deletion packages/airnode-protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"write-example-env-file": "hardhat run scripts/write-example-env-file.ts"
},
"devDependencies": {
"@api3/chains": "^2.1.0",
"@api3/chains": "^3.1.0",
"@nomiclabs/hardhat-ethers": "^2.2.3",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"@nomiclabs/hardhat-waffle": "^2.0.6",
Expand Down
4 changes: 2 additions & 2 deletions packages/airnode-protocol/scripts/write-example-env-file.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as fs from 'fs';
dcroote marked this conversation as resolved.
Show resolved Hide resolved
import * as api3Chains from '@api3/chains';
import { hardhatConfig } from '@api3/chains';

fs.writeFileSync(
'example.env',
api3Chains.getEnvVariables().reduce((fileContents: string, envVariableName: string) => {
hardhatConfig.getEnvVariableNames().reduce((fileContents: string, envVariableName: string) => {
return fileContents + `${envVariableName}=""\n`;
}, '')
);
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
dependencies:
"@openzeppelin/contracts" "4.8.2"

"@api3/chains@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@api3/chains/-/chains-2.1.0.tgz#67219e94e3301378a14ba81d50d4740e093d5678"
integrity sha512-u/YIE6aXsoHssSc1kir0Ws/12oYEIFPIMm5yDxC6TxL0upglasmYx0vrty40QVaksgsavva/CQNme+zwdJy4yA==
"@api3/chains@^3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@api3/chains/-/chains-3.1.0.tgz#37ae1a6c3d5419616d26a0340364587cbb81df86"
integrity sha512-lXEL6Of+Kcesb9j8LfTelttQwwVgYKU3Em5C7uiKofr3mSsxw3X0oaMRiAZBIRlCD7tuNWCXJx4wGmRcyFj+uA==
dependencies:
zod "^3.21.4"

Expand Down