import { newMockEvent } from "matchstick-as" import { ethereum, BigInt, Address } from "@graphprotocol/graph-ts" import { PositionCreated, PositionRemoved } from "../generated/Stake/Stake" export function createPositionCreatedEvent( positionId: BigInt, owner: Address, share: BigInt, creationTime: BigInt, taxRate: BigInt ): PositionCreated { let positionCreatedEvent = changetype(newMockEvent()) positionCreatedEvent.parameters = new Array() positionCreatedEvent.parameters.push( new ethereum.EventParam( "positionId", ethereum.Value.fromUnsignedBigInt(positionId) ) ) positionCreatedEvent.parameters.push( new ethereum.EventParam("owner", ethereum.Value.fromAddress(owner)) ) positionCreatedEvent.parameters.push( new ethereum.EventParam("share", ethereum.Value.fromUnsignedBigInt(share)) ) positionCreatedEvent.parameters.push( new ethereum.EventParam( "creationTime", ethereum.Value.fromUnsignedBigInt(creationTime) ) ) positionCreatedEvent.parameters.push( new ethereum.EventParam( "taxRate", ethereum.Value.fromUnsignedBigInt(taxRate) ) ) return positionCreatedEvent } export function createPositionRemovedEvent( positionId: BigInt, share: BigInt, lastTaxTime: BigInt ): PositionRemoved { let positionRemovedEvent = changetype(newMockEvent()) positionRemovedEvent.parameters = new Array() positionRemovedEvent.parameters.push( new ethereum.EventParam( "positionId", ethereum.Value.fromUnsignedBigInt(positionId) ) ) positionRemovedEvent.parameters.push( new ethereum.EventParam("share", ethereum.Value.fromUnsignedBigInt(share)) ) positionRemovedEvent.parameters.push( new ethereum.EventParam( "lastTaxTime", ethereum.Value.fromUnsignedBigInt(lastTaxTime) ) ) return positionRemovedEvent }