Blockchain 从部署的合同abc调用部署的合同xyz公共应付款函数,并使用hexdata以SOLIDATY形式

Blockchain 从部署的合同abc调用部署的合同xyz公共应付款函数,并使用hexdata以SOLIDATY形式,blockchain,ethereum,solidity,web3,smartcontracts,Blockchain,Ethereum,Solidity,Web3,Smartcontracts,在地址为abc的已部署合同中,我有: function CallContract(address tosend,uint amount,bytes hexdata,uint zgas) public payable { tosend.call.gas(zgas).value(amount)(hexdata); } 在web3中,我有 await AbcContract.methods .

在地址为abc的已部署合同中,我有:

        function CallContract(address tosend,uint amount,bytes hexdata,uint zgas) public payable {
               tosend.call.gas(zgas).value(amount)(hexdata);
        }
在web3中,我有

            await AbcContract.methods
           .CallContract(this.state.tosend,amounttowei,web3.utils.fromAscii(data),gas)
           .send({
             from:accounts[0]
           });
在地址为XYZ的已部署合同中,我有:

               uint public some var;
               uint public another var;

           function DoSomething() public payable {
               uint somevar = 1;
           }

           function DoSomethingAgain(uint justanumber) public payble {
               uint anothervar = justanumber;
           }
我做错了什么?
在etherscan中,我看到“尽管发生了一个或多个错误[汽油耗尽]合同执行已完成”

嗨,jim,您能提供智能合同的完整来源、地址和您已将合同部署到的网络吗?这将大大有助于调试您的问题。如何生成hexdata?使用contract.methods.functionhere().encodeABI();通过web3