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

feat: add mainnet config #322

Merged
merged 5 commits into from
Apr 23, 2020
Merged

feat: add mainnet config #322

merged 5 commits into from
Apr 23, 2020

Conversation

bowenwang1996
Copy link
Contributor

@bowenwang1996 bowenwang1996 commented Apr 21, 2020

Add mainnet config for production environment. Also change testnet config urls.

config.js Outdated Show resolved Hide resolved
config.js Outdated
return {
networkId: 'default',
networkId: 'mainnet',
nodeUrl: 'https://rpc.nearprotocol.com',
contractName: CONTRACT_NAME,
walletUrl: 'https://wallet.nearprotocol.com',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would be a problem given these are URLs for testnet wallet, helper and RPC right now.

I think we might need to do update in steps:

  1. update both production and development to point to testnet URLs. This will need to happen not only in near-shell, but in all examples as well.
  2. after 1) we need to disable wallet.nearprotocol.com, helper.nearprotocol.com and rpc.nearprotocol.com (get everybody who tries hitting them error with instructions to switch to testnet). For Wallet we'll need some key migration strategy.
  3. after enough time passed for 2) to affect anybody active enough (and when wallet is ready for mainnet) – we can bring up these endpoints and update production to mean mainnet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but this means that near-shell will be hard to use for mainnet for a while

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plan on the wallet side is to have a landing page for mainnet to inform people that mainnet wallet is not ready yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but this means that near-shell will be hard to use for mainnet for a while

@bowenwang1996 I think we should add explicit mainnet and testnet as part of (1).

The plan on the wallet side is to have a landing page for mainnet to inform people that mainnet wallet is not ready yet.

this is not enough if we don't want people to lose their testnet accounts at wallet.nearprotocol.com (though if we put on landing page and nobody complains – maybe we shouldn't care :D).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, let's start with:

  • rpc.mainnet.nearprotocol.com
  • wallet.mainnet.nearprotocol.com

While we are migrating.

Migrating default is indeed important. Let's may be add temporary message that when you call it first time with default asks - if you are using mainnet or testnet? If they say testnet it renames default into testnet.

Ideally we should stop using NODE_ENV as it's very weird. And instead adopt something like near network testnet/mainnet. Then if network is not selected at the start, it can list all networks and ask to select one.

@bowenwang1996 I think for first 1-2 weeks it's fine if to use MainNet ppl need to set it up. It's going to be mostly us and few initial developers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed the urls to have mainnet in them. What should I do about default?

@vgrichina vgrichina merged commit 82ac910 into master Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants