Closed Sekhmet closed 3 months ago
Previously we just called getVotes on the contract, but if strategy was misconfigured (wrong slot index was specified) this wouldn't get caught.
With this change current voting power is computed from storage directly.
As a note, this uses 224 trace instead of 208 from OZ, as this is the what contracts support: https://github.com/snapshot-labs/sx-starknet/blob/fe3c99f0e8e6210bfc1c2e423f9f0feb97a3a450/starknet/src/voting_strategies/oz_votes_storage_proof.cairo#L131-L134
Closes: https://github.com/snapshot-labs/sx-monorepo/issues/301
Summary
Previously we just called getVotes on the contract, but if strategy was misconfigured (wrong slot index was specified) this wouldn't get caught.
With this change current voting power is computed from storage directly.
As a note, this uses 224 trace instead of 208 from OZ, as this is the what contracts support: https://github.com/snapshot-labs/sx-starknet/blob/fe3c99f0e8e6210bfc1c2e423f9f0feb97a3a450/starknet/src/voting_strategies/oz_votes_storage_proof.cairo#L131-L134
Closes: https://github.com/snapshot-labs/sx-monorepo/issues/301
How to test