aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-11-16 05:09:44 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-06 19:04:25 +0800
commit4a715c30fdc7d46dfb90f23418bdeec4161db322 (patch)
treeeeb74deeecdf0e02980072857c3bf5c16eed85b5 /packages
parent65bb8bdb5ec87310a421d432d0342b501e41bfd3 (diff)
downloaddexon-sol-tools-4a715c30fdc7d46dfb90f23418bdeec4161db322.tar
dexon-sol-tools-4a715c30fdc7d46dfb90f23418bdeec4161db322.tar.gz
dexon-sol-tools-4a715c30fdc7d46dfb90f23418bdeec4161db322.tar.bz2
dexon-sol-tools-4a715c30fdc7d46dfb90f23418bdeec4161db322.tar.lz
dexon-sol-tools-4a715c30fdc7d46dfb90f23418bdeec4161db322.tar.xz
dexon-sol-tools-4a715c30fdc7d46dfb90f23418bdeec4161db322.tar.zst
dexon-sol-tools-4a715c30fdc7d46dfb90f23418bdeec4161db322.zip
Add transactionHash to CancelUpToEvent and CancelEvent entities
Diffstat (limited to 'packages')
-rw-r--r--packages/pipeline/src/entities/exchange_cancel_event.ts3
-rw-r--r--packages/pipeline/src/entities/exchange_cancel_up_to_event.ts2
-rw-r--r--packages/pipeline/src/parsers/events/index.ts2
3 files changed, 6 insertions, 1 deletions
diff --git a/packages/pipeline/src/entities/exchange_cancel_event.ts b/packages/pipeline/src/entities/exchange_cancel_event.ts
index 781e1c4bb..5a40ba799 100644
--- a/packages/pipeline/src/entities/exchange_cancel_event.ts
+++ b/packages/pipeline/src/entities/exchange_cancel_event.ts
@@ -14,7 +14,8 @@ export class ExchangeCancelEvent {
@Column({ name: 'raw_data' })
public rawData!: string;
- // TODO(albrow): Include transaction hash
+ @Column({ name: 'transaction_hash' })
+ public transactionHash!: string;
@Column({ name: 'maker_address' })
public makerAddress!: string;
@Column({ nullable: true, type: String, name: 'taker_address' })
diff --git a/packages/pipeline/src/entities/exchange_cancel_up_to_event.ts b/packages/pipeline/src/entities/exchange_cancel_up_to_event.ts
index 752631b85..9b1c6174a 100644
--- a/packages/pipeline/src/entities/exchange_cancel_up_to_event.ts
+++ b/packages/pipeline/src/entities/exchange_cancel_up_to_event.ts
@@ -16,6 +16,8 @@ export class ExchangeCancelUpToEvent {
@Column({ name: 'raw_data' })
public rawData!: string;
+ @Column({ name: 'transaction_hash' })
+ public transactionHash!: string;
@Column({ name: 'maker_address' })
public makerAddress!: string;
@Column({ name: 'sender_address' })
diff --git a/packages/pipeline/src/parsers/events/index.ts b/packages/pipeline/src/parsers/events/index.ts
index 27e192d7b..407883078 100644
--- a/packages/pipeline/src/parsers/events/index.ts
+++ b/packages/pipeline/src/parsers/events/index.ts
@@ -103,6 +103,7 @@ export function _convertToExchangeCancelEvent(
exchangeCancelEvent.blockNumber = eventLog.blockNumber as number;
exchangeCancelEvent.logIndex = eventLog.logIndex as number;
exchangeCancelEvent.rawData = eventLog.data as string;
+ exchangeCancelEvent.transactionHash = eventLog.transactionHash;
exchangeCancelEvent.makerAddress = eventLog.args.makerAddress.toString();
exchangeCancelEvent.takerAddress =
eventLog.args.takerAddress == null ? null : eventLog.args.takerAddress.toString();
@@ -137,6 +138,7 @@ export function _convertToExchangeCancelUpToEvent(
exchangeCancelUpToEvent.blockNumber = eventLog.blockNumber as number;
exchangeCancelUpToEvent.logIndex = eventLog.logIndex as number;
exchangeCancelUpToEvent.rawData = eventLog.data as string;
+ exchangeCancelUpToEvent.transactionHash = eventLog.transactionHash;
exchangeCancelUpToEvent.makerAddress = eventLog.args.makerAddress.toString();
exchangeCancelUpToEvent.senderAddress = eventLog.args.senderAddress.toString();
exchangeCancelUpToEvent.orderEpoch = eventLog.args.orderEpoch;