-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add contract modules and contract instances #268
Conversation
285590f
to
ef769d3
Compare
ef769d3
to
ffc4025
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.
Not anything seriously blocking but various suggestions and questions.
In general I also feel there is a lack of comments, would be nice with more. But remember to make the comments say something that isn't already said by the code itself. Repeating what the code is already saying is not useful.
3dd81f5
to
b758d16
Compare
b758d16
to
32edfec
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.
Looks good to me
let snapshot = ContractSnapshot { | ||
block_height: row.block_height, | ||
contract_address_index, | ||
contract_address_sub_index, | ||
contract_name: row.contract_name, | ||
module_reference: row.module_reference, | ||
amount: row.amount, | ||
}; | ||
|
||
let contract = Contract { | ||
contract_address_index, | ||
contract_address_sub_index, | ||
contract_address: format!( | ||
"<{},{}>", | ||
contract_address_index, contract_address_sub_index | ||
), | ||
creator: row.creator.into(), | ||
block_height: row.block_height, | ||
transaction_hash: row.transaction_hash, | ||
block_slot_time: row.block_slot_time, | ||
snapshot, | ||
}; |
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.
Not exactly what I meant, but let's keep it like this for now, I can make a small PR to show what I mean.
Purpose
Addresses #252
Addresses #250
Addresses #253
Changes
contract
andmodule
table.Query::module
.Query::contract
.Query::contracts
.