Skip to content

Commit

Permalink
Readme rpcv04 update (#357)
Browse files Browse the repository at this point in the history
* add deployAccount example to readme

* update board for RPC methods
  • Loading branch information
cicr99 authored Sep 26, 2023
1 parent 54233bf commit d0f67f0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ operations on the wallets. The package has excellent documentation for a smooth

- library documentation available at [pkg.go.dev](https://pkg.go.dev/github.com/NethermindEth/starknet.go).
- [simple call example](./examples/simpleCall) to make a contract call to a mainnet contract
- [deploy account example](./examples/deployAccount) to deploy a new account contract on testnet.
<!-- Currently not working
- [curve example](./examples/curve) initializing the StarkCurve for signing and verification
- [contract example](./examples/contract) for smart contract deployment and function call
Expand All @@ -70,11 +71,22 @@ cd examples/simpleCall
go mod tidy
go run main.go
```
> Check [here](examples/simpleCall/README.md) for more details
***starknet deployAccount***

```sh
cd examples/deployAccount
go mod tidy
go run main.go
```

> Check [here](examples/deployAccount/README.md) for more details

### RPC

`starknet.go` RPC implements the [Starknet RPC v03 Spec](https://github.com/starkware-libs/starknet-specs/tree/v0.3.0/api):
`starknet.go` RPC implements the [Starknet RPC v04 Spec](https://github.com/starkware-libs/starknet-specs/tree/v0.4.0/api):

| Method | Implemented (*) |
| ------------------------------------------ | ------------------ |
Expand All @@ -91,6 +103,7 @@ go run main.go
| `starknet_getBlockTransactionCount` | :heavy_check_mark: |
| `starknet_call` | :heavy_check_mark: |
| `starknet_estimateFee` | :heavy_check_mark: |
| `starknet_estimateMessageFee` | :heavy_check_mark: |
| `starknet_blockNumber` | :heavy_check_mark: |
| `starknet_blockHashAndNumber` | :heavy_check_mark: |
| `starknet_chainId` | :heavy_check_mark: |
Expand Down
4 changes: 2 additions & 2 deletions examples/deployAccount/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ This example uses a pre-existing contract on the goerli network to deploy a new
Steps:
1. Rename the ".env.template" file to ".env.testnet"
2. Uncomment, and assign your testnet endpoint to the "INTEGRATION_BASE" variable
3. Execute `go mod tidy` (make sure you are in the deployAccount folder)
3. Execute `go mod tidy` (make sure you are in the "deployAccount" folder)
4. Execute `go run main.go`
5. Fund the precomputed address using a starknet faucet, eg https://faucet.goerli.starknet.io/
6. Press any key, then enter

At this point your account should be deployed on testnet, and you can use a block explorer like Voyager to view your transaction using the transaction hash.
At this point your account should be deployed on testnet, and you can use a block explorer like [Voyager](https://voyager.online/) to view your transaction using the transaction hash.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ Steps to run this example on mainnet:
1. rename ".env.template" to ".env.mainnet"
2. uncomment, and set INTEGRATION_BASE to the mainnet url
3. make sure you are in the "simpleCall" directory
4. execute "go mod tidy"
5. execute "go run main.go"

4. execute `go mod tidy`
5. execute `go run main.go`

0 comments on commit d0f67f0

Please sign in to comment.