title: How can I query contract info with the latest polkadot-js and substrate contracts node?
body: <p>I've been unable to query my existing contract recently due to <code>Unable to create Enum via index 128, in Alive, Tombstone</code> when using <code>api.query.contracts.contractInfoOf</code>. I get this error both on the command line and in the polkadot-js apps explorer.</p>
  <p>These are the steps I took:</p>
  <ol>
  <li>Deploy a contract with a <code>salt</code></li>
  <li>Retrieve the contract <code>deployedAddress</code></li>
  <li>Use <code>contractInfoOf</code></li>
  <li><code>const contractInfo = await api.query.contracts.contractInfoOf(deployedAddress);</code></li>
  </ol>
  <p>I've tried downgrading <code>ink!</code> to <code>3.0-rc5</code>, <code>3.0-rc4</code>, <code>3.0-rc3</code> and then compiling but it doesn't seem to make any difference. Whenever my contract is built it references <code>rc6</code> at the top:</p>
  <pre><code>{&quot;metadataVersion&quot;:&quot;0.1.0&quot;,&quot;source&quot;:{&quot;hash&quot;:&quot;0x...&quot;,&quot;language&quot;:&quot;ink! 3.0.0-rc6&quot;,&quot;compiler&quot;:&quot;rustc 1.58.0-nightly&quot;,
  </code></pre>
  <p>Which suggests its ignoring my <code>.toml</code> and using <code>rc6</code> to compile the contract.</p>
  <p>I changed my <code>cargo-contract</code> version to <code>0.14</code> but that causes polkadot-js to fail at reading the contract abi.</p>
  <p>I've tried using the <a href="https://github.com/paritytech/substrate-contracts-node" rel="nofollow noreferrer">substrate-contracts-node</a> using the latest commit from master and also using the <code>v0.1.0</code> release. Same error in both cases.</p>
  <pre><code>&gt; rustup info
  
  stable-x86_64-unknown-linux-gnu (default)
  rustc 1.56.1 (59eed8a2a 2021-11-01)
  </code></pre>
  <p>There are more details in an <a href="https://github.com/polkadot-js/api/issues/4151" rel="nofollow noreferrer">issue on polkadot-js</a>.</p>
  <p>Any pointers on how to get a <strong>working setup</strong> would be very helpful!</p>