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 v4 #1916

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 24, 2023

Mend Renovate logo banner

This PR contains the following updates:

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

Release Notes

api3dao/chains (@​api3/chains)

v4.1.0

Compare Source

New Features

Optional Viem config environment variable support

viemConfig.chains() now (optionally) supports adding additional rpcUrls values using specific environment variables. These environment variables take the form of API3_CHAINS_HTTP_RPC_URL_${toUpperSnakeCase(chain.alias)}. When a matching value is detected, a new environment key is added to rpcUrls.

NOTE: you can still access the existing provided default and public values, as these are not affected.

For example, the new rpcUrls object will look like:

{
  default: { http: ['https://existing-rpc.xyz'] },
  public: { http: ['https://existing-rpc.xyz'] },
+ environment: { http: ['https://custom-rpc.xyz'] },
}

v4.0.0

Compare Source

Breaking changes

providerUrl is now a providers array

providerUrl has been replaced with a providers array to allow for more than 1 RPC provider. Each provider object has the following interface:

interface ChainProvider {
  alias: string;
  homepageUrl?: string;
  rpcUrl?: string;
}

NOTE:

  • Each chain MUST have at least one provider with an alias of default
  • rpcUrl is optional to allow for values that may contain a sensitive API key in the URL

You can migrate existing providerUrl code with the following snippet

- chain.providerUrl
+ chain.providers.find((p) => p.alias === 'default')!.rpcUrl!;

New Features

Viem Config support

You can now generate chains compatible with Viem/Wagmi

import { viemConfig } from '@​api3/chains';
console.log(viemConfig.chains());
/*
[
  {
    id: 421613,
    name: 'arbitrum-goerli-testnet',
    network: 'arbitrum-goerli-testnet',
    nativeCurrency: { ... },
    rpcUrls: { default: ..., public: ... }
    blockExplorers: { default: ..., public: ... }
    ...
  },
  ...
]
*/

Updated Chains

In all cases, the alias value is unchanged

  1. RSK renamed to Rootstock and has a new default RPC URL
  2. RSK Testnet renamed to Rootstock Testnet and has a new default RPC URL
  3. Arbitrum renamed to Arbitrum One
  4. BSC renamed to BNB Smart Chain
  5. BSC Testnet renamed to BNB Smart Chain Testnet

Miscellaneous

zkSync hardhat config overrides

zkSync (and zkSync Testnet) require additional fields for use with Hardhat. These fields are now included with the respective chain definitions and used when generating the Hardhat config.

See issue: https://github.com/api3dao/chains/issues/55 and the chain definitions for more information


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.

Copy link
Contributor

@dcroote dcroote left a comment

Choose a reason for hiding this comment

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

LGTM

@dcroote dcroote merged commit 3a05d77 into master Nov 27, 2023
26 checks passed
@dcroote dcroote deleted the renovate/api3-chains-4.x branch November 27, 2023 05:48
Ashar2shahid pushed a commit that referenced this pull request Jan 18, 2024
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

1 participant