Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 19:23
    tmckenzie51 synchronize #1757
  • 16:41
    tmckenzie51 edited #1757
  • 16:39
    tmckenzie51 edited #1757
  • 16:38
    tmckenzie51 opened #1757
  • 16:03
    kclowes closed #1568
  • 16:03
    kclowes commented #1568
  • 15:56
    tmckenzie51 commented #1745
  • Sep 30 16:55
    kclowes commented #1416
  • Sep 30 16:55
    kclowes commented #1596
  • Sep 30 16:41
    pipermerriam commented #1596
  • Sep 30 15:55
    kclowes commented #1596
  • Sep 30 15:54
    kclowes commented #1416
  • Sep 30 15:15
    kclowes closed #1756
  • Sep 30 15:15
    kclowes commented #1756
  • Sep 30 13:05
    cducrest commented #1596
  • Sep 30 13:04
    cducrest commented #1596
  • Sep 29 21:40
    liquid-8 opened #1756
  • Sep 29 11:23
    fiedersz commented #567
  • Sep 28 22:05
    kclowes opened #1755
  • Sep 28 21:34
    pipermerriam commented #1556
Crypto Gnome
@CryptoGnome
also it's weird because if i just put in 1 there it works, but i don't have enough eth in my wallet
uniswap.uniswap.InsufficientBalance: Insufficient balance. Had 5626200000000000, needed 100000000000000000
    def buy(self, pair):
        print("BUYING PAIR")
        tradeamount = client.toWei(settings.amount, 'ETHER')
        data = [
            settings.eth[0],
            settings.chart[0],
            tradeamount,
            settings.address
        ]
        print(data)
        trade = uniswap_wrapper.make_trade(settings.eth[0], settings.chart[0], tradeamount, settings.address)
Marc Garreau
@marcgarreau
if this is the library you’re using, their examples include *10**18
Crypto Gnome
@CryptoGnome
@marcgarreau appreciate the help by the way, it is very tough to find coders using python
yes it is
Marc Garreau
@marcgarreau
we’re working to grow that number ;)
anyway, your first issue is “resolved”. on to the next one
Crypto Gnome
@CryptoGnome
hoild that thought haha
Marc Garreau
@marcgarreau
100000000000000000 wei == .1 ether; your wallet apparently has less
Crypto Gnome
@CryptoGnome
image.png
hmmm when i try weth it fails
OverflowError: Python int too large to convert to C ssize_t
Marc Garreau
@marcgarreau
indeed the .0056 eth corresponds with the earlier error, displayed in wei. that ssize_t error could be a bug in web3, though. reproduction code and any other context would be helpful (less likely to get lost in the shuffle if its in an issue. you can tack it on to this issue, if you like: ethereum/web3.py#1699)
Crypto Gnome
@CryptoGnome
aha perhaps it is just with that pair?
this has been killing me because I was reading docs/examples and have not been able to get it figured out
Marc Garreau
@marcgarreau

aha perhaps it is just with that pair?

not sure, but if you’re able to test other pairs, that additional context would only be helpful. if not, no big deal.

Crypto Gnome
@CryptoGnome
yea it happened when i built my own wrapper the first time
welp that worked
weird so its an issue with Wrapped Eth in the package maybee
Marc Garreau
@marcgarreau
/shrug file an issue (or add to that open one) if you want us to take a deeper look when time permits
kclowes
@kclowes
@CryptoGnome what were the args you passed when it worked?
Crypto Gnome
@CryptoGnome
        tradeamount = client.toWei(settings.amount, 'ETHER')
        data = [
            settings.eth[0],
            settings.chart[0],
            tradeamount,
            settings.address
        ]
```
kclowes
@kclowes
gotcha. wasn't looking close enough. thanks, that helps!
Crypto Gnome
@CryptoGnome
is there a simple way to get the balance of an ERC20 ?
Crypto Gnome
@CryptoGnome
thanks came up with this
    def check_balance(self, pair):
        address = pair[0]
        abi = requests.get("http://api.etherscan.io/api?module=contract&action=getabi&address=" + address + "&format=raw&apikey=" + settings.etherscanApi).json()
        balanceContract = client.eth.contract(address=address, abi=abi)
        balance = balanceContract.functions.balanceOf(settings.address).call()
        print(balance)
Crypto Gnome
@CryptoGnome
you guys rock thank you so much for the help
Marc Garreau
@marcgarreau
:metal: good luck out there!
Crypto Gnome
@CryptoGnome
thank you, trying to find out how to grab you default wallet address as well
so instead of declaring it it would use what you authenticate with
arjuna sky kok
@arjunaskykok_gitlab

By the way, I got stuck when creating tests that involved with sending ethers. I used eth-tester. Sending ethers in EthereumTesterProvider does not update the balance of the accounts. Any idea? I have created a bug. ethereum/eth-tester#193

Okay, I decided to use Ganache CLI to complement eth-tester so I can test the balance of the accounts. https://mamba.black/documentation/testing-ganache-cli/

arjuna sky kok
@arjunaskykok_gitlab

By the way, I got stuck when creating tests that involved with sending ethers. I used eth-tester. Sending ethers in EthereumTesterProvider does not update the balance of the accounts. Any idea? I have created a bug. ethereum/eth-tester#193

Okay, It's me who is wrong. eth-tester is innocent. It works fine and can update the balance of the accounts.
The problem is I treat web3 object as singleton.

w3_1st = Web3(Web3.HTTPProvider('http://127.0.0.1:8545'))
w3_2nd = Web3(Web3.HTTPProvider('http://127.0.0.1:8545'))

We can interact with both objects as if they are the same. But not with EthereumTesterProvider.

w3_1st = Web3(EthereumTesterProvider())
w3_2nd = Web3(EthereumTesterProvider())

w3_1st has a different world than w3_2nd has. Haha. I'm a turkey.

Mikko Ohtamaa
@miohtama
@arjunaskykok_gitlab How is the life of a bird? :)
arjuna sky kok
@arjunaskykok_gitlab
Waiting to be slaughtered.
Eth-Gitter-Bridge
@Eth-Gitter-Bridge
<Piper Merriam> 🦃
<Piper Merriam> I'd be careful thinking about Web3 as any kind of singleton in any kind of context. There will be a lot of foot-gun situations if you write code with this assumption. For example, even in the HTTPProvider situation you outline, if you were to install a middleware on one of them, or set a default from account, then the two would behave differently. Web3 objects are stateful and should be treated as such.
arjuna sky kok
@arjunaskykok_gitlab
EthereumTesterProvider(): w3.testing.snapshot() -> 0
Ganache CLI: w3.testing.snapshot() -> 1
Any idea why? I mean, I can check if EthereumTesterProvider do this else if Ganache CLI do that. I'm just curious.
Marwan Osama
@MarwanOsama97_gitlab
I got this error while trying to access a function of deployed function using ropston test
web3.exceptions.BadFunctionCallOutput: Could not transact with/call contract function, is contract deployed correctly and chain synced?
I am check the same function from remix it's working so good
Fabrice Cheng
@fabdarice

Hello everyone,
Running a geth node with --ws.api "eth,net,web3,txpool" and --http.api "eth,net,web3,txpool".

This command works fine: w3.geth.txpool.inspect()
But this one timeout, any idea?

w3.geth.txpool.content()
*** concurrent.futures._base.TimeoutError
There's an existing github issue: ethereum/web3.py#1556
kimmoonseok
@kimmoonseok
image.png
hello everyone,
my private ethereum network is hacked.
Have you ever had this experience?
arjuna sky kok
@arjunaskykok_gitlab
So in my Twitter feeds, people have gone nuts over NFTs after yield farming craziness. Here is the tutorial on creating NFTs (ERC721 tokens) with Vyper and Web3.py: https://mamba.black/documentation/creating-erc721-tokens-or-non-fungible-tokens-nft-vyper-and-web3py-part-1/
Btw, I encountered some bugs with eth-tester. Lemme share it later.
arjuna sky kok
@arjunaskykok_gitlab
This is the bug with eth-tester: ethereum/eth-tester#198 @pipermerriam
It's related with the previous bug I reported: ethereum/eth-tester#193
Just some guy
@fubuloubu

So in my Twitter feeds, people have gone nuts over NFTs after yield farming craziness. Here is the tutorial on creating NFTs (ERC721 tokens) with Vyper and Web3.py: https://mamba.black/documentation/creating-erc721-tokens-or-non-fungible-tokens-nft-vyper-and-web3py-part-1/

awesome!