Skip to content

Commit

Permalink
Merge pull request #122 from HausDAO/fix/typings
Browse files Browse the repository at this point in the history
fix typings & update docs
  • Loading branch information
santteegt authored Jan 3, 2024
2 parents eefeaa3 + 6adf80f commit c60c6de
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,13 @@ You can `yarn add @daohaus/baal-contracts` on your own project and get access to
2. On your test scripts, you can call `await deployments.fixture([tag1, tag2, ...])` (e.g. under `beforeEach()`) and specify the deployment tags you need. For example, `await deployments.fixture(['Infra', 'BaalSummoner'])` will deploy both Safe & Baal contracts.


3. You can also use the [`setupBaal`](test/utils/fixtures.ts) fixture to setup your tests with factory contracts, baal settings, members, loot/shares/token distributions, etc. Moreover, you can also customize it to cover new use cases such as custom summoner contracts, shamans and other setup needs by implementing the`setupBaalOverride` and/or `setupUsersOverride` fixture function parameters. You can take a look at the default implementation ([setupBaal](test/utils/baal.ts) and [setupUsersDefault](test/utils/fixtures.ts)) for inspiration. Below, there's the list of parameters can be customized when calling the hardhat fixture:
3. You can also use the [`baalSetup`](test/utils/fixtures.ts) fixture to setup your tests with factory contracts, baal settings, members, loot/shares/token distributions, etc. Moreover, you can also customize it to cover new use cases such as custom summoner contracts, shamans and other setup needs by implementing the`setupBaalOverride` and/or `setupUsersOverride` fixture function parameters. You can take a look at a few example implementations of ([baalSetup](test/utils/baal.ts) and [setupUsersDefault](test/utils/fixtures.ts)) for inspiration. You can find and import all the available scripts/fixtures available for hardhat testing as follows:

```js
import { baalSetup, ... } from "@daohaus/baal-contracts/hardhat";
```

Below, there's the list of parameters can be customized when calling the hardhat fixture:

```js
type BaalSetupOpts = {
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"name": "@daohaus/baal-contracts",
"version": "1.2.16",
"version": "1.2.17",
"description": "Lo, also it is the time of His rain.",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"exports": {
".": "./dist/src/index.js",
"./hardhat": "./dist/src/hardhat/index.js"
},
"typesVersions": {
"*": {
"hardhat": ["./dist/src/hardhat/index.d.ts"]
}
},
"lockfileVersion": 2,
"files": [
"/contracts/**/*.sol",
Expand Down

0 comments on commit c60c6de

Please sign in to comment.