【如何在HECO链部署通缩燃烧销毁合约代码

编程入门 行业动态 更新时间:2024-10-07 22:18:24

【如何在HECO链部署通缩燃烧销毁<a href=https://www.elefans.com/category/jswz/34/1770939.html style=合约代码"/>

【如何在HECO链部署通缩燃烧销毁合约代码

 第一步:
前期准备谷歌浏览器,小狐狸钱包,谷歌浏览器百度下载安装就可以,小狐狸钱包去官方网站下载

网络名称:      heco主网                                 新增RPC: /
链: 56
符号: HT
区块浏览器 :/

添加好了充好手续费HT,最后就是编译部署合约就可以,打开remix编译网站:remix.ethereum

 第二步:

创建文件夹

第三步:

准备好燃烧分红代码(完整代码在文章最后)

 然后把代码复制进去

直接编译

第四步:

第五步:

第六步:

 点击确定以后直接部署完成。

话不多说直接先上源码(完整源码无套路):
 

// SPDX-License-Identifier: MITpragma solidity ^0.8.2;//QQ201333403
abstract contract Context {function _msgSender() internal view virtual returns (address payable) {return payable(msg.sender);}function _msgData() internal view virtual returns (bytes memory) {this; // silence state mutability warning without generating bytecode - see  msg.data;}
}/*** @dev Interface of the BEP20 standard as defined in the EIP.*/
interface IBEP20 {/*** @dev Returns the amount of tokens in existence.*/function totalSupply() external view returns (uint256);/*** @dev Returns the amount of tokens owned by `account`.*/function balanceOf(address account) external view returns (uint256);/*** @dev Moves `amount` tokens from the caller's account to `recipient`.** Returns a boolean value indicating whether the operation succeeded.** Emits a {Transfer} event.*/function transfer(address recipient, uint256 amount) external returns (bool);/*** @dev Returns the remaining number of tokens that `spender` will be* allowed to spend on behalf of `owner` through {transferFrom}. This is* zero by default.** This value changes when {approve} or {transferFrom} are called.*/function allowance(address owner, address spender) external view returns (uint256);/*** @dev Sets `amount` as the allowance of `spender` over the caller's tokens.** Returns a boolean value indicating whether the operation succeeded.** IMPORTANT: 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:* ** Emits an {Approval} event.*/function approve(address spender, uint256 amount) external returns (bool);/*** @dev Moves `amount` tokens from `sender` to `recipient` using the* allowance mechanism. `amount` is then deducted from the caller's* allowance.** Returns a boolean value indicating whether the operation succeeded.** Emits a {Transfer} event.*/function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);/*** @dev Emitted when `value` tokens are moved from one account (`from`) to* another (`to`).** Note that `value` may be zero.*/event Transfer(address indexed from, address indexed to, uint256 value);/*** @dev Emitted when the allowance of a `spender` for an `owner` is set by* a call to {approve}. `value` is the new allowance.*/event Approval(address indexed owner, address indexed spender, uint256 value);
}/*** @dev Wrappers over Solidity's arithmetic operations with added overflow* checks.** Arithmetic operations in Solidity wrap on overflow. This can easily result* in bugs, because programmers usually assume that an overflow raises an* error, which is the standard behavior in high level programming languages.* `SafeMath` restores this intuition by reverting the transaction when an* operation overflows.** Using this library instead of the unchecked operations eliminates an entire* class of bugs, so it's recommended to use it always.*/
library SafeMath {/*** @dev Returns the addition of two unsigned integers, reverting on* overflow.** Counterpart to Solidity's `+` operator.** Requirements:** - Addition cannot overflow.*/function add(uint256 a, uint256 b) internal pure returns (uint256) {uint256 c = a + b;require(c >= a, "SafeMath: addition overflow");return c;}/*** @dev Returns the subtraction of two unsigned integers, reverting on* overflow (when the result is negative).** Counterpart to Solidity's `-` operator.** Requirements:** - Subtraction cannot overflow.*/function sub(uint256 a, uint256 b) internal pure returns (uint256) {return sub(a, b, "SafeMath: subtraction overflow");}/*** @dev Returns the subtraction of two unsigned integers, reverting with custom message on* overflow (when the result is negative).** Counterpart to Solidity's `-` operator.** Requireme

更多推荐

【如何在HECO链部署通缩燃烧销毁合约代码

本文发布于:2024-02-13 14:43:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1759269.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:合约   代码   如何在   HECO

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!