public static string EmailVerifyResponseUrl() { UInt160 scriptHash = UInt160.Parse(plugin_profile.ContractScriptHash); ApplicationEngine engine = SmartContractHelper.LocalExec(scriptHash, "emailVerifyRespUrl"); return(System.Text.Encoding.UTF8.GetString(engine.EvaluationStack.Peek().GetByteArray())); }
public static byte[] ContractOwnerPublicKey() { UInt160 scriptHash = UInt160.Parse(plugin_profile.ContractScriptHash); ApplicationEngine engine = SmartContractHelper.LocalExec(scriptHash, "contractOwner"); return(engine.EvaluationStack.Peek().GetByteArray()); }
public static JObject Query(string email) { UInt160 scriptHash = UInt160.Parse(plugin_profile.ContractScriptHash); ApplicationEngine engine = SmartContractHelper.LocalExec(scriptHash, "query", email); string result = System.Text.Encoding.UTF8.GetString(engine.EvaluationStack.Peek().GetByteArray()); return(ParseProfile(result)); }
public static JObject QueryByAccount(string owner) { UInt160 scriptHash = UInt160.Parse(plugin_profile.ContractScriptHash); byte[] ownerScriptHash = Wallet.ToScriptHash(owner).ToArray(); ApplicationEngine engine = SmartContractHelper.LocalExec(scriptHash, "queryByAccount", ownerScriptHash); string result = System.Text.Encoding.UTF8.GetString(engine.EvaluationStack.Peek().GetByteArray()); return(ParseProfile(result)); }
public static string QueryOwner(string email) { UInt160 scriptHash = UInt160.Parse(plugin_profile.ContractScriptHash); ApplicationEngine engine = SmartContractHelper.LocalExec(scriptHash, "queryOwner", email); byte[] owner = engine.EvaluationStack.Peek().GetByteArray(); try { UInt160 ownerScriptHash = new UInt160(owner); return(Wallet.ToAddress(ownerScriptHash)); } catch (Exception) { return(""); } }