Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Prefer bytes.concat over abi.encodePacked for concatenation #328

Closed
Stebalien opened this issue Mar 1, 2023 · 4 comments
Closed

Prefer bytes.concat over abi.encodePacked for concatenation #328

Stebalien opened this issue Mar 1, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Stebalien
Copy link
Contributor

Stebalien commented Mar 1, 2023

See ethereum/solidity#10903.

🔗 zboto Link

@ainhoa-a ainhoa-a added the enhancement New feature or request label Mar 2, 2023
@emmanuelm41
Copy link
Member

emmanuelm41 commented Mar 2, 2023

@Stebalien there is only one place where we could actually replace this. Other places are not concatenating bytes only.

return CommonTypes.FilAddress(abi.encodePacked(hex"00", result.buf));

@emmanuelm41
Copy link
Member

emmanuelm41 commented Mar 2, 2023

Should we change only that place?

@Stebalien
Copy link
Contributor Author

Stebalien commented Mar 2, 2023

Ah, because the other places are using non bytes types. I see.

Nah, makes sense. Sorry for the noise.

@emmanuelm41
Copy link
Member

emmanuelm41 commented Mar 2, 2023

@Stebalien np at all! Thanks for the feedback

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants