Ok, I understand it, that is without the permission of the owner of each token I will never be able to destroy them, right?
As far as I have read about basics of solidity, You won't be able to destroy
My doubt was whether the creator of the contract could burn tokens of any account but, according to what you told me the creator always have to be authorized to do that like any other address.
This authorization must be approved through the aproval () function afterwards it is possible to execute burnFrom () or transferFrom () is that correct?
function approve(address _spender, uint256 _value) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
Yes you may probably be right . Or I might be wrong with this explanation now...
If you are the creator of tokens and the smart contract, you have full authorization to use the approve() function. Unless you are a individual it's a big
NO.
approve() function allows the spender of tokens or another smart contract to
just ask for a withdrawal from a account any number of times, until the tokens balances are exhausted. Here address_spender is the address of the contract. If the return statement is TRUE, then it will invoke receiveapproval() function.
Here is an example which I have quoted from ethwiki for your reference on how does a smart contract work!
https://theethereum.wiki/w/index.php/ERC20_Token_Standard#How_Does_A_Token_Contract_Work.3FJust check the link, it might be very helpful to you and may solve your doubts to an extent...
My goal is to create a token and distribute it and after burn them. I suppose that each token holder should send me their tokens this way I can burn those tokens. I want to do it in this way to understand how smart contract works.
Why are you trying this in real time? You may use github to practice and learn here :
https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.11+commit.68ef5810.jsThe simplest thing would be to send all of them to 0x0 address as you tell me.
No, it would just be invaluable and you cannot use those tokens anytime in future. If you really want to burn and destroy them, then I have answered you above about it.