Skip to content

Commit

Permalink
Merge pull request #13 from 0chain/feat/enterprise-blobber
Browse files Browse the repository at this point in the history
Enterprise changes
  • Loading branch information
dabasov authored Nov 12, 2024
2 parents 7c90bfb + 4b712fd commit d961a05
Show file tree
Hide file tree
Showing 10 changed files with 298 additions and 289 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up Go 1.22
uses: actions/setup-go@v3
with:
go-version: 1.22
go-version: 1.22.5

- name: Clean build
run: make clean-mobilesdk
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Set up Go 1.22
uses: actions/setup-go@v3
with:
go-version: 1.22
go-version: 1.22.5

- name: Install deps
run: |
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
- name: Set up Go 1.22
uses: actions/setup-go@v3
with:
go-version: 1.22
go-version: 1.22.5

- name: Clean build
run: make clean-mobilesdk
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:
- name: Set up Go 1.22
uses: actions/setup-go@v3
with:
go-version: 1.22
go-version: 1.22.5

- name: Install deps
run: |
Expand Down Expand Up @@ -338,7 +338,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: 1.21.5
go-version: 1.22.5

- name: Checkout
uses: actions/checkout@v2
Expand All @@ -349,7 +349,7 @@ jobs:
sudo apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev wget
- name: Build
run: docker run --rm -v $PWD:/gosdk -w /gosdk golang:1.21.5 make wasm-build
run: docker run --rm -v $PWD:/gosdk -w /gosdk golang:1.22.5 make wasm-build

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: 1.21.5
go-version: 1.22.5

- uses: actions/checkout@v3

Expand All @@ -51,7 +51,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: 1.21.5
go-version: 1.22.5

- name: Install deps
run: |
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: 1.21.5
go-version: 1.22.5

- uses: actions/setup-node@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/0chain/gosdk

go 1.21
go 1.22.5

require (
github.com/0chain/common v0.0.6-0.20230127095721-8df4d1d72565
Expand Down
2 changes: 1 addition & 1 deletion wasmsdk/jsbridge/template_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func buildJS(args, env []string, wasmPath string, tpl []byte) (string, error) {
if suffix == "" {
suffix = "dev"
}
cdnPath := fmt.Sprintf("https://d2os1u2xwjukgr.cloudfront.net/%s/zcn.wasm", suffix)
cdnPath := fmt.Sprintf("https://webapps-staticfiles.s3.us-east-2.amazonaws.com/%s/enterprise-zcn.wasm", suffix)
data := templateData{
Path: cdnPath,
Args: args,
Expand Down
2 changes: 1 addition & 1 deletion wasmsdk/jsbridge/webworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func NewWasmWebWorker(blobberID, blobberURL, clientID, clientKey, peerPublicKey,
"IS_SPLIT=" + strconv.FormatBool(isSplit),
"MNEMONIC=" + mnemonic,
"ZAUTH_SERVER=" + gZauthServer},
Path: "zcn.wasm",
Path: "enterprise-zcn.wasm",
subscribers: make(map[string]chan worker.MessageEvent),
}

Expand Down
2 changes: 1 addition & 1 deletion wasmsdk/jsbridge/zcnworker.js.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://cdn.jsdelivr.net/gh/golang/go@go1.21.5/misc/wasm/wasm_exec.js','https://cdn.jsdelivr.net/gh/herumi/[email protected]/browser/bls.js');
importScripts('https://cdn.jsdelivr.net/gh/golang/go@go1.22.5/misc/wasm/wasm_exec.js','https://cdn.jsdelivr.net/gh/herumi/[email protected]/browser/bls.js');

const go = new Go();
go.argv = {{.ArgsToJS}}
Expand Down
1 change: 1 addition & 0 deletions wasmsdk/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ func main() {
}

if mode != "" {
fmt.Println("enterprise wasm sdk")
respChan := make(chan string, 1)
jsProxy := window.Get("__zcn_worker_wasm__")
if !(jsProxy.IsNull() || jsProxy.IsUndefined()) {
Expand Down
Loading

0 comments on commit d961a05

Please sign in to comment.