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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 5, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@api3/chains ^2.1.0 -> ^3.0.0 age adoption passing confidence

Release Notes

api3dao/chains (@​api3/chains)

v3.0.0: Version 3.0.0

Compare Source

Breaking Changes

Hardhat config functions have been renamed
// Hardhat related functions now live inside the `hardhatConfig` object
- import { hardhatConfigNetworks, hardhatEtherscan } from '@​api3/chains';
+ import { hardhatConfig } from '@​api3/chains';

// Networks
- hardhatConfigNetworks();
+ hardhatConfig.networks();

// Etherscan
- hardhatEtherscan();
+ hardhatConfig.etherscan();

The result of this is that you should now be able to import and use these values without any additional configuration.

// hardhat.config.js
const api3Chains = require('@​api3/chains');

const etherscan = api3Chains.hardhatConfig.etherscan();
const networks = api3Chains.hardhatConfig.networks();

module. exports = {
  ...,
  networks,
  etherscan,
};
getEnvVariables renamed and moved to hardhatConfig
- import { getEnvVariables } from '@​api3/chains';
+ import { hardhatConfig } from '@​api3/chains';

// Usage
- getEnvVariables();
+ hardhatConfig.getEnvVariableNames();
Environment variable names updated

Environment variables now use a chain alias that has been converted to upper snake case

// before
getEnvVariables();
// ['MNEMONIC', 'ETHERSCAN_API_KEY_arbitrum-goerli-testnet', ...]

// after
hardhatConfig.getEnvVariableNames();
// ['MNEMONIC', 'ETHERSCAN_API_KEY_ARBITRUM_GOERLI_TESTNET', ...]
Removed
  1. getChainByAlias has been removed. Use CHAINS.find((chain) => chain.alias === alias) in your code instead
  2. Removed the yarn env:write script. Call hardhatConfig.getEnvVariableNames(); and implement the code to write to a file instead.

Non-breaking Changes

Etherscan API key values

When calling hardhatConfig.etherscan(), apiKey values will attempt to be sourced from process.env where the keys matches the values output from hardhatConfig.getEnvVariableNames();. If no environment variable is found, it will output the apiKey values as NOT_FOUND.

testnet boolean added to each chain

Each chain now has a new boolean field called testnet to indicate whether or not it is a testnet chain.

Updated Chains
  1. boba-moonbeam has been removed.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team July 5, 2023 15:05
@dcroote dcroote self-assigned this Jul 5, 2023
@dcroote dcroote requested a review from andreogle July 6, 2023 04:40
@dcroote
Copy link
Contributor

dcroote commented Jul 6, 2023

@andreogle - I added a few small fixes for the v3.0.0 upgrade if you wouldn't mind a very quick review

@renovate
Copy link
Contributor Author

renovate bot commented Jul 6, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

packages/airnode-protocol/hardhat.config.js Outdated Show resolved Hide resolved
@dcroote dcroote requested a review from andreogle July 13, 2023 04:47
Copy link
Member

@andreogle andreogle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪🏻

@dcroote dcroote merged commit cd8a30d into master Jul 13, 2023
@dcroote dcroote deleted the renovate/api3-chains-3.x branch July 13, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants