Beispiel #1
0
        private async Task <Attribute> DeployAttributeAsync()
        {
            Attribute attr = new Attribute()
            {
                Hash        = "I am an attribute hash",
                Location    = "I am an attribute location",
                Description = "attrDescription"
            };

            Attribute deployed = await _attributeFacade.DeployAsync(attr, _accountService.GetAccountAddress());

            return(deployed);
        }
Beispiel #2
0
        public async Task <Attribute> AddAttributeAsync(ID id, Attribute attribute)
        {
            IDControllerService idcService = new IDControllerService(Web3, AccountService.PrivateKey, id.ControllerAddress);

            //If the attribute to be added is not yet deployed, deploy it
            if (attribute.Address == null)
            {
                attribute = await _attributeFacade.DeployAsync(attribute, id.Address);
            }


            await idcService.AddAttributeAsync(attribute.Address);

            return(attribute);
        }