Contract 0x0473b9119ba568ddb6665dceb025857ed692fffe

Contract Overview

Balance:
0 BNB

Token:
Txn Hash
Block
From
To
Value [Txn Fee]
0xab4670f942c28761826a19e99769f5214f6cdeb1dc06a28e8c9b5cff17d10532100066002021-06-24 6:45:4031 days 22 hrs ago0xfdbcc17c0288990305fd27ff6aada9ae05696da1 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00043596
0x379c83353fbf523b02f7ec4c6741075b1f31b17cd8d2a14f1b52eac3ccde1bab99873962021-06-23 14:45:2832 days 14 hrs ago0x8f37f0deb04358743727f2ff98f134a4f7481628 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00084132
0xc3b2acef66fa7a4996791297292683a58ac08d186c6472c6c658534cc59f268899459802021-06-22 4:14:4034 days 34 mins ago0xef81c2d7f82c90e74af939287462b50cc3728003 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00084132
0x0faa8058068ed2de611e265a2a059bfc6c8de9b4fa3222e19352d6684a0a465599047262021-06-20 17:51:5835 days 10 hrs ago0x8f37f0deb04358743727f2ff98f134a4f7481628 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00099132
0x93ebc8ac6c4f95fc53a1acb9b5ebf4d832c32c27c9a0e8b7eb8f33fd5f79ca6298992982021-06-20 13:20:3435 days 15 hrs ago0x454871cd471092d3ac1e97289465dd1d3f185eba IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00088344
0x898637af79f3695648c805864d4786496ff1e29d4afdea5a3ace2edaf6c74ac698992602021-06-20 13:18:4035 days 15 hrs ago0x454871cd471092d3ac1e97289465dd1d3f185eba IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00088344
0xf302c9391420db4370725b3357d380f479de7806079db14efb6c242ffda0c6d198991472021-06-20 13:13:0135 days 15 hrs ago0x454871cd471092d3ac1e97289465dd1d3f185eba IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00088344
0x2c01cd52d98632dc5c5b2d27ddf77386f4923440ad987beaaffb7f59f7f638dc98990232021-06-20 13:06:4935 days 15 hrs ago0x454871cd471092d3ac1e97289465dd1d3f185eba IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00088344
0x5b478293bd0e47c549617d23f1a5e0f1140d61b1258939a44a238f8c0b121ef898990002021-06-20 13:05:4035 days 15 hrs ago0x454871cd471092d3ac1e97289465dd1d3f185eba IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00036205
0x3b664fd103e972b7f233ac7f987475c5998b01dcd8af800ca10d160a17759b0798989302021-06-20 13:02:1035 days 15 hrs ago0x454871cd471092d3ac1e97289465dd1d3f185eba IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00103332
0xd1fd77c2b289f62f54006baf70821fb093bec552197e52903152c7663387842898985202021-06-20 12:41:4035 days 16 hrs ago0xef81c2d7f82c90e74af939287462b50cc3728003 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00103332
0xacbec922d3cfea2167c1f6302e41c7bffd9f458b8bb6a4e07ca701eeb5db412e98983732021-06-20 12:34:1935 days 16 hrs ago0x4c55264377ee29cf49d2ef557026951f778bf770 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00103332
0x8f53bd57ce6063f35a7b037a9e582caeb3179d517edb4b798b188715d6dea42b98982952021-06-20 12:30:2535 days 16 hrs ago0xcd78f3b3764847453eeffa40bb0a1cf553e5e215 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00088332
0x912e5c470ddfba5c348fc42680bb6358d5f87731516258ebffba580758a508c698979402021-06-20 12:12:4035 days 16 hrs ago0xcd78f3b3764847453eeffa40bb0a1cf553e5e215 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00103332
0x6be10de6473699d91c92f9522c6346dc4f3d95cd36c6576ea1d728b6c77b21e898977882021-06-20 12:05:0435 days 16 hrs ago0x97dbcae89669b1b01d9842dfe7635d7783020186 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00103332
0x4dd273ae86b2e5dbd51c141815b4882409b6456354f22f54b4dd94d004bc6bf298976922021-06-20 12:00:1635 days 16 hrs ago0x4ecc519872e271177643429bf97dd7617ada9440 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00088332
0x7432d6e6edf3ada9422b7686fe8ade7ede653d46323d5d58a692a2034abce76798695652021-06-19 12:33:5536 days 16 hrs ago0x0311223c2529c95cceb7099996ee326de7f7d3ff IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00103332
0xe6dc72a5bdcbdf282d7a4f3e6cff68d34acc2125f93151fbd36a09cf596c172e98694012021-06-19 12:25:4336 days 16 hrs ago0x425ab533f186ddc344bf16d4c493134f4a55f623 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00088344
0xad2a700cae944f8ac4868721d9d38af879882a79a041c584424be5c9da145b9d98693352021-06-19 12:22:2536 days 16 hrs ago0xb9169548b7e36084c14177df32bc35f0aecccc84 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00099132
0x6b0bfded943ab4302d4ac21253f5545c9c7444081562dd43c3a9c9902fbe064398691932021-06-19 12:15:1936 days 16 hrs ago0x425ab533f186ddc344bf16d4c493134f4a55f623 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00088344
0xde19a67e9f2570346c11468a1bd2538adae627b77d8ee23a310a176787c2d15a98691712021-06-19 12:14:1336 days 16 hrs ago0x425ab533f186ddc344bf16d4c493134f4a55f623 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00088344
0xe227feadeb2f9fe15209fb482c7e65840a33d039a2debe3f6eb657ca6f68a25d98690622021-06-19 12:08:4636 days 16 hrs ago0x425ab533f186ddc344bf16d4c493134f4a55f623 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00103344
0xc6718729359cdb6783eea823dcb473f9508869872090fb6092ce2f4479ee247998686202021-06-19 11:46:4036 days 17 hrs ago0x425ab533f186ddc344bf16d4c493134f4a55f623 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00084144
0xc08753413e520e7595833e4cc8ba78ed0142b8fe3e7db9e98934b29cb444cb9198686102021-06-19 11:46:1036 days 17 hrs ago0x425ab533f186ddc344bf16d4c493134f4a55f623 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00084144
0x705555ebe71d39bb54edfc2cf917e1eac9e39ef9d7b4742d4a88712a6af8743d98684932021-06-19 11:40:1936 days 17 hrs ago0x425ab533f186ddc344bf16d4c493134f4a55f623 IN  0x0473b9119ba568ddb6665dceb025857ed692fffe0 BNB0.00084144
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xab4670f942c28761826a19e99769f5214f6cdeb1dc06a28e8c9b5cff17d10532100066002021-06-24 6:45:4031 days 22 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0xab4670f942c28761826a19e99769f5214f6cdeb1dc06a28e8c9b5cff17d10532100066002021-06-24 6:45:4031 days 22 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee0 BNB
0x379c83353fbf523b02f7ec4c6741075b1f31b17cd8d2a14f1b52eac3ccde1bab99873962021-06-23 14:45:2832 days 14 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0x379c83353fbf523b02f7ec4c6741075b1f31b17cd8d2a14f1b52eac3ccde1bab99873962021-06-23 14:45:2832 days 14 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0x379c83353fbf523b02f7ec4c6741075b1f31b17cd8d2a14f1b52eac3ccde1bab99873962021-06-23 14:45:2832 days 14 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee0 BNB
0x379c83353fbf523b02f7ec4c6741075b1f31b17cd8d2a14f1b52eac3ccde1bab99873962021-06-23 14:45:2832 days 14 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0xc3b2acef66fa7a4996791297292683a58ac08d186c6472c6c658534cc59f268899459802021-06-22 4:14:4034 days 34 mins ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0xc3b2acef66fa7a4996791297292683a58ac08d186c6472c6c658534cc59f268899459802021-06-22 4:14:4034 days 34 mins ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0xc3b2acef66fa7a4996791297292683a58ac08d186c6472c6c658534cc59f268899459802021-06-22 4:14:4034 days 34 mins ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee0 BNB
0xc3b2acef66fa7a4996791297292683a58ac08d186c6472c6c658534cc59f268899459802021-06-22 4:14:4034 days 34 mins ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0x0faa8058068ed2de611e265a2a059bfc6c8de9b4fa3222e19352d6684a0a465599047262021-06-20 17:51:5835 days 10 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0x0faa8058068ed2de611e265a2a059bfc6c8de9b4fa3222e19352d6684a0a465599047262021-06-20 17:51:5835 days 10 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0x0faa8058068ed2de611e265a2a059bfc6c8de9b4fa3222e19352d6684a0a465599047262021-06-20 17:51:5835 days 10 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee0 BNB
0x0faa8058068ed2de611e265a2a059bfc6c8de9b4fa3222e19352d6684a0a465599047262021-06-20 17:51:5835 days 10 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0x93ebc8ac6c4f95fc53a1acb9b5ebf4d832c32c27c9a0e8b7eb8f33fd5f79ca6298992982021-06-20 13:20:3435 days 15 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0x93ebc8ac6c4f95fc53a1acb9b5ebf4d832c32c27c9a0e8b7eb8f33fd5f79ca6298992982021-06-20 13:20:3435 days 15 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0x93ebc8ac6c4f95fc53a1acb9b5ebf4d832c32c27c9a0e8b7eb8f33fd5f79ca6298992982021-06-20 13:20:3435 days 15 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee0 BNB
0x93ebc8ac6c4f95fc53a1acb9b5ebf4d832c32c27c9a0e8b7eb8f33fd5f79ca6298992982021-06-20 13:20:3435 days 15 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0x898637af79f3695648c805864d4786496ff1e29d4afdea5a3ace2edaf6c74ac698992602021-06-20 13:18:4035 days 15 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0x898637af79f3695648c805864d4786496ff1e29d4afdea5a3ace2edaf6c74ac698992602021-06-20 13:18:4035 days 15 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0x898637af79f3695648c805864d4786496ff1e29d4afdea5a3ace2edaf6c74ac698992602021-06-20 13:18:4035 days 15 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee0 BNB
0x898637af79f3695648c805864d4786496ff1e29d4afdea5a3ace2edaf6c74ac698992602021-06-20 13:18:4035 days 15 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0xf302c9391420db4370725b3357d380f479de7806079db14efb6c242ffda0c6d198991472021-06-20 13:13:0135 days 15 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0xf302c9391420db4370725b3357d380f479de7806079db14efb6c242ffda0c6d198991472021-06-20 13:13:0135 days 15 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xa59a817b5abd42af6c45b90d05131fadaf56f7630 BNB
0xf302c9391420db4370725b3357d380f479de7806079db14efb6c242ffda0c6d198991472021-06-20 13:13:0135 days 15 hrs ago 0x0473b9119ba568ddb6665dceb025857ed692fffe 0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee0 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UFATokenSwap

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 1 : UFAToken.sol
pragma solidity ^0.8.0;

contract Context {
  // Empty internal constructor, to prevent people from mistakenly deploying
  // an instance of this contract, which should be used via inheritance.
  constructor () { }

  function _msgSender() internal view returns (address) {
    return msg.sender;
  }

  function _msgData() internal view returns (bytes memory) {
    this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
    return msg.data;
  }
}

interface IBEP20 {
  /**
   * @dev Returns the amount of tokens in existence.
   */
  function totalSupply() external view returns (uint256);

  /**
   * @dev Returns the token decimals.
   */
  function decimals() external view returns (uint8);

  /**
   * @dev Returns the token symbol.
   */
  function symbol() external view returns (string memory);

  /**
  * @dev Returns the token name.
  */
  function name() external view returns (string memory);

  /**
   * @dev Returns the bep token owner.
   */
  function getOwner() external view returns (address);

  /**
   * @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:
   * 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);
}

/**
 * @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.
   *
   * 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) {
    // Solidity only automatically asserts when dividing by 0
    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;
  }
}

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 () {
    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;
  }

  /**
   * @dev Throws if called by any account other than the 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 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 onlyOwner {
    _transferOwnership(newOwner);
  }

  /**
   * @dev Transfers ownership of the contract to a new account (`newOwner`).
   */
  function _transferOwnership(address newOwner) internal {
    require(newOwner != address(0), "Ownable: new owner is the zero address");
    emit OwnershipTransferred(_owner, newOwner);
    _owner = newOwner;
  }
}

contract UFAToken is Context, IBEP20, Ownable {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;
    uint8 public _decimals;
    string public _symbol;
    string public _name;

    constructor() {
        _name = "UFA Token";
        _symbol = "UFA";
        _decimals = 18;
        _totalSupply = 1000000000 * 1e18;
        // _totalSupply = 300 * 1e18;
        _balances[msg.sender] = _totalSupply;

        emit Transfer(address(0), msg.sender, _totalSupply);
    }

    function getOwner() override external view returns (address) {
        return owner();
    }

    function decimals() override external view returns (uint8) {
        return _decimals;
    }

    function symbol() override external view returns (string memory) {
        return _symbol;
    }

    function name() override external view returns (string memory) {
        return _name;
    }

    function totalSupply() override external view returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) override external view returns (uint256) {
        return _balances[account];
    }

    function transfer(address recipient, uint256 amount) override external returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function allowance(address owner, address spender) override external view returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount) override external returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function transferFrom(address sender, address recipient, uint256 amount) override external returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "BEP20: transfer amount exceeds allowance"));
        return true;
    }

    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "BEP20: decreased allowance below zero"));
        return true;
    }

    function burn(uint256 amount) public returns (bool) {
        _burn(_msgSender(), amount);
        return true;
    }

    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");

        _balances[sender] = _balances[sender].sub(amount, "BEP20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    function _burn(address account, uint256 amount) internal {
        require(account != address(0), "BEP20: burn from the zero address");

        _balances[account] = _balances[account].sub(amount, "BEP20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    function _approve(address owner, address spender, uint256 amount) internal {
        require(owner != address(0), "BEP20: approve from the zero address");
        require(spender != address(0), "BEP20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    function _burnFrom(address account, uint256 amount) internal {
        _burn(account, amount);
        _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "BEP20: burn amount exceeds allowance"));
    }
}

contract UFATokenSwap is Ownable {
    using SafeMath for uint256;

    IBEP20 public tokenA;
    IBEP20 public tokenB;
    uint256 public rate = 33; 
    uint256 public refrate = 5;
    // uint256 public min_swap = 20000000000000000000000;
    // uint256 public max_swap = 2000000000000000000000000;
    // uint256 public total_swap = 200000000000000000000;

    
    constructor(address _tokenA, address _tokenB
    ) {
        tokenA = IBEP20(_tokenA);  // BUSD
        tokenB = IBEP20(_tokenB);  // UFAToken
    }

    function swap(uint256 _amount, address payable _refaddr) public {
        // require(_amount > 20000000000000000000000, "amount too small");
        // require(_amount < 2000000000000000000000000, "amount too ever");
        uint256 _payback = _amount.mul(rate);
        uint256 _payref = _amount.mul(refrate).div(100);
    
        require(tokenB.balanceOf(address(this)) > _payback, "insufficient contract bal");

        require(tokenA.transferFrom(msg.sender, address(this), _amount), "transfer failed");
        require(tokenB.transfer(msg.sender, _payback), "transfer failed");
        if (_refaddr != address(0)) {
            require(tokenB.transfer(_refaddr, _payref), "transfer failed");
         }
    }

    function setRate(uint256 _rate) public onlyOwner {
        rate = _rate;
    }
    function setrefRate(uint256 _refrate) public onlyOwner {
        refrate = _refrate;
    }
 
    function aBalance() public view returns (uint256) {
        return tokenA.balanceOf(address(this));
    }

    function bBalance() public view returns (uint256) {
        return tokenB.balanceOf(address(this));
    }
    
    function ownerReclaimTokenA() public onlyOwner {
        tokenB.transfer(msg.sender, tokenA.balanceOf(address(this)));
    }

    function ownerReclaimTokenB() public onlyOwner {
        tokenA.transfer(msg.sender, tokenB.balanceOf(address(this)));
    }

    function flushBNB() public onlyOwner {
        uint256 bal = address(this).balance.sub(1);
        payable(msg.sender).transfer(bal);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_tokenA","type":"address"},{"internalType":"address","name":"_tokenB","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"aBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flushBNB","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerReclaimTokenA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ownerReclaimTokenB","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refrate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_refrate","type":"uint256"}],"name":"setrefRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address payable","name":"_refaddr","type":"address"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenA","outputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenB","outputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526021600355600560045534801561001a57600080fd5b50604051610ed8380380610ed8833981016040819052610039916100de565b60006100436100be565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055610110565b3390565b80516001600160a01b03811681146100d957600080fd5b919050565b600080604083850312156100f0578182fd5b6100f9836100c2565b9150610107602084016100c2565b90509250929050565b610db98061011f6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063d3986f0811610066578063d3986f0814610182578063db6be04414610195578063dff58050146101a8578063f2fde38b146101b0576100f5565b80638da5cb5b146101625780639f6a02581461016a578063ba33c74814610172578063c90fb6711461017a576100f5565b80632c4e722e116100d35780632c4e722e1461012a57806334fcf4371461013f5780635f64b55b14610152578063715018a61461015a576100f5565b80630fc63d10146100fa5780632665c407146101185780632aebb7bc14610122575b600080fd5b6101026101c3565b60405161010f9190610b39565b60405180910390f35b6101206101d2565b005b610120610310565b610132610386565b60405161010f9190610cf9565b61012061014d366004610ada565b61038c565b6101026103c6565b6101206103d5565b610102610454565b610132610463565b610132610469565b6101326104ef565b610120610190366004610b0a565b610520565b6101206101a3366004610ada565b6107f4565b61012061082e565b6101206101be366004610a9e565b6108a1565b6001546001600160a01b031681565b6101da6108df565b6000546001600160a01b039081169116146102105760405162461bcd60e51b815260040161020790610c9b565b60405180910390fd5b6002546001546040516370a0823160e01b81526001600160a01b039283169263a9059cbb9233929116906370a082319061024e903090600401610b39565b60206040518083038186803b15801561026657600080fd5b505afa15801561027a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061029e9190610af2565b6040518363ffffffff1660e01b81526004016102bb929190610b4d565b602060405180830381600087803b1580156102d557600080fd5b505af11580156102e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030d9190610aba565b50565b6103186108df565b6000546001600160a01b039081169116146103455760405162461bcd60e51b815260040161020790610c9b565b60006103524760016108e3565b604051909150339082156108fc029083906000818181858888f19350505050158015610382573d6000803e3d6000fd5b5050565b60035481565b6103946108df565b6000546001600160a01b039081169116146103c15760405162461bcd60e51b815260040161020790610c9b565b600355565b6002546001600160a01b031681565b6103dd6108df565b6000546001600160a01b0390811691161461040a5760405162461bcd60e51b815260040161020790610c9b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60045481565b6002546040516370a0823160e01b81526000916001600160a01b0316906370a082319061049a903090600401610b39565b60206040518083038186803b1580156104b257600080fd5b505afa1580156104c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ea9190610af2565b905090565b6001546040516370a0823160e01b81526000916001600160a01b0316906370a082319061049a903090600401610b39565b60006105376003548461092e90919063ffffffff16565b9050600061055b60646105556004548761092e90919063ffffffff16565b90610973565b6002546040516370a0823160e01b815291925083916001600160a01b03909116906370a0823190610590903090600401610b39565b60206040518083038186803b1580156105a857600080fd5b505afa1580156105bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e09190610af2565b116105fd5760405162461bcd60e51b815260040161020790610c23565b6001546040516323b872dd60e01b81526001600160a01b03909116906323b872dd9061063190339030908990600401610b66565b602060405180830381600087803b15801561064b57600080fd5b505af115801561065f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106839190610aba565b61069f5760405162461bcd60e51b815260040161020790610cd0565b60025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906106d19033908690600401610b4d565b602060405180830381600087803b1580156106eb57600080fd5b505af11580156106ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107239190610aba565b61073f5760405162461bcd60e51b815260040161020790610cd0565b6001600160a01b038316156107ee5760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906107809086908590600401610b4d565b602060405180830381600087803b15801561079a57600080fd5b505af11580156107ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d29190610aba565b6107ee5760405162461bcd60e51b815260040161020790610cd0565b50505050565b6107fc6108df565b6000546001600160a01b039081169116146108295760405162461bcd60e51b815260040161020790610c9b565b600455565b6108366108df565b6000546001600160a01b039081169116146108635760405162461bcd60e51b815260040161020790610c9b565b6001546002546040516370a0823160e01b81526001600160a01b039283169263a9059cbb9233929116906370a082319061024e903090600401610b39565b6108a96108df565b6000546001600160a01b039081169116146108d65760405162461bcd60e51b815260040161020790610c9b565b61030d816109b5565b3390565b600061092583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610a36565b90505b92915050565b60008261093d57506000610928565b60006109498385610d22565b9050826109568583610d02565b146109255760405162461bcd60e51b815260040161020790610c5a565b600061092583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610a70565b6001600160a01b0381166109db5760405162461bcd60e51b815260040161020790610bdd565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008184841115610a5a5760405162461bcd60e51b81526004016102079190610b8a565b506000610a678486610d41565b95945050505050565b60008183610a915760405162461bcd60e51b81526004016102079190610b8a565b506000610a678486610d02565b600060208284031215610aaf578081fd5b813561092581610d6e565b600060208284031215610acb578081fd5b81518015158114610925578182fd5b600060208284031215610aeb578081fd5b5035919050565b600060208284031215610b03578081fd5b5051919050565b60008060408385031215610b1c578081fd5b823591506020830135610b2e81610d6e565b809150509250929050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6000602080835283518082850152825b81811015610bb657858101830151858201604001528201610b9a565b81811115610bc75783604083870101525b50601f01601f1916929092016040019392505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526019908201527f696e73756666696369656e7420636f6e74726163742062616c00000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600f908201526e1d1c985b9cd9995c8819985a5b1959608a1b604082015260600190565b90815260200190565b600082610d1d57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615610d3c57610d3c610d58565b500290565b600082821015610d5357610d53610d58565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461030d57600080fdfea26469706673582212201113035fbcbcc9d033ce6f7eb829a5ea543b572f7a1635e548a3ba2afcd3c0f064736f6c63430008000033000000000000000000000000ed24fc36d5ee211ea25a80239fb8c4cfd80f12ee000000000000000000000000a59a817b5abd42af6c45b90d05131fadaf56f763

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000ed24fc36d5ee211ea25a80239fb8c4cfd80f12ee000000000000000000000000a59a817b5abd42af6c45b90d05131fadaf56f763

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000ed24fc36d5ee211ea25a80239fb8c4cfd80f12ee
Arg [1] : 000000000000000000000000a59a817b5abd42af6c45b90d05131fadaf56f763


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading