public Nethereum.Contracts.Contract GetContract(WonkaBre.RuleTree.WonkaBreSource TargetSource)
        {
            var web3     = GetWeb3();
            var contract = web3.Eth.GetContract(TargetSource.ContractABI, TargetSource.ContractAddress);

            return(contract);
        }
Exemple #2
0
        public Nethereum.Contracts.Contract GetContract(WonkaBre.RuleTree.WonkaBreSource TargetSource)
        {
            var account  = new Account(TargetSource.Password);
            var web3     = new Nethereum.Web3.Web3(account);
            var contract = web3.Eth.GetContract(TargetSource.ContractABI, TargetSource.ContractAddress);

            return(contract);
        }
        public string RetrieveValueMethod(WonkaBre.RuleTree.WonkaBreSource poTargetSource, string psAttrName)
        {
            WonkaRefEnvironment WkaRefEnv = WonkaRefEnvironment.GetInstance();

            WonkaRefAttr TargetAttr = WkaRefEnv.GetAttributeByAttrName(psAttrName);

            return(moProduct.GetAttributeValue(TargetAttr));
        }
Exemple #4
0
        public string RetrieveValueMethod(WonkaBre.RuleTree.WonkaBreSource poTargetSource, string psAttrName)
        {
            var contract = GetContract(poTargetSource);

            var getRecordValueFunction = contract.GetFunction(poTargetSource.MethodName);

            var result = getRecordValueFunction.CallAsync <string>(psAttrName).Result;

            return(result);
        }
        public async Task <string> RetrieveValueMethodAsync(WonkaBre.RuleTree.WonkaBreSource poTargetSource, string psAttrName)
        {
            var contract = GetContract(poTargetSource);

            var getRecordValueFunction = contract.GetFunction(poTargetSource.MethodName);

            var result =
                await getRecordValueFunction.CallAsync <string>(psAttrName).ConfigureAwait(false);

            return(result);
        }
Exemple #6
0
        public Nethereum.Contracts.Contract GetContract(WonkaBre.RuleTree.WonkaBreSource TargetSource)
        {
            var account = new Account(TargetSource.Password);

            Nethereum.Web3.Web3 web3 = null;
            if ((moOrchInitData != null) && !String.IsNullOrEmpty(moOrchInitData.Web3HttpUrl))
            {
                web3 = new Nethereum.Web3.Web3(account, moOrchInitData.Web3HttpUrl);
            }
            else
            {
                web3 = new Nethereum.Web3.Web3(account);
            }

            var contract = web3.Eth.GetContract(TargetSource.ContractABI, TargetSource.ContractAddress);

            return(contract);
        }