Update the settings in the script with the voter address of your core system.
Settings box in deployPluginsTest.js
2. Deploy Plugin Factory
Uncomment the "Deploy Plugin Factory" section in main() of deployPluginsTest.js:
main() in deployPluginsTest.js
Save the deployPluginsTest.js file.
Run the command in the terminal:
Record the addresses from the console:
Console output
Update the getContracts() function with those addresses and uncomment them:
getContracts() in deployPluginsTest.js
3. Verify Plugin Factory
Comment out the "Deploy Plugin Factory" section and uncomment the "Verify Plugin Factory" section in main() of deployPluginsTest.js:
main() in deployPluginsTest.js
Save the deployPluginsTest.js file.
Run the command in the terminal:
4. Deploy a Plugin
Once you've deployed a plugin once you can start deploying them through a block explorer (eg. etherscan, polygonscan) instead. This step is just used to easily verify the plugins for the first time.
Comment out the "Verify Plugin Factory" section and uncomment the desired plugin deployer function in "3. Deploy Plugin" in main() of deployPluginsTest.js. For example, to do deploy on LP plugin uncomment deployLPPlugin():
main() in deployPluginsTest.js
You can only deploy one type of plugin at a time. Select the parameters for the plugin:
LP Plugin
LP Plugin Parameters
LP Farm Plugin
LP Farm Plugin Parameters
Single Stake Plugin
Single Stake Plugin Parameters
Save the deployPluginsTest.js file.
Run the command in the terminal:
Record the addresses from the console:
Console output
Update the getContracts() function with those addresses and uncomment them:
getContracts() in deployPluginsTest.js
5. Verify the Plugin
Comment out the "Deploy Plugin" section and uncomment the "Verify Plugin" section in main() of deployPluginsTest.js:
main() in deployPluginsTest.js
Save the deployPluginsTest.js file.
Run the command in the terminal:
6. Add the plugin to the voter
The plugin has been deployed but it is not yet part of the voting system. The final step is to add the plugin to the voter. This can be done through a block explorer (eg. etherscan, polygonscan) if the team wallet is an EOA. It can also be done through gnosis safe contract interactions if the team wallet is a multisig. And finally VTOKEN holders can add it through a proposal in tally.
Adding a plugin through PolygonScan on Voter contract.
A: Symbol of the LP token // LP-TEST0/TEST1
B: Symbol of token0 in the LP // TEST0
C: Symbol of token1 in the LP // TEST1
A: Symbol of the LP token // LP-TEST0/TEST1
B: Symbol of token0 in the LP // TEST0
C: Symbol of token1 in the LP // TEST1
D: Symbol of farm reward token // RWRD0
A: Symbol of token // TEST0
B: Symbol of reward // TEST1
* B should never be the same as A