Skip to content

Instantly share code, notes, and snippets.

@axiomatic-aardvark
Last active August 11, 2021 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axiomatic-aardvark/1fc840545551282330c412d8a957c394 to your computer and use it in GitHub Desktop.
Save axiomatic-aardvark/1fc840545551282330c412d8a957c394 to your computer and use it in GitHub Desktop.
import { assert, createMockedFunction } from "matchstick-as/assembly/index";
import { Contract } from "../../generated/MyDataSource/Example";
import { Address, ethereum } from "@graphprotocol/graph-ts";
let contractAddress = Address.fromString("0x89205A3A3b2A69De6Dbf7f01ED13B2108B2c43e7");
let arg = ethereum.Value.fromString("example string arg");
createMockedFunction(contractAddress, "functionName", "functionName(string):(string)")
.withArgs([arg])
.reverts();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment