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

Dynamic layout compiler #13

Open
rkdud007 opened this issue Feb 2, 2024 · 0 comments
Open

Dynamic layout compiler #13

rkdud007 opened this issue Feb 2, 2024 · 0 comments
Labels
enhancement New feature or request I-datalake Query interface of datalake P-low Low priority, not for near future

Comments

@rkdud007
Copy link
Member

rkdud007 commented Feb 2, 2024

DynamicLayout Datalake

There might be some cases where someone would like to iterate through let’s say a solidity mapping or array.

For such reason we allow such datalake, maybe the name is not perfect.

An example of such datalake is:

IterativeDynamicLayoutDatalake(
		block_number=10231740,
		account_address="0x7b2f05ce9ae365c3dbf30657e2dc6449989e83d6",
		slot_index=5,
		initial_key=0,
		key_boundry=3,
)

Such datalake is scoped to a specific block as it would be very weird to iterate a mapping across multiple blocks or different smart contracts.

In solidity each variable also dynamic ones such as mapping or array have their unique slot index.

To read more about storage layouts please see:

[Layout of State Variables in Storage — Solidity 0.8.24 documentation](https://docs.soliditylang.org/en/latest/internals/layout_in_storage.html)

The initial key is the initial key to be placed in the mapping, key_boundry is the key that once reached the loop will stop.

It also takes an argument increment with 1 being the default value.

@rkdud007 rkdud007 added the enhancement New feature or request label Feb 2, 2024
@rkdud007 rkdud007 added this to the HDP core v1 milestone Feb 2, 2024
@rkdud007 rkdud007 self-assigned this Feb 2, 2024
@rkdud007 rkdud007 removed this from the HDP core v1 milestone Feb 2, 2024
@rkdud007 rkdud007 removed their assignment Feb 23, 2024
@rkdud007 rkdud007 added I-datalake Query interface of datalake P-low Low priority, not for near future enhancement New feature or request and removed enhancement New feature or request labels Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request I-datalake Query interface of datalake P-low Low priority, not for near future
Projects
None yet
Development

No branches or pull requests

1 participant