matchstick-as
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -1,2 +0,2 @@ | ||
import { Address, BigInt, Bytes, ByteArray, Wrapped, ethereum } from "@graphprotocol/graph-ts"; | ||
import { Address, BigInt, Bytes, Wrapped, ethereum } from "@graphprotocol/graph-ts"; | ||
@@ -14,2 +14,18 @@ let defaultAddress = Address.fromString("0xA16081F360e3847006dB660bae1c6d1b2e17eC2A"); | ||
export function newMockEventWithParams(params: Array<ethereum.EventParam>): ethereum.Event { | ||
let event = newMockEvent(); | ||
event.parameters = params; | ||
return event; | ||
} | ||
export function newTypedMockEvent<EventType>(): EventType { | ||
return changetype<EventType>(newMockEvent()); | ||
} | ||
export function newTypedMockEventWithParams<EventType>(params: Array<ethereum.EventParam>): EventType { | ||
let event = newMockEvent(); | ||
event.parameters = params; | ||
return changetype<EventType>(event); | ||
} | ||
export function newMockCall(): ethereum.Call { | ||
@@ -19,2 +35,6 @@ return new ethereum.Call(defaultAddress, defaultAddress, newBlock(), newTransaction(), [], []); | ||
export function newMockCallWithIO(inputParams: Array<ethereum.EventParam>, outputParams: Array<ethereum.EventParam>): ethereum.Call { | ||
return new ethereum.Call(defaultAddress, defaultAddress, newBlock(), newTransaction(), inputParams, outputParams); | ||
} | ||
function newBlock(): ethereum.Block { | ||
@@ -21,0 +41,0 @@ return new ethereum.Block(defaultAddressBytes, defaultAddressBytes, defaultAddressBytes, defaultAddress, |
@@ -6,3 +6,3 @@ import { Address, ethereum } from "@graphprotocol/graph-ts"; | ||
export { dataSourceMock } from "./data_source_mock"; | ||
export { newMockEvent, newMockCall } from "./defaults"; | ||
export { newMockEvent, newMockEventWithParams, newTypedMockEvent, newTypedMockEventWithParams, newMockCall, newMockCallWithIO } from "./defaults"; | ||
export { assert } from "./assert"; | ||
@@ -9,0 +9,0 @@ export { log } from "./log"; |
{ | ||
"name": "matchstick-as", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"author": "LimeChain", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13147
316