W
W
Worddoc2019-02-19 20:46:20
JavaScript
Worddoc, 2019-02-19 20:46:20

Web3.js: Why doesn't contract.methods.myMethod work?

Hello! I want to send a transaction to a smart contract using web3. web3 version - 1.0.0

let contract = new icoWeb3.eth.Contract(getABI(), to);

    contract.methods.transfer().send({
        from: from,
        value: value
    });

But the problem is that the method transfer = undefined. Although according to the documentation, the custom method is defined in this way. I've been fighting for an hour now. Help to catch the error, I will be very grateful!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question