diff --git a/README.md b/README.md index e9f8b1cc..a2551938 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,14 @@ test - +

- + @@ -96,6 +96,15 @@ go run main.go > Check [here](examples/deployContractUDC/README.md) for more details. +***starknet typedData*** + +```sh +cd examples/typedData +go run main.go +``` + +> Check [here](examples/typedData/README.md) for more details. +
Check [here](https://github.com/NethermindEth/starknet.go/tree/main/examples) for some FAQ answered by these examples. diff --git a/rpc/call.go b/rpc/call.go index 4d29cf1d..651edd94 100644 --- a/rpc/call.go +++ b/rpc/call.go @@ -16,6 +16,10 @@ import ( // - []*felt.Felt: the result of the function call // - error: an error if any occurred during the execution func (provider *Provider) Call(ctx context.Context, request FunctionCall, blockID BlockID) ([]*felt.Felt, error) { + if request.Calldata == nil { + request.Calldata = []*felt.Felt{} + } + var result []*felt.Felt if err := do(ctx, provider.c, "starknet_call", &result, request, blockID); err != nil { return nil, tryUnwrapToRPCErr(err, ErrContractNotFound, ErrContractError, ErrBlockNotFound)