I need to add integration of Ethereum charging to my project.
I've done that with Bitcoin. It was easy. I just create a new receiver address for each payment, but it doesn't work with Ethereum.
Had somebody done that before?
Related
I'm trying to learn how to mint NFT's in an economic way. I have some experience with smart contracts but it's a while ago. I have looked for an answer to this question but could not find it.
I have deployed this contract on testnet: https://github.com/0xcert/ethereum-erc721 and created an NFT by interacting with the contract.
Deploying the contract is very expensive on main-net, much more so than interacting with it.
Now I was wondering: isn't there any deployed contract on mainnet already? That I can use to mint an NFT?
We're trying to build a dapp to share and display classifieds. Classifieds are being in the smart contract. People who connected their Metamask accounts can display adds. But we want to show them to everyone. Is there any way to do it?
Thanks for your responses.
I am new to blockchain. I have read that tokens are created using smart contracts in Ethereum. Smart contracts need ether to be created. Is there anyway that I can create tokens without using ether or any other cryptocurrency?
No there is no way to do this. This is an essential component of the Ethereum Blockchain as it prevents a DDOS like attack on the network. Think of it like this: if there was no cost involved in deploying a smart contract someone could just spam the network and create billions of smart contract. Very quickly the entire network would collapse.
However there are ways to get a little bit of free Ethereum. For example you could use a faucet which will distribute a little bit of Ethereum. Usually these faucets distribute Ethereum for testnet versions of the Ethereum network.
For example take a look at the Rinkeby testnet. They have their own faucet which will allow you to get a little bit of Ethereum for testing purposes.
There may be faucets which work on mainnet. However keep in mind there is no such thing as a free lunch. Someone somewhere will eventually have to pay the bill.
I want to deploy a smart contract on server and interact with it using mobile client. I'm not familiar with how does that work but after some research, I found something like below:
If we compare communication through web services in mobile client, then pretty much everything is same expect in Smart contract, is no database or deployment service as the result of decentralized nature of the system. Is that right? We can connect mobile client to smart contract using some library like web3 which would essentially work with Json RPC or websockets.
But what if I don't want to connect each mobile client to smart contract using library like web3? Instead, what if I want to have a HTTP server and then it would connect to smart contract like below?
Is that possible? If yes, then how can I do that?
My second question is regarding deployment. In the centralized server scenario, I would have database deployed on some service like AWS etc. I could estimate the deployment cost. I understood that we have to deploy smart contract on Ethereum mainnet which will cost some x amount of Ether. But then I found out that my users will have to pay for each computation. What if I want to bear all the costs? How can we estimate such costs?
Instead, what if I want to have a HTTP server and then it would connect to smart contract like below?
You certainly can do this, some might argue a layer of centralization is added by placing a web server between the DApp and blockchain, but I would disagree. If you want to do this, your DApp would simply call a REST API on your web server which in return would utilize web3.js (node.js), web3j (Java), Nethereum (C#/.NET) or any other flavor of Web3 to interact directly with the blockchain.
What if I want to bear all the costs?
You will only be able to bear the costs of deploying smart contracts which are deployed on your behalf and not on behalf of any potential end-users.
How can we estimate such costs?
You can estimate the gas cost of a contract deployment or contract interaction via web3's estimateGas method. Understand, this cost can be largely effected by how well structured your Solidity smart contract code is written. Note, this is of course also only an estimate as users could always expend more Ether to have their transaction confirmed quicker or the state of the data within the smart contract could change over time requiring higher gas costs (i.e. iterating a growing array). For more information on gas costs within the Ethereum mainnet, you can take a look at ETH Gas Station.
As a side note, since I do not know your particular use case for blockchain technology, it could be helpful to weigh out whether or not it makes sense to utilize the Ethereum mainnet or to spin up your own private Ethereum blockchain. With the latter you would completely avoid having to spend any Ether to interact with blockchain network, but you would likely have additional overhead.
I am new to Ethereum, Blockchain Technology.I have been going through Tutorials on Ethereum and Smart Cotracts.
As per my Understanding, If we want to make any change to data members of the smart contact, it ll cost us some Ether right ? so , i am wondering how Free chat DApps work?. I mean, it should cost ether for storing the data of chats and transaction of data right ? or are they using any test networks such as kovan,rinkeby ?
Thanks in Advance
In addition to other answer, I don't think so your referenced Apps are using Ethereum blockchain to save chat messages as it always requires Gas to add anything in a public Ethereum blockchain network. To integrate chatting in your App you can use XMPP Framework.
Obviously you require to have a centralized server (Against the blockchain basic terminology) But chat history is not required to save on the server. It can only be saved on Users Device and can use end-to-end encryption. Server will only be required to implement socket-based communication by using XMPP framework. Or you can also use Firebase Realtime Database for a chat. But I totally agree it's against the basic blockchain rule of decentralization.
If you are using the public Ethereum blockchain it costs Ether to change data. It costs money to get these Ether so a Free chat on this network seems unlikely.
If you are using someone's private Ethereum blockchain it costs Ether to change data, but Ether has no value and can be given more or less easily (like Rinkeby).
If you are using your private Ethereum blockchain it costs Ether to change data, but you can get Ether easily at genesis block or mining Ether.
If you are using a private Ethereum blockchain like Quorum with GasPrice=0, you don't need Ether.