Contract 0xe52509181feb30eb4979e29ec70d50fd5c44d590 1

 
Txn Hash
Block
From
To
Value [Txn Fee]
0xdfde1524a970a080b3362d743f2506c2d69f8517d8c6e331f49b036ed4c63e10173797382021-07-29 4:24:1231 mins ago0xfe655ec770e2b532c85e9867f79fb4a8c2dcf4de IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.0000559776
0xbc9c8ec056a8fc83182f6de6562f4018e5d3211da3d0e028e373e50146195470173791852021-07-29 3:58:4456 mins ago0xac4a1c8c3633d1ac61b976236d33d781775cad17 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.00163268
0x05cfaaaa20df33ccae6d8ee6caef128f59f14d025a43e05098fc41b9a5dd6e0c173790932021-07-29 3:55:3659 mins ago0x677f86924673fba148b6d11003b35e8aa0129ba5 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000352143
0x162c447d55d03a7622673bd034e3c81185b96bf6800c7ba7bbafe8d25bd18b48173777642021-07-29 2:56:501 hr 58 mins ago0x50f2c27062fa29459923e6511606c35b2e3a7eef IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000076498661
0x5700fbf5836b1f04a571de38ab0343d218d2fe521f8efbb91f3c99a7c83cdb3f173772512021-07-29 2:30:402 hrs 24 mins ago0x304b6f7708b098c166ce327ea7c06a775f9efbfa IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000046648
0x781e1942b8f2afc6673e8f9f7a3d248a52a28ad87d0488e41c635de9a8cfeae9173748622021-07-29 0:54:304 hrs ago0xf7bb7c7d2fb8ec4768f01b23e3349a774702452b IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000088696369
0x7d74d86b074cb8f92a0fd17082c608075e4472ff9f6057b4bd7c5f5bc5a6ffb9173721772021-07-28 23:11:135 hrs 44 mins ago0x15b5092ee698a5ed2f1886a388845191c12e7a86 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.0000559776
0x3a5e274a0f03a7c4edd7fd01ec2b6c4f24e262c7796fda138791202a4e6e8d44173706892021-07-28 22:15:496 hrs 39 mins ago0x5ddb49f23a2e5d83f348a0287085056a0612b365 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000046648
0x9526a8349e06013b40551606622172883bfc5e5cd4c4b2e8356c89ee8caa9297173702672021-07-28 22:00:056 hrs 55 mins ago0xa3f46346230415bc8ad2f4bdbb7803f5bd6f5ce6 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000026748
0xf28bf269d82c26f78bc633046f584090a335a171cc73e0d51204b81ba97824a5173702522021-07-28 21:59:056 hrs 56 mins ago0xa3f46346230415bc8ad2f4bdbb7803f5bd6f5ce6 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000046648
0x7632009a76b10625a1170c16f4b58e7718b6162107eacd5d91d4436f8c85d8fa173696732021-07-28 21:32:177 hrs 23 mins ago0x27cc46dbc92eca7785103483e82de0c6246124e4 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000046648
0x998f424169310b244711b8af62b1ecbd3bd227bea51ee7267013efbd9f44b2ef173695992021-07-28 21:29:417 hrs 25 mins ago0xa3f46346230415bc8ad2f4bdbb7803f5bd6f5ce6 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000046648
0xf771f596807ddb6f8f6c25d0d062596a0675c57096ea9d5dee7712520355d26f173693572021-07-28 21:12:537 hrs 42 mins ago0x75f74de8c945725703f1a000521dc72a4f27701e IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.001586032
0xf7b8acb5155758ef29d4eec5bdbb6c7782c9b299602767e4c983504f7c50322f173690162021-07-28 20:53:478 hrs 1 min ago0x9ef0e2132d30e7a3d8f151a62f19fe6afc718f34 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.0046648
0x9ab9cf3e309eb67b97901be5ae91a2a9a5ab5541e33dfc0a3e3abd3bd50ec125173665332021-07-28 18:27:3310 hrs 27 mins ago0x20d2ad05f6b445e4d4a85ea7e08203f23da7c3a9 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000046648
0xc0e24d4768f2fd6023bcddaf6e62f28a151b71303db693f61e05f9ce877b6df3173645312021-07-28 16:31:3912 hrs 23 mins ago0x813895135ca56b2aaea87beb196177c1ac8a2155 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000163268
0xa5217c8dc654395988431b162004689e39df1fb5aaaa7e12be555f3f93eef9cf173618492021-07-28 14:18:4214 hrs 36 mins ago0x58dbfe31ce1e639ec9d0da60d82cabce637b2ba4 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000057475
0xde5293899a9f4a781797e9f41a03f083b83889023b9bfc1675a074900e3a206c173613152021-07-28 13:53:1415 hrs 2 mins ago0xae327ed5c469e7a4668f250f4d91423f1be05b41 IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000373184
0x59e14ffd80762830258da4eb100633fd304e8a79c0ec58f730419195c1e1442d173609522021-07-28 13:39:3215 hrs 15 mins ago0x779bf353a2d5d183192f1aad447d4b29c25cf48e IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000139944
0xa8a962f0198c7c5583f31635384142805f6ca020d9ff7d13a63c35207c816d0e173576952021-07-28 10:54:0918 hrs 1 min ago0xe94015fd6349bdb194d96f252f47d8cd53b7d66c IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000326536
0x5550c35a57557a66d2e43d0f7321a73c693a62da0cd514b98fe2fb6cf8e06668173541292021-07-28 8:25:4820 hrs 29 mins ago0x779bf353a2d5d183192f1aad447d4b29c25cf48e IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000139944
0xfc88671a079ddd105f864be53183c06493a7eab9caa76d4354a7006098771849173507932021-07-28 6:18:0622 hrs 37 mins ago0xd10dbf3ab92f0e9ad22fb2dd524458f47686e1ca IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.0000513128
0x6590a373a3ed32033ae6e3c3eee1195f04dfe10ec1ea5a917ca7181722fd3269173485982021-07-28 4:56:1223 hrs 59 mins ago0x727984d762575ad2b13bc972833536eea577beaa IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.00004711448
0x2d052a6f9e14771c65c733045cd3abe6b5a4b091241c35dc9e569206843d2541173483382021-07-28 4:46:181 day 9 mins ago0xd10dbf3ab92f0e9ad22fb2dd524458f47686e1ca IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.000046741296
0x3993e97b2fdcc9fdffb6eaccdf81c60ff23d5a35c271174642a14d8f6ec59442173470412021-07-28 3:57:271 day 57 mins ago0x4aa8c80431d3021f858086be3a4783541fcbdf1f IN  0xe52509181feb30eb4979e29ec70d50fd5c44d5900 MATIC0.00139804056
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ARTHStablecoin

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 100000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 16 : Arth.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

import {IARTH} from './IARTH.sol';
import {IARTHController} from './IARTHController.sol';
import {IERC20} from '../ERC20/IERC20.sol';
import {ERC20Custom} from '../ERC20/ERC20Custom.sol';
import {SafeMath} from '../utils/math/SafeMath.sol';
import {IAnyswapV4Token} from '../ERC20/IAnyswapV4Token.sol';
import {AnyswapV4Token} from '../ERC20/AnyswapV4Token.sol';

/**
 * @title  ARTHStablecoin.
 * @author MahaDAO.
 */
contract ARTHStablecoin is AnyswapV4Token, IARTH {
    using SafeMath for uint256;

    // bytes32 public constant GOVERNANCE_ROLE = keccak256('GOVERNANCE_ROLE');
    // bytes32 public constant OWNERSHIP_ROLE = keccak256('GOVERNANCE_ROLE');

    address public governance;
    IARTHController public controller;

    uint8 public constant override decimals = 18;
    string public constant symbol = 'ARTH';
    string public constant name = 'ARTH Valuecoin';
    bool public allowRebase = true;

    /// @dev ARTH v1 already in circulation.
    uint256 private INITIAL_AMOUNT_SUPPLY = 25_000_000 ether;
    uint256 public gonsPerFragment = 1e6;

    event Rebase(uint256 supply);
    event PoolBurned(address indexed from, address indexed to, uint256 amount);
    event PoolMinted(address indexed from, address indexed to, uint256 amount);

    modifier onlyPools() {
        require(controller.isPool(msg.sender), 'ARTH: not an approved pool');
        _;
    }

    modifier onlyByOwnerOrGovernance() {
        require(
            msg.sender == owner() || msg.sender == governance,
            'ARTH: not owner or governance'
        );
        _;
    }

    modifier requireValidRecipient(address _recipient) {
        require(
            _recipient != address(0) && _recipient != address(this),
            'ARTH: Cannot transfer tokens directly to the ARTH token contract or the zero address'
        );
        _;
    }

    constructor() AnyswapV4Token(name) {
        _mint(_msgSender(), INITIAL_AMOUNT_SUPPLY);
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
    }

    function transferAndCall(
        address to,
        uint256 value,
        bytes calldata data
    )
        public
        override(IAnyswapV4Token, AnyswapV4Token)
        requireValidRecipient(to)
        returns (bool)
    {
        return super.transferAndCall(to, value, data);
    }

    function transferWithPermit(
        address target,
        address to,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    )
        public
        override(IAnyswapV4Token, AnyswapV4Token)
        requireValidRecipient(to)
        returns (bool)
    {
        return super.transferWithPermit(target, to, value, deadline, v, r, s);
    }

    function transfer(address to, uint256 value)
        public
        virtual
        override(IERC20, ERC20Custom)
        requireValidRecipient(to)
        returns (bool)
    {
        return super.transfer(to, value);
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    )
        public
        virtual
        override(IERC20, ERC20Custom)
        requireValidRecipient(recipient)
        onlyNonBlacklisted(_msgSender())
        returns (bool)
    {
        return super.transferFrom(sender, recipient, amount);
    }

    function revokeRebase() public onlyByOwnerOrGovernance {
        allowRebase = false;
    }

    function totalSupply()
        public
        view
        override(ERC20Custom, IERC20)
        returns (uint256)
    {
        return _totalSupply.div(gonsPerFragment);
    }

    function rebase(uint256 _newGonsPerFragment)
        external
        onlyByOwnerOrGovernance
        returns (uint256)
    {
        require(allowRebase, 'Arth: rebase is revoked');
        gonsPerFragment = _newGonsPerFragment;

        emit Rebase(totalSupply());
        return totalSupply();
    }

    function balanceOf(address account)
        public
        view
        override(IERC20, ERC20Custom)
        returns (uint256)
    {
        return _balances[account].div(gonsPerFragment);
    }

    function _mint(address account, uint256 amount)
        internal
        override
        onlyNonBlacklisted(account)
    {
        require(account != address(0), 'ERC20: mint to the zero address');

        uint256 gonValues = amount.mul(gonsPerFragment);

        _totalSupply = _totalSupply.add(gonValues);
        _balances[account] = _balances[account].add(gonValues);

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

    function _burn(address account, uint256 amount)
        internal
        override
        onlyNonBlacklisted(account)
    {
        require(account != address(0), 'ERC20: burn from the zero address');

        uint256 gonValues = amount.mul(gonsPerFragment);

        _balances[account] = _balances[account].sub(
            gonValues,
            'ERC20: burn amount exceeds balance'
        );

        _totalSupply = _totalSupply.sub(gonValues);

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

    /// @notice Used by pools when user redeems.
    function poolBurnFrom(address who, uint256 amount)
        external
        override
        onlyPools
    {
        super._burnFrom(who, amount);
        emit PoolBurned(who, msg.sender, amount);
    }

    /// @notice This function is what other arth pools will call to mint new ARTH
    function poolMint(address who, uint256 amount) external override onlyPools {
        _mint(who, amount);
        emit PoolMinted(msg.sender, who, amount);
    }

    function setArthController(address _controller)
        external
        override
        onlyOwner
    {
        controller = IARTHController(_controller);
    }

    function _transfer(
        address sender,
        address recipient,
        uint256 value
    ) internal override {
        // get amount in underlying
        uint256 gonValues = value.mul(gonsPerFragment);

        // sub from balance of sender
        _balances[sender] = _balances[sender].sub(gonValues);

        // add to balance of receiver
        _balances[recipient] = _balances[recipient].add(gonValues);
        emit Transfer(msg.sender, recipient, value);
    }
}

File 2 of 16 : IARTH.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {IERC20} from '../ERC20/IERC20.sol';
import {IIncentiveController} from './IIncentive.sol';
import {IAnyswapV4Token} from '../ERC20/IAnyswapV4Token.sol';

interface IARTH is IERC20, IAnyswapV4Token {
    function poolMint(address who, uint256 amount) external;

    function poolBurnFrom(address who, uint256 amount) external;

    function setArthController(address _controller) external;
}

File 3 of 16 : IARTHController.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

interface IARTHController {
    function toggleCollateralRatio() external;

    function addPool(address pool_address) external;

    function addPools(address[] memory poolAddress) external;

    function removePool(address pool_address) external;

    function getARTHSupply() external view returns (uint256);

    function isPool(address pool) external view returns (bool);

    function getARTHInfo()
        external
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256,
            uint256,
            uint256,
            uint256,
            // uint256,
            uint256
        );

    function setMintingFee(uint256 fee) external;

    function setMAHAGMUOracle(address oracle) external;

    function setARTHXGMUOracle(address _arthxOracleAddress) external;

    function setFeesParameters(
        uint256 _mintingFee,
        uint256 _buybackFee,
        uint256 _redemptionFee
    ) external;

    function setRedemptionFee(uint256 fee) external;

    function setBuybackFee(uint256 fee) external;

    function setOwner(address _ownerAddress) external;

    function setTimelock(address newTimelock) external;

    function setGlobalCollateralRatio(uint256 _globalCollateralRatio) external;

    function getARTHXPrice() external view returns (uint256);

    function getMintingFee() external view returns (uint256);

    function getMAHAPrice() external view returns (uint256);

    function getBuybackFee() external view returns (uint256);

    function getRedemptionFee() external view returns (uint256);

    function getGlobalCollateralRatio() external view returns (uint256);

    function getARTHXGenesisDiscount() external view returns (uint256);

    function getGlobalCollateralValue() external view returns (uint256);

    function arthPools(address pool) external view returns (bool);

    function setStabilityFee(uint256 val) external;

    function isRedeemPaused() external view returns (bool);

    function isMintPaused() external view returns (bool);

    function isBuybackPaused() external view returns (bool);

    function isRecollaterlizePaused() external view returns (bool);

    function toggleMinting() external;

    function toggleRedeeming() external;

    function toggleRecollateralize() external;

    function toggleBuyBack() external;

    function getStabilityFee() external view returns (uint256);

    // todo add this here
    function mintingFee() external returns (uint256);

    function redemptionFee() external returns (uint256);

    function buybackFee() external returns (uint256);

    function getRecollateralizationDiscount() external returns (uint256);

    function getIsGenesisActive() external view returns (bool);

    function getARTHXGenesisPrice() external view returns (uint256);

    function getTargetCollateralValue() external view returns (uint256);

    function getPercentCollateralized() external view returns (uint256);
}

File 4 of 16 : IIncentive.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @title incentive contract interface
/// @author Fei Protocol
/// @notice Called by FEI token contract when transferring with an incentivized address
/// @dev should be appointed as a Minter or Burner as needed
interface IIncentiveController {
    /// @notice apply incentives on transfer
    /// @param sender the sender address of the FEI
    /// @param receiver the receiver address of the FEI
    /// @param operator the operator (msg.sender) of the transfer
    /// @param amount the amount of FEI transferred
    function incentivize(
        address sender,
        address receiver,
        address operator,
        uint256 amount
    ) external;
}

File 5 of 16 : AnyswapV4Token.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

import {ERC20Custom} from './ERC20Custom.sol';
import {IAnyswapV4Token} from './IAnyswapV4Token.sol';
import {AccessControl} from '../access/AccessControl.sol';

interface IApprovalReceiver {
    function onTokenApproval(
        address,
        uint256,
        bytes calldata
    ) external returns (bool);
}

interface ITransferReceiver {
    function onTokenTransfer(
        address,
        uint256,
        bytes calldata
    ) external returns (bool);
}

abstract contract AnyswapV4Token is
    ERC20Custom,
    AccessControl,
    IAnyswapV4Token
{
    bytes32 public immutable DOMAIN_SEPARATOR;

    bytes32 public constant BRIDGE_ROLE = keccak256('BRIDGE_ROLE');
    bytes32 public constant PERMIT_TYPEHASH =
        keccak256(
            'Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)'
        );
    bytes32 public constant TRANSFER_TYPEHASH =
        keccak256(
            'Transfer(address owner,address to,uint256 value,uint256 nonce,uint256 deadline)'
        );

    mapping(address => uint256) public override nonces;

    event LogSwapin(
        bytes32 indexed txhash,
        address indexed account,
        uint256 amount
    );

    event LogSwapout(
        address indexed account,
        address indexed bindaddr,
        uint256 amount
    );

    modifier onlyBridge {
        require(
            hasRole(BRIDGE_ROLE, _msgSender()),
            'AnyswapV4Token: forbidden'
        );
        _;
    }

    constructor(string memory name) {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }

        DOMAIN_SEPARATOR = keccak256(
            abi.encode(
                keccak256(
                    'EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'
                ),
                keccak256(bytes(name)),
                keccak256(bytes('1')),
                chainId,
                address(this)
            )
        );

        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
    }

    function approveAndCall(
        address spender,
        uint256 value,
        bytes calldata data
    ) external override returns (bool) {
        _approve(msg.sender, spender, value);
        return
            IApprovalReceiver(spender).onTokenApproval(msg.sender, value, data);
    }

    function transferAndCall(
        address to,
        uint256 value,
        bytes calldata data
    ) public virtual override returns (bool) {
        require(to != address(0) || to != address(this));

        uint256 balance = balanceOf(msg.sender);
        require(
            balance >= value,
            'AnyswapV3ERC20: transfer amount exceeds balance'
        );

        _transfer(msg.sender, to, value);
        return ITransferReceiver(to).onTokenTransfer(msg.sender, value, data);
    }

    function transferWithPermit(
        address target,
        address to,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override returns (bool) {
        require(block.timestamp <= deadline, 'AnyswapV3ERC20: Expired permit');

        bytes32 hashStruct =
            keccak256(
                abi.encode(
                    TRANSFER_TYPEHASH,
                    target,
                    to,
                    value,
                    nonces[target]++,
                    deadline
                )
            );

        require(
            _verifyEIP712(target, hashStruct, v, r, s) ||
                _verifyPersonalSign(target, hashStruct, v, r, s)
        );

        // NOTE: is this check needed, was there in the refered contract.
        require(to != address(0) || to != address(this));
        require(
            balanceOf(target) >= value,
            'AnyswapV3ERC20: transfer amount exceeds balance'
        );

        _transfer(target, to, value);
        return true;
    }

    function permit(
        address target,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public override {
        require(block.timestamp <= deadline, 'AnyswapV3ERC20: Expired permit');

        bytes32 hashStruct =
            keccak256(
                abi.encode(
                    PERMIT_TYPEHASH,
                    target,
                    spender,
                    value,
                    nonces[target]++,
                    deadline
                )
            );

        require(
            _verifyEIP712(target, hashStruct, v, r, s) ||
                _verifyPersonalSign(target, hashStruct, v, r, s)
        );

        _approve(target, spender, value);
        emit Approval(target, spender, value);
    }

    /// @dev Only Auth needs to be implemented
    function Swapin(
        bytes32 txhash,
        address account,
        uint256 amount
    ) public override onlyBridge returns (bool) {
        _mint(account, amount);
        emit LogSwapin(txhash, account, amount);
        return true;
    }

    function Swapout(uint256 amount, address bindaddr)
        public
        override
        onlyBridge
        returns (bool)
    {
        require(bindaddr != address(0), 'AnyswapV4ERC20: address(0x0)');

        _burn(msg.sender, amount);
        emit LogSwapout(msg.sender, bindaddr, amount);
        return true;
    }

    function _verifyEIP712(
        address target,
        bytes32 hashStruct,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal view returns (bool) {
        bytes32 hash =
            keccak256(
                abi.encodePacked('\x19\x01', DOMAIN_SEPARATOR, hashStruct)
            );
        address signer = ecrecover(hash, v, r, s);

        return (signer != address(0) && signer == target);
    }

    /// @dev Builds a _prefixed hash to mimic the behavior of eth_sign.
    function _prefixed(bytes32 hash) internal pure returns (bytes32) {
        return
            keccak256(
                abi.encodePacked('\x19Ethereum Signed Message:\n32', hash)
            );
    }

    function _verifyPersonalSign(
        address target,
        bytes32 hashStruct,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (bool) {
        bytes32 hash = _prefixed(hashStruct);
        address signer = ecrecover(hash, v, r, s);
        return (signer != address(0) && signer == target);
    }
}

File 6 of 16 : ERC20Custom.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {IERC20} from './IERC20.sol';
import {Address} from '../utils/Address.sol';
import {Context} from '../utils/Context.sol';
import {SafeMath} from '../utils/math/SafeMath.sol';
import {Pausable} from '../security/Pausable.sol';
import {Ownable} from '../access/Ownable.sol';

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20Mintable}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
abstract contract ERC20Custom is Pausable, IERC20, Ownable {
    using SafeMath for uint256;

    uint256 internal _totalSupply;

    mapping(address => bool) internal _blacklisted;
    mapping(address => uint256) internal _balances;
    mapping(address => mapping(address => uint256)) internal _allowances;

    /**
     * Modifiers
     */
    modifier onlyNonBlacklisted(address who) {
        require(!getIsBlacklisted(who), 'ERC20Custom: address is blacklisted');
        _;
    }

    /**
     * Constructor.
     */
    constructor() {}

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account)
        public
        view
        virtual
        override
        returns (uint256)
    {
        return _balances[account];
    }

    /**
     * @dev Returns if an address is blackListed or not.
     */
    function getIsBlacklisted(address who) public view returns (bool) {
        return _blacklisted[who];
    }

    /**
     * @dev Blacklists an address.
     */
    function blacklist(address who) public onlyOwner returns (bool) {
        if (getIsBlacklisted(who)) return true;
        _blacklisted[who] = true;
        return true;
    }

    function pause() public onlyOwner {
        _pause();
    }

    function unpause() public onlyOwner {
        _unpause();
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount)
        public
        virtual
        override
        returns (bool)
    {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender)
        public
        view
        virtual
        override
        returns (uint256)
    {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.approve(address spender, uint256 amount)
     */
    function approve(address spender, uint256 amount)
        public
        virtual
        override
        returns (bool)
    {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for `sender`'s tokens of at least
     * `amount`.
     *
     * NOTE: The `spender i.e msg.sender` and the `owner` both should not be blacklisted.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override onlyNonBlacklisted(_msgSender()) returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(
            sender,
            _msgSender(),
            _allowances[sender][_msgSender()].sub(
                amount,
                'ERC20: transfer amount exceeds allowance'
            )
        );

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue)
        public
        virtual
        returns (bool)
    {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender].add(addedValue)
        );
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue)
        public
        virtual
        returns (bool)
    {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender].sub(
                subtractedValue,
                'ERC20: decreased allowance below zero'
            )
        );
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     *
     * NOTE: The `sender` should not be blacklisted.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual whenNotPaused onlyNonBlacklisted(sender) {
        require(sender != address(0), 'ERC20: transfer from the zero address');
        require(recipient != address(0), 'ERC20: transfer to the zero address');

        _beforeTokenTransfer(sender, recipient, amount);

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

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     *
     *  NOTE: The `account` should not be blacklisted.
     */
    function _mint(address account, uint256 amount)
        internal
        virtual
        onlyNonBlacklisted(account)
    {
        require(account != address(0), 'ERC20: mint to the zero address');

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for `accounts`'s tokens of at least
     * `amount`.
     *
     * NOTE: The `account` and `burner i.e msg.sender` both should not be blacklisted.
     */
    function burnFrom(address account, uint256 amount)
        public
        virtual
        onlyNonBlacklisted(_msgSender())
    {
        uint256 decreasedAllowance =
            allowance(account, _msgSender()).sub(
                amount,
                'ERC20: burn amount exceeds allowance'
            );

        _approve(account, _msgSender(), decreasedAllowance);
        _burn(account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     *
     *  NOTE: The `account` should not be blacklisted.
     */
    function _burn(address account, uint256 amount)
        internal
        virtual
        onlyNonBlacklisted(account)
    {
        require(account != address(0), 'ERC20: burn from the zero address');

        _beforeTokenTransfer(account, address(0), amount);

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

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        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);
    }

    /**
     * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount)
        internal
        virtual
        onlyNonBlacklisted(_msgSender())
    {
        _burn(account, amount);
        _approve(
            account,
            _msgSender(),
            _allowances[account][_msgSender()].sub(
                amount,
                'ERC20: burn amount exceeds allowance'
            )
        );
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of `from`'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of `from`'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:using-hooks.adoc[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 7 of 16 : IAnyswapV4Token.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IAnyswapV4Token {
    function approveAndCall(
        address spender,
        uint256 value,
        bytes calldata data
    ) external returns (bool);

    function transferAndCall(
        address to,
        uint256 value,
        bytes calldata data
    ) external returns (bool);

    function transferWithPermit(
        address target,
        address to,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (bool);

    function Swapin(
        bytes32 txhash,
        address account,
        uint256 amount
    ) external returns (bool);

    function Swapout(uint256 amount, address bindaddr) external returns (bool);

    function nonces(address owner) external view returns (uint256);

    function permit(
        address target,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 8 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

File 9 of 16 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import '../utils/Context.sol';
import '../utils/introspection/ERC165.sol';

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    function hasRole(bytes32 role, address account)
        external
        view
        returns (bool);

    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    function grantRole(bytes32 role, address account) external;

    function revokeRole(bytes32 role, address account) external;

    function renounceRole(bytes32 role, address account) external;
}

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(
        bytes32 indexed role,
        bytes32 indexed previousAdminRole,
        bytes32 indexed newAdminRole
    );

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(
        bytes32 indexed role,
        address indexed account,
        address indexed sender
    );

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(
        bytes32 indexed role,
        address indexed account,
        address indexed sender
    );

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IAccessControl).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account)
        public
        view
        override
        returns (bool)
    {
        return _roles[role].members[account];
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override {
        require(
            hasRole(getRoleAdmin(role), _msgSender()),
            'AccessControl: sender must be an admin to grant'
        );

        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override {
        require(
            hasRole(getRoleAdmin(role), _msgSender()),
            'AccessControl: sender must be an admin to revoke'
        );

        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account)
        public
        virtual
        override
    {
        require(
            account == _msgSender(),
            'AccessControl: can only renounce roles for self'
        );

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, getRoleAdmin(role), adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 10 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import '../utils/Context.sol';

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract 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 virtual 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 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;
    }
}

File 11 of 16 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 12 of 16 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
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) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @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'
        );
        require(isContract(target), 'Address: call to non-contract');

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) =
            target.call{value: value}(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data)
        internal
        view
        returns (bytes memory)
    {
        return
            functionStaticCall(
                target,
                data,
                'Address: low-level static call failed'
            );
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), 'Address: static call to non-contract');

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data)
        internal
        returns (bytes memory)
    {
        return
            functionDelegateCall(
                target,
                data,
                'Address: low-level delegate call failed'
            );
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), 'Address: delegate call to non-contract');

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        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);
            }
        }
    }
}

File 13 of 16 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

File 14 of 16 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 15 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 16 of 16 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // 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 (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @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) {
        return a + b;
    }

    /**
     * @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 a - b;
    }

    /**
     * @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) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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 a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards 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).
     *
     * 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"txhash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogSwapin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"bindaddr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogSwapout","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PoolBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PoolMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"supply","type":"uint256"}],"name":"Rebase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"BRIDGE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"txhash","type":"bytes32"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Swapin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"bindaddr","type":"address"}],"name":"Swapout","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"TRANSFER_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowRebase","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"approveAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"}],"name":"blacklist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"contract IARTHController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"}],"name":"getIsBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gonsPerFragment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"poolBurnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"poolMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newGonsPerFragment","type":"uint256"}],"name":"rebase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeRebase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setArthController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"transferAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"transferWithPermit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040526008805460ff60a01b1916600160a01b1790556a14adf4b7320334b9000000600955620f4240600a553480156200003a57600080fd5b5060408051808201909152600e81526d20a92a24102b30b63ab2b1b7b4b760911b60208201526000805460ff1916815562000074620001a1565b60008054610100600160a81b0319166101006001600160a01b038416908102919091178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350805160208083019190912060408051808201825260018152603160f81b9084015251469262000140927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f9290917fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6918691309101620003db565b60408051601f1981840301815291905280516020909101206080526200017160006200016b620001a1565b620001a5565b506200018b905062000182620001a1565b600954620001b5565b6200019b60006200016b620001a1565b620004dd565b3390565b620001b18282620002e3565b5050565b81620001c1816200036f565b15620001ea5760405162461bcd60e51b8152600401620001e19062000407565b60405180910390fd5b6001600160a01b038316620002135760405162461bcd60e51b8152600401620001e1906200044a565b600062000231600a54846200038d60201b62001bb91790919060201c565b90506200024f81600154620003a260201b62001bcc1790919060201c565b6001556001600160a01b0384166000908152600360209081526040909120546200028491839062001bcc620003a2821b17901c565b6001600160a01b0385166000818152600360205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90620002d590879062000481565b60405180910390a350505050565b620002ef8282620003b0565b620001b15760008281526005602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200032b620001a1565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6001600160a01b031660009081526002602052604090205460ff1690565b60006200039b8284620004a5565b9392505050565b60006200039b82846200048a565b60009182526005602090815260408084206001600160a01b0393909316845291905290205460ff1690565b9485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b60208082526023908201527f4552433230437573746f6d3a206164647265737320697320626c61636b6c69736040820152621d195960ea1b606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b60008219821115620004a057620004a0620004c7565b500190565b6000816000190483118215151615620004c257620004c2620004c7565b500290565b634e487b7160e01b600052601160045260246000fd5b6080516136316200050060003960008181610b29015261279701526136316000f3fe608060405234801561001057600080fd5b506004361061031f5760003560e01c806371344e69116101a7578063b5bfddea116100ee578063e86340f211610097578063f77c479111610071578063f77c47911461060c578063f83e659014610614578063f9f92be41461061c5761031f565b8063e86340f2146105d3578063ec126c77146105e6578063f2fde38b146105f95761031f565b8063d505accf116100c8578063d505accf1461059a578063d547741f146105ad578063dd62ed3e146105c05761031f565b8063b5bfddea1461056c578063bc4f2d6d14610574578063cae9ca51146105875761031f565b80638da5cb5b11610150578063a217fddf1161012a578063a217fddf1461053e578063a457c2d714610546578063a9059cbb146105595761031f565b80638da5cb5b1461051b57806391d148541461052357806395d89b41146105365761031f565b80637ecebe00116101815780637ecebe00146104f85780637ed8f6531461050b5780638456cb59146105135761031f565b806371344e69146104ca578063715018a6146104dd57806379cc6790146104e55761031f565b80633644e5151161026b57806346cd00da11610214578063605629d6116101ee578063605629d614610491578063628d6cba146104a457806370a08231146104b75761031f565b806346cd00da1461046c5780635aa6e675146104745780635c975abb146104895761031f565b80633f4ba83a116102455780633f4ba83a1461043e5780634000aea01461044657806342966c68146104595761031f565b80633644e5151461041057806336568abe14610418578063395093511461042b5761031f565b806318160ddd116102cd5780632f2ff15d116102a75780632f2ff15d146103e057806330adf81f146103f3578063313ce567146103fb5761031f565b806318160ddd146103b257806323b872dd146103ba578063248a9ca3146103cd5761031f565b8063095ea7b3116102fe578063095ea7b3146103775780630a0c165a1461038a5780630c407d561461039f5761031f565b8062bf26f41461032457806301ffc9a71461034257806306fdde0314610362575b600080fd5b61032c61062f565b6040516103399190612d88565b60405180910390f35b610355610350366004612c44565b610653565b6040516103399190612d7d565b61036a6106b1565b6040516103399190612df0565b610355610385366004612b1b565b6106ea565b61039d610398366004612b1b565b610707565b005b61039d6103ad366004612b1b565b61085f565b61032c6109a2565b6103556103c8366004612a6f565b6109c0565b61032c6103db366004612be6565b610a91565b61039d6103ee366004612bfe565b610aa6565b61032c610afe565b610403610b22565b604051610339919061344d565b61032c610b27565b61039d610426366004612bfe565b610b4b565b610355610439366004612b1b565b610bc1565b61039d610c21565b610355610454366004612b44565b610c9e565b61039d610467366004612be6565b610d1e565b61039d610d32565b61047c610dea565b6040516103399190612ceb565b610355610e06565b61035561049f366004612aaa565b610e0f565b6103556104b2366004612bfe565b610e9f565b61032c6104c5366004612a23565b610fc8565b6103556104d8366004612a23565b610ffd565b61039d611028565b61039d6104f3366004612b1b565b61110e565b61032c610506366004612a23565b6111ac565b61032c6111be565b61039d6111c4565b61047c61123f565b610355610531366004612bfe565b611260565b61036a611298565b61032c6112d1565b610355610554366004612b1b565b6112d6565b610355610567366004612b1b565b61134b565b61032c6113d1565b61032c610582366004612be6565b6113f5565b610355610595366004612b44565b611524565b61039d6105a8366004612aaa565b6115e2565b61039d6105bb366004612bfe565b61174b565b61032c6105ce366004612a3d565b61178d565b61039d6105e1366004612a23565b6117c5565b6103556105f4366004612c20565b61187f565b61039d610607366004612a23565b611946565b61047c611a9d565b610355611ab9565b61035561062a366004612a23565b611ada565b7f42ce63790c28229c123925d83266e77c04d28784552ab68b350a9003226cbd5981565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806106a957506106a982611bd8565b90505b919050565b6040518060400160405280600e81526020017f415254482056616c7565636f696e00000000000000000000000000000000000081525081565b60006106fe6106f7611c22565b8484611c26565b50600192915050565b6008546040517f5b16ebb700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690635b16ebb79061075d903390600401612ceb565b60206040518083038186803b15801561077557600080fd5b505afa158015610789573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ad9190612bc6565b6107ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e3906130a0565b60405180910390fd5b6107f68282611d35565b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f7f5ada11609a36146ba785caedbb5ef5091e262c6c2b14acebb4a0c67b7130ba836040516108539190612d88565b60405180910390a35050565b6008546040517f5b16ebb700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690635b16ebb7906108b5903390600401612ceb565b60206040518083038186803b1580156108cd57600080fd5b505afa1580156108e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109059190612bc6565b61093b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e3906130a0565b6109458282611e11565b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f6e0fb5aac32b120b1cb6c805fd0019635d58bc14957ec53c5a1d68cbfe281589836040516108539190612d88565b60006109bb600a54600154611f6390919063ffffffff16565b905090565b60008273ffffffffffffffffffffffffffffffffffffffff8116158015906109fe575073ffffffffffffffffffffffffffffffffffffffff81163014155b610a34576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390613336565b610a3c611c22565b610a4581610ffd565b15610a7c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061310e565b610a87868686611f6f565b9695505050505050565b60009081526005602052604090206001015490565b610aba610ab283610a91565b610531611c22565b610af0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390612e61565b610afa8282612026565b5050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b7f000000000000000000000000000000000000000000000000000000000000000081565b610b53611c22565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610bb7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e3906133b9565b610afa82826120f2565b60006106fe610bce611c22565b84610c1c8560046000610bdf611c22565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c168152925290205490611bcc565b611c26565b610c29611c22565b73ffffffffffffffffffffffffffffffffffffffff16610c4761123f565b73ffffffffffffffffffffffffffffffffffffffff1614610c94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061316b565b610c9c6121bc565b565b60008473ffffffffffffffffffffffffffffffffffffffff811615801590610cdc575073ffffffffffffffffffffffffffffffffffffffff81163014155b610d12576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390613336565b610a8786868686612262565b610d2f610d29611c22565b826123a3565b50565b610d3a61123f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610d8a575060075473ffffffffffffffffffffffffffffffffffffffff1633145b610dc0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e3906132c8565b600880547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b60005460ff1690565b60008673ffffffffffffffffffffffffffffffffffffffff811615801590610e4d575073ffffffffffffffffffffffffffffffffffffffff81163014155b610e83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390613336565b610e9289898989898989612515565b9998505050505050505050565b6000610ecd7f52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5f610531611c22565b610f03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e3906132ff565b73ffffffffffffffffffffffffffffffffffffffff8216610f50576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390613234565b610f5a33846123a3565b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f6b616089d04950dc06c45c6dd787d657980543f89651aec47924752c7d16c88885604051610fb79190612d88565b60405180910390a350600192915050565b600a5473ffffffffffffffffffffffffffffffffffffffff821660009081526003602052604081205490916106a99190611f63565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205460ff1690565b611030611c22565b73ffffffffffffffffffffffffffffffffffffffff1661104e61123f565b73ffffffffffffffffffffffffffffffffffffffff161461109b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061316b565b6000805460405161010090910473ffffffffffffffffffffffffffffffffffffffff16907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffff0000000000000000000000000000000000000000ff169055565b611116611c22565b61111f81610ffd565b15611156576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061310e565b6000611188836040518060600160405280602481526020016135b360249139611181876105ce611c22565b91906126a5565b905061119c84611196611c22565b83611c26565b6111a684846123a3565b50505050565b60066020526000908152604090205481565b600a5481565b6111cc611c22565b73ffffffffffffffffffffffffffffffffffffffff166111ea61123f565b73ffffffffffffffffffffffffffffffffffffffff1614611237576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061316b565b610c9c6126eb565b600054610100900473ffffffffffffffffffffffffffffffffffffffff1690565b600091825260056020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6040518060400160405280600481526020017f415254480000000000000000000000000000000000000000000000000000000081525081565b600081565b60006106fe6112e3611c22565b84610c1c856040518060600160405280602581526020016135d7602591396004600061130d611c22565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d168152925290205491906126a5565b60008273ffffffffffffffffffffffffffffffffffffffff811615801590611389575073ffffffffffffffffffffffffffffffffffffffff81163014155b6113bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390613336565b6113c9848461277e565b949350505050565b7f52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5f81565b60006113ff61123f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061144f575060075473ffffffffffffffffffffffffffffffffffffffff1633145b611485576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e3906132c8565b60085474010000000000000000000000000000000000000000900460ff166114d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e3906131fd565b600a8290557fafae32ce2847c13a56ab802c034c27d3c19f1d61be48c424c5df134145cd44d06115076109a2565b6040516115149190612d88565b60405180910390a16106a96109a2565b6000611531338686611c26565b6040517eba451f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86169062ba451f90611587903390889088908890600401612d0c565b602060405180830381600087803b1580156115a157600080fd5b505af11580156115b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d99190612bc6565b95945050505050565b8342111561161c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e3906130d7565b73ffffffffffffffffffffffffffffffffffffffff8716600090815260066020526040812080547f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918a918a918a91908661167683613500565b919050558960405160200161169096959493929190612d91565b6040516020818303038152906040528051906020012090506116b58882868686612792565b806116c857506116c888828686866128ae565b6116d157600080fd5b6116dc888888611c26565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925886040516117399190612d88565b60405180910390a35050505050505050565b611757610ab283610a91565b610bb7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061300c565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260046020908152604080832093909416825291909152205490565b6117cd611c22565b73ffffffffffffffffffffffffffffffffffffffff166117eb61123f565b73ffffffffffffffffffffffffffffffffffffffff1614611838576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061316b565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60006118ad7f52ba824bfabc2bcfcdf7f0edbb486ebb05e1836c90e78047efeb949990f72e5f610531611c22565b6118e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e3906132ff565b6118ed8383611e11565b8273ffffffffffffffffffffffffffffffffffffffff16847f05d0634fe981be85c22e2942a880821b70095d84e152c3ea3c17a4e4250d9d61846040516119349190612d88565b60405180910390a35060019392505050565b61194e611c22565b73ffffffffffffffffffffffffffffffffffffffff1661196c61123f565b73ffffffffffffffffffffffffffffffffffffffff16146119b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061316b565b73ffffffffffffffffffffffffffffffffffffffff8116611a06576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390612ef5565b6000805460405173ffffffffffffffffffffffffffffffffffffffff8085169361010090930416917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b60085474010000000000000000000000000000000000000000900460ff1681565b6000611ae4611c22565b73ffffffffffffffffffffffffffffffffffffffff16611b0261123f565b73ffffffffffffffffffffffffffffffffffffffff1614611b4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061316b565b611b5882610ffd565b15611b65575060016106ac565b5073ffffffffffffffffffffffffffffffffffffffff16600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915590565b6000611bc582846134ac565b9392505050565b6000611bc5828461345b565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b3390565b73ffffffffffffffffffffffffffffffffffffffff8316611c73576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061326b565b73ffffffffffffffffffffffffffffffffffffffff8216611cc0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390612f52565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526004602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590611d28908590612d88565b60405180910390a3505050565b611d3d611c22565b611d4681610ffd565b15611d7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061310e565b611d8783836123a3565b611e0c83611d93611c22565b610c1c856040518060600160405280602481526020016135b36024913973ffffffffffffffffffffffffffffffffffffffff8916600090815260046020526040812090611dde611c22565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205491906126a5565b505050565b81611e1b81610ffd565b15611e52576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061310e565b73ffffffffffffffffffffffffffffffffffffffff8316611e9f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390613416565b6000611eb6600a5484611bb990919063ffffffff16565b600154909150611ec69082611bcc565b60015573ffffffffffffffffffffffffffffffffffffffff8416600090815260036020526040902054611ef99082611bcc565b73ffffffffffffffffffffffffffffffffffffffff85166000818152600360205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611f55908790612d88565b60405180910390a350505050565b6000611bc58284613473565b6000611f79611c22565b611f8281610ffd565b15611fb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061310e565b611fc48585856128e1565b61201b85611fd0611c22565b610c1c8660405180606001604052806028815260200161358b6028913973ffffffffffffffffffffffffffffffffffffffff8b16600090815260046020526040812090611dde611c22565b506001949350505050565b6120308282611260565b610afa57600082815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055612094611c22565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6120fc8282611260565b15610afa57600082815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905561215e611c22565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6121c4610e06565b6121fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390612ebe565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61224b611c22565b6040516122589190612ceb565b60405180910390a1565b600073ffffffffffffffffffffffffffffffffffffffff851615158061229e575073ffffffffffffffffffffffffffffffffffffffff85163014155b6122a757600080fd5b60006122b233610fc8565b9050848110156122ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390612faf565b6122f93387876128e1565b6040517fa4c0ed3600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87169063a4c0ed3690612351903390899089908990600401612d0c565b602060405180830381600087803b15801561236b57600080fd5b505af115801561237f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a879190612bc6565b816123ad81610ffd565b156123e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39061310e565b73ffffffffffffffffffffffffffffffffffffffff8316612431576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e3906131a0565b6000612448600a5484611bb990919063ffffffff16565b9050612494816040518060600160405280602281526020016135696022913973ffffffffffffffffffffffffffffffffffffffff871660009081526003602052604090205491906126a5565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600360205260409020556001546124c790826129c3565b60015560405160009073ffffffffffffffffffffffffffffffffffffffff8616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611f55908790612d88565b600084421115612551576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e3906130d7565b73ffffffffffffffffffffffffffffffffffffffff8816600090815260066020526040812080547f42ce63790c28229c123925d83266e77c04d28784552ab68b350a9003226cbd59918b918b918b9190866125ab83613500565b919050558a6040516020016125c596959493929190612d91565b6040516020818303038152906040528051906020012090506125ea8982878787612792565b806125fd57506125fd89828787876128ae565b61260657600080fd5b73ffffffffffffffffffffffffffffffffffffffff8816151580612640575073ffffffffffffffffffffffffffffffffffffffff88163014155b61264957600080fd5b866126538a610fc8565b101561268b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390612faf565b6126968989896128e1565b50600198975050505050505050565b600081848411156126e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e39190612df0565b505050900390565b6126f3610e06565b1561272a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e390613069565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861224b611c22565b60006106fe61278b611c22565b84846128e1565b6000807f0000000000000000000000000000000000000000000000000000000000000000866040516020016127c8929190612cb5565b6040516020818303038152906040528051906020012090506000600182878787604051600081526020016040526040516128059493929190612dd2565b6020604051602081039080840390855afa158015612827573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116158015906128a257508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b98975050505050505050565b6000806128ba866129cf565b90506000600182878787604051600081526020016040526040516128059493929190612dd2565b60006128f8600a5483611bb990919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff851660009081526003602052604090205490915061292b90826129c3565b73ffffffffffffffffffffffffffffffffffffffff80861660009081526003602052604080822093909355908516815220546129679082611bcc565b73ffffffffffffffffffffffffffffffffffffffff84166000818152600360205260409081902092909255905133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611f55908690612d88565b6000611bc582846134e9565b6000816040516020016129e29190612c84565b604051602081830303815290604052805190602001209050919050565b803573ffffffffffffffffffffffffffffffffffffffff811681146106ac57600080fd5b600060208284031215612a34578081fd5b611bc5826129ff565b60008060408385031215612a4f578081fd5b612a58836129ff565b9150612a66602084016129ff565b90509250929050565b600080600060608486031215612a83578081fd5b612a8c846129ff565b9250612a9a602085016129ff565b9150604084013590509250925092565b600080600080600080600060e0888a031215612ac4578283fd5b612acd886129ff565b9650612adb602089016129ff565b95506040880135945060608801359350608088013560ff81168114612afe578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612b2d578182fd5b612b36836129ff565b946020939093013593505050565b60008060008060608587031215612b59578384fd5b612b62856129ff565b935060208501359250604085013567ffffffffffffffff80821115612b85578384fd5b818701915087601f830112612b98578384fd5b813581811115612ba6578485fd5b886020828501011115612bb7578485fd5b95989497505060200194505050565b600060208284031215612bd7578081fd5b81518015158114611bc5578182fd5b600060208284031215612bf7578081fd5b5035919050565b60008060408385031215612c10578182fd5b82359150612a66602084016129ff565b600080600060608486031215612c34578283fd5b83359250612a9a602085016129ff565b600060208284031215612c55578081fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611bc5578182fd5b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b7f190100000000000000000000000000000000000000000000000000000000000081526002810192909252602282015260420190565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff861682528460208301526060604083015282606083015282846080840137818301608090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019392505050565b901515815260200190565b90815260200190565b95865273ffffffffffffffffffffffffffffffffffffffff94851660208701529290931660408501526060840152608083019190915260a082015260c00190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b81811015612e1c57858101830151858201604001528201612e00565b81811115612e2d5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b6020808252602f908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201527f2061646d696e20746f206772616e740000000000000000000000000000000000606082015260800190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560408201527f7373000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602f908201527f416e7973776170563345524332303a207472616e7366657220616d6f756e742060408201527f657863656564732062616c616e63650000000000000000000000000000000000606082015260800190565b60208082526030908201527f416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e60408201527f2061646d696e20746f207265766f6b6500000000000000000000000000000000606082015260800190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252601a908201527f415254483a206e6f7420616e20617070726f76656420706f6f6c000000000000604082015260600190565b6020808252601e908201527f416e7973776170563345524332303a2045787069726564207065726d69740000604082015260600190565b60208082526023908201527f4552433230437573746f6d3a206164647265737320697320626c61636b6c697360408201527f7465640000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360408201527f7300000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526017908201527f417274683a20726562617365206973207265766f6b6564000000000000000000604082015260600190565b6020808252601c908201527f416e7973776170563445524332303a2061646472657373283078302900000000604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460408201527f7265737300000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252601d908201527f415254483a206e6f74206f776e6572206f7220676f7665726e616e6365000000604082015260600190565b60208082526019908201527f416e79737761705634546f6b656e3a20666f7262696464656e00000000000000604082015260600190565b60208082526054908201527f415254483a2043616e6e6f74207472616e7366657220746f6b656e732064697260408201527f6563746c7920746f20746865204152544820746f6b656e20636f6e747261637460608201527f206f7220746865207a65726f2061646472657373000000000000000000000000608082015260a00190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201527f20726f6c657320666f722073656c660000000000000000000000000000000000606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b60ff91909116815260200190565b6000821982111561346e5761346e613539565b500190565b6000826134a7577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156134e4576134e4613539565b500290565b6000828210156134fb576134fb613539565b500390565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561353257613532613539565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212208f12ca77b5074a31e82575e96be331781455c84f99f0b2f35da84b2991048a9964736f6c63430008000033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.