title: *** web3.exceptions.BadFunctionCallOutput: Could not transact with/call contract function, is contract deployed correctly and chain synced?
body: <p>I running ganache on my local and deployed my contract to it using <code>brownie console</code></p>
  <pre class="lang-sh prettyprint-override"><code>❯ brownie console
  Brownie v1.17.1 - Python development framework for Ethereum
  
  BeautyEthereumProject is the active project.
  Brownie environment is ready.
  &gt;&gt;&gt; ERC721
  [&lt;ERC721 Contract '0x6c83A98d16A80B1f88404563DBD5e57f5C7C7266'&gt;]
  </code></pre>
  <p>In the <code>web3</code> <a href="https://web3py.readthedocs.io/en/stable/examples.html#working-with-contracts" rel="nofollow noreferrer">doc</a> I have to provide contract address and contract abi.</p>
  <p>I know contract address because I took note.</p>
  <pre class="lang-sh prettyprint-override"><code>Transaction sent: 0x25a1576a66dd33135928c2d91b2f7cd6612c2cd4e70e44b831599cbb6b8c9705
    Gas price: 20.0 gwei   Gas limit: 620775   Nonce: 0
    ERC721.constructor confirmed   Block: 1   Gas used: 564341 (90.91%)
    ERC721 deployed at: 0x6c83A98d16A80B1f88404563DBD5e57f5C7C7266
  
  &lt;ERC721 Contract '0x6c83A98d16A80B1f88404563DBD5e57f5C7C7266'&gt;
  </code></pre>
  <p>Get ABI
  <code>vyper -f abi filename.vy</code> <a href="https://vyper.readthedocs.io/en/stable/deploying-contracts.html?highlight=abi#deploying-a-contract" rel="nofollow noreferrer">doc</a></p>
  <p><code>main.py</code></p>
  <pre class="lang-py prettyprint-override"><code>from web3 import Web3, HTTPProvider
  
  human_0 = '0x6A48A50A53462A22D2c30F5138c4970a3020b30a'
  human_address_1 = &quot;0x92e320aE601BC8235D605d38D03142C3FE28Ba92&quot;
  
  def main():
      w3 = Web3(HTTPProvider('http://localhost:8545'))  # web3 must be called locally
      assert True is w3.isConnected()
      print('Network connected')
      address = &quot;0x6c83A98d16A80B1f88404563DBD5e57f5C7C7266&quot;
      # To get ABI
      # vyper -f abi contracts/ERC721.vy
      abi = '[{&quot;name&quot;: &quot;Transfer&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;sender&quot;, &quot;type&quot;: &quot;address&quot;, &quot;indexed&quot;: true}, {&quot;name&quot;: &quot;receiver&quot;, &quot;type&quot;: &quot;address&quot;, &quot;indexed&quot;: true}, {&quot;name&quot;: &quot;tokenId&quot;, &quot;type&quot;: &quot;uint256&quot;, &quot;indexed&quot;: true}], &quot;anonymous&quot;: false, &quot;type&quot;: &quot;event&quot;}, {&quot;name&quot;: &quot;Approval&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;owner&quot;, &quot;type&quot;: &quot;address&quot;, &quot;indexed&quot;: true}, {&quot;name&quot;: &quot;approved&quot;, &quot;type&quot;: &quot;address&quot;, &quot;indexed&quot;: true}, {&quot;name&quot;: &quot;tokenId&quot;, &quot;type&quot;: &quot;uint256&quot;, &quot;indexed&quot;: true}], &quot;anonymous&quot;: false, &quot;type&quot;: &quot;event&quot;}, {&quot;name&quot;: &quot;ApprovalForAll&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;owner&quot;, &quot;type&quot;: &quot;address&quot;, &quot;indexed&quot;: true}, {&quot;name&quot;: &quot;operator&quot;, &quot;type&quot;: &quot;address&quot;, &quot;indexed&quot;: true}, {&quot;name&quot;: &quot;approved&quot;, &quot;type&quot;: &quot;bool&quot;, &quot;indexed&quot;: false}], &quot;anonymous&quot;: false, &quot;type&quot;: &quot;event&quot;}, {&quot;stateMutability&quot;: &quot;nonpayable&quot;, &quot;type&quot;: &quot;constructor&quot;, &quot;inputs&quot;: [], &quot;outputs&quot;: []}, {&quot;stateMutability&quot;: &quot;view&quot;, &quot;type&quot;: &quot;function&quot;, &quot;name&quot;: &quot;supportsInterface&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;_interfaceID&quot;, &quot;type&quot;: &quot;bytes32&quot;}], &quot;outputs&quot;: [{&quot;name&quot;: &quot;&quot;, &quot;type&quot;: &quot;bool&quot;}], &quot;gas&quot;: 2641}, {&quot;stateMutability&quot;: &quot;view&quot;, &quot;type&quot;: &quot;function&quot;, &quot;name&quot;: &quot;balanceOf&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;_owner&quot;, &quot;type&quot;: &quot;address&quot;}], &quot;outputs&quot;: [{&quot;name&quot;: &quot;&quot;, &quot;type&quot;: &quot;uint256&quot;}], &quot;gas&quot;: 2925}, {&quot;stateMutability&quot;: &quot;view&quot;, &quot;type&quot;: &quot;function&quot;, &quot;name&quot;: &quot;ownerOf&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;_tokenId&quot;, &quot;type&quot;: &quot;uint256&quot;}], &quot;outputs&quot;: [{&quot;name&quot;: &quot;&quot;, &quot;type&quot;: &quot;address&quot;}], &quot;gas&quot;: 2813}, {&quot;stateMutability&quot;: &quot;view&quot;, &quot;type&quot;: &quot;function&quot;, &quot;name&quot;: &quot;getApproved&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;_tokenId&quot;, &quot;type&quot;: &quot;uint256&quot;}], &quot;outputs&quot;: [{&quot;name&quot;: &quot;&quot;, &quot;type&quot;: &quot;address&quot;}], &quot;gas&quot;: 5040}, {&quot;stateMutability&quot;: &quot;view&quot;, &quot;type&quot;: &quot;function&quot;, &quot;name&quot;: &quot;isApprovedForAll&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;_owner&quot;, &quot;type&quot;: &quot;address&quot;}, {&quot;name&quot;: &quot;_operator&quot;, &quot;type&quot;: &quot;address&quot;}], &quot;outputs&quot;: [{&quot;name&quot;: &quot;&quot;, &quot;type&quot;: &quot;bool&quot;}], &quot;gas&quot;: 3190}, {&quot;stateMutability&quot;: &quot;nonpayable&quot;, &quot;type&quot;: &quot;function&quot;, &quot;name&quot;: &quot;transferFrom&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;_from&quot;, &quot;type&quot;: &quot;address&quot;}, {&quot;name&quot;: &quot;_to&quot;, &quot;type&quot;: &quot;address&quot;}, {&quot;name&quot;: &quot;_tokenId&quot;, &quot;type&quot;: &quot;uint256&quot;}], &quot;outputs&quot;: [], &quot;gas&quot;: 173314}, {&quot;stateMutability&quot;: &quot;nonpayable&quot;, &quot;type&quot;: &quot;function&quot;, &quot;name&quot;: &quot;safeTransferFrom&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;_from&quot;, &quot;type&quot;: &quot;address&quot;}, {&quot;name&quot;: &quot;_to&quot;, &quot;type&quot;: &quot;address&quot;}, {&quot;name&quot;: &quot;_tokenId&quot;, &quot;type&quot;: &quot;uint256&quot;}], &quot;outputs&quot;: [], &quot;gas&quot;: 190624}, {&quot;stateMutability&quot;: &quot;nonpayable&quot;, &quot;type&quot;: &quot;function&quot;, &quot;name&quot;: &quot;safeTransferFrom&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;_from&quot;, &quot;type&quot;: &quot;address&quot;}, {&quot;name&quot;: &quot;_to&quot;, &quot;type&quot;: &quot;address&quot;}, {&quot;name&quot;: &quot;_tokenId&quot;, &quot;type&quot;: &quot;uint256&quot;}, {&quot;name&quot;: &quot;_data&quot;, &quot;type&quot;: &quot;bytes&quot;}], &quot;outputs&quot;: [], &quot;gas&quot;: 190624}, {&quot;stateMutability&quot;: &quot;nonpayable&quot;, &quot;type&quot;: &quot;function&quot;, &quot;name&quot;: &quot;approve&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;_approved&quot;, &quot;type&quot;: &quot;address&quot;}, {&quot;name&quot;: &quot;_tokenId&quot;, &quot;type&quot;: &quot;uint256&quot;}], &quot;outputs&quot;: [], &quot;gas&quot;: 46741}, {&quot;stateMutability&quot;: &quot;nonpayable&quot;, &quot;type&quot;: &quot;function&quot;, &quot;name&quot;: &quot;setApprovalForAll&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;_operator&quot;, &quot;type&quot;: &quot;address&quot;}, {&quot;name&quot;: &quot;_approved&quot;, &quot;type&quot;: &quot;bool&quot;}], &quot;outputs&quot;: [], &quot;gas&quot;: 39516}, {&quot;stateMutability&quot;: &quot;nonpayable&quot;, &quot;type&quot;: &quot;function&quot;, &quot;name&quot;: &quot;mint&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;_to&quot;, &quot;type&quot;: &quot;address&quot;}, {&quot;name&quot;: &quot;_tokenId&quot;, &quot;type&quot;: &quot;uint256&quot;}], &quot;outputs&quot;: [{&quot;name&quot;: &quot;&quot;, &quot;type&quot;: &quot;bool&quot;}], &quot;gas&quot;: 82269}, {&quot;stateMutability&quot;: &quot;nonpayable&quot;, &quot;type&quot;: &quot;function&quot;, &quot;name&quot;: &quot;burn&quot;, &quot;inputs&quot;: [{&quot;name&quot;: &quot;_tokenId&quot;, &quot;type&quot;: &quot;uint256&quot;}], &quot;outputs&quot;: [], &quot;gas&quot;: 99632}]'
      contract_instance = w3.eth.contract(address=address, abi=abi)
      # Both raise error
      balance = contract_instance.functions.balanceOf(human_0).call()
      result = contract_instance.functions.mint(human_address_1, 111).call()
  
  </code></pre>
  <p>This function call
  <code>contract.functions.method.call()</code> To run contract <a href="https://web3py.readthedocs.io/en/stable/examples.html#working-with-contracts" rel="nofollow noreferrer">doc</a></p>
  <p>I got error</p>
  <pre><code>*** web3.exceptions.BadFunctionCallOutput: Could not transact with/call contract function, is contract deployed correctly and chain synced?
  </code></pre>
  <p><strong>Question:</strong><br>
  How to use web3 python calling existing method?</p>