add tx as well
This commit is contained in:
parent
da54c871df
commit
6557ebc148
|
@ -469,6 +469,7 @@ type VeDelegation @entity {
|
|||
expireTime: BigInt!
|
||||
block: Int!
|
||||
timestamp: Int!
|
||||
tx: String!
|
||||
}
|
||||
|
||||
type VeOCEAN @entity {
|
||||
|
|
|
@ -134,6 +134,7 @@ export function getveDelegation(id: string): VeDelegation {
|
|||
veDelegation.delegator = ''
|
||||
veDelegation.block = 0
|
||||
veDelegation.timestamp = 0
|
||||
veDelegation.tx = ''
|
||||
veDelegation.save()
|
||||
}
|
||||
return veDelegation
|
||||
|
|
|
@ -25,6 +25,7 @@ export function handleDelegation(event: DelegateBoost): void {
|
|||
veDelegation.expireTime = _expireTime
|
||||
veDelegation.block = event.block.number.toI32()
|
||||
veDelegation.timestamp = event.block.timestamp.toI32()
|
||||
veDelegation.tx = event.transaction.hash.toHex()
|
||||
veDelegation.save()
|
||||
}
|
||||
|
||||
|
@ -44,6 +45,7 @@ export function handleExtendBoost(event: ExtendBoost): void {
|
|||
veDelegation.cancelTime = _cancelTime
|
||||
veDelegation.expireTime = _expireTime
|
||||
veDelegation.timestamp = event.block.timestamp.toI32()
|
||||
veDelegation.tx = event.transaction.hash.toHex()
|
||||
veDelegation.save()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue