Proxy contract: Balance of vested and unvested tokens
edd opened this issue · comments
Note: This is an acknowledged 'bit of a hack' and is not essential or blocking anything. But if it's a success, it'll slightly improve the the lives of people wondering how many VEGA tokens they have in V2 across all tranches
Goal
A user of Metamask / other wallet should be able to add this token address and see their balance as the sum of their token balance in all tranches
Example 1: tokens in tranches
0xedd
has 10 tokens in tranche 00xedd
has 10 tokens in tranche 10xedd
on the new proxy contract has a balance of 20 tokens
Example 2: Edd has redeemed tokens in tranches
0xedd
has redeemed all 10 tokens in tranche 00xedd
has 10 tokens in tranche 10xedd
on the new proxy contract has a balance of 10 tokens
Tasks
- Add a new ERC20 token on Ropsten that represents the total balance an address has across all tranches of the vesting contract
Notes
- For testing purposes, tranche 0 should already exist and can have tokens allocated to it
Vega_Token_V2/contracts/ERC20_Vesting.sol
Line 98 in 0838503
- This is expected to be quick, and imperfect. If it takes more than a few days, it's not worth the hassle. If it works but isn't nice, we'll never tell anyone about it
- Users will not be able to transfer balances. This contract only represents balances
cc @C0deMunk33 / @MM0819 / @barnabee
Code for this now lives here until we decide whether it is worth deploying on mainnet: https://github.com/vegaprotocol/vega-erc20-proxy