Conversation
environments/docker.toml
Outdated
| address = "0x64DE91F5A373Cd4c28de3600cB34C7C6cE410C85" | ||
| abi = '[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"val","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"age","type":"uint256"}],"name":"LogMedianPrice","type":"event"},{"anonymous":true,"inputs":[{"indexed":true,"internalType":"bytes4","name":"sig","type":"bytes4"},{"indexed":true,"internalType":"address","name":"usr","type":"address"},{"indexed":true,"internalType":"bytes32","name":"arg1","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"arg2","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"LogNote","type":"event"},{"constant":true,"inputs":[],"name":"age","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bar","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"bud","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"deny","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"a","type":"address[]"}],"name":"diss","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"diss","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"a","type":"address[]"}],"name":"drop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"a","type":"address[]"}],"name":"kiss","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"kiss","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"a","type":"address[]"}],"name":"lift","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"orcl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"peek","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256[]","name":"val_","type":"uint256[]"},{"internalType":"uint256[]","name":"age_","type":"uint256[]"},{"internalType":"uint8[]","name":"v","type":"uint8[]"},{"internalType":"bytes32[]","name":"r","type":"bytes32[]"},{"internalType":"bytes32[]","name":"s","type":"bytes32[]"}],"name":"poke","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"read","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"rely","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"bar_","type":"uint256"}],"name":"setBar","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"slot","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wat","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"}]' | ||
| deployed = 8925057 | ||
| [contract.OASIS_ONE] |
There was a problem hiding this comment.
There are two Oasis contracts to track, not sure how to differentiate between the two besides "ONE" and "TWO" - totally up for some other ideas!
There was a problem hiding this comment.
I think the numeric differentiator makes sense 👍
My only question would be if we potentially want to be more specific - something like OASIS_MATCHING_MARKET_ONE. Mostly just not sure if there are other contracts in the Oasis ecosystem we'd want to add later
692c3f8 to
c190251
Compare
| @@ -0,0 +1,9 @@ | |||
| package log_item_update | |||
There was a problem hiding this comment.
Was thinking of putting these Oasis transformers in their own oasis directory - curious what folks think about that.
There was a problem hiding this comment.
I like the idea! One thing I'd consider is if we might want to have the Oasis stuff run in a whole separate repo (vdb-oasis-transformers) and a different db schema. I think that'd be a cool way to start building off of the plugin architecture, but also may be too much complexity for the time being
There was a problem hiding this comment.
🤔 that's a really interesting idea. I wonder if its possible to start the transformers here, and then move them over to their own repo at some point. Or if that would be more trouble than it's worth.
4781db4 to
93a29d7
Compare
rmulhol
left a comment
There was a problem hiding this comment.
LGTM! Only thing I'd really push for is an address_id in the db table - unless you have different thoughts
| log_id BIGINT NOT NULL REFERENCES public.event_logs (id) ON DELETE CASCADE, | ||
| header_id INTEGER NOT NULL REFERENCES public.headers (id) ON DELETE CASCADE, | ||
| offer_id INT, | ||
| UNIQUE (header_id, log_id) |
There was a problem hiding this comment.
Wondering if we might want to add the contract's address_id to this table if it's populated from multiple contracts
There was a problem hiding this comment.
oh yeah, good call!
| @@ -0,0 +1,9 @@ | |||
| package log_item_update | |||
There was a problem hiding this comment.
I like the idea! One thing I'd consider is if we might want to have the Oasis stuff run in a whole separate repo (vdb-oasis-transformers) and a different db schema. I think that'd be a cool way to start building off of the plugin architecture, but also may be too much complexity for the time being
| "github.com/makerdao/vulcanizedb/pkg/eth" | ||
| ) | ||
|
|
||
| const OfferId event.ColumnName = "offer_id" |
There was a problem hiding this comment.
Maybe this belongs in transformers/shared/constants/keys.go?
There was a problem hiding this comment.
That makes sense. I left it in the this transformer for now, since there are no other transformers with a field called offer_id but that's likely to change as we keep working through these Oasis events.
|
|
||
| return entities, nil | ||
| } | ||
| func (t Transformer) ToModels(abi string, logs []core.EventLog, db *postgres.DB) ([]event.InsertionModel, error) { |
There was a problem hiding this comment.
maybe worth replacing db with _
There was a problem hiding this comment.
with adding the address column, looks like we'll need the db in the transformer now. but good call!
e0738ff to
4a2577c
Compare
4a2577c to
590c7d3
Compare
c09d5ea to
5cd6e6f
Compare
No description provided.