Skip to content

Commit 33b9b97

Browse files
committed
remove extrinsicHash
1 parent 42a2082 commit 33b9b97

File tree

10 files changed

+4
-17
lines changed

10 files changed

+4
-17
lines changed

src/listener.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,17 @@ export class RemarkListener {
237237
);
238238
}
239239
const api = await this.apiPromise;
240+
const systemProperties = await api.rpc.system.properties();
241+
const { ss58Format: chainSs58Format } = systemProperties.toHuman();
240242
const blockHash = await api.rpc.chain.getBlockHash(
241243
header.number.toNumber()
242244
);
243245
const block = await api.rpc.chain.getBlock(blockHash);
244246
const calls = await getBlockCallsFromSignedBlock(
245247
block,
246248
this.prefixes,
247-
api
249+
api,
250+
chainSs58Format as number
248251
);
249252
if (calls.length > 0) {
250253
const blockCalls: BlockCalls = {

src/rmrk1.0.0/changelog.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ export type Change = {
77
caller: string;
88
block: number;
99
valid: boolean;
10-
extrinsicHash: string;
1110
opType: OP_TYPES;
1211
};

src/tools/consolidator/interactions/buy.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export const buyInteraction = (
2626
new: remark.caller,
2727
caller: remark.caller,
2828
block: remark.block,
29-
extrinsicHash: remark.extrinsicHash,
3029
opType: OP_TYPES.BUY,
3130
} as Change);
3231
nft.owner = remark.caller;
@@ -37,7 +36,6 @@ export const buyInteraction = (
3736
new: BigInt(0),
3837
caller: remark.caller,
3938
block: remark.block,
40-
extrinsicHash: remark.extrinsicHash,
4139
opType: OP_TYPES.BUY,
4240
} as Change);
4341
nft.forsale = BigInt(0);

src/tools/consolidator/interactions/changeIssuer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export const changeIssuerInteraction = (
3838
new: changeIssuerEntity.issuer,
3939
caller: remark.caller,
4040
block: remark.block,
41-
extrinsicHash: remark.extrinsicHash,
4241
opType: OP_TYPES.CHANGEISSUER,
4342
} as Change);
4443

src/tools/consolidator/interactions/consume.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export const consumeInteraction = (
4747
new: burnReason,
4848
caller: remark.caller,
4949
block: remark.block,
50-
extrinsicHash: remark.extrinsicHash,
5150
opType: OP_TYPES.CONSUME,
5251
} as Change);
5352
nft.burned = burnReason;
@@ -59,7 +58,6 @@ export const consumeInteraction = (
5958
new: BigInt(0),
6059
caller: remark.caller,
6160
block: remark.block,
62-
extrinsicHash: remark.extrinsicHash,
6361
opType: OP_TYPES.CONSUME,
6462
} as Change);
6563
nft.forsale = BigInt(0);

src/tools/consolidator/interactions/list.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export const listForSaleInteraction = (
4141
new: listEntity.price,
4242
caller: remark.caller,
4343
block: remark.block,
44-
extrinsicHash: remark.extrinsicHash,
4544
opType: OP_TYPES.LIST,
4645
} as Change);
4746

src/tools/consolidator/interactions/send.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export const sendInteraction = (
4040
new: sendEntity.recipient,
4141
caller: remark.caller,
4242
block: remark.block,
43-
extrinsicHash: remark.extrinsicHash,
4443
opType: OP_TYPES.SEND,
4544
} as Change);
4645

@@ -54,7 +53,6 @@ export const sendInteraction = (
5453
new: BigInt(0),
5554
caller: remark.caller,
5655
block: remark.block,
57-
extrinsicHash: remark.extrinsicHash,
5856
opType: OP_TYPES.SEND,
5957
} as Change);
6058
nft.forsale = BigInt(0);

src/tools/consolidator/remark.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { BlockCall } from "../types";
22

33
export type Remark = {
44
block: number;
5-
extrinsicHash: string;
65
interaction_type: string;
76
caller: string;
87
version: string;

src/tools/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export type BlockCall = {
2626
call: string;
2727
value: string;
2828
caller: string;
29-
extrinsicHash: string;
3029
extras?: BlockCall[];
3130
};
3231

src/tools/utils.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ export const getRemarksFromBlocks = (blocks: Block[]): Remark[] => {
104104
const r: Remark = {
105105
block: row.block,
106106
caller: call.caller,
107-
extrinsicHash: call.extrinsicHash,
108107
interaction_type: meta.type,
109108
version: meta.version,
110109
remark: remark,
@@ -167,7 +166,6 @@ export const getBlockCallsFromSignedBlock = async (
167166
call: "system.remark",
168167
value: extrinsic.args.toString(),
169168
caller: encodeAddress(extrinsic.signer.toString(), ss58Format),
170-
extrinsicHash: extrinsic.hash.toString(),
171169
});
172170
} else if (isUtilityBatch(extrinsic.method as TCall)) {
173171
// @ts-ignore
@@ -203,22 +201,19 @@ export const getBlockCallsFromSignedBlock = async (
203201
call: `${el.section}.${el.method}`,
204202
value: el.args.toString(),
205203
caller: encodeAddress(extrinsic.signer.toString(), ss58Format),
206-
extrinsicHash: extrinsic.hash.toString(),
207204
} as BlockCall);
208205
} else {
209206
batchRoot = {
210207
call: `${el.section}.${el.method}`,
211208
value: el.args.toString(),
212209
caller: encodeAddress(extrinsic.signer.toString(), ss58Format),
213-
extrinsicHash: extrinsic.hash.toString(),
214210
} as BlockCall;
215211
}
216212
} else {
217213
batchExtras.push({
218214
call: `${el.section}.${el.method}`,
219215
value: el.args.toString(),
220216
caller: encodeAddress(extrinsic.signer.toString(), ss58Format),
221-
extrinsicHash: extrinsic.hash.toString(),
222217
} as BlockCall);
223218
}
224219
});

0 commit comments

Comments
 (0)