我欲用nervousj调用如下合约中的方法(第一个参数不知如何传)
function create(address[] _owners, uint _required) public returns (address wallet) {
wallet = new MultiSigWallet(_owners, _required);
register(wallet);
}
nervousj 拼接方法名和参数时Java代码如下:
List inputParameters = new ArrayList<>();
List addressList = new ArrayList<>();
Address address1 = new Address(“a8d72d4744120ac28835ae1fc7fb2dfaf1b609ad”);
Address address2 = new Address(“22889780fc0460a374bcae396cad3a3b9afc6d77”);
Address address3 = new Address(“0d63310c98ff839633833c9ed02cf2b70d278691”);
addressList.add(address1);
addressList.add(address2);
addressList.add(address3);
StaticArray staticArray = new StaticArray(addressList);
inputParameters.add(staticArray);
Uint uint = new Uint(BigInteger.valueOf(1));
inputParameters.add(uint);
Function sayHiFunc = new Function(
functionName,
inputParameters,
Arrays.asList(new TypeReference(){}));
String funcCallData = FunctionEncoder.encode(sayHiFunc);
System.out.println("funcCallData = " + funcCallData);
return funcCallData;
Call call = new Call(fromaddress, contractAddress, funcCallData);
AppCall appCall = service.appCall(call, DefaultBlockParameter.valueOf("latest")).send();
String callResult = appCall.getValue();
为题:为什么结果却总是 callResult = 0x ?