Sale.new({ from: state.account, value: value, gas: 4000000 }).then((instance) => {
// do something with instance
}).catch((err) => {
alert(err)
})
When the above code runs I sometimes receive this error: The contract code couldn't be stored, please check your gas amount.
The contract I am trying to create is almost exactly the same as the safe remote payment contract in the solidity docs with maybe just a few more lines.
The weird thing is that the contract actuallygets created and I can see the successful transaction in MetaMask and the Ether is subtracted from my account. I can even then use Sale.at(<new contract address>)
to interact with the created contract. I've been testing in the Ropsten network.