Синтаксическая ошибка: super () вне конструктора класса (7: 4)
Я пытаюсь создать интерфейс реакции для d-приложения ethereum, но в данный момент получаю эту ошибку,
любая помощь будет отличной !!
Заранее спасибо.
class App extends Component {
contructor(props) {
super(props);
}
const MyContract = window.web3.eth.contract
([{var reactexampleContract = web3.eth.contract([{"constant":false,"inputs":[],"name":"kill","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getSecret","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"youAwesome","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"}]);
this.state = {
ContractInstance: MyContract.at ('0x77d914f8121dd1a15862e939546d969b2ddd3ee7')
}
this.querySecret = this.querySecret.bind (this);
}
querySecret () {
const { getSecret } = this.state.ContractInstance;
getSecret ((err, secret) => {
if (err) console.error ('An error occured:::::', err);
console.log ('This is our contracts secret', secret);
})