Conversation
rmulhol
left a comment
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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`) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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") } | |||
There was a problem hiding this comment.
A little surprised this doesn't need to use getOverloadedFunctionSignature - maybe worth using anyway to be explicit about the distinction?
There was a problem hiding this comment.
🤔 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.
transformers/test_data/vow_file.go
Outdated
| var rawVowFileAuctionAddressLog = types.Log{ | ||
| Address: common.HexToAddress(VowAddress()), | ||
| Topics: []common.Hash{ | ||
| common.HexToHash(constants.VowFileSignature()), |
There was a problem hiding this comment.
Should this be VowFileAuctionAddressSignature()?
fc4e4bc to
a265bd9
Compare
Instead of calling this transformer/table
vow_file_flapper_flopperI called itvow_file_auction_addresssince 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_filetransformer, and was thinking of just waiting until we pick up VDB-1437 to make those changes. Perhaps we could rename it tovow_file_auction_attributesor something since that file method implementation is setting specific attributes for either the flapper or flopper on the vow contract.