Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit f7015b7
Merge: 9199306 a688cba
Author: Thiago Ribeiro <[email protected]>
Date:   Thu Jan 30 01:26:59 2025 -0300

    Merge branch 'main' into v0.8.0

commit a688cba
Author: Franco Barpp Gomes <[email protected]>
Date:   Fri Jan 24 02:19:12 2025 +0900

    Ensure starknet_call calldata is not null (#658)

    * fix: Fix function call calldata possibly nil

    * refactor: Remove empty calldata package var

commit 46011b2
Author: Thiago Ribeiro <[email protected]>
Date:   Tue Jan 21 06:43:33 2025 -0300

    Update README.md to include typedData example (#653)

commit 45554f0
Author: Olexandr88 <[email protected]>
Date:   Mon Jan 13 16:46:46 2025 +0200

    docs: changed the link to shield stars (#652)

    Update README.md
  • Loading branch information
thiagodeev committed Jan 30, 2025
1 parent 35023f8 commit 0cafe3d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
<a href="https://github.com/nethermindeth/starknet.go/actions/workflows/test.yml">
<img src="https://github.com/nethermindeth/starknet.go/actions/workflows/test.yml/badge.svg?branch=main" alt="test">
</a>
<a href="https://github.com/nethermindeth/starknet.go">
<a href="https://github.com/NethermindEth/starknet.go/stargazers">
<img src="https://img.shields.io/github/stars/nethermindeth/starknet.go?style=social"/>
</a>
</p>

</p>
<p align="center">
<a href="https://twitter.com/NethermindStark">
<a href="https://x.com/NethermindStark">
<img src="https://img.shields.io/twitter/follow/NethermindStark?style=social"/>
</a>
<a href="https://t.me/StarknetGo">
Expand Down Expand Up @@ -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.
<br/> Check [here](https://github.com/NethermindEth/starknet.go/tree/main/examples) for some FAQ answered by these examples.


Expand Down
4 changes: 4 additions & 0 deletions rpc/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, ErrEntrypointNotFound, ErrContractError, ErrBlockNotFound)
Expand Down

0 comments on commit 0cafe3d

Please sign in to comment.