Skip to content

Commit

Permalink
Adding more detail and notes to the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ProfMoo committed Sep 17, 2024
1 parent e92027a commit b13f7af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/eth/build-staking-operation/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ import (
"github.com/coinbase/coinbase-sdk-go/pkg/coinbase"
)

/*
* This example code stakes ETH on the Holesky network.
* Run the code with 'go run examples/ethereum/build-staking-operation/main.go <api_key_file_path> <wallet_address>'
*/

func main() {
ctx := context.Background()

Expand All @@ -21,7 +26,7 @@ func main() {
log.Fatalf("error creating coinbase client: %v", err)
}

address := coinbase.NewExternalAddress("ethereum-holesky", "0x57a063e1df096aaA6b2068C3C7FE6Ac4BC3c4F58")
address := coinbase.NewExternalAddress("ethereum-holesky", os.Args[2])

stakeableBalance, err := client.GetStakeableBalance(ctx, coinbase.Eth, address, coinbase.WithStakingBalanceMode(coinbase.StakingOperationModePartial))
if err != nil {
Expand Down
5 changes: 5 additions & 0 deletions examples/solana/build-staking-operation/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ var (
defaultPrivKeyPath = filepath.Join(home(), ".config/solana/id.json")
)

/*
* This example code stakes SOL on the devnet network.
* Run the code with 'go run examples/solana/build-staking-operation/main.go <api_key_file_path> <wallet_address>'
*/

func main() {
ctx := context.Background()

Expand Down

0 comments on commit b13f7af

Please sign in to comment.