Skip to content

Commit

Permalink
bal_vote fixes2
Browse files Browse the repository at this point in the history
  • Loading branch information
belbix committed Jan 23, 2024
1 parent 7d990df commit efa6412
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/bal_vote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const changeVoteTo = new Map<string, string>([
]);

// https://snapshot.org/#/tetubal.eth
const CURRENT_PROPOSAL = '0xd51f6821c1765d594d21d25636e75d0f3b2843fb7c503d7a763fe2c278d03eba';
const CURRENT_PROPOSAL = '0xbd2a8bf40f4e9e8859cf4bc30848e650d65f9c55d3864489d1c7c01d216e35e8';

async function main() {
const signer = await DeployerUtilsLocal.impersonate('0x84169ea605619C16cc1e414AaD54C95ee1a5dA12');
Expand Down
6 changes: 3 additions & 3 deletions scripts/utils/voting-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ export function poolNameToGaugeAdr(poolName: string, balData: any[]): string {
const poolNameConct = poolName.split('(0x')[0].trim();
// tslint:disable-next-line:no-any
const element = Array.from(balData).filter((el: any) => {
const adr: string = el.address;
// console.log(el)
const adr: string = el.gauge.address;
return adr.slice(0, 8).toLowerCase() === poolAdrConct.toLowerCase(); // todo change to gauge
});
if (element.length > 1) {
Expand All @@ -88,8 +89,7 @@ export function poolNameToGaugeAdr(poolName: string, balData: any[]): string {
freshest = el;
}
}
// todo move back
// throw new Error('collision');
throw new Error('collision');
}
if (element.length === 0) throw new Error('no gauge');
return element[0].gauge.address.toLowerCase();
Expand Down

0 comments on commit efa6412

Please sign in to comment.