Removed prints. Match changes with main.
This commit is contained in:
parent
20abe8dd65
commit
739b28cda3
|
@ -106,8 +106,7 @@ export function writeveAllocationUpdate(
|
|||
allocationType: string,
|
||||
amount: BigDecimal
|
||||
): VeAllocationUpdate {
|
||||
const eventIndex: number = event.logIndex.toI32()
|
||||
const id = `${event.transaction.hash.toHex()}-${veAllocationId}-${eventIndex}`
|
||||
const id = `${event.transaction.hash.toHex()}-${veAllocationId}-${event.logIndex.toString()}`
|
||||
let allocationUpdate = VeAllocationUpdate.load(id)
|
||||
if (allocationUpdate === null) {
|
||||
allocationUpdate = new VeAllocationUpdate(id)
|
||||
|
@ -140,6 +139,7 @@ export function getveDelegation(id: string): VeDelegation {
|
|||
veDelegation.block = 0
|
||||
veDelegation.timestamp = 0
|
||||
veDelegation.tx = ''
|
||||
veDelegation.eventIndex = 0
|
||||
veDelegation.save()
|
||||
}
|
||||
return veDelegation
|
||||
|
|
|
@ -14,10 +14,9 @@ export function handleDelegation(event: DelegateBoost): void {
|
|||
const _amount = event.params._amount
|
||||
const _cancelTime = event.params._cancel_time
|
||||
const _expireTime = event.params._expire_time
|
||||
const eventIndex: number = event.logIndex.toI32()
|
||||
const tx = event.transaction.hash.toHex()
|
||||
const veDelegation = getveDelegation(
|
||||
`${tx}-${_tokenId.toHex()}-${eventIndex}`
|
||||
`${tx}-${_tokenId.toHex()}-${event.logIndex.toString()}`
|
||||
)
|
||||
veDelegation.delegator = _delegator
|
||||
getveOCEAN(_receiver)
|
||||
|
@ -40,10 +39,9 @@ export function handleExtendBoost(event: ExtendBoost): void {
|
|||
const _amount = event.params._amount
|
||||
const _cancelTime = event.params._cancel_time
|
||||
const _expireTime = event.params._expire_time
|
||||
const eventIndex: number = event.logIndex.toI32()
|
||||
const tx = event.transaction.hash.toHex()
|
||||
const veDelegation = getveDelegation(
|
||||
`${tx}-${_tokenId.toHex()}-${eventIndex}`
|
||||
`${tx}-${_tokenId.toHex()}-${event.logIndex.toString()}`
|
||||
)
|
||||
if (!veDelegation) return
|
||||
|
||||
|
@ -72,10 +70,9 @@ export function handleBurnBoost(event: BurnBoost): void {
|
|||
const _tokenId = event.params._token_id
|
||||
|
||||
// delete
|
||||
const eventIndex: number = event.logIndex.toI32()
|
||||
const tx = event.transaction.hash.toHex()
|
||||
const veDelegation = getveDelegation(
|
||||
`${tx}-${_tokenId.toHex()}-${eventIndex}`
|
||||
`${tx}-${_tokenId.toHex()}-${event.logIndex.toString()}`
|
||||
)
|
||||
veDelegation.amount = BigInt.zero()
|
||||
veDelegation.eventIndex = event.logIndex.toI32()
|
||||
|
|
|
@ -61,7 +61,6 @@ export function handleWithdraw(event: Withdraw): void {
|
|||
'-' +
|
||||
event.logIndex.toString()
|
||||
)
|
||||
if (!deposit) return
|
||||
deposit.provider = provider.toHex()
|
||||
deposit.value = weiToDecimal(value.toBigDecimal(), 18).neg()
|
||||
deposit.unlockTime = BigInt.zero()
|
||||
|
|
|
@ -593,8 +593,6 @@ describe('veOcean tests', async () => {
|
|||
await veOcean.withdraw(Alice)
|
||||
await sleep(2000)
|
||||
const totalOceanLockedAfter = await getTotalLockedOcean()
|
||||
console.log('totalOceanLockedBefore: ', totalOceanLockedBefore)
|
||||
console.log('totalOceanLockedAfter: ', totalOceanLockedAfter)
|
||||
assert(
|
||||
parseFloat(totalOceanLockedAfter) < parseFloat(totalOceanLockedBefore),
|
||||
'After (' +
|
||||
|
@ -653,8 +651,6 @@ describe('veOcean tests', async () => {
|
|||
await sleep(2000)
|
||||
const info = (await initialResponse.json()).data.veOCEANs
|
||||
assert(info[0].id === Alice.toLowerCase(), 'ID is incorrect')
|
||||
console.log('lockAmmount: ', info[0].lockedAmount)
|
||||
console.log('currentBalance: ', currentBalance)
|
||||
assert(info[0].lockedAmount === currentBalance, 'LockedAmount is incorrect')
|
||||
assert(info[0].unlockTime === currentLock, 'Unlock time is not correct')
|
||||
|
||||
|
|
|
@ -40,8 +40,6 @@ describe('Ending tests', () => {
|
|||
assert(result.data._meta.hasIndexingErrors == false)
|
||||
})
|
||||
it('Make sure that graph has synced to last block', async () => {
|
||||
console.log('meta.block: ', result.data._meta.block.number)
|
||||
console.log('lastblock: ', lastblock)
|
||||
assert(result.data._meta.block.number >= lastblock)
|
||||
assert(result.data._meta.block.number >= lastblock - 1)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue