Example #1
0
        public static bool Grant(string email, string owner)
        {
            UInt160 scriptHash = UInt160.Parse(plugin_profile.ContractScriptHash);

            byte[] ownerScriptHash = Wallet.ToScriptHash(owner).ToArray();
            return(SmartContractHelper.Exec(plugin_profile.api.CurrentWallet, plugin_profile.api.LocalNode, scriptHash, null, "grant", email, ownerScriptHash, new byte[0]));
        }
Example #2
0
        public static bool Register(string profile, string owner)
        {
            UInt160 scriptHash   = UInt160.Parse(plugin_profile.ContractScriptHash);
            UInt160 ownerAddress = Wallet.ToScriptHash(owner);

            byte[] ownerScriptHash = ownerAddress.ToArray();
            return(SmartContractHelper.Exec(plugin_profile.api.CurrentWallet, plugin_profile.api.LocalNode, scriptHash, ownerAddress, "register", profile, ownerScriptHash));
        }