question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add utility to get configured network

See original GitHub issue

FCL Scripts might rely on and import deployed contracts. We need a reliable way to get configured access node network for use in importing contracts conditionally based on this network.

There is an issue in the pipeline to add an endpoint to the configured access node which will return necessary info. We should implement a temporary fix that can be used throughout the lib and replaced asap.

It can be based on the current pattern, which checks for flow.network in FCL config and throws if not set.

It might include a call to a known account on a maininet (FLOW Token Address), and fall back to testnet if account doesn’t exist.

const network = await config.get("flow.network")

invariant(
  network,
  "FCL configureDependencies Error: Missing configuration value for 'flow.network'"
)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bluesigncommented, Aug 22, 2022

Those are network codewords, by xoring with 0xe467b9dd11fa00df you get the account at index 1. which is Service Account

This depends on FVM behavior, though I don’t think it will change. ( just incase I cc @janezpodhostnik )

0reactions
chaseflemingcommented, Sep 23, 2022

@gregsantos @huyndo Send it in the Discovery API call to in discovery/services.js as well. I could see it being useful there. For example, if you wanted to call a generic Discovery endpoint without specifying the network on the url path and it is smart about figuring out which to return based on that. Some of these should probably come from one place so we don’t forget to keep updating both. Maybe a shared function for pulling client config.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure a utility network—ArcGIS Pro | Documentation
A utility network can be created and configured manually to meet specific asset management requirements, business demands, and modeling needs.
Read more >
Introducing Utility Network Configurations - Esri
Each Utility Network Configuration provides the baseline to get typical real-world network behavior and support the most common GIS workflows and analytics.
Read more >
Using the Network Configuration Utility - StorageCraft Support
a. Enter a name in the Domain/server name field, then click Add. The NCU browses the network and locates all resources in the...
Read more >
Network Command Line Utility - NCLU | Cumulus Linux 4.1
The Network Command Line Utility (NCLU) is a command line interface that simplifies the networking configuration process for all users.
Read more >
Configure and start your license server - Autodesk
To configure a Windows server · Open the LMTOOLS utility. · From the Service/License File tab, verify that the Configuration Using Services option...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found