Only match requests for a specific function, provided here as a function signature string.
Close the connection immediately after receiving the matching request, without sending any response.
This method completes the rule definition, and returns a promise that resolves to a MockedContract once the rule is active. The MockedContract can be used later to query the seen requests that this rule has matched.
Reject the transaction submission immediately with the given error message and properties.
This method completes the rule definition, and returns a promise that resolves to a MockedContract once the rule is active. The MockedContract can be used later to query the seen requests that this rule has matched.
Return a successful transaction submission, with a random transaction id, and provide the given failed & revert transaction receipt when the transaction status is queried later.
The receipt can be any subset of the Ethereum receipt fields, and default values for a failed transaction will be used for any missing fields.
This method completes the rule definition, and returns a promise that resolves to a MockedContract once the rule is active. The MockedContract can be used later to query the seen requests that this rule has matched.
Return a successful transaction submission, with a random transaction id, and provide the given successfully completed transaction receipt when the transaction status is queried later.
The receipt can be any subset of the Ethereum receipt fields, and default values for a successful transaction will be used for any missing fields.
This method completes the rule definition, and returns a promise that resolves to a MockedContract once the rule is active. The MockedContract can be used later to query the seen requests that this rule has matched.
Timeout, accepting the request but never returning a response.
This method completes the rule definition, and returns a promise that resolves to a MockedContract once the rule is active. The MockedContract can be used later to query the seen requests that this rule has matched.
Only match requests that send certain parameters. You must provide both a types
and a parameters array, unless you've already called forFunction()
and
provided the function signature there.
Generated using TypeDoc
This builder should not be constructed directly. Call
mockNode.forSendTransaction()
ormockNode.forSendTransactionTo()
instead.