Skip to content

Add support for msgSender function in PoolSwapTest #967

@mikeghen

Description

@mikeghen

Component

No response

Describe the suggested feature and problem it solves.

I was working on dynamic fees and needed to get the msgSender for my tests. While this function is documented, it does not currently exist inPoolSwapTest.

Describe the desired implementation.

Here is a suggestion, perhaps there is another way.

contract PoolSwapTest is PoolTestBase {
    ...

    address internalMsgSender;

    constructor(IPoolManager _manager) PoolTestBase(_manager) {}
    
    ...

    function setMsgSender(address newMsgSender) external {
        internalMsgSender = newMsgSender;
    }

    function msgSender() external view returns (address) {
        return internalMsgSender;
    }
}

Describe alternatives.

No response

Additional context.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions