Skip to content

Commit

Permalink
Add config options for BasisTradingModule/Viewer (#108)
Browse files Browse the repository at this point in the history
* Add config options for BasisTradingModule/Viewer

* Bump package.json
  • Loading branch information
williamsfu99 authored Mar 22, 2022
1 parent 592c474 commit fd40d90
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "set.js",
"version": "0.5.0",
"version": "0.5.1",
"description": "A javascript library for interacting with the Set Protocol v2",
"keywords": [
"set.js",
Expand Down
15 changes: 15 additions & 0 deletions src/Set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ class Set {
*/
public perpV2LeverageViewer: PerpV2LeverageViewerAPI;

/**
* Another instance of the PerpV2LeverageAPI class, but for more specialized BasisTradingModule
* Sets.
*/
public perpV2BasisTrading: PerpV2LeverageAPI;

/**
* Another instance of the PerpV2LeverageViewerAPI class, but for more specialized BasisTradingModule
* Sets.
*/
public perpV2BasisTradingViewer: PerpV2LeverageViewerAPI;

/**
* An instance of the BlockchainAPI class. Contains interfaces for
* interacting with the blockchain
Expand Down Expand Up @@ -170,6 +182,9 @@ class Set {
this.slippageIssuance = new SlippageIssuanceAPI(ethersProvider, config.slippageIssuanceModuleAddress);
this.perpV2Leverage = new PerpV2LeverageAPI(ethersProvider, config.perpV2LeverageModuleAddress);
this.perpV2LeverageViewer = new PerpV2LeverageViewerAPI(ethersProvider, config.perpV2LeverageModuleViewerAddress);
this.perpV2BasisTrading = new PerpV2LeverageAPI(ethersProvider, config.perpV2BasisTradingModuleAddress);
this.perpV2BasisTradingViewer = new PerpV2LeverageViewerAPI(ethersProvider,
config.perpV2BasisTradingModuleViewerAddress);
this.blockchain = new BlockchainAPI(ethersProvider, assertions);
this.utils = new UtilsAPI(ethersProvider, config.zeroExApiKey, config.zeroExApiUrls);
}
Expand Down
2 changes: 2 additions & 0 deletions src/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export interface SetJSConfig {
slippageIssuanceModuleAddress: Address;
perpV2LeverageModuleAddress: Address;
perpV2LeverageModuleViewerAddress: Address;
perpV2BasisTradingModuleAddress: Address;
perpV2BasisTradingModuleViewerAddress: Address;
}

export type SetDetails = {
Expand Down

0 comments on commit fd40d90

Please sign in to comment.