Skip to content

Commit

Permalink
Feature/fix location of sdk 2 (#3603)
Browse files Browse the repository at this point in the history
* Fixes code generator

* Removes existing examples folder to examples repo

* Changes go.mod to sdk/v2
  • Loading branch information
tjayrush authored Apr 21, 2024
1 parent 1d00fff commit 4767086
Show file tree
Hide file tree
Showing 65 changed files with 13 additions and 3,394 deletions.
2 changes: 1 addition & 1 deletion examples
Submodule examples updated 1 files
+ examples.tar.gz
3 changes: 0 additions & 3 deletions go.work
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ use (
./src/apps/chifra
./src/dev_tools/goMaker
./src/dev_tools/testRunner
./src/examples/balanceChart
./src/examples/optimism1
./src/examples/usesSDK
)
2 changes: 1 addition & 1 deletion sdk/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/TrueBlocks/trueblocks-core/v0/sdk
module github.com/TrueBlocks/trueblocks-core/sdk/v2

// Go Version
go 1.22
5 changes: 2 additions & 3 deletions src/dev_tools/goMaker/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
module github.com/TrueBlocks/trueblocks-core/goMaker

// Go Version
go 1.22

replace github.com/TrueBlocks/trueblocks-core/v0/sdk => ../sdk

require (
github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240314004354-24be97c22535
github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240419175527-3f8eaf44105d
github.com/gocarina/gocsv v0.0.0-20230123225133-763e25b40669
golang.org/x/text v0.14.0
)
Expand Down
4 changes: 2 additions & 2 deletions src/dev_tools/goMaker/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240314004354-24be97c22535 h1:kiJVq0Yhsk0P8kMo0pDawbkUrJqHXG6hhcBs5Yxw3J0=
github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240314004354-24be97c22535/go.mod h1:Iv96WyE9UCDvcDUxgQds8M4NrXv8Y/exv4cvyJcawUg=
github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240419175527-3f8eaf44105d h1:zRcMnMIoTO0CMIA8G7HfbHxd4+yeKJEzgA62aFekVDk=
github.com/TrueBlocks/trueblocks-core/src/apps/chifra v0.0.0-20240419175527-3f8eaf44105d/go.mod h1:RvdZJxvZ79EdxqPDR1MytskxtDzRZEQ/mXZgTjPFKTo=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
Expand Down
2 changes: 1 addition & 1 deletion src/dev_tools/goMaker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var cbTemplates = []types.Generator{
Against: "routes",
Templates: []string{
"src_dev+tools_goMaker_generated_readme+route.md.tmpl",
"sdk_go_route.go.tmpl",
"sdk_route.go.tmpl",
"sdk_python_src_+route.py.tmpl",
// "sdk_typescript_src_paths_route.ts.tmpl",
"src_apps_chifra_cmd_route.go.tmpl",
Expand Down
2 changes: 1 addition & 1 deletion src/dev_tools/testRunner/api_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"os"
"strings"

"github.com/TrueBlocks/trueblocks-core/sdk/v2"
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/colors"
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/logger"
"github.com/TrueBlocks/trueblocks-core/v0/sdk"
)

func getApiUrl() string {
Expand Down
3 changes: 2 additions & 1 deletion src/dev_tools/testRunner/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module github.com/TrueBlocks/trueblocks-core/testRunner

// Go Version
go 1.22

replace github.com/TrueBlocks/trueblocks-core/v0/sdk => ../sdk
replace github.com/TrueBlocks/trueblocks-core/sdk => ../../../sdk
2 changes: 1 addition & 1 deletion src/dev_tools/testRunner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ func loadTestCases() (map[string][]TestCase, string, error) {

casesPath := getCasesPath()
if err := filepath.Walk(casesPath, walkFunc); err != nil {
return testMap, casesPath, fmt.Errorf("error walking the path %q: %v\n", casesPath, err)
return testMap, casesPath, fmt.Errorf("error walking the path %q: %v", casesPath, err)
}

file.StringToAsciiFile(getGeneratedPath()+"testCases.json", toJson(testMap))
Expand Down
2 changes: 1 addition & 1 deletion src/dev_tools/testRunner/prepare.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package main

import (
"github.com/TrueBlocks/trueblocks-core/sdk/v2"
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/colors"
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/logger"
"github.com/TrueBlocks/trueblocks-core/v0/sdk"
)

func downloadAbis() error {
Expand Down
2 changes: 1 addition & 1 deletion src/dev_tools/testRunner/run_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"bytes"
"fmt"

"github.com/TrueBlocks/trueblocks-core/sdk/v2"
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/colors"
"github.com/TrueBlocks/trueblocks-core/src/apps/chifra/pkg/logger"
"github.com/TrueBlocks/trueblocks-core/v0/sdk"
)

// SdkTest runs a test case through the SDK and returns the results in the provided bytes.Buffer
Expand Down
11 changes: 0 additions & 11 deletions src/examples/.gitignore

This file was deleted.

19 changes: 0 additions & 19 deletions src/examples/CMakeLists.txt

This file was deleted.

48 changes: 0 additions & 48 deletions src/examples/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/examples/allContracts/CMakeLists.txt

This file was deleted.

55 changes: 0 additions & 55 deletions src/examples/allContracts/allContracts.go

This file was deleted.

2 changes: 0 additions & 2 deletions src/examples/balanceChart/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions src/examples/balanceChart/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 4767086

Please sign in to comment.