Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Conversation

johnnyonline
Copy link

Changes proposed in this pull request:

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))
])
Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done here ser 0fca9ad

Copy link
Member

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

Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants