Skip to content

Commit

Permalink
Merge branch 'master' into fix-1256
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Jan 30, 2024
2 parents 0902088 + b431c61 commit 274a932
Show file tree
Hide file tree
Showing 329 changed files with 3,833 additions and 12,741 deletions.
2 changes: 1 addition & 1 deletion package.json
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@ethersproject/strings": "^5.6.1",
"@ethersproject/units": "^5.6.1",
"@ethersproject/wallet": "^5.6.2",
"@snapshot-labs/snapshot.js": "^0.7.3",
"@snapshot-labs/snapshot.js": "^0.10.1",
"@spruceid/didkit-wasm-node": "^0.2.1",
"@uniswap/sdk-core": "^3.0.1",
"@uniswap/v3-sdk": "^3.9.0",
Expand Down
8 changes: 6 additions & 2 deletions src/strategies/aavegotchi-agip-17/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
}
},
"network": "137",
"addresses": ["0x027Ffd3c119567e85998f4E6B9c3d83D5702660c"],
"snapshot": 22089223
"addresses": [
"0x027Ffd3c119567e85998f4E6B9c3d83D5702660c",
"0xC3c2e1Cf099Bc6e1fA94ce358562BCbD5cc59FE5",
"0x585E06CA576D0565a035301819FD2cfD7104c1E8"
],
"snapshot": 50601487
}
]
3 changes: 2 additions & 1 deletion src/strategies/aavegotchi-agip-37-gltr-staked-lp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ This snapshot strategy enables voting power for the following assets staked in G
- GHST-WMATIC LP

Please note this excludes voting power from:

- Staked wapGHST and unstaked wapGHST held in a wallet (see aavegotchi-agip-37-wap-ghst)
- amGHST (see erc20-balance-of)
- Unstaked GHST-FUD, GHST-FOMO, GHST-ALPHA, GHST-KEK, GHST-GLTR LP tokens (see erc20-tokens-per-uni)

## References

Aavegotchi AGIP 37: https://snapshot.org/#/aavegotchi.eth/proposal/0x9923aab6825158ec2503d88e3ee2f9c5fbb12000581d06343ac9829aa59b66a6
Aavegotchi AGIP 37: https://snapshot.org/#/aavegotchi.eth/proposal/0x9923aab6825158ec2503d88e3ee2f9c5fbb12000581d06343ac9829aa59b66a6
2 changes: 1 addition & 1 deletion src/strategies/aavegotchi-agip-37-wap-ghst/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ This snapshot strategy enables voting power for staked and unstaked wapGHST.

## References

Aavegotchi AGIP 37: https://snapshot.org/#/aavegotchi.eth/proposal/0x9923aab6825158ec2503d88e3ee2f9c5fbb12000581d06343ac9829aa59b66a6
Aavegotchi AGIP 37: https://snapshot.org/#/aavegotchi.eth/proposal/0x9923aab6825158ec2503d88e3ee2f9c5fbb12000581d06343ac9829aa59b66a6
4 changes: 2 additions & 2 deletions src/strategies/aavegotchi-agip/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
},
"network": "137",
"addresses": [
"0x51195e21BDaE8722B29919db56d95Ef51FaecA6C",
"0x9730299b10A30bDbAF81815c99b4657c685314AB",
"0xDd564df884Fd4e217c9ee6F65B4BA6e5641eAC63",
"0xBfe09443556773958bae1699b786d8E9680B5571"
],
"snapshot": 39986904
"snapshot": 51370819
}
]
20 changes: 19 additions & 1 deletion src/strategies/aavegotchi-agip/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,25 @@ const prices: Prices = {
'366': 10000,
'367': 10000,
'368': 10000,
'369': 10000
'369': 10000,
'370': 5,
'371': 5,
'372': 5,
'373': 10,
'374': 100,
'375': 5,
'376': 100,
'377': 10,
'378': 100,
'379': 100,
'380': 300,
'381': 300,
'382': 300,
'383': 300,
'384': 2000,
'385': 10000,
'386': 10000,
'387': 10000
};

const tokenAbi = [
Expand Down
8 changes: 6 additions & 2 deletions src/strategies/aavegotchi/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
}
},
"network": "137",
"addresses": ["0x027Ffd3c119567e85998f4E6B9c3d83D5702660c"],
"snapshot": 12089223
"addresses": [
"0x027Ffd3c119567e85998f4E6B9c3d83D5702660c",
"0xC3c2e1Cf099Bc6e1fA94ce358562BCbD5cc59FE5",
"0x585E06CA576D0565a035301819FD2cfD7104c1E8"
],
"snapshot": 50601487
}
]
33 changes: 0 additions & 33 deletions src/strategies/apeswap/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions src/strategies/apeswap/examples.json

This file was deleted.

58 changes: 0 additions & 58 deletions src/strategies/apeswap/index.ts

This file was deleted.

5 changes: 3 additions & 2 deletions src/strategies/arrow-vesting/examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
"0xB66f08DBd7A59B32e98033b9A1da08B5793DAb79",
"0x5b8eD2A2CfFCD474B2E688fdeA21CB5c4350E575",
"0x03b5Dc2CE78a7bEe9F66DD619b291595a2E166BB",
"0x06A61f56de8c6a2735D1Dea68340D201ddEd7348"
"0x06A61f56de8c6a2735D1Dea68340D201ddEd7348",
"0x252C855Cc3aB5f48229393Bc4DA129542a08C808"
],
"snapshot": 18879362
"snapshot": 112192500
}
]
20 changes: 10 additions & 10 deletions src/strategies/arrow-vesting/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ const vestingContractAbi = [
'function recipient() public view returns (address)',
'function total_locked() public view returns (uint256)',
'function start_time() public view returns (uint256)',
'function end_time() public view returns (uint256)'
'function unclaimed() public view returns (uint256)'
// don't need to check initialized?
// don't need to check admin?
// don't need to check future_admin?
];

export async function strategy(
Expand Down Expand Up @@ -82,9 +85,9 @@ export async function strategy(
[]
);
vestingContractMulti.call(
`${vestingContractAddress}.end_time`,
`${vestingContractAddress}.unclaimed`,
vestingContractAddress,
'end_time',
'unclaimed',
[]
);
});
Expand All @@ -106,15 +109,12 @@ export async function strategy(
const start = params['start_time'];

if (recipient in addressBalances && time > start) {
const locked = parseFloat(
formatUnits(params['total_locked'], options.decimals)
const unclaimedTokens = parseFloat(
formatUnits(params['unclaimed'], options.decimals)
);
const end = params['end_time'];

addressBalances[recipient] += Math.min(
(locked * (time - start)) / (end - start),
locked
);
// Vested arrow that can be claimed is all that is counted in this strategy
addressBalances[recipient] += unclaimedTokens;
}
});

Expand Down
30 changes: 0 additions & 30 deletions src/strategies/aura-balance-of-vlaura-vebal/README.md

This file was deleted.

20 changes: 0 additions & 20 deletions src/strategies/aura-balance-of-vlaura-vebal/examples.json

This file was deleted.

58 changes: 0 additions & 58 deletions src/strategies/aura-balance-of-vlaura-vebal/index.ts

This file was deleted.

Loading

0 comments on commit 274a932

Please sign in to comment.