Add garden-staker strategy which uses votes from garden staker contract to calculate the vote power.
Background
Getting the votes from the contract is not straightforward. First, we need to fetch the nonce of the user in the contract, which represents the number of stakes the user has. Then, we calculate an ID called stakeId, which is the hash of the user address and the nonce. Finally, we can get the user's votes by calling the stakes function with the stakeId. Users can have multiple stakes, so we need to iterate over all the stakes to get the total votes of the user.
Changes proposed in this pull request:
Background
Getting the votes from the contract is not straightforward. First, we need to fetch the nonce of the user in the contract, which represents the number of stakes the user has. Then, we calculate an ID called stakeId, which is the hash of the user address and the nonce. Finally, we can get the user's votes by calling the
stakes
function with the stakeId. Users can have multiple stakes, so we need to iterate over all the stakes to get the total votes of the user.