@trustswap/teamfinance-chains v2.2.13
@trustswap/teamfinance-chains
Package that contains list of supported chains by Team Finance, as well as various public, up-to-date contract addresses provided by Team Finance/TrustSwap. This is meant to be shared among our codebase.
Installation
Using npm
npm i @trustswap/teamfinance-chains
or yarn
yarn add @trustswap/teamfinance-chains
Bump version
# edit version of `package.json`
npm i
# commit files
Usage
There are several exported modules from this library, main ones are chains
and contracts
. Their sample usage is as below:
import { chains, contracts } from "@trustswap/teamfinance-chains";
const lockContractForAvalanche =
contracts.lockContracts[chains.evmMainnetChainsMap.avalanche.chainId]
.contractAddress;
console.log("Contract", lockContractForAvalanche); // 0xe2fe530c047f2d85298b07d9333c05737f1435fb
Recent changelog
- 2.2.0: Add
safeMultisigDeployments
as Safe Multisig Deployment address database, for some chains. Details here.
2.0 breaking changes
- There is only one source-of-truth for typing now:
types.ts
- Main keys the objects are in hex format.
2.2.11 breaking changes
- Change
multisigChainInfo
tomultisigChains
Contributing
- This package is written in TypeScript to make sure type-safe nature of the codebases, therefore no
any
is allowed. - Please don't add anything sensitive (api keys, secrets,...) into the codebase as it is publicly available on npm. After deployment, it is available on the web and anyone can see those.
- Since it contains mostly static data, there is no unit testing required for now.
- The package is automatically published to NPM upon these conditions (both):
- A new commit on
main
branch - The
version
field inpackage.json
is different from any of the published versions on NPM.
- A new commit on
- On contract addresses object, consider using the chain ID as the key, since each chain has unique chain ID and we can make use of functions in
Object
prototype of Javascript itself. - The chain IDs in the objects should be in hex format, and in lower case.
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
1 year ago
1 year ago