Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding network id to auto-generated Contracts object #336

Open
filippsen opened this issue Jan 10, 2019 · 1 comment
Open

Consider adding network id to auto-generated Contracts object #336

filippsen opened this issue Jan 10, 2019 · 1 comment
Labels
feature-request New feature or request

Comments

@filippsen
Copy link
Contributor

filippsen commented Jan 10, 2019

Summary

Add networkId string field (as number) to auto-generated Contracts data object (usually accessed via this.Contract).
In src/deployer.js:

(function(module, Contracts) {
var data={
...
address: "0x0...",
transactionHash: "0x0...",
network: "rinkeby",
networkId: "4"
...

Motivation

Use network id as returned by RPC {network : 4} for Rinkeby.

I prefer exporting ABI, contract address and transaction hash to a new JSON, skipping dependencies on built-in dapp and fallback to web3 contracts using ABI and contract address. The transaction hash is used to verify chain/network id, together with contract address.

Further information

Network id is also refered to as chain id (chainId).

Further reference: https://github.com/ethereum/wiki/wiki/JSON-RPC#net_version

@filippsen filippsen added the feature-request New feature or request label Jan 10, 2019
@filippsen
Copy link
Contributor Author

Related: #335

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant