Skip to content

Conversation

@Foulks-Plb
Copy link
Contributor

@Foulks-Plb Foulks-Plb commented Jan 21, 2026

  • Add factory check for vaultV1.1 with fallback mechanism for vaultV1.0
  • Add factory check for vaultV2
  • Add factory check for adapters

@Foulks-Plb Foulks-Plb self-assigned this Jan 21, 2026
@linear
Copy link

linear bot commented Jan 21, 2026

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c1b6f004ab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Foulks-Plb Foulks-Plb marked this pull request as draft January 21, 2026 23:11
@Foulks-Plb Foulks-Plb marked this pull request as ready for review January 22, 2026 17:06
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c426f643dd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Foulks-Plb Foulks-Plb changed the title feat(vault-v2): add factory check in fetch utility feat(vault-v1&2): add factory check in fetch utilities Jan 22, 2026
import {IMorphoMarketV1AdapterV2Factory} from "./interfaces/IMorphoMarketV1AdapterV2Factory.sol";
import {IVaultV2Factory} from "./interfaces/IVaultV2Factory.sol";

error UnknownFromFactory(address factory, address vault);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
error UnknownFromFactory(address factory, address vault);
error UnknownOfFactory(address factory, address vault);

no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What did I do?
What’s your proposal?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just the naming "unknown of" seems more appropriate than "unknown from"!

But actually, it may even be better to say "unknwon to": https://chatgpt.com/share/e/697b0e61-edd0-8004-a49d-8f965d6d62df

Suggested change
error UnknownFromFactory(address factory, address vault);
error UnknownToFactory(address factory, address vault);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mmm i prefer UnknownOfFactory:
Because it means the object is valid but does not belong to this factory (it was created by another one or the ownership link is incorrect).

And UnknownToFactory is not the destination of the call (the factory is correct), but the ownership relationship between the object and that factory.

@Foulks-Plb Foulks-Plb requested a review from Rubilmax January 30, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants