patractlabs / redspot

Redspot is an Substrate pallet-contracts (ink!) development environment. Compile your contracts and run them on a different networks. Redspot's core forks from Hardhat but changed a lot to suit substrate.
https://redspot.patract.io/
Other
67 stars 22 forks source link

Contract deployment fails when compile contracts with ink! 3.0.0-rc6 #150

Closed sventime closed 2 years ago

sventime commented 2 years ago

Redspot Version

0.12.3-0

ink! version

3.0.0-rc6

Description

Right now contract deployment fails with error:

 TypeError: Cannot read property 'contract' of undefined
      at ContractFactory.instantiateWithCode (node_modules/@redspot/patract/contractFactory.js:164:51)
      at ContractFactory.deploy (node_modules/@redspot/patract/contractFactory.js:246:90)
      at /Users/sven/projects/redspot/examples/erc20/tests/erc20.test.ts:19:44
      at step (tests/erc20.test.ts:33:23)
      at Object.next (tests/erc20.test.ts:14:53)
      at fulfilled (tests/erc20.test.ts:5:58)

When I'm changing the specified line in compiled js to const contractName = this.abi.info.contract.name;, it works and unblocks deployment, but I guess it requires more appropriate fix, as ink! changed a little metadata generation.

atenjin commented 2 years ago

ink-rc6 is not compatible with the current version of polkadot.js used by redspot. polkadot.js just catchs up with this changes recently, we will update it soon. and after that, you can update redspot version to use for 3.0.0-rc6

ii-ii-ii commented 2 years ago

@sventime redspot redspot v0.13.1 has been updated and now supports ink rc6. If you encounter problems, please check if your configuration is the same as the template. https://github.com/patractlabs/redspot-template/tree/master/packages/erc20