0.0.23 • Published 28 days ago

@unlock-protocol/networks v0.0.23

Weekly downloads
-
License
-
Repository
github
Last release
28 days ago

Networks

Contains useful addresses and info about Unlock on different networks.

Usage

// by name
import { goerli } from '@unlock-protocol/networks'

// prefix by chain id
import networks from '@unlock-protocol/networks'
console.log(networks[1].name) // mainnet

Dev

yarn start

Localhost

You can create a localhost network file with the following command:

# create file
yarn create-localhost <unlockAddress> <subgraphEnpoint>

# export file by appending to network index
echo "export * from './localhost'" >> src/networks/index.ts

# rebuild
yarn build

Read Unlock Address from a file

Optionally, you can parse the Unlock address from a subgraph manifest file formatted as follow

{
  "localhost": {
    "Unlock": { "address": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6" }
  }
}

with the following command

yarn workspace @unlock-protocol/networks unlock-address <filepath>.json

Scripts

  • Check that networks are configured correctly: yarn run check. Some networks might be missing some properties.

  • Check that all tokens have the right values (symbol, name, decimals): yarn run check-tokens (Use this Dune Dashboard to find popular coins!)

0.0.23

28 days ago

0.0.21

2 months ago

0.0.22

2 months ago

0.0.20

4 months ago

0.0.19

5 months ago

0.0.16

9 months ago

0.0.18

7 months ago

0.0.15

12 months ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago