0.0.3 • Published 2 years ago

@wagmifan/spec v0.0.3

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
2 years ago

@wagmifan/solib Spec

Portable specifications for @wagmifan/solib contracts. Part of the @wagmifan/solib Solidity monorepo.

Installation

Install the package as a development dependency:

npm install --save-dev @wagmifan/spec
# or
yarn add --dev @wagmifan/spec

Usage

For example, consider a custom ERC20 implementation:

import '@wagmifan/solib/contracts/token/ERC20/ERC20.sol';

contract CustomToken is ERC20 {
  // custom code...
}

ERC20 behavior tests :

describeSpecOfERC20(
  {
    deploy: () => instance,
  },
  ["#balanceOf"]
);

describe("#balanceOf", function () {
  // custom tests
});