/// <summary> /// withdraw token /// </summary> /// <param name="address"></param> /// <param name="value"></param> /// <returns></returns> private static bool withdrawToken(byte[] zyaddress, byte[] withdrawlAddress, BigInteger value) { if (!Runtime.CheckWitness(zyaddress)) { Error("Authorization_failed"); return(false); } if (!(bool)FIP.KYC("isActiveUser", new object[] { zyaddress })) { Error("In_active_user" + zyaddress.AsString()); return(false); } byte[] id = (byte[])FIP.KYC("getRegisteredAddress", new object[] { withdrawlAddress, ModuleNEP5.Symbol() }); if (id != zyaddress) { Error("Invalid_addresses"); return(false); } return(ModuleNEP5.Transfer(zyaddress, TOK.Owner, value, 0)); }
private static bool IssueByDeposit(byte[] account, BigInteger value) { byte[] address = (byte[])FIP.KYC("getRegisteredAddress", new object[] { account, ModuleNEP5.Symbol() }); return(Issue(address, value)); }