Documentation
¶
Overview ¶
* Dummy RPC backend for both Ethereum node and Flashbots Relay. * Implements JSON-RPC calls that the tests need.
* Test helpers.
Index ¶
- Variables
- func MockRpcBackendReset()
- func MockTxApiHandler(w http.ResponseWriter, req *http.Request)
- func MockTxApiReset()
- func RpcBackendHandler(w http.ResponseWriter, req *http.Request)
- func SendBatchRpcAndParseResponse(req []*types.JsonRpcRequest) ([]*types.JsonRpcResponse, error)
- func SendBatchRpcAndParseResponseTo(url string, req []*types.JsonRpcRequest) ([]*types.JsonRpcResponse, error)
- func SendRpcAndParseResponse(req *types.JsonRpcRequest) (*types.JsonRpcResponse, error)
- func SendRpcAndParseResponseOrFailNow(t *testing.T, req *types.JsonRpcRequest) *types.JsonRpcResponse
- func SendRpcAndParseResponseOrFailNowAllowRpcError(t *testing.T, req *types.JsonRpcRequest) *types.JsonRpcResponse
- func SendRpcAndParseResponseOrFailNowString(t *testing.T, req *types.JsonRpcRequest) string
- func SendRpcAndParseResponseTo(url string, req *types.JsonRpcRequest) (*types.JsonRpcResponse, error)
- func SendRpcWithAuctionPreferenceAndParseResponse(t *testing.T, req *types.JsonRpcRequest, urlSuffix string) *types.JsonRpcResponse
- func SendRpcWithFastPreferenceAndParseResponse(t *testing.T, req *types.JsonRpcRequest) *types.JsonRpcResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var MockBackendLastJsonRpcRequest *types.JsonRpcRequest
View Source
var MockBackendLastJsonRpcRequestTimestamp time.Time
View Source
var MockBackendLastRawRequest *http.Request
View Source
var MockTxApiStatusForHash map[string]types.PrivateTxStatus = make(map[string]types.PrivateTxStatus)
View Source
var RpcEndpointUrl string // set by tests
View Source
var TestTx_BundleFailedTooManyTimes_From = "0xc84edF69E78C0E9dE5ccFE4fB9017F6F7566787f"
View Source
var TestTx_BundleFailedTooManyTimes_Hash = "0xfb34b88cd77215867aa8e8ff0abc7060178b8fed6519a85d0b22853dfd5e9fec"
View Source
var TestTx_BundleFailedTooManyTimes_Nonce = "0x1e"
View Source
var TestTx_BundleFailedTooManyTimes_RawTx = "" /* 836-byte string literal not displayed */
Test tx for bundle-failed-too-many-times MM1 fix
View Source
var TestTx_CancelAtRelay_Cancel_From = "0xc0E1142E97A9679FA0f9C13067Af656Cc2475373"
View Source
var TestTx_CancelAtRelay_Cancel_Hash = "0x0a5237dafa5e65d7e5030b08012fd8399206a9130fbc9f2d3d5cf3865fa972ef"
View Source
var TestTx_CancelAtRelay_Cancel_Nonce = "0xc"
View Source
var TestTx_CancelAtRelay_Cancel_RawTx = "" /* 226-byte string literal not displayed */
View Source
var TestTx_CancelAtRelay_Initial_RawTx = "" /* 824-byte string literal not displayed */
Test tx for MM2 fix
View Source
var TestTx_Invalid_Nonce_1 = "" /* 738-byte string literal not displayed */
Test sendRawTx invalid nonce
View Source
var TestTx_Invalid_Nonce_2 = "" /* 6320-byte string literal not displayed */
View Source
var TestTx_MM2_From = "0x7AaBc7915DF92a85E199DbB4B1D21E637e1a90A2"
View Source
var TestTx_MM2_Hash = "0xc543e2ad05cffdee95b984df20edd2e38e124c54461faa1276adc36e826588c9"
View Source
var TestTx_MM2_RawTx = "" /* 216-byte string literal not displayed */
Test tx for MM2 fix
Functions ¶
func MockRpcBackendReset ¶ added in v1.4.3
func MockRpcBackendReset()
func MockTxApiHandler ¶
func MockTxApiHandler(w http.ResponseWriter, req *http.Request)
func MockTxApiReset ¶
func MockTxApiReset()
func RpcBackendHandler ¶
func RpcBackendHandler(w http.ResponseWriter, req *http.Request)
func SendBatchRpcAndParseResponse ¶ added in v1.4.3
func SendBatchRpcAndParseResponse(req []*types.JsonRpcRequest) ([]*types.JsonRpcResponse, error)
func SendBatchRpcAndParseResponseTo ¶ added in v1.4.4
func SendBatchRpcAndParseResponseTo(url string, req []*types.JsonRpcRequest) ([]*types.JsonRpcResponse, error)
func SendRpcAndParseResponse ¶
func SendRpcAndParseResponse(req *types.JsonRpcRequest) (*types.JsonRpcResponse, error)
func SendRpcAndParseResponseOrFailNow ¶
func SendRpcAndParseResponseOrFailNow(t *testing.T, req *types.JsonRpcRequest) *types.JsonRpcResponse
func SendRpcAndParseResponseOrFailNowAllowRpcError ¶
func SendRpcAndParseResponseOrFailNowAllowRpcError(t *testing.T, req *types.JsonRpcRequest) *types.JsonRpcResponse
func SendRpcAndParseResponseOrFailNowString ¶
func SendRpcAndParseResponseOrFailNowString(t *testing.T, req *types.JsonRpcRequest) string
func SendRpcAndParseResponseTo ¶ added in v1.4.4
func SendRpcAndParseResponseTo(url string, req *types.JsonRpcRequest) (*types.JsonRpcResponse, error)
func SendRpcWithAuctionPreferenceAndParseResponse ¶ added in v1.6.0
func SendRpcWithAuctionPreferenceAndParseResponse(t *testing.T, req *types.JsonRpcRequest, urlSuffix string) *types.JsonRpcResponse
func SendRpcWithFastPreferenceAndParseResponse ¶ added in v1.5.1
func SendRpcWithFastPreferenceAndParseResponse(t *testing.T, req *types.JsonRpcRequest) *types.JsonRpcResponse
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.