npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@infinex/infinex-sdk

v1.2.4

Published

The Infinex SDK provides a comprehensive toolkit for interacting with the Infinex multichain ecosystem. It supports a wide range of blockchain networks and allows for seamless integration with Infinex contracts. This README provides an overview of the SDK

Downloads

74

Readme

Infinex SDK

The Infinex SDK provides a comprehensive toolkit for interacting with the Infinex multichain ecosystem. It supports a wide range of blockchain networks and allows for seamless integration with Infinex contracts. This README provides an overview of the SDK's capabilities, installation instructions, usage examples, and configuration options.

Installation

To install dependencies

pnpm i

To fetch the latest address from cannon

pnpm run fetch:addresses

To process abis from /out

pnpm run sdk:build

Overview

.env.*

  • For now we have mapped enviroments to our deployed enviroments. Which are:
    • dev
    • test
    • staging
    • prod
  • Each enviroment will hold the addresses for the deployed contracts.

/chains

  • A list of chains that are configured with a set of enviroment variables. These will eventually be in side the deployments repo and injected in. At the moment you will need to have all the .env vars pnpm run fetch:address will give you all the evm address needed to start.

  • Chains are configured with most of the default contracts and account you will need per chain. Theres no ambguity about which address are needed and which are not.

  • As the contracts are worked on the sdk will add the necessary address to keep up to date with the interfaces and contracts

/contracts

/utils

  • Utility functions to help testing and running functions against the contracts.

    • initEvmChains()
    • selectChains(['arbitrum'])
    • createForwardRequest({ from, to, data, signer })

Adding contracts

To add new contracts, follow these steps:

  1. Add the contract to the .env.*.template if theres multiple contracts please update each enviroment.
    1. Prefix the ADDRESS with the chain its on ie: base = BASE
  2. Add the contract in the contracts folder. Copy an exsisting contract in that folder.
  3. Add that contract name prefixed with the chain to the /env types and to /schema to catch missing contract addresses.
  4. Add the /out contract name for example AccountFactory to the the config contract list.
  5. Run the pnpm run build build to copy and format the abi

Building the addresses

Under the hood we currently use cannon to do deployments and we deploy, local / testnet / mainnet / forked-mainnet each env will have different addresses therefore we need to build and fetch the addresses for any enviroment.

The addresses are stored in a cache if not published to usecannon.com. In order to fetch the addresses, we want we should update the src code as followed:

./scripts/getPublishedContracts */

pnpm run fetch:addresses --package-scope="infinex-multichain" --package-version="latest" --include-chains="arbitrum, ethereum, base"

Fetching all chains

pnpm run fetch:addresses --package-scope="infinex-multichain" --package-version="latest"

All the addrsses will be here

./deployments/addresse.txt

# Scope: infinex-multichain

## Version: latest

### Chain: arbitrum-sepolia

ARBITRUM_FORWARDER_ADDRESS='0x5c593fdE5a2C8d9C6A2C7785490dd879E01e1a74'
ARBITRUM_ACCOUNT_FACTORY_ADDRESS='0x628cF9F21731E56E63768Ce993cBAF70A7C52cA4'
ARBITRUM_INFINEX_PROTOCOL_CONFIG_BEACON_ADDRESS='0x2b8587b08bB3DB1fA969792A255b2dC6385266A9'