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

Return DR ID as hex string instead of an encoded byte array #178

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

Thomasvdam
Copy link
Member

Motivation

Makes interacting with the contract easier by removing 1 layer of encoding/decoding.

Explanation of Changes

Fairly straightforward, except since I changed some types I had to modify a lot of existing test code. If there's a better way to do this please educate me :)

Testing

All the tests still pass.

Related PRs and Issues

N.A.

@Thomasvdam Thomasvdam requested review from gluax and a team June 24, 2024 14:48
Copy link
Collaborator

@gluax gluax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor Rust things btw.

@@ -48,7 +48,7 @@ pub fn calculate_dr_id_and_args(nonce: u128, replication_factor: u16) -> PostDat
}

pub fn construct_dr(
constructed_dr_id: Hash,
constructed_dr_id: &String,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be &str

pub fn commit_result(
&mut self,
sender: &TestExecutor,
dr_id: &String,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And there were a few more places.

@mariocao mariocao force-pushed the fix/output-dr_id-hex branch from 09deaa9 to 33859fb Compare June 24, 2024 15:34
@mariocao mariocao force-pushed the fix/output-dr_id-hex branch from 33859fb to 3837a51 Compare June 24, 2024 15:38
@mariocao mariocao merged commit 3837a51 into main Jun 24, 2024
2 checks passed
@mariocao mariocao deleted the fix/output-dr_id-hex branch June 24, 2024 15:39
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