public void CallTransfer() { var gmol = new GoodsModel(); var serialNumber = Util.getRandomCode(32); SmartContracts.Call(gmol, "vote", inputQueryTransfer.text, (Util.OnNAS * 0.000001).ToString("F0"), new string[] { "霸王别姬" }, serialNumber); StartCoroutine(TransferStatusCoroutine(serialNumber)); }
public void Switch(Networks network) { if (_smartContract != null) { _smartContract.Dispose(); _smartContract = null; } _smartContract = _smartContractFactory.Build(network); }
public void GetTransactionReceipt() { this.StartCoroutine( SmartContracts.GetTransactionReceipt(inputQueryTransfer.text, (success) => { Debug.Log(success); }, (fail) => { Debug.LogError(fail); })); }
public void QueryTransferStatus() { this.StartCoroutine( SmartContracts.QueryTransferStatus(inputQueryTransfer.text, (success) => { Debug.Log(success); }, (fail) => { Debug.LogError(fail); })); }
public void SimulationCall() { this.StartCoroutine( SmartContracts.SimulationCall("n1NrqHkmuFAHsifysfBh6gombgeg6wJrfnB", "n1j2Q5E9SU1JnpqbyQLVRM8D2jPeefDXKau", "info", null, (success) => { Debug.Log(success); TransferStatusHandler.Invoke(success); }, (fail) => { Debug.LogError(fail); TransferStatusErrorHandler.Invoke(fail); }) ); }
public IEnumerator TransferStatusCoroutine(string serialNumber) { yield return(new WaitForSeconds(1)); yield return(SmartContracts.QueryTransferStatus(serialNumber, (success) => { Debug.Log(success); TransferStatusHandler.Invoke(success); }, (fail) => { Debug.LogError(fail); TransferStatusErrorHandler.Invoke(fail); })); }
private void RemoveSmartContracts() { var assm = Assembly.LoadFrom("SimpleBlockChain.Core.dll"); var path = Path.Combine(Path.GetDirectoryName(assm.Location), string.Format("db_{0}.dat", SmartContracts.GetDirectoryName(_network))); if (!Directory.Exists(path)) { return; } Directory.Delete(path, true); }