diff --git a/README.md b/README.md index 584530a5b..3f0e42b39 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,21 @@ OR `yarn test:clean` if contracts have been typings need to be updated We publish our contracts as well as [hardhat][22] and [typechain][23] compilation artifacts to npm. +``` +npm install @setprotocol/set-protocol-v2 +``` + The distribution also comes with fixtures for mocking and testing SetProtocol's interactions with other protocols including Uniswap, Balancer, Compound (and many more.) To use these you'll need to install the peer dependencies listed in `package.json`. -``` -npm install @setprotocol/set-protocol-v2 +#### Example Usage + +```ts +import { PerpV2Fixture } from "@setprotocol/set-protocol-v2/dist/utils/fixtures/PerpV2Fixture"; +import { getPerpV2Fixture } from "@setprotocol/set-protocol-v2/dist/utils/test"; + +let perpSetup: PerpV2Fixture; +perpSetup = getPerpV2Fixture(...); ``` [22]: https://www.npmjs.com/package/hardhat diff --git a/package.json b/package.json index e34119b2f..cee5c09a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@setprotocol/set-protocol-v2", - "version": "0.1.5", + "version": "0.1.6", "description": "", "main": "dist", "types": "dist/types", @@ -17,7 +17,7 @@ "scripts": { "build": "yarn clean && yarn compile && yarn build:typechain", "build:npm": "yarn clean && yarn compile:npm && yarn build:typechain", - "build:typechain": "yarn typechain && yarn transpile-dist", + "build:typechain": "yarn typechain && yarn transpile-dist && cp -rf typechain dist", "chain": "npx hardhat node", "clean": "rm -rf coverage.json .coverage_cache .coverage_contracts cache coverage typechain artifacts dist", "compile": "npx hardhat compile", diff --git a/tsconfig.json b/tsconfig.json index c7af42d89..6f8dd71a9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,8 @@ "outDir": "dist", "resolveJsonModule": true, "declaration": true, - "declarationDir": "./dist/types", + "declarationMap": true, + "sourceMap": true, "baseUrl": ".", "moduleResolution": "node", "paths": {