Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:04
    fselmo commented #2457
  • 16:32
    fselmo commented #2457
  • 16:08
    fselmo commented #2457
  • 16:07
    fselmo commented #2457
  • 15:48
    fselmo synchronize #2457
  • 15:35
    pacrob commented #2478
  • 15:35

    pacrob on master

    removed verison check in __init… (compare)

  • 15:35
    pacrob closed #2478
  • 15:25
    pacrob synchronize #2478
  • 15:01
    fselmo commented #2441
  • 09:48
    dbfreem edited #2479
  • 09:48
    dbfreem synchronize #2479
  • 09:46
    dbfreem opened #2479
  • 09:34
    dbfreem opened #2478
  • May 16 21:35

    kclowes on master

    Increase cache size (#2477) * … (compare)

  • May 16 21:35
    kclowes closed #2477
  • May 16 21:16
    kclowes review_requested #2477
  • May 16 21:16
    kclowes review_requested #2477
  • May 16 21:16
    kclowes review_requested #2477
  • May 16 21:07
    kclowes edited #2477
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<carver> @iamajmalhassan are you using a node with hosted keys, or do you have local private keys? If you're using hosted keys, you don't have to worry about signing a transaction at all. Some more background: https://web3py.readthedocs.io/en/stable/web3.eth.account.html#local-vs-hosted-nodes
Voith
@voith

thanks for jumping back in! no issue yet, feel free to create one if you want to solicit more thoughts from the team.

I have some working code, I’ll create a PR tomorrow. However, the are some issues with ganache and its best to show these through code rather than creating an issue.

Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<Marc Garreau (wolovim)> Thats great! Look forward to it.
LIZHOUYI
@LIZHOUYI
taiyi
manuthema-rodriguez
@manuthema-rodriguez
Hello!! thanks @marcgarreau !
mintblock
@mintblock
hi - can someone point me in the right direction. I am coding in python and web3. does anyone know of any examples to swap tokens on kyber or uniswap?
thanks
Marc Garreau
@marcgarreau
I dont know if they have python tooling, but I would start by going to the kyber or uniswap documenation, @mintblock. All you need to interact with the contracts in web3.py is the contract address and ABI, though.
mintblock
@mintblock
thank you
I am using the abi and contract address but looking for an example to reference
Raphael Lullis
@lullis
Hello! I am wondering if there is any way that I can get the value of a transfer using only the information provided by a transaction receipt, or at least if there is any rule besides gasUsed == 21000 to indicate that a transaction is a ETH transfer?
Mikko Ohtamaa
@miohtama
@lullis no. Only for very simple cases. The receipt does not have any information about ETH or token transfers then happen between the smart contracts, on contract to contract calls. For these you need a full transaction trace. Ben Hauser, author of Brownie, can give tips on this one.
Ben Hauser
@iamdefinitelyahuman
thanks @miohtama :)
@lullis Brownie provides an object TransactionReceipt that can show you the return value from a broadcasted transaction.. it's available as TransactionReceipt.return_value - https://eth-brownie.readthedocs.io/en/stable/api-network.html#TransactionReceipt.return_value
for a more general overview of what you can do with TransactionReceipt - https://eth-brownie.readthedocs.io/en/stable/core-transactions.html
Raphael Lullis
@lullis
Thank you. It looks interesting, but it might be too much for what my immediate needs. I am building a a web app to work as a payment gateway, so at the moment all I care about is keeping track of ETH and ERC20 transfers.
Raphael Lullis
@lullis
I do have access to the transaction data along with the receipt already. I was just wondering if I could have my function that tracks transfers relying only on the receipt, but if I have to reconcile data from tx_data and tx_receipt, it's okay...
El De-dog-lo
@fubuloubu
web3py handles the stateMutability field in ABI, right?
mintblock
@mintblock
I am trying to submit a transaction to a smart contract. does anyone know what this error means? I googled, raised my gas amount and limit but no change. your help is appreciated... line 153, in request_blocking
raise ValueError(response["error"])
ValueError: {'code': -32000, 'message': 'gas required exceeds allowance (11964883) or always failing transaction'}
Mikko Ohtamaa
@miohtama
@mintblock It means there is an exception thrown by Solidity code - most likely require
if there is an error then the all available gas is consumed
El De-dog-lo
@fubuloubu
Is there any plans in v6 to properly implement handling for structs? (perhaps handling them as creating an ad-hoc NamedTuple for output, and then just querying attributes of any given input object)
debugged a pretty insidious issue with the ABI decoder in web3py
Mikko Ohtamaa
@miohtama
@fubuloubu diving in the deep end!
Daniel Tong
@DanielTongAwesome
hi guys ~ just some questions about web3.py. I have a simple test contract, and I want to have a script locally to test out the interaction with smart contract
how do I set up the default account by using the private key
image.png
its pretty simple, but i am new to web3.py
Daniel Tong
@DanielTongAwesome
can someone show me how to link this transact with an account ?
Daniel Tong
@DanielTongAwesome
my assumption is i need to set up eth.defaultAccount = my private key account
how should i do that
Marc Garreau
@marcgarreau
@DanielTongAwesome w3.eth.defaultAccount = w3.eth.accounts[0], for example. its just the public address.
Daniel Tong
@DanielTongAwesome
oh but i am not using ganache
if I want to transact from my test wallet
how should i do that
Marc Garreau
@marcgarreau
Daniel Tong
@DanielTongAwesome
thanks @marcgarreau
Marc Garreau
@marcgarreau
:+1:
Daniel Tong
@DanielTongAwesome
I made a contract transact through web3.py
but I encountered an error
how to findout the reason why I got reverted
17 replies
Daniel Tong
@DanielTongAwesome
etherscan did not show detailed reason why it failed
image.png
Daniel Tong
@DanielTongAwesome
buildTransaction({
'chainId': 3,
'gas': 1000000,
'gasPrice': web3.toWei(30, 'gwei'),
'nonce': nonce,
})
here is how I set my gas and gasprice
Daniel Tong
@DanielTongAwesome
image.png
is that because of the uint256 ? cos I have one require uint 256
and when I call transact, i just put 1 there