From bebd7166a6af3e66e345ca095db578219596e691 Mon Sep 17 00:00:00 2001 From: Ferran Borreguero Date: Wed, 8 Nov 2023 11:40:29 +0100 Subject: [PATCH] Add missing replace statement in Gosdk (#44) --- docs/how-to/interact-with-suave/golang-sdk.mdx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/how-to/interact-with-suave/golang-sdk.mdx b/docs/how-to/interact-with-suave/golang-sdk.mdx index c23f87c8..3fa6cedb 100644 --- a/docs/how-to/interact-with-suave/golang-sdk.mdx +++ b/docs/how-to/interact-with-suave/golang-sdk.mdx @@ -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 @@ -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: @@ -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. \ No newline at end of file +- `SendTransaction(*types.LegacyTx)`: Sends a signed transaction to the network.