Repository: defi-wonderland/smock
Pull request #17 (2021-07-30 13:57:05)

refactor: renamed lopt to smock


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d0f285a..e83a098 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,55 +2,55 @@
 
 All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
 
-## [1.0.0](https://github.com/defi-wonderland/lopt/compare/v1.0.0-rc.0...v1.0.0) (2021-07-25)
+## [1.0.0](https://github.com/defi-wonderland/smock/compare/v1.0.0-rc.0...v1.0.0) (2021-07-25)
 
-## [1.0.0-rc.0](https://github.com/defi-wonderland/lopt/compare/v0.0.3...v1.0.0-rc.0) (2021-07-25)
+## [1.0.0-rc.0](https://github.com/defi-wonderland/smock/compare/v0.0.3...v1.0.0-rc.0) (2021-07-25)
 
 
 ### Features
 
-* mocks can now edit internal variables ([#7](https://github.com/defi-wonderland/lopt/issues/7)) ([c4bfac6](https://github.com/defi-wonderland/lopt/commit/c4bfac6a9ab222f6899301f30cdb70f271b2e146))
+* mocks can now edit internal variables ([#7](https://github.com/defi-wonderland/smock/issues/7)) ([c4bfac6](https://github.com/defi-wonderland/smock/commit/c4bfac6a9ab222f6899301f30cdb70f271b2e146))
 
-### [0.0.4-rc.0](https://github.com/defi-wonderland/lopt/compare/v0.0.3...v0.0.4-rc.0) (2021-07-25)
+### [0.0.4-rc.0](https://github.com/defi-wonderland/smock/compare/v0.0.3...v0.0.4-rc.0) (2021-07-25)
 
-### [0.0.3](https://github.com/defi-wonderland/lopt/compare/v0.0.2...v0.0.3) (2021-07-23)
+### [0.0.3](https://github.com/defi-wonderland/smock/compare/v0.0.2...v0.0.3) (2021-07-23)
 
 
 ### Features
 
-* fallback function support ([#5](https://github.com/defi-wonderland/lopt/issues/5)) ([c43c7ef](https://github.com/defi-wonderland/lopt/commit/c43c7ef113f0cd17b1bb2d9dfe323d5a2dc715c8))
+* fallback function support ([#5](https://github.com/defi-wonderland/smock/issues/5)) ([c43c7ef](https://github.com/defi-wonderland/smock/commit/c43c7ef113f0cd17b1bb2d9dfe323d5a2dc715c8))
 
-### [0.0.2](https://github.com/defi-wonderland/lopt/compare/v0.0.1...v0.0.2) (2021-07-22)
+### [0.0.2](https://github.com/defi-wonderland/smock/compare/v0.0.1...v0.0.2) (2021-07-22)
 
 ### 0.0.1 (2021-07-22)
 
 
 ### Features
 
-* added sphinx docs ([#1](https://github.com/defi-wonderland/lopt/issues/1)) ([87f8db3](https://github.com/defi-wonderland/lopt/commit/87f8db389b157c35792d640067aa7e1038198e63))
-* first commit ([7562e2c](https://github.com/defi-wonderland/lopt/commit/7562e2cd6cf7d79b8581e093766cb3d60a4a1974))
+* added sphinx docs ([#1](https://github.com/defi-wonderland/smock/issues/1)) ([87f8db3](https://github.com/defi-wonderland/smock/commit/87f8db389b157c35792d640067aa7e1038198e63))
+* first commit ([7562e2c](https://github.com/defi-wonderland/smock/commit/7562e2cd6cf7d79b8581e093766cb3d60a4a1974))
 
-### [0.0.1-rc.3](https://github.com/defi-wonderland/lopt/compare/v0.0.1-rc.2...v0.0.1-rc.3) (2021-07-22)
+### [0.0.1-rc.3](https://github.com/defi-wonderland/smock/compare/v0.0.1-rc.2...v0.0.1-rc.3) (2021-07-22)
 
-### [0.0.1-rc.2](https://github.com/defi-wonderland/lopt/compare/v0.0.1-rc.1...v0.0.1-rc.2) (2021-07-22)
+### [0.0.1-rc.2](https://github.com/defi-wonderland/smock/compare/v0.0.1-rc.1...v0.0.1-rc.2) (2021-07-22)
 
 
 ### Features
 
-* added getCall to watchable fns ([5ff6598](https://github.com/defi-wonderland/lopt/commit/5ff6598719e80127378bbce5e8a07157560a842d))
+* added getCall to watchable fns ([5ff6598](https://github.com/defi-wonderland/smock/commit/5ff6598719e80127378bbce5e8a07157560a842d))
 
 ### 0.0.1-rc.1 (2021-07-22)
 
 
 ### Features
 
-* added sphinx docs ([#1](https://github.com/defi-wonderland/lopt/issues/1)) ([87f8db3](https://github.com/defi-wonderland/lopt/commit/87f8db389b157c35792d640067aa7e1038198e63))
-* first commit ([7562e2c](https://github.com/defi-wonderland/lopt/commit/7562e2cd6cf7d79b8581e093766cb3d60a4a1974))
+* added sphinx docs ([#1](https://github.com/defi-wonderland/smock/issues/1)) ([87f8db3](https://github.com/defi-wonderland/smock/commit/87f8db389b157c35792d640067aa7e1038198e63))
+* first commit ([7562e2c](https://github.com/defi-wonderland/smock/commit/7562e2cd6cf7d79b8581e093766cb3d60a4a1974))
 
 ### 0.0.1-rc.0 (2021-07-22)
 
 
 ### Features
 
-* added sphinx docs ([#1](https://github.com/defi-wonderland/lopt/issues/1)) ([87f8db3](https://github.com/defi-wonderland/lopt/commit/87f8db389b157c35792d640067aa7e1038198e63))
-* first commit ([7562e2c](https://github.com/defi-wonderland/lopt/commit/7562e2cd6cf7d79b8581e093766cb3d60a4a1974))
+* added sphinx docs ([#1](https://github.com/defi-wonderland/smock/issues/1)) ([87f8db3](https://github.com/defi-wonderland/smock/commit/87f8db389b157c35792d640067aa7e1038198e63))
+* first commit ([7562e2c](https://github.com/defi-wonderland/smock/commit/7562e2cd6cf7d79b8581e093766cb3d60a4a1974))
diff --git a/README.md b/README.md
index 4a996b3..02f897e 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
-# lopt
+# smock
 
-[![NPM Package](https://img.shields.io/npm/v/@defi-wonderland/lopt.svg?style=flat-square)](https://www.npmjs.org/package/@defi-wonderland/lopt)
+[![NPM Package](https://img.shields.io/npm/v/@defi-wonderland/smock.svg?style=flat-square)](https://www.npmjs.org/package/@defi-wonderland/smock)
 
-`lopt` is a utility package that can generate mock Solidity contracts in the form of `fakes` and `mocks`.
+`smock` is a utility package that can generate mock Solidity contracts in the form of `fakes` and `mocks`.
 
-`lopt` is based in [@eth-optimism/smock](https://github.com/ethereum-optimism/optimism/tree/develop/packages/smock), [sinon](https://sinonjs.org/) and [sinon-chai](https://www.chaijs.com/plugins/sinon-chai/).
+`smock` is based in [@eth-optimism/smock](https://github.com/ethereum-optimism/optimism/tree/develop/packages/smock), [sinon](https://sinonjs.org/) and [sinon-chai](https://www.chaijs.com/plugins/sinon-chai/).
 
-Some benefits of using `lopt`:
+Some benefits of using `smock`:
 
 - Test syntax is easy to understand, just like `sinon-chai`
 - Supports both chai `expect` and `should` syntax
@@ -14,27 +14,28 @@ Some benefits of using `lopt`:
 - Mock and assert contract calls, without the need of even deploying it by using `fakes`
 - If you need your contract logic, just wrap it in a `mock` and start asserting calls or changing behaviour
 - Fully tested library
+- It sounds cool
 
 ---
 
 ## Documentation
 
-Documentation is available [here](https://lopt.readthedocs.io/en/latest/).
+Documentation is available [here](https://smock.readthedocs.io/en/latest/).
 
 ---
 
 ## Installation
 
-You can easily install `lopt` via npm:
+You can easily install `smock` via npm:
 
 ```
-npm install --save-dev @defi-wonderland/lopt
+npm install --save-dev @defi-wonderland/smock
 ```
 
 Or via yarn:
 
 ```
-yarn add --dev @defi-wonderland/lopt
+yarn add --dev @defi-wonderland/smock
 ```
 
 ---
@@ -43,17 +44,17 @@ yarn add --dev @defi-wonderland/lopt
 
 ```typescript
 ...
-import { FakeContract, lopt } from '@defi-wonderland/lopt';
+import { FakeContract, smock } from '@defi-wonderland/smock';
 
 chai.should(); // if you like should syntax
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('MyContract', () => {
     let myContractFake: FakeContract<MyContract>;
 
     beforeEach(async () => {
         ...
-        myContractFake = await lopt.fake<MyContract>('MyContract');
+        myContractFake = await smock.fake<MyContract>('MyContract');
     });
 
     it('some test', () => {
@@ -62,11 +63,3 @@ describe('MyContract', () => {
     });
 });
 ```
-
----
-
-## Why the name `lopt`?
-
-Loki's alternative name is Lopt, and Loki was obviously taken.
-
-Loki is the God of Mischief, a trickster, and the purpose of mocking libraries is basically to trick the tests.
diff --git a/docs/source/conf.py b/docs/source/conf.py
index efd0392..59bbde0 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -17,7 +17,7 @@
 
 # -- Project information -----------------------------------------------------
 
-project = 'lopt'
+project = 'smock'
 copyright = '2021, DeFi Wonderland'
 author = 'DeFi Wonderland'
 
diff --git a/docs/source/fakes.rst b/docs/source/fakes.rst
index 9b91a3e..7f8c9c3 100644
--- a/docs/source/fakes.rst
+++ b/docs/source/fakes.rst
@@ -17,9 +17,9 @@ Fakes can be initialized using the: **contract name**, **abi**, **factory** or e
 .. code-block:: javascript
 
   import { MyOracle, MyContract, MyContract__factory } from '@typechained';
-  import { FakeContract, lopt } from '@defi-wonderland/lopt';
+  import { FakeContract, smock } from '@defi-wonderland/smock';
 
-  chai.use(lopt.matchers);
+  chai.use(smock.matchers);
 
   describe('MyContract', () => {
     let myContractFactory: MyContract__factory;
@@ -32,7 +32,7 @@ Fakes can be initialized using the: **contract name**, **abi**, **factory** or e
     });
 
     beforeEach(async () => {
-      cookiesOracle = await lopt.fake<CookiesOracle>('CookiesOracle');
+      cookiesOracle = await smock.fake<CookiesOracle>('CookiesOracle');
       myContract = await myContractFactory.deploy(cookiesOracle.address);
     });
 
diff --git a/docs/source/getting-started.rst b/docs/source/getting-started.rst
index 8f6e48e..24d8b60 100644
--- a/docs/source/getting-started.rst
+++ b/docs/source/getting-started.rst
@@ -4,7 +4,7 @@ Getting Started
 Installation
 ------------
 
-To get started, install :code:`lopt`:
+To get started, install :code:`smock`:
 
 .. tabs::
 
@@ -12,13 +12,13 @@ To get started, install :code:`lopt`:
 
     .. code-block:: text
 
-      yarn add --dev lopt
+      yarn add --dev smock
 
   .. group-tab:: npm
 
     .. code-block:: text
 
-      npm install --save-dev lopt
+      npm install --save-dev smock
 
 Enabling mocks
 --------------
diff --git a/docs/source/index.rst b/docs/source/index.rst
index eec1343..583e36d 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -1,7 +1,7 @@
-Lopt Documentation
+Smock Documentation
 ==================
 
-lopt is a utility package that can generate mock Solidity contracts in the form of :code:`fakes` and :code:`mocks`.
+smock is a utility package that can generate mock Solidity contracts in the form of :code:`fakes` and :code:`mocks`.
 
 Some benefits
 -------------
@@ -13,15 +13,9 @@ Some benefits
 * Well documented,
 * Mock and assert contract calls,
 * Preprogram returns and reverts,
+* It sounds cool,
 * And more...
 
-Why the name lopt?
-------------------
-
-Loki's alternative name is Lopt, and Loki was obviously taken.
-
-Loki is the God of Mischief, a trickster, and the purpose of mocking libraries is basically to trick the tests.
-
 
 .. toctree::
    :maxdepth: 2
diff --git a/docs/source/migrations/v1-to-v2.rst b/docs/source/migrations/v1-to-v2.rst
index fede0cd..35b02e0 100644
--- a/docs/source/migrations/v1-to-v2.rst
+++ b/docs/source/migrations/v1-to-v2.rst
@@ -28,7 +28,7 @@ With Typechain:
 
 .. code-block:: typescript
   
-  import { FakeContract } from '@defi-wonderland/lopt';
+  import { FakeContract } from '@defi-wonderland/smock';
   import { CookieEater } from '@typechained';
 
   let cookieEater: FakeContract<CookieEater>; // will extend all of the CookieEater method types
@@ -37,7 +37,7 @@ Without Typechain:
 
 .. code-block:: typescript
   
-  import { FakeContract } from '@defi-wonderland/lopt';
+  import { FakeContract } from '@defi-wonderland/smock';
   import { Contract } from 'ethers';
 
   let cookieEater: FakeContract<Contract>; // will extend all of the CookieEater method types
@@ -72,13 +72,13 @@ Install the new one
 
     .. code-block:: text
 
-      yarn add --dev @defi-wonderland/lopt
+      yarn add --dev @defi-wonderland/smock
 
   .. group-tab:: npm
 
     .. code-block:: text
 
-      npm install --save-dev @defi-wonderland/lopt
+      npm install --save-dev @defi-wonderland/smock
 
 
 ==========================
@@ -122,10 +122,10 @@ Smockit initialization
 
   .. code-block:: typescript
 
-    import { lopt } from '@defi-wonderland/lopt';
+    import { smock } from '@defi-wonderland/smock';
     import { MyContract } from '@typechained';
 
-    const myFakeContract = await lopt.fake<MyContract>('MyContract');
+    const myFakeContract = await smock.fake<MyContract>('MyContract');
 
 
 Returns
@@ -233,9 +233,9 @@ Creating a modifiable contract
   .. code-block:: typescript
 
     import { MyContract } from '@typechained';
-    import { MockContract, MockContractFactory, lopt } from '@defi-wonderland/lopt';
+    import { MockContract, MockContractFactory, smock } from '@defi-wonderland/smock';
 
-    const myMockContractFactory: MockContractFactory<MyContract> = await lopt.mock('MyContract');
+    const myMockContractFactory: MockContractFactory<MyContract> = await smock.mock('MyContract');
     const myMockContract: MockContract<MyContract> = await myMockContractFactory.deploy(...);
 
 
diff --git a/docs/source/mocks.rst b/docs/source/mocks.rst
index 5be4dd0..16125d8 100644
--- a/docs/source/mocks.rst
+++ b/docs/source/mocks.rst
@@ -38,14 +38,14 @@ How to use
   .. code-block:: javascript
 
     import { Counter } from '@typechained';
-    import { MockContract, MockContractFactory, lopt } from '@defi-wonderland/lopt';
+    import { MockContract, MockContractFactory, smock } from '@defi-wonderland/smock';
 
     describe('Counter', () => {
       let counterFactory: MockContractFactory<Counter>;
       let counter: MockContract<Counter>;
 
       before(async () => {
-        counterFactory = await lopt.mock<Counter>('Counter');
+        counterFactory = await smock.mock<Counter>('Counter');
       });
 
       beforeEach(async () => {
diff --git a/package.json b/package.json
index 371b8cb..e12d8e3 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
-  "name": "@defi-wonderland/lopt",
+  "name": "@defi-wonderland/smock",
   "version": "1.0.0",
   "description": "Mocking framework for Solidity contracts",
   "keywords": [
@@ -13,13 +13,13 @@
     "mocks",
     "chai"
   ],
-  "homepage": "https://github.com/defi-wonderland/lopt#readme",
+  "homepage": "https://github.com/defi-wonderland/smock#readme",
   "bugs": {
-    "url": "https://github.com/defi-wonderland/lopt/issues"
+    "url": "https://github.com/defi-wonderland/smock/issues"
   },
   "repository": {
     "type": "git",
-    "url": "git+https://github.com/defi-wonderland/lopt.git"
+    "url": "git+https://github.com/defi-wonderland/smock.git"
   },
   "license": "MIT",
   "author": "DeFi Wonderland",
diff --git a/lopt.code-workspace b/smock.code-workspace
similarity index 100%
rename from lopt.code-workspace
rename to smock.code-workspace
diff --git a/src/chai-plugin/matchers.ts b/src/chai-plugin/matchers.ts
index 1e160cc..3b54866 100644
--- a/src/chai-plugin/matchers.ts
+++ b/src/chai-plugin/matchers.ts
@@ -54,7 +54,7 @@ export const matchers: Chai.ChaiPlugin = (chai: Chai.ChaiStatic, utils: Chai.Cha
     };
   }
 
-  function loptProperty(name: string, action: string, nonNegatedSuffix: string) {
+  function smockProperty(name: string, action: string, nonNegatedSuffix: string) {
     addChaiProperty(name, (assertion) => {
       const watchablecontract: WatchableFunctionLogic = findWatchableContract(assertion._obj);
 
@@ -68,7 +68,7 @@ export const matchers: Chai.ChaiPlugin = (chai: Chai.ChaiStatic, utils: Chai.Cha
     return 'get' + name.charAt(0).toUpperCase() + name.slice(1);
   }
 
-  function loptPropertyAsBooleanMethod(name: string, action: string, nonNegatedSuffix: string) {
+  function smockPropertyAsBooleanMethod(name: string, action: string, nonNegatedSuffix: string) {
     addChaiMethod(name, (assertion: any, arg: any) => {
       const watchablecontract: WatchableFunctionLogic = findWatchableContract(assertion._obj);
 
@@ -78,18 +78,18 @@ export const matchers: Chai.ChaiPlugin = (chai: Chai.ChaiStatic, utils: Chai.Cha
     });
   }
 
-  function createLoptMethodHandler(loptName: string, action: string, nonNegatedSuffix: string) {
+  function createSmockMethodHandler(smockName: string, action: string, nonNegatedSuffix: string) {
     return (assertion: any, ...args: unknown[]) => {
       const watchablecontract: WatchableFunctionLogic = findWatchableContract(assertion._obj);
 
-      let methodToCall = loptName;
+      let methodToCall = smockName;
       let shouldBeAlways = false;
 
       // support always flag
       if (utils.flag(assertion, 'always')) {
-        const alwaysMethod = 'always' + loptName[0].toUpperCase() + loptName.substring(1);
+        const alwaysMethod = 'always' + smockName[0].toUpperCase() + smockName.substring(1);
         if (typeof (watchablecontract as any)[alwaysMethod] !== 'function') {
-          throw Error(`always flag is not supported for method ${loptName}`);
+          throw Error(`always flag is not supported for method ${smockName}`);
         }
 
         methodToCall = alwaysMethod;
@@ -101,13 +101,13 @@ export const matchers: Chai.ChaiPlugin = (chai: Chai.ChaiStatic, utils: Chai.Cha
     };
   }
 
-  function loptMethod(name: string, action: string, nonNegatedSuffix: string = '') {
-    const handler = createLoptMethodHandler(name, action, nonNegatedSuffix);
+  function smockMethod(name: string, action: string, nonNegatedSuffix: string = '') {
+    const handler = createSmockMethodHandler(name, action, nonNegatedSuffix);
     addChaiMethod(name, handler);
   }
 
-  function loptMethodWithWatchableContractArg(name: string, action: string, nonNegatedSuffix: string = '') {
-    const handler = createLoptMethodHandler(name, action, nonNegatedSuffix);
+  function smockMethodWithWatchableContractArg(name: string, action: string, nonNegatedSuffix: string = '') {
+    const handler = createSmockMethodHandler(name, action, nonNegatedSuffix);
     addChaiMethod(name, (assertion, arg: WatchableContractFunction) => handler(assertion, arg._watchable));
   }
 
@@ -126,15 +126,15 @@ export const matchers: Chai.ChaiPlugin = (chai: Chai.ChaiStatic, utils: Chai.Cha
   }
 
   addChaiProperty('always', (assertion) => utils.flag(assertion, 'always', true));
-  loptProperty('called', 'been called', ' at least once, but it was never called');
-  loptPropertyAsBooleanMethod('callCount', 'been called exactly %1', ', but it was called %c%C');
-  loptProperty('calledOnce', 'been called exactly once', ', but it was called %c%C');
-  loptProperty('calledTwice', 'been called exactly twice', ', but it was called %c%C');
-  loptProperty('calledThrice', 'been called exactly thrice', ', but it was called %c%C');
-  loptMethodWithWatchableContractArg('calledBefore', 'been called before %1');
-  loptMethodWithWatchableContractArg('calledAfter', 'been called after %1');
-  loptMethodWithWatchableContractArg('calledImmediatelyBefore', 'been called immediately before %1');
-  loptMethodWithWatchableContractArg('calledImmediatelyAfter', 'been called immediately after %1');
-  loptMethod('calledWith', 'been called with arguments %*', '%D');
-  loptMethod('calledOnceWith', 'been called exactly once with arguments %*', '%D');
+  smockProperty('called', 'been called', ' at least once, but it was never called');
+  smockPropertyAsBooleanMethod('callCount', 'been called exactly %1', ', but it was called %c%C');
+  smockProperty('calledOnce', 'been called exactly once', ', but it was called %c%C');
+  smockProperty('calledTwice', 'been called exactly twice', ', but it was called %c%C');
+  smockProperty('calledThrice', 'been called exactly thrice', ', but it was called %c%C');
+  smockMethodWithWatchableContractArg('calledBefore', 'been called before %1');
+  smockMethodWithWatchableContractArg('calledAfter', 'been called after %1');
+  smockMethodWithWatchableContractArg('calledImmediatelyBefore', 'been called immediately before %1');
+  smockMethodWithWatchableContractArg('calledImmediatelyAfter', 'been called immediately after %1');
+  smockMethod('calledWith', 'been called with arguments %*', '%D');
+  smockMethod('calledOnceWith', 'been called exactly once with arguments %*', '%D');
 };
diff --git a/src/factories/lopt-contract.ts b/src/factories/smock-contract.ts
similarity index 100%
rename from src/factories/lopt-contract.ts
rename to src/factories/smock-contract.ts
diff --git a/src/index.ts b/src/index.ts
index efb99dd..5a3c957 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -16,4 +16,4 @@ async function mock<Contract extends BaseContract>(contractName: string): Promis
 }
 
 export * from './types';
-export const lopt = { fake, mock, matchers };
+export const smock = { fake, mock, matchers };
diff --git a/src/logic/editable-storage-logic.ts b/src/logic/editable-storage-logic.ts
index 656c459..e44ba0b 100644
--- a/src/logic/editable-storage-logic.ts
+++ b/src/logic/editable-storage-logic.ts
@@ -1,12 +1,12 @@
-import { LoptVMManager } from '../types';
+import { SmockVMManager } from '../types';
 import { convertToStorageSlots, fromHexString, toFancyAddress } from '../utils';
 
 export class EditableStorageLogic {
   private storageLayout: any;
   private contractAddress: string;
-  private vmManager: LoptVMManager;
+  private vmManager: SmockVMManager;
 
-  constructor(storageLayout: any, vmManager: LoptVMManager, contractAddress: string) {
+  constructor(storageLayout: any, vmManager: SmockVMManager, contractAddress: string) {
     this.storageLayout = storageLayout;
     this.vmManager = vmManager;
     this.contractAddress = contractAddress;
diff --git a/src/logic/programmable-function-logic.ts b/src/logic/programmable-function-logic.ts
index d9276af..f3d1714 100644
--- a/src/logic/programmable-function-logic.ts
+++ b/src/logic/programmable-function-logic.ts
@@ -70,7 +70,7 @@ export class ProgrammableFunctionLogic extends WatchableFunctionLogic {
       result.gasUsed = new BN(0);
       result.execResult.gasUsed = new BN(0);
       if (answer.shouldRevert) {
-        result.execResult.exceptionError = new VmError('lopt revert' as any);
+        result.execResult.exceptionError = new VmError('smock revert' as any);
         result.execResult.returnValue = this.encodeRevertReason(answer.value);
       } else {
         result.execResult.returnValue = await this.encodeValue(answer.value, call);
diff --git a/src/observable-vm.ts b/src/observable-vm.ts
index 59b0e52..4aced58 100644
--- a/src/observable-vm.ts
+++ b/src/observable-vm.ts
@@ -4,7 +4,7 @@ import Message from '@nomiclabs/ethereumjs-vm/dist/evm/message';
 import { Transaction } from 'ethers';
 import { Observable, Subject } from 'rxjs';
 import { filter, share } from 'rxjs/operators';
-import { LoptVMManager } from './types';
+import { SmockVMManager } from './types';
 
 export class ObservableVM {
   private vm: VM;
@@ -21,8 +21,8 @@ export class ObservableVM {
     this.afterMessage$ = ObservableVM.fromEvent<EVMResult>(vm, 'afterMessage');
   }
 
-  getManager(): LoptVMManager {
-    return (this.vm.pStateManager || this.vm.stateManager) as LoptVMManager;
+  getManager(): SmockVMManager {
+    return (this.vm.pStateManager || this.vm.stateManager) as SmockVMManager;
   }
 
   getBeforeTx(): Observable<Transaction> {
diff --git a/src/sandbox.ts b/src/sandbox.ts
index 198cb15..438cd95 100644
--- a/src/sandbox.ts
+++ b/src/sandbox.ts
@@ -2,7 +2,7 @@ import VM from '@nomiclabs/ethereumjs-vm';
 import { BaseContract } from 'ethers';
 import hre from 'hardhat';
 import { ethersInterfaceFromSpec } from './factories/ethers-interface';
-import { createFakeContract, createMockContractFactory } from './factories/lopt-contract';
+import { createFakeContract, createMockContractFactory } from './factories/smock-contract';
 import { ObservableVM } from './observable-vm';
 import { FakeContract, FakeContractOptions, FakeContractSpec, MockContractFactory } from './types';
 import { getHardhatBaseProvider, makeRandomAddress } from './utils';
@@ -51,7 +51,7 @@ export class Sandbox {
   static async create(): Promise<Sandbox> {
     // Only support native hardhat runtime, haven't bothered to figure it out for anything else.
     if (hre.network.name !== 'hardhat') {
-      throw new Error(`Lopt is only compatible with the "hardhat" network, got: ${hre.network.name}`);
+      throw new Error(`Smock is only compatible with the "hardhat" network, got: ${hre.network.name}`);
     }
 
     const provider: any = await getHardhatBaseProvider(hre);
@@ -66,7 +66,7 @@ export class Sandbox {
     // with stack traces so we need to help hardhat out a bit when it comes to smock-specific errors.
     const originalManagerErrorsFn = node._manageErrors.bind(node);
     node._manageErrors = async (vmResult: any, vmTrace: any, vmTracerError?: any): Promise<any> => {
-      if (vmResult.exceptionError && vmResult.exceptionError.error === 'lopt revert') {
+      if (vmResult.exceptionError && vmResult.exceptionError.error === 'smock revert') {
         return new TransactionExecutionError(`VM Exception while processing transaction: revert ${decodeRevertReason(vmResult.returnValue)}`);
       }
 
diff --git a/src/types.ts b/src/types.ts
index 1e19781..8e52a08 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -16,7 +16,7 @@ export interface FakeContractOptions {
 
 export type ProgrammedReturnValue = any;
 
-export interface LoptVMManager {
+export interface SmockVMManager {
   putContractCode: (address: Buffer, code: Buffer) => Promise<void>;
   getContractStorage: (address: Buffer, slotHash: Buffer) => Promise<Buffer>;
   putContractStorage: (address: Buffer, slotHash: Buffer, slotValue: Buffer) => Promise<void>;
diff --git a/src/utils/hardhat.ts b/src/utils/hardhat.ts
index dffd30f..8faad86 100644
--- a/src/utils/hardhat.ts
+++ b/src/utils/hardhat.ts
@@ -34,7 +34,7 @@ export const getHardhatBaseProvider = async (runtime: HardhatRuntimeEnvironment)
     // Just throw if we ever end up in (what seems to be) an infinite loop.
     currentLoopIterations += 1;
     if (currentLoopIterations > maxLoopIterations) {
-      throw new Error(`[lopt]: unable to find base hardhat provider. are you sure you're running locally?`);
+      throw new Error(`[smock]: unable to find base hardhat provider. are you sure you're running locally?`);
     }
   }
 


Test patch:
diff --git a/test/unit/fake/initialization.spec.ts b/test/unit/fake/initialization.spec.ts
index f56f840..593b9ad 100644
--- a/test/unit/fake/initialization.spec.ts
+++ b/test/unit/fake/initialization.spec.ts
@@ -1,55 +1,55 @@
-import { FakeContract, lopt } from '@src';
+import { FakeContract, smock } from '@src';
 import { Receiver, Receiver__factory } from '@typechained';
 import receiverArtifact from 'artifacts/test/contracts/watchable-function-logic/Receiver.sol/Receiver.json';
 import chai, { expect } from 'chai';
 import { ethers } from 'hardhat';
 
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('Fake: Initialization', () => {
   let fake: FakeContract<Receiver>;
 
   it('should work with the contract name', async () => {
-    fake = await lopt.fake<Receiver>('Receiver');
+    fake = await smock.fake<Receiver>('Receiver');
     expect(fake.receiveEmpty._watchable).not.to.be.undefined;
   });
 
   it(`should work with the contract's artifact`, async () => {
-    fake = await lopt.fake<Receiver>(receiverArtifact);
+    fake = await smock.fake<Receiver>(receiverArtifact);
     expect(fake.receiveEmpty._watchable).not.to.be.undefined;
   });
 
   it(`should work with the contract's abi`, async () => {
-    fake = await lopt.fake<Receiver>(receiverArtifact.abi);
+    fake = await smock.fake<Receiver>(receiverArtifact.abi);
     expect(fake.receiveEmpty._watchable).not.to.be.undefined;
   });
 
   it(`should work with the contract factory`, async () => {
     const factory = (await ethers.getContractFactory('Receiver')) as Receiver__factory;
-    fake = await lopt.fake<Receiver>(factory);
+    fake = await smock.fake<Receiver>(factory);
     expect(fake.receiveEmpty._watchable).not.to.be.undefined;
   });
 
   it(`should work with the contract interface`, async () => {
     const factory = (await ethers.getContractFactory('Receiver')) as Receiver__factory;
-    fake = await lopt.fake<Receiver>(factory.interface);
+    fake = await smock.fake<Receiver>(factory.interface);
     expect(fake.receiveEmpty._watchable).not.to.be.undefined;
   });
 
   it(`should work with the contract`, async () => {
     const factory = (await ethers.getContractFactory('Receiver')) as Receiver__factory;
-    fake = await lopt.fake<Receiver>(await factory.deploy());
+    fake = await smock.fake<Receiver>(await factory.deploy());
     expect(fake.receiveEmpty._watchable).not.to.be.undefined;
   });
 
   it(`should work with the contract full path`, async () => {
     const factory = (await ethers.getContractFactory('test/contracts/watchable-function-logic/Receiver.sol:Receiver')) as Receiver__factory;
-    fake = await lopt.fake<Receiver>(await factory.deploy());
+    fake = await smock.fake<Receiver>(await factory.deploy());
     expect(fake.receiveEmpty._watchable).not.to.be.undefined;
   });
 
   it(`should work with any object thas has an abi inside`, async () => {
-    fake = await lopt.fake<Receiver>({ abi: receiverArtifact.abi });
+    fake = await smock.fake<Receiver>({ abi: receiverArtifact.abi });
     expect(fake.receiveEmpty._watchable).not.to.be.undefined;
   });
 });
diff --git a/test/unit/mock/call-through.spec.ts b/test/unit/mock/call-through.spec.ts
index 31ea527..a52a965 100644
--- a/test/unit/mock/call-through.spec.ts
+++ b/test/unit/mock/call-through.spec.ts
@@ -1,16 +1,16 @@
-import { lopt, MockContract, MockContractFactory } from '@src';
+import { MockContract, MockContractFactory, smock } from '@src';
 import { Counter } from '@typechained';
 import chai, { expect } from 'chai';
 
 chai.should();
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('Mock: Call through', () => {
   let counterFactory: MockContractFactory<Counter>;
   let mock: MockContract<Counter>;
 
   before(async () => {
-    counterFactory = await lopt.mock<Counter>('Counter');
+    counterFactory = await smock.mock<Counter>('Counter');
   });
 
   beforeEach(async () => {
diff --git a/test/unit/mock/editable-storage-logic.spec.ts b/test/unit/mock/editable-storage-logic.spec.ts
index 2ea511c..86ba8d8 100644
--- a/test/unit/mock/editable-storage-logic.spec.ts
+++ b/test/unit/mock/editable-storage-logic.spec.ts
@@ -1,4 +1,4 @@
-import { lopt, MockContract, MockContractFactory } from '@src';
+import { MockContract, MockContractFactory, smock } from '@src';
 import { convertStructToPojo } from '@src/utils';
 import { ADDRESS_EXAMPLE } from '@test-utils';
 import { StorageGetter } from '@typechained';
@@ -10,7 +10,7 @@ describe('Mock: Editable storage logic', () => {
   let mock: MockContract<StorageGetter>;
 
   before(async () => {
-    storageGetterFactory = await lopt.mock<StorageGetter>('StorageGetter');
+    storageGetterFactory = await smock.mock<StorageGetter>('StorageGetter');
   });
 
   beforeEach(async () => {
diff --git a/test/unit/programmable-function-logic/at-call.spec.ts b/test/unit/programmable-function-logic/at-call.spec.ts
index a081c85..46c01b8 100644
--- a/test/unit/programmable-function-logic/at-call.spec.ts
+++ b/test/unit/programmable-function-logic/at-call.spec.ts
@@ -1,15 +1,15 @@
-import { FakeContract, lopt } from '@src';
+import { FakeContract, smock } from '@src';
 import { Returner } from '@typechained';
 import chai, { expect } from 'chai';
 
 chai.should();
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('ProgrammableFunctionLogic: At call', () => {
   let fake: FakeContract<Returner>;
 
   beforeEach(async () => {
-    fake = await lopt.fake<Returner>('Returner');
+    fake = await smock.fake<Returner>('Returner');
   });
 
   describe('returns', () => {
diff --git a/test/unit/programmable-function-logic/reset.spec.ts b/test/unit/programmable-function-logic/reset.spec.ts
index b35dc1c..a601575 100644
--- a/test/unit/programmable-function-logic/reset.spec.ts
+++ b/test/unit/programmable-function-logic/reset.spec.ts
@@ -1,17 +1,17 @@
-import { FakeContract, lopt } from '@src';
+import { FakeContract, smock } from '@src';
 import { Returner } from '@typechained';
 import chai, { expect } from 'chai';
 import { BigNumber } from 'ethers';
 import { BYTES32_EXAMPLE } from 'test/utils';
 
 chai.should();
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('ProgrammableFunctionLogic: Reset', () => {
   let fake: FakeContract<Returner>;
 
   beforeEach(async () => {
-    fake = await lopt.fake<Returner>('Returner');
+    fake = await smock.fake<Returner>('Returner');
   });
 
   describe('for a boolean', () => {
diff --git a/test/unit/programmable-function-logic/revert.spec.ts b/test/unit/programmable-function-logic/revert.spec.ts
index b078b98..ce7c55e 100644
--- a/test/unit/programmable-function-logic/revert.spec.ts
+++ b/test/unit/programmable-function-logic/revert.spec.ts
@@ -1,16 +1,16 @@
-import { FakeContract, lopt } from '@src';
+import { FakeContract, smock } from '@src';
 import { Returner } from '@typechained';
 import chai, { expect } from 'chai';
 import { ethers } from 'hardhat';
 
 chai.should();
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('ProgrammableFunctionLogic: Revert', () => {
   let fake: FakeContract<Returner>;
 
   beforeEach(async () => {
-    fake = await lopt.fake<Returner>('Returner');
+    fake = await smock.fake<Returner>('Returner');
   });
 
   context('with any normal function', () => {
diff --git a/test/unit/programmable-function-logic/type-handling.spec.ts b/test/unit/programmable-function-logic/type-handling.spec.ts
index 04176e2..1f5e98d 100644
--- a/test/unit/programmable-function-logic/type-handling.spec.ts
+++ b/test/unit/programmable-function-logic/type-handling.spec.ts
@@ -1,4 +1,4 @@
-import { FakeContract, lopt } from '@src';
+import { FakeContract, smock } from '@src';
 import { Returner } from '@typechained';
 import chai, { expect } from 'chai';
 import { BigNumber, utils } from 'ethers';
@@ -7,13 +7,13 @@ import { toPlainObject } from 'lodash';
 import { BYTES32_EXAMPLE, BYTES_EXAMPLE, STRUCT_DYNAMIC_SIZE_EXAMPLE, STRUCT_FIXED_SIZE_EXAMPLE } from 'test/utils';
 
 chai.should();
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('ProgrammableFunctionLogic: Type Handling', () => {
   let fake: FakeContract<Returner>;
 
   beforeEach(async () => {
-    fake = await lopt.fake<Returner>('Returner');
+    fake = await smock.fake<Returner>('Returner');
   });
 
   context('fixed data types', () => {
diff --git a/test/unit/watchable-function-logic/at-call.spec.ts b/test/unit/watchable-function-logic/at-call.spec.ts
index 49f1e3f..3ecbc92 100644
--- a/test/unit/watchable-function-logic/at-call.spec.ts
+++ b/test/unit/watchable-function-logic/at-call.spec.ts
@@ -1,10 +1,10 @@
-import { FakeContract, lopt } from '@src';
+import { FakeContract, smock } from '@src';
 import { Caller, Caller__factory, Receiver } from '@typechained';
 import chai, { expect } from 'chai';
 import { ethers } from 'hardhat';
 
 chai.should();
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('WatchableFunctionLogic: At call', () => {
   let fake: FakeContract<Receiver>;
@@ -16,7 +16,7 @@ describe('WatchableFunctionLogic: At call', () => {
   });
 
   beforeEach(async () => {
-    fake = await lopt.fake<Receiver>('Receiver');
+    fake = await smock.fake<Receiver>('Receiver');
   });
 
   it('should throw when the watchablecontract was never called', async () => {
diff --git a/test/unit/watchable-function-logic/call-arguments.spec.ts b/test/unit/watchable-function-logic/call-arguments.spec.ts
index 0dc7774..c4c651b 100644
--- a/test/unit/watchable-function-logic/call-arguments.spec.ts
+++ b/test/unit/watchable-function-logic/call-arguments.spec.ts
@@ -1,10 +1,10 @@
-import { FakeContract, lopt } from '@src';
+import { FakeContract, smock } from '@src';
 import { Caller, Caller__factory, Receiver } from '@typechained';
 import chai, { AssertionError, expect } from 'chai';
 import { ethers } from 'hardhat';
 
 chai.should();
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('WatchableFunctionLogic: Call arguments', () => {
   let fake: FakeContract<Receiver>;
@@ -16,7 +16,7 @@ describe('WatchableFunctionLogic: Call arguments', () => {
   });
 
   beforeEach(async () => {
-    fake = await lopt.fake<Receiver>('Receiver');
+    fake = await smock.fake<Receiver>('Receiver');
   });
 
   describe('calledWith', async () => {
diff --git a/test/unit/watchable-function-logic/call-count.spec.ts b/test/unit/watchable-function-logic/call-count.spec.ts
index d61a868..bdf0cb5 100644
--- a/test/unit/watchable-function-logic/call-count.spec.ts
+++ b/test/unit/watchable-function-logic/call-count.spec.ts
@@ -1,10 +1,10 @@
-import { FakeContract, lopt } from '@src';
+import { FakeContract, smock } from '@src';
 import { Caller, Caller__factory, Receiver } from '@typechained';
 import chai, { AssertionError, expect } from 'chai';
 import { ethers } from 'hardhat';
 
 chai.should();
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('WatchableFunctionLogic: Call count', () => {
   let fake: FakeContract<Receiver>;
@@ -16,7 +16,7 @@ describe('WatchableFunctionLogic: Call count', () => {
   });
 
   beforeEach(async () => {
-    fake = await lopt.fake<Receiver>('Receiver');
+    fake = await smock.fake<Receiver>('Receiver');
   });
 
   describe('called', () => {
diff --git a/test/unit/watchable-function-logic/call-order.spec.ts b/test/unit/watchable-function-logic/call-order.spec.ts
index df42add..9c92cbd 100644
--- a/test/unit/watchable-function-logic/call-order.spec.ts
+++ b/test/unit/watchable-function-logic/call-order.spec.ts
@@ -1,11 +1,11 @@
-import { FakeContract, lopt } from '@src';
+import { FakeContract, smock } from '@src';
 import { Caller, Caller__factory, Receiver } from '@typechained';
 import chai, { expect } from 'chai';
 import { BaseContract } from 'ethers';
 import { ethers } from 'hardhat';
 
 chai.should();
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('WatchableFunctionLogic: Call arguments', () => {
   let fakeA: FakeContract<Receiver>;
@@ -18,8 +18,8 @@ describe('WatchableFunctionLogic: Call arguments', () => {
   });
 
   beforeEach(async () => {
-    fakeA = await lopt.fake<Receiver>('Receiver');
-    fakeB = await lopt.fake<Receiver>('Receiver');
+    fakeA = await smock.fake<Receiver>('Receiver');
+    fakeB = await smock.fake<Receiver>('Receiver');
   });
 
   describe('calledBefore', async () => {
diff --git a/test/unit/watchable-function-logic/misc.spec.ts b/test/unit/watchable-function-logic/misc.spec.ts
index b295996..601fb18 100644
--- a/test/unit/watchable-function-logic/misc.spec.ts
+++ b/test/unit/watchable-function-logic/misc.spec.ts
@@ -1,10 +1,10 @@
-import { FakeContract, lopt } from '@src';
+import { FakeContract, smock } from '@src';
 import { Caller, Caller__factory, Receiver } from '@typechained';
 import chai, { expect } from 'chai';
 import { ethers } from 'hardhat';
 
 chai.should();
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('WatchableFunctionLogic: Miscellaneous', () => {
   let fake: FakeContract<Receiver>;
@@ -16,11 +16,11 @@ describe('WatchableFunctionLogic: Miscellaneous', () => {
   });
 
   beforeEach(async () => {
-    fake = await lopt.fake<Receiver>('Receiver');
+    fake = await smock.fake<Receiver>('Receiver');
   });
 
   it('should separate calls from different spies with the same factory', async () => {
-    const otherWatchableContract = await lopt.fake<Receiver>('Receiver');
+    const otherWatchableContract = await smock.fake<Receiver>('Receiver');
     await caller.call(fake.address, fake.interface.encodeFunctionData('receiveBoolean', [true]));
     otherWatchableContract.receiveBoolean.should.not.have.been.called;
   });
diff --git a/test/unit/watchable-function-logic/type-handling.spec.ts b/test/unit/watchable-function-logic/type-handling.spec.ts
index 53a54f5..9dd9fda 100644
--- a/test/unit/watchable-function-logic/type-handling.spec.ts
+++ b/test/unit/watchable-function-logic/type-handling.spec.ts
@@ -1,4 +1,4 @@
-import { FakeContract, lopt } from '@src';
+import { FakeContract, smock } from '@src';
 import { BYTES32_EXAMPLE, BYTES_EXAMPLE, STRUCT_DYNAMIC_SIZE_EXAMPLE, STRUCT_FIXED_SIZE_EXAMPLE } from '@test-utils';
 import { Caller, Caller__factory, Receiver } from '@typechained';
 import chai from 'chai';
@@ -6,7 +6,7 @@ import { BigNumber } from 'ethers';
 import { ethers } from 'hardhat';
 
 chai.should();
-chai.use(lopt.matchers);
+chai.use(smock.matchers);
 
 describe('WatchableFunctionLogic: Type handling', () => {
   let fake: FakeContract<Receiver>;
@@ -18,7 +18,7 @@ describe('WatchableFunctionLogic: Type handling', () => {
   });
 
   beforeEach(async () => {
-    fake = await lopt.fake<Receiver>('Receiver');
+    fake = await smock.fake<Receiver>('Receiver');
   });
 
   it('should handle no arguments', async () => {