mirror of
https://github.com/Instadapp/fla-fees-subgraph.git
synced 2024-07-29 21:57:15 +00:00
52 lines
1.4 KiB
TypeScript
52 lines
1.4 KiB
TypeScript
|
import { newMockEvent } from "matchstick-as"
|
||
|
import { ethereum, Address } from "@graphprotocol/graph-ts"
|
||
|
import { AdminChanged, BeaconUpgraded, Upgraded } from "../generated/FLA/FLA"
|
||
|
|
||
|
export function createAdminChangedEvent(
|
||
|
previousAdmin: Address,
|
||
|
newAdmin: Address
|
||
|
): AdminChanged {
|
||
|
let adminChangedEvent = changetype<AdminChanged>(newMockEvent())
|
||
|
|
||
|
adminChangedEvent.parameters = new Array()
|
||
|
|
||
|
adminChangedEvent.parameters.push(
|
||
|
new ethereum.EventParam(
|
||
|
"previousAdmin",
|
||
|
ethereum.Value.fromAddress(previousAdmin)
|
||
|
)
|
||
|
)
|
||
|
adminChangedEvent.parameters.push(
|
||
|
new ethereum.EventParam("newAdmin", ethereum.Value.fromAddress(newAdmin))
|
||
|
)
|
||
|
|
||
|
return adminChangedEvent
|
||
|
}
|
||
|
|
||
|
export function createBeaconUpgradedEvent(beacon: Address): BeaconUpgraded {
|
||
|
let beaconUpgradedEvent = changetype<BeaconUpgraded>(newMockEvent())
|
||
|
|
||
|
beaconUpgradedEvent.parameters = new Array()
|
||
|
|
||
|
beaconUpgradedEvent.parameters.push(
|
||
|
new ethereum.EventParam("beacon", ethereum.Value.fromAddress(beacon))
|
||
|
)
|
||
|
|
||
|
return beaconUpgradedEvent
|
||
|
}
|
||
|
|
||
|
export function createUpgradedEvent(implementation: Address): Upgraded {
|
||
|
let upgradedEvent = changetype<Upgraded>(newMockEvent())
|
||
|
|
||
|
upgradedEvent.parameters = new Array()
|
||
|
|
||
|
upgradedEvent.parameters.push(
|
||
|
new ethereum.EventParam(
|
||
|
"implementation",
|
||
|
ethereum.Value.fromAddress(implementation)
|
||
|
)
|
||
|
)
|
||
|
|
||
|
return upgradedEvent
|
||
|
}
|