ETH Price: $3,434.30 (-1.49%)

Contract

0x235b30088E66d2D28F137b422B9349fBa51E0248
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Convert V1214815372024-12-25 19:20:4710 hrs ago1735154447IN
0x235b3008...Ba51E0248
0 ETH0.000508466.34272889
Convert V1213849512024-12-12 7:32:1113 days ago1733988731IN
0x235b3008...Ba51E0248
0 ETH0.0004627913.95385505
Convert V1213849502024-12-12 7:31:5913 days ago1733988719IN
0x235b3008...Ba51E0248
0 ETH0.0010179912.69495937
Convert V1213622822024-12-09 3:34:1117 days ago1733715251IN
0x235b3008...Ba51E0248
0 ETH0.0007640510.13643821
Convert V1213554482024-12-08 4:40:4718 days ago1733632847IN
0x235b3008...Ba51E0248
0 ETH0.000632888.39620539
Convert V1213372242024-12-05 15:35:1120 days ago1733412911IN
0x235b3008...Ba51E0248
0 ETH0.0024724830.82854644
Convert V1213364112024-12-05 12:51:3520 days ago1733403095IN
0x235b3008...Ba51E0248
0 ETH0.0018646824.73027085
Convert V1213325202024-12-04 23:48:2321 days ago1733356103IN
0x235b3008...Ba51E0248
0 ETH0.0020276525.28211025
Convert V1212003432024-11-16 12:45:2339 days ago1731761123IN
0x235b3008...Ba51E0248
0 ETH0.0008875911.07703268
Convert V1211823332024-11-14 0:24:2342 days ago1731543863IN
0x235b3008...Ba51E0248
0 ETH0.0021867329.00607144
Convert V1211812372024-11-13 20:43:4742 days ago1731530627IN
0x235b3008...Ba51E0248
0 ETH0.0056272770.17512167
Convert V1210496092024-10-26 11:50:4760 days ago1729943447IN
0x235b3008...Ba51E0248
0 ETH0.000681128.4940395
Convert V1206880782024-09-06 0:49:47111 days ago1725583787IN
0x235b3008...Ba51E0248
0 ETH0.000090481.2
Convert V1202640832024-07-08 20:11:11170 days ago1720469471IN
0x235b3008...Ba51E0248
0 ETH0.000197143.66730639
Convert V1194080632024-03-10 23:45:59290 days ago1710114359IN
0x235b3008...Ba51E0248
0 ETH0.0037115749.2323113
Convert V1193644592024-03-04 21:22:11296 days ago1709587331IN
0x235b3008...Ba51E0248
0 ETH0.0068215685.06862496
Convert V1192733032024-02-21 3:15:23309 days ago1708485323IN
0x235b3008...Ba51E0248
0 ETH0.0025938334.41148234
Convert V1192583122024-02-19 0:44:59311 days ago1708303499IN
0x235b3008...Ba51E0248
0 ETH0.0016314820.34546513
Convert V1190793252024-01-24 21:58:47336 days ago1706133527IN
0x235b3008...Ba51E0248
0 ETH0.000721989.0022399
Convert V1190789392024-01-24 20:40:35336 days ago1706128835IN
0x235b3008...Ba51E0248
0 ETH0.0009834313.04899319
Convert V1190619032024-01-22 11:12:23338 days ago1705921943IN
0x235b3008...Ba51E0248
0 ETH0.0012406516.46450835
Convert V1190470182024-01-20 8:55:47340 days ago1705740947IN
0x235b3008...Ba51E0248
0 ETH0.0013431516.74982389
Convert V1189647192024-01-08 20:39:23352 days ago1704746363IN
0x235b3008...Ba51E0248
0 ETH0.0019935824.86101739
Convert V1189366122024-01-04 21:23:11356 days ago1704403391IN
0x235b3008...Ba51E0248
0 ETH0.0018979923.668979
Convert V1189092842024-01-01 1:19:23360 days ago1704071963IN
0x235b3008...Ba51E0248
0 ETH0.0008496410.59399225
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
214815372024-12-25 19:20:4710 hrs ago1735154447
0x235b3008...Ba51E0248
0 ETH
214815372024-12-25 19:20:4710 hrs ago1735154447
0x235b3008...Ba51E0248
0 ETH
213849512024-12-12 7:32:1113 days ago1733988731
0x235b3008...Ba51E0248
0 ETH
213849502024-12-12 7:31:5913 days ago1733988719
0x235b3008...Ba51E0248
0 ETH
213849502024-12-12 7:31:5913 days ago1733988719
0x235b3008...Ba51E0248
0 ETH
213622822024-12-09 3:34:1117 days ago1733715251
0x235b3008...Ba51E0248
0 ETH
213622822024-12-09 3:34:1117 days ago1733715251
0x235b3008...Ba51E0248
0 ETH
213554482024-12-08 4:40:4718 days ago1733632847
0x235b3008...Ba51E0248
0 ETH
213554482024-12-08 4:40:4718 days ago1733632847
0x235b3008...Ba51E0248
0 ETH
213372242024-12-05 15:35:1120 days ago1733412911
0x235b3008...Ba51E0248
0 ETH
213372242024-12-05 15:35:1120 days ago1733412911
0x235b3008...Ba51E0248
0 ETH
213364112024-12-05 12:51:3520 days ago1733403095
0x235b3008...Ba51E0248
0 ETH
213364112024-12-05 12:51:3520 days ago1733403095
0x235b3008...Ba51E0248
0 ETH
213325202024-12-04 23:48:2321 days ago1733356103
0x235b3008...Ba51E0248
0 ETH
213325202024-12-04 23:48:2321 days ago1733356103
0x235b3008...Ba51E0248
0 ETH
212584032024-11-24 15:08:5931 days ago1732460939
0x235b3008...Ba51E0248
0 ETH
212584032024-11-24 15:08:5931 days ago1732460939
0x235b3008...Ba51E0248
0 ETH
212584032024-11-24 15:08:5931 days ago1732460939
0x235b3008...Ba51E0248
0 ETH
212391552024-11-21 22:40:4734 days ago1732228847
0x235b3008...Ba51E0248
0 ETH
212391552024-11-21 22:40:4734 days ago1732228847
0x235b3008...Ba51E0248
0 ETH
212391552024-11-21 22:40:4734 days ago1732228847
0x235b3008...Ba51E0248
0 ETH
212286552024-11-20 11:28:5935 days ago1732102139
0x235b3008...Ba51E0248
0 ETH
212286552024-11-20 11:28:5935 days ago1732102139
0x235b3008...Ba51E0248
0 ETH
212286552024-11-20 11:28:5935 days ago1732102139
0x235b3008...Ba51E0248
0 ETH
212286002024-11-20 11:17:5935 days ago1732101479
0x235b3008...Ba51E0248
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Swapper

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Unlicense license
File 1 of 4 : Swapper.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import "./IERC20BAO.sol";
import "../node_modules/solmate/src/tokens/ERC20.sol";
import "../node_modules/solmate/src/utils/ReentrancyGuard.sol";

contract Swapper is ReentrancyGuard {
    ERC20 public immutable baoV1;
    IERC20BAO public immutable baoV2;

    constructor(address _baoV2) {
        // BaoV1 Token is a hardcoded constant
        baoV1 = ERC20(0x374CB8C27130E2c9E04F44303f3c8351B9De61C1);
        baoV2 = IERC20BAO(_baoV2);
    }

    function convertV1(address _to, uint256 _amount) external nonReentrant {
        baoV1.transferFrom(msg.sender, address(0x000000000000000000000000000000000000dEaD), _amount); // Burn BaoV1
        baoV2.transfer(_to, _amount / 1000); // BaoV2's supply is reduced by a factor of 1000, FLOOR DIV
    }
}

File 2 of 4 : IERC20BAO.sol
pragma solidity ^0.8.13;

interface IERC20BAO {
    function balanceOf(address _addr) external view returns(uint256);
    function update_mining_parameters() external;
    function start_epoch_time_write() external;
    function future_epoch_time_write() external;
    function available_supply() external;
    function mintable_in_timeframe(uint256 start,uint256 end) external;
    function set_minters(address _minter, address _swapper) external;
    function set_admin(address _admin) external;
    function transfer(address _to, uint256 _value) external;
    function transferFrom(address _from, address _to, uint256 _value) external;
    function approve(address _spender, uint256 _value) external;
    function mint(address _to, uint256 _value) external returns (bool);
    function burn(uint256 _value) external;
}

File 3 of 4 : ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

File 4 of 4 : ReentrancyGuard.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Gas optimized reentrancy protection for smart contracts.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ReentrancyGuard.sol)
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)
abstract contract ReentrancyGuard {
    uint256 private locked = 1;

    modifier nonReentrant() virtual {
        require(locked == 1, "REENTRANCY");

        locked = 2;

        _;

        locked = 1;
    }
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_baoV2","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"baoV1","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baoV2","outputs":[{"internalType":"contract IERC20BAO","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"convertV1","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0604052600160005534801561001557600080fd5b506040516103c13803806103c18339810160408190526100349161005d565b73374cb8c27130e2c9e04f44303f3c8351b9de61c16080526001600160a01b031660a05261008d565b60006020828403121561006f57600080fd5b81516001600160a01b038116811461008657600080fd5b9392505050565b60805160a0516103036100be6000396000818160a301526101b10152600081816060015261013101526103036000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063a4f3f05b14610046578063d9f55a971461005b578063eb4b24db1461009e575b600080fd5b61005961005436600461024a565b6100c5565b005b6100827f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b6100827f000000000000000000000000000000000000000000000000000000000000000081565b6000546001146101085760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b604482015260640160405180910390fd5b60026000556040516323b872dd60e01b815233600482015261dead6024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610182573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a69190610282565b506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb836101e36103e8856102ab565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561022957600080fd5b505af115801561023d573d6000803e3d6000fd5b5050600160005550505050565b6000806040838503121561025d57600080fd5b82356001600160a01b038116811461027457600080fd5b946020939093013593505050565b60006020828403121561029457600080fd5b815180151581146102a457600080fd5b9392505050565b6000826102c857634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220c2933cbc0c99f610a5c1ca2d5225f9f79fd0fc23890673ccd87d92412d3b2daf64736f6c63430008110033000000000000000000000000ce391315b414d4c7555956120461d21808a69f3a

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063a4f3f05b14610046578063d9f55a971461005b578063eb4b24db1461009e575b600080fd5b61005961005436600461024a565b6100c5565b005b6100827f000000000000000000000000374cb8c27130e2c9e04f44303f3c8351b9de61c181565b6040516001600160a01b03909116815260200160405180910390f35b6100827f000000000000000000000000ce391315b414d4c7555956120461d21808a69f3a81565b6000546001146101085760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b604482015260640160405180910390fd5b60026000556040516323b872dd60e01b815233600482015261dead6024820152604481018290527f000000000000000000000000374cb8c27130e2c9e04f44303f3c8351b9de61c16001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610182573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a69190610282565b506001600160a01b037f000000000000000000000000ce391315b414d4c7555956120461d21808a69f3a1663a9059cbb836101e36103e8856102ab565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561022957600080fd5b505af115801561023d573d6000803e3d6000fd5b5050600160005550505050565b6000806040838503121561025d57600080fd5b82356001600160a01b038116811461027457600080fd5b946020939093013593505050565b60006020828403121561029457600080fd5b815180151581146102a457600080fd5b9392505050565b6000826102c857634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220c2933cbc0c99f610a5c1ca2d5225f9f79fd0fc23890673ccd87d92412d3b2daf64736f6c63430008110033

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

000000000000000000000000ce391315b414d4c7555956120461d21808a69f3a

-----Decoded View---------------
Arg [0] : _baoV2 (address): 0xCe391315b414D4c7555956120461D21808A69F3A

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000ce391315b414d4c7555956120461d21808a69f3a


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.