@superfluid-finance/sdk-core 0.5.1 → 0.5.3-dev.49897f6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -5
- package/dist/index.umd.js +65 -48
- package/dist/main/BatchCall.d.ts +5 -3
- package/dist/main/BatchCall.d.ts.map +1 -1
- package/dist/main/BatchCall.js +17 -9
- package/dist/main/BatchCall.js.map +1 -1
- package/dist/main/ConstantFlowAgreementV1.d.ts +1 -1
- package/dist/main/ConstantFlowAgreementV1.js +10 -10
- package/dist/main/ConstantFlowAgreementV1.js.map +1 -1
- package/dist/main/Governance.js +2 -2
- package/dist/main/Host.d.ts +11 -1
- package/dist/main/Host.d.ts.map +1 -1
- package/dist/main/Host.js +12 -1
- package/dist/main/Host.js.map +1 -1
- package/dist/main/InstantDistributionAgreementV1.d.ts +3 -3
- package/dist/main/InstantDistributionAgreementV1.js +11 -11
- package/dist/main/InstantDistributionAgreementV1.js.map +1 -1
- package/dist/main/Operation.d.ts +3 -3
- package/dist/main/Operation.js +3 -3
- package/dist/main/SFError.js +1 -1
- package/dist/main/SFError.js.map +1 -1
- package/dist/main/constants.js +1 -1
- package/dist/main/constants.js.map +1 -1
- package/dist/main/defaultSubgraphReleaseTag.json +1 -1
- package/dist/main/interfaces.d.ts +1 -0
- package/dist/main/interfaces.d.ts.map +1 -1
- package/dist/main/subgraph/entities/token/tokens.generated.d.ts +1 -0
- package/dist/main/subgraph/entities/token/tokens.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/token/tokens.generated.js +1 -1
- package/dist/main/subgraph/entities/token/tokens.generated.js.map +1 -1
- package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.d.ts +1 -0
- package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.d.ts.map +1 -1
- package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.js +1 -1
- package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.js.map +1 -1
- package/dist/main/subgraph/queries/getIndexSubscriptions.generated.d.ts +1 -0
- package/dist/main/subgraph/queries/getIndexSubscriptions.generated.d.ts.map +1 -1
- package/dist/main/subgraph/queries/getIndexSubscriptions.generated.js +1 -1
- package/dist/main/subgraph/queries/getIndexSubscriptions.generated.js.map +1 -1
- package/dist/main/subgraph/queries/getIndexes.generated.d.ts +1 -0
- package/dist/main/subgraph/queries/getIndexes.generated.d.ts.map +1 -1
- package/dist/main/subgraph/queries/getIndexes.generated.js +1 -1
- package/dist/main/subgraph/queries/getIndexes.generated.js.map +1 -1
- package/dist/main/subgraph/queries/getStreams.generated.d.ts +1 -0
- package/dist/main/subgraph/queries/getStreams.generated.d.ts.map +1 -1
- package/dist/main/subgraph/queries/getStreams.generated.js +1 -1
- package/dist/main/subgraph/queries/getStreams.generated.js.map +1 -1
- package/dist/main/subgraph/queries/getTokens.generated.d.ts +1 -0
- package/dist/main/subgraph/queries/getTokens.generated.d.ts.map +1 -1
- package/dist/main/subgraph/queries/getTokens.generated.js +1 -1
- package/dist/main/subgraph/queries/getTokens.generated.js.map +1 -1
- package/dist/main/subgraph/schema.generated.d.ts +5 -1
- package/dist/main/subgraph/schema.generated.d.ts.map +1 -1
- package/dist/module/BatchCall.d.ts +5 -3
- package/dist/module/BatchCall.d.ts.map +1 -1
- package/dist/module/BatchCall.js +17 -9
- package/dist/module/BatchCall.js.map +1 -1
- package/dist/module/ConstantFlowAgreementV1.d.ts +1 -1
- package/dist/module/ConstantFlowAgreementV1.js +10 -10
- package/dist/module/ConstantFlowAgreementV1.js.map +1 -1
- package/dist/module/Governance.js +2 -2
- package/dist/module/Host.d.ts +11 -1
- package/dist/module/Host.d.ts.map +1 -1
- package/dist/module/Host.js +12 -1
- package/dist/module/Host.js.map +1 -1
- package/dist/module/InstantDistributionAgreementV1.d.ts +3 -3
- package/dist/module/InstantDistributionAgreementV1.js +11 -11
- package/dist/module/InstantDistributionAgreementV1.js.map +1 -1
- package/dist/module/Operation.d.ts +3 -3
- package/dist/module/Operation.js +3 -3
- package/dist/module/SFError.js +1 -1
- package/dist/module/SFError.js.map +1 -1
- package/dist/module/constants.js +1 -1
- package/dist/module/constants.js.map +1 -1
- package/dist/module/defaultSubgraphReleaseTag.json +1 -1
- package/dist/module/interfaces.d.ts +1 -0
- package/dist/module/interfaces.d.ts.map +1 -1
- package/dist/module/subgraph/entities/token/tokens.generated.d.ts +1 -0
- package/dist/module/subgraph/entities/token/tokens.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/token/tokens.generated.js +1 -1
- package/dist/module/subgraph/entities/token/tokens.generated.js.map +1 -1
- package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.d.ts +1 -0
- package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.d.ts.map +1 -1
- package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.js +1 -1
- package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.js.map +1 -1
- package/dist/module/subgraph/queries/getIndexSubscriptions.generated.d.ts +1 -0
- package/dist/module/subgraph/queries/getIndexSubscriptions.generated.d.ts.map +1 -1
- package/dist/module/subgraph/queries/getIndexSubscriptions.generated.js +1 -1
- package/dist/module/subgraph/queries/getIndexSubscriptions.generated.js.map +1 -1
- package/dist/module/subgraph/queries/getIndexes.generated.d.ts +1 -0
- package/dist/module/subgraph/queries/getIndexes.generated.d.ts.map +1 -1
- package/dist/module/subgraph/queries/getIndexes.generated.js +1 -1
- package/dist/module/subgraph/queries/getIndexes.generated.js.map +1 -1
- package/dist/module/subgraph/queries/getStreams.generated.d.ts +1 -0
- package/dist/module/subgraph/queries/getStreams.generated.d.ts.map +1 -1
- package/dist/module/subgraph/queries/getStreams.generated.js +1 -1
- package/dist/module/subgraph/queries/getStreams.generated.js.map +1 -1
- package/dist/module/subgraph/queries/getTokens.generated.d.ts +1 -0
- package/dist/module/subgraph/queries/getTokens.generated.d.ts.map +1 -1
- package/dist/module/subgraph/queries/getTokens.generated.js +1 -1
- package/dist/module/subgraph/queries/getTokens.generated.js.map +1 -1
- package/dist/module/subgraph/schema.generated.d.ts +5 -1
- package/dist/module/subgraph/schema.generated.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BatchCall.d.ts","sourceRoot":"","sources":["../../src/BatchCall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,SAA4B,MAAM,aAAa,CAAC;AAKvD,UAAU,iBAAiB;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACxC;AAED,UAAU,eAAe;IACrB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB;AAWD;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAS;IAC1B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,IAAI,CAAC;gBAEC,OAAO,EAAE,iBAAiB;IAKtC
|
|
1
|
+
{"version":3,"file":"BatchCall.d.ts","sourceRoot":"","sources":["../../src/BatchCall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,SAA4B,MAAM,aAAa,CAAC;AAKvD,UAAU,iBAAiB;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;CACxC;AAED,UAAU,eAAe;IACrB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB;AAWD;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAS;IAC1B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,IAAI,CAAC;gBAEC,OAAO,EAAE,iBAAiB;IAKtC;;;;;OAKG;IACH,uBAAuB,QAEb,MAAM,GACN,SAAS,CAAC,MAAM,GAAG,OAAO,KAAK,CAAC,QAAQ,GAAG,YAAY,CAAC,EAAE,YACtD,MAAM,KACjB,OAAO,KAAK,CAAC,MAAM,CAAkD;IAExE;;;;;OAKG;IACH,kBAAkB,cACH,SAAS,SACb,MAAM,KACd,QAAQ,eAAe,CAAC,CA0DzB;IAEF;;;OAGG;IACH,IAAI,+BAA+B,IAAI,OAAO,CAAC,eAAe,CAAC,EAAE,CAIhE;IAED;;;;OAIG;IACH,IAAI,WACQ,OAAO,MAAM,KACtB,QAAQ,OAAO,mBAAmB,CAAC,CAepC;IAKF;;;;OAIG;IACH,WAAW,WACC,OAAO,MAAM,KACtB,QAAQ,OAAO,mBAAmB,CAAC,CAepC;CACL"}
|
package/dist/main/BatchCall.js
CHANGED
|
@@ -23,11 +23,12 @@ const operationTypeStringToTypeMap = new Map([
|
|
|
23
23
|
class BatchCall {
|
|
24
24
|
constructor(options) {
|
|
25
25
|
/**
|
|
26
|
-
* Gets
|
|
27
|
-
* @param
|
|
26
|
+
* Gets function arguments given an ABI and callData.
|
|
27
|
+
* @param abi the abi fragments of a contract/function
|
|
28
|
+
* @param callData call data of the function
|
|
28
29
|
* @returns {ethers.utils.Result} call agreement function arguments
|
|
29
30
|
*/
|
|
30
|
-
this.
|
|
31
|
+
this.getCallDataFunctionArgs = (abi, callData) => (0, utils_1.getTransactionDescription)(abi, callData).args;
|
|
31
32
|
/**
|
|
32
33
|
* Given an `Operation` object, gets the `OperationStruct` object.
|
|
33
34
|
* @param operation an `Operation` object
|
|
@@ -50,12 +51,10 @@ class BatchCall {
|
|
|
50
51
|
message: "The transaction is missing the to or data property.",
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
-
//
|
|
55
|
-
// same as the to property of the transaction.
|
|
54
|
+
const encoder = ethers_1.ethers.utils.defaultAbiCoder;
|
|
55
|
+
// Handles Superfluid.callAgreement
|
|
56
56
|
if (operation.type === "SUPERFLUID_CALL_AGREEMENT") {
|
|
57
|
-
const
|
|
58
|
-
const functionArgs = this.getCallAgreementFunctionArgs(populatedTransaction.data);
|
|
57
|
+
const functionArgs = this.getCallDataFunctionArgs(Superfluid_json_1.default.abi, populatedTransaction.data);
|
|
59
58
|
const data = encoder.encode(["bytes", "bytes"], [functionArgs["callData"], functionArgs["userData"]]);
|
|
60
59
|
return {
|
|
61
60
|
operationType,
|
|
@@ -63,7 +62,16 @@ class BatchCall {
|
|
|
63
62
|
data,
|
|
64
63
|
};
|
|
65
64
|
}
|
|
66
|
-
// Handles
|
|
65
|
+
// Handles Superfluid.callAppAction
|
|
66
|
+
if (operation.type === "CALL_APP_ACTION") {
|
|
67
|
+
const functionArgs = this.getCallDataFunctionArgs(Superfluid_json_1.default.abi, populatedTransaction.data);
|
|
68
|
+
return {
|
|
69
|
+
operationType,
|
|
70
|
+
target: functionArgs["app"],
|
|
71
|
+
data: functionArgs["callData"],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
// Handles remaining ERC20/SuperToken Operations
|
|
67
75
|
return {
|
|
68
76
|
operationType,
|
|
69
77
|
target: populatedTransaction.to,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BatchCall.js","sourceRoot":"","sources":["../../src/BatchCall.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"BatchCall.js","sourceRoot":"","sources":["../../src/BatchCall.ts"],"names":[],"mappings":";;;;;AACA,mCAAgC;AAEhC,kDAA0B;AAE1B,uCAAoC;AACpC,4EAAkD;AAClD,mCAA+E;AAa/E,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAAwB;IAChE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CAAC,CAAC;QAEF,0BAA0B;QAC1B,oEAAoE;QACpE,6CAA6C;QAC7C;;;;WAIG;QACH,gBAAW,GAAG,KAAK,EACf,MAAqB,EACc,EAAE;YACrC,IAAI;gBACA,MAAM,oBAAoB,GAAG,MAAM,OAAO,CAAC,GAAG,CAC1C,IAAI,CAAC,+BAA+B,CACvC,CAAC;gBACF,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ;qBAC1B,OAAO,CAAC,MAAM,CAAC;qBACf,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;aAC/C;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,iBAAO,CAAC;oBACd,IAAI,EAAE,kBAAkB;oBACxB,OAAO,EAAE,+CAA+C;oBACxD,KAAK,EAAE,GAAG;iBACb,CAAC,CAAC;aACN;QACL,CAAC,CAAC;QAjJE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,cAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAoFD;;;OAGG;IACH,IAAI,+BAA+B;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CACxC,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAChC,CAAC;IACN,CAAC;CAoDJ;AAvJD,4BAuJC"}
|
|
@@ -151,7 +151,7 @@ export default class ConstantFlowAgreementV1 {
|
|
|
151
151
|
* @param timestamp last updated timestamp of flow
|
|
152
152
|
* @param flowRate the current flow rate
|
|
153
153
|
* @param deposit the deposit amount
|
|
154
|
-
* @param owedDeposit any owed
|
|
154
|
+
* @param owedDeposit any owed deposit
|
|
155
155
|
* @returns {IWeb3FlowInfo} sanitized web3 flow info
|
|
156
156
|
*/
|
|
157
157
|
_sanitizeFlowInfo: (params: IWeb3FlowInfoParams) => IWeb3FlowInfo;
|
|
@@ -160,7 +160,7 @@ class ConstantFlowAgreementV1 {
|
|
|
160
160
|
params.flowRate,
|
|
161
161
|
"0x",
|
|
162
162
|
]);
|
|
163
|
-
return this.host.
|
|
163
|
+
return this.host.callAgreement(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
|
|
164
164
|
};
|
|
165
165
|
/**
|
|
166
166
|
* Update a flow.
|
|
@@ -180,7 +180,7 @@ class ConstantFlowAgreementV1 {
|
|
|
180
180
|
params.flowRate,
|
|
181
181
|
"0x",
|
|
182
182
|
]);
|
|
183
|
-
return this.host.
|
|
183
|
+
return this.host.callAgreement(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
|
|
184
184
|
};
|
|
185
185
|
/**
|
|
186
186
|
* Delete a flow.
|
|
@@ -201,7 +201,7 @@ class ConstantFlowAgreementV1 {
|
|
|
201
201
|
normalizedReceiver,
|
|
202
202
|
"0x",
|
|
203
203
|
]);
|
|
204
|
-
return this.host.
|
|
204
|
+
return this.host.callAgreement(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
|
|
205
205
|
};
|
|
206
206
|
/**
|
|
207
207
|
* Create a flow as an operator
|
|
@@ -224,7 +224,7 @@ class ConstantFlowAgreementV1 {
|
|
|
224
224
|
params.flowRate,
|
|
225
225
|
"0x",
|
|
226
226
|
]);
|
|
227
|
-
return this.host.
|
|
227
|
+
return this.host.callAgreement(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
|
|
228
228
|
};
|
|
229
229
|
/**
|
|
230
230
|
* Update a flow as an operator.
|
|
@@ -247,7 +247,7 @@ class ConstantFlowAgreementV1 {
|
|
|
247
247
|
params.flowRate,
|
|
248
248
|
"0x",
|
|
249
249
|
]);
|
|
250
|
-
return this.host.
|
|
250
|
+
return this.host.callAgreement(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
|
|
251
251
|
};
|
|
252
252
|
/**
|
|
253
253
|
* Delete a flow as an operator.
|
|
@@ -263,7 +263,7 @@ class ConstantFlowAgreementV1 {
|
|
|
263
263
|
const normalizedSender = (0, utils_1.normalizeAddress)(params.sender);
|
|
264
264
|
const normalizedReceiver = (0, utils_1.normalizeAddress)(params.receiver);
|
|
265
265
|
const callData = cfaInterface.encodeFunctionData("deleteFlowByOperator", [normalizedToken, normalizedSender, normalizedReceiver, "0x"]);
|
|
266
|
-
return this.host.
|
|
266
|
+
return this.host.callAgreement(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
|
|
267
267
|
};
|
|
268
268
|
/** ### Private Functions ### */
|
|
269
269
|
/**
|
|
@@ -271,7 +271,7 @@ class ConstantFlowAgreementV1 {
|
|
|
271
271
|
* @param timestamp last updated timestamp of flow
|
|
272
272
|
* @param flowRate the current flow rate
|
|
273
273
|
* @param deposit the deposit amount
|
|
274
|
-
* @param owedDeposit any owed
|
|
274
|
+
* @param owedDeposit any owed deposit
|
|
275
275
|
* @returns {IWeb3FlowInfo} sanitized web3 flow info
|
|
276
276
|
*/
|
|
277
277
|
this._sanitizeFlowInfo = (params) => {
|
|
@@ -333,7 +333,7 @@ class ConstantFlowAgreementV1 {
|
|
|
333
333
|
params.flowRateAllowance,
|
|
334
334
|
"0x",
|
|
335
335
|
]);
|
|
336
|
-
return this.host.
|
|
336
|
+
return this.host.callAgreement(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
|
|
337
337
|
}
|
|
338
338
|
/**
|
|
339
339
|
* Give flow operator full control - max flow rate and create/update/delete permissions.
|
|
@@ -346,7 +346,7 @@ class ConstantFlowAgreementV1 {
|
|
|
346
346
|
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
347
347
|
const normalizedFlowOperator = (0, utils_1.normalizeAddress)(params.flowOperator);
|
|
348
348
|
const callData = cfaInterface.encodeFunctionData("authorizeFlowOperatorWithFullControl", [normalizedToken, normalizedFlowOperator, "0x"]);
|
|
349
|
-
return this.host.
|
|
349
|
+
return this.host.callAgreement(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
352
352
|
* Revoke flow operator control - set flow rate to 0 with no permissions.
|
|
@@ -359,7 +359,7 @@ class ConstantFlowAgreementV1 {
|
|
|
359
359
|
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
360
360
|
const normalizedFlowOperator = (0, utils_1.normalizeAddress)(params.flowOperator);
|
|
361
361
|
const callData = cfaInterface.encodeFunctionData("revokeFlowOperatorWithFullControl", [normalizedToken, normalizedFlowOperator, "0x"]);
|
|
362
|
-
return this.host.
|
|
362
|
+
return this.host.callAgreement(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
exports.default = ConstantFlowAgreementV1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConstantFlowAgreementV1.js","sourceRoot":"","sources":["../../src/ConstantFlowAgreementV1.ts"],"names":[],"mappings":";;;;;AAAA,mCAAgC;AAEhC,kDAA0B;AAE1B,uCAAoC;AACpC,wGAA8E;AAmB9E,mCAIiB;AAEjB,MAAM,YAAY,GAAG,IAAI,eAAM,CAAC,KAAK,CAAC,SAAS,CAC3C,uCAA2B,CAAC,GAAG,CAClC,CAAC;AAEF;;;GAGG;AACH,MAAqB,uBAAuB;IAKxC,YAAY,OAA4B;QASxC,iCAAiC;QAEjC;;;;;;;WAOG;QACH,YAAO,GAAG,KAAK,EAAE,MAAsB,EAA0B,EAAE;YAC/D,MAAM,eAAe,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC5D,MAAM,gBAAgB,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACzD,MAAM,kBAAkB,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC7D,IAAI;gBACA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ;qBAC/B,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC;qBAChC,OAAO,CAAC,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B,MAAM,eAAe,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5D,MAAM,sBAAsB,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAErE,MAAM,QAAQ,GAAG,YAAY,CAAC,kBAAkB,CAC5C,sCAAsC,EACtC,CAAC,eAAe,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAClD,CAAC;QAEF,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAC1B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAChC,QAAQ,EACR,MAAM,CAAC,QAAQ,EACf,MAAM,CAAC,SAAS,CACnB,CAAC;IACN,CAAC;IAED;;;;;;OAMG;IACH,iCAAiC,CAAC,MAA0B;QACxD,MAAM,eAAe,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC5D,MAAM,sBAAsB,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAErE,MAAM,QAAQ,GAAG,YAAY,CAAC,kBAAkB,CAC5C,mCAAmC,EACnC,CAAC,eAAe,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAClD,CAAC;QAEF,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAC1B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAChC,QAAQ,EACR,MAAM,CAAC,QAAQ,EACf,MAAM,CAAC,SAAS,CACnB,CAAC;IACN,CAAC;CAoIJ;AA1dD,0CA0dC"}
|
package/dist/main/Governance.js
CHANGED
|
@@ -54,7 +54,7 @@ class Governance {
|
|
|
54
54
|
*/
|
|
55
55
|
this.getGovernanceParameters = async ({ providerOrSigner, token = ethers_1.ethers.constants.AddressZero, }) => {
|
|
56
56
|
const pppPromise = this.getPPPConfig({ providerOrSigner, token });
|
|
57
|
-
const
|
|
57
|
+
const rewardPromise = this.getRewardAddress({
|
|
58
58
|
providerOrSigner,
|
|
59
59
|
token,
|
|
60
60
|
});
|
|
@@ -64,7 +64,7 @@ class Governance {
|
|
|
64
64
|
});
|
|
65
65
|
const data = await Promise.all([
|
|
66
66
|
pppPromise,
|
|
67
|
-
|
|
67
|
+
rewardPromise,
|
|
68
68
|
minimumDepositPromise,
|
|
69
69
|
]);
|
|
70
70
|
return {
|
package/dist/main/Host.d.ts
CHANGED
|
@@ -16,7 +16,17 @@ export default class Host {
|
|
|
16
16
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
17
17
|
* @returns {Operation} an `Operation` class
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
callAgreement: (agreementAddress: string, callData: string, userData: string | undefined, overrides?: Overrides & {
|
|
20
|
+
from?: string | Promise<string>;
|
|
21
|
+
}) => Operation;
|
|
22
|
+
/**
|
|
23
|
+
* Creates an Operation of the `callAppAction` function on the host contract.
|
|
24
|
+
* @param app the address of the Super App you are calling
|
|
25
|
+
* @param callData the encoded callData for the function
|
|
26
|
+
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
27
|
+
* @returns {Operation} an `Operation` class
|
|
28
|
+
*/
|
|
29
|
+
callAppAction: (app: string, callData: string, overrides?: Overrides & {
|
|
20
30
|
from?: string | Promise<string>;
|
|
21
31
|
}) => Operation;
|
|
22
32
|
}
|
package/dist/main/Host.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Host.d.ts","sourceRoot":"","sources":["../../src/Host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,SAAS,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,IAAI;IACrB,QAAQ,EAAE,UAAU,CAAC;gBAET,WAAW,EAAE,MAAM;IAO/B;;;;;;;OAOG;IACH,
|
|
1
|
+
{"version":3,"file":"Host.d.ts","sourceRoot":"","sources":["../../src/Host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,SAAS,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,IAAI;IACrB,QAAQ,EAAE,UAAU,CAAC;gBAET,WAAW,EAAE,MAAM;IAO/B;;;;;;;OAOG;IACH,aAAa,qBACS,MAAM,YACd,MAAM,YACN,MAAM,GAAG,SAAS,cAChB,SAAS,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,MAAM,CAAC,CAAA;KAAE,KAC5D,SAAS,CAQV;IAEF;;;;;;OAMG;IACH,aAAa,QACJ,MAAM,YACD,MAAM,cACJ,SAAS,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,MAAM,CAAC,CAAA;KAAE,KAC5D,SAAS,CAOV;CACL"}
|
package/dist/main/Host.js
CHANGED
|
@@ -20,10 +20,21 @@ class Host {
|
|
|
20
20
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
21
21
|
* @returns {Operation} an `Operation` class
|
|
22
22
|
*/
|
|
23
|
-
this.
|
|
23
|
+
this.callAgreement = (agreementAddress, callData, userData, overrides) => {
|
|
24
24
|
const txn = this.contract.populateTransaction.callAgreement(agreementAddress, callData, userData || "0x", overrides || {});
|
|
25
25
|
return new Operation_1.default(txn, "SUPERFLUID_CALL_AGREEMENT");
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Creates an Operation of the `callAppAction` function on the host contract.
|
|
29
|
+
* @param app the address of the Super App you are calling
|
|
30
|
+
* @param callData the encoded callData for the function
|
|
31
|
+
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
32
|
+
* @returns {Operation} an `Operation` class
|
|
33
|
+
*/
|
|
34
|
+
this.callAppAction = (app, callData, overrides) => {
|
|
35
|
+
const txn = this.contract.populateTransaction.callAppAction(app, callData, overrides || {});
|
|
36
|
+
return new Operation_1.default(txn, "CALL_APP_ACTION");
|
|
37
|
+
};
|
|
27
38
|
this.contract = new ethers_1.ethers.Contract(hostAddress, Superfluid_json_1.default.abi);
|
|
28
39
|
}
|
|
29
40
|
}
|
package/dist/main/Host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Host.js","sourceRoot":"","sources":["../../src/Host.ts"],"names":[],"mappings":";;;;;AAAA,mCAA2C;AAE3C,4DAAoC;AACpC,4EAAkD;AAGlD;;;GAGG;AACH,MAAqB,IAAI;IAGrB,YAAY,WAAmB;QAO/B;;;;;;;WAOG;QACH
|
|
1
|
+
{"version":3,"file":"Host.js","sourceRoot":"","sources":["../../src/Host.ts"],"names":[],"mappings":";;;;;AAAA,mCAA2C;AAE3C,4DAAoC;AACpC,4EAAkD;AAGlD;;;GAGG;AACH,MAAqB,IAAI;IAGrB,YAAY,WAAmB;QAO/B;;;;;;;WAOG;QACH,kBAAa,GAAG,CACZ,gBAAwB,EACxB,QAAgB,EAChB,QAA4B,EAC5B,SAA2D,EAClD,EAAE;YACX,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,aAAa,CACvD,gBAAgB,EAChB,QAAQ,EACR,QAAQ,IAAI,IAAI,EAChB,SAAS,IAAI,EAAE,CAClB,CAAC;YACF,OAAO,IAAI,mBAAS,CAAC,GAAG,EAAE,2BAA2B,CAAC,CAAC;QAC3D,CAAC,CAAC;QAEF;;;;;;WAMG;QACH,kBAAa,GAAG,CACZ,GAAW,EACX,QAAgB,EAChB,SAA2D,EAClD,EAAE;YACX,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,aAAa,CACvD,GAAG,EACH,QAAQ,EACR,SAAS,IAAI,EAAE,CAClB,CAAC;YACF,OAAO,IAAI,mBAAS,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;QACjD,CAAC,CAAC;QA/CE,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAM,CAAC,QAAQ,CAC/B,WAAW,EACX,yBAAa,CAAC,GAAG,CACN,CAAC;IACpB,CAAC;CA4CJ;AApDD,uBAoDC"}
|
|
@@ -84,7 +84,7 @@ export default class InstantDistributionAgreementV1 {
|
|
|
84
84
|
*/
|
|
85
85
|
approveSubscription: (params: IApproveSubscriptionParams) => Operation;
|
|
86
86
|
/**
|
|
87
|
-
* Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher
|
|
87
|
+
* Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher distributes.
|
|
88
88
|
* @param indexId The id of the index.
|
|
89
89
|
* @param superToken The superToken of the index.
|
|
90
90
|
* @param subscriber The subscriber address whose subscription you want to revoke.
|
|
@@ -98,7 +98,7 @@ export default class InstantDistributionAgreementV1 {
|
|
|
98
98
|
* @param indexId The id of the index.
|
|
99
99
|
* @param superToken The superToken of the index.
|
|
100
100
|
* @param subscriber The subscriber address whose subscription you want to delete.
|
|
101
|
-
* @param publisher The publisher address of the index you are
|
|
101
|
+
* @param publisher The publisher address of the index you are targeting.
|
|
102
102
|
* @param userData Extra user data provided.
|
|
103
103
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
104
104
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
@@ -109,7 +109,7 @@ export default class InstantDistributionAgreementV1 {
|
|
|
109
109
|
* @param indexId The id of the index.
|
|
110
110
|
* @param superToken The superToken of the index.
|
|
111
111
|
* @param subscriber The subscriber address whose subscription you want to delete.
|
|
112
|
-
* @param publisher The publisher address of the index you are
|
|
112
|
+
* @param publisher The publisher address of the index you are targeting.
|
|
113
113
|
* @param userData Extra user data provided.
|
|
114
114
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
115
115
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
@@ -94,7 +94,7 @@ class InstantDistributionAgreementV1 {
|
|
|
94
94
|
params.indexId,
|
|
95
95
|
"0x",
|
|
96
96
|
]);
|
|
97
|
-
return this.host.
|
|
97
|
+
return this.host.callAgreement(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
98
98
|
};
|
|
99
99
|
/**
|
|
100
100
|
* Distributes `amount` of `superToken` to an index
|
|
@@ -113,7 +113,7 @@ class InstantDistributionAgreementV1 {
|
|
|
113
113
|
params.amount,
|
|
114
114
|
"0x",
|
|
115
115
|
]);
|
|
116
|
-
return this.host.
|
|
116
|
+
return this.host.callAgreement(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
117
117
|
};
|
|
118
118
|
/**
|
|
119
119
|
* Updates the `indexValue` of an index.
|
|
@@ -133,7 +133,7 @@ class InstantDistributionAgreementV1 {
|
|
|
133
133
|
params.indexValue,
|
|
134
134
|
"0x",
|
|
135
135
|
]);
|
|
136
|
-
return this.host.
|
|
136
|
+
return this.host.callAgreement(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
137
137
|
};
|
|
138
138
|
/**
|
|
139
139
|
* Updates the `units` allocated to a Subscription.
|
|
@@ -155,7 +155,7 @@ class InstantDistributionAgreementV1 {
|
|
|
155
155
|
params.units,
|
|
156
156
|
"0x",
|
|
157
157
|
]);
|
|
158
|
-
return this.host.
|
|
158
|
+
return this.host.callAgreement(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
159
159
|
};
|
|
160
160
|
/**
|
|
161
161
|
* Approves a Subscription, so the Subscriber won't need to claim tokens when the Publisher distributes.
|
|
@@ -170,10 +170,10 @@ class InstantDistributionAgreementV1 {
|
|
|
170
170
|
const normalizedPublisher = (0, utils_1.normalizeAddress)(params.publisher);
|
|
171
171
|
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
172
172
|
const callData = idaInterface.encodeFunctionData("approveSubscription", [normalizedToken, normalizedPublisher, params.indexId, "0x"]);
|
|
173
|
-
return this.host.
|
|
173
|
+
return this.host.callAgreement(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
174
174
|
};
|
|
175
175
|
/**
|
|
176
|
-
* Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher
|
|
176
|
+
* Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher distributes.
|
|
177
177
|
* @param indexId The id of the index.
|
|
178
178
|
* @param superToken The superToken of the index.
|
|
179
179
|
* @param subscriber The subscriber address whose subscription you want to revoke.
|
|
@@ -190,14 +190,14 @@ class InstantDistributionAgreementV1 {
|
|
|
190
190
|
params.indexId,
|
|
191
191
|
"0x",
|
|
192
192
|
]);
|
|
193
|
-
return this.host.
|
|
193
|
+
return this.host.callAgreement(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
194
194
|
};
|
|
195
195
|
/**
|
|
196
196
|
* Deletes a Subscription by setting the `units` allocated to the Subscriber to 0.
|
|
197
197
|
* @param indexId The id of the index.
|
|
198
198
|
* @param superToken The superToken of the index.
|
|
199
199
|
* @param subscriber The subscriber address whose subscription you want to delete.
|
|
200
|
-
* @param publisher The publisher address of the index you are
|
|
200
|
+
* @param publisher The publisher address of the index you are targeting.
|
|
201
201
|
* @param userData Extra user data provided.
|
|
202
202
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
203
203
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
@@ -213,14 +213,14 @@ class InstantDistributionAgreementV1 {
|
|
|
213
213
|
normalizedSubscriber,
|
|
214
214
|
"0x",
|
|
215
215
|
]);
|
|
216
|
-
return this.host.
|
|
216
|
+
return this.host.callAgreement(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
217
217
|
};
|
|
218
218
|
/**
|
|
219
219
|
* Claims any pending tokens allocated to the Subscription (unapproved).
|
|
220
220
|
* @param indexId The id of the index.
|
|
221
221
|
* @param superToken The superToken of the index.
|
|
222
222
|
* @param subscriber The subscriber address whose subscription you want to delete.
|
|
223
|
-
* @param publisher The publisher address of the index you are
|
|
223
|
+
* @param publisher The publisher address of the index you are targeting.
|
|
224
224
|
* @param userData Extra user data provided.
|
|
225
225
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
226
226
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
@@ -236,7 +236,7 @@ class InstantDistributionAgreementV1 {
|
|
|
236
236
|
normalizedSubscriber,
|
|
237
237
|
"0x",
|
|
238
238
|
]);
|
|
239
|
-
return this.host.
|
|
239
|
+
return this.host.callAgreement(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
240
240
|
};
|
|
241
241
|
this.options = options;
|
|
242
242
|
this.host = new Host_1.default(options.config.hostAddress);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstantDistributionAgreementV1.js","sourceRoot":"","sources":["../../src/InstantDistributionAgreementV1.ts"],"names":[],"mappings":";;;;;AAAA,mCAAgC;AAEhC,kDAA0B;AAE1B,uCAAoC;AACpC,sHAA4F;AAiB5F,mCAA2C;AAE3C,MAAM,YAAY,GAAG,IAAI,eAAM,CAAC,KAAK,CAAC,SAAS,CAC3C,8CAAkC,CAAC,GAAG,CACzC,CAAC;AAEF;;;GAGG;AACH,MAAqB,8BAA8B;IAK/C,YAAY,OAA4B;QASxC,iCAAiC;QAEjC;;;;;;;;WAQG;QACH,oBAAe,GAAG,KAAK,EACnB,MAA8B,EACJ,EAAE;YAC5B,MAAM,eAAe,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC5D,MAAM,mBAAmB,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAC/D,MAAM,oBAAoB,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACjE,IAAI;gBACA,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,QAAQ;qBACnC,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC;qBAChC,eAAe,CACZ,eAAe,EACf,mBAAmB,EACnB,MAAM,CAAC,OAAO,EACd,oBAAoB,CACvB,CAAC;gBAE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oB,EAAa,EAAE;YACxC,MAAM,mBAAmB,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAC/D,MAAM,eAAe,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC5D,MAAM,oBAAoB,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACjE,MAAM,QAAQ,GAAG,YAAY,CAAC,kBAAkB,CAAC,OAAO,EAAE;gBACtD,eAAe;gBACf,mBAAmB;gBACnB,MAAM,CAAC,OAAO;gBACd,oBAAoB;gBACpB,IAAI;aACP,CAAC,CAAC;YAEH,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,CAC1B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAChC,QAAQ,EACR,MAAM,CAAC,QAAQ,EACf,MAAM,CAAC,SAAS,CACnB,CAAC;QACN,CAAC,CAAC;QA7SE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,cAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAM,CAAC,QAAQ,CAC/B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAChC,8CAAkC,CAAC,GAAG,CACN,CAAC;IACzC,CAAC;CAwSJ;AApTD,iDAoTC"}
|
package/dist/main/Operation.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export default class Operation {
|
|
|
12
12
|
/**
|
|
13
13
|
* Executes the operation via the provided signer.
|
|
14
14
|
* @description Populates all fields of the transaction, signs it and sends it to the network.
|
|
15
|
-
* @param signer The signer of the
|
|
15
|
+
* @param signer The signer of the transaction
|
|
16
16
|
* @returns {ethers.providers.TransactionResponse} A TransactionResponse object which can be awaited
|
|
17
17
|
*/
|
|
18
18
|
exec: (signer: ethers.Signer) => Promise<ethers.providers.TransactionResponse>;
|
|
@@ -24,14 +24,14 @@ export default class Operation {
|
|
|
24
24
|
getPopulatedTransactionRequest: (signer: ethers.Signer) => Promise<TransactionRequest>;
|
|
25
25
|
/**
|
|
26
26
|
* Signs the populated transaction via the provided signer (what you intend on sending to the network).
|
|
27
|
-
* @param signer The signer of the
|
|
27
|
+
* @param signer The signer of the transaction
|
|
28
28
|
* @returns {Promise<string>} Fully serialized, signed transaction
|
|
29
29
|
*/
|
|
30
30
|
getSignedTransaction: (signer: ethers.Signer) => Promise<string>;
|
|
31
31
|
/**
|
|
32
32
|
* Gets the transaction hash of the transaction.
|
|
33
33
|
* @description Calculates this by getting the keccak256 hash of the signedTxn.
|
|
34
|
-
* @param signer The signer of the
|
|
34
|
+
* @param signer The signer of the transaction
|
|
35
35
|
* @returns {Promise<string>} The transaction hash of the transaction
|
|
36
36
|
*/
|
|
37
37
|
getTransactionHash: (signer: ethers.Signer) => Promise<string>;
|
package/dist/main/Operation.js
CHANGED
|
@@ -11,7 +11,7 @@ class Operation {
|
|
|
11
11
|
/**
|
|
12
12
|
* Executes the operation via the provided signer.
|
|
13
13
|
* @description Populates all fields of the transaction, signs it and sends it to the network.
|
|
14
|
-
* @param signer The signer of the
|
|
14
|
+
* @param signer The signer of the transaction
|
|
15
15
|
* @returns {ethers.providers.TransactionResponse} A TransactionResponse object which can be awaited
|
|
16
16
|
*/
|
|
17
17
|
this.exec = async (signer) => {
|
|
@@ -48,7 +48,7 @@ class Operation {
|
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
50
|
* Signs the populated transaction via the provided signer (what you intend on sending to the network).
|
|
51
|
-
* @param signer The signer of the
|
|
51
|
+
* @param signer The signer of the transaction
|
|
52
52
|
* @returns {Promise<string>} Fully serialized, signed transaction
|
|
53
53
|
*/
|
|
54
54
|
this.getSignedTransaction = async (signer) => {
|
|
@@ -68,7 +68,7 @@ class Operation {
|
|
|
68
68
|
/**
|
|
69
69
|
* Gets the transaction hash of the transaction.
|
|
70
70
|
* @description Calculates this by getting the keccak256 hash of the signedTxn.
|
|
71
|
-
* @param signer The signer of the
|
|
71
|
+
* @param signer The signer of the transaction
|
|
72
72
|
* @returns {Promise<string>} The transaction hash of the transaction
|
|
73
73
|
*/
|
|
74
74
|
this.getTransactionHash = async (signer) => {
|
package/dist/main/SFError.js
CHANGED
|
@@ -40,7 +40,7 @@ Caused by: ${stringifyCause(cause)}`
|
|
|
40
40
|
: ""}`;
|
|
41
41
|
super(fullMessage, cause
|
|
42
42
|
? {
|
|
43
|
-
cause: cause, // Currently "unknown" is not compatible with "cause" (because it
|
|
43
|
+
cause: cause, // Currently "unknown" is not compatible with "cause" (because it expects "Error" and that's why we cast) but this was recently changed and merged to also allow "unknown": https://github.com/microsoft/TypeScript/pull/49639
|
|
44
44
|
}
|
|
45
45
|
: {});
|
|
46
46
|
// Fallback back environments where `Error.cause` is now yet natively supported
|
package/dist/main/SFError.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SFError.js","sourceRoot":"","sources":["../../src/SFError.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAsBjD,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAoB;IACnD,CAAC,0BAA0B,EAAE,0BAA0B,CAAC;IACxD,CAAC,2BAA2B,EAAE,2BAA2B,CAAC;IAC1D,CAAC,eAAe,EAAE,eAAe,CAAC;IAClC,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IACtC,CAAC,gBAAgB,EAAE,UAAU,CAAC;IAC9B,CAAC,YAAY,EAAE,8BAA8B,CAAC;IAC9C,CAAC,YAAY,EAAE,qCAAqC,CAAC;IACrD,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IACtC,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACpC,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;IAChD,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IAC9C,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IACxC,CAAC,uBAAuB,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AAc,EAAE,8NAA8N;aACxP;YACH,CAAC,CAAC,EAAE,CACX,CAAC;QACF,+EAA+E;QAC/E,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACtB,IAAI,CAAC,KAAK,GAAG,KAAc,CAAC;SAC/B;QACD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,gIAAgI;IACvL,CAAC;CACJ;AA5BD,0BA4BC"}
|
package/dist/main/constants.js
CHANGED
|
@@ -71,7 +71,7 @@ exports.AUTHORIZE_FLOW_OPERATOR_DELETE = 1 << 2;
|
|
|
71
71
|
exports.AUTHORIZE_FULL_CONTROL = exports.AUTHORIZE_FLOW_OPERATOR_CREATE |
|
|
72
72
|
exports.AUTHORIZE_FLOW_OPERATOR_UPDATE |
|
|
73
73
|
exports.AUTHORIZE_FLOW_OPERATOR_DELETE;
|
|
74
|
-
const subgraphReleaseTag = (process && process.env.SUBGRAPH_RELEASE_TAG) ||
|
|
74
|
+
const subgraphReleaseTag = (globalThis.process && globalThis.process.env.SUBGRAPH_RELEASE_TAG) ||
|
|
75
75
|
defaultSubgraphReleaseTag_json_1.default.value;
|
|
76
76
|
const baseUrl = `https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-${subgraphReleaseTag}`;
|
|
77
77
|
exports.chainIdToResolverDataMap = new Map([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;;;;AAAA,sGAAyE;AAGzE,gCAAgC;AACnB,QAAA,eAAe,GAAG,EAAE,CAAC;AACrB,QAAA,cAAc,GAAG,EAAE,CAAC;AACpB,QAAA,aAAa,GAAG,CAAC,CAAC;AAClB,QAAA,aAAa,GAAG,EAAE,CAAC;AACnB,QAAA,gBAAgB,GAAG,EAAE,CAAC;AACtB,QAAA,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369
369
|
readonly symbol: string;
|
|
370
370
|
readonly isListed: boolean;
|
|
371
|
+
readonly isNativeAssetSuperToken: boolean;
|
|
371
372
|
readonly underlyingAddress: string;
|
|
372
373
|
}
|
|
373
374
|
export interface IAggregateEntityBase {
|