Skip to content

VDB-1395 vow file#223

Merged
elizabethengelman merged 8 commits intostagingfrom
vdb-1395-vow-file
Jul 14, 2020
Merged

VDB-1395 vow file#223
elizabethengelman merged 8 commits intostagingfrom
vdb-1395-vow-file

Conversation

@elizabethengelman
Copy link
Copy Markdown
Contributor

@elizabethengelman elizabethengelman commented Jul 10, 2020

  • Instead of calling this transformer/table vow_file_flapper_flopper I called it vow_file_auction_address since this file method implemntation is setting the flapper or flopper address on the vow contract. Totally happy to change this to something else if folks have another idea.

  • I didn't change the location or the name of the original vow_file transformer, and was thinking of just waiting until we pick up VDB-1437 to make those changes. Perhaps we could rename it to vow_file_auction_attributes or something since that file method implementation is setting specific attributes for either the flapper or flopper on the vow contract.

@elizabethengelman elizabethengelman requested review from paytonrules, rmulhol and yaoandrew and removed request for rmulhol and yaoandrew July 10, 2020 13:59
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.

LGTM! Couple minor comments, nothing blocking - would be cool to add a story for adding the msg.sender if we're not doing so here

header_id INTEGER NOT NULL REFERENCES public.headers (id) ON DELETE CASCADE,
log_id BIGINT NOT NULL REFERENCES public.event_logs (id) ON DELETE CASCADE,
what TEXT,
data INTEGER NOT NULL REFERENCES public.addresses (id) ON DELETE CASCADE,
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.

maybe worth grabbing the msg.sender as well?

Expect(executeErr).NotTo(HaveOccurred())

var dbResult []vowFileAuctionAddressModel
getVowFileErr := db.Select(&dbResult, `SELECT what, data from maker.vow_file_auction_address`)
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.

Super minor but if we're expecting only one result maybe we can get away with using db.Get and passing a single vowFileAuctionAddressModel? Thinking that should mean we don't need to expect len(results) to == 0

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.

Good call!

@@ -173,6 +173,9 @@ func vatSlipMethod() string { return getSolidityFunctionSignature(VatABI(), "sli
func vatSuckMethod() string { return getSolidityFunctionSignature(VatABI(), "suck") }
func vowFessMethod() string { return getSolidityFunctionSignature(VowABI(), "fess") }
func vowFileMethod() string { return getSolidityFunctionSignature(VowABI(), "file") }
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.

A little surprised this doesn't need to use getOverloadedFunctionSignature - maybe worth using anyway to be explicit about the distinction?

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, good catch. I wonder if we just lucked out before, and the file signature we were after was returned first from the abi. Updating it to use getOverloadedFunctionSignature makes sense to me though.

var rawVowFileAuctionAddressLog = types.Log{
Address: common.HexToAddress(VowAddress()),
Topics: []common.Hash{
common.HexToHash(constants.VowFileSignature()),
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.

Should this be VowFileAuctionAddressSignature()?

@elizabethengelman elizabethengelman changed the title Vdb 1395 vow file VDB-1395 vow file Jul 13, 2020
@elizabethengelman elizabethengelman merged commit acd621d into staging Jul 14, 2020
@elizabethengelman elizabethengelman deleted the vdb-1395-vow-file branch July 14, 2020 23:25
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