0.0.25 • Published 7 months ago
@unlock-protocol/networks v0.0.25
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.25
7 months ago
0.0.24
7 months ago
0.0.23
1 year ago
0.0.21
1 year ago
0.0.22
1 year ago
0.0.20
1 year ago
0.0.19
2 years ago
0.0.16
2 years ago
0.0.18
2 years ago
0.0.15
2 years ago
0.0.12
2 years ago
0.0.13
2 years ago
0.0.11
2 years ago
0.0.10
2 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.7
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago