Solidity 0.5.0 how to call payable method of another contract

1 answers
1 votes
Solidity 0.5.0 how to call payable method of another contract
asked
hi All

I have 2 Solidity 0.5.0 Contracts. One contract wants to call the payable function in another contract.

Currently I invoke the Payable function as follows:

contract.methods.editDE(name, name, annotations).send({from: this.state.account})
    .on('error',(error) => {
      console.log("error: ", error);
    });

I tried the following which works in remix but not  from the DApp, I get following error:

"Error: [ethjs-rpc] rpc error with payload {"id":7784107239061,"jsonrpc":"2.0","params":["0xf9014e8203a08504a817c800836170d494afc7f2fd99ab5b224bfae0e21cf0c347926f1b4980b8e4296ce3a30000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046564697400000000000000000000000000000000000000000000000000000000822d46a04069c5f15f607372d691f713db55658fff4c90d197ab2a175d27bf4bf6024170a04603dffdc2e3281a0c06ae5e7b0ddaf5e58c1433c25ad9294024e98d23b1c85e"],"method":"eth_sendRawTransaction"} [object Object]"
1
Answer will be added soon.
answered

Answers

Hungry for knowledge?
New guides and courses each week
Looking to invest?
Market data, analysis, and reports
Just curious?
A community of blockchain experts to help

Get started today and earn 4 bonus blocks

Already have an account? Sign In