ETH Price: $1,953.32 (-1.72%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

TokenTracker

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Lock169282602023-03-28 20:39:351061 days ago1680035975IN
0xaE366B7C...45e5211D1
0 ETH0.0043613924.85746869
Lock169070032023-03-25 20:58:471064 days ago1679777927IN
0xaE366B7C...45e5211D1
0 ETH0.0027142114.46946113
Lock168922672023-03-23 19:18:351066 days ago1679599115IN
0xaE366B7C...45e5211D1
0 ETH0.0047973127.34200863
Lock168891492023-03-23 8:47:231067 days ago1679561243IN
0xaE366B7C...45e5211D1
0 ETH0.0020474211.66918852
Lock168809312023-03-22 5:02:591068 days ago1679461379IN
0xaE366B7C...45e5211D1
0 ETH0.0038121521.72950244
Lock168791332023-03-21 23:00:351068 days ago1679439635IN
0xaE366B7C...45e5211D1
0 ETH0.0028354116.16023814
Lock168785342023-03-21 20:59:231068 days ago1679432363IN
0xaE366B7C...45e5211D1
0 ETH0.0029444716.78366887
Lock168766252023-03-21 14:32:231069 days ago1679409143IN
0xaE366B7C...45e5211D1
0 ETH0.0063641433.92726453
Lock168702002023-03-20 16:53:471069 days ago1679331227IN
0xaE366B7C...45e5211D1
0 ETH0.0049320328.1142883
Lock168662692023-03-20 3:40:351070 days ago1679283635IN
0xaE366B7C...45e5211D1
0 ETH0.003128617.83409884
Lock168635532023-03-19 18:31:231070 days ago1679250683IN
0xaE366B7C...45e5211D1
0 ETH0.0041750423.79796592
Lock168600932023-03-19 6:49:591071 days ago1679208599IN
0xaE366B7C...45e5211D1
0 ETH0.0023543413.42057629
Lock168591982023-03-19 3:49:471071 days ago1679197787IN
0xaE366B7C...45e5211D1
0 ETH0.0024783413.21205908
Lock168591022023-03-19 3:29:591071 days ago1679196599IN
0xaE366B7C...45e5211D1
0 ETH0.0025243513.45731789
Lock168590912023-03-19 3:27:471071 days ago1679196467IN
0xaE366B7C...45e5211D1
0 ETH0.0024411613.91325852
Lock168587722023-03-19 2:22:591071 days ago1679192579IN
0xaE366B7C...45e5211D1
0 ETH0.0023103612.31653713
Lock168553842023-03-18 14:58:471072 days ago1679151527IN
0xaE366B7C...45e5211D1
0 ETH0.0033902219.32234198
Lock168515112023-03-18 1:54:351072 days ago1679104475IN
0xaE366B7C...45e5211D1
0 ETH0.0034744918.52252363
Lock168413862023-03-16 15:46:231074 days ago1678981583IN
0xaE366B7C...45e5211D1
0 ETH0.0046630726.5768853
Lock168306302023-03-15 3:27:231075 days ago1678850843IN
0xaE366B7C...45e5211D1
0 ETH0.0045824626.11748123
Lock168208992023-03-13 18:38:231076 days ago1678732703IN
0xaE366B7C...45e5211D1
0 ETH0.0063591736.24760525
Lock167918142023-03-09 16:23:471080 days ago1678379027IN
0xaE366B7C...45e5211D1
0 ETH0.0067115438.25202409
Lock167918002023-03-09 16:20:591080 days ago1678378859IN
0xaE366B7C...45e5211D1
0 ETH0.0027913735.78180775
Lock167831462023-03-08 11:08:351082 days ago1678273715IN
0xaE366B7C...45e5211D1
0 ETH0.0036137320.59626465
Lock167814362023-03-08 5:23:111082 days ago1678252991IN
0xaE366B7C...45e5211D1
0 ETH0.0034564919.70008975
View all transactions

Latest 11 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer169332052023-03-29 13:20:111061 days ago1680096011
0xaE366B7C...45e5211D1
0.201 ETH
-146180342022-04-19 21:38:461404 days ago1650404326
0xaE366B7C...45e5211D1
0.199 ETH
-145443732022-04-08 9:40:311416 days ago1649410831
0xaE366B7C...45e5211D1
0.05 ETH
-145422212022-04-08 1:24:541416 days ago1649381094
0xaE366B7C...45e5211D1
1 ETH
-144706672022-03-27 21:27:011427 days ago1648416421
0xaE366B7C...45e5211D1
1.1 ETH
-144466452022-03-24 3:40:561431 days ago1648093256
0xaE366B7C...45e5211D1
0.00581169 ETH
-139311952022-01-03 7:32:521511 days ago1641195172
0xaE366B7C...45e5211D1
4.86938964 ETH
-139159492021-12-31 23:10:431513 days ago1640992243
0xaE366B7C...45e5211D1
0.0775 ETH
-139127262021-12-31 10:53:151514 days ago1640947995
0xaE366B7C...45e5211D1
1.7 ETH
-137807462021-12-11 0:53:171534 days ago1639183997
0xaE366B7C...45e5211D1
2.35 ETH
-137646342021-12-08 11:45:051537 days ago1638963905
0xaE366B7C...45e5211D1
0.242045 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RouterProxy

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.6;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "./interfaces/IRouterProxy.sol";
import "./interfaces/IRouterDiamond.sol";
import "./interfaces/IERC2612Permit.sol";

/**
 * @dev If we are paying the fee in something other than ALBT or transferring
 * native currency, we use this proxy contract instead of the bridge router.
 */
contract RouterProxy is IRouterProxy, ERC20, Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    address public routerAddress;
    address public albtToken;
    mapping(address => uint256) public feeAmountByToken;
    uint8 private immutable _decimals;

    /**
     *  @notice Constructs a new RouterProxy contract
     *  @param routerAddress_ The address of the underlying router
     *  @param albtToken_ The address of the (w)ALBT contract
     *  @param tokenName_ The name for the ERC20 token representing the native currency
     *  @param tokenSymbol_ The symbol for the ERC20 token representing the native currency
     *  @param decimals_ The number of decimals for the ERC20 token representing the native currency
     */
    constructor(
        address routerAddress_, address albtToken_, string memory tokenName_, string memory tokenSymbol_, uint8 decimals_
    ) ERC20(tokenName_, tokenSymbol_) {
        require(routerAddress_ != address(0), "Router address must be non-zero");
        require(albtToken_ != address(0), "ALBT address must be non-zero");
        routerAddress = routerAddress_;
        albtToken = albtToken_;
        _decimals = decimals_;
    }

    /**
     *  @notice Set the fee amount for a token
     *  @param tokenAddress_ The address of the ERC20 token contract
     *  @param fee_ The fee amount when paying with this token
     */
    function setFee(address tokenAddress_, uint256 fee_) external override onlyOwner {
        emit FeeSet(tokenAddress_, feeAmountByToken[tokenAddress_], fee_);
        feeAmountByToken[tokenAddress_] = fee_;
    }

    /**
     *  @param tokenAddress_ The address of the ERC20 token contract
     *  @return The fee amount for the token
     */
    function _fee(address tokenAddress_) view internal virtual returns (uint256) {
        require(feeAmountByToken[tokenAddress_] > 0, "Unsupported token");
        return feeAmountByToken[tokenAddress_];
    }

    /**
     *  @notice Set the address for the router contract
     *  @param routerAddress_ The address of the router contract
     */
    function setRouterAddress(address routerAddress_) external override onlyOwner {
        emit RouterAddressSet(routerAddress, routerAddress_);
        routerAddress = routerAddress_;
    }

    /**
     *  @notice Set the address for the (w)ALBT contract
     *  @param albtToken_ The address of the (w)ALBT contract
     */
    function setAlbtToken(address albtToken_) external override onlyOwner {
        emit AlbtAddressSet(albtToken, albtToken_);
        albtToken = albtToken_;
    }

    /**
     *  @param tokenAddress_ The address of the token contract
     *  @return Checks if the supplied token address is representing the native currency
     */
    function _isNativeCurrency(address tokenAddress_) internal view returns(bool) {
        return tokenAddress_ == address(this);
    }

    /**
     *  @notice Gets the user's funds and approves their transfer to the router, covering the fee in (w)ALBT
     *  @param feeToken_ Token the user is paying the fee in
     *  @param transferToken_ Token the user wants to transfer
     *  @param amount_ Amount the user wants to transfer
     */
    function _setupProxyPayment(address feeToken_, address transferToken_, uint256 amount_) internal nonReentrant {
        uint256 currencyLeft = msg.value;
        bool isTransferTokenNativeCurrency = _isNativeCurrency(transferToken_);

        if (isTransferTokenNativeCurrency) {
            require(currencyLeft >= amount_, "Not enough funds sent to transfer");
            currencyLeft -= amount_;
            _mint(address(this), amount_);
        }
        else {
            IERC20(transferToken_).safeTransferFrom(msg.sender, address(this), amount_);
        }

        uint256 feeOwed = _fee(feeToken_);
        if (_isNativeCurrency(feeToken_)) {
            require(currencyLeft >= feeOwed, "Not enough funds sent to pay the fee");
            currencyLeft -= feeOwed;

            (bool success, bytes memory returndata) = owner().call{value: feeOwed}("");
            require(success, string(returndata));
        }
        else {
            IERC20(feeToken_).safeTransferFrom(msg.sender, owner(), feeOwed);
        }
        emit FeeCollected(feeToken_, feeOwed);

        uint256 albtApproveAmount = IRouterDiamond(routerAddress).serviceFee() + IRouterDiamond(routerAddress).externalFee();
        if (transferToken_ == albtToken) {
            albtApproveAmount += amount_;
        }
        else if (isTransferTokenNativeCurrency) {
            _approve(address(this), routerAddress, amount_);
        }
        else {
            IERC20(transferToken_).approve(routerAddress, amount_);
        }
        IERC20(albtToken).approve(routerAddress, albtApproveAmount);

        if (currencyLeft > 0) {
            (bool success, bytes memory returndata) = msg.sender.call{value: currencyLeft}("");
            require(success, string(returndata));
        }
    }

    /**
     *  @notice Transfers `amount` native tokens to the router contract.
                The router must be authorised to transfer both the native token and the ALBT tokens for the fees.
     *  @param feeToken_ Token used to pay the fee
     *  @param targetChain_ The target chain for the bridging operation
     *  @param nativeToken_ The token to be bridged
     *  @param amount_ The amount of tokens to bridge
     *  @param receiver_ The address of the receiver in the target chain
     */
    function lock(
        address feeToken_,
        uint8 targetChain_,
        address nativeToken_,
        uint256 amount_,
        bytes calldata receiver_
    ) public override payable {
        _setupProxyPayment(feeToken_, nativeToken_, amount_);
        IRouterDiamond(routerAddress).lock(targetChain_, nativeToken_, amount_, receiver_);
        emit ProxyLock(feeToken_, targetChain_, nativeToken_, amount_, receiver_);
    }

    /**
     *  @notice Locks the provided amount of nativeToken using an EIP-2612 permit and initiates a bridging transaction
     *  @param feeToken_ Token used to pay the fee
     *  @param targetChain_ The chain to bridge the tokens to
     *  @param nativeToken_ The native token to bridge
     *  @param amount_ The amount of nativeToken to lock and bridge
     *  @param deadline_ The deadline for the provided permit
     *  @param v_ The recovery id of the permit's ECDSA signature
     *  @param r_ The first output of the permit's ECDSA signature
     *  @param s_ The second output of the permit's ECDSA signature
     */
    function lockWithPermit(
        address feeToken_,
        uint8 targetChain_,
        address nativeToken_,
        uint256 amount_,
        bytes calldata receiver_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) external override payable {
        IERC2612Permit(nativeToken_).permit(msg.sender, address(this), amount_, deadline_, v_, r_, s_);
        lock(feeToken_, targetChain_, nativeToken_, amount_, receiver_);
    }

    /**
     *  @notice Calls burn on the given wrapped token contract with `amount` wrapped tokens from `msg.sender`.
                The router must be authorised to transfer the ABLT tokens for the fees.
     *  @param feeToken_ Token used to pay the fee
     *  @param wrappedToken_ The wrapped token to burn
     *  @param amount_ The amount of wrapped tokens to be bridged
     *  @param receiver_ The address of the user in the original chain for this wrapped token
     */
    function burn(
        address feeToken_, address wrappedToken_, uint256 amount_, bytes memory receiver_
    ) public override payable {
        _setupProxyPayment(feeToken_, wrappedToken_, amount_);
        IRouterDiamond(routerAddress).burn(wrappedToken_, amount_, receiver_);
        emit ProxyBurn(feeToken_, wrappedToken_, amount_, receiver_);
    }

    /**
     *  @notice Burns `amount` of `wrappedToken` using an EIP-2612 permit and initializes a bridging transaction to the original chain
     *  @param feeToken_ Token used to pay the fee
     *  @param wrappedToken_ The address of the wrapped token to burn
     *  @param amount_ The amount of `wrappedToken` to burn
     *  @param receiver_ The receiving address in the original chain for this wrapped token
     *  @param deadline_ The deadline of the provided permit
     *  @param v_ The recovery id of the permit's ECDSA signature
     *  @param r_ The first output of the permit's ECDSA signature
     *  @param s_ The second output of the permit's ECDSA signature
     */
    function burnWithPermit(
        address feeToken_,
        address wrappedToken_,
        uint256 amount_,
        bytes calldata receiver_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) external override payable {
        IERC2612Permit(wrappedToken_).permit(msg.sender, address(this), amount_, deadline_, v_, r_, s_);
        burn(feeToken_, wrappedToken_, amount_, receiver_);
    }

    /**
     *  @notice Calls burn on the given wrapped token contract with `amount` wrapped tokens from `msg.sender`.
                The router must be authorised to transfer the ABLT tokens for the fees.
     *  @param feeToken_ Token used to pay the fee
     *  @param targetChain_ The target chain for the bridging operation
     *  @param wrappedToken_ The wrapped token to burn
     *  @param amount_ The amount of wrapped tokens to be bridged
     *  @param receiver_ The address of the user in the original chain for this wrapped token
     */
    function burnAndTransfer(
        address feeToken_,
        uint8 targetChain_,
        address wrappedToken_,
        uint256 amount_,
        bytes calldata receiver_
    ) public override payable {
        _setupProxyPayment(feeToken_, wrappedToken_, amount_);
        IRouterDiamond(routerAddress).burnAndTransfer(targetChain_, wrappedToken_, amount_, receiver_);
        emit ProxyBurnAndTransfer(feeToken_, targetChain_, wrappedToken_, amount_, receiver_);
    }

    /**
     *  @notice Burns `amount` of `wrappedToken` using an EIP-2612 permit and initializes a bridging transaction to the original chain
     *  @param feeToken_ Token used to pay the fee
     *  @param targetChain_ The target chain for the bridging operation
     *  @param wrappedToken_ The address of the wrapped token to burn
     *  @param amount_ The amount of `wrappedToken` to burn
     *  @param receiver_ The receiving address in the original chain for this wrapped token
     *  @param deadline_ The deadline of the provided permit
     *  @param v_ The recovery id of the permit's ECDSA signature
     *  @param r_ The first output of the permit's ECDSA signature
     *  @param s_ The second output of the permit's ECDSA signature
     */
    function burnAndTransferWithPermit(
        address feeToken_,
        uint8 targetChain_,
        address wrappedToken_,
        uint256 amount_,
        bytes calldata receiver_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) external override payable {
        IERC2612Permit(wrappedToken_).permit(msg.sender, address(this), amount_, deadline_, v_, r_, s_);
        burnAndTransfer(feeToken_, targetChain_, wrappedToken_, amount_, receiver_);
    }

    /**
    * @dev Invoked by the router when unlocking tokens
    * Overriden so unlocking automatically unwraps to native currency
    */
    function transfer(address recipient_, uint256 amount_) public override returns (bool) {
        bool success = false;

        if (msg.sender == routerAddress) {
            bytes memory returndata;

            _burn(msg.sender, amount_);
            (success, returndata) = recipient_.call{value: amount_}("");
            require(success, string(returndata));
        }

        return success;
    }

    /**
     *  @notice Get the ERC20 decimal count
     */
    function decimals() public view override returns (uint8) {
        return _decimals;
    }

    /**
     *  @notice Send contract's tokens to the owner's address
     *  @param tokenAddress_ The token we want to claim
     *  @dev In case we want to take out the (w)ALBT
     */
    function claimTokens(address tokenAddress_) external override onlyOwner {
        uint256 amount = IERC20(tokenAddress_).balanceOf(address(this));
        IERC20(tokenAddress_).safeTransfer(owner(), amount);
        emit TokensClaimed(tokenAddress_, amount);
    }

    /**
     *  @notice Send the contract's currency to the owner's address
     *  @dev In case we want to replace the RouterProxy contract
     */
    function claimCurrency() external override onlyOwner {
        uint256 amount = address(this).balance;
        (bool success, bytes memory returndata) = owner().call{value: amount}("");
        require(success, string(returndata));

        emit CurrencyClaimed(amount);
    }

    /**
     *  @notice Loads the bridge with native currency
     *  @dev Usable when you add a pre-existing WrappedToken contract for native currency
     */
    function bridgeAirdrop() external override payable onlyOwner {
        require(msg.value > 0, "Expected funds");
        _mint(routerAddress, msg.value);
        emit BridgeAirdrop(msg.value);
    }

}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

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

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

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

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

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

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

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

        return true;
    }

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

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

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

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

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

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

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

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

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

        _afterTokenTransfer(account, address(0), amount);
    }

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @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 IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    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));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    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'
        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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _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. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 20 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

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 make 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;
    }
}

//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.6;
pragma experimental ABIEncoderV2;

interface IRouterProxy {

    /// @notice An event emitted when setting the fee amount for a token
    event FeeSet(address token_, uint256 oldFee_, uint256 newFee_);
    /// @notice An event emitted when setting a new Router address
    event RouterAddressSet(address oldRouter_, address newRouter_);
    /// @notice An event emitted when setting a new ALBT address
    event AlbtAddressSet(address oldAlbt_, address newAlbt_);
    /// @notice An event emitted once a Lock transaction is proxied
    event ProxyLock(address feeToken_, uint8 targetChain_, address nativeToken_, uint256 amount_, bytes receiver_);
    /// @notice An event emitted once a Burn transaction is proxied
    event ProxyBurn(address feeToken_, address wrappedToken_, uint256 amount_, bytes receiver_);
    /// @notice An event emitted once a BurnAndTransfer transaction is proxied
    event ProxyBurnAndTransfer(address feeToken_, uint8 targetChain_, address wrappedToken_, uint256 amount_, bytes receiver_);
    /// @notice An event emitted when the proxy collects a fee
    event FeeCollected(address token_, uint256 amount_);
    /// @notice An event emitted when contract's tokens are sent to the owner
    event TokensClaimed(address token_, uint256 amount_);
    /// @notice An event emitted when the contract's currency is sent to the owner
    event CurrencyClaimed(uint256 amount);
    /// @notice An event emitted when currency is manually sent to the bridge
    event BridgeAirdrop(uint256 amount_);

    function setFee(address tokenAddress_, uint256 fee_) external;

    function setRouterAddress(address routerAddress_) external;

    function setAlbtToken(address albtToken_) external;

    function lock(address feeToken_, uint8 targetChain_, address nativeToken_, uint256 amount_, bytes calldata receiver_) external payable;

    function lockWithPermit(
        address feeToken_,
        uint8 targetChain_,
        address nativeToken_,
        uint256 amount_,
        bytes calldata receiver_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) external payable;

    function burn(address feeToken_, address wrappedToken_, uint256 amount_, bytes calldata receiver_) external payable;

    function burnWithPermit(
        address feeToken_,
        address wrappedToken_,
        uint256 amount_,
        bytes calldata receiver_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) external payable;

    function burnAndTransfer(address feeToken_, uint8 targetChain_, address wrappedToken_, uint256 amount_, bytes calldata receiver_)
        external payable;

    function burnAndTransferWithPermit(
        address feeToken_,
        uint8 targetChain_,
        address wrappedToken_,
        uint256 amount_,
        bytes calldata receiver_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) external payable;

    function claimTokens(address tokenAddress_) external;
    function claimCurrency() external;

    function bridgeAirdrop() external payable;

}

File 7 of 20 : IRouterDiamond.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.6;
pragma experimental ABIEncoderV2;

import "./IDiamondCut.sol";
import "./IDiamondLoupe.sol";
import "./IFeeCalculator.sol";
import "./IFeeExternal.sol";
import "./IRouter.sol";
import "./IGovernance.sol";
import "./IUtility.sol";

interface IRouterDiamond is IGovernance, IDiamondCut, IDiamondLoupe, IFeeCalculator, IFeeExternal, IUtility, IRouter {}

//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.6;

/**
 * @dev Interface of the ERC2612 standard as defined in the EIP.
 *
 * Adds the {permit} method, which can be used to change one's
 * {IERC20-allowance} without having to send a transaction, by signing a
 * message. This allows users to spend tokens without having to hold Ether.
 *
 * See https://eips.ethereum.org/EIPS/eip-2612.
 */
interface IERC2612Permit {
    /**
     * @dev Sets `_amount` as the allowance of `_spender` over `_owner`'s tokens,
     * given `_owner`'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `_owner` cannot be the zero address.
     * - `_spender` cannot be the zero address.
     * - `_deadline` must be a timestamp in the future.
     * - `_v`, `_r` and `_s` must be a valid `secp256k1` signature from `_owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``_owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address _owner,
        address _spender,
        uint256 _amount,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) external;

    /**
     * @dev Returns the current ERC2612 nonce for `_owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``_owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address _owner) external view returns (uint256);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 13 of 20 : IDiamondCut.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.6;
pragma experimental ABIEncoderV2;

interface IDiamondCut {
    enum FacetCutAction {Add, Replace, Remove}
    // Add=0, Replace=1, Remove=2

    struct FacetCut {
        address facetAddress;
        FacetCutAction action;
        bytes4[] functionSelectors;
    }

    /// @notice Add/replace/remove any number of functions and optionally execute
    ///         a function with delegatecall
    /// @param _diamondCut Contains the facet addresses and function selectors
    /// @param _init The address of the contract or facet to execute _calldata
    /// @param _calldata A function call, including function selector and arguments
    ///                  _calldata is executed with delegatecall on _init
    /// @param _signatures The signatures of between n/2 and n validators for this upgrade
    function diamondCut(
        FacetCut[] calldata _diamondCut,
        address _init,
        bytes calldata _calldata,
        bytes[] memory _signatures
    ) external;

    event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);
}

// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.6;
pragma experimental ABIEncoderV2;

// A loupe is a small magnifying glass used to look at diamonds.
// These functions look at diamonds
interface IDiamondLoupe {
    /// These functions are expected to be called frequently
    /// by tools.

    struct Facet {
        address facetAddress;
        bytes4[] functionSelectors;
    }

    /// @notice Gets all facet addresses and their four byte function selectors.
    /// @return facets_ Facet
    function facets() external view returns (Facet[] memory facets_);

    /// @notice Gets all the function selectors supported by a specific facet.
    /// @param _facet The facet address.
    /// @return facetFunctionSelectors_
    function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);

    /// @notice Get all the facet addresses used by a diamond.
    /// @return facetAddresses_
    function facetAddresses() external view returns (address[] memory facetAddresses_);

    /// @notice Gets the facet that supports the given selector.
    /// @dev If facet is not found return address(0).
    /// @param _functionSelector The function selector.
    /// @return facetAddress_ The facet address.
    function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);
}

//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.6;
pragma experimental ABIEncoderV2;

interface IFeeCalculator {
    /// @notice An event emitted once the service fee is modified
    event ServiceFeeSet(address account, uint256 newServiceFee);
    /// @notice An event emitted once a member claims fees accredited to him
    event Claim(address member, uint256 amount);

    /**
     *  @notice Construct a new FeeCalculator contract
     *  @param _serviceFee The initial service fee in ALBT tokens (flat)
     */
    function initFeeCalculator(uint256 _serviceFee) external;

    /// @return The currently set service fee
    function serviceFee() external view returns (uint256);

    /**
     *  @notice Sets the service fee for this chain
     *  @param _serviceFee The new service fee
     *  @param _signatures The array of signatures from the members, authorising the operation
     */
    function setServiceFee(uint256 _serviceFee, bytes[] calldata _signatures) external;

    /// @return The current feesAccrued counter
    function feesAccrued() external view returns (uint256);

    /// @return The feesAccrued counter before the last reward distribution
    function previousAccrued() external view returns (uint256);

    /// @return The current accumulator counter
    function accumulator() external view returns (uint256);

    /**
     *  @param _account The address of a validator
     *  @return The total amount of ALBT claimed by the provided validator address
     */
    function claimedRewardsPerAccount(address _account) external view returns (uint256);

    /// @notice Sends out the reward in ALBT accumulated by the caller
    function claim() external;
}

//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.6;
pragma experimental ABIEncoderV2;

interface IFeeExternal {
    /// @notice An event emitted once the external fee is modified
    event ExternalFeeSet(address account, uint256 newExternalFee);
    /// @notice An event emitted once a the external fee account is modified
    event ExternalFeeAddressSet(address account, address newExternalFeeAddress);

    /**
     *  @notice Construct a new FeeExternal contract
     *  @param _externalFee The initial external fee in ALBT tokens (flat)
     */
    function initFeeExternal(uint256 _externalFee, address _externalFeeAddress) external;
    function externalFee() external view returns (uint256);
    function externalFeeAddress() external view returns (address);
    function setExternalFee(uint256 _externalFee, bytes[] calldata _signatures) external;
    function setExternalFeeAddress(address _externalFeeAddress, bytes[] calldata _signatures) external;

}

//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.6;
pragma experimental ABIEncoderV2;

import "../libraries/LibRouter.sol";

struct WrappedTokenParams {
    string name;
    string symbol;
    uint8 decimals;
}

interface IRouter {
    /// @notice An event emitted once a Lock transaction is executed
    event Lock(uint8 targetChain, address token, bytes receiver, uint256 amount, uint256 serviceFee);
    /// @notice An event emitted once a Burn transaction is executed
    event Burn(address token, uint256 amount, bytes receiver);
    /// @notice An event emitted once a BurnAndTransfer transaction is executed
    event BurnAndTransfer(uint8 targetChain, address token, uint256 amount, bytes receiver);
    /// @notice An event emitted once an Unlock transaction is executed
    event Unlock(address token, uint256 amount, address receiver);
    /// @notice An even emitted once a Mint transaction is executed
    event Mint(address token, uint256 amount, address receiver);
    /// @notice An event emitted once a new wrapped token is deployed by the contract
    event WrappedTokenDeployed(uint8 sourceChain, bytes nativeToken, address wrappedToken);
    /// @notice An event emitted when collecting fees
    event Fees(uint256 serviceFee, uint256 externalFee);

    function initRouter(uint8 _chainId, address _albtToken) external;
    function nativeToWrappedToken(uint8 _chainId, bytes memory _nativeToken) external view returns (address);
    function wrappedToNativeToken(address _wrappedToken) external view returns (LibRouter.NativeTokenWithChainId memory);
    function hashesUsed(uint8 _chainId, bytes32 _ethHash) external view returns (bool);
    function albtToken() external view returns (address);
    function lock(uint8 _targetChain, address _nativeToken, uint256 _amount, bytes memory _receiver) external;

    function lockWithPermit(
        uint8 _targetChain,
        address _nativeToken,
        uint256 _amount,
        bytes memory _receiver,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) external;

    function unlock(
        uint8 _sourceChain,
        bytes memory _transactionId,
        address _nativeToken,
        uint256 _amount,
        address _receiver,
        bytes[] calldata _signatures
    ) external;

    function burn(address _wrappedToken, uint256 _amount, bytes memory _receiver) external;

    function burnWithPermit(
        address _wrappedToken,
        uint256 _amount,
        bytes memory _receiver,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) external;

    function burnAndTransfer(uint8 _targetChain, address _wrappedToken, uint256 _amount, bytes memory _receiver) external;

    function burnAndTransferWithPermit(
        uint8 _targetChain,
        address _wrappedToken,
        uint256 _amount,
        bytes memory _receiver,
        uint256 _deadline,
        uint8 _v,
        bytes32 _r,
        bytes32 _s
    ) external;

    function mint(
        uint8 _nativeChain,
        bytes memory _nativeToken,
        bytes memory _transactionId,
        uint256 _amount,
        address _receiver,
        bytes[] calldata _signatures,
        WrappedTokenParams memory _tokenParams
    ) external;
}

//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.6;
pragma experimental ABIEncoderV2;

interface IGovernance {
    /// @notice An event emitted once member is updated
    event MemberUpdated(address member, bool status);

    /**
     *  @notice Initializes the Governance facet with an initial set of members
     *  @param _members The initial set of members
     */
    function initGovernance(address[] memory _members) external;

    /**
     *  @notice Adds/removes a member account
     *  @param _account The account to be modified
     *  @param _status Whether the account will be set as member or not
     *  @param _signatures The signatures of the validators authorizing this member update
     */
    function updateMember(address _account, bool _status, bytes[] calldata _signatures) external;

    /// @return True/false depending on whether a given address is member or not
    function isMember(address _member) external view returns (bool);

    /// @return The count of members in the members set
    function membersCount() external view returns (uint256);

    /// @return The address of a member at a given index
    function memberAt(uint256 _index) external view returns (address);

    /// @return The current administrative nonce
    function administrativeNonce() external view returns (uint256);
}

// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.6;
pragma experimental ABIEncoderV2;

interface IUtility {
    enum TokenAction {Pause, Unpause}

    function pauseToken(address _tokenAddress, bytes[] calldata _signatures) external;
    function unpauseToken(address _tokenAddress, bytes[] calldata _signatures) external;

    function setWrappedToken(uint8 _nativeChainId, bytes memory _nativeToken, address _wrappedToken, bytes[] calldata _signatures) external;
    function unsetWrappedToken(address _wrappedToken, bytes[] calldata _signatures) external;

    event TokenPause(address _account, address _token);
    event TokenUnpause(address _account, address _token);
    event WrappedTokenSet(uint8 _nativeChainId, bytes _nativeToken, address _wrappedToken);
    event WrappedTokenUnset(address _wrappedToken);
}

File 20 of 20 : LibRouter.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.6;

library LibRouter {
    bytes32 constant STORAGE_POSITION = keccak256("router.storage");

    /// @notice Struct containing information about a token's address and its native chain
    struct NativeTokenWithChainId {
        uint8 chainId;
        bytes token;
    }

    struct Storage {
        bool initialized;

        // Maps chainID => (nativeToken => wrappedToken)
        mapping(uint8 => mapping(bytes => address)) nativeToWrappedToken;

        // Maps wrapped tokens in the current chain to their native chain + token address
        mapping(address => NativeTokenWithChainId) wrappedToNativeToken;

        // Storage metadata for transfers. Maps sourceChain => (transactionId => metadata)
        mapping(uint8 => mapping(bytes32 => bool)) hashesUsed;

        // Address of the ALBT token in the current chain
        address albtToken;

        // The chainId of the current chain
        uint8 chainId;
    }

    function routerStorage() internal pure returns (Storage storage ds) {
        bytes32 position = STORAGE_POSITION;
        assembly {
            ds.slot := position
        }
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"routerAddress_","type":"address"},{"internalType":"address","name":"albtToken_","type":"address"},{"internalType":"string","name":"tokenName_","type":"string"},{"internalType":"string","name":"tokenSymbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAlbt_","type":"address"},{"indexed":false,"internalType":"address","name":"newAlbt_","type":"address"}],"name":"AlbtAddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"BridgeAirdrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"CurrencyClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token_","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"FeeCollected","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token_","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldFee_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee_","type":"uint256"}],"name":"FeeSet","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":"feeToken_","type":"address"},{"indexed":false,"internalType":"address","name":"wrappedToken_","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount_","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"receiver_","type":"bytes"}],"name":"ProxyBurn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeToken_","type":"address"},{"indexed":false,"internalType":"uint8","name":"targetChain_","type":"uint8"},{"indexed":false,"internalType":"address","name":"wrappedToken_","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount_","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"receiver_","type":"bytes"}],"name":"ProxyBurnAndTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeToken_","type":"address"},{"indexed":false,"internalType":"uint8","name":"targetChain_","type":"uint8"},{"indexed":false,"internalType":"address","name":"nativeToken_","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount_","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"receiver_","type":"bytes"}],"name":"ProxyLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldRouter_","type":"address"},{"indexed":false,"internalType":"address","name":"newRouter_","type":"address"}],"name":"RouterAddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token_","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"TokensClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"albtToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridgeAirdrop","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"feeToken_","type":"address"},{"internalType":"address","name":"wrappedToken_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"bytes","name":"receiver_","type":"bytes"}],"name":"burn","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"feeToken_","type":"address"},{"internalType":"uint8","name":"targetChain_","type":"uint8"},{"internalType":"address","name":"wrappedToken_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"bytes","name":"receiver_","type":"bytes"}],"name":"burnAndTransfer","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"feeToken_","type":"address"},{"internalType":"uint8","name":"targetChain_","type":"uint8"},{"internalType":"address","name":"wrappedToken_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"bytes","name":"receiver_","type":"bytes"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"burnAndTransferWithPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"feeToken_","type":"address"},{"internalType":"address","name":"wrappedToken_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"bytes","name":"receiver_","type":"bytes"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"burnWithPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claimCurrency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress_","type":"address"}],"name":"claimTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"feeAmountByToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"feeToken_","type":"address"},{"internalType":"uint8","name":"targetChain_","type":"uint8"},{"internalType":"address","name":"nativeToken_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"bytes","name":"receiver_","type":"bytes"}],"name":"lock","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"feeToken_","type":"address"},{"internalType":"uint8","name":"targetChain_","type":"uint8"},{"internalType":"address","name":"nativeToken_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"bytes","name":"receiver_","type":"bytes"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"lockWithPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"routerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"albtToken_","type":"address"}],"name":"setAlbtToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress_","type":"address"},{"internalType":"uint256","name":"fee_","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"routerAddress_","type":"address"}],"name":"setRouterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040523480156200001157600080fd5b5060405162002b0e38038062002b0e83398101604081905262000034916200036a565b8251839083906200004d906003906020850190620001f0565b50805162000063906004906020840190620001f0565b505050620000806200007a6200019a60201b60201c565b6200019e565b60016006556001600160a01b038516620000e15760405162461bcd60e51b815260206004820152601f60248201527f526f757465722061646472657373206d757374206265206e6f6e2d7a65726f0060448201526064015b60405180910390fd5b6001600160a01b038416620001395760405162461bcd60e51b815260206004820152601d60248201527f414c42542061646472657373206d757374206265206e6f6e2d7a65726f0000006044820152606401620000d8565b600780546001600160a01b03199081166001600160a01b03978816179091556008805490911694909516939093179093555060f81b7fff00000000000000000000000000000000000000000000000000000000000000166080525062000469565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001fe9062000416565b90600052602060002090601f0160209004810192826200022257600085556200026d565b82601f106200023d57805160ff19168380011785556200026d565b828001600101855582156200026d579182015b828111156200026d57825182559160200191906001019062000250565b506200027b9291506200027f565b5090565b5b808211156200027b576000815560010162000280565b80516001600160a01b0381168114620002ae57600080fd5b919050565b600082601f830112620002c557600080fd5b81516001600160401b0380821115620002e257620002e262000453565b604051601f8301601f19908116603f011681019082821181831017156200030d576200030d62000453565b816040528381526020925086838588010111156200032a57600080fd5b600091505b838210156200034e57858201830151818301840152908201906200032f565b83821115620003605760008385830101525b9695505050505050565b600080600080600060a086880312156200038357600080fd5b6200038e8662000296565b94506200039e6020870162000296565b60408701519094506001600160401b0380821115620003bc57600080fd5b620003ca89838a01620002b3565b94506060880151915080821115620003e157600080fd5b50620003f088828901620002b3565b925050608086015160ff811681146200040857600080fd5b809150509295509295909350565b600181811c908216806200042b57607f821691505b602082108114156200044d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160f81c61268662000488600039600061027501526126866000f3fe6080604052600436106101c25760003560e01c80636e8e70bb116100f7578063a9059cbb11610095578063e55156b511610064578063e55156b5146104f9578063ed41d37314610519578063f18d6c341461052c578063f2fde38b1461055957600080fd5b8063a9059cbb14610460578063d2fc555214610480578063dd62ed3e14610493578063df8de3e7146104d957600080fd5b80638da5cb5b116100d15780638da5cb5b146103fa57806395d89b4114610418578063a457c2d71461042d578063a5732dd81461044d57600080fd5b80636e8e70bb1461039c57806370a08231146103af578063715018a6146103e557600080fd5b8063395093511161016457806369adf6681161013e57806369adf668146103415780636a9e2177146103545780636ae630371461035c5780636c2abf261461037c57600080fd5b806339509351146102ec57806341cb87fc1461030c5780634bf5452f1461032c57600080fd5b806323b872dd116101a057806323b872dd14610241578063313ce567146102615780633268cc561461029f57806333bed2c3146102d757600080fd5b806306fdde03146101c7578063095ea7b3146101f257806318160ddd14610222575b600080fd5b3480156101d357600080fd5b506101dc610579565b6040516101e99190612515565b60405180910390f35b3480156101fe57600080fd5b5061021261020d36600461221c565b61060b565b60405190151581526020016101e9565b34801561022e57600080fd5b506002545b6040519081526020016101e9565b34801561024d57600080fd5b5061021261025c366004612069565b610621565b34801561026d57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101e9565b3480156102ab57600080fd5b506007546102bf906001600160a01b031681565b6040516001600160a01b0390911681526020016101e9565b6102ea6102e5366004612246565b6106d2565b005b3480156102f857600080fd5b5061021261030736600461221c565b610790565b34801561031857600080fd5b506102ea61032736600461201b565b6107cc565b34801561033857600080fd5b506102ea61085f565b6102ea61034f3660046120a5565b61094c565b6102ea610a03565b34801561036857600080fd5b506102ea61037736600461201b565b610ab9565b34801561038857600080fd5b506008546102bf906001600160a01b031681565b6102ea6103aa3660046122c5565b610b4c565b3480156103bb57600080fd5b506102336103ca36600461201b565b6001600160a01b031660009081526020819052604090205490565b3480156103f157600080fd5b506102ea610bd0565b34801561040657600080fd5b506005546001600160a01b03166102bf565b34801561042457600080fd5b506101dc610c06565b34801561043957600080fd5b5061021261044836600461221c565b610c15565b6102ea61045b366004612246565b610cae565b34801561046c57600080fd5b5061021261047b36600461221c565b610d5c565b6102ea61048e366004612140565b610dfc565b34801561049f57600080fd5b506102336104ae366004612036565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156104e557600080fd5b506102ea6104f436600461201b565b610eb0565b34801561050557600080fd5b506102ea61051436600461221c565b610fc2565b6102ea6105273660046122c5565b611060565b34801561053857600080fd5b5061023361054736600461201b565b60096020526000908152604090205481565b34801561056557600080fd5b506102ea61057436600461201b565b6110d8565b606060038054610588906125e9565b80601f01602080910402602001604051908101604052809291908181526020018280546105b4906125e9565b80156106015780601f106105d657610100808354040283529160200191610601565b820191906000526020600020905b8154815290600101906020018083116105e457829003601f168201915b5050505050905090565b6000610618338484611173565b50600192915050565b600061062e848484611298565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156106b85760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6106c58533858403611173565b60019150505b9392505050565b6106dd868585611468565b600754604051632e22866160e21b81526001600160a01b039091169063b88a198490610715908890889088908890889060040161255d565b600060405180830381600087803b15801561072f57600080fd5b505af1158015610743573d6000803e3d6000fd5b505050507f90dc0696903df8b9dfc8bfdfc5a36e64ab98df43f7ba3ae624359c795cb05c41868686868686604051610780969594939291906124cc565b60405180910390a1505050505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916106189185906107c790869061258e565b611173565b6005546001600160a01b031633146107f65760405162461bcd60e51b81526004016106af90612528565b600754604080516001600160a01b03928316815291831660208301527fb3cbb74e835466bdbf8838b1acb70fa4a8b73e1a00cd5bacb9f68cf4dfc79cf3910160405180910390a1600780546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031633146108895760405162461bcd60e51b81526004016106af90612528565b4760008061089f6005546001600160a01b031690565b6001600160a01b03168360405160006040518083038185875af1925050503d80600081146108e9576040519150601f19603f3d011682016040523d82523d6000602084013e6108ee565b606091505b50915091508181906109135760405162461bcd60e51b81526004016106af9190612515565b506040518381527fe4e84357f942b41bcf87ac1e15444150114e4b7b7eb651d053bc329b09b9b19d9060200160405180910390a1505050565b60405163d505accf60e01b81526001600160a01b0389169063d505accf9061098490339030908c908a908a908a908a9060040161245b565b600060405180830381600087803b15801561099e57600080fd5b505af11580156109b2573d6000803e3d6000fd5b505050506109f889898989898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610dfc92505050565b505050505050505050565b6005546001600160a01b03163314610a2d5760405162461bcd60e51b81526004016106af90612528565b60003411610a6e5760405162461bcd60e51b815260206004820152600e60248201526d45787065637465642066756e647360901b60448201526064016106af565b600754610a84906001600160a01b0316346119cf565b6040513481527fb805de2a68e6d805cf5304a432895736ce43e1537808ecb9ac03cae7829d15cb9060200160405180910390a1565b6005546001600160a01b03163314610ae35760405162461bcd60e51b81526004016106af90612528565b600854604080516001600160a01b03928316815291831660208301527f08916ec86635ab36fc6eaf605b03ed046724b4f372db4a0aebecedb5b9386155910160405180910390a1600880546001600160a01b0319166001600160a01b0392909216919091179055565b60405163d505accf60e01b81526001600160a01b0389169063d505accf90610b8490339030908c908a908a908a908a9060040161245b565b600060405180830381600087803b158015610b9e57600080fd5b505af1158015610bb2573d6000803e3d6000fd5b50505050610bc48a8a8a8a8a8a610cae565b50505050505050505050565b6005546001600160a01b03163314610bfa5760405162461bcd60e51b81526004016106af90612528565b610c046000611aae565b565b606060048054610588906125e9565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610c975760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106af565b610ca43385858403611173565b5060019392505050565b610cb9868585611468565b6007546040516313fe103160e01b81526001600160a01b03909116906313fe103190610cf1908890889088908890889060040161255d565b600060405180830381600087803b158015610d0b57600080fd5b505af1158015610d1f573d6000803e3d6000fd5b505050507f95c0edb09661a522dec4c11ed4a1082b5427029d29c3d31cf845d66323ebb0ce868686868686604051610780969594939291906124cc565b60075460009081906001600160a01b03163314156106cb576060610d803385611b00565b6040516001600160a01b038616908590600081818185875af1925050503d8060008114610dc9576040519150601f19603f3d011682016040523d82523d6000602084013e610dce565b606091505b5090925090508082610df35760405162461bcd60e51b81526004016106af9190612515565b50509392505050565b610e07848484611468565b6007546040516344d1718760e01b81526001600160a01b03909116906344d1718790610e3b9086908690869060040161249c565b600060405180830381600087803b158015610e5557600080fd5b505af1158015610e69573d6000803e3d6000fd5b505050507fb336a9e19cecba7d9e17aa915f669d3fa1bbd9285de15b34598ab404d437c66584848484604051610ea2949392919061241e565b60405180910390a150505050565b6005546001600160a01b03163314610eda5760405162461bcd60e51b81526004016106af90612528565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015610f1c57600080fd5b505afa158015610f30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f549190612394565b9050610f7c610f6b6005546001600160a01b031690565b6001600160a01b0384169083611c4b565b604080516001600160a01b0384168152602081018390527f896e034966eaaf1adc54acc0f257056febbd300c9e47182cf761982cf1f5e430910160405180910390a15050565b6005546001600160a01b03163314610fec5760405162461bcd60e51b81526004016106af90612528565b6001600160a01b0382166000818152600960209081526040918290205482519384529083015281018290527f042c4172e737b3881970f62db0648a3a8f261cb2c4bbcc695ad3663f94f80ad49060600160405180910390a16001600160a01b03909116600090815260096020526040902055565b60405163d505accf60e01b81526001600160a01b0389169063d505accf9061109890339030908c908a908a908a908a9060040161245b565b600060405180830381600087803b1580156110b257600080fd5b505af11580156110c6573d6000803e3d6000fd5b50505050610bc48a8a8a8a8a8a6106d2565b6005546001600160a01b031633146111025760405162461bcd60e51b81526004016106af90612528565b6001600160a01b0381166111675760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106af565b61117081611aae565b50565b6001600160a01b0383166111d55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106af565b6001600160a01b0382166112365760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106af565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166112fc5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106af565b6001600160a01b03821661135e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106af565b6001600160a01b038316600090815260208190526040902054818110156113d65760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106af565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061140d90849061258e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161145991815260200190565b60405180910390a35b50505050565b600260065414156114bb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106af565b6002600655346001600160a01b03831630148015611548578282101561152d5760405162461bcd60e51b815260206004820152602160248201527f4e6f7420656e6f7567682066756e64732073656e7420746f207472616e7366656044820152603960f91b60648201526084016106af565b61153783836125a6565b915061154330846119cf565b61155d565b61155d6001600160a01b038516333086611cae565b600061156886611ce6565b9050306001600160a01b038716141561167457808310156115d75760405162461bcd60e51b8152602060048201526024808201527f4e6f7420656e6f7567682066756e64732073656e7420746f20706179207468656044820152632066656560e01b60648201526084016106af565b6115e181846125a6565b92506000806115f86005546001600160a01b031690565b6001600160a01b03168360405160006040518083038185875af1925050503d8060008114611642576040519150601f19603f3d011682016040523d82523d6000602084013e611647565b606091505b509150915081819061166c5760405162461bcd60e51b81526004016106af9190612515565b50505061169c565b61169c3361168a6005546001600160a01b031690565b6001600160a01b038916919084611cae565b604080516001600160a01b0388168152602081018390527f06c5efeff5c320943d265dc4e5f1af95ad523555ce0c1957e367dda5514572df910160405180910390a16007546040805163bc904ef560e01b815290516000926001600160a01b03169163bc904ef5916004808301926020929190829003018186803b15801561172357600080fd5b505afa158015611737573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061175b9190612394565b600760009054906101000a90046001600160a01b03166001600160a01b0316638abdf5aa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117a957600080fd5b505afa1580156117bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e19190612394565b6117eb919061258e565b6008549091506001600160a01b03878116911614156118155761180e858261258e565b90506118c0565b8215611838576007546118339030906001600160a01b031687611173565b6118c0565b60075460405163095ea7b360e01b81526001600160a01b039182166004820152602481018790529087169063095ea7b390604401602060405180830381600087803b15801561188657600080fd5b505af115801561189a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118be9190612372565b505b60085460075460405163095ea7b360e01b81526001600160a01b0391821660048201526024810184905291169063095ea7b390604401602060405180830381600087803b15801561191057600080fd5b505af1158015611924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119489190612372565b5083156119c1576040516000908190339087908381818185875af1925050503d8060008114611993576040519150601f19603f3d011682016040523d82523d6000602084013e611998565b606091505b50915091508181906119bd5760405162461bcd60e51b81526004016106af9190612515565b5050505b505060016006555050505050565b6001600160a01b038216611a255760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106af565b8060026000828254611a37919061258e565b90915550506001600160a01b03821660009081526020819052604081208054839290611a6490849061258e565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216611b605760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016106af565b6001600160a01b03821660009081526020819052604090205481811015611bd45760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016106af565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611c039084906125a6565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161128b565b505050565b6040516001600160a01b038316602482015260448101829052611c4690849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611d5b565b6040516001600160a01b03808516602483015283166044820152606481018290526114629085906323b872dd60e01b90608401611c77565b6001600160a01b038116600090815260096020526040812054611d3f5760405162461bcd60e51b81526020600482015260116024820152702ab739bab83837b93a32b2103a37b5b2b760791b60448201526064016106af565b506001600160a01b031660009081526009602052604090205490565b6000611db0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611e2d9092919063ffffffff16565b805190915015611c465780806020019051810190611dce9190612372565b611c465760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106af565b6060611e3c8484600085611e44565b949350505050565b606082471015611ea55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106af565b843b611ef35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106af565b600080866001600160a01b03168587604051611f0f9190612402565b60006040518083038185875af1925050503d8060008114611f4c576040519150601f19603f3d011682016040523d82523d6000602084013e611f51565b606091505b5091509150611f61828286611f6c565b979650505050505050565b60608315611f7b5750816106cb565b825115611f8b5782518084602001fd5b8160405162461bcd60e51b81526004016106af9190612515565b80356001600160a01b0381168114611fbc57600080fd5b919050565b60008083601f840112611fd357600080fd5b50813567ffffffffffffffff811115611feb57600080fd5b60208301915083602082850101111561200357600080fd5b9250929050565b803560ff81168114611fbc57600080fd5b60006020828403121561202d57600080fd5b6106cb82611fa5565b6000806040838503121561204957600080fd5b61205283611fa5565b915061206060208401611fa5565b90509250929050565b60008060006060848603121561207e57600080fd5b61208784611fa5565b925061209560208501611fa5565b9150604084013590509250925092565b60008060008060008060008060006101008a8c0312156120c457600080fd5b6120cd8a611fa5565b98506120db60208b01611fa5565b975060408a0135965060608a013567ffffffffffffffff8111156120fe57600080fd5b61210a8c828d01611fc1565b90975095505060808a0135935061212360a08b0161200a565b925060c08a0135915060e08a013590509295985092959850929598565b6000806000806080858703121561215657600080fd5b61215f85611fa5565b935061216d60208601611fa5565b925060408501359150606085013567ffffffffffffffff8082111561219157600080fd5b818701915087601f8301126121a557600080fd5b8135818111156121b7576121b761263a565b604051601f8201601f19908116603f011681019083821181831017156121df576121df61263a565b816040528281528a60208487010111156121f857600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561222f57600080fd5b61223883611fa5565b946020939093013593505050565b60008060008060008060a0878903121561225f57600080fd5b61226887611fa5565b95506122766020880161200a565b945061228460408801611fa5565b935060608701359250608087013567ffffffffffffffff8111156122a757600080fd5b6122b389828a01611fc1565b979a9699509497509295939492505050565b6000806000806000806000806000806101208b8d0312156122e557600080fd5b6122ee8b611fa5565b99506122fc60208c0161200a565b985061230a60408c01611fa5565b975060608b0135965060808b013567ffffffffffffffff81111561232d57600080fd5b6123398d828e01611fc1565b90975095505060a08b0135935061235260c08c0161200a565b925060e08b013591506101008b013590509295989b9194979a5092959850565b60006020828403121561238457600080fd5b815180151581146106cb57600080fd5b6000602082840312156123a657600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600081518084526123ee8160208601602086016125bd565b601f01601f19169290920160200192915050565b600082516124148184602087016125bd565b9190910192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612451908301846123d6565b9695505050505050565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b60018060a01b03841681528260208201526060604082015260006124c360608301846123d6565b95945050505050565b6001600160a01b03878116825260ff87166020830152851660408201526060810184905260a06080820181905260009061250990830184866123ad565b98975050505050505050565b6020815260006106cb60208301846123d6565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60ff8616815260018060a01b0385166020820152836040820152608060608201526000611f616080830184866123ad565b600082198211156125a1576125a1612624565b500190565b6000828210156125b8576125b8612624565b500390565b60005b838110156125d85781810151838201526020016125c0565b838111156114625750506000910152565b600181811c908216806125fd57607f821691505b6020821081141561261e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea264697066735822122063ac424ef34985536bcd8e488a9fc668247091d9009aa2d51c05240fa151337464736f6c634300080600330000000000000000000000007cab80b6facd52a0f3e044d8bfc43d0ad6d258f400000000000000000000000000a8b738e453ffd858a7edf03bccfe20412f0eb000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014416c6c69616e636542726964676520457468657200000000000000000000000000000000000000000000000000000000000000000000000000000000000000054142455448000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101c25760003560e01c80636e8e70bb116100f7578063a9059cbb11610095578063e55156b511610064578063e55156b5146104f9578063ed41d37314610519578063f18d6c341461052c578063f2fde38b1461055957600080fd5b8063a9059cbb14610460578063d2fc555214610480578063dd62ed3e14610493578063df8de3e7146104d957600080fd5b80638da5cb5b116100d15780638da5cb5b146103fa57806395d89b4114610418578063a457c2d71461042d578063a5732dd81461044d57600080fd5b80636e8e70bb1461039c57806370a08231146103af578063715018a6146103e557600080fd5b8063395093511161016457806369adf6681161013e57806369adf668146103415780636a9e2177146103545780636ae630371461035c5780636c2abf261461037c57600080fd5b806339509351146102ec57806341cb87fc1461030c5780634bf5452f1461032c57600080fd5b806323b872dd116101a057806323b872dd14610241578063313ce567146102615780633268cc561461029f57806333bed2c3146102d757600080fd5b806306fdde03146101c7578063095ea7b3146101f257806318160ddd14610222575b600080fd5b3480156101d357600080fd5b506101dc610579565b6040516101e99190612515565b60405180910390f35b3480156101fe57600080fd5b5061021261020d36600461221c565b61060b565b60405190151581526020016101e9565b34801561022e57600080fd5b506002545b6040519081526020016101e9565b34801561024d57600080fd5b5061021261025c366004612069565b610621565b34801561026d57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000121681526020016101e9565b3480156102ab57600080fd5b506007546102bf906001600160a01b031681565b6040516001600160a01b0390911681526020016101e9565b6102ea6102e5366004612246565b6106d2565b005b3480156102f857600080fd5b5061021261030736600461221c565b610790565b34801561031857600080fd5b506102ea61032736600461201b565b6107cc565b34801561033857600080fd5b506102ea61085f565b6102ea61034f3660046120a5565b61094c565b6102ea610a03565b34801561036857600080fd5b506102ea61037736600461201b565b610ab9565b34801561038857600080fd5b506008546102bf906001600160a01b031681565b6102ea6103aa3660046122c5565b610b4c565b3480156103bb57600080fd5b506102336103ca36600461201b565b6001600160a01b031660009081526020819052604090205490565b3480156103f157600080fd5b506102ea610bd0565b34801561040657600080fd5b506005546001600160a01b03166102bf565b34801561042457600080fd5b506101dc610c06565b34801561043957600080fd5b5061021261044836600461221c565b610c15565b6102ea61045b366004612246565b610cae565b34801561046c57600080fd5b5061021261047b36600461221c565b610d5c565b6102ea61048e366004612140565b610dfc565b34801561049f57600080fd5b506102336104ae366004612036565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156104e557600080fd5b506102ea6104f436600461201b565b610eb0565b34801561050557600080fd5b506102ea61051436600461221c565b610fc2565b6102ea6105273660046122c5565b611060565b34801561053857600080fd5b5061023361054736600461201b565b60096020526000908152604090205481565b34801561056557600080fd5b506102ea61057436600461201b565b6110d8565b606060038054610588906125e9565b80601f01602080910402602001604051908101604052809291908181526020018280546105b4906125e9565b80156106015780601f106105d657610100808354040283529160200191610601565b820191906000526020600020905b8154815290600101906020018083116105e457829003601f168201915b5050505050905090565b6000610618338484611173565b50600192915050565b600061062e848484611298565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156106b85760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6106c58533858403611173565b60019150505b9392505050565b6106dd868585611468565b600754604051632e22866160e21b81526001600160a01b039091169063b88a198490610715908890889088908890889060040161255d565b600060405180830381600087803b15801561072f57600080fd5b505af1158015610743573d6000803e3d6000fd5b505050507f90dc0696903df8b9dfc8bfdfc5a36e64ab98df43f7ba3ae624359c795cb05c41868686868686604051610780969594939291906124cc565b60405180910390a1505050505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916106189185906107c790869061258e565b611173565b6005546001600160a01b031633146107f65760405162461bcd60e51b81526004016106af90612528565b600754604080516001600160a01b03928316815291831660208301527fb3cbb74e835466bdbf8838b1acb70fa4a8b73e1a00cd5bacb9f68cf4dfc79cf3910160405180910390a1600780546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031633146108895760405162461bcd60e51b81526004016106af90612528565b4760008061089f6005546001600160a01b031690565b6001600160a01b03168360405160006040518083038185875af1925050503d80600081146108e9576040519150601f19603f3d011682016040523d82523d6000602084013e6108ee565b606091505b50915091508181906109135760405162461bcd60e51b81526004016106af9190612515565b506040518381527fe4e84357f942b41bcf87ac1e15444150114e4b7b7eb651d053bc329b09b9b19d9060200160405180910390a1505050565b60405163d505accf60e01b81526001600160a01b0389169063d505accf9061098490339030908c908a908a908a908a9060040161245b565b600060405180830381600087803b15801561099e57600080fd5b505af11580156109b2573d6000803e3d6000fd5b505050506109f889898989898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610dfc92505050565b505050505050505050565b6005546001600160a01b03163314610a2d5760405162461bcd60e51b81526004016106af90612528565b60003411610a6e5760405162461bcd60e51b815260206004820152600e60248201526d45787065637465642066756e647360901b60448201526064016106af565b600754610a84906001600160a01b0316346119cf565b6040513481527fb805de2a68e6d805cf5304a432895736ce43e1537808ecb9ac03cae7829d15cb9060200160405180910390a1565b6005546001600160a01b03163314610ae35760405162461bcd60e51b81526004016106af90612528565b600854604080516001600160a01b03928316815291831660208301527f08916ec86635ab36fc6eaf605b03ed046724b4f372db4a0aebecedb5b9386155910160405180910390a1600880546001600160a01b0319166001600160a01b0392909216919091179055565b60405163d505accf60e01b81526001600160a01b0389169063d505accf90610b8490339030908c908a908a908a908a9060040161245b565b600060405180830381600087803b158015610b9e57600080fd5b505af1158015610bb2573d6000803e3d6000fd5b50505050610bc48a8a8a8a8a8a610cae565b50505050505050505050565b6005546001600160a01b03163314610bfa5760405162461bcd60e51b81526004016106af90612528565b610c046000611aae565b565b606060048054610588906125e9565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610c975760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106af565b610ca43385858403611173565b5060019392505050565b610cb9868585611468565b6007546040516313fe103160e01b81526001600160a01b03909116906313fe103190610cf1908890889088908890889060040161255d565b600060405180830381600087803b158015610d0b57600080fd5b505af1158015610d1f573d6000803e3d6000fd5b505050507f95c0edb09661a522dec4c11ed4a1082b5427029d29c3d31cf845d66323ebb0ce868686868686604051610780969594939291906124cc565b60075460009081906001600160a01b03163314156106cb576060610d803385611b00565b6040516001600160a01b038616908590600081818185875af1925050503d8060008114610dc9576040519150601f19603f3d011682016040523d82523d6000602084013e610dce565b606091505b5090925090508082610df35760405162461bcd60e51b81526004016106af9190612515565b50509392505050565b610e07848484611468565b6007546040516344d1718760e01b81526001600160a01b03909116906344d1718790610e3b9086908690869060040161249c565b600060405180830381600087803b158015610e5557600080fd5b505af1158015610e69573d6000803e3d6000fd5b505050507fb336a9e19cecba7d9e17aa915f669d3fa1bbd9285de15b34598ab404d437c66584848484604051610ea2949392919061241e565b60405180910390a150505050565b6005546001600160a01b03163314610eda5760405162461bcd60e51b81526004016106af90612528565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015610f1c57600080fd5b505afa158015610f30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f549190612394565b9050610f7c610f6b6005546001600160a01b031690565b6001600160a01b0384169083611c4b565b604080516001600160a01b0384168152602081018390527f896e034966eaaf1adc54acc0f257056febbd300c9e47182cf761982cf1f5e430910160405180910390a15050565b6005546001600160a01b03163314610fec5760405162461bcd60e51b81526004016106af90612528565b6001600160a01b0382166000818152600960209081526040918290205482519384529083015281018290527f042c4172e737b3881970f62db0648a3a8f261cb2c4bbcc695ad3663f94f80ad49060600160405180910390a16001600160a01b03909116600090815260096020526040902055565b60405163d505accf60e01b81526001600160a01b0389169063d505accf9061109890339030908c908a908a908a908a9060040161245b565b600060405180830381600087803b1580156110b257600080fd5b505af11580156110c6573d6000803e3d6000fd5b50505050610bc48a8a8a8a8a8a6106d2565b6005546001600160a01b031633146111025760405162461bcd60e51b81526004016106af90612528565b6001600160a01b0381166111675760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106af565b61117081611aae565b50565b6001600160a01b0383166111d55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106af565b6001600160a01b0382166112365760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106af565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166112fc5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106af565b6001600160a01b03821661135e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106af565b6001600160a01b038316600090815260208190526040902054818110156113d65760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106af565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061140d90849061258e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161145991815260200190565b60405180910390a35b50505050565b600260065414156114bb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106af565b6002600655346001600160a01b03831630148015611548578282101561152d5760405162461bcd60e51b815260206004820152602160248201527f4e6f7420656e6f7567682066756e64732073656e7420746f207472616e7366656044820152603960f91b60648201526084016106af565b61153783836125a6565b915061154330846119cf565b61155d565b61155d6001600160a01b038516333086611cae565b600061156886611ce6565b9050306001600160a01b038716141561167457808310156115d75760405162461bcd60e51b8152602060048201526024808201527f4e6f7420656e6f7567682066756e64732073656e7420746f20706179207468656044820152632066656560e01b60648201526084016106af565b6115e181846125a6565b92506000806115f86005546001600160a01b031690565b6001600160a01b03168360405160006040518083038185875af1925050503d8060008114611642576040519150601f19603f3d011682016040523d82523d6000602084013e611647565b606091505b509150915081819061166c5760405162461bcd60e51b81526004016106af9190612515565b50505061169c565b61169c3361168a6005546001600160a01b031690565b6001600160a01b038916919084611cae565b604080516001600160a01b0388168152602081018390527f06c5efeff5c320943d265dc4e5f1af95ad523555ce0c1957e367dda5514572df910160405180910390a16007546040805163bc904ef560e01b815290516000926001600160a01b03169163bc904ef5916004808301926020929190829003018186803b15801561172357600080fd5b505afa158015611737573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061175b9190612394565b600760009054906101000a90046001600160a01b03166001600160a01b0316638abdf5aa6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117a957600080fd5b505afa1580156117bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e19190612394565b6117eb919061258e565b6008549091506001600160a01b03878116911614156118155761180e858261258e565b90506118c0565b8215611838576007546118339030906001600160a01b031687611173565b6118c0565b60075460405163095ea7b360e01b81526001600160a01b039182166004820152602481018790529087169063095ea7b390604401602060405180830381600087803b15801561188657600080fd5b505af115801561189a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118be9190612372565b505b60085460075460405163095ea7b360e01b81526001600160a01b0391821660048201526024810184905291169063095ea7b390604401602060405180830381600087803b15801561191057600080fd5b505af1158015611924573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119489190612372565b5083156119c1576040516000908190339087908381818185875af1925050503d8060008114611993576040519150601f19603f3d011682016040523d82523d6000602084013e611998565b606091505b50915091508181906119bd5760405162461bcd60e51b81526004016106af9190612515565b5050505b505060016006555050505050565b6001600160a01b038216611a255760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106af565b8060026000828254611a37919061258e565b90915550506001600160a01b03821660009081526020819052604081208054839290611a6490849061258e565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216611b605760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016106af565b6001600160a01b03821660009081526020819052604090205481811015611bd45760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016106af565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611c039084906125a6565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161128b565b505050565b6040516001600160a01b038316602482015260448101829052611c4690849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611d5b565b6040516001600160a01b03808516602483015283166044820152606481018290526114629085906323b872dd60e01b90608401611c77565b6001600160a01b038116600090815260096020526040812054611d3f5760405162461bcd60e51b81526020600482015260116024820152702ab739bab83837b93a32b2103a37b5b2b760791b60448201526064016106af565b506001600160a01b031660009081526009602052604090205490565b6000611db0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611e2d9092919063ffffffff16565b805190915015611c465780806020019051810190611dce9190612372565b611c465760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106af565b6060611e3c8484600085611e44565b949350505050565b606082471015611ea55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106af565b843b611ef35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106af565b600080866001600160a01b03168587604051611f0f9190612402565b60006040518083038185875af1925050503d8060008114611f4c576040519150601f19603f3d011682016040523d82523d6000602084013e611f51565b606091505b5091509150611f61828286611f6c565b979650505050505050565b60608315611f7b5750816106cb565b825115611f8b5782518084602001fd5b8160405162461bcd60e51b81526004016106af9190612515565b80356001600160a01b0381168114611fbc57600080fd5b919050565b60008083601f840112611fd357600080fd5b50813567ffffffffffffffff811115611feb57600080fd5b60208301915083602082850101111561200357600080fd5b9250929050565b803560ff81168114611fbc57600080fd5b60006020828403121561202d57600080fd5b6106cb82611fa5565b6000806040838503121561204957600080fd5b61205283611fa5565b915061206060208401611fa5565b90509250929050565b60008060006060848603121561207e57600080fd5b61208784611fa5565b925061209560208501611fa5565b9150604084013590509250925092565b60008060008060008060008060006101008a8c0312156120c457600080fd5b6120cd8a611fa5565b98506120db60208b01611fa5565b975060408a0135965060608a013567ffffffffffffffff8111156120fe57600080fd5b61210a8c828d01611fc1565b90975095505060808a0135935061212360a08b0161200a565b925060c08a0135915060e08a013590509295985092959850929598565b6000806000806080858703121561215657600080fd5b61215f85611fa5565b935061216d60208601611fa5565b925060408501359150606085013567ffffffffffffffff8082111561219157600080fd5b818701915087601f8301126121a557600080fd5b8135818111156121b7576121b761263a565b604051601f8201601f19908116603f011681019083821181831017156121df576121df61263a565b816040528281528a60208487010111156121f857600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561222f57600080fd5b61223883611fa5565b946020939093013593505050565b60008060008060008060a0878903121561225f57600080fd5b61226887611fa5565b95506122766020880161200a565b945061228460408801611fa5565b935060608701359250608087013567ffffffffffffffff8111156122a757600080fd5b6122b389828a01611fc1565b979a9699509497509295939492505050565b6000806000806000806000806000806101208b8d0312156122e557600080fd5b6122ee8b611fa5565b99506122fc60208c0161200a565b985061230a60408c01611fa5565b975060608b0135965060808b013567ffffffffffffffff81111561232d57600080fd5b6123398d828e01611fc1565b90975095505060a08b0135935061235260c08c0161200a565b925060e08b013591506101008b013590509295989b9194979a5092959850565b60006020828403121561238457600080fd5b815180151581146106cb57600080fd5b6000602082840312156123a657600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600081518084526123ee8160208601602086016125bd565b601f01601f19169290920160200192915050565b600082516124148184602087016125bd565b9190910192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612451908301846123d6565b9695505050505050565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b60018060a01b03841681528260208201526060604082015260006124c360608301846123d6565b95945050505050565b6001600160a01b03878116825260ff87166020830152851660408201526060810184905260a06080820181905260009061250990830184866123ad565b98975050505050505050565b6020815260006106cb60208301846123d6565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60ff8616815260018060a01b0385166020820152836040820152608060608201526000611f616080830184866123ad565b600082198211156125a1576125a1612624565b500190565b6000828210156125b8576125b8612624565b500390565b60005b838110156125d85781810151838201526020016125c0565b838111156114625750506000910152565b600181811c908216806125fd57607f821691505b6020821081141561261e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea264697066735822122063ac424ef34985536bcd8e488a9fc668247091d9009aa2d51c05240fa151337464736f6c63430008060033

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

0000000000000000000000007cab80b6facd52a0f3e044d8bfc43d0ad6d258f400000000000000000000000000a8b738e453ffd858a7edf03bccfe20412f0eb000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000014416c6c69616e636542726964676520457468657200000000000000000000000000000000000000000000000000000000000000000000000000000000000000054142455448000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : routerAddress_ (address): 0x7CAB80B6FaCD52A0F3e044D8bfC43d0ad6D258F4
Arg [1] : albtToken_ (address): 0x00a8b738E453fFd858a7edf03bcCfe20412f0Eb0
Arg [2] : tokenName_ (string): AllianceBridge Ether
Arg [3] : tokenSymbol_ (string): ABETH
Arg [4] : decimals_ (uint8): 18

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 0000000000000000000000007cab80b6facd52a0f3e044d8bfc43d0ad6d258f4
Arg [1] : 00000000000000000000000000a8b738e453ffd858a7edf03bccfe20412f0eb0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [6] : 416c6c69616e6365427269646765204574686572000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [8] : 4142455448000000000000000000000000000000000000000000000000000000


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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