Skip to content

Conversation

@harisang
Copy link
Contributor

@harisang harisang commented Nov 5, 2025

Follow-up to PR #592, and further addressing issue #560

@harisang harisang requested a review from fhenneke November 6, 2025 07:40
Copy link
Collaborator

@fhenneke fhenneke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good.

I have not tested this change. Could you add a description of how to test this change?

src/config.py Outdated
Comment on lines 99 to 103
if network == Network.LENS:
protocol_fee_safe = Address("0x07e5292b5aac443B2C9473Ab51B53ce8BDC3317B")
else:
protocol_fee_safe = Address("0x22af3D38E50ddedeb7C47f36faB321eC3Bb72A76")

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it was intentional to change from the syntax used in other places to this approach?

        match network:
            case (
                Network.MAINNET
                | Network.GNOSIS
                | Network.ARBITRUM_ONE
                | Network.BASE
                | Network.AVALANCHE
                | Network.POLYGON
                | Network.BNB
            ):
                protocol_fee_safe = Address("0x22af3D38E50ddedeb7C47f36faB321eC3Bb72A76")
            case Network.LENS:
                protocol_fee_safe = Address("0x07e5292b5aac443B2C9473Ab51B53ce8BDC3317B")
            case _:
                raise ValueError(
                    f"No buffer accounting config set up for network {network}."
                )

That other approach does have the advantage of being very explicit and notifying of missing configuration.

If you want to go for what you did here, I think adding an additional check for network in Network would be welcome.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Pushed a fix

@harisang harisang requested a review from fhenneke November 10, 2025 07:25
@harisang
Copy link
Contributor Author

@fhenneke pushed some a small change, so pinging in case you want to have another look. Planning to merge later today

Copy link
Collaborator

@fhenneke fhenneke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. (I have not tested the change and are not planning on it due to missing instuctions.)

@harisang harisang merged commit f5b7b36 into main Nov 10, 2025
5 checks passed
@harisang harisang deleted the remove_more_dead_code branch November 10, 2025 12:48
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants