Skip to content

Commit

Permalink
Add missing replace statement in Gosdk (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferranbt authored Nov 8, 2023
1 parent 1d188a8 commit bebd716
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions docs/how-to/interact-with-suave/golang-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@ description: Brief Explanation of Golang SDK
Make sure you have Go installed on your system and your workspace is set. Then import the SDK package into your Go project:

```go
import "github.com/flashbots/suave-geth/suave/sdk"
import "github.com/ethereum/go-ethereum/suave/sdk"
```

Then, introduce a `replace` statement in your `go.mod` file to point to the SUAVE Geth fork:

```go
replace github.com/ethereum/go-ethereum => github.com/flashbots/suave-geth
```

This is a temporary setup, and the SDK will later be spawned into its own library.

## Usage

### Creating a Client
Expand Down Expand Up @@ -45,7 +53,6 @@ transactionResult, err := sdk.DeployContract(bytecode, client)
- `bytecode`: The compiled bytecode of the smart contract.
- `client`: An instance of your `Client`.


### Sending a Transaction

Interact with a contract by sending a transaction:
Expand Down Expand Up @@ -80,4 +87,4 @@ The following are key methods available on the `Client` type:

- `RPC()`: Retrieves the underlying RPC client.
- `SignTxn(*types.LegacyTx)`: Signs a transaction with the provided private key.
- `SendTransaction(*types.LegacyTx)`: Sends a signed transaction to the network.
- `SendTransaction(*types.LegacyTx)`: Sends a signed transaction to the network.

0 comments on commit bebd716

Please sign in to comment.