Navigation
Solidity 0.5.0 how to call payable function from another contract
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 from calling contract as follows:
function editContract(string memory _name, string memory _comments) public payable{
EditableContract de = EditableContract(dataEntities[_name]);
de.editDE(_comments);
emit Edited(_name, _comments, msg.sender);
}I tried the Contracts in remix it works, 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]”
Answers
Get started today
Already have an account? Sign In