A mocked contract. This is returned by a rule builder when the rule is created, and can be used to query the requests that have been seen by the mock rule.

Hierarchy

  • MockedContract

Constructors

Methods

Constructors

Methods

  • Returns a promise that resolves to an array of requests seen by the mock rule.

    For each request, this includes:

    • to: the contract address
    • from: the sender address, if used, or undefined for contract calls
    • value: the value sent, if any, or undefined for contract calls
    • params: the decoded params, if a function signature or param types were provided using forFunction or withParams methods when creating the rule.
    • rawRequest - the raw HTTP request sent to the node

    Returns Promise<{
        from: any;
        params: undefined | Result;
        rawRequest: CompletedRequest;
        to: any;
        value: any;
    }[]>

Generated using TypeDoc