原因
- Web3.jsのバージョンとコードの記法が異なる。
対策
1.0.x を利用している場合は↓のように記載することで解決。
const myContract = new web3.eth.Contract(JSON.parse(myContractABI), myContractAddress);
元のコード
const myContract = web3.eth.contract(JSON.parse(myContractABI)).at(myContractAddress);
エラー内容
TypeError: web3.eth.contract is not a function
以下のようなエラーも同様
TypeError: Cannot read property 'sendTransaction' of undefined
TypeError: (intermediate value).at is not a function