Skip to content

(VDB-1286) Add LogMake event transformer#161

Merged
rmulhol merged 1 commit intostagingfrom
vdb-1286-log-make
Apr 15, 2020
Merged

(VDB-1286) Add LogMake event transformer#161
rmulhol merged 1 commit intostagingfrom
vdb-1286-log-make

Conversation

@rmulhol
Copy link
Copy Markdown
Contributor

@rmulhol rmulhol commented Apr 14, 2020

No description provided.

Copy link
Copy Markdown
Contributor

@elizabethengelman elizabethengelman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

header_id integer not null references public.headers (id) on delete cascade,
address_id integer not null references public.addresses (id) on delete cascade,
offer_id numeric,
pair character varying(66),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pair on LogKill is the same as it is here on LogMake where it's pay_gem and buy_gem packed together. Storing it as is as a varchar makes sense to me, but was just curious if you were knew why pair was stored like that, since we have pay_gem and buy_gem already on this event. 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only thought is maybe a user would want to filter logs by the pair and hashing provides a consistent data structure that's easy to reproduce in various clients/ecosystems but I'm not sure 🤔

)

const OfferId event.ColumnName = "offer_id"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Data: hexutil.MustDecode("0x000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000037d73b4e66fa60000000000000000000000000000000000000000000000000304f0cf4f5072f08000000000000000000000000000000000000000000000000000000000005e3e55fc"),
BlockNumber: 9440502,
TxHash: common.HexToHash("0xb2f2f13a6ef0d1d6dd153d1a019929a31799498dcb1c100e04695fc0e95b9e58"),
TxIndex: 1772,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Silly question, but where did you find the TxIndex and the log Index? I think I used to find them on etherscan but didn't see them recently.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah same found on Etherscan but think I'm doing it wrong 😅

The transaction has a Nonce | Position field and I think we want to use Position for tx index (but I used Nonce, whoops!).

And then the events on the transaction have a green circle to the left that I think is the log index:
Screen Shot 2020-04-14 at 2 15 13 PM

@rmulhol rmulhol force-pushed the vdb-1286-log-make branch 2 times, most recently from 2f98c69 to 20e4246 Compare April 15, 2020 14:54
@rmulhol rmulhol force-pushed the vdb-1286-log-make branch from 20e4246 to dc0ec99 Compare April 15, 2020 16:10
@rmulhol rmulhol merged commit df69aeb into staging Apr 15, 2020
@rmulhol rmulhol deleted the vdb-1286-log-make branch April 15, 2020 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants