5 votes
Accepted

How to make Ethereum tx using web3.py?

This is described in web3py Documentation Once you have your provider set and web3 instantiates you can do: signed_txn = w3.eth.account.signTransaction(dict( nonce=w3.eth.getTransactionCount('...
Jaime's user avatar
  • 8,340
4 votes
Accepted

How do you verify a Metamask signature on the server side?

Here is what worked for me: You will need a Web3 provider, for example: w3 = Web3(Web3.HTTPProvider('https://mainnet.infura.io/v3/api_key') You can recover the address using the message and signature ...
dx1's user avatar
  • 105
3 votes
Accepted

Can I integrate smart contracts in Django application

Yes you can, follow below steps: Write a smart contract, Deploy smart contract in Eth network Use web3.py to integrate/call smart contract/eth method's Documentation SDK
Jitendra Kumar. Balla's user avatar
3 votes

Using same port for web-hosting and geth node

I managed to make it work by running geth --genesis customGenesis.json --rpc --rpcport "9012" --rpcaddr "0.0.0.0" --rpccorsdomain "*" --datadir testchain --networkid 1234 console From what I ...
punddalinni's user avatar
3 votes

How to get all transaction lists of local ethereum wallet using web3.py?

The following script fetches blocks and filters transactions to/from the given address. You can modify it to suit your needs. #!/usr/bin/python import argparse import json import web3 from web3 ...
osolmaz's user avatar
  • 409
2 votes

when sending a str, it must be a hex string. Got: "'MY _PUBLIC _KEY'"

I can't tell if it solves your problem, But may give you an idea at least. The value of "'0x6e...24'" is double stringified. Which means there are multiple quotations around your hex string....
Ebrahim Fadae's user avatar
2 votes
Accepted

How to make batch transaction in ethereum using web3.py

Batching is not supported in web3.py, as of v4.5.0. Follow this issue if you would like to be notified if/when it is added.
carver's user avatar
  • 6,381
2 votes
Accepted

How to use sendRawTransaction of web3.py?

ChainID was introduced in EIP-155 to prevent replay attacks between the main ETH and ETC chains, which both have a networkID of 1. For the Ethereum Mainnet the ChainID is 1 you can check the ChainId ...
Olivers De Abreu's user avatar
2 votes

Using same port for web-hosting and geth node

You cannot run more than one program to listen and serve on a single port on the same computer: If you want to serve your Apache web page on the port 9002, choose another port for geth to serve it's ...
BokkyPooBah's user avatar
  • 40.3k
2 votes
Accepted

Replacement transaction underpriced

Solved, it was the RPC node service. I switched to a private one and everything is working as expected.
tinom9's user avatar
  • 256
1 vote

What is the best way to interact with a smart contract from Django?

You should take a look at Web3.py. It's like Web3.js but for Python, so you could use it in your Django backend. This should be a comment but I don't have 50 reputation yet 🙃
Hugh Degas's user avatar
1 vote

Integrating web3 and Django

This is hard to debug without seeing your actual code. If it's falling over on the require line it's most likely failing to load the web3 javascript file, or loading it after you've placed your script....
Edmund Edgar's user avatar
  • 16.9k

Only top scored, non community-wiki answers of a minimum length are eligible