Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

Option to return ether on a contract call within a function #192

@ghost

Description

Is your feature request related to a problem? Please describe.
Consider a function:

function swap() external {
    // this function would transfer eth from somewhere to this contract.
    Interface(myAddress).getEthForMyTokenViaDex(....);
}

I want to mock incoming funds in such situations.

Describe the solution you'd like

await myAddress.getEthForMyTokenViaDex.returns(, {value:amount});
// OR 
await myAddress.getEthForMyTokenViaDex.returns().withValue(amount);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions