JoinColony / purser

Interact with Ethereum wallets easily
https://joincolony.github.io/purser
MIT License
84 stars 21 forks source link

Add (basic) custom chain support (e.g. Görli) #261

Closed JamesLefrere closed 5 years ago

JamesLefrere commented 5 years ago

This PR adds basic support for custom chains (i.e. anything but the default for ethereumjs-tx, which is mainnet). This is done by using the ethereumjs-common package to define a chain definition based on a default: either mainnet for chain IDs 1 (mainnet) and 1337 (local/private), or 5 for goerli. Other chain IDs are sent as-is, which may cause validation errors if they are not supported by ethereumjs-common.

Ideally, all chain definition should all be configurable when signing a transaction, but that would require a fairly significant API change.

Additions

Changes