How can I use SQL data and smart contracts together? - sql

I want to write a smart contract on Solidity for a product tracking DApp. But all the data will come from SQL Server. So my question is how can I send these data to my smart contract?
Should I write an API in Node.js or another languages? Is there any other alternatives that you can suggest?

Related

How to get bitcoin balance in smart contract

I am making a smart contract and want to know the bitcoin balance of a metamask address.How can I do this? Since BTC is not ERC-20.
Have you considered using a block explorer (something like blockstream.info)
All you need to know is the address you want to query.
I assume want to do automate this, and in this case you can search for an api - http://blockchain.info/api
You will have to implement the API, but that's the only way as far as I know from a smart contract running on Etherium.

Automate sending info to the blockchain once an specific number of entries is reached?

It's a music website, the idea is to record on the blockchain every time a song is played.
Since we don't want to force users to install metamask so they can sign transactions, the idea is to store in an array, so that the smart contract sends it to the blockchain every 100 plays for example.
What's the best way to achieve this?
Please explain better, what technology do you use for your website? .net asp?
when you say "send to the blockchain" do you mean to a smart contract?
and an array of what do you want to send?
If you want to send something from a website to a smart contract on the blockchain you can use Nethereum thru .net asp.
Shouldn't be hard to write a c# code to send something every X times.
Just remember that storing new data on the blockchain cost gas (money).

how to access external data sources such as MySQL instead of webpages?

I am a novice at Etheuerm. I want to know how to access external data sources such as MySQL or excel through chainlink instead of webpages
33sir
Welcome to the amazing Ethereum world :)
Chainlink is a flexible framework that can retrieve data from any API and connect with existing systems.
I like the examples that the Chainlink website present when you scroll down, how to get weather data or sports data, for example. It is connecting with API in the external world.
So in you case, you need to create an API to connect with your data sources, like MySQL or excel.
Here you can get more info how to call any external API
It is not necessary a webpage, but you will make a GET request to a service that you will create.

Difference between Ethereum Web APIs and Ethereum API as a service

I am approaching ethereum for the first time and I am reading the documentation. Can anyone explain the difference between Ethereum Web APIs (BlockCypher) and The Ethereum API as a service (infura)? https://ethereum.org/en/developers/docs/apis/backend/#available-libraries
There is no real difference. BlockCypher and Infura are just 3rd party companies which have created their own set of api endpoints which control access to the ethereum json rpc api.
The best thing to do would be to check the documentation of each one to ensure they are capable of what you aim to use it for.
You may find one api has more features than the other.
What exactly do you need it for?

Bitcoin Api (only found 1)

I need to use a bitcoin api, and only have found CoinBox. The problem is that coinbox is limited to only a few sites and isnt open to everyone so I cant use it. Are there any good alternatives to coinbox.me? Thanks.
There are actually quite a few apis. First there is coinbase which is my favorite since they pay the transaction fees for transactions over 0.001 BTC and all internal transactions are absolutely free (and instant). You can see their api. (https://coinbase.com/docs/api/overview). What they lack is that it is hard to grab the TX id's and any other specific information. There is also blockchain.info which is the most feature full, but the downside is that you have to pay all of the fees and it can get to be very expensive. You can see the api. (https://blockchain.info/api). There are a lot more but the problem is that they are very buggy. I hope this helps!
It is not necessary to use web wallets to create addresses. You can install your own bitcoin server/daemon and act like your own bank.
This is the place to start if you want to know how to do it (https://en.bitcoin.it/wiki/Main_Page).
Bitcoin can be queried using JSON RPC methods. So if you are running a bitcoin daemon locally you can just query them. The documentation for the same is located at
Running Bitcoin - https://en.bitcoin.it/wiki/Running_Bitcoin
API Reference - https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)
API Call List - https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list
Hope this helps.