// This method gets called by the runtime. Use this method to add services to the container. public async void ConfigureServices(IServiceCollection services) { var account = new Account(Configuration.GetValue <string>("Ethereum:private")); var web3 = new Web3(account, Configuration.GetValue <string>("Ethereum:url")); var deploymentMessage = new BlockchainToBDDeployment(); var deploymentHandler = web3.Eth.GetContractDeploymentHandler <BlockchainToBDDeployment>(); var transactionReceipt = await deploymentHandler.SendRequestAndWaitForReceiptAsync(deploymentMessage); var contractAddress = transactionReceipt.ContractAddress; blockchainService = new BlockchainToBDService(web3, contractAddress); _ = new EventPool(web3); services.AddControllers(); }
public TablesController(BlockchainToBDService service) { _service = service; }
public DatabaseController(BlockchainToBDService service) { Service = service; }
public DataController(BlockchainToBDService service) { _service = service; }
public AttributesController(BlockchainToBDService service) { Service = service; }