Contract 0x0000000000924fb1969e719edeD2feD54AFB183A 6

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xc3d358a73b6837735434b69e62972fa2bb9346cd3b21312757d8b510d51d2ed0Swap960842472023-05-30 18:26:243 hrs 15 mins ago0x9d8d7721114b73916ab4ae841bd1b897f0e71c60 IN  Hera Aggregator: Router0 ETH0.00053535 0.1
0x175b25b683e0e7a23d35ce668d79bfeff5c0cf2f8ec3a79c57fa3de41d292510Swap960830442023-05-30 18:21:213 hrs 20 mins ago0x9d8d7721114b73916ab4ae841bd1b897f0e71c60 IN  Hera Aggregator: Router0.366341695 ETH0.00041347 0.1
0xa3ba9ad5f8b9698df3eda07503a9513c951ec2c3cab606bc18a173a5aa105c9aSwap960770952023-05-30 17:56:333 hrs 45 mins ago0x9d8d7721114b73916ab4ae841bd1b897f0e71c60 IN  Hera Aggregator: Router0.005 ETH0.00029474 0.1
0x2dc7f0018ce45874dcb95d6ae728da246d17e6dec0e2d637108ab91cb5640365Swap960768022023-05-30 17:55:193 hrs 46 mins ago0x9d8d7721114b73916ab4ae841bd1b897f0e71c60 IN  Hera Aggregator: Router0 ETH0.00042533 0.1
0x6f074b892bc8be41957dff367b932915b3d64f87de2186ae7d5acb737ff58ad6Swap960746952023-05-30 17:46:313 hrs 55 mins ago0x9d8d7721114b73916ab4ae841bd1b897f0e71c60 IN  Hera Aggregator: Router0 ETH0.00033611 0.1
0x0024e6f8471f316a164409cedccfc2c775146cda6dd6f7d49dbddd0075c81cedSwap959920012023-05-30 12:02:569 hrs 39 mins ago0x4405510a8869cc02de2c7c39df399ed968bf7c0b IN  Hera Aggregator: Router0 ETH0.00052155 0.1
0xb80b3371efdc89ade5285b4e72b55c3093999a059c632baa95270fbe8bf5888cSwap959863902023-05-30 11:39:3810 hrs 2 mins ago0x25aff79e18254a825d6f3e8098400be5d2cdf963 IN  Hera Aggregator: Router3 ETH0.00038118 0.1
0x7af8b6eeebbc80b3242387a3298d744a756310d534c598563bad5f59c0fd90a5Swap959837432023-05-30 11:28:4010 hrs 13 mins ago0xbe95b67cc26c595886ceeb4e268d784cb9994d32 IN  Hera Aggregator: Router0 ETH0.00030929 0.1
0xcef669156389ea948cf93c046cac59e6ad04b8bc7d922257148e7120434de65bSwap959769212023-05-30 11:00:3010 hrs 41 mins ago0x846269d1a328f25e11f5c57049f9346251c2fadf IN  Hera Aggregator: Router0 ETH0.00018582 0.1
0x0a8f2f9d31d8aeb1379007df9b2ec2123d3bb2e378d50c6e13c23e7ba6a73720Swap959763352023-05-30 10:58:0310 hrs 43 mins ago0x3c1f689b31d64f68332055e923e908c7f259adc3 IN  Hera Aggregator: Router0 ETH0.00040443 0.1
0xae2b15a02d88efd4c503fb672a210183d342defbcbf07b31500b72094da6bbb3Swap959473712023-05-30 8:57:5612 hrs 44 mins ago0x6ed88188da646b6fe64022895de4045c35eba48e IN  Hera Aggregator: Router0 ETH0.00031193 0.1
0xcd390bf8170ddd24c760937cfd49ebf59039d0c21b21d6cf9676fd30c473b686Swap958680722023-05-30 3:18:4418 hrs 23 mins ago0x60aa4a7432c33a44c1747b82721d948ea4fe4662 IN  Hera Aggregator: Router0.1667 ETH0.0002785 0.1
0x25ffff19426759b2b738b072a86958a704ad90a747333d89325eacfda1a802b8Swap958514552023-05-30 2:07:3219 hrs 34 mins ago0x60a1d2ec4d939018b02a80a24d104c90b79c2fe3 IN  Hera Aggregator: Router0 ETH0.00029663 0.1
0xfab26de99d606493352ec9cd05d7e186797d07b16126183a6f04f3cf24898252Swap958158112023-05-29 23:30:2922 hrs 11 mins ago0xbf52b7d1f3c88da629ce05aa85adf6d9cebcf354 IN  Hera Aggregator: Router0 ETH0.00037436 0.1
0x4e6a441cfca6b3782bfee97d3540c6dce51ad2c46a2265a418cbb99706f9eaf5Swap958151192023-05-29 23:27:2622 hrs 14 mins ago0xd6906eb0d9ac8fe6f256b3d2d79aa92fcd9d3b30 IN  Hera Aggregator: Router0 ETH0.00029701 0.1
0x1fb97d833f1707cf481703064249ab356cfb0e83b3f421d0a0fbbc9dd9f791ddSwap958149602023-05-29 23:26:4222 hrs 15 mins ago0xd6906eb0d9ac8fe6f256b3d2d79aa92fcd9d3b30 IN  Hera Aggregator: Router0 ETH0.00031147 0.1
0x12913b1a90603fcbc20ff6815d9e60dbf0482629381934f6f95f649afe3b9fd7Swap957727132023-05-29 20:26:551 day 1 hr ago0xe12b2a8fcf67aee28deafcb8908e4179d770fd11 IN  Hera Aggregator: Router0 ETH0.00030725 0.1
0x0bc0bfdd73ae02c85c2b0076f0407ab7fdc992d122ef8668f721c29e1dad50e9Swap957284152023-05-29 17:21:121 day 4 hrs ago0x4405510a8869cc02de2c7c39df399ed968bf7c0b IN  Hera Aggregator: Router0 ETH0.0003852 0.1
0xbe9a2f65e3bd5f3749185969323206d04a58007a6bfa70aca80084db836d4635Swap956730512023-05-29 13:30:461 day 8 hrs ago0xd6906eb0d9ac8fe6f256b3d2d79aa92fcd9d3b30 IN  Hera Aggregator: Router0 ETH0.00032029 0.1
0xedcc5195e675b1a2a41c2207ccc03fd9bf42a671db9561ecf6b825e321947c94Swap956698892023-05-29 13:17:351 day 8 hrs ago0x84db8b4d9a54ac957bc98fa56aa558f80b2491f8 IN  Hera Aggregator: Router0.1 ETH0.00028782 0.1
0x4528a21524bcdf77fba3d0502e1e34052fa86dcbc0e21d73a32d06ddece23943Swap956697742023-05-29 13:17:071 day 8 hrs ago0xae519d33faac9ed29ae1476e5a051aa8811b3049 IN  Hera Aggregator: Router0.4 ETH0.00046123 0.1
0x2b8317b79ac106dab5cd5897258abce7aef80bfa4cca11cb68d0e065606df433Swap956697162023-05-29 13:16:521 day 8 hrs ago0xb52edbcca12407ce6e065776b3bfc0ecdbc15756 IN  Hera Aggregator: Router0.4 ETH0.00038121 0.1
0x5a3f327666b1a01ca44629891a681f3b4dfd2226eadff61afa03ac8d25b8dd9eSwap956692162023-05-29 13:14:501 day 8 hrs ago0x84db8b4d9a54ac957bc98fa56aa558f80b2491f8 IN  Hera Aggregator: Router0.5 ETH0.0004132 0.1
0x4b277788146829ea9e039835667ce0eae01bf59a186cd3659a32f60819aab5a8Swap956665882023-05-29 13:03:521 day 8 hrs ago0x9013091c40fb20963412df418802a616930a0acc IN  Hera Aggregator: Router0 ETH0.00025101 0.1
0x6e61407e6e08c747314bd5a779403fb49573a52909bb3c6800e4b97796a61ccfSwap956513212023-05-29 12:00:281 day 9 hrs ago0x36bdfed9b9bc39445e93309a4227cf4fd69f0561 IN  Hera Aggregator: Router0 ETH0.00027711 0.1
[ Download CSV Export 

OVERVIEW

Hera is an AI-powered multichain dex aggregator offering the widest range of tokens and the best route discovery between any token pairs

Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x175b25b683e0e7a23d35ce668d79bfeff5c0cf2f8ec3a79c57fa3de41d292510960830442023-05-30 18:21:213 hrs 20 mins ago Hera Aggregator: Router 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e70.366341695 ETH
0xa3ba9ad5f8b9698df3eda07503a9513c951ec2c3cab606bc18a173a5aa105c9a960770952023-05-30 17:56:333 hrs 45 mins ago Hera Aggregator: Router 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e70.005 ETH
0x6f074b892bc8be41957dff367b932915b3d64f87de2186ae7d5acb737ff58ad6960746952023-05-30 17:46:313 hrs 55 mins ago Hera Aggregator: Router0x9d8d7721114b73916ab4ae841bd1b897f0e71c600.007572653757058381 ETH
0x6f074b892bc8be41957dff367b932915b3d64f87de2186ae7d5acb737ff58ad6960746952023-05-30 17:46:313 hrs 55 mins ago 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e7 Hera Aggregator: Router0.007572653757058381 ETH
0xb80b3371efdc89ade5285b4e72b55c3093999a059c632baa95270fbe8bf5888c959863902023-05-30 11:39:3810 hrs 2 mins ago Hera Aggregator: Router 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e73 ETH
0xcd390bf8170ddd24c760937cfd49ebf59039d0c21b21d6cf9676fd30c473b686958680722023-05-30 3:18:4418 hrs 23 mins ago Hera Aggregator: Router 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e70.1667 ETH
0xfab26de99d606493352ec9cd05d7e186797d07b16126183a6f04f3cf24898252958158112023-05-29 23:30:2922 hrs 11 mins ago Hera Aggregator: Router0xbf52b7d1f3c88da629ce05aa85adf6d9cebcf3540.356199016466363053 ETH
0xfab26de99d606493352ec9cd05d7e186797d07b16126183a6f04f3cf24898252958158112023-05-29 23:30:2922 hrs 11 mins ago 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e7 Hera Aggregator: Router0.356199016466363053 ETH
0xedcc5195e675b1a2a41c2207ccc03fd9bf42a671db9561ecf6b825e321947c94956698892023-05-29 13:17:351 day 8 hrs ago Hera Aggregator: Router 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e70.1 ETH
0x4528a21524bcdf77fba3d0502e1e34052fa86dcbc0e21d73a32d06ddece23943956697742023-05-29 13:17:071 day 8 hrs ago Hera Aggregator: Router 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e70.4 ETH
0x2b8317b79ac106dab5cd5897258abce7aef80bfa4cca11cb68d0e065606df433956697162023-05-29 13:16:521 day 8 hrs ago Hera Aggregator: Router 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e70.4 ETH
0x5a3f327666b1a01ca44629891a681f3b4dfd2226eadff61afa03ac8d25b8dd9e956692162023-05-29 13:14:501 day 8 hrs ago Hera Aggregator: Router 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e70.5 ETH
0x4b277788146829ea9e039835667ce0eae01bf59a186cd3659a32f60819aab5a8956665882023-05-29 13:03:521 day 8 hrs ago Hera Aggregator: Router0x9013091c40fb20963412df418802a616930a0acc0.013174196008089816 ETH
0x4b277788146829ea9e039835667ce0eae01bf59a186cd3659a32f60819aab5a8956665882023-05-29 13:03:521 day 8 hrs ago 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e7 Hera Aggregator: Router0.013174196008089816 ETH
0x4a7e9d2c1a2b93f7c92d597a339dded966c5e3c35773c431d0413233fcc1f63b956116432023-05-29 9:15:391 day 12 hrs ago Hera Aggregator: Router 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e70.07 ETH
0xf7179741a0578a2209823fabaa93b4566f4ee70cf370bbe6fe636ad808086b31954999982023-05-29 1:24:521 day 20 hrs ago Hera Aggregator: Router0x84f240ca232917d771dfbbd8c917b4669ed640cd6.218378701576720926 ETH
0xf7179741a0578a2209823fabaa93b4566f4ee70cf370bbe6fe636ad808086b31954999982023-05-29 1:24:521 day 20 hrs ago 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e7 Hera Aggregator: Router6.218378701576720926 ETH
0x6e29f27d4216aaf8652b7f3031c105088c88fe258387a37168aa187c7d7a8092954365872023-05-28 20:53:312 days 48 mins ago Hera Aggregator: Router 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e70.0165 ETH
0x102adfecc1a27943decdc983e8d25cdcfc37a4d127473a8ab8e62370891faed6954181602023-05-28 19:35:132 days 2 hrs ago Hera Aggregator: Router0xd6906eb0d9ac8fe6f256b3d2d79aa92fcd9d3b300.122722061969927328 ETH
0x102adfecc1a27943decdc983e8d25cdcfc37a4d127473a8ab8e62370891faed6954181602023-05-28 19:35:132 days 2 hrs ago 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e7 Hera Aggregator: Router0.122722061969927328 ETH
0xddaa3ea4625e6889badbd0120a756ec043f51e771dff43d5d3640b85a98ac7c7954177152023-05-28 19:33:212 days 2 hrs ago Hera Aggregator: Router0xd6906eb0d9ac8fe6f256b3d2d79aa92fcd9d3b300.893633827411325807 ETH
0xddaa3ea4625e6889badbd0120a756ec043f51e771dff43d5d3640b85a98ac7c7954177152023-05-28 19:33:212 days 2 hrs ago 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e7 Hera Aggregator: Router0.893633827411325807 ETH
0xaa879181895acf5d2be9d9e27c3dc61a0fce3762652a5ea79934f13f1f6589db953686112023-05-28 16:05:382 days 5 hrs ago Hera Aggregator: Router0xd6906eb0d9ac8fe6f256b3d2d79aa92fcd9d3b300.38831067486876271 ETH
0xaa879181895acf5d2be9d9e27c3dc61a0fce3762652a5ea79934f13f1f6589db953686112023-05-28 16:05:382 days 5 hrs ago 0x1bd717c5cdd133e1985628e1e194b0ed9c9047e7 Hera Aggregator: Router0.38831067486876271 ETH
0x178b29aa84eb8a6bd8cacfffc8ef76e88f2695f3fd7cbf60f37fb21d00875894953682912023-05-28 16:04:172 days 5 hrs ago Hera Aggregator: Router0xd6906eb0d9ac8fe6f256b3d2d79aa92fcd9d3b300.682149803749030158 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HeraAggregatorV2

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 11 : HeraAggregatorV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import "./Queen.sol";
import "./interfaces/IHeraExecutor.sol";
import "./libraries/HeraERC20.sol";
import "./libraries/RevertReasonParser.sol";

contract HeraAggregatorV2 is Queen {
    using HeraERC20 for IERC20;
    using SafeMath for uint256;

    event Swapped(
        address sender,
        IERC20 inputToken,
        IERC20 outputToken,
        address dstAccount,
        address executor,
        uint256 spentAmount,
        uint256 returnAmount
    );

    struct Detail {
        IERC20 inputToken;
        IERC20 outputToken;
        address srcAccount;
        address dstAccount;
        uint256 amountIn;
        uint256 amountMinOut;
    }

    function Swap(
        IHeraExecutor executor,
        Detail calldata detail,
        bytes memory data
    ) public payable nonReentrant checkStatus returns (uint256 returnAmount) {
        return _swap(executor, detail, data);
    }

    function StableSwap(
        IHeraExecutor executor,
        Detail calldata detail,
        bytes memory data
    ) public payable nonReentrant checkStatus returns (uint256 returnAmount) {
        return _swap(executor, detail, data);
    }

    /// @notice Checking Slippage
    function _swap(
        IHeraExecutor executor,
        Detail calldata detail,
        bytes memory data
    ) internal returns (uint256 returnAmount) {
        require(detail.amountIn > 0, "AmountIn cannot be zero");
        require(detail.amountMinOut > 0, "AmountMinOut cannot be zero");
        require(data.length > 0, "Data cannot be zero");

        require(
            detail.srcAccount == msg.sender,
            "msg.sender and account must be the same"
        );

        (detail.inputToken).HeraTransferFrom(
            msg.sender,
            address(executor),
            detail.amountIn,
            msg.value,
            getNative()
        );

        uint256 initialBalance = (detail.outputToken).HeraBalanceOf(
            address(this)
        );

        if (
            detail.inputToken == detail.outputToken &&
            detail.inputToken.isNative()
        ) {
            initialBalance = initialBalance.sub(detail.amountIn);
        }

        {
            // solhint-disable-next-line avoid-low-level-calls
            (bool success, bytes memory result) = executeCall(
                address(executor),
                msg.value,
                abi.encodeWithSelector(
                    IHeraExecutor.execute.selector,
                    abi.encode(
                        detail.srcAccount,
                        detail.inputToken,
                        detail.outputToken,
                        detail.amountIn
                    ),
                    data
                )
            );
            if (!success) {
                revert(RevertReasonParser.parse(result, "Executor Error: "));
            }
        }

        returnAmount = (detail.outputToken).HeraBalanceOf(address(this)).sub(
            initialBalance
        );

        require(
            returnAmount >= detail.amountMinOut,
            "ReturnAmount must be greater than AmountMinOut"
        );
        (detail.outputToken).HeraTransfer(
            payable(detail.dstAccount),
            returnAmount
        );

        emit Swapped(
            msg.sender,
            detail.inputToken,
            detail.outputToken,
            detail.dstAccount,
            address(executor),
            detail.amountIn,
            returnAmount
        );
    }

    function executeCall(
        address _target,
        uint256 _value,
        bytes memory _calldata
    ) internal returns (bool, bytes memory) {
        uint256 _toCopy;
        bool _success;
        bytes memory _returnData;
        assembly {
            _success := call(
                gas(),
                _target,
                _value,
                add(_calldata, 0x20),
                mload(_calldata),
                0,
                0
            )

            _toCopy := returndatasize()
            mstore(_returnData, _toCopy)
            returndatacopy(add(_returnData, 0x20), 0, _toCopy)
        }
        return (_success, _returnData);
    }

    function rescueFunds(IERC20 token, uint256 amount) external onlyOwner {
        token.HeraTransfer(payable(msg.sender), amount);
    }
}

File 2 of 11 : RevertReasonParser.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma abicoder v1;

import "./StringUtil.sol";

/** @title Library that allows to parse unsuccessful arbitrary calls revert reasons.
  * See https://solidity.readthedocs.io/en/latest/control-structures.html#revert for details.
  * Note that we assume revert reason being abi-encoded as Error(string) so it may fail to parse reason
  * if structured reverts appear in the future.
  *
  * All unsuccessful parsings get encoded as Unknown(data) string
  */
library RevertReasonParser {
    using StringUtil for uint256;
    using StringUtil for bytes;

    error InvalidRevertReason();

    bytes4 constant private _ERROR_SELECTOR = bytes4(keccak256("Error(string)"));
    bytes4 constant private _PANIC_SELECTOR = bytes4(keccak256("Panic(uint256)"));

    function parse(bytes memory data, string memory prefix) internal pure returns (string memory) {
        // https://solidity.readthedocs.io/en/latest/control-structures.html#revert
        // We assume that revert reason is abi-encoded as Error(string)
        bytes4 selector;
        if (data.length >= 4) {
            /// @solidity memory-safe-assembly
            assembly { // solhint-disable-line no-inline-assembly
                selector := mload(add(data, 0x20))
            }
        }

        // 68 = 4-byte selector + 32 bytes offset + 32 bytes length
        if (selector == _ERROR_SELECTOR && data.length >= 68) {
            string memory reason;
            /// @solidity memory-safe-assembly
            assembly { // solhint-disable-line no-inline-assembly
                // 68 = 32 bytes data length + 4-byte selector + 32 bytes offset
                reason := add(data, 68)
            }
            /*
                revert reason is padded up to 32 bytes with ABI encoder: Error(string)
                also sometimes there is extra 32 bytes of zeros padded in the end:
                https://github.com/ethereum/solidity/issues/10170
                because of that we can't check for equality and instead check
                that string length + extra 68 bytes is equal or greater than overall data length
            */
            if (data.length >= 68 + bytes(reason).length) {
                return string.concat(prefix, "Error(", reason, ")");
            }
        }
        // 36 = 4-byte selector + 32 bytes integer
        else if (selector == _PANIC_SELECTOR && data.length == 36) {
            uint256 code;
            /// @solidity memory-safe-assembly
            assembly { // solhint-disable-line no-inline-assembly
                // 36 = 32 bytes data length + 4-byte selector
                code := mload(add(data, 36))
            }
            return string.concat(prefix, "Panic(", code.toHex(), ")");
        }
        return string.concat(prefix, "Unknown(", data.toHex(), ")");
    }
}

File 3 of 11 : Queen.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract Queen is Ownable, ReentrancyGuard {
    bool public STATUS = true;
    bool private USE_NATIVE = true;
    event ChangedStatus(bool indexed status);
    event ChangedUseNative(bool indexed status);

    modifier checkStatus() {
        require(STATUS == true, "Contract Stopped!");
        _;
    }

    constructor() payable {}

    function changeStatus(bool _status) external onlyOwner {
        STATUS = _status;
        emit ChangedStatus(_status);
    }

    function changeNative(bool _status) external onlyOwner {
        USE_NATIVE = _status;
        emit ChangedUseNative(_status);
    }

    function getNative() internal view returns (bool) {
        return USE_NATIVE;
    }

    receive() external payable {}
}

File 4 of 11 : IHeraExecutor.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

interface IHeraExecutor {
    //function execute(address sender,bytes memory datas) external payable;
    function execute(bytes memory details,bytes memory datas) external payable;
}

File 5 of 11 : HeraERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

library HeraERC20 {
    using SafeMath for uint256;

    IERC20 private constant _NATIVE_ADDRESS =
        IERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
    IERC20 private constant _ZERO_ADDRESS = IERC20(address(0));

    function isNative(IERC20 token) internal pure returns (bool) {
        return (token == _ZERO_ADDRESS || token == _NATIVE_ADDRESS);
    }
    
    function HeraBalanceOf(IERC20 token, address account)
        internal
        view
        returns (uint256)
    {
        if (isNative(token)) {
            return account.balance;
        } else {
            return token.balanceOf(account);
        }
    }

    function HeraTransfer(
        IERC20 token,
        address payable to,
        uint256 amount
    ) internal {
        if (amount > 0) {
            if (isNative(token)) {
                to.transfer(amount);
            } else {
                _callOptionalReturn(
                    token,
                    abi.encodeWithSelector(token.transfer.selector, to, amount)
                );
            }
        }
    }

    function HeraProtocolTransfer(
        IERC20 token,
        address account,
        address payable to,
        uint256 protocolFee
    ) internal {
        uint256 amount = HeraBalanceOf(token,account);
        if (amount < protocolFee) {
            revert("Error: Protocol");
        }
        if (amount > 0) {
            if (isNative(token)) {
                to.transfer(amount);
            } else {
                _callOptionalReturn(
                    token,
                    abi.encodeWithSelector(token.transfer.selector, to, amount)
                );
            }
        }
    }

    function HeraTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 amount,
        uint256 msg_amount,
        bool use_native
    ) internal {
        if (use_native && isNative(token)) {
            require(amount == msg_amount, "msg.value and amountIn must be the same");
        }
        else {
            _callOptionalReturn(
                token,
                abi.encodeWithSelector(
                    token.transferFrom.selector,
                    from,
                    to,
                    amount
                )
            );
        }
    }

    function HeraApprove(
        IERC20 token,
        address to,
        uint256 amount
    ) internal {
        require(!isNative(token), "Approve called on ETH");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(
            abi.encodeWithSelector(token.approve.selector, to, amount)
        );

        if (
            !success ||
            (returndata.length > 0 && !abi.decode(returndata, (bool)))
        ) {
            _callOptionalReturn(
                token,
                abi.encodeWithSelector(token.approve.selector, to, 0)
            );
            _callOptionalReturn(
                token,
                abi.encodeWithSelector(token.approve.selector, to, amount)
            );
        }
    }

    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "low-level call failed");

        if (returndata.length > 0) {
            // Return data is optional
            require(
                abi.decode(returndata, (bool)),
                "ERC20 operation did not succeed"
            );
        }
    }
}

File 6 of 11 : StringUtil.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma abicoder v1;

/// @title Library with gas-efficient string operations
library StringUtil {
    function toHex(uint256 value) internal pure returns (string memory) {
        return toHex(abi.encodePacked(value));
    }

    function toHex(address value) internal pure returns (string memory) {
        return toHex(abi.encodePacked(value));
    }

    function toHex(bytes memory data) internal pure returns (string memory result) {
        /// @solidity memory-safe-assembly
        assembly { // solhint-disable-line no-inline-assembly
            function _toHex16(input) -> output {
                output := or(
                    and(input, 0xFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000),
                    shr(64, and(input, 0x0000000000000000FFFFFFFFFFFFFFFF00000000000000000000000000000000))
                )
                output := or(
                    and(output, 0xFFFFFFFF000000000000000000000000FFFFFFFF000000000000000000000000),
                    shr(32, and(output, 0x00000000FFFFFFFF000000000000000000000000FFFFFFFF0000000000000000))
                )
                output := or(
                    and(output, 0xFFFF000000000000FFFF000000000000FFFF000000000000FFFF000000000000),
                    shr(16, and(output, 0x0000FFFF000000000000FFFF000000000000FFFF000000000000FFFF00000000))
                )
                output := or(
                    and(output, 0xFF000000FF000000FF000000FF000000FF000000FF000000FF000000FF000000),
                    shr(8, and(output, 0x00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000))
                )
                output := or(
                    shr(4, and(output, 0xF000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000)),
                    shr(8, and(output, 0x0F000F000F000F000F000F000F000F000F000F000F000F000F000F000F000F00))
                )
                output := add(
                    add(0x3030303030303030303030303030303030303030303030303030303030303030, output),
                    mul(
                        and(
                            shr(4, add(output, 0x0606060606060606060606060606060606060606060606060606060606060606)),
                            0x0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F
                        ),
                        7   // Change 7 to 39 for lower case output
                    )
                )
            }

            result := mload(0x40)
            let length := mload(data)
            let resultLength := shl(1, length)
            let toPtr := add(result, 0x22)          // 32 bytes for length + 2 bytes for '0x'
            mstore(0x40, add(toPtr, resultLength))  // move free memory pointer
            mstore(add(result, 2), 0x3078)          // 0x3078 is right aligned so we write to `result + 2`
                                                    // to store the last 2 bytes in the beginning of the string
            mstore(result, add(resultLength, 2))    // extra 2 bytes for '0x'

            for {
                let fromPtr := add(data, 0x20)
                let endPtr := add(fromPtr, length)
            } lt(fromPtr, endPtr) {
                fromPtr := add(fromPtr, 0x20)
            } {
                let rawData := mload(fromPtr)
                let hexData := _toHex16(rawData)
                mstore(toPtr, hexData)
                toPtr := add(toPtr, 0x20)
                hexData := _toHex16(shl(128, rawData))
                mstore(toPtr, hexData)
                toPtr := add(toPtr, 0x20)
            }
        }
    }
}

File 7 of 11 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 8 of 11 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 9 of 11 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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) {
        return msg.data;
    }
}

File 10 of 11 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

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 generally not needed starting with Solidity 0.8, since 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 subtraction 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. 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;
        }
    }
}

File 11 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

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

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

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

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"ChangedStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"status","type":"bool"}],"name":"ChangedUseNative","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":"sender","type":"address"},{"indexed":false,"internalType":"contract IERC20","name":"inputToken","type":"address"},{"indexed":false,"internalType":"contract IERC20","name":"outputToken","type":"address"},{"indexed":false,"internalType":"address","name":"dstAccount","type":"address"},{"indexed":false,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"uint256","name":"spentAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"returnAmount","type":"uint256"}],"name":"Swapped","type":"event"},{"inputs":[],"name":"STATUS","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IHeraExecutor","name":"executor","type":"address"},{"components":[{"internalType":"contract IERC20","name":"inputToken","type":"address"},{"internalType":"contract IERC20","name":"outputToken","type":"address"},{"internalType":"address","name":"srcAccount","type":"address"},{"internalType":"address","name":"dstAccount","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountMinOut","type":"uint256"}],"internalType":"struct HeraAggregatorV2.Detail","name":"detail","type":"tuple"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"StableSwap","outputs":[{"internalType":"uint256","name":"returnAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IHeraExecutor","name":"executor","type":"address"},{"components":[{"internalType":"contract IERC20","name":"inputToken","type":"address"},{"internalType":"contract IERC20","name":"outputToken","type":"address"},{"internalType":"address","name":"srcAccount","type":"address"},{"internalType":"address","name":"dstAccount","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountMinOut","type":"uint256"}],"internalType":"struct HeraAggregatorV2.Detail","name":"detail","type":"tuple"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"Swap","outputs":[{"internalType":"uint256","name":"returnAmount","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"changeNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"changeStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526001600260006101000a81548160ff0219169083151502179055506001600260016101000a81548160ff0219169083151502179055503480156200004757600080fd5b50620000686200005c6200007560201b60201c565b6200007d60201b60201c565b6001808190555062000141565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6125fe80620001516000396000f3fe60806040526004361061008a5760003560e01c8063b328620e11610059578063b328620e1461012a578063bc0cf4341461015a578063c1509f051461018a578063e33865b3146101b3578063f2fde38b146101de57610091565b8063715018a61461009657806378e3214f146100ad5780638da5cb5b146100d65780639b3de49b1461010157610091565b3661009157005b600080fd5b3480156100a257600080fd5b506100ab610207565b005b3480156100b957600080fd5b506100d460048036038101906100cf9190611830565b61021b565b005b3480156100e257600080fd5b506100eb610252565b6040516100f8919061187f565b60405180910390f35b34801561010d57600080fd5b50610128600480360381019061012391906118d2565b61027b565b005b610144600480360381019061013f9190611aa7565b6102cf565b6040516101519190611b26565b60405180910390f35b610174600480360381019061016f9190611aa7565b61038f565b6040516101819190611b26565b60405180910390f35b34801561019657600080fd5b506101b160048036038101906101ac91906118d2565b61044f565b005b3480156101bf57600080fd5b506101c86104a3565b6040516101d59190611b50565b60405180910390f35b3480156101ea57600080fd5b5061020560048036038101906102009190611b97565b6104b6565b005b61020f610539565b61021960006105b7565b565b610223610539565b61024e33828473ffffffffffffffffffffffffffffffffffffffff1661067b9092919063ffffffff16565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610283610539565b80600260006101000a81548160ff0219169083151502179055508015157f030d1ae93bd878ad07bee72827dba91738e3b03307b607a679916911ea552b9960405160405180910390a250565b6000600260015403610316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161030d90611c21565b60405180910390fd5b600260018190555060011515600260009054906101000a900460ff16151514610374576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036b90611c8d565b60405180910390fd5b61037f848484610766565b9050600180819055509392505050565b60006002600154036103d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103cd90611c21565b60405180910390fd5b600260018190555060011515600260009054906101000a900460ff16151514610434576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042b90611c8d565b60405180910390fd5b61043f848484610766565b9050600180819055509392505050565b610457610539565b80600260016101000a81548160ff0219169083151502179055508015157f3ad4e7b4a7c57a0d738647597913a3ad567590a531be5c47a2056222cd698b7560405160405180910390a250565b600260009054906101000a900460ff1681565b6104be610539565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361052d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052490611d1f565b60405180910390fd5b610536816105b7565b50565b610541610cc5565b73ffffffffffffffffffffffffffffffffffffffff1661055f610252565b73ffffffffffffffffffffffffffffffffffffffff16146105b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ac90611d8b565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008111156107615761068d83610ccd565b156106de578173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156106d8573d6000803e3d6000fd5b50610760565b61075f8363a9059cbb60e01b84846040516024016106fd929190611dcc565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610d4f565b5b5b505050565b6000808360800135116107ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a590611e41565b60405180910390fd5b60008360a00135116107f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ec90611ead565b60405180910390fd5b6000825111610839576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083090611f19565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff168360400160208101906108639190611b97565b73ffffffffffffffffffffffffffffffffffffffff16146108b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b090611fab565b60405180910390fd5b61090733858560800135346108cc610e62565b8860000160208101906108df9190611fcb565b73ffffffffffffffffffffffffffffffffffffffff16610e799095949392919063ffffffff16565b6000610944308560200160208101906109209190611fcb565b73ffffffffffffffffffffffffffffffffffffffff16610f6390919063ffffffff16565b90508360200160208101906109599190611fcb565b73ffffffffffffffffffffffffffffffffffffffff168460000160208101906109829190611fcb565b73ffffffffffffffffffffffffffffffffffffffff161480156109d257506109d18460000160208101906109b69190611fcb565b73ffffffffffffffffffffffffffffffffffffffff16610ccd565b5b156109f1576109ee84608001358261101590919063ffffffff16565b90505b600080610ad58734631f6a1eb960e01b896040016020810190610a149190611b97565b8a6000016020810190610a279190611fcb565b8b6020016020810190610a3a9190611fcb565b8c60800135604051602001610a529493929190612057565b60405160208183030381529060405289604051602401610a7392919061211b565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061102b565b9150915081610b5957610b1d816040518060400160405280601081526020017f4578656375746f72204572726f723a2000000000000000000000000000000000815250611062565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b509190612196565b60405180910390fd5b5050610ba881610b9a30876020016020810190610b769190611fcb565b73ffffffffffffffffffffffffffffffffffffffff16610f6390919063ffffffff16565b61101590919063ffffffff16565b91508360a00135821015610bf1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be89061222a565b60405180910390fd5b610c40846060016020810190610c079190611b97565b83866020016020810190610c1b9190611fcb565b73ffffffffffffffffffffffffffffffffffffffff1661067b9092919063ffffffff16565b7f97907616a601015471c14cbf2d2636e639bd38defe58a67bd9681b990fe4563d33856000016020810190610c759190611fcb565b866020016020810190610c889190611fcb565b876060016020810190610c9b9190611b97565b89896080013588604051610cb5979695949392919061224a565b60405180910390a1509392505050565b600033905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480610d48575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b9050919050565b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610d7791906122f5565b6000604051808303816000865af19150503d8060008114610db4576040519150601f19603f3d011682016040523d82523d6000602084013e610db9565b606091505b509150915081610dfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df590612358565b60405180910390fd5b600081511115610e5c5780806020019051810190610e1c919061238d565b610e5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5290612406565b60405180910390fd5b5b50505050565b6000600260019054906101000a900460ff16905090565b808015610e8b5750610e8a86610ccd565b5b15610ed757818314610ed2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec990612498565b60405180910390fd5b610f5b565b610f5a866323b872dd60e01b878787604051602401610ef8939291906124b8565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610d4f565b5b505050505050565b6000610f6e83610ccd565b15610f92578173ffffffffffffffffffffffffffffffffffffffff1631905061100f565b8273ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401610fcb919061187f565b602060405180830381865afa158015610fe8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100c9190612504565b90505b92915050565b600081836110239190612560565b905092915050565b6000606060008060606000808751602089018a8c5af191503d9250828152826000602083013e818194509450505050935093915050565b60606000600484511061107757602084015190505b7f08c379a0afcc32b1a39302f7cb8073359698411ab5fd6e3edb2c02c0b5fba8aa7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480156110e657506044845110155b15611225576060604485019050805160446111019190612594565b85511061121f5783816040516020018083805190602001908083835b60208310611140578051825260208201915060208101905060208303925061111d565b6001836020036101000a038019825116818451168082178552505050505050905001807f4572726f7228000000000000000000000000000000000000000000000000000081525060060182805190602001908083835b602083106111b95780518252602082019150602081019050602083039250611196565b6001836020036101000a038019825116818451168082178552505050505050905001807f290000000000000000000000000000000000000000000000000000000000000081525060010192505050604051602081830303815290604052925050506114db565b506113c1565b7f4e487b71539e0164c9d29506cc725e49342bcac15e0927282bf30fedfe1c72687bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015611293575060248451145b156113c057600060248501519050836112ab826114e1565b6040516020018083805190602001908083835b602083106112e157805182526020820191506020810190506020830392506112be565b6001836020036101000a038019825116818451168082178552505050505050905001807f50616e696328000000000000000000000000000000000000000000000000000081525060060182805190602001908083835b6020831061135a5780518252602082019150602081019050602083039250611337565b6001836020036101000a038019825116818451168082178552505050505050905001807f290000000000000000000000000000000000000000000000000000000000000081525060010192505050604051602081830303815290604052925050506114db565b5b826113cb85611512565b6040516020018083805190602001908083835b6020831061140157805182526020820191506020810190506020830392506113de565b6001836020036101000a038019825116818451168082178552505050505050905001807f556e6b6e6f776e2800000000000000000000000000000000000000000000000081525060080182805190602001908083835b6020831061147a5780518252602082019150602081019050602083039250611457565b6001836020036101000a038019825116818451168082178552505050505050905001807f2900000000000000000000000000000000000000000000000000000000000000815250600101925050506040516020818303038152906040529150505b92915050565b606061150b8260405160200180828152602001915050604051602081830303815290604052611512565b9050919050565b6060611701565b600077ffffffffffffffff00000000000000000000000000000000821660401c7fffffffffffffffff00000000000000000000000000000000000000000000000083161790507bffffffff000000000000000000000000ffffffff0000000000000000811660201c7fffffffff000000000000000000000000ffffffff00000000000000000000000082161790507dffff000000000000ffff000000000000ffff000000000000ffff00000000811660101c7fffff000000000000ffff000000000000ffff000000000000ffff00000000000082161790507eff000000ff000000ff000000ff000000ff000000ff000000ff000000ff0000811660081c7fff000000ff000000ff000000ff000000ff000000ff000000ff000000ff00000082161790507f0f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f00811660081c7ff000f000f000f000f000f000f000f000f000f000f000f000f000f000f000f000821660041c17905060077f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f7f0606060606060606060606060606060606060606060606060606060606060606830160041c1602817f303030303030303030303030303030303030303030303030303030303030303001019050919050565b604051905081518060011b602283018181016040526130786002850152600282018452602085018381015b8082101561176c57815161173f81611519565b8085526020850194506117548260801b611519565b9050808552602085019450505060208201915061172c565b5050505050919050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006117b58261178a565b9050919050565b60006117c7826117aa565b9050919050565b6117d7816117bc565b81146117e257600080fd5b50565b6000813590506117f4816117ce565b92915050565b6000819050919050565b61180d816117fa565b811461181857600080fd5b50565b60008135905061182a81611804565b92915050565b6000806040838503121561184757611846611780565b5b6000611855858286016117e5565b92505060206118668582860161181b565b9150509250929050565b611879816117aa565b82525050565b60006020820190506118946000830184611870565b92915050565b60008115159050919050565b6118af8161189a565b81146118ba57600080fd5b50565b6000813590506118cc816118a6565b92915050565b6000602082840312156118e8576118e7611780565b5b60006118f6848285016118bd565b91505092915050565b600061190a826117aa565b9050919050565b61191a816118ff565b811461192557600080fd5b50565b60008135905061193781611911565b92915050565b600080fd5b600060c082840312156119585761195761193d565b5b81905092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6119b48261196b565b810181811067ffffffffffffffff821117156119d3576119d261197c565b5b80604052505050565b60006119e6611776565b90506119f282826119ab565b919050565b600067ffffffffffffffff821115611a1257611a1161197c565b5b611a1b8261196b565b9050602081019050919050565b82818337600083830152505050565b6000611a4a611a45846119f7565b6119dc565b905082815260208101848484011115611a6657611a65611966565b5b611a71848285611a28565b509392505050565b600082601f830112611a8e57611a8d611961565b5b8135611a9e848260208601611a37565b91505092915050565b60008060006101008486031215611ac157611ac0611780565b5b6000611acf86828701611928565b9350506020611ae086828701611942565b92505060e084013567ffffffffffffffff811115611b0157611b00611785565b5b611b0d86828701611a79565b9150509250925092565b611b20816117fa565b82525050565b6000602082019050611b3b6000830184611b17565b92915050565b611b4a8161189a565b82525050565b6000602082019050611b656000830184611b41565b92915050565b611b74816117aa565b8114611b7f57600080fd5b50565b600081359050611b9181611b6b565b92915050565b600060208284031215611bad57611bac611780565b5b6000611bbb84828501611b82565b91505092915050565b600082825260208201905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000611c0b601f83611bc4565b9150611c1682611bd5565b602082019050919050565b60006020820190508181036000830152611c3a81611bfe565b9050919050565b7f436f6e74726163742053746f7070656421000000000000000000000000000000600082015250565b6000611c77601183611bc4565b9150611c8282611c41565b602082019050919050565b60006020820190508181036000830152611ca681611c6a565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000611d09602683611bc4565b9150611d1482611cad565b604082019050919050565b60006020820190508181036000830152611d3881611cfc565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611d75602083611bc4565b9150611d8082611d3f565b602082019050919050565b60006020820190508181036000830152611da481611d68565b9050919050565b6000611db68261178a565b9050919050565b611dc681611dab565b82525050565b6000604082019050611de16000830185611dbd565b611dee6020830184611b17565b9392505050565b7f416d6f756e74496e2063616e6e6f74206265207a65726f000000000000000000600082015250565b6000611e2b601783611bc4565b9150611e3682611df5565b602082019050919050565b60006020820190508181036000830152611e5a81611e1e565b9050919050565b7f416d6f756e744d696e4f75742063616e6e6f74206265207a65726f0000000000600082015250565b6000611e97601b83611bc4565b9150611ea282611e61565b602082019050919050565b60006020820190508181036000830152611ec681611e8a565b9050919050565b7f446174612063616e6e6f74206265207a65726f00000000000000000000000000600082015250565b6000611f03601383611bc4565b9150611f0e82611ecd565b602082019050919050565b60006020820190508181036000830152611f3281611ef6565b9050919050565b7f6d73672e73656e64657220616e64206163636f756e74206d757374206265207460008201527f68652073616d6500000000000000000000000000000000000000000000000000602082015250565b6000611f95602783611bc4565b9150611fa082611f39565b604082019050919050565b60006020820190508181036000830152611fc481611f88565b9050919050565b600060208284031215611fe157611fe0611780565b5b6000611fef848285016117e5565b91505092915050565b6000819050919050565b600061201d6120186120138461178a565b611ff8565b61178a565b9050919050565b600061202f82612002565b9050919050565b600061204182612024565b9050919050565b61205181612036565b82525050565b600060808201905061206c6000830187611870565b6120796020830186612048565b6120866040830185612048565b6120936060830184611b17565b95945050505050565b600081519050919050565b600082825260208201905092915050565b60005b838110156120d65780820151818401526020810190506120bb565b60008484015250505050565b60006120ed8261209c565b6120f781856120a7565b93506121078185602086016120b8565b6121108161196b565b840191505092915050565b6000604082019050818103600083015261213581856120e2565b9050818103602083015261214981846120e2565b90509392505050565b600081519050919050565b600061216882612152565b6121728185611bc4565b93506121828185602086016120b8565b61218b8161196b565b840191505092915050565b600060208201905081810360008301526121b0818461215d565b905092915050565b7f52657475726e416d6f756e74206d75737420626520677265617465722074686160008201527f6e20416d6f756e744d696e4f7574000000000000000000000000000000000000602082015250565b6000612214602e83611bc4565b915061221f826121b8565b604082019050919050565b6000602082019050818103600083015261224381612207565b9050919050565b600060e08201905061225f600083018a611870565b61226c6020830189612048565b6122796040830188612048565b6122866060830187611870565b6122936080830186611870565b6122a060a0830185611b17565b6122ad60c0830184611b17565b98975050505050505050565b600081905092915050565b60006122cf8261209c565b6122d981856122b9565b93506122e98185602086016120b8565b80840191505092915050565b600061230182846122c4565b915081905092915050565b7f6c6f772d6c6576656c2063616c6c206661696c65640000000000000000000000600082015250565b6000612342601583611bc4565b915061234d8261230c565b602082019050919050565b6000602082019050818103600083015261237181612335565b9050919050565b600081519050612387816118a6565b92915050565b6000602082840312156123a3576123a2611780565b5b60006123b184828501612378565b91505092915050565b7f4552433230206f7065726174696f6e20646964206e6f74207375636365656400600082015250565b60006123f0601f83611bc4565b91506123fb826123ba565b602082019050919050565b6000602082019050818103600083015261241f816123e3565b9050919050565b7f6d73672e76616c756520616e6420616d6f756e74496e206d757374206265207460008201527f68652073616d6500000000000000000000000000000000000000000000000000602082015250565b6000612482602783611bc4565b915061248d82612426565b604082019050919050565b600060208201905081810360008301526124b181612475565b9050919050565b60006060820190506124cd6000830186611870565b6124da6020830185611870565b6124e76040830184611b17565b949350505050565b6000815190506124fe81611804565b92915050565b60006020828403121561251a57612519611780565b5b6000612528848285016124ef565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061256b826117fa565b9150612576836117fa565b925082820390508181111561258e5761258d612531565b5b92915050565b600061259f826117fa565b91506125aa836117fa565b92508282019050808211156125c2576125c1612531565b5b9291505056fea26469706673582212208c8ad288c809c31b91e9da239606bbbcb9d5e48d4aa186e59015019e90c2939764736f6c63430008100033

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