Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

how to unfake fake one. #180

Description

@novaknole
it("test 1", async () => {
   const fake = await smock.fake("contractExample", {
         address: contractExample.address
   })
   
   expect(fake.execute).has.been.calledWith(1); // Works great
})

it("test 2", async () => {
   await contractExample.getAction(); 
})

Problem is that I deploy contractExample in before hook, only one time. in test1, I replace it with fake, but in test2, I need the original one, because await contractExample.getAction(); returns 0x...0, since it became a fake. How can I reset it in test1, so on contractExample.address, even in test 2, we got fake, and I need original.

How can I achieve it ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions