-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Rust/Aptos]: Move Aptos blockchain into Rust #3497
Conversation
5364e87
to
3fba52c
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.
Great work! I've left a few comments what could be reworked in my opinion
rust/tw_aptos/src/signer.rs
Outdated
pub trait AptosContext { | ||
type Address: AptosAddress; | ||
} |
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.
I see that EvmContext
confuses. The reason why we used EvmContext
with an EvmContext::Address
associated type is that there are some EVM forks that have different address formats.
For example, Ronin supports ronin:ec49280228b0d05aa8e8b756503254e1ee7835ab
, but other EVM chains do not.
As far as I know, Aptos has only one address format (at least for now), so AptosContext
and AptosAddress
are not needed.
Therefore, the signer can be just:
pub struct Signer;
impl Signer {
pub fn sign_proto_impl(...) {
// ...
let sender = Address::from_str(&input.sender)?;
// ...
}
}
Description
Move aptos C++ to Rust
Breaking change:
How to test
Run swift,android,wasm,c++,rust unit tests
Types of changes
Checklist
If you're adding a new blockchain