Skip to content

Commit

Permalink
update (#2691)
Browse files Browse the repository at this point in the history
Co-authored-by: Raullen Chai <[email protected]>
Co-authored-by: guo <[email protected]>
  • Loading branch information
3 people authored Jun 7, 2021
1 parent 7c758ab commit 068777a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ioctl/cmd/action/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ func Read(contract address.Address, amount string, bytecode []byte) (string, err
ctx = metautils.NiceMD(jwtMD).ToOutgoing(ctx)
}

callerAddr, _ := Signer()
if callerAddr == "" {
callerAddr = address.ZeroAddress
}
res, err := iotexapi.NewAPIServiceClient(conn).ReadContract(
ctx,
&iotexapi.ReadContractRequest{
Expand All @@ -414,7 +418,7 @@ func Read(contract address.Address, amount string, bytecode []byte) (string, err
Contract: contract.String(),
Data: bytecode,
},
CallerAddress: address.ZeroAddress,
CallerAddress: callerAddr,
},
)
if err == nil {
Expand Down

0 comments on commit 068777a

Please sign in to comment.