lfglabs-dev / lfglabs-dev/verity
Typed interface calls cannot return multiple values
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 148
- Forks
- 20
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 29
Description
Typed interface (dot-call) methods support a single return value:
interface IIdleCreditVault where
function prepareStopEpochWithApr0(Uint256) returns (Uint256, Uint256)
end
...
let (a, b) ← strategy.prepareStopEpochWithApr0 x
-- error: interface call 'IIdleCreditVault.prepareStopEpochWithApr0' returns multiple values; typed dot calls currently support one return value
Pareto's stopEpoch calls two such methods (prepareStopEpochWithApr0, previewLossAdjustedWithdrawFunds, both (uint256, uint256)). The only compiling encoding is a name-keyed linked_externals external f(Uint256) -> (Uint256, Uint256) with callExternal, which loses the target address (the strategy) in the compilation model.
Ask: allow tuple destructuring of typed interface calls with static multi-word returns (the ABI-frame lowering tracked in #1982 covers the dynamic case; two static words should not need it).
Closure-side tracking: audit/VERITY-GAPS.md G14.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the typed interface call example and the two Pareto methods named in the issue, then read the ABI-frame lowering work tracked in #1982. Check audit/VERITY-GAPS.md for G14 and trace how static two-word returns are compiled. Done means tuple destructuring works for these calls without losing the strategy target address.
Written by the indexing model from the issue text.
Assessment
- Domain
- blockchain, compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100