Skip to content

Commit 5e086be

Browse files
authored
Merge pull request #95 from SetProtocol/add_new_API_to_index/will
Add the SlippageIssuanceAPI to the Set.JS Index
2 parents 72749f5 + 2e8e2cd commit 5e086be

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "set.js",
3-
"version": "0.4.3",
3+
"version": "0.4.4",
44
"description": "A javascript library for interacting with the Set Protocol v2",
55
"keywords": [
66
"set.js",

src/Set.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
PriceOracleAPI,
3131
DebtIssuanceAPI,
3232
DebtIssuanceV2API,
33+
SlippageIssuanceAPI,
3334
} from './api/index';
3435

3536
const ethersProviders = require('ethers').providers;
@@ -104,6 +105,13 @@ class Set {
104105
*/
105106
public debtIssuanceV2: DebtIssuanceV2API;
106107

108+
/**
109+
* An instance of the SlippageIssuanceAPI class. Contains interfaces for interacting
110+
* with the SlippageIssuanceAPI contract to to trade into/from tokens during the issuance and
111+
* redemption step. Initially used for Perpetual Leverage Tokens.
112+
*/
113+
public slippageIssuance: SlippageIssuanceAPI;
114+
107115
/**
108116
* An instance of the BlockchainAPI class. Contains interfaces for
109117
* interacting with the blockchain
@@ -136,6 +144,7 @@ class Set {
136144
this.priceOracle = new PriceOracleAPI(ethersProvider, config.masterOracleAddress);
137145
this.debtIssuance = new DebtIssuanceAPI(ethersProvider, config.debtIssuanceModuleAddress);
138146
this.debtIssuanceV2 = new DebtIssuanceV2API(ethersProvider, config.debtIssuanceModuleV2Address);
147+
this.slippageIssuance = new SlippageIssuanceAPI(ethersProvider, config.slippageIssuanceModuleAddress);
139148
this.blockchain = new BlockchainAPI(ethersProvider, assertions);
140149
}
141150
}

src/api/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import NavIssuanceAPI from './NavIssuanceAPI';
99
import PriceOracleAPI from './PriceOracleAPI';
1010
import DebtIssuanceAPI from './DebtIssuanceAPI';
1111
import DebtIssuanceV2API from './DebtIssuanceV2API';
12+
import SlippageIssuanceAPI from './SlippageIssuanceAPI';
1213
import {
1314
TradeQuoter,
1415
CoinGeckoDataService,
@@ -27,6 +28,7 @@ export {
2728
PriceOracleAPI,
2829
DebtIssuanceAPI,
2930
DebtIssuanceV2API,
31+
SlippageIssuanceAPI,
3032
TradeQuoter,
3133
CoinGeckoDataService,
3234
GasOracleService

src/types/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export interface SetJSConfig {
2020
debtIssuanceModuleAddress: Address;
2121
zeroExApiKey?: string;
2222
debtIssuanceModuleV2Address: Address;
23+
slippageIssuanceModuleAddress: Address;
2324
}
2425

2526
export type SetDetails = {

0 commit comments

Comments
 (0)