Ejemplo n.º 1
0
        // 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();
        }
Ejemplo n.º 2
0
 public TablesController(BlockchainToBDService service)
 {
     _service = service;
 }
Ejemplo n.º 3
0
 public DatabaseController(BlockchainToBDService service)
 {
     Service = service;
 }
Ejemplo n.º 4
0
		public DataController(BlockchainToBDService service)
		{
			_service = service;
		}
 public AttributesController(BlockchainToBDService service)
 {
     Service = service;
 }