Skip to content

Commit 0cafe3d

Browse files
committed
Squashed commit of the following:
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
1 parent 35023f8 commit 0cafe3d

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
<a href="https://github.com/nethermindeth/starknet.go/actions/workflows/test.yml">
1616
<img src="https://github.com/nethermindeth/starknet.go/actions/workflows/test.yml/badge.svg?branch=main" alt="test">
1717
</a>
18-
<a href="https://github.com/nethermindeth/starknet.go">
18+
<a href="https://github.com/NethermindEth/starknet.go/stargazers">
1919
<img src="https://img.shields.io/github/stars/nethermindeth/starknet.go?style=social"/>
2020
</a>
2121
</p>
2222

2323
</p>
2424
<p align="center">
25-
<a href="https://twitter.com/NethermindStark">
25+
<a href="https://x.com/NethermindStark">
2626
<img src="https://img.shields.io/twitter/follow/NethermindStark?style=social"/>
2727
</a>
2828
<a href="https://t.me/StarknetGo">
@@ -96,6 +96,15 @@ go run main.go
9696

9797
> Check [here](examples/deployContractUDC/README.md) for more details.
9898
99+
***starknet typedData***
100+
101+
```sh
102+
cd examples/typedData
103+
go run main.go
104+
```
105+
106+
> Check [here](examples/typedData/README.md) for more details.
107+
99108
<br/> Check [here](https://github.com/NethermindEth/starknet.go/tree/main/examples) for some FAQ answered by these examples.
100109

101110

rpc/call.go

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ import (
1616
// - []*felt.Felt: the result of the function call
1717
// - error: an error if any occurred during the execution
1818
func (provider *Provider) Call(ctx context.Context, request FunctionCall, blockID BlockID) ([]*felt.Felt, error) {
19+
if request.Calldata == nil {
20+
request.Calldata = []*felt.Felt{}
21+
}
22+
1923
var result []*felt.Felt
2024
if err := do(ctx, provider.c, "starknet_call", &result, request, blockID); err != nil {
2125
return nil, tryUnwrapToRPCErr(err, ErrContractNotFound, ErrEntrypointNotFound, ErrContractError, ErrBlockNotFound)

0 commit comments

Comments
 (0)