Repository navigation
legacy cleanup - #605
legacy cleanup#605
Conversation
| exit.user = event.params.liquidityProvider.toHexString(); | ||
| exit.user = event.params.liquidityProvider; |
There was a problem hiding this comment.
Why is this changed? What is the effect of this?
There was a problem hiding this comment.
user is defined as bytes and since toHexString() converts to a string it throws a type error.
|
|
||
| // Handle BPT | ||
| if (tokensAddresses[i] === pool.address) { | ||
| let bpt = Token.load(pool.address.toHexString()); | ||
| if (bpt !== null) { | ||
| bpt.pool = pool.id; | ||
| bpt.save(); | ||
| } | ||
| } |
There was a problem hiding this comment.
why does this need to be added?
There was a problem hiding this comment.
it's needed to assign poolId to a bpt token, it was handled with
let pool = WeightedPool.bind(tokenAddress);
let isPoolCall = pool.try_getPoolId();
if (!isPoolCall.reverted) {
let poolId = isPoolCall.value;
token.pool = poolId.toHexString();
}
but this was failing - afair there were some pools that didn't have getPoolId implemented properly
There was a problem hiding this comment.
I dont think this is the same logic. before, it added the pool ID of a nested pool to the pool token. Now you're handling phantom BPTs.
There was a problem hiding this comment.
it also shouldnt fail as it does a try_getPoolId()
| type UserInternalBalance @entity { | ||
| id: ID! | ||
| userAddress: User | ||
| token: Bytes! | ||
| tokenInfo: Token | ||
| balance: BigDecimal! | ||
| } |
There was a problem hiding this comment.
@mendesfabio do you think this is still needed for exploit recovery purposes?
| balance: BigDecimal! | ||
| } | ||
|
|
||
| type GradualWeightUpdate @entity(immutable: true) { |
There was a problem hiding this comment.
this can be removed too, its from managed pools
There was a problem hiding this comment.
looks like it's related to LBPs as well
There was a problem hiding this comment.
we dont need LBPs on v2, can remove it too
There was a problem hiding this comment.
as discussed, we need LBPs on v2
Description
Refactored to align with the API requirements and optimised for minimal entities count. Removed legacy data, removed USD pricing, pruned swap and liquidity events indexing.
Type of change