Closed 5h4z4mm closed 2 years ago
Description Updated type definition to ignore gas field in the ABI json file.
gas
Test Evidence
import { expect, use } from "chai"; import { FakeContract, smock } from "@defi-wonderland/smock"; import { Greeter } from "../typechain"; import GreeterABI from "./testdata/Greeter.json"; use(smock.matchers); describe("Greeter", () => { let myContractFake: FakeContract<Greeter>; beforeEach(async () => { myContractFake = await smock.fake(GreeterABI); }); it("verify greeting", async function () { myContractFake.greet.returns("Hello World"); const greeting = await myContractFake.greet(); expect(greeting).to.equal("Hello World"); }); });
Before state - throws error if abi contains gas field
After state - compiiles & executes test without any error
Description Updated type definition to ignore
gas
field in the ABI json file.Test Evidence
Before state - throws error if abi contains![before](https://user-images.githubusercontent.com/88970166/174556623-7c79a1c0-7903-490d-9d91-f06c78c70611.png)
gas
fieldAfter state - compiiles & executes test without any error![after](https://user-images.githubusercontent.com/88970166/174556649-75574d06-6367-44a7-b26b-1a8314265e0c.png)