Skip to content

Add a LogKill event transformer#167

Merged
elizabethengelman merged 3 commits intostagingfrom
vdb-1283-log-kill
Apr 20, 2020
Merged

Add a LogKill event transformer#167
elizabethengelman merged 3 commits intostagingfrom
vdb-1283-log-kill

Conversation

@elizabethengelman
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@rmulhol rmulhol left a comment

Choose a reason for hiding this comment

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

Will need to bump the migration timestamp but otherwise LGTM!

Expect(dbResult.AddressID).To(Equal(expectedAddressID))
})

FIt("fetches and transforms a LogKill event for OASIS_MATCHING_MARKET_TWO contract", func() {
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.

Think we need to swap out the FIt to fix the build

Copy link
Copy Markdown
Contributor Author

@elizabethengelman elizabethengelman Apr 20, 2020

Choose a reason for hiding this comment

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

🤦‍♀️ nice catch! Also good to know that the build fails when there's a focus!

expectedModel.ColumnValues[constants.PayGemColumn] = payGemAddressId
expectedModel.ColumnValues[constants.BuyGemColumn] = buyGemAddressId

Expect(models).To(Equal([]event.InsertionModel{expectedModel}))
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.

This reads much nicer than the transformer tests I've been writing 😅

May open up a small PR to do address ID assignments this way elsewhere 👍

constants.BuyGemColumn,
constants.PayAmtColumn,
constants.BuyAmtColumn,
constants.TimestampColumn,
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.

ditto here 🤩

CREATE INDEX log_kill_index
ON maker.log_kill (log_id);
CREATE INDEX log_kill_address_index
ON maker.log_kill (address_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.

May want indexes on the maker/pay_gem/buy_gem FKs as well?

Copy link
Copy Markdown
Contributor

@rmulhol rmulhol left a comment

Choose a reason for hiding this comment

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

🚢

@elizabethengelman elizabethengelman merged commit 695f28c into staging Apr 20, 2020
@elizabethengelman elizabethengelman deleted the vdb-1283-log-kill branch April 20, 2020 16:27
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