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

Convert Greeter contract example to use local signing middleware #2386

Open
miohtama opened this issue Mar 10, 2022 · 6 comments · May be fixed by #2414
Open

Convert Greeter contract example to use local signing middleware #2386

miohtama opened this issue Mar 10, 2022 · 6 comments · May be fixed by #2414

Comments

@miohtama
Copy link
Contributor

miohtama commented Mar 10, 2022

What was wrong?

The current hello world example is outdated. It assumes you can sign transactions on your Ethereum node, which has not been the case for the last 3 years.

How can it be fixed?

Write a new example code using local signing middleware.

@simonjulianl
Copy link

@miohtama Hi, I am a first-time contributor and I want to contribute to web3py. I am looking into this issue and tried out the (sample code)[https://web3py.readthedocs.io/en/stable/contracts.html#contracts] and it works fine. Do you give more context regarding the local signing middleware and which part of the example where you sign using your Ethereum node?

@B3nac
Copy link
Contributor

B3nac commented Apr 1, 2022

Happy Friday everyone! This is something I can update, just worked on the middleware section relating to signing transactions. ☕. @simonjulianl if you are still interested we could collaborate.

@simonjulianl
Copy link

Hi @B3nac , I would love to collaborate with you and learn from you too!

@B3nac
Copy link
Contributor

B3nac commented Apr 3, 2022

Hi @B3nac , I would love to collaborate with you and learn from you too!

Awesome! 😃 With this example we only need to adapt the functions to the methods that sign with a local key. Which means all transact() calls will be obsolete in the example here https://github.com/ethereum/web3.py/blob/78e01cf264753b8a20d9c1cba113d893c0ff4e63/docs/contracts.rst. We could make an example that uses send_raw_transaction() and another that uses construct_sign_and_send_raw_middleware. Do you think this is a good idea @kclowes? Also @simonjulianl you should join the web3.py Discord if you haven't already it will make collaborating easier and it is where all the cool kids hang out. 😆

@simonjulianl
Copy link

@B3nac cool! I have joined the Discord channel and would contact you there for further details

@kclowes
Copy link
Collaborator

kclowes commented Apr 4, 2022

We could make an example that uses send_raw_transaction() and another that uses construct_sign_and_send_raw_middleware

Yeah, I think that's a great idea! Thanks @B3nac!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants