tomusdrw / rust-web3

Ethereum JSON-RPC multi-transport client. Rust implementation of web3 library. ENS address: rust-web3.eth
MIT License
1.45k stars 465 forks source link

move Accounts::hash_message and make it static #588

Closed blackghost1987 closed 2 years ago

blackghost1987 commented 2 years ago

Account::hash_message is actually a static function, there's no point in having it under Accounts. It would be more convenient to be able to access this function without creating an Account and a Transport. I've kept the Accounts::hash_message function for backward compatibility reasons though. I've moved hash_message to api/mod.rs as I haven't found a better place for it, but I'm open to suggestions. Is there already place for static functions like this under api somewhere?

Let me know if I need to do anything else, because this is my first contribution for this project!

tomusdrw commented 2 years ago

Thanks a lot for the contribution and sorry for the delay with reviewing!

blackghost1987 commented 2 years ago

I think this is ready for merge