burn action need to be carried out in the website, if someone did it onchain using burn method, it won't work. I read through the code, is really simple and straight forward on the smart contract code.Hey @fbslo, I assumed the
<p dir="auto"><span>I used to have some code written back in the days when Hive first released, <a href="https://github.com/superoo7/BSwap" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://github.com/superoo7/BSwap
<p dir="auto">I created a method call <code>burnToBC, where the params accept <code>username so that the token can be transfer back on blockchain
<pre><code> /**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*
* Requirements:
*
* - Blockchain `username`
*/
function burnToBC(uint256 amount, string memory username) public {
_burn(_msgSender(), amount);
emit TokenBurnToBC(amount, username);
}
<p dir="auto"><span>I used to have some code written back in the days when Hive first released, <a href="https://github.com/superoo7/BSwap" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://github.com/superoo7/BSwap <p dir="auto">I created a method call <code>burnToBC, where the params accept <code>username so that the token can be transfer back on blockchain <pre><code> /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. * * Requirements: * * - Blockchain `username` */ function burnToBC(uint256 amount, string memory username) public { _burn(_msgSender(), amount); emit TokenBurnToBC(amount, username); }burn
action need to be carried out in the website, if someone did it onchain using burn method, it won't work. I read through the code, is really simple and straight forward on the smart contract code.Hey @fbslo, I assumed the