Documentation
¶
Index ¶
- func CreateAwsClients(ctx context.Context, endpoint string) (*ethclient.Client, *rpc.Client, error)
- func CreateAwsClientsFromConfig(endpoint string, config aws.Config) (*ethclient.Client, *rpc.Client, error)
- func CreateClients(ctx context.Context, rpcUrl string, config *aws.Config) (client *ethclient.Client, rpcClient *rpc.Client, err error)
- type CreationError
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAwsClients ¶ added in v0.9.17
CreateAwsClients creates an ethclient.Client and an rpc.Client from from a context and an endpoint, AWS config is fetched from config.LoadDefaultConfig of aws package which uses environment variables to get credentials. Refer to: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html
func CreateAwsClientsFromConfig ¶ added in v0.9.17
func CreateAwsClientsFromConfig(endpoint string, config aws.Config) (*ethclient.Client, *rpc.Client, error)
CreateAwsClientsFromConfig creates an ethclient.Client and an rpc.Client from an endpoint string and an aws.Config struct
func CreateClients ¶
func CreateClients(ctx context.Context, rpcUrl string, config *aws.Config) (client *ethclient.Client, rpcClient *rpc.Client, err error)
CreateClients determines the Provider type from the rpcUrl passed. If config is different than nil and the provider type is ProviderAws, then CreateAwsClientsFromConfig is used to generate the clients, otherwise CreateAwsClients is used.
Types ¶
type CreationError ¶
type CreationError struct {
// contains filtered or unexported fields
}
func (CreationError) Error ¶
func (e CreationError) Error() string
type Provider ¶ added in v0.9.17
type Provider string
func GetEvmProviderType ¶ added in v0.9.17
GetEvmProviderType determines if the provider url is for an AWS or regular JSON-RPC