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

Bit shift operations #991

Open
jjcnn opened this issue May 24, 2021 · 0 comments
Open

Bit shift operations #991

jjcnn opened this issue May 24, 2021 · 0 comments
Labels

Comments

@jjcnn
Copy link
Contributor

jjcnn commented May 24, 2021

There is now a use case for left and right bit shifts: https://github.com/AragonBlack/fundraising/blob/master/apps/bancor-formula/contracts/BancorFormula.sol

Implementing shift operations in the standard library using existing Scilla features is pretty tricky, because we don't have operations that manipulate byte strings at the granularity of individual bits. It therefore seems better to add shift operations as builtins.

There's a design choice to be made regarding the type of these builtins, but we might be able to leverage the polymorphic builtin feature that I implemented, and which we then discovered we didn't need after all...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants