Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
fe75c8b
refactoring
smaulik13 Jan 8, 2025
dacfe33
refactoring 2
smaulik13 Jan 8, 2025
f7ec7e6
fix
smaulik13 Jan 8, 2025
295d20d
fix 2
smaulik13 Jan 8, 2025
e07625b
refactor
smaulik13 Jan 16, 2025
8102de5
refactor 2
smaulik13 Jan 16, 2025
d649bba
wasm refactor
smaulik13 Jan 16, 2025
b59dcf4
refactor 2
smaulik13 Jan 16, 2025
fcca97e
refactor 3
smaulik13 Jan 16, 2025
f01b993
fix
smaulik13 Jan 17, 2025
a0ce8cc
added version
smaulik13 Jan 17, 2025
cd7b1e1
wasm fix
smaulik13 Jan 17, 2025
bdbf983
revert some changes
smaulik13 Jan 17, 2025
3fb79d2
revert changes
smaulik13 Jan 17, 2025
2ee8e28
fix
smaulik13 Jan 17, 2025
bae7a6e
revert
smaulik13 Jan 17, 2025
0f7477d
lint fix
smaulik13 Jan 17, 2025
e49091c
version update
smaulik13 Jan 17, 2025
59f3dd8
gosdk to common
smaulik13 Jan 17, 2025
eb3184b
common update
smaulik13 Jan 17, 2025
088847b
dumy
smaulik13 Jan 17, 2025
f2d815f
dummy
smaulik13 Jan 17, 2025
9b4ae2c
core changes
smaulik13 Jan 21, 2025
7775b2f
updated changes
smaulik13 Jan 21, 2025
acb0596
windows build fix
smaulik13 Jan 22, 2025
8bd0f07
revert changes
smaulik13 Jan 22, 2025
92fabe3
common sdk update version
smaulik13 Jan 22, 2025
f83199a
refactor
smaulik13 Jan 23, 2025
f467a95
added v2 enpoint
smaulik13 Jan 23, 2025
816f388
delete file
smaulik13 Jan 23, 2025
6545972
updates
smaulik13 Jan 24, 2025
29a8e71
updates
smaulik13 Jan 24, 2025
9445d47
fixes
smaulik13 Feb 1, 2025
de1ffc8
fixes
smaulik13 Feb 1, 2025
5d8f32c
some refactor
smaulik13 Feb 3, 2025
dcf5a69
refactor
smaulik13 Feb 3, 2025
93191f4
refactor
smaulik13 Feb 4, 2025
5586b1e
added gosdk leftover changes
smaulik13 Feb 27, 2025
fea75d5
added alloc version check for rollback
smaulik13 Feb 28, 2025
23dfbea
added fix
smaulik13 Mar 6, 2025
c2e9762
Update build-sdks.yml
smaulik13 Mar 16, 2025
5806b72
Update build-sdks.yml
smaulik13 Mar 17, 2025
8fce149
wasm build
smaulik13 Mar 17, 2025
fea26e8
build fix
smaulik13 Mar 17, 2025
659076a
build fix
smaulik13 Mar 17, 2025
ba62843
more refactor
smaulik13 Mar 18, 2025
1488f2e
go mod update
smaulik13 Mar 18, 2025
026d9c8
go mod update
smaulik13 Mar 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
60 changes: 47 additions & 13 deletions .github/workflows/build-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
jobs:
build-ios:
name: Build-ios
runs-on: macos-runner
runs-on: macos-latest

steps:
- name: Checkout code
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
file_glob: true

- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: zcncore-ios
path: |
Expand Down Expand Up @@ -186,14 +186,14 @@ jobs:
file_glob: true

- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: zcncore-android
path: zcncore-android.tar.gz

build-macos:
name: Build-macos
runs-on: macos-runner
runs-on: macos-latest

steps:
- name: Checkout code
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
file_glob: true

- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: zcncore-macos
path: |
Expand Down Expand Up @@ -325,7 +325,7 @@ jobs:
file_glob: true

- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: zcn-windows
path: |
Expand All @@ -335,24 +335,58 @@ jobs:
name: Build-wasm
runs-on: [self-hosted, arc-runner]
steps:
- name: Set up Go 1.x
- name: Set up Go 1.23
uses: actions/setup-go@v3
with:
go-version: 1.22.5
go-version: 1.23

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install dependencies
run: |
sudo apt-get update
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.22.5 make wasm-build
run: |
docker run --rm -v $PWD:/gosdk -w /gosdk golang:1.23 make wasm-build
gzip -9 zcn.wasm && mv zcn.wasm.gz zcn.wasm
mv zcn.wasm enterprise-zcn.wasm
tar -czvf zcn_enterprise_wasm.tar.gz enterprise-zcn.wasm

- name: Setup Build
id: setup_build
run: |
tag=$(echo ${GITHUB_REF#refs/tags/})
echo ${tag}
if [[ "${{github.event_name}}" = "workflow_dispatch" ]]; then
echo "> 0Chain: trigger from workflow_dispatch"

echo "::set-output name=RELEASE::false"
echo "::set-output name=TAG::none"

elif [[ ${tag} = v*\.*\.* ]] ; then
echo "> 0Chain: trigger from git event"

# upload output on release
echo "::set-output name=RELEASE::true"
echo "::set-output name=TAG::${tag}"
fi

- name: Upload zcn_enterprise_wasm to release
if: steps.setup_build.outputs.RELEASE == 'true'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: zcn_enterprise_wasm.tar.gz
tag: ${{ steps.setup_build.outputs.TAG }}
overwrite: true
file_glob: true

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: zcn.wasm
path: zcn.wasm
name: zcn_enterprise_wasm
path: |
zcn_enterprise_wasm.tar.gz
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This repository currently supports the following platforms:
import (
"fmt"

"github.com/0chain/gosdk/zcncore"
"github.com/0chain/gosdk_common/zcncore"
)

func main() {
Expand Down Expand Up @@ -177,9 +177,9 @@ To run all the unit tests in `gosdk`: `go test github.com/0chain/gosdk/zboxcore/
$ go test ./...
```

To run all the unit tests in `bls0chain_test.go`, run this command from $TOP: `go test github.com/0chain/gosdk/core/zcncrypto -v`
To run all the unit tests in `bls0chain_test.go`, run this command from $TOP: `go test github.com/0chain/gosdk_common/core/zcncrypto -v`

To run a specific unit test in `bls0chain_test.go`, such as `TestSignatureScheme`, run: `go test github.com/0chain/gosdk/core/zcncrypto -v -run TestSignatureScheme`
To run a specific unit test in `bls0chain_test.go`, such as `TestSignatureScheme`, run: `go test github.com/0chain/gosdk_common/core/zcncrypto -v -run TestSignatureScheme`

To run the coverage test in `gosdk`:

Expand Down
3 changes: 2 additions & 1 deletion _util/build_mobile.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
0CHAIN_PATH := github.com/0chain
GOSDK_PATH := $(0CHAIN_PATH)/gosdk
GOSDK_COMMON_PATH = $(0CHAIN_PATH)/gosdk_common
OUTDIR := $(ROOT_DIR)/out
IOSMOBILESDKDIR := $(OUTDIR)/iossdk
ANDROIDMOBILESDKDIR := $(OUTDIR)/androidsdk
Expand All @@ -9,7 +10,7 @@ ANDROIDBINNAME := zcncore.aar
MINIOSVERSIONMIN := "-miphoneos-version-min=7.0=7.0 -mios-version-min=7.0 -mios-simulator-version-min=7.0"
MINMACOSVERSIONMIN := "-mmacosx-version-min=10.12"

PKG_EXPORTS := $(GOSDK_PATH)/zcncore $(GOSDK_PATH)/core/common $(GOSDK_PATH)/mobilesdk/sdk $(GOSDK_PATH)/mobilesdk/zbox $(GOSDK_PATH)/mobilesdk/zboxapi $(GOSDK_PATH)/mobilesdk/zcn
PKG_EXPORTS := $(GOSDK_COMMON_PATH)/zcncore $(GOSDK_COMMON_PATH)/core/common $(GOSDK_PATH)/mobilesdk/sdk $(GOSDK_PATH)/mobilesdk/zbox $(GOSDK_PATH)/mobilesdk/zboxapi $(GOSDK_PATH)/mobilesdk/zcn

.PHONY: setup-gomobile build-iossimulator build-ios build-android build-android-debug

Expand Down
27 changes: 0 additions & 27 deletions constants/context_key.go

This file was deleted.

37 changes: 0 additions & 37 deletions constants/errors.go

This file was deleted.

24 changes: 0 additions & 24 deletions constants/files.go

This file was deleted.

94 changes: 0 additions & 94 deletions core/block/block.go

This file was deleted.

Loading