Skip to content

Commit

Permalink
fix example parallelok not set smCrypto
Browse files Browse the repository at this point in the history
  • Loading branch information
bxq2011hust committed Jan 31, 2024
1 parent 0a84fab commit 589836c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions v3/examples/hello_world/manual/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ func main() {
if err != nil {
log.Fatalf("abi.JSON error: %v", err)
}
if client.SMCrypto() {
parsed.SetSMCrypto()
}
input, err := parsed.Pack("", "hello, world init")
if err != nil {
log.Fatalf("parsed.Pack error: %v", err)
Expand Down
3 changes: 3 additions & 0 deletions v3/examples/parallelok/manual/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ func main() {
log.Fatalf("GetBlockNumber error: %v", err)
}
parsed, err := abi.JSON(strings.NewReader(TransferABI))
if client.SMCrypto() {
parsed.SetSMCrypto()
}
if err != nil {
log.Fatalf("abi.JSON error: %v", err)
}
Expand Down

0 comments on commit 589836c

Please sign in to comment.