Skip to content
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

Merged
merged 11 commits into from
Oct 21, 2024
Merged

Conversation

DOBEN
Copy link
Member

@DOBEN DOBEN commented Oct 13, 2024

Purpose

Addresses #252
Addresses #250
Addresses #253

Changes

  • Add contract and module table.
  • Add Query::module.
  • Add Query::contract.
  • Add Query::contracts.
  • Add TLS support.
  • Update Readme with additional information for developers to work on the project.

@DOBEN DOBEN changed the base branch from main to rust-backend October 13, 2024 08:56
@DOBEN DOBEN mentioned this pull request Oct 13, 2024
6 tasks
@DOBEN DOBEN force-pushed the rust-backend-modules branch from 285590f to ef769d3 Compare October 14, 2024 13:58
@DOBEN DOBEN changed the base branch from rust-backend to main October 14, 2024 13:58
@DOBEN DOBEN force-pushed the rust-backend-modules branch from ef769d3 to ffc4025 Compare October 14, 2024 13:58
@DOBEN DOBEN changed the base branch from main to rust-backend October 14, 2024 14:18
Copy link
Contributor

@Victor-N-Suadicani Victor-N-Suadicani left a 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.

backend-rust/README.md Outdated Show resolved Hide resolved
backend-rust/README.md Outdated Show resolved Hide resolved
backend-rust/README.md Outdated Show resolved Hide resolved
backend-rust/migrations/0001_initialize.up.sql Outdated Show resolved Hide resolved
backend-rust/src/graphql_api.rs Outdated Show resolved Hide resolved
backend-rust/migrations/0001_initialize.up.sql Outdated Show resolved Hide resolved
backend-rust/src/indexer.rs Show resolved Hide resolved
backend-rust/src/indexer.rs Outdated Show resolved Hide resolved
backend-rust/src/indexer.rs Show resolved Hide resolved
backend-rust/README.md Outdated Show resolved Hide resolved
backend-rust/README.md Show resolved Hide resolved
backend-rust/README.md Outdated Show resolved Hide resolved
backend-rust/README.md Outdated Show resolved Hide resolved
backend-rust/migrations/0001_initialize.up.sql Outdated Show resolved Hide resolved
backend-rust/migrations/0001_initialize.up.sql Outdated Show resolved Hide resolved
backend-rust/migrations/0001_initialize.up.sql Outdated Show resolved Hide resolved
backend-rust/src/graphql_api.rs Show resolved Hide resolved
backend-rust/src/indexer.rs Show resolved Hide resolved
backend-rust/src/graphql_api.rs Show resolved Hide resolved
@DOBEN DOBEN force-pushed the rust-backend-modules branch from 3dd81f5 to b758d16 Compare October 21, 2024 10:04
@DOBEN DOBEN force-pushed the rust-backend-modules branch from b758d16 to 32edfec Compare October 21, 2024 10:45
@DOBEN DOBEN requested a review from limemloh October 21, 2024 14:43
Copy link
Contributor

@limemloh limemloh left a 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

Comment on lines +860 to +881
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,
};
Copy link
Contributor

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.

@DOBEN DOBEN merged commit ef4a5db into rust-backend Oct 21, 2024
3 checks passed
@DOBEN DOBEN deleted the rust-backend-modules branch October 21, 2024 17:31
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.

3 participants