tokenlog icon indicating copy to clipboard operation
tokenlog copied to clipboard

Allow token network to be defined in tokenlog.json

Open danfinlay opened this issue 3 years ago • 2 comments
trafficstars

Currently supported networks are hardcoded into the tokenlog source code, but ideally the tokenlog.json could support any network.

danfinlay avatar Jan 06 '22 19:01 danfinlay

Any tips on what would need to be changed to make the backend network-agnostic, and default to the tokenlog file?

Could draw from https://github.com/ethereum-lists/chains for additional info (like a provider URI).

danfinlay avatar Jan 06 '22 21:01 danfinlay

Hi Dan, thanks again for the PR #52 That should've solved this already actually. Only the build was broken / so didn't get deployed correctly.

You can configure your repo as described on the main README. Adding a chainId (137) to use with Polygon

{
    "org": "commons-stack",
    "repo": "iteration0",
    "tokenAddress": "0xc4fbE68522ba81a28879763C3eE33e08b13c499E",
    "labels": ["For Contributors"],
    "votingMethod": "STANDARD",
    "chainId": 100
}

Commonstack is a good example that uses a different chain (xdai) E.g. https://tokenlog.xyz/commons-stack/iteration0

The active connection is picked up from your own Web3 provider though.

E.g. image Polygon selected in Metamask, but Commonstack is configured for xdai

I'll leave this open tho to maybe integrate with Ethereum-lists. That's a good suggestion!

wslyvh avatar Jan 11 '22 09:01 wslyvh