Contract 0x2dCCDB493827E15a5dC8f8b72147E6c4A5620857 3

Bridge 
 

Contract Overview

Harmony: ERC20 Bridge
Balance:
0 Ether

EtherValue:
$0.00

Token:
Txn Hash Method
Block
From
To
Value
0x21097f46a54e30590afb0a8040f3aec72a68de37dd48f8a90c2ae7bd9e5f0fb7Lock Token134809192021-10-24 15:16:221 hr 3 mins ago0x03722d970d0ec292af019ba3a72733e1f7172e58 IN  Harmony: ERC20 Bridge0 Ether0.004497041192 74.849639536
0x60071fd52790b62b378b12d0731ddcbdc7fe7dc4a420c0c1bb4712948acddaf8Lock Token134806792021-10-24 14:19:252 hrs ago0xd558f9edbbebc380914b665dcdf658fa684f55e5 IN  Harmony: ERC20 Bridge0 Ether0.003647754 66
0xbaa9d75ae9e8caa040dfc92a6074066d4f4f68520db69c552328c64be62848d9Lock Token134806402021-10-24 14:10:102 hrs 9 mins ago0x6ab441ca723e98402f9138c3835490e435addb4c IN  Harmony: ERC20 Bridge0 Ether0.00398976833 66.419756114
0x9477f3e2b964272de25dc9dd280c8767480a3ff224c8104d1f3dfcdb27be8712Lock Token134806342021-10-24 14:08:412 hrs 10 mins ago0xc80dd50fd6702f81df2f02221161938bebbb5cd7 IN  Harmony: ERC20 Bridge0 Ether0.002507277107 60.516934355
0x01b7709c429975a2a6371c4d674f0d1c1ecfa35be31064eec696615046bd9a5bLock Token134805832021-10-24 13:56:122 hrs 23 mins ago0xa24d0839ec35fa671550320e63a80102c4f9f6da IN  Harmony: ERC20 Bridge0 Ether0.002323811901 50.265231156
0x242b478b857d3357956fb2b72c102474551178311e60db9dacf90d3cba815c8fLock Token134805152021-10-24 13:40:312 hrs 38 mins ago0x8ad82b900d492f803c22f3e6c048a66498d57163 IN  Harmony: ERC20 Bridge0 Ether0.0028986363
0x56946eb93f0577ac0046f3973961534c2c6f0aacc5cbcddaca34ec08633bfe01Lock Token134804822021-10-24 13:33:382 hrs 45 mins ago0xb3db188ae1373001d5336c9e32f40534bf0ff42e IN  Harmony: ERC20 Bridge0 Ether0.002911473616 61.269673529
0x2793bb17b377c45464cb9fd3fb94d2a1432eb13b6ec16c54d60bb51298be9c18Lock Token134804522021-10-24 13:26:212 hrs 53 mins ago0xb384ac0d1f42bd1b40bc619bfcf733af66bcdd35 IN  Harmony: ERC20 Bridge0 Ether0.003699213319 65.828157655
0x420f921f1b3899f87af840aedc2875306af343029373df6a21785c9e48a7cb29Lock Token134804382021-10-24 13:23:062 hrs 56 mins ago0x40d1ba17052a94bd40a1cc2afbec2f38f700a1cc IN  Harmony: ERC20 Bridge0 Ether0.004052542398 66.523455707
0xf21d57804354e5108ee78f2a91fe7ff274f086ac84b5b4a8ebc6cc890cfe899bLock Token134803812021-10-24 13:08:273 hrs 11 mins ago0xe023f8e816b020e4c6b522a484debf5a247b0455 IN  Harmony: ERC20 Bridge0 Ether0.003486519605 58.041911886
0x6e5267e17c676e73acca742fa851e5df3bda84800b905d7691be00dedf9ba7f8Lock Token134802822021-10-24 12:45:503 hrs 33 mins ago0x464be0685b6bb906a7fe85bfc1e85d9e95139aa0 IN  Harmony: ERC20 Bridge0 Ether0.00216628555
0x009d68ece50a8b8e79e86ecafd3abcdc27abf7762034a0ceb5c0c34c2aef3a6bLock Token134800862021-10-24 12:04:244 hrs 15 mins ago0x93c02883fb03d2df0ba0e9d7d780fbb5f86e2457 IN  Harmony: ERC20 Bridge0 Ether0.002269973176 54.78924419
0x51fd72213a43f24c57fac466e40551be6c304bc7d652a736ff2f8e7bc2f4627dLock Token134796512021-10-24 10:32:085 hrs 47 mins ago0xf8dead4d72d458b22b76c8b536c3e7b22e91c0d8 IN  Harmony: ERC20 Bridge0 Ether0.003212252127 69.482644282
0x7161eae50609f1e6a192e33bc0f88fc8a6946d132fd3dc52791ada50bd5b9401Lock Token134795862021-10-24 10:15:326 hrs 3 mins ago0x0fcc99d642c36539eb870ada83ba3bd8428f4558 IN  Harmony: ERC20 Bridge0 Ether0.002734827105 48.656343619
0xe152076012db827c21f1d7545217213f9c070ef8f9ed013f1d768c11d1dff820Lock Token134795612021-10-24 10:09:306 hrs 9 mins ago0x6580c00a8a14d034e9bab7bce0273ccabaed8370 IN  Harmony: ERC20 Bridge0 Ether0.005417538 98
0x2361b2bdc2f80aed166cd613359f9a737f96f33997a6a498d065e26441c75408Lock Token134795122021-10-24 9:59:586 hrs 19 mins ago0x43a5b9fa689a9f2ccea6d09cc7006c065072ea19 IN  Harmony: ERC20 Bridge0 Ether0.002637334078 46.931828074
0xc0136388336741ce1c5dca67a883469fb1de0b20fcf034336310d856e41bccd1Lock Token134794992021-10-24 9:56:426 hrs 22 mins ago0x9ff5dbd7484ce9915404695bc5bfd91d995599a8 IN  Harmony: ERC20 Bridge0 Ether0.00189645675 46.019333919
0x062459bd7310cb9c8775c2f7caf693b39ca0f0d3002a52eba532512f1b4e1ffeLock Token134794592021-10-24 9:45:236 hrs 34 mins ago0x6f77a8741079ff55fe72deaab280247c8b126240 IN  Harmony: ERC20 Bridge0 Ether0.002908729015 52.605736998
0x2f50c4e406347af9064060d2f529908689c09424e491a4114191eaa54d83b056Lock Token134794422021-10-24 9:41:576 hrs 37 mins ago0xa00d8a199f21abe7eb55fc362c4b651fd47dfa4a IN  Harmony: ERC20 Bridge0 Ether0.002473108 44
0x19be301e0f0da8f6e91bee8998ed0f1581175d7c00f80798fcdc2ae1c082b0c9Lock Token134793312021-10-24 9:16:487 hrs 2 mins ago0x40d1ba17052a94bd40a1cc2afbec2f38f700a1cc IN  Harmony: ERC20 Bridge0 Ether0.002533092487 41.581320897
0x2edc814000b75d8579f4e9805188bc38c3e02ec4b8edbe3bf4ed5552ab79a06fLock Token134793182021-10-24 9:13:037 hrs 6 mins ago0x2dffaf8e8bf1635c8798e4f3b211ed78a1d33e9c IN  Harmony: ERC20 Bridge0 Ether0.002900049476 48.259355944
0xf0393a5c5d9672c90cf113ffaea2136b939fe213a8f4820370c5c9860d35617cLock Token134792702021-10-24 9:03:077 hrs 16 mins ago0x9ff5dbd7484ce9915404695bc5bfd91d995599a8 IN  Harmony: ERC20 Bridge0 Ether0.001851155771 44.920062398
0x93ad0879f85aba6259f3a287baa401f7c61ace18fcfa2727145f4d98647cd4a5Lock Token134791012021-10-24 8:25:557 hrs 53 mins ago0x9cbdbea7684d53ddce58f479b6a0170e46686e71 IN  Harmony: ERC20 Bridge0 Ether0.002905731283 56.510847816
0xdb073bb821b807e03bc2795a6f9faa92fe414a135e8b41197dd506341825d702Lock Token134790762021-10-24 8:19:397 hrs 59 mins ago0xd2c8e141b4fe7f3a1d27f0afa8def99a7cb79c95 IN  Harmony: ERC20 Bridge0 Ether0.002889035538 52.260913128
0x14a50565639b10bec939aaf0df28c2ade4c4fbe7405952d5cfc6633d3df50bddLock Token134790612021-10-24 8:15:488 hrs 3 mins ago0xf7b18e107eb36797f4ce36de756630b9c30969ad IN  Harmony: ERC20 Bridge0 Ether0.002424445653.89333572
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ERC20EthManager

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2021-07-05
*/

// File: @openzeppelin/contracts/math/SafeMath.sol

pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol

pragma solidity ^0.5.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 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: @openzeppelin/contracts/utils/Address.sol

pragma solidity ^0.5.5;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @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].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-call-value
        (bool success, ) = recipient.call.value(amount)("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
}

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol

pragma solidity ^0.5.0;




/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

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

        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: contracts/erc20/ERC20EthManager.sol

pragma solidity 0.5.17;




contract ERC20EthManager {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    mapping(bytes32 => bool) public usedEvents_;

    event Locked(
        address indexed token,
        address indexed sender,
        uint256 amount,
        address recipient
    );

    event Unlocked(
        address ethToken,
        uint256 amount,
        address recipient,
        bytes32 receiptId
    );

    address public wallet;
    modifier onlyWallet {
        require(msg.sender == wallet, "HmyManager/not-authorized");
        _;
    }

    /**
     * @dev constructor
     * @param _wallet is the multisig wallet
     */
    constructor(address _wallet) public {
        wallet = _wallet;
    }

    /**
     * @dev lock tokens to be minted on harmony chain
     * @param ethTokenAddr is the ethereum token contract address
     * @param amount amount of tokens to lock
     * @param recipient recipient address on the harmony chain
     */
    function lockToken(
        address ethTokenAddr,
        uint256 amount,
        address recipient
    ) public {
        require(
            recipient != address(0),
            "EthManager/recipient is a zero address"
        );
        require(amount > 0, "EthManager/zero token locked");
        IERC20 ethToken = IERC20(ethTokenAddr);
        uint256 _balanceBefore = ethToken.balanceOf(msg.sender);
        ethToken.safeTransferFrom(msg.sender, address(this), amount);
        uint256 _balanceAfter = ethToken.balanceOf(msg.sender);
        uint256 _actualAmount = _balanceBefore.sub(_balanceAfter);
        emit Locked(address(ethToken), msg.sender, _actualAmount, recipient);
    }

    /**
     * @dev lock tokens for a user address to be minted on harmony chain
     * @param ethTokenAddr is the ethereum token contract address
     * @param userAddr is token holder address
     * @param amount amount of tokens to lock
     * @param recipient recipient address on the harmony chain
     */
    function lockTokenFor(
        address ethTokenAddr,
        address userAddr,
        uint256 amount,
        address recipient
    ) public onlyWallet {
        require(
            recipient != address(0),
            "EthManager/recipient is a zero address"
        );
        require(amount > 0, "EthManager/zero token locked");
        IERC20 ethToken = IERC20(ethTokenAddr);
        uint256 _balanceBefore = ethToken.balanceOf(userAddr);
        ethToken.safeTransferFrom(userAddr, address(this), amount);
        uint256 _balanceAfter = ethToken.balanceOf(userAddr);
        uint256 _actualAmount = _balanceBefore.sub(_balanceAfter);
        emit Locked(address(ethToken), userAddr, _actualAmount, recipient);
    }

    /**
     * @dev unlock tokens after burning them on harmony chain
     * @param ethTokenAddr is the ethereum token contract address
     * @param amount amount of unlock tokens
     * @param recipient recipient of the unlock tokens
     * @param receiptId transaction hash of the burn event on harmony chain
     */
    function unlockToken(
        address ethTokenAddr,
        uint256 amount,
        address recipient,
        bytes32 receiptId
    ) public onlyWallet {
        require(
            !usedEvents_[receiptId],
            "EthManager/The burn event cannot be reused"
        );
        IERC20 ethToken = IERC20(ethTokenAddr);
        usedEvents_[receiptId] = true;
        ethToken.safeTransfer(recipient, amount);
        emit Unlocked(ethTokenAddr, amount, recipient, receiptId);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"}],"name":"Locked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"ethToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"bytes32","name":"receiptId","type":"bytes32"}],"name":"Unlocked","type":"event"},{"constant":false,"inputs":[{"internalType":"address","name":"ethTokenAddr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"lockToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"ethTokenAddr","type":"address"},{"internalType":"address","name":"userAddr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"lockTokenFor","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"ethTokenAddr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bytes32","name":"receiptId","type":"bytes32"}],"name":"unlockToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"usedEvents_","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wallet","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051610be9380380610be98339818101604052602081101561003357600080fd5b5051600180546001600160a01b0319166001600160a01b03909216919091179055610b86806100636000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80630296be631461005c57806309eb27281461009a578063521eb273146100d0578063bccc9fcf146100f4578063fe7f61ea14610125575b600080fd5b6100986004803603608081101561007257600080fd5b506001600160a01b0381358116916020810135821691604082013591606001351661015f565b005b610098600480360360608110156100b057600080fd5b506001600160a01b038135811691602081013591604090910135166103e8565b6100d86105f3565b604080516001600160a01b039092168252519081900360200190f35b6101116004803603602081101561010a57600080fd5b5035610602565b604080519115158252519081900360200190f35b6100986004803603608081101561013b57600080fd5b506001600160a01b0381358116916020810135916040820135169060600135610617565b6001546001600160a01b031633146101ba576040805162461bcd60e51b8152602060048201526019602482015278121b5e53585b9859d95c8bdb9bdd0b585d5d1a1bdc9a5e9959603a1b604482015290519081900360640190fd5b6001600160a01b0381166101ff5760405162461bcd60e51b8152600401808060200182810382526026815260200180610b026026913960400191505060405180910390fd5b60008211610254576040805162461bcd60e51b815260206004820152601c60248201527f4574684d616e616765722f7a65726f20746f6b656e206c6f636b656400000000604482015290519081900360640190fd5b60008490506000816001600160a01b03166370a08231866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156102b157600080fd5b505afa1580156102c5573d6000803e3d6000fd5b505050506040513d60208110156102db57600080fd5b505190506102fa6001600160a01b03831686308763ffffffff61074c16565b6000826001600160a01b03166370a08231876040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561035257600080fd5b505afa158015610366573d6000803e3d6000fd5b505050506040513d602081101561037c57600080fd5b505190506000610392838363ffffffff6107ac16565b604080518281526001600160a01b0388811660208301528251939450808b1693908816927f4c6ab40ee4cfa212a441d32ee2897945b4a52461284f9369e23fdf8faa6cdd69928290030190a35050505050505050565b6001600160a01b03811661042d5760405162461bcd60e51b8152600401808060200182810382526026815260200180610b026026913960400191505060405180910390fd5b60008211610482576040805162461bcd60e51b815260206004820152601c60248201527f4574684d616e616765722f7a65726f20746f6b656e206c6f636b656400000000604482015290519081900360640190fd5b604080516370a0823160e01b8152336004820152905184916000916001600160a01b038416916370a08231916024808301926020929190829003018186803b1580156104cd57600080fd5b505afa1580156104e1573d6000803e3d6000fd5b505050506040513d60208110156104f757600080fd5b505190506105166001600160a01b03831633308763ffffffff61074c16565b604080516370a0823160e01b815233600482015290516000916001600160a01b038516916370a0823191602480820192602092909190829003018186803b15801561056057600080fd5b505afa158015610574573d6000803e3d6000fd5b505050506040513d602081101561058a57600080fd5b5051905060006105a0838363ffffffff6107ac16565b604080518281526001600160a01b03888116602083015282519394503393908816927f4c6ab40ee4cfa212a441d32ee2897945b4a52461284f9369e23fdf8faa6cdd69928290030190a350505050505050565b6001546001600160a01b031681565b60006020819052908152604090205460ff1681565b6001546001600160a01b03163314610672576040805162461bcd60e51b8152602060048201526019602482015278121b5e53585b9859d95c8bdb9bdd0b585d5d1a1bdc9a5e9959603a1b604482015290519081900360640190fd5b60008181526020819052604090205460ff16156106c05760405162461bcd60e51b815260040180806020018281038252602a815260200180610ad8602a913960400191505060405180910390fd5b6000818152602081905260409020805460ff19166001179055836106f46001600160a01b038216848663ffffffff6107f516565b604080516001600160a01b038088168252602082018790528516818301526060810184905290517fb24e65d2501e29a3ce014b0cc2283699c081ad27f10d64f036f96912b6f8943e9181900360800190a15050505050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526107a690859061084c565b50505050565b60006107ee83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610a04565b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261084790849061084c565b505050565b61085e826001600160a01b0316610a9b565b6108af576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106108ed5780518252601f1990920191602091820191016108ce565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461094f576040519150601f19603f3d011682016040523d82523d6000602084013e610954565b606091505b5091509150816109ab576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156107a6578080602001905160208110156109c757600080fd5b50516107a65760405162461bcd60e51b815260040180806020018281038252602a815260200180610b28602a913960400191505060405180910390fd5b60008184841115610a935760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610a58578181015183820152602001610a40565b50505050905090810190601f168015610a855780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610acf57508115155b94935050505056fe4574684d616e616765722f546865206275726e206576656e742063616e6e6f74206265207265757365644574684d616e616765722f726563697069656e742069732061207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820490ed419666034f80143a4c1ba96add1fa4fc0510339b9303ecaf6b2a899f1e664736f6c63430005110032000000000000000000000000715cdda5e9ad30a0ced14940f9997ee611496de6

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

000000000000000000000000715cdda5e9ad30a0ced14940f9997ee611496de6

-----Decoded View---------------
Arg [0] : _wallet (address): 0x715cdda5e9ad30a0ced14940f9997ee611496de6

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000715cdda5e9ad30a0ced14940f9997ee611496de6


Deployed ByteCode Sourcemap

15365:3611:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;15365:3611:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17398:740;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;17398:740:0;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;16365:707;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;16365:707:0;;;;;;;;;;;;;;;;;:::i;15801:21::-;;;:::i;:::-;;;;-1:-1:-1;;;;;15801:21:0;;;;;;;;;;;;;;15465:43;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;15465:43:0;;:::i;:::-;;;;;;;;;;;;;;;;;;18473:500;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;18473:500:0;;;;;;;;;;;;;;;;;;;;:::i;17398:740::-;15882:6;;-1:-1:-1;;;;;15882:6:0;15868:10;:20;15860:58;;;;;-1:-1:-1;;;15860:58:0;;;;;;;;;;;;-1:-1:-1;;;15860:58:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;17589:23:0;;17567:111;;;;-1:-1:-1;;;17567:111:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17706:1;17697:6;:10;17689:51;;;;;-1:-1:-1;;;17689:51:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;17751:15;17776:12;17751:38;;17800:22;17825:8;-1:-1:-1;;;;;17825:18:0;;17844:8;17825:28;;;;;;;;;;;;;-1:-1:-1;;;;;17825:28:0;-1:-1:-1;;;;;17825:28:0;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;17825:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;17825:28:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;17825:28:0;;-1:-1:-1;17864:58:0;-1:-1:-1;;;;;17864:25:0;;17890:8;17908:4;17915:6;17864:58;:25;:58;:::i;:::-;17933:21;17957:8;-1:-1:-1;;;;;17957:18:0;;17976:8;17957:28;;;;;;;;;;;;;-1:-1:-1;;;;;17957:28:0;-1:-1:-1;;;;;17957:28:0;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;17957:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;17957:28:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;17957:28:0;;-1:-1:-1;17996:21:0;18020:33;:14;17957:28;18020:33;:18;:33;:::i;:::-;18069:61;;;;;;-1:-1:-1;;;;;18069:61:0;;;;;;;;;17996:57;;-1:-1:-1;18069:61:0;;;;;;;;;;;;;;;;15929:1;;;;17398:740;;;;:::o;16365:707::-;-1:-1:-1;;;;;16515:23:0;;16493:111;;;;-1:-1:-1;;;16493:111:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16632:1;16623:6;:10;16615:51;;;;;-1:-1:-1;;;16615:51:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;16751:30;;;-1:-1:-1;;;16751:30:0;;16770:10;16751:30;;;;;;16702:12;;16677:15;;-1:-1:-1;;;;;16751:18:0;;;;;:30;;;;;;;;;;;;;;:18;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;16751:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16751:30:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16751:30:0;;-1:-1:-1;16792:60:0;-1:-1:-1;;;;;16792:25:0;;16818:10;16838:4;16845:6;16792:60;:25;:60;:::i;:::-;16887:30;;;-1:-1:-1;;;16887:30:0;;16906:10;16887:30;;;;;;16863:21;;-1:-1:-1;;;;;16887:18:0;;;;;:30;;;;;;;;;;;;;;;:18;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;16887:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16887:30:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;16887:30:0;;-1:-1:-1;16928:21:0;16952:33;:14;16887:30;16952:33;:18;:33;:::i;:::-;17001:63;;;;;;-1:-1:-1;;;;;17001:63:0;;;;;;;;;16928:57;;-1:-1:-1;17027:10:0;;17001:63;;;;;;;;;;;;16365:707;;;;;;;:::o;15801:21::-;;;-1:-1:-1;;;;;15801:21:0;;:::o;15465:43::-;;;;;;;;;;;;;;;;:::o;18473:500::-;15882:6;;-1:-1:-1;;;;;15882:6:0;15868:10;:20;15860:58;;;;;-1:-1:-1;;;15860:58:0;;;;;;;;;;;;-1:-1:-1;;;15860:58:0;;;;;;;;;;;;;;;18665:11;:22;;;;;;;;;;;;;18664:23;18642:115;;;;-1:-1:-1;;;18642:115:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18768:15;18817:22;;;;;;;;;;:29;;-1:-1:-1;;18817:29:0;18842:4;18817:29;;;18793:12;18857:40;-1:-1:-1;;;;;18857:21:0;;18879:9;18890:6;18857:40;:21;:40;:::i;:::-;18913:52;;;-1:-1:-1;;;;;18913:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15929:1;18473:500;;;;:::o;12308:204::-;12435:68;;;-1:-1:-1;;;;;12435:68:0;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;12435:68:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;12409:95:0;;12428:5;;12409:18;:95::i;:::-;12308:204;;;;:::o;1369:136::-;1427:7;1454:43;1458:1;1461;1454:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;1447:50;1369:136;-1:-1:-1;;;1369:136:0:o;12124:176::-;12233:58;;;-1:-1:-1;;;;;12233:58:0;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;12233:58:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;12207:85:0;;12226:5;;12207:18;:85::i;:::-;12124:176;;;:::o;14163:1114::-;14767:27;14775:5;-1:-1:-1;;;;;14767:25:0;;:27::i;:::-;14759:71;;;;;-1:-1:-1;;;14759:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;14904:12;14918:23;14953:5;-1:-1:-1;;;;;14945:19:0;14965:4;14945:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;14945:25:0;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;14903:67:0;;;;14989:7;14981:52;;;;;-1:-1:-1;;;14981:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15050:17;;:21;15046:224;;15192:10;15181:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;15181:30:0;15173:85;;;;-1:-1:-1;;;15173:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1842:192;1928:7;1964:12;1956:6;;;;1948:29;;;;-1:-1:-1;;;1948:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1948:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2000:5:0;;;1842:192::o;9153:619::-;9213:4;9681:20;;9524:66;9721:23;;;;;;:42;;-1:-1:-1;9748:15:0;;;9721:42;9713:51;9153:619;-1:-1:-1;;;;9153:619:0:o

Swarm Source

bzzr://490ed419666034f80143a4c1ba96add1fa4fc0510339b9303ecaf6b2a899f1e6
Block Transaction Difficulty Gas Used Reward
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.