public Owner GetOwner(string address) { try { string[] arr = Runmethod(address, "getOwner", null, ParseType.Int, ParseType.Int, ParseType.Int, ParseType.Int, ParseType.Slice); if (arr != null && arr.Length >= 5) { string pubKey = arr[0]; ContractState state = (ContractState)int.Parse(arr[1]); int ownerType = int.Parse(arr[2]); ContractType type = (ContractType)int.Parse(arr[3]); string name = RunmethodParser.GetSliceText(arr[4]); return(new Owner(name, pubKey, address, state, type, ownerType)); } } catch (Exception e) { } return(null); }
public string[] Runmethod(string address, string funcName, string arguments, params ParseType[] types) { string data = SendClient("runmethod " + address + " " + funcName + " " + arguments, 200); return(RunmethodParser.Parse(data, types)); }