This repository was archived by the owner on Aug 22, 2025. It is now read-only.
feat: add token-locker-weight#1623
Open
johnnyonline wants to merge 2 commits intosnapshot-labs:masterfrom
Open
feat: add token-locker-weight#1623johnnyonline wants to merge 2 commits intosnapshot-labs:masterfrom
johnnyonline wants to merge 2 commits intosnapshot-labs:masterfrom
Conversation
ChaituVR
suggested changes
Nov 4, 2024
Comment on lines
+24
to
+34
| const multi = new Multicaller(network, provider, abi, { blockTag }); | ||
| addresses.forEach((address) => | ||
| multi.call(address, TOKEN_LOCKER, 'getAccountWeight', [address]) | ||
| ); | ||
| const result: Record<string, BigNumberish> = await multi.execute(); | ||
|
|
||
| return Object.fromEntries( | ||
| Object.entries(result).map(([address, balance]) => [ | ||
| address, | ||
| parseFloat(formatUnits(balance, options.decimals)) | ||
| ]) |
Member
There was a problem hiding this comment.
Hi @johnnyonline You can use the contract-call strategy directly on your space instead of a new strategy. you tried?
Author
There was a problem hiding this comment.
Hi ser no i did not - how would i do it? Not sure i understand.
Member
There was a problem hiding this comment.
In your space settings you can select a contract-call and change the args accordingly
Member
There was a problem hiding this comment.
No i mean while adding a strategy in your space settings, you can select contract-call strategy https://docs.snapshot.org/user-guides/spaces/settings#voting-strategies
Author
There was a problem hiding this comment.
Oh, you mean we don't need a custom strategy here (?). Did not understand that, ok.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request:
erc20-balance-ofstrategy folder and rename totoken-locker-weight.index.ts/examples.json/README.md/schema.jsonas described in https://docs.snapshot.org/developer-guides/create-a-strategy/voting-strategy../snapshot-strategies/src/strategies/index.tsas described in https://docs.snapshot.org/developer-guides/create-a-strategy/voting-strategy.