Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
hunjixin committed Oct 21, 2022
1 parent fd9270b commit 1326dc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/erc20/client_example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func main() {
val := big.NewInt(1000)
req := contract.FakeSetBalance{
Addr: addr,
Balance: &val,
Balance: val,
}
err = ercClient.FakeSetBalance(ctx, &req)
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions examples/hellocontract/client_example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ func main() {
log.Fatalln(err)
return
}
ercClient := client.NewStateClient(v0FullNode, client.SetFromAddressOpt(addr))
helloClient := client.NewStateClient(v0FullNode, client.SetFromAddressOpt(addr))

code, err := ioutil.ReadFile("../hellocontract.wasm")
if err != nil {
log.Fatalln(err)
return
}

installRet, err := ercClient.Install(ctx, code)
installRet, err := helloClient.Install(ctx, code)
if err != nil {
log.Fatalln(err)
return
Expand All @@ -52,14 +52,14 @@ func main() {
return
}

execRet, err := ercClient.CreateActor(ctx, installRet.CodeCid, createParams)
execRet, err := helloClient.CreateActor(ctx, installRet.CodeCid, createParams)
if err != nil {
log.Fatalln(err)
return
}
println("actor id", execRet.IDAddress.String())

ret, err := ercClient.SayHello(ctx)
ret, err := helloClient.SayHello(ctx)
if err != nil {
log.Fatalln(err)
return
Expand Down

0 comments on commit 1326dc1

Please sign in to comment.