Here we walk you through an example of how do we start a vault with short otoken strategy:
git clone https://github.com/opynfinance/perp-vault-templatescd perp-vault-templates
npm install# test compilenpx hardhat compile
.env file from
.evn.example, which should look like:
Also create a
.secret file in the root directory containing the mnemonic that you want to use to deploy the contracts and be the owner of the vault in this tutorial. We encourage you to use the same mnemonic you have in your metamask wallet just for easier operation.
MyAction.sol file in in any folder you want under
contracts. In this example, let's copy everything from
example-actions/ShortOToken.sol to get started.
ShortOToken.sol we would need to remove something functions that's not supported on Kovan. In this case, we remove everything related to the Gnosis Easy Auction. We will remove the following functions:
Also you can remove the
AuctionUtils dependency. which will also ask you to remove the
_easyAuction parameter in the constructor, and the
_initAuction called in the constructor.
Also, just to make it easier to test, let's set the
RollOverBase.sol to 0.
Lastly, make sure you rename the contract from
npx hardhat run scripts/deploy-example-kovan.ts --network kovan
This command should automatically deploy a new Vault, an Action, a ETHProxy on Kovan and get them verified on Etherscan!
To learn more about how to run a vault as a manager, go to the Managing a Vault chapter for more detail on this example.