-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3907 from TrueBlocks/goMaker-4
Many changes to improve usability for browse
- Loading branch information
Showing
48 changed files
with
353 additions
and
631 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule examples
updated
16 files
+2 −2 | balanceChart/go.mod | |
+4 −4 | balanceChart/go.sum | |
+2 −2 | cancelContext/go.mod | |
+4 −4 | cancelContext/go.sum | |
+2 −2 | comparison/go.mod | |
+4 −4 | comparison/go.sum | |
+2 −2 | findFirst/go.mod | |
+4 −4 | findFirst/go.sum | |
+1 −1 | four_bytes/go.mod | |
+2 −2 | four_bytes/go.sum | |
+2 −2 | nameManager/go.mod | |
+4 −4 | nameManager/go.sum | |
+2 −2 | simple/go.mod | |
+4 −4 | simple/go.sum | |
+2 −2 | withStreaming/go.mod | |
+4 −4 | withStreaming/go.sum |
Submodule node
updated
4 files
+2 −1 | app/app_config.go | |
+2 −5 | go.mod | |
+2 −14 | go.sum | |
+0 −26 | utils/utils.go |
Submodule sdk
updated
6 files
+6 −18 | config.go | |
+2 −2 | config_internal.go | |
+1 −1 | go.mod | |
+2 −2 | go.sum | |
+1 −0 | python/src/_config.py | |
+3 −2 | typescript/src/paths/config.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package configPkg | ||
|
||
import ( | ||
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/config" | ||
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/output" | ||
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/types" | ||
) | ||
|
||
// HandleDump dumps a config to the screen | ||
func (opts *ConfigOptions) HandleDump(rCtx *output.RenderCtx) error { | ||
fetchData := func(modelChan chan types.Modeler, errorChan chan error) { | ||
config := *config.GetRootConfig() | ||
s := types.Config{ | ||
Version: config.Version, | ||
Settings: config.Settings, | ||
Keys: config.Keys, | ||
Pinning: config.Pinning, | ||
Unchained: config.Unchained, | ||
Chains: config.Chains, | ||
} | ||
modelChan <- &s | ||
} | ||
|
||
opts.Globals.NoHeader = true | ||
return output.StreamMany(rCtx, fetchData, opts.Globals.OutputOpts()) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package rpc | ||
|
||
import ( | ||
"bytes" | ||
"context" | ||
"fmt" | ||
"net/http" | ||
"time" | ||
) | ||
|
||
// PingRpc sends a ping request to the RPC provider, returns an error or nil on success. | ||
func PingRpc(providerUrl string) error { | ||
// Set a timeout of, for example, 2 seconds for the request | ||
ctx, cancel := context.WithTimeout(context.Background(), 2000*time.Millisecond) | ||
defer cancel() | ||
|
||
jsonData := []byte(`{ "jsonrpc": "2.0", "method": "web3_clientVersion", "id": 6 }`) | ||
req, err := http.NewRequestWithContext(ctx, "POST", providerUrl, bytes.NewBuffer(jsonData)) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
req.Header.Set("Content-Type", "application/json") | ||
|
||
clientHTTP := &http.Client{} | ||
resp, err := clientHTTP.Do(req) | ||
if err != nil { | ||
// If the context timeout triggers, this error will reflect it | ||
return err | ||
} | ||
defer resp.Body.Close() | ||
|
||
if resp.StatusCode != http.StatusOK { | ||
return fmt.Errorf("unexpected status code: %d", resp.StatusCode) | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.