@streamflow/stream 4.1.0-beta.13 → 4.1.0-beta.14
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.
|
@@ -8,6 +8,7 @@ export default class EvmStreamClient extends BaseStreamClient {
|
|
|
8
8
|
private signer;
|
|
9
9
|
private readContract;
|
|
10
10
|
private writeContract;
|
|
11
|
+
private chain;
|
|
11
12
|
constructor(clusterUrl: string, chain: IChain, signer: ethers.Signer, cluster?: ICluster, programId?: string);
|
|
12
13
|
create(streamData: ICreateStreamData): Promise<ICreateResult>;
|
|
13
14
|
createMultiple(multipleStreamData: ICreateMultipleStreamData): Promise<IMultiTransactionResult>;
|
package/dist/evm/StreamClient.js
CHANGED
|
@@ -108,6 +108,7 @@ var EvmStreamClient = /** @class */ (function (_super) {
|
|
|
108
108
|
if (chain !== types_1.IChain.Ethereum && chain !== types_1.IChain.BNB && chain !== types_1.IChain.Polygon) {
|
|
109
109
|
throw new Error("Wrong chain. Supported chains are Ethereum , BNB and Polygon!");
|
|
110
110
|
}
|
|
111
|
+
_this.chain = chain;
|
|
111
112
|
if (programId) {
|
|
112
113
|
_this.programId = programId;
|
|
113
114
|
}
|
|
@@ -194,7 +195,9 @@ var EvmStreamClient = /** @class */ (function (_super) {
|
|
|
194
195
|
var _a, _b, _c, _d, _e, _f;
|
|
195
196
|
var recipient = multipleStreamData.recipients[index];
|
|
196
197
|
if (result.status === "fulfilled") {
|
|
197
|
-
var
|
|
198
|
+
var eventsCount = result.value.logs.length;
|
|
199
|
+
var creationEventIndex = _this.chain === types_1.IChain.Polygon ? eventsCount - 2 : eventsCount - 1;
|
|
200
|
+
var metadataId = _this.formatMetadataId(result.value.logs[creationEventIndex].data);
|
|
198
201
|
metadatas.push(metadataId);
|
|
199
202
|
signatures.push(result.value.hash);
|
|
200
203
|
metadataToRecipient[metadataId] = recipient;
|
package/package.json
CHANGED