Documentation ¶
Overview ¶
Package tenderly provides convenience wrappers to work with Tenderly's REST API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config contains the configuration for the Tenderly wrapper.
func NewFromSecret ¶
NewFromSecret creates a new Tenderly config from a secret API key.
func (*Config) DeleteFork ¶
DeleteFork deletes a fork on Tenderly.
func (*Config) NewForkClient ¶
func (cfg *Config) NewForkClient(ctx context.Context, params NewForkParams) (*ethclient.Client, func() error, *Fork, error)
NewForkClientWithCleanup is a convenience wrapper that creates a new fork on Tenderly and returns an ethclient.Client connected to it together with a cleanup function to remove the fork again.
type Fork ¶
type Fork struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` NetworkID string `json:"network_id"` BlockNumber string `json:"block_number"` Details ForkDetails `json:"details"` // hex string of private keys for pre-funded accounts Accounts map[common.Address]string `json:"accounts"` NodeURL string `json:"json_rpc_url"` }
Fork is the fork created by the Tenderly API.
type ForkDetails ¶
type ForkDetails struct {
ChainConfig ForkDetailsChainConfig `json:"chain_config"`
}
ForkDetails is the details of the fork created by the Tenderly API.
type ForkDetailsChainConfig ¶
type ForkDetailsChainConfig struct {
ChainID string `json:"chain_id"`
}
ForkDetailsChainConfig is the chain config of the fork created by the Tenderly API.
type NewForkParams ¶
type NewForkParams struct { // ProjectSlug is the slug of the project to create the fork in. ProjectSlug string `json:"-"` // Name is the name of the fork. Name string `json:"name"` // Description is the description of the fork. Description string `json:"description"` // NetworkID identifies the network to be forked. NetworkID uint64 `json:"network_id"` // BlockNumber is the block number at which the network is forked. BlockNumber uint64 `json:"block_number"` }
NewForkParams are the parameters to create a new Tenderly fork using `Config.NewFork`.
type NewForkResponse ¶
type NewForkResponse struct {
Fork Fork `json:"fork"`
}
NewForkResponse is the response from the Tenderly API when a new fork is created.