Skip to content

Commit d492368

Browse files
authored
Merge pull request #124 from ipfs-force-community/feat/more_example
feat:add wallet and queuecall example
2 parents e4bc695 + 8f9ddbd commit d492368

File tree

47 files changed

+4275
-50
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+4275
-50
lines changed

.github/workflows/go.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
run: sudo apt-get -o Acquire::Retries=3 update && sudo apt-get -o Acquire::Retries=3 install make git mesa-opencl-icd ocl-icd-opencl-dev wget -y && sudo apt upgrade -y
1818

1919
- name: Set up Go
20-
uses: actions/setup-go@v3
20+
uses: actions/setup-go@v4
2121
with:
22-
go-version: 1.18
22+
go-version: 1.20.3
2323

2424
- name: setup rust
2525
uses: actions-rs/toolchain@v1
@@ -42,9 +42,9 @@ jobs:
4242

4343
- name: install tinygo
4444
run: |
45-
wget https://github.com/tinygo-org/tinygo/releases/download/v0.25.0/tinygo_0.25.0_amd64.deb
46-
sudo dpkg -i tinygo_0.25.0_amd64.deb
47-
rm tinygo_0.25.0_amd64.deb
45+
wget https://github.com/tinygo-org/tinygo/releases/download/v0.27.0/tinygo_0.27.0_amd64.deb
46+
sudo dpkg -i tinygo_0.27.0_amd64.deb
47+
rm tinygo_0.27.0_amd64.deb
4848
4949
- name: Build
5050
run: |

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ issues:
3030
exclude-use-default: false
3131
exclude:
3232
- "\\w+Id should be \\w+ID"
33+
- "main redeclared in this block"
3334

3435
linters-settings:
3536
goconst:

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ code-gen:
2020
cd ./examples/erc20 && fvm_go_sdk build
2121
cd ./examples/frc46token/gen && go run main.go
2222
cd ./examples/frc46token && fvm_go_sdk build
23+
cd ./examples/wallet/gen && go run main.go
24+
cd ./examples/wallet && fvm_go_sdk build
25+
cd ./examples/queuecall/gen && go run main.go
26+
cd ./examples/queuecall && fvm_go_sdk build
2327

2428
clean:
2529
rm -rf ./bin/*
@@ -36,6 +40,7 @@ test: build code-gen
3640
cd ./examples/frc46token && fvm_go_sdk test
3741
cd ./examples/frc46token/contract && go test --tags simulate
3842
cd ./examples/hellocontract/contract && go test --tags simulate
39-
43+
cd ./examples/queuecall/contract && go test --tags simulate
44+
cd ./examples/wallet/contract && go test --tags simulate
4045

4146
check: code-gen lint build-client-example test

README.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Key features of `go-fvm-sdk` are...
1616

1717
## Install
1818

19-
Install [Go](https://go.dev/doc/install)v1.17 or above and [TinyGo](https://tinygo.org/getting-started/install/)v0.25 or above.
19+
Install [Go](https://go.dev/doc/install)v1.20.x or above and [TinyGo](https://tinygo.org/getting-started/install/)v0.27 or above.
2020

2121
*Note: latest Go or TinyGo versions may not be tested.*
2222

examples/erc20/client_example/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module client_example
22

3-
go 1.18
3+
go 1.20
44

55
replace (
66
erc20 => ../

examples/erc20/gen/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module gen
22

3-
go 1.18
3+
go 1.20
44

55
require (
66
erc20 v0.0.0-00010101000000-000000000000

examples/erc20/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module erc20
22

3-
go 1.18
3+
go 1.20
44

55
replace (
66
erc20 => ./

examples/frc46token/client_example/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module client_example
22

3-
go 1.18
3+
go 1.20
44

55
replace (
66
frc46token => ../

examples/frc46token/gen/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module gen
22

3-
go 1.18
3+
go 1.20
44

55
require (
66
frc46token v0.0.0-00010101000000-000000000000

examples/frc46token/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module frc46token
22

3-
go 1.18
3+
go 1.20
44

55
replace (
66
erc20 => ./

examples/hellocontract/client_example/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module client_example
22

3-
go 1.18
3+
go 1.20
44

55
replace (
66
github.com/ipfs-force-community/go-fvm-sdk => ../../../

examples/hellocontract/gen/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module gen
22

3-
go 1.18
3+
go 1.20
44

55
require (
66
github.com/ipfs-force-community/go-fvm-sdk/gen v0.0.0-00010101000000-000000000000

examples/hellocontract/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
module hellocontract
22

3-
go 1.18
3+
go 1.20
44

55
replace (
6-
erc20 => ./
76
github.com/davecgh/go-spew => github.com/ipfs-force-community/go-spew v1.1.2-0.20220524052205-0034150c051a
87
github.com/filecoin-project/go-address => github.com/ipfs-force-community/go-address v0.0.7-0.20230207015848-7a27d889c267
98
github.com/ipfs-force-community/go-fvm-sdk => ../..
@@ -16,6 +15,7 @@ replace (
1615
github.com/stretchr/testify => github.com/ipfs-force-community/testify v1.7.1-0.20220616060316-ea4f53121ac3
1716
github.com/whyrusleeping/cbor-gen => github.com/ipfs-force-community/cbor-gen v0.0.0-20220421100448-dc345220256c
1817
golang.org/x/crypto => github.com/ipfs-force-community/crypto v0.0.0-20220523090957-2aff239c26f7
18+
hellocontract => ./
1919
lukechampine.com/blake3 => github.com/ipfs-force-community/blake3 v1.1.8-0.20220609024944-51450f2b2fc0
2020
)
2121

0 commit comments

Comments
 (0)