Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: factory event parameter within struct #1323

Open
typedarray opened this issue Dec 9, 2024 · 1 comment
Open

feat: factory event parameter within struct #1323

typedarray opened this issue Dec 9, 2024 · 1 comment
Labels
A: Sync engine Area: Sync engine Good first issue Good for newcomers

Comments

@typedarray
Copy link
Collaborator

Some factory events include the target/child address within a struct. For example, from Morpho:

struct MarketParams {
    address loanToken;
    address collateralToken;
    address oracle;
    address irm;
    uint256 lltv;
}

/// @notice Emitted when creating a market.
/// @param id The market id.
/// @param marketParams The market that was created.
event CreateMarket(Id indexed id, MarketParams marketParams);

At the moment, the factory configuration for this ABI item only accepts "id" or "marketParams", neither of which will work at all. If possible, we should consider parameter more flexible, eg "marketParams.oracle" which was the target address in this example.

Perhaps we could support the entire Solidity syntax for how to index into a struct (by property name or array index) at both type-level and runtime.

@Jds-23
Copy link

Jds-23 commented Dec 11, 2024

Hi @typedarray , can I pick this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Sync engine Area: Sync engine Good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants