Fork this repository and replace the sample code with your own to easily build a plugin for dai.js.
src/SampleService.jsis an example of how to structure your plugin's servicessrc/index.jsis an example of how to package your services and contracts into a plugin (so you can inject it into a Maker instance)test/src/SampleService.spec.jsis an example of how to create a Maker instance with your plugin injected, and how to access services from your new plugin
Get started developing with:
-
yarnto install dependencies -
yarn testchainwill launch a ganache testchain with all relevant Maker contracts deployed -
Add tests with the suffix
*.spec.jsin thetestdirectory and run them withyarn test -
Build the code for production with
yarn build