Clone the sample repo to create a plugin project that uses the TokenBridge plugin. This sample repo containes a ready to publish plugin for a ERC677 to ERC677 bridge extension, but you can later modify it to define your own resources.
-`wallet` - is a burner wallet instance ready to test your plugin
-`my-plugin` - is the folder where the plugin code is located. To change the name of the plugin it is necessary to update the folder name `my-plugin` and all mentions to `my-plugin` to the new name of your plugin.
Inside `my-plugin` you can find the files that defines the resources to be exposed by the plugin to be used by the burner wallet in order to interact with the ERC677 to ERC677 bridge extension:
-`sUSD` - extends from `ERC677Asset` defined in `tokenbridge-plugin`
-`xsUSD` - extends from `ERC677Asset` defined in `tokenbridge-plugin`
-`SUSDBridge` - extends from `Mediator` defined in `tokenbridge-plugin`
The project includes a burner wallet instance where you can test the implementation of the plugin. For that, you have to make sure that the build step was performed and that the plugin resources you modified are correctly imported and used in the `src/index.tsx` file of the `wallet` folder.
1. Create `.env` file in `wallet` folder and set:
```
REACT_APP_INFURA_KEY=<yourkeyfrominfura.com>
```
2. To start the burner wallet instances run:
```
yarn start-wallet
```
### Publish to npm
In order to make the plugin accessible it needs to be published in the npm registry. For that, you can follow these steps:
1. Create account in https://www.npmjs.com/
2. Go to `my-plugin` folder
3. Run `yarn build`. Make sure it generates the `dist` folder