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('...
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 ...
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
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 ...
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 ...
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....
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.
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 ...
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 ...
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.
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 🙃
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....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
django × 21python × 12
web3.py × 10
web3js × 6
solidity × 4
metamask × 3
web3-providers × 2
go-ethereum × 1
transactions × 1
blockchain × 1
ether × 1
gas × 1
dapps × 1
javascript × 1
dapp-development × 1
nft × 1
ganache × 1
react × 1
solc × 1
brownie × 1
nonce × 1
mint × 1
ecrecover × 1