Ejemplo n.º 1
0
        public async Task <string> DeployTokenRewarderContract(string tokenContractAddress, string rewarderName)
        {
            TokenRewarder tokenRewarder = new TokenRewarder(this.HttpRPCEndpoint, this.account);

            try
            {
                var txReciept = await tokenRewarder.DeployContractAsync(rewarderName, tokenContractAddress);

                return(txReciept.ContractAddress);
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        public async Task <bool> SendRewardTokenAsync(string contractAddress, string recipientAddress, BigInteger amount)
        {
            TokenRewarder tokenRewarder = new TokenRewarder(this.HttpRPCEndpoint, this.account);

            try
            {
                var txReceipt = await tokenRewarder.SendRewardTokenAsync(contractAddress, recipientAddress, amount);

                //add indexer log


                return(true);
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 3
0
        public async Task <TokenRewarder.SCInfo> GetSCInfoAsync(string tokenContractAddress)
        {
            TokenRewarder tokenRewarder = new TokenRewarder(this.HttpRPCEndpoint, this.account);

            return(await tokenRewarder.GetContractInformation(tokenContractAddress));
        }