Skip to content

projects(silverswap): Nibiru has a SilverSwap deployment on mainnet #14863

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

Closed
wants to merge 1 commit into from

Conversation

Unique-Divine
Copy link
Contributor

@Unique-Divine Unique-Divine commented May 30, 2025

Context

  1. SilverSwap is live on Nibiru mainnet. This pull request seeks to add the
    factory address and use the Algebra and Uniswap V3 helper.
  2. ✅ Initially blocked by the below issue with a missing chain ID for "nibiru", however this was resolved in @defillama/sdk v5.0.143. DeFiLlama correctly shows a chain ID 6900 for "nibiru" now.
    node test.js projects/silverswap/index.js 2>&1

[Info on the Prior Blocker with the Missing Chain ID in the DeFiLLama SDK]

Several TVL Adapters are blocked by chain "nibiru":

  1. Missing its chainId field on the ChainApi (api) object, and
  2. Having the default value of 400069 as the chainId on the LlamaProvider

This can be seen from console logging the api object in the downstream repos.
For example, this is from the uniV3Export helper in the adapters repo:

// DEBUG uniV3Export forEach 
{
  chain: 'nibiru',
  fromBlock: 19674297,
  api: <ref *1> ChainApi {
    block: undefined,
    chain: 'nibiru',
    timestamp: 1747982188,
    provider: LlamaProvider {
      quorum: 1,
      eventQuorum: 1,
      eventWorkers: 1,
      isCustomLlamaProvider: true,
      rpcs: [
        {
          url: 'https://evm-rpc.nibiru.fi',
          provider: JsonRpcProvider {}
        },
        [length]: 1
      ],
      archivalRPCs: [ [length]: 0 ],
      chainName: 'nibiru',
      chainId: 400069,
      _isReady: Promise { undefined },
      [providerConfigs]: [Getter],
      [pollingInterval]: [Getter],
      [provider]: [Getter],
      [plugins]: [Getter],
      [disableCcipRead]: [Getter/Setter],
      [destroyed]: [Getter],
      [paused]: [Getter/Setter]
    },
    _balances: Balances { chain: 'nibiru', timestamp: 1747982188, _balances: {} },
    chainId: undefined,
    storedKey: 'nibiru',
    api: [Circular *1]
  }
}: 

@llamabutler
Copy link

Error while running adapter at :

Please revert changes to package.json / package-lock.json

@noateden noateden self-assigned this May 31, 2025
@noateden
Copy link
Contributor

hi @Unique-Divine, we have already support nibiru chain in sdk. But seem likely the nibiru chain rpc is not working with this adapter, can you pls help to check?

@Unique-Divine
Copy link
Contributor Author

Unique-Divine commented Jun 2, 2025

hi @Unique-Divine, we have already support nibiru chain in sdk. But seem likely the nibiru chain rpc is not working with this adapter, can you pls help to check?

There's a problem with the SDK because it still says the "nibiru" chain ID is blank, which is preventing us from adding EVM adapters that use the LlamaProvider or ChainApi objects for computations.

A fix was added in @defillama/sdk v5.0.143, however that version isn't used in the package-lock.json. Am I allowed to run npm update @defillama/sdk to update the dependency?

It says that's fine in the README, but doing so will make the GitHub action fail and prevent this pull request from being reviewed.

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