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

Rollup anchor for ink! smart contracts #30

Merged
merged 67 commits into from
Sep 30, 2023

Conversation

GuiGou12358
Copy link
Contributor

rollup anchor for ink! smart contracts
simple phat contract for the tests
simple ink smart contract for the tests

@h4x3rotab
Copy link
Contributor

Thanks for the contribution! The Phala team is at ETHcc event. So the review and communication may take longer than expected. I will start reviewing this PR from Monday.

@h4x3rotab
Copy link
Contributor

Sorry for the very late reply. Was too busy in preparing hackathon, etc. I'm reviewing it right now.

Copy link
Contributor

@h4x3rotab h4x3rotab left a comment

Choose a reason for hiding this comment

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

Not finished. Just push some comments I've already made.

InkRollup.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
ink/contracts/test_oracle/lib.rs Outdated Show resolved Hide resolved
ink/contracts/test_oracle/lib.rs Show resolved Hide resolved
phat/crates/rollup/Cargo.toml Outdated Show resolved Hide resolved
phat/contracts/ink_price_feed/lib.rs Outdated Show resolved Hide resolved
phat/crates/rollup/src/clients/ink.rs Show resolved Hide resolved
phat/crates/rollup/src/clients/ink.rs Show resolved Hide resolved
phat/crates/rollup/src/clients/ink.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@h4x3rotab h4x3rotab left a comment

Choose a reason for hiding this comment

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

LGTM. High quality and very responsive delivery!

}

/// Converts a compressed public key to SS58 format
fn pub_key_to_ss58(pub_key: &[u8; 33]) -> AccountId {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: AccountId is just [u8; 32] under the hood. SS58 only kicks in when it's displayed on the frontend. So I suggest to name it get_ecdsa_account_id()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I renamed the function

@@ -337,12 +339,21 @@ impl<'a> SubmittableRollupTx<'a> {
}
}

/// Hashing function for bytes
fn pub_key_to_ss58(input: &[u8]) -> [u8; 32] {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I renamed the function

@h4x3rotab h4x3rotab merged commit 001ecf0 into Phala-Network:main Sep 30, 2023
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.

None yet

5 participants