-
Notifications
You must be signed in to change notification settings - Fork 790
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
feat: add token-locker-weight #1623
base: master
Are you sure you want to change the base?
Conversation
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)) | ||
]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @johnnyonline You can use the contract-call
strategy directly on your space instead of a new strategy. you tried?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi ser no i did not - how would i do it? Not sure i understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your space settings you can select a contract-call
and change the args accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done here ser 0fca9ad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, you mean we don't need a custom strategy here (?). Did not understand that, ok.
Changes proposed in this pull request:
erc20-balance-of
strategy folder and rename totoken-locker-weight
.index.ts
/examples.json
/README.md
/schema.json
as described in https://docs.snapshot.org/developer-guides/create-a-strategy/voting-strategy../snapshot-strategies/src/strategies/index.ts
as described in https://docs.snapshot.org/developer-guides/create-a-strategy/voting-strategy.