ETH Price: $3,386.77 (+1.17%)

Contract

0xEf6D4e4c75f86962385335127dF9a12ef6953b2c
 

Overview

ETH Balance

0.067838406602813085 ETH

Eth Value

$229.75 (@ $3,386.77/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Release170600402023-04-16 14:29:47617 days ago1681655387IN
0xEf6D4e4c...ef6953b2c
0 ETH0.0010744523.48995177
Release170466092023-04-14 16:34:59619 days ago1681490099IN
0xEf6D4e4c...ef6953b2c
0 ETH0.0013327629.13718378
Fishing170458482023-04-14 13:57:59619 days ago1681480679IN
0xEf6D4e4c...ef6953b2c
0.02 ETH0.0024406131.08231385
Fishing170455082023-04-14 12:48:11619 days ago1681476491IN
0xEf6D4e4c...ef6953b2c
0.02 ETH0.0021390127.24129878
Release170454622023-04-14 12:38:47619 days ago1681475927IN
0xEf6D4e4c...ef6953b2c
0 ETH0.0011967226.163008
Fishing170451022023-04-14 11:23:59619 days ago1681471439IN
0xEf6D4e4c...ef6953b2c
0.01 ETH0.0021072726.83705035
Claim170447422023-04-14 10:10:11619 days ago1681467011IN
0xEf6D4e4c...ef6953b2c
0.01914426 ETH0.0028377523.98110976
Fishing170447152023-04-14 10:04:35619 days ago1681466675IN
0xEf6D4e4c...ef6953b2c
0.06 ETH0.0020288325.83805891
Claim170434342023-04-14 5:41:47619 days ago1681450907IN
0xEf6D4e4c...ef6953b2c
0.02118381 ETH0.003038725.67402058
Fishing170434092023-04-14 5:36:35619 days ago1681450595IN
0xEf6D4e4c...ef6953b2c
0.02 ETH0.0021558527.4557635
Fishing170429502023-04-14 4:02:23619 days ago1681444943IN
0xEf6D4e4c...ef6953b2c
0.12 ETH0.0020999226.74346173
Fishing170425132023-04-14 2:31:59620 days ago1681439519IN
0xEf6D4e4c...ef6953b2c
0.02 ETH0.0025423132.37751565
Claim170423782023-04-14 2:04:35620 days ago1681437875IN
0xEf6D4e4c...ef6953b2c
0.02623478 ETH0.0034903929.49338823
Fishing170423492023-04-14 1:58:47620 days ago1681437527IN
0xEf6D4e4c...ef6953b2c
0.06 ETH0.0023158229.49309678
Claim170418712023-04-14 0:21:23620 days ago1681431683IN
0xEf6D4e4c...ef6953b2c
0.01810814 ETH0.0026210622.14541442
Fishing170418462023-04-14 0:16:11620 days ago1681431371IN
0xEf6D4e4c...ef6953b2c
0.06 ETH0.0019558924.90924243
Fishing170416672023-04-13 23:39:59620 days ago1681429199IN
0xEf6D4e4c...ef6953b2c
0.01 ETH0.0018146823.11086775
Claim170413452023-04-13 22:34:11620 days ago1681425251IN
0xEf6D4e4c...ef6953b2c
0.01735706 ETH0.0028758524.2981154
Fishing170413152023-04-13 22:28:11620 days ago1681424891IN
0xEf6D4e4c...ef6953b2c
0.02 ETH0.0020275325.82160993
Fishing170409322023-04-13 21:08:59620 days ago1681420139IN
0xEf6D4e4c...ef6953b2c
0.01 ETH0.0029995938.2012039
Claim170408302023-04-13 20:47:47620 days ago1681418867IN
0xEf6D4e4c...ef6953b2c
0.02223606 ETH0.003180726.87379113
Claim170408132023-04-13 20:44:23620 days ago1681418663IN
0xEf6D4e4c...ef6953b2c
0.021491 ETH0.0035720730.18052884
Fishing170407842023-04-13 20:38:23620 days ago1681418303IN
0xEf6D4e4c...ef6953b2c
0.01 ETH0.0023773930.27713241
Claim170405732023-04-13 19:53:59620 days ago1681415639IN
0xEf6D4e4c...ef6953b2c
0.02458255 ETH0.0044211437.35430141
Fishing170402602023-04-13 18:44:47620 days ago1681411487IN
0xEf6D4e4c...ef6953b2c
0.04 ETH0.0028487236.27975602
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
187757572023-12-13 7:26:59376 days ago1702452419
0xEf6D4e4c...ef6953b2c
0.01750484 ETH
187757572023-12-13 7:26:59376 days ago1702452419
0xEf6D4e4c...ef6953b2c
0.01750484 ETH
187757572023-12-13 7:26:59376 days ago1702452419
0xEf6D4e4c...ef6953b2c
0.00767353 ETH
187757572023-12-13 7:26:59376 days ago1702452419
0xEf6D4e4c...ef6953b2c
0.01748164 ETH
187757572023-12-13 7:26:59376 days ago1702452419
0xEf6D4e4c...ef6953b2c
0.00767353 ETH
170600402023-04-16 14:29:47617 days ago1681655387
0xEf6D4e4c...ef6953b2c
0.02648063 ETH
170494012023-04-15 2:10:47619 days ago1681524647
0xEf6D4e4c...ef6953b2c
0.00825577 ETH
170493942023-04-15 2:09:23619 days ago1681524563
0xEf6D4e4c...ef6953b2c
0.01822485 ETH
170466092023-04-14 16:34:59619 days ago1681490099
0xEf6D4e4c...ef6953b2c
0.0354478 ETH
170459642023-04-14 14:21:59619 days ago1681482119
0xEf6D4e4c...ef6953b2c
0.01777828 ETH
170458482023-04-14 13:57:59619 days ago1681480679
0xEf6D4e4c...ef6953b2c
0.02 ETH
170456242023-04-14 13:11:47619 days ago1681477907
0xEf6D4e4c...ef6953b2c
0.01766951 ETH
170455082023-04-14 12:48:11619 days ago1681476491
0xEf6D4e4c...ef6953b2c
0.02 ETH
170454622023-04-14 12:38:47619 days ago1681475927
0xEf6D4e4c...ef6953b2c
5.83857014 ETH
170452232023-04-14 11:48:35619 days ago1681472915
0xEf6D4e4c...ef6953b2c
0.00810202 ETH
170451022023-04-14 11:23:59619 days ago1681471439
0xEf6D4e4c...ef6953b2c
0.01 ETH
170448142023-04-14 10:25:11619 days ago1681467911
0xEf6D4e4c...ef6953b2c
0.05813432 ETH
170447422023-04-14 10:10:11619 days ago1681467011
0xEf6D4e4c...ef6953b2c
1 wei
170447422023-04-14 10:10:11619 days ago1681467011
0xEf6D4e4c...ef6953b2c
0.01914426 ETH
170447152023-04-14 10:04:35619 days ago1681466675
0xEf6D4e4c...ef6953b2c
0.06 ETH
170435382023-04-14 6:02:59619 days ago1681452179
0xEf6D4e4c...ef6953b2c
0.01778187 ETH
170434342023-04-14 5:41:47619 days ago1681450907
0xEf6D4e4c...ef6953b2c
1 wei
170434342023-04-14 5:41:47619 days ago1681450907
0xEf6D4e4c...ef6953b2c
0.02118381 ETH
170434092023-04-14 5:36:35619 days ago1681450595
0xEf6D4e4c...ef6953b2c
0.02 ETH
170430692023-04-14 4:26:59619 days ago1681446419
0xEf6D4e4c...ef6953b2c
0.11801336 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Junkyard

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 14 : Junkyard.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/Pausable.sol";

import {AxelarExecutable} from "@axelar-network/axelar-gmp-sdk-solidity/contracts/executables/AxelarExecutable.sol";
import {IAxelarGateway} from "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGateway.sol";
import {IAxelarGasService} from "@axelar-network/axelar-gmp-sdk-solidity/contracts/interfaces/IAxelarGasService.sol";
import {StringToAddress, AddressToString} from "@axelar-network/axelar-gmp-sdk-solidity/contracts/StringAddressUtils.sol";

/**
 * @title Junkyard
 * @author Razmo
 * @notice Deployed on Ethereum, this contract manages the fishing and claim attempts
 * @dev Ethereum and Polygon contracts are communicating through Axelar and the Junkbot
 */
contract Junkyard is Ownable, PaymentSplitter, Pausable, AxelarExecutable {
    using StringToAddress for string;
    using AddressToString for address;

    IAxelarGasService public immutable GAS_RECEIVER;

    string public managerAddress;
    string public managerChain;
    string public storageAddress;
    string public storageChain;
    uint256 internal fishingNonce = 0;

    uint8 private constant CLAIM_ACTION = 1;
    uint8 private constant VALIDATE_ACTION = 2;

    // List fishing quantity and price
    mapping(uint256 => uint256) public prices;

    event NewFishingEntry(address indexed, uint256, bytes32); // who, quantity, uid
    event PricesChange(uint256, uint256); // quantity, new price
    event NewClaim(uint256 indexed, address, uint256); // requestId, sender, tokenUID
    event ContractValueUpdate(string, string); // value name, new value

    constructor(
        address[] memory jkdPayees,
        uint256[] memory jkdShares,
        address _gateway,
        address _gasReceiver
    ) PaymentSplitter(jkdPayees, jkdShares) AxelarExecutable(_gateway) {
        if (_gasReceiver == address(0)) revert InvalidAddress();

        prices[1] = 0.01 ether;
        prices[3] = 0.02 ether;
        prices[7] = 0.04 ether;
        prices[15] = 0.06 ether;
        prices[40] = 0.12 ether;
        prices[60] = 0.15 ether;

        GAS_RECEIVER = IAxelarGasService(_gasReceiver);
    }

    /**
     * @notice Fishing attempt to win a valuable NFT, the player needs to pay an entry fee
     * @dev Emit an event intercepted by the Junkbot and call the Manager from Polygon through Axelar
     * @param _qt Quantity of NFTs selected by the player to be fished in the Junkyard
     */
    function fishing(uint256 _qt) external payable whenNotPaused {
        require(prices[_qt] != 0, "Quantity not available");
        require(msg.value == prices[_qt], "Entry fee is incorrect");

        bytes32 uid = getUID();

        bytes memory actionPayload = abi.encode(uid, msg.sender, _qt);
        bytes memory payload = abi.encode(VALIDATE_ACTION, actionPayload);

        GAS_RECEIVER.payNativeGasForContractCall{value: msg.value}(
            address(this),
            "Polygon",
            managerAddress,
            payload,
            address(this)
        );
        gateway.callContract("Polygon", managerAddress, payload);

        emit NewFishingEntry(msg.sender, _qt, uid);
    }

    /**
     * @notice Claim an NFT won by a player after a fishing attempt
     * @dev Call the Manager through Axelar for on-chain verification
     * @param requestId RequestId of the fishing attempt from which the player wants to claim the NFT
     * @param tokenUID Claimed NFT UID
     * @param tokenId Collection ID of the NFT
     * @param collection Collection address
     * @param gasForCallClaim Amount of gas to call the manager
     * @param gasForCallTransfer Amount of gas for the manager to call the storage
     */
    function claim(
        uint256 requestId,
        uint256 tokenUID,
        uint256 tokenId,
        address collection,
        uint256 gasForCallClaim,
        uint256 gasForCallTransfer
    ) external payable {
        require(gasForCallClaim > 0 && gasForCallTransfer > 0, "No gas amount defined");
        require(gasForCallClaim + gasForCallTransfer <= msg.value, "Not enough value for gas");

        bytes memory actionPayload = abi.encode(
            requestId,
            tokenUID,
            msg.sender
        );
        bytes memory payload = abi.encode(CLAIM_ACTION, actionPayload);
        bytes memory responsePayload = abi.encode(
            msg.sender,
            tokenId,
            collection
        );

        // Player pays for Polygon transaction on Axelar
        GAS_RECEIVER.payNativeGasForContractCall{value: gasForCallClaim}(
            address(this),
            managerChain,
            managerAddress,
            payload,
            msg.sender
        );

        // Player pays for Ethereum transaction on Axelar
        GAS_RECEIVER.payNativeGasForContractCall{
            value: gasForCallTransfer
        }(
            managerAddress.toAddress(),
            storageChain,
            storageAddress,
            responsePayload,
            msg.sender
        );

        gateway.callContract(managerChain, managerAddress, payload);

        emit NewClaim(requestId, msg.sender, tokenUID);
    }

    /**
     * @notice Change the fishing price
     * @param _qt Fishing quantity
     * @param _newPrice New price
     */
    function setPrice(uint256 _qt, uint256 _newPrice) external onlyOwner {
        prices[_qt] = _newPrice;

        emit PricesChange(_qt, _newPrice);
    }

    /**
     * @notice Update the address of the Manager
     * @param newManagerAddr New address
     */
    function setManagerAddress(string memory newManagerAddr)
        external
        onlyOwner
    {
        managerAddress = newManagerAddr;

        emit ContractValueUpdate('managerAddress', newManagerAddr);
    }

    /**
     * @notice Update the name of the chain of the Manager
     * @param newManagerChain New chain
     */
    function setManagerChain(string memory newManagerChain) external onlyOwner {
        managerChain = newManagerChain;

        emit ContractValueUpdate('managerChain', newManagerChain);
    }

    /**
     * @notice Update the address of the Storage
     * @param newStorageAddr New address
     */
    function setStorageAddress(string memory newStorageAddr)
        external
        onlyOwner
    {
        storageAddress = newStorageAddr;

        emit ContractValueUpdate('storageAddress', newStorageAddr);
    }

    /**
     * @notice Update the name of the chain of the Storage
     * @param newStorageChain New chain
     */
    function setStorageChain(string memory newStorageChain) external onlyOwner {
        storageChain = newStorageChain;

        emit ContractValueUpdate('storageChain', newStorageChain);
    }

    /// @notice Pause the contract
    function pause() external onlyOwner {
        _pause();
    }

    /// @notice Unpause the contract
    function unpause() external onlyOwner {
        _unpause();
    }

    /**
     * @notice Generate an UID for each fishing entry
     */
    function getUID() private returns (bytes32) {
        bytes32 uid = (
            keccak256(
                abi.encodePacked(fishingNonce, block.number - 1, msg.sender)
            )
        );
        fishingNonce++;

        return uid;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 3 of 14 : PaymentSplitter.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";

/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the
 * time of contract deployment and can't be updated thereafter.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 *
 * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
 * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
 * to run tests before sending real value to this contract.
 */
contract PaymentSplitter is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    mapping(IERC20 => uint256) private _erc20TotalReleased;
    mapping(IERC20 => mapping(address => uint256)) private _erc20Released;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
     * contract.
     */
    function totalReleased(IERC20 token) public view returns (uint256) {
        return _erc20TotalReleased[token];
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
     * IERC20 contract.
     */
    function released(IERC20 token, address account) public view returns (uint256) {
        return _erc20Released[token][account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Getter for the amount of payee's releasable Ether.
     */
    function releasable(address account) public view returns (uint256) {
        uint256 totalReceived = address(this).balance + totalReleased();
        return _pendingPayment(account, totalReceived, released(account));
    }

    /**
     * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an
     * IERC20 contract.
     */
    function releasable(IERC20 token, address account) public view returns (uint256) {
        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        return _pendingPayment(account, totalReceived, released(token, account));
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 payment = releasable(account);

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _released[account] += payment;
        _totalReleased += payment;

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
     * contract.
     */
    function release(IERC20 token, address account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 payment = releasable(token, account);

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _erc20Released[token][account] += payment;
        _erc20TotalReleased[token] += payment;

        SafeERC20.safeTransfer(token, account, payment);
        emit ERC20PaymentReleased(token, account, payment);
    }

    /**
     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and
     * already released amounts.
     */
    function _pendingPayment(
        address account,
        uint256 totalReceived,
        uint256 alreadyReleased
    ) private view returns (uint256) {
        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }
}

File 4 of 14 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

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

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

File 5 of 14 : StringAddressUtils.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library StringToAddress {
    error InvalidAddressString();

    function toAddress(string memory addressString) internal pure returns (address) {
        bytes memory stringBytes = bytes(addressString);
        uint160 addressNumber = 0;
        uint8 stringByte;

        if (stringBytes.length != 42 || stringBytes[0] != '0' || stringBytes[1] != 'x') revert InvalidAddressString();

        for (uint256 i = 2; i < 42; ++i) {
            stringByte = uint8(stringBytes[i]);

            if ((stringByte >= 97) && (stringByte <= 102)) stringByte -= 87;
            else if ((stringByte >= 65) && (stringByte <= 70)) stringByte -= 55;
            else if ((stringByte >= 48) && (stringByte <= 57)) stringByte -= 48;
            else revert InvalidAddressString();

            addressNumber |= uint160(uint256(stringByte) << ((41 - i) << 2));
        }
        return address(addressNumber);
    }
}

library AddressToString {
    function toString(address addr) internal pure returns (string memory) {
        bytes memory addressBytes = abi.encodePacked(addr);
        uint256 length = addressBytes.length;
        bytes memory characters = '0123456789abcdef';
        bytes memory stringBytes = new bytes(2 + addressBytes.length * 2);

        stringBytes[0] = '0';
        stringBytes[1] = 'x';

        for (uint256 i; i < length; ++i) {
            stringBytes[2 + i * 2] = characters[uint8(addressBytes[i] >> 4)];
            stringBytes[3 + i * 2] = characters[uint8(addressBytes[i] & 0x0f)];
        }
        return string(stringBytes);
    }
}

File 6 of 14 : IAxelarGateway.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IAxelarGateway {
    /**********\
    |* Errors *|
    \**********/

    error NotSelf();
    error NotProxy();
    error InvalidCodeHash();
    error SetupFailed();
    error InvalidAuthModule();
    error InvalidTokenDeployer();
    error InvalidAmount();
    error InvalidChainId();
    error InvalidCommands();
    error TokenDoesNotExist(string symbol);
    error TokenAlreadyExists(string symbol);
    error TokenDeployFailed(string symbol);
    error TokenContractDoesNotExist(address token);
    error BurnFailed(string symbol);
    error MintFailed(string symbol);
    error InvalidSetMintLimitsParams();
    error ExceedMintLimit(string symbol);

    /**********\
    |* Events *|
    \**********/

    event TokenSent(
        address indexed sender,
        string destinationChain,
        string destinationAddress,
        string symbol,
        uint256 amount
    );

    event ContractCall(
        address indexed sender,
        string destinationChain,
        string destinationContractAddress,
        bytes32 indexed payloadHash,
        bytes payload
    );

    event ContractCallWithToken(
        address indexed sender,
        string destinationChain,
        string destinationContractAddress,
        bytes32 indexed payloadHash,
        bytes payload,
        string symbol,
        uint256 amount
    );

    event Executed(bytes32 indexed commandId);

    event TokenDeployed(string symbol, address tokenAddresses);

    event ContractCallApproved(
        bytes32 indexed commandId,
        string sourceChain,
        string sourceAddress,
        address indexed contractAddress,
        bytes32 indexed payloadHash,
        bytes32 sourceTxHash,
        uint256 sourceEventIndex
    );

    event ContractCallApprovedWithMint(
        bytes32 indexed commandId,
        string sourceChain,
        string sourceAddress,
        address indexed contractAddress,
        bytes32 indexed payloadHash,
        string symbol,
        uint256 amount,
        bytes32 sourceTxHash,
        uint256 sourceEventIndex
    );

    event TokenMintLimitUpdated(string symbol, uint256 limit);

    event OperatorshipTransferred(bytes newOperatorsData);

    event Upgraded(address indexed implementation);

    /********************\
    |* Public Functions *|
    \********************/

    function sendToken(
        string calldata destinationChain,
        string calldata destinationAddress,
        string calldata symbol,
        uint256 amount
    ) external;

    function callContract(
        string calldata destinationChain,
        string calldata contractAddress,
        bytes calldata payload
    ) external;

    function callContractWithToken(
        string calldata destinationChain,
        string calldata contractAddress,
        bytes calldata payload,
        string calldata symbol,
        uint256 amount
    ) external;

    function isContractCallApproved(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        address contractAddress,
        bytes32 payloadHash
    ) external view returns (bool);

    function isContractCallAndMintApproved(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        address contractAddress,
        bytes32 payloadHash,
        string calldata symbol,
        uint256 amount
    ) external view returns (bool);

    function validateContractCall(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes32 payloadHash
    ) external returns (bool);

    function validateContractCallAndMint(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes32 payloadHash,
        string calldata symbol,
        uint256 amount
    ) external returns (bool);

    /***********\
    |* Getters *|
    \***********/

    function authModule() external view returns (address);

    function tokenDeployer() external view returns (address);

    function tokenMintLimit(string memory symbol) external view returns (uint256);

    function tokenMintAmount(string memory symbol) external view returns (uint256);

    function allTokensFrozen() external view returns (bool);

    function implementation() external view returns (address);

    function tokenAddresses(string memory symbol) external view returns (address);

    function tokenFrozen(string memory symbol) external view returns (bool);

    function isCommandExecuted(bytes32 commandId) external view returns (bool);

    function adminEpoch() external view returns (uint256);

    function adminThreshold(uint256 epoch) external view returns (uint256);

    function admins(uint256 epoch) external view returns (address[] memory);

    /*******************\
    |* Admin Functions *|
    \*******************/

    function setTokenMintLimits(string[] calldata symbols, uint256[] calldata limits) external;

    function upgrade(
        address newImplementation,
        bytes32 newImplementationCodeHash,
        bytes calldata setupParams
    ) external;

    /**********************\
    |* External Functions *|
    \**********************/

    function setup(bytes calldata params) external;

    function execute(bytes calldata input) external;
}

File 7 of 14 : AxelarExecutable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IAxelarGateway } from '../interfaces/IAxelarGateway.sol';
import { IAxelarExecutable } from '../interfaces/IAxelarExecutable.sol';

contract AxelarExecutable is IAxelarExecutable {
    IAxelarGateway public immutable gateway;

    constructor(address gateway_) {
        if (gateway_ == address(0)) revert InvalidAddress();

        gateway = IAxelarGateway(gateway_);
    }

    function execute(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes calldata payload
    ) external override {
        bytes32 payloadHash = keccak256(payload);
        if (!gateway.validateContractCall(commandId, sourceChain, sourceAddress, payloadHash))
            revert NotApprovedByGateway();
        _execute(sourceChain, sourceAddress, payload);
    }

    function executeWithToken(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes calldata payload,
        string calldata tokenSymbol,
        uint256 amount
    ) external override {
        bytes32 payloadHash = keccak256(payload);
        if (
            !gateway.validateContractCallAndMint(
                commandId,
                sourceChain,
                sourceAddress,
                payloadHash,
                tokenSymbol,
                amount
            )
        ) revert NotApprovedByGateway();

        _executeWithToken(sourceChain, sourceAddress, payload, tokenSymbol, amount);
    }

    function _execute(
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes calldata payload
    ) internal virtual {}

    function _executeWithToken(
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes calldata payload,
        string calldata tokenSymbol,
        uint256 amount
    ) internal virtual {}
}

File 8 of 14 : IAxelarGasService.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// This should be owned by the microservice that is paying for gas.
interface IAxelarGasService {
    error NothingReceived();
    error TransferFailed();
    error InvalidAddress();

    event GasPaidForContractCall(
        address indexed sourceAddress,
        string destinationChain,
        string destinationAddress,
        bytes32 indexed payloadHash,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    );

    event GasPaidForContractCallWithToken(
        address indexed sourceAddress,
        string destinationChain,
        string destinationAddress,
        bytes32 indexed payloadHash,
        string symbol,
        uint256 amount,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    );

    event NativeGasPaidForContractCall(
        address indexed sourceAddress,
        string destinationChain,
        string destinationAddress,
        bytes32 indexed payloadHash,
        uint256 gasFeeAmount,
        address refundAddress
    );

    event NativeGasPaidForContractCallWithToken(
        address indexed sourceAddress,
        string destinationChain,
        string destinationAddress,
        bytes32 indexed payloadHash,
        string symbol,
        uint256 amount,
        uint256 gasFeeAmount,
        address refundAddress
    );

    event GasAdded(
        bytes32 indexed txHash,
        uint256 indexed logIndex,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    );

    event NativeGasAdded(bytes32 indexed txHash, uint256 indexed logIndex, uint256 gasFeeAmount, address refundAddress);

    // This is called on the source chain before calling the gateway to execute a remote contract.
    function payGasForContractCall(
        address sender,
        string calldata destinationChain,
        string calldata destinationAddress,
        bytes calldata payload,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    ) external;

    // This is called on the source chain before calling the gateway to execute a remote contract.
    function payGasForContractCallWithToken(
        address sender,
        string calldata destinationChain,
        string calldata destinationAddress,
        bytes calldata payload,
        string calldata symbol,
        uint256 amount,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    ) external;

    // This is called on the source chain before calling the gateway to execute a remote contract.
    function payNativeGasForContractCall(
        address sender,
        string calldata destinationChain,
        string calldata destinationAddress,
        bytes calldata payload,
        address refundAddress
    ) external payable;

    // This is called on the source chain before calling the gateway to execute a remote contract.
    function payNativeGasForContractCallWithToken(
        address sender,
        string calldata destinationChain,
        string calldata destinationAddress,
        bytes calldata payload,
        string calldata symbol,
        uint256 amount,
        address refundAddress
    ) external payable;

    function addGas(
        bytes32 txHash,
        uint256 txIndex,
        address gasToken,
        uint256 gasFeeAmount,
        address refundAddress
    ) external;

    function addNativeGas(
        bytes32 txHash,
        uint256 logIndex,
        address refundAddress
    ) external payable;

    function collectFees(address payable receiver, address[] calldata tokens) external;

    function refund(
        address payable receiver,
        address token,
        uint256 amount
    ) external;
}

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

pragma solidity ^0.8.0;

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

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

File 10 of 14 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 11 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.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));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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 12 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 13 of 14 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` 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:
     *
     * - `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 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current 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);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

pragma solidity ^0.8.0;

import { IAxelarGateway } from '../interfaces/IAxelarGateway.sol';

interface IAxelarExecutable {
    error InvalidAddress();
    error NotApprovedByGateway();

    function gateway() external view returns (IAxelarGateway);

    function execute(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes calldata payload
    ) external;

    function executeWithToken(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes calldata payload,
        string calldata tokenSymbol,
        uint256 amount
    ) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address[]","name":"jkdPayees","type":"address[]"},{"internalType":"uint256[]","name":"jkdShares","type":"uint256[]"},{"internalType":"address","name":"_gateway","type":"address"},{"internalType":"address","name":"_gasReceiver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidAddressString","type":"error"},{"inputs":[],"name":"NotApprovedByGateway","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"","type":"string"},{"indexed":false,"internalType":"string","name":"","type":"string"}],"name":"ContractValueUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"NewClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"","type":"bytes32"}],"name":"NewFishingEntry","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"PricesChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"GAS_RECEIVER","outputs":[{"internalType":"contract IAxelarGasService","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256","name":"tokenUID","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"gasForCallClaim","type":"uint256"},{"internalType":"uint256","name":"gasForCallTransfer","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commandId","type":"bytes32"},{"internalType":"string","name":"sourceChain","type":"string"},{"internalType":"string","name":"sourceAddress","type":"string"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commandId","type":"bytes32"},{"internalType":"string","name":"sourceChain","type":"string"},{"internalType":"string","name":"sourceAddress","type":"string"},{"internalType":"bytes","name":"payload","type":"bytes"},{"internalType":"string","name":"tokenSymbol","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"executeWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_qt","type":"uint256"}],"name":"fishing","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"gateway","outputs":[{"internalType":"contract IAxelarGateway","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"managerAddress","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"managerChain","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newManagerAddr","type":"string"}],"name":"setManagerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newManagerChain","type":"string"}],"name":"setManagerChain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_qt","type":"uint256"},{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newStorageAddr","type":"string"}],"name":"setStorageAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newStorageChain","type":"string"}],"name":"setStorageChain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"storageAddress","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"storageChain","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c06040526000600d553480156200001657600080fd5b5060405162002e2038038062002e20833981016040819052620000399162000635565b8184846200004733620002f9565b8051825114620000b95760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b60008251116200010c5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606401620000b0565b60005b82518110156200017857620001638382815181106200013257620001326200072a565b60200260200101518383815181106200014f576200014f6200072a565b60200260200101516200034960201b60201c565b806200016f8162000756565b9150506200010f565b50506008805460ff19169055506001600160a01b038116620001ad5760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b039081166080528116620001db5760405163e6c4247b60e01b815260040160405180910390fd5b600e602052662386f26fc100007fa7c5ba7114a813b50159add3a36832908dc83db71d0b9a24c2ad0f83be9582075566470de4df8200007fe0283e559c29e31ee7f56467acc9dd307779c843a883aeeb3bf5c6128c90814455668e1bc9bf0400007f376529bb8a2d41b4a589a133407fc64f3212472dbd74744348be1098bf7ba08d5566d529ae9e8600007f60dd7f0393e3d3987afafbb50883ff45658a7a0c2d4460aa7a872d45c2ea2352556701aa535d3d0c00007f22d693247411e4e82e8cfd4298d7d01b584d717e72112345c49f1cb7852eb12c55603c600052670214e8348c4f00007f60847b922233da4994d5a56502fceb98b1ddb870fd1515200054cdbf36dd181b556001600160a01b031660a052506200078f915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216620003b65760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401620000b0565b60008111620004085760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401620000b0565b6001600160a01b03821660009081526003602052604090205415620004845760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608401620000b0565b6005805460018082019092557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b038516908117909155600090815260036020526040902082905554620004ed90829062000774565b600155604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000577576200057762000536565b604052919050565b60006001600160401b038211156200059b576200059b62000536565b5060051b60200190565b80516001600160a01b0381168114620005bd57600080fd5b919050565b600082601f830112620005d457600080fd5b81516020620005ed620005e7836200057f565b6200054c565b82815260059290921b840181019181810190868411156200060d57600080fd5b8286015b848110156200062a578051835291830191830162000611565b509695505050505050565b600080600080608085870312156200064c57600080fd5b84516001600160401b03808211156200066457600080fd5b818701915087601f8301126200067957600080fd5b815160206200068c620005e7836200057f565b82815260059290921b8401810191818101908b841115620006ac57600080fd5b948201945b83861015620006d557620006c586620005a5565b82529482019490820190620006b1565b918a0151919850909350505080821115620006ef57600080fd5b50620006fe87828801620005c2565b9350506200070f60408601620005a5565b91506200071f60608601620005a5565b905092959194509250565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156200076d576200076d62000740565b5060010190565b600082198211156200078a576200078a62000740565b500190565b60805160a05161263a620007e66000396000818161020801528181610cd3015281816110f6015261116b015260008181610252015281816107ab01528181610a3001528181610d570152611298015261263a6000f3fe6080604052600436106101b15760003560e01c80638456cb59116100ed578063bc31c1c111610090578063bc31c1c11461050a578063c45ac05014610537578063ce7c2ac214610557578063cf73a1bc1461058d578063cfb57b9a146105a2578063d79779b2146105b5578063e33b7de3146105eb578063f2fde38b14610600578063f7d975771461062057600080fd5b80638456cb591461041757806385aa92a71461042c5780638b83209b146104415780638da5cb5b1461046157806391b8a74c1461047f57806398272c19146104945780639852595c146104b4578063a3f8eace146104ea57600080fd5b8063406072a911610155578063406072a91461032a57806348b750441461034a578063491606581461036a5780635c975abb1461038a5780636bcfec82146103ad5780636ef0d869146103cf57806370e70563146103ef578063715018a61461040257600080fd5b8062f2b3ec146101f6578063116191b61461024057806312c17e151461027457806319165587146102965780631a98b2e0146102b65780632fd62caf146102d65780633a98ef39146102f65780633f4ba83a1461031557600080fd5b366101f1577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033346040516101e7929190611bfb565b60405180910390a1005b600080fd5b34801561020257600080fd5b5061022a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516102379190611c14565b60405180910390f35b34801561024c57600080fd5b5061022a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561028057600080fd5b5061029461028f366004611c3e565b610640565b005b3480156102a257600080fd5b506102946102b1366004611d04565b610684565b3480156102c257600080fd5b506102946102d1366004611d6a565b61077a565b3480156102e257600080fd5b506102946102f1366004611c3e565b61086c565b34801561030257600080fd5b506001545b604051908152602001610237565b34801561032157600080fd5b506102946108a5565b34801561033657600080fd5b50610307610345366004611e44565b6108b7565b34801561035657600080fd5b50610294610365366004611e44565b6108e2565b34801561037657600080fd5b50610294610385366004611e7d565b6109ff565b34801561039657600080fd5b5060085460ff166040519015158152602001610237565b3480156103b957600080fd5b506103c2610ae8565b6040516102379190611f7d565b3480156103db57600080fd5b506102946103ea366004611c3e565b610b76565b6102946103fd366004611f90565b610baf565b34801561040e57600080fd5b50610294610e05565b34801561042357600080fd5b50610294610e17565b34801561043857600080fd5b506103c2610e27565b34801561044d57600080fd5b5061022a61045c366004611f90565b610e34565b34801561046d57600080fd5b506000546001600160a01b031661022a565b34801561048b57600080fd5b506103c2610e64565b3480156104a057600080fd5b506102946104af366004611c3e565b610e71565b3480156104c057600080fd5b506103076104cf366004611d04565b6001600160a01b031660009081526004602052604090205490565b3480156104f657600080fd5b50610307610505366004611d04565b610eaa565b34801561051657600080fd5b50610307610525366004611f90565b600e6020526000908152604090205481565b34801561054357600080fd5b50610307610552366004611e44565b610ef2565b34801561056357600080fd5b50610307610572366004611d04565b6001600160a01b031660009081526003602052604090205490565b34801561059957600080fd5b506103c2610fa3565b6102946105b0366004611fa9565b610fb0565b3480156105c157600080fd5b506103076105d0366004611d04565b6001600160a01b031660009081526006602052604090205490565b3480156105f757600080fd5b50600254610307565b34801561060c57600080fd5b5061029461061b366004611d04565b61134d565b34801561062c57600080fd5b5061029461063b366004611ffc565b6113c6565b610648611416565b805161065b906009906020840190611b62565b506000805160206125e583398151915281604051610679919061201e565b60405180910390a150565b6001600160a01b0381166000908152600360205260409020546106c25760405162461bcd60e51b81526004016106b990612056565b60405180910390fd5b60006106cd82610eaa565b9050806106ec5760405162461bcd60e51b81526004016106b99061209c565b6001600160a01b038216600090815260046020526040812080548392906107149084906120fd565b92505081905550806002600082825461072d91906120fd565b9091555061073d90508282611470565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056828260405161076e929190611bfb565b60405180910390a15050565b6000858560405161078c929190612115565b604051908190038120631876eed960e01b825291506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690631876eed9906107f0908e908e908e908e908e9089908d908d908d9060040161214e565b602060405180830381600087803b15801561080a57600080fd5b505af115801561081e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084291906121ad565b61085f57604051631403112d60e21b815260040160405180910390fd5b5050505050505050505050565b610874611416565b805161088790600b906020840190611b62565b506000805160206125e58339815191528160405161067991906121cf565b6108ad611416565b6108b561158e565b565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205490565b6001600160a01b0381166000908152600360205260409020546109175760405162461bcd60e51b81526004016106b990612056565b60006109238383610ef2565b9050806109425760405162461bcd60e51b81526004016106b99061209c565b6001600160a01b038084166000908152600760209081526040808320938616835292905290812080548392906109799084906120fd565b90915550506001600160a01b038316600090815260066020526040812080548392906109a69084906120fd565b909155506109b790508383836115da565b826001600160a01b03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a83836040516109f2929190611bfb565b60405180910390a2505050565b60008282604051610a11929190612115565b604051908190038120635f6970c360e01b825291506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635f6970c390610a6f908b908b908b908b908b908990600401612207565b602060405180830381600087803b158015610a8957600080fd5b505af1158015610a9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac191906121ad565b610ade57604051631403112d60e21b815260040160405180910390fd5b5050505050505050565b600a8054610af590612248565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2190612248565b8015610b6e5780601f10610b4357610100808354040283529160200191610b6e565b820191906000526020600020905b815481529060010190602001808311610b5157829003601f168201915b505050505081565b610b7e611416565b8051610b9190600a906020840190611b62565b506000805160206125e5833981519152816040516106799190612283565b610bb7611630565b6000818152600e6020526040902054610c0b5760405162461bcd60e51b81526020600482015260166024820152755175616e74697479206e6f7420617661696c61626c6560501b60448201526064016106b9565b6000818152600e60205260409020543414610c615760405162461bcd60e51b8152602060048201526016602482015275115b9d1c9e48199959481a5cc81a5b98dbdc9c9958dd60521b60448201526064016106b9565b6000610c6b611676565b604080516020810183905233818301526060808201869052825180830390910181526080820190925291925090600090610cac90600290849060a0016122b9565b60408051601f1981840301815290829052630c93e3bb60e01b825291506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630c93e3bb903490610d119030906009908790839060040161238f565b6000604051808303818588803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b5050604051631c92115f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169350631c92115f9250610d92915060099085906004016123eb565b600060405180830381600087803b158015610dac57600080fd5b505af1158015610dc0573d6000803e3d6000fd5b505060408051878152602081018790523393507f9f3fef3441bf62a54a3bf1c2fca3429b0f1ad430a71600955477d08a02655f1792500160405180910390a250505050565b610e0d611416565b6108b560006116e9565b610e1f611416565b6108b5611739565b600b8054610af590612248565b600060058281548110610e4957610e4961242c565b6000918252602090912001546001600160a01b031692915050565b600c8054610af590612248565b610e79611416565b8051610e8c90600c906020840190611b62565b506000805160206125e5833981519152816040516106799190612442565b600080610eb660025490565b610ec090476120fd565b9050610eeb8382610ee6866001600160a01b031660009081526004602052604090205490565b611776565b9392505050565b6001600160a01b0382166000818152600660205260408082205490516370a0823160e01b8152919283926370a0823190610f30903090600401611c14565b60206040518083038186803b158015610f4857600080fd5b505afa158015610f5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f809190612478565b610f8a91906120fd565b9050610f9b8382610ee687876108b7565b949350505050565b60098054610af590612248565b600082118015610fc05750600081115b6110045760405162461bcd60e51b8152602060048201526015602482015274139bc819d85cc8185b5bdd5b9d081919599a5b9959605a1b60448201526064016106b9565b3461100f82846120fd565b11156110585760405162461bcd60e51b81526020600482015260186024820152774e6f7420656e6f7567682076616c756520666f722067617360401b60448201526064016106b9565b60408051602081018890529081018690523360608201526000906080016040516020818303038152906040529050600060018260405160200161109c9291906122b9565b60408051601f198184030181528282523360208401529082018890526001600160a01b0387166060830152915060009060800160408051601f1981840301815290829052630c93e3bb60e01b825291506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630c93e3bb908790611137903090600a9060099089903390600401612491565b6000604051808303818588803b15801561115057600080fd5b505af1158015611164573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630c93e3bb8561122c600980546111a990612248565b80601f01602080910402602001604051908101604052809291908181526020018280546111d590612248565b80156112225780601f106111f757610100808354040283529160200191611222565b820191906000526020600020905b81548152906001019060200180831161120557829003601f168201915b50505050506117b4565b600c600b86336040518763ffffffff1660e01b8152600401611252959493929190612491565b6000604051808303818588803b15801561126b57600080fd5b505af115801561127f573d6000803e3d6000fd5b5050604051631c92115f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169350631c92115f92506112d69150600a9060099087906004016124ef565b600060405180830381600087803b1580156112f057600080fd5b505af1158015611304573d6000803e3d6000fd5b50505050887f4d58955c6faccbf48d6d9ca12b4b4dd61b49229e4d052c71427e31345857660f338a60405161133a929190611bfb565b60405180910390a2505050505050505050565b611355611416565b6001600160a01b0381166113ba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106b9565b6113c3816116e9565b50565b6113ce611416565b6000828152600e602090815260409182902083905581518481529081018390527fbf5fea87bbfd3b00f15b4357a4df7505e0a9a9935f39fa9ca180bb6412397e1f910161076e565b6000546001600160a01b031633146108b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106b9565b804710156114c05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016106b9565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461150d576040519150601f19603f3d011682016040523d82523d6000602084013e611512565b606091505b50509050806115895760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016106b9565b505050565b611596611933565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516115d09190611c14565b60405180910390a1565b6115898363a9059cbb60e01b84846040516024016115f9929190611bfb565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261197c565b60085460ff16156108b55760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106b9565b600080600d546001436116899190612532565b60408051602081019390935282015233606090811b6bffffffffffffffffffffffff19169082015260740160408051601f198184030181529190528051602090910120600d805491925060006116de83612549565b909155509092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611741611630565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586115c33390565b6001546001600160a01b038416600090815260036020526040812054909183916117a09086612564565b6117aa9190612583565b610f9b9190612532565b6000808290506000808251602a1415806117f45750826000815181106117dc576117dc61242c565b6020910101516001600160f81b031916600360fc1b14155b8061182557508260018151811061180d5761180d61242c565b6020910101516001600160f81b031916600f60fb1b14155b1561184357604051636fa478cf60e11b815260040160405180910390fd5b60025b602a811015611929578381815181106118615761186161242c565b016020015160f81c915060618210801590611880575060668260ff1611155b15611897576118906057836125a5565b9150611900565b60418260ff16101580156118af575060468260ff1611155b156118bf576118906037836125a5565b60308260ff16101580156118d7575060398260ff1611155b156118e7576118906030836125a5565b604051636fa478cf60e11b815260040160405180910390fd5b600261190d826029612532565b60ff8416911b1b929092179161192281612549565b9050611846565b5090949350505050565b60085460ff166108b55760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106b9565b60006119d1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a4e9092919063ffffffff16565b80519091501561158957808060200190518101906119ef91906121ad565b6115895760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106b9565b6060610f9b8484600085856001600160a01b0385163b611ab05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106b9565b600080866001600160a01b03168587604051611acc91906125c8565b60006040518083038185875af1925050503d8060008114611b09576040519150601f19603f3d011682016040523d82523d6000602084013e611b0e565b606091505b5091509150611b1e828286611b29565b979650505050505050565b60608315611b38575081610eeb565b825115611b485782518084602001fd5b8160405162461bcd60e51b81526004016106b99190611f7d565b828054611b6e90612248565b90600052602060002090601f016020900481019282611b905760008555611bd6565b82601f10611ba957805160ff1916838001178555611bd6565b82800160010185558215611bd6579182015b82811115611bd6578251825591602001919060010190611bbb565b50611be2929150611be6565b5090565b5b80821115611be25760008155600101611be7565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600060208284031215611c5057600080fd5b813567ffffffffffffffff80821115611c6857600080fd5b818401915084601f830112611c7c57600080fd5b813581811115611c8e57611c8e611c28565b604051601f8201601f19908116603f01168101908382118183101715611cb657611cb6611c28565b81604052828152876020848701011115611ccf57600080fd5b826020860160208301376000928101602001929092525095945050505050565b6001600160a01b03811681146113c357600080fd5b600060208284031215611d1657600080fd5b8135610eeb81611cef565b60008083601f840112611d3357600080fd5b50813567ffffffffffffffff811115611d4b57600080fd5b602083019150836020828501011115611d6357600080fd5b9250929050565b60008060008060008060008060008060c08b8d031215611d8957600080fd5b8a35995060208b013567ffffffffffffffff80821115611da857600080fd5b611db48e838f01611d21565b909b50995060408d0135915080821115611dcd57600080fd5b611dd98e838f01611d21565b909950975060608d0135915080821115611df257600080fd5b611dfe8e838f01611d21565b909750955060808d0135915080821115611e1757600080fd5b50611e248d828e01611d21565b9150809450508092505060a08b013590509295989b9194979a5092959850565b60008060408385031215611e5757600080fd5b8235611e6281611cef565b91506020830135611e7281611cef565b809150509250929050565b60008060008060008060006080888a031215611e9857600080fd5b87359650602088013567ffffffffffffffff80821115611eb757600080fd5b611ec38b838c01611d21565b909850965060408a0135915080821115611edc57600080fd5b611ee88b838c01611d21565b909650945060608a0135915080821115611f0157600080fd5b50611f0e8a828b01611d21565b989b979a50959850939692959293505050565b60005b83811015611f3c578181015183820152602001611f24565b83811115611f4b576000848401525b50505050565b60008151808452611f69816020860160208601611f21565b601f01601f19169290920160200192915050565b602081526000610eeb6020830184611f51565b600060208284031215611fa257600080fd5b5035919050565b60008060008060008060c08789031215611fc257600080fd5b8635955060208701359450604087013593506060870135611fe281611cef565b9598949750929560808101359460a0909101359350915050565b6000806040838503121561200f57600080fd5b50508035926020909101359150565b60408152600e60408201526d6d616e616765724164647265737360901b6060820152608060208201526000610eeb6080830184611f51565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115612110576121106120e7565b500190565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b89815260c06020820152600061216860c083018a8c612125565b828103604084015261217b81898b612125565b90508660608401528281036080840152612196818688612125565b9150508260a08301529a9950505050505050505050565b6000602082840312156121bf57600080fd5b81518015158114610eeb57600080fd5b60408152600e60408201526d73746f726167654164647265737360901b6060820152608060208201526000610eeb6080830184611f51565b868152608060208201526000612221608083018789612125565b8281036040840152612234818688612125565b915050826060830152979650505050505050565b600181811c9082168061225c57607f821691505b6020821081141561227d57634e487b7160e01b600052602260045260246000fd5b50919050565b60408152600c60408201526b36b0b730b3b2b921b430b4b760a11b6060820152608060208201526000610eeb6080830184611f51565b60ff83168152604060208201526000610f9b6040830184611f51565b60078152662837b63cb3b7b760c91b602082015260400190565b8054600090600181811c908083168061230957607f831692505b602080841082141561232b57634e487b7160e01b600052602260045260246000fd5b83885260208801828015612346576001811461235757612382565b60ff19871682528282019750612382565b60008981526020902060005b8781101561237c57815484820152908601908401612363565b83019850505b5050505050505092915050565b600060018060a01b03808716835260a060208401526123b060a084016122d5565b83810360408501526123c281886122ef565b905083810360608501526123d68187611f51565b92505080841660808401525095945050505050565b6060815260006123fd606083016122d5565b828103602084015261240f81866122ef565b905082810360408401526124238185611f51565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b60408152600c60408201526b39ba37b930b3b2a1b430b4b760a11b6060820152608060208201526000610eeb6080830184611f51565b60006020828403121561248a57600080fd5b5051919050565b600060018060a01b03808816835260a060208401526124b360a08401886122ef565b83810360408501526124c581886122ef565b905083810360608501526124d98187611f51565b9250508084166080840152509695505050505050565b60608152600061250260608301866122ef565b828103602084015261251481866122ef565b905082810360408401526125288185611f51565b9695505050505050565b600082821015612544576125446120e7565b500390565b600060001982141561255d5761255d6120e7565b5060010190565b600081600019048311821515161561257e5761257e6120e7565b500290565b6000826125a057634e487b7160e01b600052601260045260246000fd5b500490565b600060ff821660ff8416808210156125bf576125bf6120e7565b90039392505050565b600082516125da818460208701611f21565b919091019291505056feb184d45c94ae2787281f233737a5474fa098c94de3debaacf9986e2755c3b8f3a264697066735822122048b247a17e69ffa4e82b6891e8120cc55a4990fd87a5ebfdba04481346cf62a764736f6c63430008090033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000004f4495243837681061c4743b74b3eedf548d56a50000000000000000000000002d5d7d31f671f86c782533cc367f14109a0827120000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bcd11837b5114e99e58670fa401abed8686253e600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000064

Deployed Bytecode

0x6080604052600436106101b15760003560e01c80638456cb59116100ed578063bc31c1c111610090578063bc31c1c11461050a578063c45ac05014610537578063ce7c2ac214610557578063cf73a1bc1461058d578063cfb57b9a146105a2578063d79779b2146105b5578063e33b7de3146105eb578063f2fde38b14610600578063f7d975771461062057600080fd5b80638456cb591461041757806385aa92a71461042c5780638b83209b146104415780638da5cb5b1461046157806391b8a74c1461047f57806398272c19146104945780639852595c146104b4578063a3f8eace146104ea57600080fd5b8063406072a911610155578063406072a91461032a57806348b750441461034a578063491606581461036a5780635c975abb1461038a5780636bcfec82146103ad5780636ef0d869146103cf57806370e70563146103ef578063715018a61461040257600080fd5b8062f2b3ec146101f6578063116191b61461024057806312c17e151461027457806319165587146102965780631a98b2e0146102b65780632fd62caf146102d65780633a98ef39146102f65780633f4ba83a1461031557600080fd5b366101f1577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033346040516101e7929190611bfb565b60405180910390a1005b600080fd5b34801561020257600080fd5b5061022a7f0000000000000000000000002d5d7d31f671f86c782533cc367f14109a08271281565b6040516102379190611c14565b60405180910390f35b34801561024c57600080fd5b5061022a7f0000000000000000000000004f4495243837681061c4743b74b3eedf548d56a581565b34801561028057600080fd5b5061029461028f366004611c3e565b610640565b005b3480156102a257600080fd5b506102946102b1366004611d04565b610684565b3480156102c257600080fd5b506102946102d1366004611d6a565b61077a565b3480156102e257600080fd5b506102946102f1366004611c3e565b61086c565b34801561030257600080fd5b506001545b604051908152602001610237565b34801561032157600080fd5b506102946108a5565b34801561033657600080fd5b50610307610345366004611e44565b6108b7565b34801561035657600080fd5b50610294610365366004611e44565b6108e2565b34801561037657600080fd5b50610294610385366004611e7d565b6109ff565b34801561039657600080fd5b5060085460ff166040519015158152602001610237565b3480156103b957600080fd5b506103c2610ae8565b6040516102379190611f7d565b3480156103db57600080fd5b506102946103ea366004611c3e565b610b76565b6102946103fd366004611f90565b610baf565b34801561040e57600080fd5b50610294610e05565b34801561042357600080fd5b50610294610e17565b34801561043857600080fd5b506103c2610e27565b34801561044d57600080fd5b5061022a61045c366004611f90565b610e34565b34801561046d57600080fd5b506000546001600160a01b031661022a565b34801561048b57600080fd5b506103c2610e64565b3480156104a057600080fd5b506102946104af366004611c3e565b610e71565b3480156104c057600080fd5b506103076104cf366004611d04565b6001600160a01b031660009081526004602052604090205490565b3480156104f657600080fd5b50610307610505366004611d04565b610eaa565b34801561051657600080fd5b50610307610525366004611f90565b600e6020526000908152604090205481565b34801561054357600080fd5b50610307610552366004611e44565b610ef2565b34801561056357600080fd5b50610307610572366004611d04565b6001600160a01b031660009081526003602052604090205490565b34801561059957600080fd5b506103c2610fa3565b6102946105b0366004611fa9565b610fb0565b3480156105c157600080fd5b506103076105d0366004611d04565b6001600160a01b031660009081526006602052604090205490565b3480156105f757600080fd5b50600254610307565b34801561060c57600080fd5b5061029461061b366004611d04565b61134d565b34801561062c57600080fd5b5061029461063b366004611ffc565b6113c6565b610648611416565b805161065b906009906020840190611b62565b506000805160206125e583398151915281604051610679919061201e565b60405180910390a150565b6001600160a01b0381166000908152600360205260409020546106c25760405162461bcd60e51b81526004016106b990612056565b60405180910390fd5b60006106cd82610eaa565b9050806106ec5760405162461bcd60e51b81526004016106b99061209c565b6001600160a01b038216600090815260046020526040812080548392906107149084906120fd565b92505081905550806002600082825461072d91906120fd565b9091555061073d90508282611470565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056828260405161076e929190611bfb565b60405180910390a15050565b6000858560405161078c929190612115565b604051908190038120631876eed960e01b825291506001600160a01b037f0000000000000000000000004f4495243837681061c4743b74b3eedf548d56a51690631876eed9906107f0908e908e908e908e908e9089908d908d908d9060040161214e565b602060405180830381600087803b15801561080a57600080fd5b505af115801561081e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084291906121ad565b61085f57604051631403112d60e21b815260040160405180910390fd5b5050505050505050505050565b610874611416565b805161088790600b906020840190611b62565b506000805160206125e58339815191528160405161067991906121cf565b6108ad611416565b6108b561158e565b565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205490565b6001600160a01b0381166000908152600360205260409020546109175760405162461bcd60e51b81526004016106b990612056565b60006109238383610ef2565b9050806109425760405162461bcd60e51b81526004016106b99061209c565b6001600160a01b038084166000908152600760209081526040808320938616835292905290812080548392906109799084906120fd565b90915550506001600160a01b038316600090815260066020526040812080548392906109a69084906120fd565b909155506109b790508383836115da565b826001600160a01b03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a83836040516109f2929190611bfb565b60405180910390a2505050565b60008282604051610a11929190612115565b604051908190038120635f6970c360e01b825291506001600160a01b037f0000000000000000000000004f4495243837681061c4743b74b3eedf548d56a51690635f6970c390610a6f908b908b908b908b908b908990600401612207565b602060405180830381600087803b158015610a8957600080fd5b505af1158015610a9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac191906121ad565b610ade57604051631403112d60e21b815260040160405180910390fd5b5050505050505050565b600a8054610af590612248565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2190612248565b8015610b6e5780601f10610b4357610100808354040283529160200191610b6e565b820191906000526020600020905b815481529060010190602001808311610b5157829003601f168201915b505050505081565b610b7e611416565b8051610b9190600a906020840190611b62565b506000805160206125e5833981519152816040516106799190612283565b610bb7611630565b6000818152600e6020526040902054610c0b5760405162461bcd60e51b81526020600482015260166024820152755175616e74697479206e6f7420617661696c61626c6560501b60448201526064016106b9565b6000818152600e60205260409020543414610c615760405162461bcd60e51b8152602060048201526016602482015275115b9d1c9e48199959481a5cc81a5b98dbdc9c9958dd60521b60448201526064016106b9565b6000610c6b611676565b604080516020810183905233818301526060808201869052825180830390910181526080820190925291925090600090610cac90600290849060a0016122b9565b60408051601f1981840301815290829052630c93e3bb60e01b825291506001600160a01b037f0000000000000000000000002d5d7d31f671f86c782533cc367f14109a0827121690630c93e3bb903490610d119030906009908790839060040161238f565b6000604051808303818588803b158015610d2a57600080fd5b505af1158015610d3e573d6000803e3d6000fd5b5050604051631c92115f60e01b81526001600160a01b037f0000000000000000000000004f4495243837681061c4743b74b3eedf548d56a5169350631c92115f9250610d92915060099085906004016123eb565b600060405180830381600087803b158015610dac57600080fd5b505af1158015610dc0573d6000803e3d6000fd5b505060408051878152602081018790523393507f9f3fef3441bf62a54a3bf1c2fca3429b0f1ad430a71600955477d08a02655f1792500160405180910390a250505050565b610e0d611416565b6108b560006116e9565b610e1f611416565b6108b5611739565b600b8054610af590612248565b600060058281548110610e4957610e4961242c565b6000918252602090912001546001600160a01b031692915050565b600c8054610af590612248565b610e79611416565b8051610e8c90600c906020840190611b62565b506000805160206125e5833981519152816040516106799190612442565b600080610eb660025490565b610ec090476120fd565b9050610eeb8382610ee6866001600160a01b031660009081526004602052604090205490565b611776565b9392505050565b6001600160a01b0382166000818152600660205260408082205490516370a0823160e01b8152919283926370a0823190610f30903090600401611c14565b60206040518083038186803b158015610f4857600080fd5b505afa158015610f5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f809190612478565b610f8a91906120fd565b9050610f9b8382610ee687876108b7565b949350505050565b60098054610af590612248565b600082118015610fc05750600081115b6110045760405162461bcd60e51b8152602060048201526015602482015274139bc819d85cc8185b5bdd5b9d081919599a5b9959605a1b60448201526064016106b9565b3461100f82846120fd565b11156110585760405162461bcd60e51b81526020600482015260186024820152774e6f7420656e6f7567682076616c756520666f722067617360401b60448201526064016106b9565b60408051602081018890529081018690523360608201526000906080016040516020818303038152906040529050600060018260405160200161109c9291906122b9565b60408051601f198184030181528282523360208401529082018890526001600160a01b0387166060830152915060009060800160408051601f1981840301815290829052630c93e3bb60e01b825291506001600160a01b037f0000000000000000000000002d5d7d31f671f86c782533cc367f14109a0827121690630c93e3bb908790611137903090600a9060099089903390600401612491565b6000604051808303818588803b15801561115057600080fd5b505af1158015611164573d6000803e3d6000fd5b50505050507f0000000000000000000000002d5d7d31f671f86c782533cc367f14109a0827126001600160a01b0316630c93e3bb8561122c600980546111a990612248565b80601f01602080910402602001604051908101604052809291908181526020018280546111d590612248565b80156112225780601f106111f757610100808354040283529160200191611222565b820191906000526020600020905b81548152906001019060200180831161120557829003601f168201915b50505050506117b4565b600c600b86336040518763ffffffff1660e01b8152600401611252959493929190612491565b6000604051808303818588803b15801561126b57600080fd5b505af115801561127f573d6000803e3d6000fd5b5050604051631c92115f60e01b81526001600160a01b037f0000000000000000000000004f4495243837681061c4743b74b3eedf548d56a5169350631c92115f92506112d69150600a9060099087906004016124ef565b600060405180830381600087803b1580156112f057600080fd5b505af1158015611304573d6000803e3d6000fd5b50505050887f4d58955c6faccbf48d6d9ca12b4b4dd61b49229e4d052c71427e31345857660f338a60405161133a929190611bfb565b60405180910390a2505050505050505050565b611355611416565b6001600160a01b0381166113ba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106b9565b6113c3816116e9565b50565b6113ce611416565b6000828152600e602090815260409182902083905581518481529081018390527fbf5fea87bbfd3b00f15b4357a4df7505e0a9a9935f39fa9ca180bb6412397e1f910161076e565b6000546001600160a01b031633146108b55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106b9565b804710156114c05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016106b9565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461150d576040519150601f19603f3d011682016040523d82523d6000602084013e611512565b606091505b50509050806115895760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016106b9565b505050565b611596611933565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516115d09190611c14565b60405180910390a1565b6115898363a9059cbb60e01b84846040516024016115f9929190611bfb565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261197c565b60085460ff16156108b55760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106b9565b600080600d546001436116899190612532565b60408051602081019390935282015233606090811b6bffffffffffffffffffffffff19169082015260740160408051601f198184030181529190528051602090910120600d805491925060006116de83612549565b909155509092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611741611630565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586115c33390565b6001546001600160a01b038416600090815260036020526040812054909183916117a09086612564565b6117aa9190612583565b610f9b9190612532565b6000808290506000808251602a1415806117f45750826000815181106117dc576117dc61242c565b6020910101516001600160f81b031916600360fc1b14155b8061182557508260018151811061180d5761180d61242c565b6020910101516001600160f81b031916600f60fb1b14155b1561184357604051636fa478cf60e11b815260040160405180910390fd5b60025b602a811015611929578381815181106118615761186161242c565b016020015160f81c915060618210801590611880575060668260ff1611155b15611897576118906057836125a5565b9150611900565b60418260ff16101580156118af575060468260ff1611155b156118bf576118906037836125a5565b60308260ff16101580156118d7575060398260ff1611155b156118e7576118906030836125a5565b604051636fa478cf60e11b815260040160405180910390fd5b600261190d826029612532565b60ff8416911b1b929092179161192281612549565b9050611846565b5090949350505050565b60085460ff166108b55760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106b9565b60006119d1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a4e9092919063ffffffff16565b80519091501561158957808060200190518101906119ef91906121ad565b6115895760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106b9565b6060610f9b8484600085856001600160a01b0385163b611ab05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106b9565b600080866001600160a01b03168587604051611acc91906125c8565b60006040518083038185875af1925050503d8060008114611b09576040519150601f19603f3d011682016040523d82523d6000602084013e611b0e565b606091505b5091509150611b1e828286611b29565b979650505050505050565b60608315611b38575081610eeb565b825115611b485782518084602001fd5b8160405162461bcd60e51b81526004016106b99190611f7d565b828054611b6e90612248565b90600052602060002090601f016020900481019282611b905760008555611bd6565b82601f10611ba957805160ff1916838001178555611bd6565b82800160010185558215611bd6579182015b82811115611bd6578251825591602001919060010190611bbb565b50611be2929150611be6565b5090565b5b80821115611be25760008155600101611be7565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b600060208284031215611c5057600080fd5b813567ffffffffffffffff80821115611c6857600080fd5b818401915084601f830112611c7c57600080fd5b813581811115611c8e57611c8e611c28565b604051601f8201601f19908116603f01168101908382118183101715611cb657611cb6611c28565b81604052828152876020848701011115611ccf57600080fd5b826020860160208301376000928101602001929092525095945050505050565b6001600160a01b03811681146113c357600080fd5b600060208284031215611d1657600080fd5b8135610eeb81611cef565b60008083601f840112611d3357600080fd5b50813567ffffffffffffffff811115611d4b57600080fd5b602083019150836020828501011115611d6357600080fd5b9250929050565b60008060008060008060008060008060c08b8d031215611d8957600080fd5b8a35995060208b013567ffffffffffffffff80821115611da857600080fd5b611db48e838f01611d21565b909b50995060408d0135915080821115611dcd57600080fd5b611dd98e838f01611d21565b909950975060608d0135915080821115611df257600080fd5b611dfe8e838f01611d21565b909750955060808d0135915080821115611e1757600080fd5b50611e248d828e01611d21565b9150809450508092505060a08b013590509295989b9194979a5092959850565b60008060408385031215611e5757600080fd5b8235611e6281611cef565b91506020830135611e7281611cef565b809150509250929050565b60008060008060008060006080888a031215611e9857600080fd5b87359650602088013567ffffffffffffffff80821115611eb757600080fd5b611ec38b838c01611d21565b909850965060408a0135915080821115611edc57600080fd5b611ee88b838c01611d21565b909650945060608a0135915080821115611f0157600080fd5b50611f0e8a828b01611d21565b989b979a50959850939692959293505050565b60005b83811015611f3c578181015183820152602001611f24565b83811115611f4b576000848401525b50505050565b60008151808452611f69816020860160208601611f21565b601f01601f19169290920160200192915050565b602081526000610eeb6020830184611f51565b600060208284031215611fa257600080fd5b5035919050565b60008060008060008060c08789031215611fc257600080fd5b8635955060208701359450604087013593506060870135611fe281611cef565b9598949750929560808101359460a0909101359350915050565b6000806040838503121561200f57600080fd5b50508035926020909101359150565b60408152600e60408201526d6d616e616765724164647265737360901b6060820152608060208201526000610eeb6080830184611f51565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008219821115612110576121106120e7565b500190565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b89815260c06020820152600061216860c083018a8c612125565b828103604084015261217b81898b612125565b90508660608401528281036080840152612196818688612125565b9150508260a08301529a9950505050505050505050565b6000602082840312156121bf57600080fd5b81518015158114610eeb57600080fd5b60408152600e60408201526d73746f726167654164647265737360901b6060820152608060208201526000610eeb6080830184611f51565b868152608060208201526000612221608083018789612125565b8281036040840152612234818688612125565b915050826060830152979650505050505050565b600181811c9082168061225c57607f821691505b6020821081141561227d57634e487b7160e01b600052602260045260246000fd5b50919050565b60408152600c60408201526b36b0b730b3b2b921b430b4b760a11b6060820152608060208201526000610eeb6080830184611f51565b60ff83168152604060208201526000610f9b6040830184611f51565b60078152662837b63cb3b7b760c91b602082015260400190565b8054600090600181811c908083168061230957607f831692505b602080841082141561232b57634e487b7160e01b600052602260045260246000fd5b83885260208801828015612346576001811461235757612382565b60ff19871682528282019750612382565b60008981526020902060005b8781101561237c57815484820152908601908401612363565b83019850505b5050505050505092915050565b600060018060a01b03808716835260a060208401526123b060a084016122d5565b83810360408501526123c281886122ef565b905083810360608501526123d68187611f51565b92505080841660808401525095945050505050565b6060815260006123fd606083016122d5565b828103602084015261240f81866122ef565b905082810360408401526124238185611f51565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b60408152600c60408201526b39ba37b930b3b2a1b430b4b760a11b6060820152608060208201526000610eeb6080830184611f51565b60006020828403121561248a57600080fd5b5051919050565b600060018060a01b03808816835260a060208401526124b360a08401886122ef565b83810360408501526124c581886122ef565b905083810360608501526124d98187611f51565b9250508084166080840152509695505050505050565b60608152600061250260608301866122ef565b828103602084015261251481866122ef565b905082810360408401526125288185611f51565b9695505050505050565b600082821015612544576125446120e7565b500390565b600060001982141561255d5761255d6120e7565b5060010190565b600081600019048311821515161561257e5761257e6120e7565b500290565b6000826125a057634e487b7160e01b600052601260045260246000fd5b500490565b600060ff821660ff8416808210156125bf576125bf6120e7565b90039392505050565b600082516125da818460208701611f21565b919091019291505056feb184d45c94ae2787281f233737a5474fa098c94de3debaacf9986e2755c3b8f3a264697066735822122048b247a17e69ffa4e82b6891e8120cc55a4990fd87a5ebfdba04481346cf62a764736f6c63430008090033

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

000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000004f4495243837681061c4743b74b3eedf548d56a50000000000000000000000002d5d7d31f671f86c782533cc367f14109a0827120000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bcd11837b5114e99e58670fa401abed8686253e600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000064

-----Decoded View---------------
Arg [0] : jkdPayees (address[]): 0xBCD11837b5114E99e58670Fa401abeD8686253E6
Arg [1] : jkdShares (uint256[]): 100
Arg [2] : _gateway (address): 0x4F4495243837681061C4743b74B3eEdf548D56A5
Arg [3] : _gasReceiver (address): 0x2d5d7d31F671F86C782533cc367F14109a082712

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000004f4495243837681061c4743b74b3eedf548d56a5
Arg [3] : 0000000000000000000000002d5d7d31f671f86c782533cc367f14109a082712
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [5] : 000000000000000000000000bcd11837b5114e99e58670fa401abed8686253e6
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000064


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.