Default Testnet Factory Contract Is Not Available
Describe the bug The default Testnet factory contract is not available.
To Reproduce Steps to reproduce the behavior:
- Clone the repo
- Run npm install
- Configure env files as required
- Run npm run start in "web" subdirectory
- Select HashPack wallet
- Select Testnet and click Accept
Expected behavior No 404 error to be displayed regarding the factory contract.
Screenshots
Via Web UI:
Desktop (please complete the following information):
- OS: WSL2 (Ubuntu 22.04.3 LTS) under Windows 11 (22631.3155)
- Browser: Brave
- Version: v1.63.165 (Chromium 122.0.6261.94)
Additional context
- The current, unavailable, Testnet factory is listed at: https://github.com/hashgraph/stablecoin-studio/tree/main/cli#factories
- The contract id can be seen as unavailable at: https://hashscan.io/testnet/search-result/0.0.14455068
@app-matt the Testnet Factory proxy address we deployed after the testnet reset is : 0.0.2167166. could you set it in your .env and test again (we will update the documentation during the day since we noticed that it is still displaying the old address)
Thank you for the info 🙌
It looks like that resolves the testnet contract issue (pending the docs being updated).
I seem to receive a different error now ("The RPC service is not working as expected") related to the RPC service (it appears its looking for a local instance at http://127.0.0.1:7546/api despite pointing at the public RPC in the .env file) - shall I raise a separate issue for this?
EDIT: I'd actually gotten the env config slightly wrong, so I updated that and see a different error ("could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)")
@app-matt could you provide your .env file so that we can check it?
Sure, here's the one for the web module...
# Log level for the application. The default value is ERROR.
# Acceptable values are ERROR, WARN, INFO, HTTP, VERBOSE, DEBUG and SILLY in order of priority (highest to lowest).
REACT_APP_LOG_LEVEL=ERROR
# JSON array with a factory id in Hedera format `0.0.XXXXX` per environment.
REACT_APP_FACTORIES='[{"Environment":"testnet","STABLE_COIN_FACTORY_ADDRESS":"0.0.2167166"}]'
# The var must be a unique mirror node service for Hedera network, and this is the service which would be used when the UI starts. If the service doesn't require an API key to authorize requests, the API_KEY and HEADER properties must remain empty.
REACT_APP_MIRROR_NODE='[{"Environment":"testnet","BASE_URL":"https://testnet.mirrornode.hedera.com/api/v1/", "API_KEY": "", "HEADER": ""}]'
# The var must be a unique RPC node service for Hedera network, and this is the service which would be used when the UI starts. If the service doesn't require an API key to authorize requests, the API_KEY and HEADER properties must remain empty.
REACT_APP_RPC_NODE='[{"Environment":"testnet","BASE_URL":"https://testnet.hashio.io/api", "API_KEY": "", "HEADER": ""}]'
# This is a proprietary Create React App configuration. You can read more information in its documentation.[Create React App documentation](https://create-react-app.dev/docs/advanced-configuration/)
GENERATE_SOURCEMAP=false
REACT_APP_SHOW_CONFIG=true
I see that you are missing "mainnet" in your .env file, try adding it to see if it solves the issue :
# Log level for the application. The default value is ERROR.
# Acceptable values are ERROR, WARN, INFO, HTTP, VERBOSE, DEBUG and SILLY in order of priority (highest to lowest).
REACT_APP_LOG_LEVEL=ERROR
# JSON array with a factory id in Hedera format `0.0.XXXXX` per environment.
REACT_APP_FACTORIES='[{"Environment":"mainnet","STABLE_COIN_FACTORY_ADDRESS":"0.0.2167166"}, {"Environment":"testnet","STABLE_COIN_FACTORY_ADDRESS":"0.0.2167166"}]'
# The var must be a unique mirror node service for Hedera network, and this is the service which would be used when the UI starts. If the service doesn't require an API key to authorize requests, the API_KEY and HEADER properties must remain empty.
REACT_APP_MIRROR_NODE = '[{"Environment":"mainnet","BASE_URL":"https://mainnet.mirrornode.hedera.com/api/v1/", "API_KEY": "", "HEADER": ""},{"Environment":"testnet","BASE_URL":"https://testnet.mirrornode.hedera.com/api/v1/", "API_KEY": "", "HEADER": ""}]'
REACT_APP_RPC_NODE = '[{"Environment":"mainnet","BASE_URL":"https://mainnet.hashio.io/api/", "API_KEY": "", "HEADER": ""},{"Environment":"testnet","BASE_URL":"https://testnet.hashio.io/api", "API_KEY": "", "HEADER": ""}]'
# This is a proprietary Create React App configuration. You can read more information in its documentation.[Create React App documentation](https://create-react-app.dev/docs/advanced-configuration/)
GENERATE_SOURCEMAP=false
REACT_APP_SHOW_CONFIG=true
@AlbertoMolinaIoBuilders - updated to include the mainnet value too but still seeing the issue, and also still seeing failed connection attempts to a local RPC address
Sharing this screenshot for full visibility...
Again just let me know if you want me to raise a new / fresh issue for this.
@app-matt yes please open a new issue, it's very strange, it should only take the local rpc node if you explicitly set it in your .env file or if you do not configure anything at all (in which case the local rpc is set as the default node). Let's continue the discussion in a new issue.
@AlbertoMolinaIoBuilders - this side issue has been resolved in the latest build / test - thank you! 🙌
I'll leave the issue open as a reminder to update the new testnet factory proxy address in the various docs 🙏 But please feel free to close it otherwise 😄