package common
import "github.com/renegade-fi/golang-sdk/examples/common"
Package common contains common functions for the examples
Index
- Constants
- func CreateArbitrumExternalMatchClient() (*external_match_client.ExternalMatchClient, error)
- func CreateBaseExternalMatchClient() (*external_match_client.ExternalMatchClient, error)
- func FindTokenAddr(symbol string, client *external_match_client.ExternalMatchClient) (string, error)
- func GetEthClient() (*ethclient.Client, error)
- func GetPrivateKey() (*ecdsa.PrivateKey, error)
- func SubmitBundle(bundle external_match_client.ExternalMatchBundle) error
- func SubmitBundleWithChainID(bundle external_match_client.ExternalMatchBundle, chainID int64) error
Constants
const ( // ChainID is the chain ID for the testnet ArbitrumSepoliaChainID = 421614 BaseSepoliaChainID = 84532 )
Functions
func CreateArbitrumExternalMatchClient
func CreateArbitrumExternalMatchClient() (*external_match_client.ExternalMatchClient, error)
CreateArbitrumExternalMatchClient creates a new external match client using environment variables
func CreateBaseExternalMatchClient
func CreateBaseExternalMatchClient() (*external_match_client.ExternalMatchClient, error)
CreateBaseExternalMatchClient creates a new external match client for the Base network
func FindTokenAddr
func FindTokenAddr(symbol string, client *external_match_client.ExternalMatchClient) (string, error)
FindTokenAddr fetches the address of a token from the relayer, falling back to hardcoded testnet addresses if the API is unavailable
func GetEthClient
func GetEthClient() (*ethclient.Client, error)
GetEthClient creates a new Ethereum client
func GetPrivateKey
func GetPrivateKey() (*ecdsa.PrivateKey, error)
GetPrivateKey gets the private key from environment variables
func SubmitBundle
func SubmitBundle(bundle external_match_client.ExternalMatchBundle) error
SubmitBundle submits the bundle to the Arbitrum Sepolia network
func SubmitBundleWithChainID
func SubmitBundleWithChainID(bundle external_match_client.ExternalMatchBundle, chainID int64) error
SubmitBundle submits the bundle with the given chain ID