Meta Mask - burn transaction - blockchain

I am new to MetaMask API. I am looking for how to burn a NFT, but I cannot find it in the documentation.
I've seen a post on Stackoverflow similar to what I am looking for, but the burn transaction was done with Solidity. Is there anyway that I can achieve this by using MetaMask API?
Any help would be appreciated.
Thank you so much.
Gary

Metamask's job is to connect you to the networks and provide you with account service. Burning an NFT is calling the burn method written on the contract.
NFT is eventually an ERC721 token, it is a smart contract and if burn functionality is not written, you cannot burn it or kill it.
Burning an NFT effectively destroys the token and removes it entirely from the Ethereum blockchain. On the NFT platform that you are using, there should be an option like "BURN THE TOKEN". Once you click on it, you calling the burn method on the smart contract.

Related

Blockchain dApp: How end user use dApp without care of Ethereum Account

I want to develop a dApp (Smart Contract) on Ethereum and have a mobile application on top of it.
My concern is: every time we interact with Smart Contract to inquiry or change data, we need a account as well as a certain number of ETH used as Gas. It looks no problem on the development environment, but getting into trouble in real life, I mean about user experience (UX).
- Whenever a user download and install the app, we will create for them an Ethereum account. BUT where they can get ETH to interact with Smart Contract? And absolutely, they don't care and don't want to be bothered with exchange ETH.
I have an alternative solution: we have only 1 Ethereum account with some ETH in their and act as the Proxy to the Smart Contract. Whenever user's request come, we delegate the request to Smart Contract and return to user. BUT it seems we will lost the main characteristic of Blockhain: Decentralized :) Who know we might arbitrarily change the Smart Contract without user attention.
Any suggestion is appreciated. Thank you!
You can send some ether to each new user that is just enough to call your contract.

How to deploy and verify(public source code) ethereum smart contract programmatically?

I want to deploy an ethereum smart contract and verify(reveal) its source code. Can I do it programmatically?
Usually I deploy a smart contract and verify it on etherscan.io. After the verification the source code is revealed. The task is that I need to deploy a lot of smart contracts but I can not verify them manually. Is there a way or API to upload the solidity code to reveal smart contract code to the public?
Though I guess the answer is "no" but still want to hear any ideas.
Thanks in advance
Indeed, at the time of writing this, it seems like there's no public endpoint to do this. There's no mention of such contract verification endpoint in Etherscan documentation here https://etherscan.io/apis or here https://hexdocs.pm/etherscan/
Someone was asking the same thing on their subreddit just about a month ago, without much success
Etherscan is using Are you a robot? checkbox CAPTCHA upon verification. That one would be pretty hard to trick, not really worth trying. What you could do instead however is a partial automation of contract verification using Selenium.
Lets say you want to verify 20 contracts with minimal effort. It should be possible to write a script which would open up 20 tabs in browser, in each it would go to Etherscan, enter appropriate contract details for one of the contracts, but then let a human to handle the page with Are you a robot? captcha.
Etherscan has an HTTP API, with which contracts can be verified programmatically
https://docs.etherscan.io/tutorials/verifying-contracts-programmatically

How Ethereum Blockchain based ICO token's distribution works?

I'm working on Ethereum ICO project, I studied Solidity and created a test token and deployed to Ethereum blockchain using MetaMask & Etherscan. but I'm not sure how to proceed further. I'm trying to connect different dots to achieve my goal. I have few questions related to ICO:
When launching an ICO, do we need to implement only ERC20 token standards into Smart Contracts or we need to write other logic's as well like how token buyers going to be benefited from this contract?
When investors send Ethers against ICO token, where to store those Ethers or how those Ethers can be managed so later all can be used for further development?
How to revert back Ethers if ICO goal is not reached?
How to transfer tokens to investors if ICO goal is reached?
Do we need Dapp for launching an ICO?
How contract manages tokens reserved for developers?
I studied Truffle but not sure how to use it for ICO launch?
It will be highly appreciated if anybody can guide me by replying all the above questions and share their personal experience launching an ICO.
Thanks in advance.
Its up to you but if you want people to be able to use your token in metamask / other exchanges to implement it you need to use ERC20 token, its tested and everyone knows how to implement
All depends on how you configure the contract but usually the person who lunch the contract will have access to the contract and can transfer the funds ... of course your contract your contract needs to be ownable in order to have such a properties enabled
You can do this by setting your crowdsale contract as RefundableCrowdsale
There is contract for crowdsale and in it, in distribution section you've options to transfer funds, essentially token is just a database with a list of wallets and how much of the wallet they own. meaning you don't really transfer anything and more like recording the name in the contract.
Not necessary, essentially investors just need to send ether to your contract.
I think that could be a a separate contract holding the fund for x amount of time before it gets released. The zeppelin-solidity seems to provide Tokenvesting.sol for this purpose.
Truffle is a framework, using industry standards of how you should deploy a contract it also helps with debugging
I would advice you to go through openzeppelin and by reading it you get a general idea of how everything works - helps with learning solidity

Is it possible to pay ICO consultants in the ICO's new currency?

I am working as a consultant on a new ETH based ICO campaign.
The arrangement is that they will pay me with their new tokens they are issuing through their ICO. The problem is, as far as I know, tokens are automatically paid through a smart contract to investors based on their ETH contribution.
I am wondering if there is anyway I can guarantee receiving the tokens? I have had to turn to stack overflow to get an answer, it is incredibly difficult to find relevant, reliable information online.
Are they able to transfer their tokens prior to their ICO to an ether wallet?
Any help would be appreciated!
Yes, you are able to programmatically allocate tokens to individuals without having them contribute ETH to a smart contract. You can guarantee payment by verifying they have allocated their token to your ERC-20 compliant address in their ICO contract.
They would be able to assuming their ICO contract is already deployed and has your wallet address.

Can we add changes to the smart contract once it has been deployed?

I am a newbie and am learning about the blockchain and smart contracts.
So my question is can we add changes(features) to the smart contract code once it has been deployed?
and is it possible to create an ERC 20 token that is based on proof of stake?
Thanks
No, the very foundation of a blockchain is its immutability, meaning that once a set of data is sent to the blockchain, it can never be modified or changed in any way. Therefore, once you push a smart contract to the Ethereum blockchain, it cannot be changed or manipulated in any way.
It's not entirely possible due to the fact that an ERC20 token is embedded into Ethereum's blockchain. So, when miners are mining the Ethereum blockchain, they're essentially mining every ERC20 token as well.