-
Notifications
You must be signed in to change notification settings - Fork 34
Conversation
This seems fine to me - it definitely looks funny to have calls like
I think that makes sense if we do end up removing the receiver, but on the other hand, I like having the address stuff in its own file. Those are my noncommittal thoughts - the rest of the team has worked with this codebase far longer so I'd defer to you all. |
I agree that it doesn't make since to keep the receiver when none of the methods need one and I think it would make using them inside other repositories cleaner. Maybe as functions they could be lifted into their own |
1119a7f
to
7aef54e
Compare
7aef54e
to
0a9d030
Compare
0a9d030
to
a6f96c5
Compare
…basing with staging
a6f96c5
to
0bfede7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job, nothing merge-blocking!
@@ -1,5 +1,18 @@ | |||
// VulcanizeDB | |||
// Copyright © 2019 Vulcanize | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double copyright :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must have really wanted to make sure that file was protect. 😆 Nice catch!
@@ -22,6 +22,7 @@ import ( | |||
"github.com/jmoiron/sqlx" | |||
"github.com/lib/pq" | |||
"github.com/sirupsen/logrus" | |||
repository2 "github.com/vulcanize/vulcanizedb/libraries/shared/repository" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth renaming one of these repository
s?
@@ -84,7 +85,7 @@ func createLogs(logs []core.FullSyncLog, receiptId int64, tx *sqlx.Tx) error { | |||
|
|||
func (FullSyncReceiptRepository) CreateFullSyncReceiptInTx(blockId int64, receipt core.Receipt, tx *sqlx.Tx) (int64, error) { | |||
var receiptId int64 | |||
addressId, getAddressErr := AddressRepository{}.GetOrCreateAddressInTransaction(tx, receipt.ContractAddress) | |||
addressId, getAddressErr := repository.GetOrCreateAddressInTransaction(tx, receipt.ContractAddress) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Factor out get or create address into one sql string * Factor out getChecksumAddress method in address repo * Update address repo methods to not need a receiver * Move address repository to libraries/shared
* Factor out get or create address into one sql string * Factor out getChecksumAddress method in address repo * Update address repo methods to not need a receiver * Move address repository to libraries/shared
A couple small changes to the address repo that came out of implementing the address table in the transformer repo.
libraries/shared/repository/repository.go
since they're a bit different.Once this is released, we'll need to make sure to update transformer repository to use the updated address repo format