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

Make caller arguments take Into<b256> instead of b256 #6923

Open
IGI-111 opened this issue Feb 12, 2025 · 0 comments
Open

Make caller arguments take Into<b256> instead of b256 #6923

IGI-111 opened this issue Feb 12, 2025 · 0 comments
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser enhancement New feature or request team:compiler Compiler Team

Comments

@IGI-111
Copy link
Contributor

IGI-111 commented Feb 12, 2025

Related Component

compiler

Problem you are trying to solve

Manipulating assets in call options require unnecessary invocations of into:

let caller = abi(Transfer, delegate.into());
caller.test_transfers {
    coins: recipients.len(),
    asset_id: AssetId::base().into(),
}(recipients);

Solution you'd like

If asset_id and contract_id took an Into<b256> this could just be:

let caller = abi(Transfer, delegate);
caller.test_transfers {
    coins: recipients.len(),
    asset_id: AssetId::base(),
}(recipients);

Notes

No response

@IGI-111 IGI-111 added enhancement New feature or request triage This issue was opened with a template and needs to be triaged by code owners. compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser team:compiler Compiler Team and removed triage This issue was opened with a template and needs to be triaged by code owners. labels Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen compiler: parser Everything to do with the parser enhancement New feature or request team:compiler Compiler Team
Projects
None yet
Development

No branches or pull requests

1 participant