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

Fails to run on Kovan, Goerli, Mainnet #37

Open
LinuxIsCool opened this issue Nov 20, 2022 · 5 comments
Open

Fails to run on Kovan, Goerli, Mainnet #37

LinuxIsCool opened this issue Nov 20, 2022 · 5 comments

Comments

@LinuxIsCool
Copy link

Kovan is deprecated and no longer supported by infura.

I tried running the following:

python3 samples/poolCreation/poolCreationSample.py samples/poolCreation/sampleLBPool.json

on both mainnet and goerli. I get the following error:

Missing contracts on mainnet: [ChildChainStreamer, ChildChainLiquidityGaugeFactory]

==============================================================

==============================================================
================ Step 1: Check Token Balances ================
==============================================================

Traceback (most recent call last):
  File "/home/ygg/.cache/pypoetry/virtualenvs/balpy-yyw1STJO-py3.10/lib/python3.10/site-packages/web3/contract.py", line 1507, in call_contract_function
    output_data = web3.codec.decode_abi(output_types, return_data)
  File "/home/ygg/.cache/pypoetry/virtualenvs/balpy-yyw1STJO-py3.10/lib/python3.10/site-packages/eth_abi/codec.py", line 181, in decode_abi
    return decoder(stream)
  File "/home/ygg/.cache/pypoetry/virtualenvs/balpy-yyw1STJO-py3.10/lib/python3.10/site-packages/eth_abi/decoding.py", line 127, in __call__
    return self.decode(stream)
  File "/home/ygg/.cache/pypoetry/virtualenvs/balpy-yyw1STJO-py3.10/lib/python3.10/site-packages/eth_utils/functional.py", line 45, in inner
    return callback(fn(*args, **kwargs))
  File "/home/ygg/.cache/pypoetry/virtualenvs/balpy-yyw1STJO-py3.10/lib/python3.10/site-packages/eth_abi/decoding.py", line 173, in decode
    yield decoder(stream)
  File "/home/ygg/.cache/pypoetry/virtualenvs/balpy-yyw1STJO-py3.10/lib/python3.10/site-packages/eth_abi/decoding.py", line 127, in __call__
    return self.decode(stream)
  File "/home/ygg/.cache/pypoetry/virtualenvs/balpy-yyw1STJO-py3.10/lib/python3.10/site-packages/eth_abi/decoding.py", line 198, in decode
    raw_data = self.read_data_from_stream(stream)
  File "/home/ygg/.cache/pypoetry/virtualenvs/balpy-yyw1STJO-py3.10/lib/python3.10/site-packages/eth_abi/decoding.py", line 305, in read_data_from_stream
    raise InsufficientDataBytes(
eth_abi.exceptions.InsufficientDataBytes: Tried to read 32 bytes.  Only got 0 bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/ygg/Workspace/Forks/balpy/samples/poolCreation/poolCreationSample.py", line 112, in <module>
    main();
  File "/home/ygg/Workspace/Forks/balpy/samples/poolCreation/poolCreationSample.py", line 39, in main
    if not bal.erc20HasSufficientBalances(tokens, initialBalances):
  File "/home/ygg/Workspace/Forks/balpy/balpy/balpy.py", line 618, in erc20HasSufficientBalances
    currentHasSufficientBalance = self.erc20HasSufficientBalance(token, amount);
  File "/home/ygg/Workspace/Forks/balpy/balpy/balpy.py", line 595, in erc20HasSufficientBalance
    balance = self.erc20GetBalanceStandard(tokenAddress);
  File "/home/ygg/Workspace/Forks/balpy/balpy/balpy.py", line 564, in erc20GetBalanceStandard
    decimals = self.erc20GetDecimals(tokenAddress);
  File "/home/ygg/Workspace/Forks/balpy/balpy/balpy.py", line 557, in erc20GetDecimals
    decimals = token.functions.decimals().call();
  File "/home/ygg/.cache/pypoetry/virtualenvs/balpy-yyw1STJO-py3.10/lib/python3.10/site-packages/web3/contract.py", line 954, in call
    return call_contract_function(
  File "/home/ygg/.cache/pypoetry/virtualenvs/balpy-yyw1STJO-py3.10/lib/python3.10/site-packages/web3/contract.py", line 1528, in call_contract_function
    raise BadFunctionCallOutput(msg) from e
web3.exceptions.BadFunctionCallOutput: Could not transact with/call contract function, is contract deployed correctly and chain synced?
@gerrrg
Copy link
Collaborator

gerrrg commented Nov 21, 2022

A number of samples still pointing to kovan is a known issue, just haven't had the time to address it

What exactly are you passing as your sampleLBPool.json to get these errors?

@LinuxIsCool
Copy link
Author

This:

https://github.com/balancer-labs/balpy/blob/22d0c65749beb664b4afd572e7d4ffa334de7157/samples/poolCreation/sampleLBPool.json

I see that you edited that file in the following commit. Maybe I should pull and try again.

@LinuxIsCool
Copy link
Author

What's the solution for moving beyond Kovan? Point everything to Goerli? Would that work?

@gerrrg
Copy link
Collaborator

gerrrg commented Nov 22, 2022

you said you were trying to launch a pool on Goerli, but that's a kovan sample file. What file were you using to deploy a pool on Goerli?

The solution for moving beyond Kovan is to move everything to Goerli, yeah.

@LinuxIsCool
Copy link
Author

Yes sorry, I made one change to that file which was changing the network to Goerli.

Thanks for clarifying the Goerli migration. An easy contribution to the repo.

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

No branches or pull requests

2 participants