tokenpocket官网app下载地址|trc20官网
波场-让互联网重新去中心化
互联网重新去中心化生态通证开发者资源TRON ETFSEA OF STARS关于EconomicsEnglish生态TronSR钱包浏览器Dappdapp.reviewdapp.comdappradarBitTorrent ChainAPENFT MarketplaceSUN Network社区项目JUSTOKX DEX更多通证TRXBTTUSDTUSDCJSTNFT开发者白皮书2.0技术文档TRONPROTOCOL GitHubTRON 安全审计报告漏洞悬赏资源TRON ETFSEA OF STARS关于USDTUSDT 简介TRC20协议USDT是 Tether 泰达公司基于波场网络发行的锚定美元的稳定币。将利用智能合约完成在波场链上的发行,持有,转账,完全公开透明,零转账费,秒级到账,能根据智能合约任意编写扩展性强的程序。实现了与基于TRON协议和分布式应用(DAPP)的互通性,同时允许用户在TRON网络上交易与交换法定挂钩货币。USDT(TRC20)于2022年10月7日被多米尼克国政府正式确立为国家法定数字货币。查看法案>基于TRC20的USDT合约地址:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t宣布支持TRC20 based USDT的交易所孙宇晨阁下波场官方社交平台TELEGRAM CHINESE GROUPTELEGRAM ENGLISH GROUPTELEGRAM KOREA GROUPTELEGRAM RUSSIA GROUPTELEGRAM JAPANESE GROUPTELEGRAM ARABIC GROUPTELEGRAM SPANISH GROUPTRON DAO OfficialTRON DAO RussiaTRON DAO KoreaTRON DAO JapanTRON DAO SpainTRON DAO ArabicTRON DAO VietnamKorean Customer Service(1:1문의)TRON Kakao Official Group(자유 커뮤니티)支持隐私协议FAQ漏洞悬赏廉正举报联系我们[email protected][email protected]Copyright © 2017-2023 TRON Network Limited. | All rights reservedGotop.TRONSCAN | TRON BlockChain Explorer | 波场区块链浏览器
SCAN | TRON BlockChain Explorer | 波场区块链浏览器You need to enable JavaScript to run this app now noTRON | Decentralize The Web
| Decentralize The WebEcosystemTokenDeveloperResourcesTRON ETFSEA OF STARSAboutEconomicsEnglishEcosystemTronSRWalletExplorerDappdapp.reviewdapp.comdappradarBitTorrent ChainAPENFT MarketplaceSUN NetworkCommunity ProjectsJUSTOKX DEXMoreTokenTRXBTTUSDTUSDCJSTNFTDeveloperWhite Paper 2.0Technical DocsTRONPROTOCOL GitHubTRON Security Audit ReportBug Bounty ProgramResourcesTRON ETFSEA OF STARSAboutDECENTRALIZE THE WEBBoasting over - million accounts and - billion transactions, TRON is the world's fastest-growing public chain.-Total Number of Accounts-Transaction Count-Block Height-Transfer Amount of Core TokensTRX Market PerformanceListed on over 130 exchanges, TRX, one of the most promising cryptos, connects millions of value investors across the globe. Total Market Cap$Global RankAccounts holding TRXCurrent Price$0Transaction Volume (24h)$Transaction Count (24h)TRON EcosystemTRON WalletIt is created by outstanding community developers of TRON and has established in-depth cooperation with a number of world-class wallets.Learn moreTRONSCANThe first-ever TRON-based blockchain explorer that provides comprehensive on-chain data for queries and supports token creation.Learn moreTRON DAppsTRON boasts the fastest-growing DApp ecosystem and overtook EOS to be the second largest public chain platform for DApps. TRON DApps were listed on the frontpage of SAMSUNG Galaxy Store.Application ScenarioTRX is widely used in various scenarios including payment, purchases and voting both within and outside the TRON ecosystem. For instance, TRX is supported by credit card Spend and TRON ATM machine for TRX payment and online transfer respectively.Learn moreTRON SRTRON Super Representatives are elected through decentralized voting and are responsible for the on-chain governance of TRON community. Through voting for SRs, voters can earn rewards for participating in building the TRON ecosystem.Learn moreTRC20-USDTA TRC20-based stablecoin issued by Tether with fastest additional issuance and extremely low handling fee, which enjoys enormous popularity among users since its first day of issuance.Learn moreJustStableTRON's first decentralized stablecoin lending platform that provides the best gateway to access DeFi.Learn moreJustLend DAOJustLend DAO is TRON's first official lending platform. The interest rates of its fund pools are determined by an algorithm based on the supply and demand of TRON assets. JustLend DAO aims to build an ideal decentralized lending protocol and become TRON's first official algorithm-powered decentralized bank.Learn moreSunSwapSunSwap is the first decentralized token exchange protocol on the TRON network. Users can exchange any TRC20 tokens at system-set prices immediately and conveniently without the platform taking any commission. Learn moreWinkLinkWinkLink is an official oracle project running on the TRON network that safely feeds on-chain smart contracts with real-world data.Learn moreSUNSUN token is a social experiment dedicated to the development of TRON's DeFi ecosystem. Designed as the quintessential Bitcoin equivalent on TRON, SUN features zero VC investments, zero PE investments, no pre-mining or reserve for the team, and is fully operated by the community through its open-source smart contracts.Learn moreSUN NetworkThe scaling solution for TRON MainNet that provides unlimited scalability with low resource consumption, high security and customizability.Learn moreTRON Crypto ETFsThis Report is written and issued by TRON Research. Contents: TRON ETN listing on Deutsche Börse, Grand vision: Global settlement layer & cross-chain, Industry comparison: Stablecoins & TVL, TRON supply mechanism: Deflation vs inflation, The most popular Web 3.0 ecosystem, The most inclusive blockchain in the world, King of the stablecoin supply (USDT), Next-generation global payment system, Creative destruction by order of magnitude, Smart contract & DeFi ecosystem, BTFS: Revitalizing BitTorrent ecosystem, BTTC: Cross-chain Layer-2 scaling solution and APENET: Connecting artists and token economyLearn moreTRONPROTOCOL FeaturesTRONPROTOCOL is the world's leading decentralized blockchain protocolHigh-throughputThe high throughput of TRONPROTOCOL, underpinned by improved network TPS, makes TRON a better option for day-to-day use than Bitcoin and Ethereum. High-scalabilityStrong scalability and smart contracts allow applications to be deployed on TRON in diverse ways, enabling TRONPROTOCOL to accommodate a sizable user base.High-availabilityTRONPROTOCOL has a more reliable network structure, user assets, and intrinsic value. Its further decentralized consensus brings a more mature rewards distribution mechanism.Sun NetworkDAppChain is TRON's sidechain project. The goal is to help DApps to operate on TRON with lower energy consumption, faster speed and enhanced safety, providing unlimited capacity for TRON's main network.Learn moreCore PartnersFounded in 2014, Poloniex is an established, world-leading digital asset trading platform registered in Seychelles. It is also one of the first Wall Street-compliant trading platforms. Poloniex has received investment from Goldman Sachs, a top-notch Wall Street investment bank, and was funded in 2019 by investors including TRON founder Justin Sun, which has further enhanced its financial strength. Poloniex is dedicated to creating a Goldman Sachs in the cryptocurrency sector and delivering a Wall-Street-like user experience for investors.As one of the most popular blockchains around the world, TRON has engaged in international collaboration with Samsung on behalf of all blockchain projects based in China and has integrated with Samsung Blockchain Keystore, which indicates that Samsung has begun to support the TRC10 and TRC20 standards and allow their built-in blockchain wallet on mobile phones to receive TRX. TRON is now the only made-in-China blockchain supported by Samsung.BitTorrent Protocol is the world‘s largest decentralized protocol with over 1 billion users. The Protocol was developed and since maintained by BitTorrent Inc. Among its various forms of implementations, BitTorrent and μTorrent (often referred to as 'utorrent') remain the most popular ones. BitTorrent Protocol has reached a strategic partnership with the TRON Protocol, making TRON the world's largest decentralized ecosystem and BitTorrent the world's largest distributed application.APENFT Marketplace is an NFT trading platform launched by APENFT based on the TRON public chain. By funding and supporting ecosystems, APENFT aspires to foster the continuous creation of quality products, and introduce a wider audience and more creative gameplay to the NFT field. With its foray into digital entertainment and converting value entities into NFTs, it can explore more use cases for blockchain technology.Swisscom Blockchain is a Swiss startup belonging to Swisscom, the #1 telecommunication company in Switzerland.As experts in blockchain, Swisscom Blockchain is developing innovative products to help clients to exploit the full potential offered by this technology.Opera was founded in 1995 in Norway on the idea that everyone would browse the web on any device. For more than 20 years Opera browsers have been helping millions of people access the internet to read, create, laugh, and play. Opera continued to make browsers smaller and faster and pioneered innovations such as tabs or speed dial, which have since become something in all web browsers.InsightsLearn moreH.E. Justin SunTRON Social PlatformTELEGRAM CHINESE GROUPTELEGRAM ENGLISH GROUPTELEGRAM KOREA GROUPTELEGRAM RUSSIA GROUPTELEGRAM JAPANESE GROUPTELEGRAM ARABIC GROUPTELEGRAM SPANISH GROUPTRON DAO OfficialTRON DAO RussiaTRON DAO KoreaTRON DAO JapanTRON DAO SpainTRON DAO ArabicTRON DAO VietnamKorean Customer Service(1:1문의)TRON Kakao Official Group(자유 커뮤니티)SupportPrivacy PolicyFAQBug Bounty ProgramWhistleblower NoticeContact Us[email protected][email protected]Copyright © 2017-2023 TRON Network Limited. | All rights reservedTRC20
0Jump to ContentGuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsHomeGuidesAPI ReferenceChangelogv3.7v4.0v4.0.1v4.1.1v4.1.2v4.1.3v4.2.0v4.2.2v4.3.0v4.4.0v4.4.2v4.5.1v4.5.2v4.6.0v4.7.0v4.7.1v4.7.2v4.7.3GuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsChange LogChange Logv4.0SearchLoading…IntroductionTRON Ecological IntroductionQuickstartTRON ProtocolAccountResource ModelSuper RepresentativesMechanismStep to become a CandidateCommittee and ProposalTransactionMulti-SignatureMulti-Signature Example Process FlowTRX And TRC TokenTRXTRX TransferQuery TRX balanceTRC10Issue TRC10Participate TRC10TRC10 TransferQuery TRC10 balanceTRC10 Transfer in Smart ContractsOther TRC10 InterfacesTRC20Implementation RulesContract ExampleIssuing TRC20 tokens tutorialTRC20 Contract InteractionTRC20 Event ListenerGet TRC20 transaction historyGet Transaction historyVirtual MachineVirtual Machine IntroductionVirtual Machine StorageEventsEnergy Consumption MechanismDebugging ResourcesException HandlingNode SetupTRON-CLIOfficial Public NodeFull NodeTron Private ChainMainnet DB BackupsEvent SubscriptionEvent Plugin Deployment (MongoDB)Smart ContractsIntroductionFeaturesProtobuf DefinitionThe Usage of the Function of Smart ContractContract Address Using in Solidity LanguageThe Special Constants Differ from EthereumEnergy Costs TableContract Development CostBest PracticesUser/Developer Energy Pay RatioFee Limit on Deploy/ExecutionFrozen Energy and OUT_OF_ENERGYTimeout and Infinite Loop PitfallsIllegal Operations and PenaltiesNon-Existent Account Transfers and PenaltiesDeveloper Energy Cost ProtectionFallback FunctionsParameter and return value encoding and decoding"Hello World" Smart Contract GuideIntroductionCreating and CompilingDeployingQuerying the Contract DataSmart Contract InteractionTRONZ Shielded Smart ContractsImplementation DetailsHow to Use Shielded Smart ContractsArchitecture introductionModularizationModular IntroductionModular DeploymentImplement A Customized ActuatorDApp Development GuideSetup DApp EnvironmentTronLink IntegrationHTTP API GuideAPI Signature and Broadcast FlowAPI Listjava-tron ReleasesGreatVoyage-v4.0.0(Latest)Odyssey-v3.7Odyssey-v3.6.5Wallet ApplicationsTronscan WalletAndroid WalletTron-BoxGetting StartedSmart Contract DeploymentTron-WebGetting StartedTron-Web API ReferenceTron-IDEGetting StartedGUI and UsageTron-GridGetting StartedIntegrating Blockchain APIsSHASTA Testnet FaucetNew API ServiceTronGridJSTron-StationGetting StartedSDK FunctionsDecentralized ExchangesGetting StartedAPI FunctionsCommunity ProjectsPHP SDK - tron-apiPython SDK - tronpyPython SDK - tron-api-pythonTronLink Browser ExtensionTronPay Browser ExtensionTron Payments NPMTronStationSolidity Development TutorialGO SDK - gotron-sdkRosetta APIGlossaryGlossaryOnline technical supportFAQPowered by TRC20Suggest EditsTRC-20 is a technical standard used for smart contracts on the TRON blockchain for implementing tokens with the TRON Virtual Machine (TVM). It is fully compatible to ERC-20.Updated about 4 years ago
TRON | Decentralize The Web
| Decentralize The WebEcosystemTokenDeveloperResourcesTRON ETFSEA OF STARSAboutEconomicsEnglishEcosystemTronSRWalletExplorerDappdapp.reviewdapp.comdappradarBitTorrent ChainAPENFT MarketplaceSUN NetworkCommunity ProjectsJUSTOKX DEXMoreTokenTRXBTTUSDTUSDCJSTNFTDeveloperWhite Paper 2.0Technical DocsTRONPROTOCOL GitHubTRON Security Audit ReportBug Bounty ProgramResourcesTRON ETFSEA OF STARSAboutUSDTUSDT IntroductionUSDT is the USD-pegged stablecoin issued by Tether on the TRON network. The token will be able to complete issuance, holding and transfer via smart contract on TRON, with a completely free and transparent process, zero transfer fee, and instant delivery; it will also be able to write programs that are highly expansible based on smart contract. TRC20 based USDT enables interoperability with TRON-based protocols and Decentralised Applications (DApps) while allowing users to transact and exchange fiat pegged currencies across the TRON Network.USDT (TRC20) is granted statutory status as authorized digital currency and medium of exchange in the Commonwealth of Dominica effective on October 7th 2022.View Ordinance >TRC20 based USDT smart contract address: TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6tExchanges Supporting TRC20 based USDTH.E. Justin SunTRON Social PlatformTELEGRAM CHINESE GROUPTELEGRAM ENGLISH GROUPTELEGRAM KOREA GROUPTELEGRAM RUSSIA GROUPTELEGRAM JAPANESE GROUPTELEGRAM ARABIC GROUPTELEGRAM SPANISH GROUPTRON DAO OfficialTRON DAO RussiaTRON DAO KoreaTRON DAO JapanTRON DAO SpainTRON DAO ArabicTRON DAO VietnamKorean Customer Service(1:1문의)TRON Kakao Official Group(자유 커뮤니티)SupportPrivacy PolicyFAQBug Bounty ProgramWhistleblower NoticeContact Us[email protected][email protected]Copyright © 2017-2023 TRON Network Limited. | All rights reservedGotop.ReadMe
MeTRC20
0Jump to ContentGuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsHomeGuidesAPI ReferenceChangelogv3.7v4.0v4.0.1v4.1.1v4.1.2v4.1.3v4.2.0v4.2.2v4.3.0v4.4.0v4.4.2v4.5.1v4.5.2v4.6.0v4.7.0v4.7.1v4.7.2v4.7.3GuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsChange LogChange Logv3.7SearchLoading…IntroductionWhat is TRONTRXArchitectureQuickstartTRON ProtocolAccountResource ModelSuper RepresentativesMechanismStep to become a CandidateCommittee and ProposalTransactionMulti-SignatureMulti-Signature Example Process FlowTRX And TRC TokenTRXTRX TransferQuery TRX balanceTRC10Issue TRC10Participate TRC10TRC10 TransferQuery TRC10 balanceTRC10 Transfer in Smart ContractsOther TRC10 InterfacesTRC20Implementation RulesContract ExampleTRC20 Contract InteractionTRC20 Event ListenerGet Transaction historyHow to Build a Transaction LocallyVirtual MachineVirtual Machine IntroductionVirtual Machine StorageEventsEnergy Consumption MechanismDebugging ResourcesException HandlingNode SetupTRON-CLIOfficial Public NodeFull NodeTron Private ChainMainnet DB BackupsEvent SubscriptionEvent Plugin Deployment (MongoDB)Smart ContractsIntroductionFeaturesProtobuf DefinitionThe Usage of the Function of Smart ContractContract Address Using in Solidity LanguageThe Special Constants Differ from EthereumEnergy Costs TableContract Development CostBest PracticesUser/Developer Energy Pay RatioFee Limit on Deploy/ExecutionFrozen Energy and OUT_OF_ENERGYTimeout and Infinite Loop PitfallsIllegal Operations and PenaltiesNon-Existent Account Transfers and PenaltiesDeveloper Energy Cost ProtectionFallback FunctionsParameter and return value encoding and decoding"Hello World" Smart Contract GuideIntroductionCreating and CompilingDeployingQuerying the Contract DataSmart Contract InteractionArchitecture introductionModularizationModular IntroductionModular DeploymentImplement A Customized ActuatorDApp Development GuideSetup DApp EnvironmentTronLink IntegrationHTTP API GuideAPI Signature and Broadcast FlowAPI Listjava-tron ReleasesOdyssey-v3.7(Latest)Odyssey-v3.6.5Wallet ApplicationsTronscan WalletAndroid WalletTron-BoxGetting StartedSmart Contract DeploymentTron-WebGetting StartedTron-Web ClassTransaction ManagementTRX FunctionsTron-Web API ReferenceTron-IDEGetting StartedGUI and UsageTron-GridGetting StartedIntegrating Blockchain APIsSHASTA Testnet FaucetNew API ServiceTronGridJSTron-StationGetting StartedSDK FunctionsDecentralized ExchangesGetting StartedAPI FunctionsCommunity ProjectsPHP SDK - tron-apiPython SDK - tronpyPython SDK - tron-api-pythonTronLink Browser ExtensionTronPay Browser ExtensionTron Payments NPMTronStationSolidity Development TutorialGO SDK - gotron-sdkGlossaryGlossaryOnline technical supportFAQPowered by TRC20Suggest EditsTRC-20 is a technical standard used for smart contracts on the TRON blockchain for implementing tokens with the TRON Virtual Machine (TVM). It is fully compatible to ERC-20.Updated about 4 years ago
TRC-20
20Jump to ContentGuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsHomeGuidesAPI ReferenceChangelogv3.7v4.0v4.0.1v4.1.1v4.1.2v4.1.3v4.2.0v4.2.2v4.3.0v4.4.0v4.4.2v4.5.1v4.5.2v4.6.0v4.7.0v4.7.1v4.7.2v4.7.3GuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsChange LogChange Logv4.4.0SearchLoading…IntroductionTRON Ecosystem IntroductionGetting started with smart contract developmentCreating and CompilingDeployingQuerying the Contract DataSmart Contract InteractionBuild a Decentralized LibraryTRON ProtocolAccountResource ModelSuper RepresentativesMechanismStep to become a CandidateCommittee and ProposalTransactionBuild transaction locallyMulti-SignatureMulti-Signature Example Process FlowConcensusTRX And TRC TokenTRXTRX TransferQuery TRX balanceTRC-10Issue TRC-10 tokenParticipate TRC-10TRC-10 TransferQuery TRC-10 balanceTRC-10 Transfer in Smart ContractsOther TRC-10 InterfacesTRC-20Protocol InterfaceContract ExampleIssuing TRC-20 tokens tutorialTRC-20 Contract InteractionTRC-20 Event ListenerGet TRC-20 transaction historyTRC-721Protocol InterfaceContract ExampleTRC-721 Token IssuanceTRC-721 Contract InteractionUploading NFT Metadata to BTFS NetworkVirtual MachineVirtual Machine IntroductionEventsEnergy Costs CalculationVM Exception HandlingDifferences from EVMSmart ContractsIntroductionFeaturesProtobuf DefinitionThe Usage of the Function of Smart ContractContract Address Using in Solidity LanguageThe Special Constants Differ from EthereumContract Development CostTRONZ Shielded Smart ContractImplementation DetailsHow to Use Shielded Smart ContractsBest PracticesUser/Developer Energy Pay RatioFee Limit on Deploy/ExecutionStake TRX for Energy and OUT_OF_ENERGYTimeout and Infinite Loop PitfallsIllegal Operations and PenaltiesNon-Existent Account Transfers and PenaltiesDeveloper Energy Cost ProtectionFallback FunctionsParameter and return value encoding and decodingHow to judge the recharge and withdraw funds by scanning the block?Build NodeTRON-CLIOfficial Public NodeDeploy the FullNode or SuperNodeTron Private ChainMain Net Database SnapshotsEvent SubscriptionEvent Plugin Deployment (MongoDB)Event Plugin Deployment (Kafka)Java-tron ReleaseGreatVoyage-4.4.0(Rousseau) - The LatestGreatVoyage-4.3.0(Bacon)GreatVoyage-4.2.2.1(Epictetus)GreatVoyage-4.2.2(Lucretius)GreatVoyage-4.2.0(Plato)GreatVoyage-4.1.3(Thales)Great Voyage - v4.1.2Great Voyage - v4.1.1GreatVoyage-v4.0.0Odyssey-v3.7Odyssey-v3.6.5Cross-ChainOverviewArchitectureParachainDeploymentSlot AuctionConnecting to TRONCross-chain TransactionTRC-10 Cross-chainSmart Contract Cross-chainDApp Development GuideSetup DApp EnvironmentTronLink IntegrationIntroductionTronlink EventsAdding assets to TronLinkHTTP APIAPI Signature and Broadcast FlowAPI ListTron-GridGetting StartedIntegrating Blockchain APIsSHASTA Testnet FaucetNew API ServiceTron-BoxGetting StartedSmart Contract DeploymentTron-WebGetting StartedTron-Web API ReferenceTrident-JavaQuickstartKeyPairSignature ValidationSending TransactionsSmart ContractsApplication Binary InterfaceDeploying a Smart ContractInteracting with Smart ContractsTRC-20 ContractsAPIsAddress UtilitiesTransactionsAccountsAccount ResourcesQuery The NetworkTRC10 TokenVoting & SRsProposalsDEX ExchangeSolidity Node APITron-IDEGetting StartedGUI and UsageBTTCBuild a dApp on BTTCOracleBand OracleWINkLinkTron-StationGetting StartedSDK FunctionsWallet ApplicationsTronscan WalletTronlink cold walletDecentralized ExchangesGetting StartedAPI FunctionsCommunity ProjectsRosetta APIGO SDK - gotron-sdkGlossaryGlossaryOnline technical supportFAQAnnouncementsPowered by TRC-20Suggest EditsTRC-20 is a technical standard used for smart contracts on the TRON blockchain for implementing tokens with the TRON Virtual Machine (TVM). It is fully compatible with ERC-20.
TRC-20 standard contract templateUpdated about 3 years ago
TRC-20 - Java Tron
TRC-20 - Java Tron
Java Tron
入门
Java-tron入门
使用Java-tron
部署Java-tron
备份和恢复
轻节点
私链网络
事件订阅
数据库配置
网络配置
节点监控
节点维护工具
API 接口
HTTP 接口
gRPC 接口
核心协议
波场共识
超级代表
账户模型
资源模型
智能合约
系统合约
去中心化交易所
多重签名
Java-tron开发
开发者指南
TIPs工作流程
Issue工作流程
治理流程
配置IDE开发环境
开发示例
核心模块
Dapp开发
Dapp开发工具
Wallet-cli
什么是Wallet-Cli
Wallet命令
版本发布
新版本部署手册
一致性检验
历史版本
术语表
Java Tron
»TRC-20
Edit on GitHub
TRC-20¶
TRC-20是用于TRON区块链上的智能合约的技术标准,用于使用TRON虚拟机(TVM)实施代币。 它与 ERC-20完全兼容。
实现规则¶
3 个可选项¶
通证名称
string public constant name = "TRONEuropeRewardCoin";
通证缩写
string public constant symbol = "TERC";
通证精度
uint8 public constant decimals = 6;
6 个必选项¶
contract TRC20 {
function totalSupply() constant returns (uint theTotalSupply);
function balanceOf(address _owner) constant returns (uint balance);
function transfer(address _to, uint _value) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function approve(address _spender, uint _value) returns (bool success);
function allowance(address _owner, address _spender) constant returns (uint remaining);
event Transfer(address indexed _from, address indexed _to, uint _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
totalSupply()
这个方法返回通证总的发行量。
balanceOf()
这个方法返回查询账户的通证余额。
transfer()
这个方法用来从智能合约地址里转账通证到指定账户。
approve()
这个方法用来授权第三方(例如DAPP合约)从通证拥有者账户转账通证。
transferFrom()
这个方法可供第三方从通证拥有者账户转账通证。需要配合approve()方法使用。
allowance()
这个方法用来查询可供第三方转账的查询账户的通证余额。
2 个事件函数¶
当通证被成功转账后,会触发转账事件。
event Transfer(address indexed _from, address indexed _to, uint256 _value)
当approval()方法被成功调用后,会触发Approval事件。
event Approval(address indexed _owner, address indexed _spender, uint256 _value)
合约示例¶
pragma solidity ^0.4.16;
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }
contract TokenTRC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
/**
* Constructor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
function TokenTRC20(
uint256 initialSupply,
string tokenName,
string tokenSymbol
) public {
totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount
balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens
name = tokenName; // Set the name for display purposes
symbol = tokenSymbol; // Set the symbol for display purposes
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
// Check if the sender has enough
require(balanceOf[_from] >= _value);
// Check for overflows
require(balanceOf[_to] + _value >= balanceOf[_to]);
// Save this for an assertion in the future
uint previousBalances = balanceOf[_from] + balanceOf[_to];
// Subtract from the sender
balanceOf[_from] -= _value;
// Add the same to the recipient
balanceOf[_to] += _value;
emit Transfer(_from, _to, _value);
// Asserts are used to use static analysis to find bugs in your code. They should never fail
assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` on behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]); // Check allowance
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
allowance[msg.sender][_spender] = _value;
return true;
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
balanceOf[msg.sender] -= _value; // Subtract from the sender
totalSupply -= _value; // Updates totalSupply
emit Burn(msg.sender, _value);
return true;
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowance[_from][msg.sender]); // Check allowance
balanceOf[_from] -= _value; // Subtract from the targeted balance
allowance[_from][msg.sender] -= _value; // Subtract from the sender's allowance
totalSupply -= _value; // Update totalSupply
emit Burn(_from, _value);
return true;
}
}
Built with MkDocs using a theme provided by Read the Docs.
GitHub
USDT-TRC20钱包接入方法首曝光! - 知乎
USDT-TRC20钱包接入方法首曝光! - 知乎切换模式写文章登录/注册USDT-TRC20钱包接入方法首曝光!区块链老胡加密数字资产经历十几年的跌宕起伏,始终无法真正进入主流市场,很大程度上是因为其价格波动性较大,不能很好的作为交易媒介或账户单位。稳定币的出现对于加密行业的发展至关重要,享有加密数字货币“圣杯”的美誉。在区块链应用场景落地的进程中,稳定币赛道上的支持者愈来愈多。2021年2月23日,Tether公司基于波场网络发行的稳定币USDT-TRC20通量突破了142亿枚,独立地址数突破226万。在前有老牌USDT-ERC20,后有新秀Defi算法稳定币的境况下,波场USDT-TRC20为何能够在上线半年便取得如此惊艳的市场成绩?USDT-TRC20用户体量的壮大又会如何影响波场生态的发展?区块链加密数字货币交易所/商城/游戏平台如何实现USDT-TRC20钱包接入?加密领域高度认可波场USDT-TRC20的原因有哪些呢?稳定币作为支付网络将具有越来越多的应用场景。其实改变早已发生了,只是许多人还不自知——很多商铺、个人、企业已经开始将波场版USDT作为支付手段,取代SWIFT。波场具有转账速度快、低手续费、高吞吐量等特点,可极大程度增强以太坊、比特币的用户体验。整个波场稳定币的流通量突破了141亿美元,今后不排除到达200亿甚至300亿美元体量的可能。业内越来越多的人会使用稳定币作为支付工具,相信未来也会有机构和银行使用稳定币网络进行清算。波场USDT-TRC20,与其他稳定币有何不同?有哪些优势?不得不说,USDT-TRC20的优势还是很明显的。USDT-ERC20以及其他稳定币转账费用非常高,而使用USDT-TRC20进行转账时费用是非常低廉的,相信使用过USDT-TRC20的用户对这点应该是深有体会。除此之外,USDT-TRC20利用智能合约完成在波场链上的发行、持有、转账,完全公开透明,秒级到账,这些都极大地降低了用户的信任成本,提升了用户转账稳定币的安全保障。正是USDT-TRC20显而易见的优势加剧了投资者对于稳定币的选择。波场TRON网络运行3年以来,不断进行技术升级和扩容,从未出现一起安全事故,在全球用户中拥有良好的知名度和公信力,也为USDT-TRC20的安全运行打下了坚实的基础。区块链加密数字货币交易所/商城/游戏平台如何实现USDT-TRC20钱包接入?据悉,很多平台对区块链底层技术积累甚浅,接入区块链实现充币、提币耗时耗力,影响业务正常开展,且平台方现有接入方案不规范,“盗币”事故时有发生。当然,困难不止于外部环境,内部环境往往成为被忽略的重要因素。比如项目方现有接入方案操作复杂,过度依赖内部技术人员,管理人员难以介入资产掌控,导致“内鬼”事件时有发生,一旦发生往往陷入损失惨重、难以厘清的困局。业务平台如何进行USDT-TRC20钱包接入,实现外御黑客,内防家贼双重安全防护下,满足企业海量的地址需求,实时监测钱包交易(接收、发送)、提供资金归集、系统代付、审核复核等功能呢?详细的接口文档如下:原文链接:https://www.uduncloud.com/gateway-interface1、目录1.1、生成地址1.2、提币1.3、代付1.4、交易回调1.5、校验地址合法性1.6、获取商户支持币种信息2、接口明细1、生成地址1.1 场景说明请求指定币种地址,如要成功获取地址,需先存在钱包,且钱包支持该币种,1.2 接口详情1.2.1 接口地址接口详情URL【/mch/address/create】请求方式POST1.2.2 参数1.2.2.1 参数说明参数类型是否必填说明备注timestampString是时间戳见 验签说明nonceString是随机数见 验签说明signString是签名见 验签说明bodyString是消息内容json字符串,格式如下[ { "merchantId":"300015", "coinType":520, "callUrl":"http://localhost:8080/callBack" }]1.2.2.2 body参数字段body参数名类型是否必填说明merchantIdString是商户号coinTypeInteger是主币种编号,见 附录一callUrlString是回调地址,通过该接口创建的地址,以后关于该地址的充币信息会通过您指定的回调地址通知您。具体示例见 交易回调接口walletIdString否钱包编号,默认根据主钱包生成地址aliasString否地址别名1.2.2.3 示例{ "timestamp": 1535005047, "nonce": 10000, "sign": "a230def43c1a12b14393880a28d4e005", "body": "[{\"merchantId\":\"300015\",\"coinType\":520,\"callUrl\":\"http://localhost:8080/callBack\"}]" }1.2.3 返回状态码表code解释200成功4005非法参数4001商户不存在4169商户已禁用4162签名错误4175钱包编号错误4017商户没有创建钱包4176钱包未添加支持该币种4166商户没有配置套餐4168商户地址达到上限4045币种信息错误-1获取地址失败1.3 调取示例1.3.1 成功{ "data":{ "coinType":520, "address":"0xbe4e3699cb870bc95365fe04a187dd279a651a58" }, "message":"SUCCESS", "code":200}1.3.2 失败{ "code": "4101", "message": "SIGN_MSG_ERROR"}2、发送提币申请2.1 场景说明提币申请2.2 接口详情2.2.1 接口地址接口详情URL【/mch/withdraw】请求方式POST2.2.2 参数2.2.2.1 参数说明参数类型是否必填说明备注timestampString是时间戳见 验签说明nonceString是随机数见 验签说明signString是签名见 验签说明bodyString是消息内容json字符串,格式如下[ { "address":"raadSxrUhG5EQVCY75CSGaVLWCeXd6yH6s", "amount":"0.11", "merchantId":"100109", "mainCoinType":"144", "coinType":"144", "callUrl":"http://localhost:8080/mch/callBack", "businessId":"15", "memo":"10112" }]2.2.2.2 body参数字段body参数名称是否必填类型说明address是String提币地址amount是String提币数量merchantId是String商户号mainCoinType是String主币种编号 (见 附录一 )coinType是String子币种编号 (见 附录一 )callUrl是String回调地址,通过该callUrl告知您该笔提币交易的状态,具体示例见 交易回调接口businessId是String业务id,必须保证该字段在系统内唯一,如果重复,则该笔审核钱包不会接收。memo否String备注,XRP和EOS,这两种币的提币申请该字段可选,起他类型币种不填2.2.2.3 示例{ "timestamp": 1535005047, "nonce": 100000, "sign": "6df1512ee650431632ce1541a6b064e1", "body": "[{\"address\":\"raadSxrUhG5EQVCY75CSGaVLWCeXd6yH6s\",\"amount\":\"0.11\",\"merchantId\":\"100109\",\"mainCoinType\":\"144\",\"coinType\":\"144\",\"callUrl\":\"http://localhost:8080/callBack\",\"businessId\":\"15\",\"memo\":\"10112\"}]" }2.2.3 返回状态码表code解释200成功4005非法参数4598传入body中的list对象中的所有merchantId必须保持一致4001商户不存在4169商户已被禁用4183到账地址异常4193EOS金额小数点后超过4位长度4034未找到该币种信息2.3.1 成功{ "message":"SUCCESS", "code":200}2.3.2 失败{ "code": "4101", "message": "SIGN_MSG_ERROR"}3、代付3.1 场景说明代付,发送自动付款申请,未设置代付信息或代付失败则进入审核状态。3.2 接口详情3.2.1 接口地址接口详情URL【/mch/withdraw/proxypay】请求方式POST3.2.2 参数3.2.2.1 参数说明参数类型是否必填说明备注timestampString是时间戳见 验签说明nonceString是随机数见 验签说明signString是签名见 验签说明bodyString是消息内容JSON字符串,格式如下[ { "address":"raadSxrUhG5EQVCY75CSGaVLWCeXd6yH6s", "amount":"0.1", "merchantId":"100146", "mainCoinType":"144", "coinType":"144", "callUrl":"http://localhost:8080/callBack", "businessId":"571001", "memo":"10112" }]3.2.2.2 body参数说明body参数名称类型是否必填说明merchantIdString是商户号addressString是提币地址mainCoinTypeString是主币种编号,见 附录一coinTypeString是子币种编号,见 附录一amountString是交易数量callUrlString是回调地址,提币(审核、交易)结果将通过该地址进行回调,具体示例见 交易回调接口businessIdString是业务id,必须保证该字段在系统内唯一,如果重复,则该笔提币钱包将不会进行接收memoString否备注,XRP和EOS,这两种币的提币申请该字段可选,起他类型币种不填3.2.2.2 示例{ "timestamp": 1535005047, "nonce": 100000, "sign": "e1bee3a417b9c606ba6cedda26db761a", "body": "[{\"address\":\"raadSxrUhG5EQVCY75CSGaVLWCeXd6yH6s\",\"amount\":\"0.1\",\"merchantId\":\"100146\",\"mainCoinType\":\"144\",\"coinType\":\"144\",\"callUrl\":\"http://localhost:8080/callBack\",\"businessId\":\"571001\",\"memo\":\"10112\"}]"}3.2.3 返回状态码表code解释200成功4005非法参数4001商户不存在4166商户没有配置套餐4169商户已被禁用4612签名错误4163签名信息错误569无效的地址571已存在审核记录,将不再进行处理581非法提币金额554商户不支持该币种3.3 调取示例3.3.1 成功{ "message":"SUCCESS", "code":200}3.3.2 失败{ "code": "4101", "message": "SIGN_MSG_ERROR"}4、交易回调接口4.1 场景说明网关收到交易处理结果,调用商户提供的回调接口,通知商户具体变化信息。该接口网关发送给您指定的回调地址的内容,处理您的业务信息。 分充值回调和提币回调,其中提币最多会进行两次回调(审核回调+交易结果回调)4.2 接口详情4.2.1 接口地址接口详情URL请求方式POST4.2.2 参数4.2.2.1 参数说明参数类型是否必填说明备注timestampString是时间戳见 验签说明nonceString是随机数见 验签说明signString是签名见 验签说明bodyString是消息内容JSON字符串,格式如下{ "address":"DJY781Z8qbuJeuA7C3McYivbX8kmAUXPsW", "amount":"12345678", "blockHigh":"102419", "coinType":"206", "decimals":"8", "fee":"452000", "mainCoinType":"206", "status":3, "tradeId":"20181024175416907", "tradeType":1, "txId":"31689c332536b56a2246347e206fbed2d04d461a3d668c4c1de32a75a8d436f0", "businessId":"",// 提币回调为提币接口传入的businessId,充币无值 "memo":""}4.2.2.2 body参数说明body参数名称类型说明addressString地址amountString交易数量,根据币种精度获取实际金额,实际金额=amount/pow(10,decimals),即实际金额等于amount除以10的decimals次方feeString矿工费,根据币种精度获取实际金额,实际金额获取同上decimalsString币种精度coinTypeString子币种编号,见 附录一mainCoinTypeString主币种编号,见 附录一businessIdString业务编号,提币回调时为提币请求时传入的,充币回调无值blockHighString区块高度statusInteger状态,见 回调接口状态说明tradeIdString交易流水号tradeTypeInteger交易类型,见 回调接口交易类型说明txidString区块链交易哈希memoString备注,XRP和EOS(见 附录一 ),这2种类型币的充提币可能有值4.2.2.2 示例{ "timestamp": 1535005047, "nonce": 100000, "sign": "e1bee3a417b9c606ba6cedda26db761a", "body": "{\"address\":\"DJY781Z8qbuJeuA7C3McYivbX8kmAUXPsW\",\"amount\":\"12345678\",\"blockHigh\":\"102419\",\"coinType\":\"206\",\"decimals\":\"8\",\"fee\":\"452000\",\"mainCoinType\":\"206\",\"status\":3,\"tradeId\":\"20181024175416907\",\"tradeType\":1,\"txId\":\"31689c332536b56a2246347e206fbed2d04d461a3d668c4c1de32a75a8d436f0\"}"}5、校验地址合法性5.1 场景说明校验地址的合法性,添加地址、提币申请等场景时可先校验地址合法性,参看 校验规则5.2 接口详情5.2.1 接口地址接口详情URL【/mch/check/address】请求方式Post5.2.2 参数5.2.2.1 参数说明参数类型是否必填说明备注timestampString是时间戳nonceString是随机数signString是签名bodyString是消息内容JSON字符串,格式如下{ "merchantId":200000, "mainCoinType":"206", "address":"DJY781Z8qbuJeuA7C3McYivbX8kmAUXPsW"}5.2.2.2 body参数说明body参数名称类型是否必填说明merchantIdLong是商户号mainCoinTypeString是主币种编号,见 附录一addressString是需校验的地址5.2.2.2 示例{ "timestamp": 1535005047, "nonce": 100000, "sign": "e1bee3a417b9c606ba6cedda26db761a", "body": "[{\"merchantId\":200000,\"mainCoinType\":\"206\",\"address\":\"DJY781Z8qbuJeuA7C3McYivbX8kmAUXPsW\"}]"5.2.3 返回状态码表code解释200成功4005非法参数4162签名错误4165地址不合法5.3 调取示例5.3.1 成功{ "code":200, "message":"SUCCESS"}5.3.2 失败{ "code":4005, "message":"PARAM_ERROR"}6、获取商户支持的币种信息6.1 场景说明获取商户支持的币种,以及余额6.2 接口详情6.2.1 接口地址接口详情URL【/mch/support-coins】请求方式POST6.2.2 参数6.2.2.1 参数说明参数类型是否必填说明timestampString是时间戳nonceString是随机数signString是签名bodyString是消息内容6.2.2.2 body参数说明body参数名称类型是否必填说明merchantIdLong是商户号showBalanceBoolean是是否查询余额,false不获取,true获取6.2.2.3 示例{ "timestamp": 1535005047, "nonce": 100000, "sign": "e1bee3a417b9c606ba6cedda26db761a", "body": "{\"merchantId\":\"200032\",\"showBalance\":true}"}6.2.3 返回状态码表状态码解释200成功4005body参数错误6.3 调取示例6.3.1 成功{ "code": 200, "message": "SUCCESS", "data":[ { "name": "BTC", // 币种别名 "coinName":"Bitcoin", // 币种全称 "symbol":"BTC", // 币种单位 "mainCoinType":"0", //主币种类型 "coinType":"0", // 币种类型 "decimals":"8", // 币种精度 "tokenStatus":"0", // 0: 主币 1:代币 "mainSymbol":"BTC", //主币种单位 "balance":"0", // 币种余额 "logo":"http://bipay-admin.oss-cn-hangzhou.aliyuncs.com/bipay-admin-release/coin-logo/BTC.png" // 币种log地址 }, { "name": "ETH", // 币种别名 "coinName":"Ethereum", // 币种全称 "symbol":"ETH", // 币种单位 "mainCoinType":"60", //主币种类型 "coinType":"60", // 币种类型 "decimals":"18", // 币种精度 "tokenStatus":"0", // 0: 主币 1:代币 "mainSymbol":"ETH", //主币种单位 "balance":"0", // 币种余额 "logo":"https://bipay-admin.oss-cn-hangzhou.aliyuncs.com/bipay-admin-release/coin-logo/ETH.png" // 币种log地址 } ]}6.3.2 失败{ "code":4005, "message":"BGS_ILLEGAL_PARAMETER"}附录一主币种编号子币种编号币种简称币种英文名币种中文名称精度00BTCBitcoin比特币86060ETHEthereum以太坊18031USDTTether USD泰达币8520520CNTCNT测试币1855DASHDASH达世币8133133ZECZEC大零币8145145BCHBitcoincash比特币现金86161ETCEthereum Classic以太坊经典1822LTCLTC莱特币823012301QTUMQTUM量子链币8502502GCCGalaxyChain860合约地址eth代币eth代币根据代币具体情况而定144144XRPRipple瑞波币6194194EOSEOS柚子币4194194EOSEOS柚子币423042304IOTEIOTEIOTE823032303VDSVollarVollar币8回调接口状态说明状态说明0待审核1审核成功2审核驳回3交易成功4交易失败回调接口交易类型说明状态说明1充币回调2提币回调验签说明为了保证商户传送到优盾的参数信息不被恶意篡改,网关为商户接口提供Md5加密摘要认证。商户可用基础加密参数:时间戳、随机数、签名密钥(商户唯一的APIKEY)、请求明文参数按指定顺序排列进行Md5加密,产生一个验签串sign,商户请求网关接口时,带上参数时间戳、随机数、请求明文参数、sign作为参数。网关拿到相应的参数以同样的方式进行签名验签。同理,网关请求商户也以同样的方式进行身份验证。sign=md5(body + key + nonce + timestamp)key为接口授权码APIKEY,由网关分配给商户,加密字段顺序不能错误币种地址校验规则主币种类型币种简称币种英文名称币种中文名称地址前缀地址长度限制区间0BTCBitcoin比特币1或者3[26,36]60ETHEthereum以太坊0x[42]145BCHBitcoincash比特币现金1[26,36]61ETCEthereumClassic以太坊经典0x[42]2LTCLitecoin莱特币L或者M[26,36]508GXGXG[26,36]503NBTCNBTCN不限制99STOSTO证券型通证发行S不限制5DASHDASH达世币X[26,36]2301QTUMQTUM量子链币Q[26,36]133ZECZCash大零币t1不限制144XRPRipple瑞波币r[34]伴随去中心化的数字金融时代逐步到来,DeFi市场不断涌入更多的传统资产以及机构资金进入,区块链应用场景落地,在提高效率,降低成本,还有解决隐私安全问题上做出了显著成效。尤其在加密领域,稳定币的作用愈加凸显,相信未来稳定币市场规模会越来越大。编辑于 2021-02-24 17:50数字货币数字化资产赞同 291 条评论分享喜欢收藏申请