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

What are sources/slots? #9

Open
vibe-tyeh opened this issue Aug 9, 2022 · 1 comment
Open

What are sources/slots? #9

vibe-tyeh opened this issue Aug 9, 2022 · 1 comment

Comments

@vibe-tyeh
Copy link

Hi, apologies for creating an issue for what should be a discussion/Q&A topic:

In the L2Voter architecture, what is the purpose of the address[] private _sources and bytes32[] private _slots arrays in the L1Governor.sol? My hunch is that it's how voting weights are stored (and then passed to the L2Voter), but I'm not positive. Could you provide some clarification?

@tarrencev
Copy link
Contributor

Hi, sources and slots store the location for balance lookups. So _source should be a contract that stores some balance, usually a token balance, and _slot should point to the storage slot where that value can be read from.

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

No branches or pull requests

2 participants