Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 29, 2020, 06:08:06 PM Last edit: November 29, 2020, 06:20:48 PM by Tokenista |
|
This will be a thread about TRC20 Token creation pragma solidity ^0.4.23;
import "./ITRC20.sol"; import "../../utils/SafeMath.sol";
/** * @title Standard TRC20 token (compatible with ERC20 token) * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract TRC20 is ITRC20 { using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
/** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address owner, address spender ) public view returns (uint256) { return _allowed[owner][spender]; }
/** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { require(spender != address(0));
_allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; }
/** * @dev Transfer tokens from one address to another * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom( address from, address to, uint256 value ) public returns (bool) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); return true; }
/** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance( address spender, uint256 addedValue ) public returns (bool) { require(spender != address(0));
_allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].add(addedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; }
/** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance( address spender, uint256 subtractedValue ) public returns (bool) { require(spender != address(0));
_allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].sub(subtractedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; }
/** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { require(to != address(0));
_balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); }
/** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { require(account != address(0));
_totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); }
/** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { require(account != address(0));
_totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); }
/** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted, // this function needs to emit an event with the updated approval. _allowed[account][msg.sender] = _allowed[account][msg.sender].sub( value); _burn(account, value); } }
https://medium.com/@jgulacsy/use-the-open-zeppelin-smart-contract-framework-51ab17c5ae9https://tronprotocol.github.io/documentation-en/contracts/trc20/https://coredevs.medium.com/what-is-trc20-da34cac6608dhttps://developers.tron.network/docs/issuing-trc20-tokens-tutorialhttps://newreleases.io/project/github/tronprotocol/java-tron/release/GreatVoyage-v4.0.0ERC20 guide to help since they are basically the same https://github.com/bitfwdcommunity/Issue-your-own-ERC20-token
|
|
|
|
Krabby
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 644
Merit: 250
https://primedao.eth.link/#/
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 29, 2020, 07:41:07 PM |
|
I have a question for quite some time about token creation across platforms. I heard that creating a token on ERC-20 or Tron is also very easy and the cost of the token generation service only costs 50 $! I'm just a trader and don't understand too much about technology and IT. So I want to ask that only through this post can I create my own token without any fees? ![Undecided](https://bitcointalk.org/Smileys/default/undecided.gif) * P/S: I have a long cherished trading pool project and I want to save as much money as possible before creating my project. I will greatly appreciate your detailed answer on this matter. Many thanks.
|
|
|
|
Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 29, 2020, 09:41:55 PM |
|
I have a question for quite some time about token creation across platforms. I heard that creating a token on ERC-20 or Tron is also very easy and the cost of the token generation service only costs 50 $! I'm just a trader and don't understand too much about technology and IT. So I want to ask that only through this post can I create my own token without any fees? ![Undecided](https://bitcointalk.org/Smileys/default/undecided.gif) * P/S: I have a long cherished trading pool project and I want to save as much money as possible before creating my project. I will greatly appreciate your detailed answer on this matter. Many thanks. TRC20 is Free, that is why I chose it to launch first, no other reason. Just make sure you have 10 TRX in your wallet for energy fees, or 3,000 TRX Frozen as energy in your wallet. The Energy is imaginary and is just a way for TRON to generate Income on their Blockchain, but if you don't have the energy Frozen already it doesn't cost too much to pay for energy on the spot. You have to Freeze (A.K.A. Stake) a lot more TRX to get the same amount that you could use by Burning (instead of Staking) but Burnt Fees go to TRON and don't come back, while the Frozen coins are just locked in your own wallet. So it is your choice if you want to invest a little or a lot, but it only costs the Energy Fee to make a TRC20. After your Token is made tell us about it in this thread.
|
|
|
|
Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2020, 03:38:59 PM |
|
You can copy any ERC20 Token into a TRC20 Contract.
It is the same.
You can just copy it and change a few little things, that is why I gave the example in the first post, that is what it is showing, I just forgot to explicitly mention that ERC20 and TRC20 are the same and anyone can copy ERC20 to TRC20.
|
|
|
|
|
Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2020, 09:21:20 PM |
|
I am going to work on launching the first Punic TRC20 tonight, or tomorrow.
|
|
|
|
globalcitizen
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 476
Merit: 104
Decentralized global citizen and crypto-preneur
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2020, 10:44:02 PM |
|
I have been trying to learn solidity but it hasn't been that easy for me because of my lack of background in programming. But anytime I see a new coin or token launched I feel more compelled to try to give it a try.
The fact that one can just create a token with little or no cost and launch it to the public to raise money for one's project makes learning Ethereum solidity for ERC-20 and even TRC-20 creation a worthwhile effort. I just hope I will be able to achieve that one day.
|
|
|
|
Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 01, 2020, 01:32:54 AM |
|
I have been trying to learn solidity but it hasn't been that easy for me because of my lack of background in programming. But anytime I see a new coin or token launched I feel more compelled to try to give it a try.
The fact that one can just create a token with little or no cost and launch it to the public to raise money for one's project makes learning Ethereum solidity for ERC-20 and even TRC-20 creation a worthwhile effort. I just hope I will be able to achieve that one day.
Here are some Solidity guides
|
|
|
|
Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 01, 2020, 02:28:26 AM |
|
|
|
|
|
globalcitizen
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 476
Merit: 104
Decentralized global citizen and crypto-preneur
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 01, 2020, 03:15:51 AM |
|
I have been trying to learn solidity but it hasn't been that easy for me because of my lack of background in programming. But anytime I see a new coin or token launched I feel more compelled to try to give it a try.
The fact that one can just create a token with little or no cost and launch it to the public to raise money for one's project makes learning Ethereum solidity for ERC-20 and even TRC-20 creation a worthwhile effort. I just hope I will be able to achieve that one day.
Here are some Solidity guides That's awesome. Thank you for those resources. It will be very useful for my learning. I will devote sometime to go through them and use them as learning resources and reference materials. Nice job.
|
|
|
|
Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 01, 2020, 08:38:47 AM |
|
I have been trying to learn solidity but it hasn't been that easy for me because of my lack of background in programming. But anytime I see a new coin or token launched I feel more compelled to try to give it a try.
The fact that one can just create a token with little or no cost and launch it to the public to raise money for one's project makes learning Ethereum solidity for ERC-20 and even TRC-20 creation a worthwhile effort. I just hope I will be able to achieve that one day.
Here are some Solidity guides That's awesome. Thank you for those resources. It will be very useful for my learning. I will devote sometime to go through them and use them as learning resources and reference materials. Nice job. I will put up a guide for Publishing the basic TRC20 soon, so everyone can do it.
|
|
|
|
Sirait
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 01, 2020, 09:17:50 AM |
|
^ thank you bro for this very valuable topic, sorry I ran out of merit ![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif) . I have a plan to make my own token based on ERC20 and TRC20, I hope you and your family are healthy always.
|
|
|
|
Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 01, 2020, 07:59:07 PM |
|
I just want to reiterate for everyone how easy it is to clone entire Blockchains. I am not a Programmer, I started in a terminal to learn how to make a Genesis Block and that is what I did. This is originally how I learned to make Blockchains years ago. And Ethereum is even easier than that. Also, for anyone who is interested in the Punic Wax Mystery: I will be posting tons and tons if information on this, the post at the beginning of this thread is hardly what will be posted on the Subject. Go to: http://www.PunicWax.comI have 84 more posts that will be going up there over a period of time, and many more will be added. The whole thing is basically a Thesis, or several Premises, and people may go get their PhDs using this information, and I hope they do because the research in this field needs to be expanded on. We are creating an Alchemical Mystery School where by understanding certain things, you better understand several other certain things. We will create a Initiation Mystery Ritual in which once you have completed a number of duties and tasks listed, you will be certified with a Megarian Degree, we are creating a Mystery School that is of the Stoic Philosophy, and African Mythological Mystery, guided by Hindu Shaivite Religion.
Once you become more capable in Crypto, you will be given various other Degrees and then will eventually start your own Central Regional Headquarters free from us having any role in creating or shareholding your Currency. This will be for local purposes, but in a Global Network.
|
|
|
|
hd49728
Legendary
Offline
Activity: 2198
Merit: 1080
Fully Regulated Crypto Casino
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 02, 2020, 02:10:06 AM |
|
You can copy any ERC20 Token into a TRC20 Contract.
It is the same.
You can just copy it and change a few little things, that is why I gave the example in the first post, that is what it is showing, I just forgot to explicitly mention that ERC20 and TRC20 are the same and anyone can copy ERC20 to TRC20.
It sounds you are an expert in TRC20 token and contracts on that platform. I knew of the contract to move Tether USD (USDT) on TRC20 chain with zero cost of transaction (almost zero cost). Could you give me explanation on the process of moving USDT on TRC20 chain, please. This method is more commonly used after the DeFi trend was hyped and fee on ERC20 chain was very high. I still don't understand why fee on TRC20 is very cheap like that. I read the article Tether (USDT) TRC20 vs ERC20 but could not find answers.
|
|
|
|
Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 02, 2020, 05:25:09 PM |
|
You can copy any ERC20 Token into a TRC20 Contract.
It is the same.
You can just copy it and change a few little things, that is why I gave the example in the first post, that is what it is showing, I just forgot to explicitly mention that ERC20 and TRC20 are the same and anyone can copy ERC20 to TRC20.
It sounds you are an expert in TRC20 token and contracts on that platform. I knew of the contract to move Tether USD (USDT) on TRC20 chain with zero cost of transaction (almost zero cost). Could you give me explanation on the process of moving USDT on TRC20 chain, please. This method is more commonly used after the DeFi trend was hyped and fee on ERC20 chain was very high. I still don't understand why fee on TRC20 is very cheap like that. I read the article Tether (USDT) TRC20 vs ERC20 but could not find answers. So, you just go to EtherScan and Github, it is easier to use Github with Ubuntu than Windows. They would have taken their contract for USDT on EtherScan, and Uploaded it to TronScan, and if there is a function where fees go to an account they would change their wallet address. But then they go to the Token Record section on TronScan. Clone the Git Repositories with similar changes. And put the TronScan Contract on their Github Clone. And that's it. Some Tokens don't even require any Github.
|
|
|
|
Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 02, 2020, 05:25:19 PM |
|
Something everyone should know. This applies to BLURT because BLURT is a STEEM Fork, meaning it is an exact copy of STEEM from March 2020, but everything after that is independent from what happens on Steemit.
When I joined Steemit in 2016, it took 104 weeks, which is 2 years, to take your funds out. I am fully in support of that, but it is not a well understood position. Most people think STEEM or BLURT should be able to be withdrawn in 4 weeks.
So I want to explain this for everyone.
Anarcho-Capitalists took over Steemit, and I left. STEEM was topping at like $20 and sitting at like $5 when I left because the platform became useless. Dan and Ned are the Developers, then the Bitshares people were the Witnesses and early adopters. So when they all got Anarchy Fever, no one could get an upvote unless they were saying "Taxation is Theft", and being proud Anti-Statists who literally think anyone who believes in a State is wrong.
You may think "that's democracy" or Majority Rule or whatever, but that is not good business for a Social Media Blogging site trying to be a real universal platform.
Apparently these Anarchists voted for a 13 week STEEM Power Down, so people could withdraw all their money. I started my Power Down during the 104 week rule, and never came back, so I literally had no idea this happened. I spoke to someone today and they said "it was always 13 weeks on Steemit", so that means that most people don't even understand how this works.
So, everyone wants their money when they need it, but that is why Steemit had a 50/50 Payout in Liquid and STEEM Power. So half is saved, half is held.
And you are supposed to use this like a Bank.
STEEM Power has 4% interest. So it makes money like a Bank, actually better than most Banks. Plus, you get Curation and Author Rewards. So if you think of STEEM Power as Money held in your Bank account, you can actually live on the Interest and Rewards.
And the fact that it took 102 weeks to pull it out meant that people had to be in it for the long haul. People couldn't just pull all the STEEM being used for Curation and dump it.
If that isn't obviously clear, you can look at what happened when they changed to 4 week withdrawals. It is $0.15 now and everyone is gone.
This could be resolved if we all just started coming in, buying it up, and holding it ourselves. But you can see how the 4 weeks was not really a good move. And really 13 weeks was too quick.
But, in order to raise the prices of these currencies, we can collectively do this ourselves.
This concept that existed at the beginning of Steemit, which the Anarchocapitalists got rid of, is very well defined here. ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.ibb.co%2FFDGf2nQ%2Funknown.png&t=665&c=69I9ZmfHlefrNA)
|
|
|
|
Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 02, 2020, 06:23:07 PM |
|
This video series was created early on after the TRON Blockchain launched, so the functionality after launch is now Built into TRON Link, but other than that this Tutorial is still good. It is a series of videos. https://youtu.be/LsNaflm5Abc
|
|
|
|
|
Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 04, 2020, 04:48:54 AM |
|
I was doing something with Steem-Engine, for the PUTI Token, so I didn't get this done yer. But I am going to upload a TRC20 on TronScan tomorrow. And I will make a Guide.
|
|
|
|
Tokenista (OP)
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 910
Merit: 14
Everyone join Blurt.blog & Steemit.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 06, 2020, 05:39:35 AM |
|
Something that should be mentioned, right now if I want to send a Bitcoin or an ETH somewhere, it costs like $2.00+, this is due to Transaction fees used to pay miners to want to mine your block, the more fees you pay the faster your transaction goes through, it can take 1 hr or more for a Bitcoin to go from 1 wallet to another.
So there is an entire market for what are called Micropayments.
Micropayments are if I want to send $1 or less, or even $10 or so. It is not really efficient to send $10.00 payments with fees at $2.00 or more.
So there is an entire industry for Micropayments, and TRC10/20 Tokens definitely fulfill this. You get about 5000 free Bandwidth per day in your wallet, and can send any amount of a Token to another wallet for about 280 Bandwidth. So you can easily send several people small payments in 1 day if you needed, or accept small payments from them. All within the TRON wallet, then for liquid trade on the TRON Link exchanges.
There have been entire currencies with the singular purpose of being a Micropayment Blockchain, and TRON Tokens have it built in. And the Tokens move to the other wallet just about instantly.
|
|
|
|
|