Amoy Testnet

Contract

0xFF22c94FFb6bB5d1DF18bEb5fd1dFE7583D3B214

Overview

POL Balance

Polygon PoS Chain Amoy LogoPolygon PoS Chain Amoy LogoPolygon PoS Chain Amoy Logo0 POL

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Approve188796562025-03-06 18:04:3610 days ago1741284276IN
0xFF22c94F...583D3B214
0 POL0.002916100
Approve188768002025-03-06 16:14:1810 days ago1741277658IN
0xFF22c94F...583D3B214
0 POL0.0008418828.87125209
Approve188767812025-03-06 16:13:3410 days ago1741277614IN
0xFF22c94F...583D3B214
0 POL0.0008418828.87125209
Approve188747692025-03-06 14:56:2610 days ago1741272986IN
0xFF22c94F...583D3B214
0 POL0.0010462735.88061497
Approve188747282025-03-06 14:54:5810 days ago1741272898IN
0xFF22c94F...583D3B214
0 POL0.0009899833.95
Approve188746152025-03-06 14:50:2610 days ago1741272626IN
0xFF22c94F...583D3B214
0 POL0.0010251235.15518679
Approve188742862025-03-06 14:37:4210 days ago1741271862IN
0xFF22c94F...583D3B214
0 POL0.004626100
Approve188716072025-03-06 13:01:4611 days ago1741266106IN
0xFF22c94F...583D3B214
0 POL0.0008485529.10000001
Approve188688242025-03-06 11:23:1211 days ago1741260192IN
0xFF22c94F...583D3B214
0 POL0.004626100
Approve188650922025-03-06 9:10:5811 days ago1741252258IN
0xFF22c94F...583D3B214
0 POL0.0014142648.50000001
Approve188641352025-03-06 8:37:0411 days ago1741250224IN
0xFF22c94F...583D3B214
0 POL0.002916100
Approve188641052025-03-06 8:36:0011 days ago1741250160IN
0xFF22c94F...583D3B214
0 POL0.002916100
Approve188640812025-03-06 8:35:1011 days ago1741250110IN
0xFF22c94F...583D3B214
0 POL0.002916100
Approve188445002025-03-05 21:00:3811 days ago1741208438IN
0xFF22c94F...583D3B214
0 POL0.0010519536.07514188
Approve188443842025-03-05 20:56:3011 days ago1741208190IN
0xFF22c94F...583D3B214
0 POL0.0008485529.10000001
Approve188306032025-03-05 12:47:5812 days ago1741178878IN
0xFF22c94F...583D3B214
0 POL0.0008485529.10000001
Approve184660552025-02-24 11:52:2521 days ago1740397945IN
0xFF22c94F...583D3B214
0 POL0.001418748.65238752
Approve184601842025-02-24 8:24:1721 days ago1740385457IN
0xFF22c94F...583D3B214
0 POL0.0008945130.67625
Approve184601432025-02-24 8:22:4921 days ago1740385369IN
0xFF22c94F...583D3B214
0 POL0.0008945130.67625
Approve184601072025-02-24 8:21:3321 days ago1740385293IN
0xFF22c94F...583D3B214
0 POL0.0008485529.10000001
Approve184599832025-02-24 8:17:0921 days ago1740385029IN
0xFF22c94F...583D3B214
0 POL0.0008945130.67625
Approve184599822025-02-24 8:17:0721 days ago1740385027IN
0xFF22c94F...583D3B214
0 POL0.0008945130.67625
Approve184599412025-02-24 8:15:3921 days ago1740384939IN
0xFF22c94F...583D3B214
0 POL0.0014190830.67625
Approve184599022025-02-24 8:14:1521 days ago1740384855IN
0xFF22c94F...583D3B214
0 POL0.002916100
Transfer184598482025-02-24 8:12:2121 days ago1740384741IN
0xFF22c94F...583D3B214
0 POL0.0020610440
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
IPMBToken

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Multiple files format)

File 1 of 11: ipmb.sol
/**
 *Submitted for verification at polygonscan.com on 2023-08-22
*/

// SPDX-License-Identifier: MIT

/**
 *
 *  @title: IPMB Token
 *  @date: 22-August-2023 
 *  @version: 0.4
 *  @author: IPMB Dev Team
 */

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

// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

/**
 * @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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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);
    }
}

// OpenZeppelin Contracts (last updated v4.9.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);
}
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

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

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

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

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

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

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

        return true;
    }

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

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

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

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

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

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

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

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

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

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

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

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

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

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

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

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

// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.0;


/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }
}

pragma solidity ^0.8.19;

contract IPMBToken is ERC20, Ownable, ERC20Burnable {

    constructor(string memory _name, string memory _symbol, uint256 amount) ERC20(_name, _symbol) {
        uint256 mintedSupply;
        mintedSupply = amount * 10 ** decimals();
        _mint(msg.sender, mintedSupply);
    }

    function batchTransfers(address[] memory _addresses, uint256[] memory _amounts) public {
        for (uint256 i=0; i< _addresses.length; i++) {
            transfer(_addresses[i], _amounts[i]);
        }
    }
}

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

pragma solidity ^0.8.5;

/*
 * @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 GSN 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 memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 3 of 11: IERC20.sol
// SPDX-License-Identifier: MIT

/**
 *
 * @title IERC20
 */

pragma solidity ^0.8.5;

/**
 * @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 4 of 11: IPMBStaking.sol
// SPDX-License-Identifier: MIT

/**
 *
 *  @title: IPMB Staking Pools
 *  @date: 20-November-2024
 *  @version: 2.5
 *  @author: IPMB Dev Team
 */

import "./IERC20.sol";
import "./Ownable.sol";
import "./IPriceFeed.sol";

pragma solidity ^0.8.19;

contract IPMBStaking is Ownable {

    // pool structure

    struct poolStr {
        uint256 poolID;
        string poolName;
        uint256 duration;
        uint256 amount;
        uint256 discount;
        uint256 lockDuration;
        uint256 poolMax;
        bool status;
    }

    // address pool data structure

    struct addressStr {
        uint256 amount;
        uint256 dateDeposit;
        uint256 epoch;
        uint256 ipmbPrice;
        uint256 goldPrice;
    }

    // mappings declaration

    mapping (address => bool) public admin;
    mapping (address => bool) public authority;
    mapping (address => bool) public blacklist;
    mapping (uint256 => poolStr) public poolsRegistry;
    mapping (address => bool) public kycAddress;
    mapping (address => mapping (uint256 => uint256)) public addressCounter;
    mapping (address => mapping (uint256 => uint256[])) public addressArray;
    mapping (address => mapping (uint256 => mapping (uint256 => addressStr))) public addressDataNew;

    
    // variables declaration

    uint256 public nextpoolCounter;
    address public ipmbAddress;
    IPriceFeed public priceFeedAddress;
    address public gemMintingContract;
    uint256 public blackPeriod;
    uint256 public minDiscount;
    uint256 public maxDiscount;

    // modifiers

    modifier onlyAdmin() {
        require(admin[msg.sender] == true, "Not allowed");
        _;
    }

    modifier onlyAuthority() {
        require(admin[msg.sender] == true || authority[msg.sender] == true, "Not allowed");
        _;
    }

    // events

    event poolRegistration(uint256 indexed poolId);
    event poolUpdate(uint256 indexed poolId);
    event poolDeposit(uint256 indexed poolId, address indexed addr, uint256 indexed index, uint256 amount);
    event poolWithdrawal(uint256 indexed poolId, address indexed addr, uint256 indexed index, uint256 amount);
    event blacklistWithdrawal(uint256 indexed poolId, address indexed addr, uint256 indexed index, uint256 amount);
    event poolResetAfterMinting(uint256 indexed poolId, address indexed addr, uint256 indexed index);
    event adminStatus(address indexed addr, bool indexed status);
    event authorityStatus(address indexed addr, bool indexed status);
    event blacklistStatus(address indexed addr, bool indexed status);
    event updateBlackPeriod(uint256 indexed bperiod);
    event kycStatus(address indexed addr, bool indexed status);
    

    // constructor

    constructor (address _ipmbAddress, address _priceFeedAddress, uint256 _blackPeriod) {
        admin[msg.sender] = true;
        ipmbAddress = _ipmbAddress;
        nextpoolCounter = 1;
        priceFeedAddress = IPriceFeed(_priceFeedAddress);
        blackPeriod = _blackPeriod;
        minDiscount = 2;
        maxDiscount = 11;
    }

    // function to register a Pool

    function registerPool(string memory _poolName, uint256 _duration, uint256 _discount, uint256 _amount, uint256 _lockDuration, uint256 _poolMax) public onlyAdmin {
        require(_duration > 0 && _amount > 0 , "err");
        require(_discount >= minDiscount && _discount <= maxDiscount, "Check min & max");
        uint256 poolID = nextpoolCounter;
        poolsRegistry[poolID].poolID = poolID;
        poolsRegistry[poolID].poolName = _poolName;
        poolsRegistry[poolID].duration = _duration;
        poolsRegistry[poolID].amount = _amount;
        poolsRegistry[poolID].discount = _discount;
        poolsRegistry[poolID].lockDuration = _lockDuration;
        poolsRegistry[poolID].poolMax = _poolMax;
        poolsRegistry[poolID].status = true;
        emit poolRegistration(poolID);
        nextpoolCounter = nextpoolCounter + 1;
    }

    // function to deposit funds

    function depositPool(uint256 _poolID) public {
        require(kycAddress[msg.sender] == true, "No KYC");
        require(blacklist[msg.sender] == false, "Address is blacklisted");
        require(poolsRegistry[_poolID].status == true, "Pool is inactive");
        require(poolsRegistry[_poolID].poolMax > addressArray[msg.sender][_poolID].length, "Already deposited max times");
        require(IERC20(ipmbAddress).balanceOf(msg.sender) >= poolsRegistry[_poolID].amount, "Your ERC20 balance is not enough");
        (uint256 epoch, uint256 ipmbPrice, uint256 goldPrice, , ,) = priceFeedAddress.getLatestPrices();
        uint256 count = addressCounter[msg.sender][_poolID];
        addressDataNew[msg.sender][_poolID][count].amount = poolsRegistry[_poolID].amount;
        addressDataNew[msg.sender][_poolID][count].dateDeposit = block.timestamp;
        addressDataNew[msg.sender][_poolID][count].epoch = epoch;
        addressDataNew[msg.sender][_poolID][count].ipmbPrice = ipmbPrice;
        addressDataNew[msg.sender][_poolID][count].goldPrice = goldPrice;
        addressArray[msg.sender][_poolID].push(count);
        addressCounter[msg.sender][_poolID]++;
        IERC20(ipmbAddress).transferFrom(msg.sender, address(this), poolsRegistry[_poolID].amount);
        emit poolDeposit(_poolID, msg.sender, count, poolsRegistry[_poolID].amount);
    }

    // function to deposit multitimes

    function multiDepositPool(uint256[] memory _poolIDs, uint256[] memory _quantity) public {
        require(_poolIDs.length == _quantity.length , "Check lengths");
        for (uint256 i = 0; i < _poolIDs.length; i++) {
            for (uint256 y = 0; y < _quantity[i]; y++) {
                depositPool(_poolIDs[i]);
            }
        }
    }

    // function to withdrawl deposit amounts

    function withdrawalPool(uint256 _poolID, uint256 _index) public {
        require(blacklist[msg.sender] == false, "Address is blacklisted");
        require(addressDataNew[msg.sender][_poolID][_index].amount == poolsRegistry[_poolID].amount, "No deposit");
        require(block.timestamp >= addressDataNew[msg.sender][_poolID][_index].dateDeposit + poolsRegistry[_poolID].lockDuration, "Time has not passed");
        uint256 amount = addressDataNew[msg.sender][_poolID][_index].amount;
        addressDataNew[msg.sender][_poolID][_index].amount = 0;
        addressDataNew[msg.sender][_poolID][_index].dateDeposit = 0;
        addressDataNew[msg.sender][_poolID][_index].epoch = 0;
        addressDataNew[msg.sender][_poolID][_index].ipmbPrice = 0;
        addressDataNew[msg.sender][_poolID][_index].goldPrice = 0;
        for (uint256 i = 0; i < addressArray[msg.sender][_poolID].length; i++) {
            if (_index == addressArray[msg.sender][_poolID][i]) {
                addressArray[msg.sender][_poolID][i] = addressArray[msg.sender][_poolID][addressArray[msg.sender][_poolID].length-1];
                addressArray[msg.sender][_poolID].pop();
            }
        }
        IERC20(ipmbAddress).transfer(msg.sender, amount);
        emit poolWithdrawal(_poolID, msg.sender, _index, amount);
    }

    // function to update pool data

    function updatePoolData(uint256 _poolID, uint256 _poolMax, bool status) public onlyAdmin {
        poolsRegistry[_poolID].poolMax = _poolMax;
        poolsRegistry[_poolID].status = status;
        emit poolUpdate(_poolID);
    }

    // function to update address pool details after nft minting

    function updateAddressPool(address _address, uint256 _poolID, uint256 _index) public {
        require(msg.sender == gemMintingContract, "Not allowed");
        addressDataNew[_address][_poolID][_index].amount = 0;
        addressDataNew[_address][_poolID][_index].dateDeposit = 0;
        addressDataNew[_address][_poolID][_index].epoch = 0;
        addressDataNew[_address][_poolID][_index].ipmbPrice = 0;
        addressDataNew[_address][_poolID][_index].goldPrice = 0;
        emit poolResetAfterMinting(_poolID, _address, _index);
    }

    // function to add/remove an admin

    function addAdmin(address _address, bool _status) public onlyOwner {
        admin[_address] = _status;
        emit adminStatus(_address, _status);
    }

    // function to add/remove an authority

    function addAuthority(address _address, bool _status) public onlyOwner {
        authority[_address] = _status;
        emit authorityStatus(_address, _status);
    }

    // function to add/remove a wallet from blacklist

    function addBlacklist(address _address, bool _status) public onlyAuthority {
        blacklist[_address] = _status;
        emit blacklistStatus(_address, _status);
    }

    // function to set GEM minting contract

    function setGEMMintingContract(address _address) public onlyOwner {
        gemMintingContract = _address;
    }

    // function to update prices contract admin

    function updatePricesContract(address _address) public onlyOwner {
        priceFeedAddress = IPriceFeed(_address);
    }

    // function to approve GEM minting contract

    function approveGEMMintingContract(uint256 _amount) public onlyAdmin {
        IERC20(ipmbAddress).approve(gemMintingContract, _amount);
    }

    // function to modify the time that the blacklist funds can be withdrawl

    function changeBlackPeriod(uint256 _blackPeriod) public onlyAdmin {
        blackPeriod = _blackPeriod;
        emit updateBlackPeriod(_blackPeriod);
    }

    // function to update address kyc status

    function updateKYCAddress(address _address, bool _status) public onlyAdmin {
        kycAddress[_address] = _status;
        emit kycStatus(_address, _status);
    }

    // function to update the min and max % of discounts for pool registration

    function updateMinMaxDiscounts(uint256 _min, uint256 _max) public onlyAdmin {
        minDiscount = _min;
        maxDiscount = _max;
    }

    // function to update kyc status for multiple addresses

    function updateKYCAddressBatch(address[] memory _address, bool[] memory _status) public onlyAdmin {
        for (uint256 i = 0; i < _address.length; i++) {
            kycAddress[_address[i]] = _status[i];
            emit kycStatus(_address[i], _status[i]);
        }
    }

    // function to withdrawal blacklist amount for a blaclist address

    function blacklistAddressWithdrawalPool(address _receiver, address _address, uint256 _poolID, uint256 _index) public onlyOwner {
        require(blacklist[_address] == true, "Address is not blacklisted");
        require(addressDataNew[_address][_poolID][_index].amount == poolsRegistry[_poolID].amount, "No deposit");
        require(block.timestamp >= addressDataNew[_address][_poolID][_index].dateDeposit + blackPeriod, "Time has not passed");
        uint256 amount = addressDataNew[_address][_poolID][_index].amount;
        addressDataNew[_address][_poolID][_index].amount = 0;
        addressDataNew[_address][_poolID][_index].dateDeposit = 0;
        addressDataNew[_address][_poolID][_index].epoch = 0;
        addressDataNew[_address][_poolID][_index].ipmbPrice = 0;
        addressDataNew[_address][_poolID][_index].goldPrice = 0;
        IERC20(ipmbAddress).transfer(_receiver, amount);
        emit blacklistWithdrawal(_poolID, _address, _index, amount);
    }

    // retrieve discount

    function getDiscount(uint256 _poolID, address _address, uint256 _index) public view returns (uint256) {
        if ((addressDataNew[_address][_poolID][_index].amount == poolsRegistry[_poolID].amount) && (block.timestamp >= addressDataNew[_address][_poolID][_index].dateDeposit + poolsRegistry[_poolID].duration)) {
            return poolsRegistry[_poolID].discount;
        } else {
            return 0;
        }
    }

    // retrieve pool info

    function poolInfo(uint256 _poolID) public view returns (string memory, uint256, uint256, uint256, uint256, uint256, bool) {
        return (poolsRegistry[_poolID].poolName, poolsRegistry[_poolID].duration, poolsRegistry[_poolID].amount, poolsRegistry[_poolID].discount, poolsRegistry[_poolID].lockDuration, poolsRegistry[_poolID].poolMax, poolsRegistry[_poolID].status);
    }

    // retrieve pool price

    function poolPrice(uint256 _poolID) public view returns (uint256) {
        return (poolsRegistry[_poolID].amount);
    }

    // retrieve pool status

    function poolStatus(uint256 _poolID) public view returns (bool) {
        return (poolsRegistry[_poolID].status);
    }

    // retrieve pool discount

    function poolDiscount(uint256 _poolID) public view returns (uint256) {
        return (poolsRegistry[_poolID].discount);
    }

    // retrieve deposit amount

    function poolAmountPerAddress(uint256 _poolID, address _address, uint256 _index) public view returns (uint256) {
        return (addressDataNew[_address][_poolID][_index].amount);
    }

    // retrieve deposit amount

    function poolDataPerAddress(uint256 _poolID, address _address, uint256 _index) public view returns (uint256, uint256, uint256, uint256, uint256) {
        return (addressDataNew[_address][_poolID][_index].amount, addressDataNew[_address][_poolID][_index].dateDeposit, addressDataNew[_address][_poolID][_index].epoch, addressDataNew[_address][_poolID][_index].ipmbPrice, addressDataNew[_address][_poolID][_index].goldPrice);
    }

    // retrieve deposit date

    function poolDepositDatePerAddress(uint256 _poolID, address _address, uint256 _index) public view returns (uint256) {
        return (addressDataNew[_address][_poolID][_index].dateDeposit);
    }

    // retrieve ipmb price at pool deposit

    function poolIPMBPricePerAddress(uint256 _poolID, address _address, uint256 _index) public view returns (uint256) {
        return (addressDataNew[_address][_poolID][_index].ipmbPrice);
    }

    // retrieve gold price at pool deposit

    function poolGoldPricePerAddress(uint256 _poolID, address _address, uint256 _index) public view returns (uint256) {
        return (addressDataNew[_address][_poolID][_index].goldPrice);
    }

    // retrieve epoch at pool deposit

    function poolEpochPerAddress(uint256 _poolID, address _address, uint256 _index) public view returns (uint256) {
        return (addressDataNew[_address][_poolID][_index].epoch);
    }

    // retrieve KYC address status

    function retrieveKYCStatus(address _address) public view returns (bool) {
        return (kycAddress[_address]);
    }

    // retrieve the deposit indeces per address per pool

    function retrieveAddressArrayPool(address _address, uint256 _pool) public view returns (uint256[] memory) {
        return (addressArray[_address][_pool]);
    }

    // retrieve counter per address per pool

    function retrieveAddressCounterPool(address _address, uint256 _pool) public view returns (uint256) {
        return (addressCounter[_address][_pool]);
    }

    // retrieve blacklist status

    function retrieveBlackListStatus(address _address) public view returns (bool) {
        return (blacklist[_address]);
    }

}

File 5 of 11: IPriceFeed.sol
// SPDX-License-Identifier: MIT

/**
 *
 * @title IPMB and Gold Price Feed Interface
 */

pragma solidity ^0.8.5;

interface IPriceFeed {

    function getLatestPrices() external view returns (uint256, uint256, uint256, uint256, bytes32, uint256);

    function getEpochPrices(uint256 _epoch) external view returns (uint256, uint256, uint256, bytes32, uint256);

    function getEpochDataSetHash(uint256 _epoch) external view returns (bytes32, bytes32);

}

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

/**
 *
 * @title Interface of the IPMB Staking contract
 */

pragma solidity ^0.8.5;

interface IStaking {

    function getDiscount(uint256 _poolID, address _address, uint256 _index) external view returns (uint256);

    function poolStatus(uint256 _poolID) external view returns (bool);

    function poolAmountPerAddress(uint256 _poolID, address _address, uint256 _index) external view returns (uint256);

    function updateAddressPool(address _address, uint256 _poolID, uint256 _index) external; 

    function poolDataPerAddress(uint256 _poolID, address _address, uint256 _index) external view returns (uint256, uint256, uint256, uint256, uint256);

    function poolIPMBPricePerAddress(uint256 _poolID, address _address, uint256 _index) external view returns (uint256);

    function poolGoldPricePerAddress(uint256 _poolID, address _address, uint256 _index) external view returns (uint256);

    function poolEpochPerAddress(uint256 _poolID, address _address, uint256 _index) external view returns (uint256);

    function poolPrice(uint256 _poolID) external view returns (uint256);

    function retrieveKYCStatus(address _address) external view returns (bool);

    function retrieveBlackListStatus(address _address) external view returns (bool);

    function withdrawalPool(uint256 _poolID, uint256 _index) external;

    function depositPool(uint256 _poolID) external;

    function poolDiscount(uint256 _poolID) external view returns (uint256);

}

File 7 of 11: Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 8 of 11: Ownable.sol
// SPDX-License-Identifier: MIT

// File: @openzeppelin/contracts/access/Ownable.sol

pragma solidity ^0.8.5;

/**
 * @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.
 */

 import "./Context.sol";
 
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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

File 9 of 11: PriceFeed.sol
// SPDX-License-Identifier: MIT

/**
 *
 *  @title: IPMB Price Feed Contract
 *  @date: 31-October-2024
 *  @version: 2.2
 *  @author: IPMB Dev Team
 */

import "./Ownable.sol";
import "./Strings.sol";

pragma solidity ^0.8.19;

contract PriceFeed is Ownable {

    // struct

    struct Data {
        uint256 ipmb;
        uint256 gold;
        uint256 goldDaily;
        bytes32 epochAvgPriceHash;
        bytes32 epochGoldDataSetHash;
        bytes32 epochIPMBDataSetHash;
        uint256 epochTS;
    }

    // mappings declaration

    mapping (address => bool) public admin;
    mapping (uint256 => Data) public PriceFeedData;

    // variables declaration

    using Strings for uint256;
    uint256 public nextEpoch;
    uint256 public latestTS;
    uint256 public epochInterval;

    // modifiers
    
    modifier onlyAdmin() {
        require(admin[msg.sender] == true, "Not allowed");
        _;
    }

    // events

    event EpochData(uint256 indexed epoch, uint256 indexed ipmb, uint256 indexed gold, uint256 golddaily, bytes32 avgpricehash, bytes32 datasetIPMBhash, bytes32 datasetGoldhash, uint256 ts);

    // constructor

    constructor(uint256 _ipmb, uint256 _gold, uint256 _goldDaily, bytes32 _epochIPMBDataSetHash, bytes32 _epochGoldDataSetHash, uint256 _epochInterval) {
        admin[msg.sender] = true;
        PriceFeedData[0].ipmb = _ipmb;
        PriceFeedData[0].gold = _gold;
        PriceFeedData[0].goldDaily = _goldDaily;
        PriceFeedData[0].epochAvgPriceHash = keccak256((abi.encodePacked(_ipmb.toString() , _gold.toString())));
        PriceFeedData[0].epochIPMBDataSetHash = _epochIPMBDataSetHash;
        PriceFeedData[0].epochGoldDataSetHash = _epochGoldDataSetHash;
        PriceFeedData[0].epochTS = block.timestamp;
        latestTS = block.timestamp;
        epochInterval = _epochInterval;
        emit EpochData(0, PriceFeedData[0].ipmb, PriceFeedData[0].gold, PriceFeedData[0].goldDaily, PriceFeedData[0].epochAvgPriceHash, PriceFeedData[0].epochIPMBDataSetHash, PriceFeedData[0].epochGoldDataSetHash, PriceFeedData[0].epochTS);
        nextEpoch = nextEpoch + 1;
    }

    // set epoch data

    function setData(uint256 _ipmb, uint256 _gold, uint256 _goldDaily, bytes32 _epochIPMBDataSetHash, bytes32 _epochGoldDataSetHash) public onlyAdmin {
        require (block.timestamp >= latestTS + epochInterval, "1 epoch per interval"); 
        uint256 curEpoch = nextEpoch;
        PriceFeedData[curEpoch].ipmb = _ipmb;
        PriceFeedData[curEpoch].gold = _gold;
        PriceFeedData[curEpoch].goldDaily = _goldDaily;
        PriceFeedData[curEpoch].epochAvgPriceHash = keccak256((abi.encodePacked(_ipmb.toString() , _gold.toString())));
        PriceFeedData[curEpoch].epochIPMBDataSetHash = _epochIPMBDataSetHash;
        PriceFeedData[curEpoch].epochGoldDataSetHash = _epochGoldDataSetHash;
        PriceFeedData[curEpoch].epochTS = block.timestamp;
        latestTS = block.timestamp;
        emit EpochData(curEpoch, PriceFeedData[curEpoch].ipmb, PriceFeedData[curEpoch].gold, PriceFeedData[curEpoch].goldDaily, PriceFeedData[curEpoch].epochAvgPriceHash, PriceFeedData[curEpoch].epochIPMBDataSetHash, PriceFeedData[curEpoch].epochGoldDataSetHash, PriceFeedData[curEpoch].epochTS);
        nextEpoch = nextEpoch + 1;
    }

    // retrieve data for latest epoch

    function getLatestPrices() public view returns (uint256, uint256, uint256, uint256, bytes32, uint256) {
        uint256 latest = nextEpoch - 1;
        return (latest, PriceFeedData[latest].ipmb, PriceFeedData[latest].gold, PriceFeedData[latest].goldDaily, PriceFeedData[latest].epochAvgPriceHash, PriceFeedData[latest].epochTS);
    }

    // retrieve data for specific epoch

    function getEpochPrices(uint256 _epoch) public view returns (uint256, uint256, uint256, bytes32, uint256) {
        return (PriceFeedData[_epoch].ipmb, PriceFeedData[_epoch].gold, PriceFeedData[_epoch].goldDaily, PriceFeedData[_epoch].epochAvgPriceHash, PriceFeedData[_epoch].epochTS);
    }

    // retrieve dataset hashes for specific epoch

    function getEpochDataSetHash(uint256 _epoch) public view returns (bytes32, bytes32) {
        return (PriceFeedData[_epoch].epochIPMBDataSetHash, PriceFeedData[_epoch].epochGoldDataSetHash);
    }

    // update admin status

    function updateAdminStatus(address _address, bool _st) public onlyOwner() {
        admin[_address] = _st;
    }

    // update epoch interval

    function updateEpochInterval(uint256 _epochInterval) public onlyOwner() {
        epochInterval = _epochInterval;
    }

}

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

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 11 of 11: Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */

import "./Math.sol";
import "./SignedMath.sol";

library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"batchTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200139d3803806200139d83398101604081905262000034916200028a565b828260036200004483826200038b565b5060046200005382826200038b565b505050620000706200006a620000a460201b60201c565b620000a8565b6000620000806012600a6200056c565b6200008c908362000584565b90506200009a3382620000fa565b50505050620005b4565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216620001555760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b80600260008282546200016991906200059e565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001ed57600080fd5b81516001600160401b03808211156200020a576200020a620001c5565b604051601f8301601f19908116603f01168101908282118183101715620002355762000235620001c5565b816040528381526020925086838588010111156200025257600080fd5b600091505b8382101562000276578582018301518183018401529082019062000257565b600093810190920192909252949350505050565b600080600060608486031215620002a057600080fd5b83516001600160401b0380821115620002b857600080fd5b620002c687838801620001db565b94506020860151915080821115620002dd57600080fd5b50620002ec86828701620001db565b925050604084015190509250925092565b600181811c908216806200031257607f821691505b6020821081036200033357634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001c057600081815260208120601f850160051c81016020861015620003625750805b601f850160051c820191505b8181101562000383578281556001016200036e565b505050505050565b81516001600160401b03811115620003a757620003a7620001c5565b620003bf81620003b88454620002fd565b8462000339565b602080601f831160018114620003f75760008415620003de5750858301515b600019600386901b1c1916600185901b17855562000383565b600085815260208120601f198616915b82811015620004285788860151825594840194600190910190840162000407565b5085821015620004475787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115620004ae57816000190482111562000492576200049262000457565b80851615620004a057918102915b93841c939080029062000472565b509250929050565b600082620004c75750600162000566565b81620004d65750600062000566565b8160018114620004ef5760028114620004fa576200051a565b600191505062000566565b60ff8411156200050e576200050e62000457565b50506001821b62000566565b5060208310610133831016604e8410600b84101617156200053f575081810a62000566565b6200054b83836200046d565b806000190482111562000562576200056262000457565b0290505b92915050565b60006200057d60ff841683620004b6565b9392505050565b808202811582820484141762000566576200056662000457565b8082018082111562000566576200056662000457565b610dd980620005c46000396000f3fe608060405234801561001057600080fd5b50600436106100eb5760003560e01c806370a082311161009257806370a08231146101a0578063715018a6146101c957806379cc6790146101d15780638da5cb5b146101e457806395d89b41146101ff578063a457c2d714610207578063a9059cbb1461021a578063dd62ed3e1461022d578063f2fde38b1461024057600080fd5b806306fdde03146100f0578063095ea7b31461010e57806318160ddd1461013157806323b872dd14610143578063313ce5671461015657806339509351146101655780633badca251461017857806342966c681461018d575b600080fd5b6100f8610253565b6040516101059190610a3d565b60405180910390f35b61012161011c366004610aa7565b6102e5565b6040519015158152602001610105565b6002545b604051908152602001610105565b610121610151366004610ad1565b6102ff565b60405160128152602001610105565b610121610173366004610aa7565b610323565b61018b610186366004610be3565b610345565b005b61018b61019b366004610ca3565b6103a5565b6101356101ae366004610cbc565b6001600160a01b031660009081526020819052604090205490565b61018b6103b2565b61018b6101df366004610aa7565b6103c6565b6005546040516001600160a01b039091168152602001610105565b6100f86103df565b610121610215366004610aa7565b6103ee565b610121610228366004610aa7565b61046e565b61013561023b366004610cde565b61047c565b61018b61024e366004610cbc565b6104a7565b60606003805461026290610d11565b80601f016020809104026020016040519081016040528092919081815260200182805461028e90610d11565b80156102db5780601f106102b0576101008083540402835291602001916102db565b820191906000526020600020905b8154815290600101906020018083116102be57829003601f168201915b5050505050905090565b6000336102f381858561051d565b60019150505b92915050565b60003361030d858285610641565b6103188585856106bb565b506001949350505050565b6000336102f3818585610336838361047c565b6103409190610d61565b61051d565b60005b82518110156103a05761038d83828151811061036657610366610d74565b602002602001015183838151811061038057610380610d74565b602002602001015161046e565b508061039881610d8a565b915050610348565b505050565b6103af338261085f565b50565b6103ba610991565b6103c460006109eb565b565b6103d1823383610641565b6103db828261085f565b5050565b60606004805461026290610d11565b600033816103fc828661047c565b9050838110156104615760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610318828686840361051d565b6000336102f38185856106bb565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6104af610991565b6001600160a01b0381166105145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610458565b6103af816109eb565b6001600160a01b03831661057f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610458565b6001600160a01b0382166105e05760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610458565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061064d848461047c565b905060001981146106b557818110156106a85760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610458565b6106b5848484840361051d565b50505050565b6001600160a01b03831661071f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610458565b6001600160a01b0382166107815760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610458565b6001600160a01b038316600090815260208190526040902054818110156107f95760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610458565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36106b5565b6001600160a01b0382166108bf5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610458565b6001600160a01b038216600090815260208190526040902054818110156109335760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610458565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6005546001600160a01b031633146103c45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610458565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060208083528351808285015260005b81811015610a6a57858101830151858201604001528201610a4e565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610aa257600080fd5b919050565b60008060408385031215610aba57600080fd5b610ac383610a8b565b946020939093013593505050565b600080600060608486031215610ae657600080fd5b610aef84610a8b565b9250610afd60208501610a8b565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610b4c57610b4c610b0d565b604052919050565b600067ffffffffffffffff821115610b6e57610b6e610b0d565b5060051b60200190565b600082601f830112610b8957600080fd5b81356020610b9e610b9983610b54565b610b23565b82815260059290921b84018101918181019086841115610bbd57600080fd5b8286015b84811015610bd85780358352918301918301610bc1565b509695505050505050565b60008060408385031215610bf657600080fd5b823567ffffffffffffffff80821115610c0e57600080fd5b818501915085601f830112610c2257600080fd5b81356020610c32610b9983610b54565b82815260059290921b84018101918181019089841115610c5157600080fd5b948201945b83861015610c7657610c6786610a8b565b82529482019490820190610c56565b96505086013592505080821115610c8c57600080fd5b50610c9985828601610b78565b9150509250929050565b600060208284031215610cb557600080fd5b5035919050565b600060208284031215610cce57600080fd5b610cd782610a8b565b9392505050565b60008060408385031215610cf157600080fd5b610cfa83610a8b565b9150610d0860208401610a8b565b90509250929050565b600181811c90821680610d2557607f821691505b602082108103610d4557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156102f9576102f9610d4b565b634e487b7160e01b600052603260045260246000fd5b600060018201610d9c57610d9c610d4b565b506001019056fea264697066735822122019249693124583b9120c5de7d8f24242019481709a528738c3bee677894776ea64736f6c63430008130033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000bebc200000000000000000000000000000000000000000000000000000000000000000549504d4254000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000549504d4254000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100eb5760003560e01c806370a082311161009257806370a08231146101a0578063715018a6146101c957806379cc6790146101d15780638da5cb5b146101e457806395d89b41146101ff578063a457c2d714610207578063a9059cbb1461021a578063dd62ed3e1461022d578063f2fde38b1461024057600080fd5b806306fdde03146100f0578063095ea7b31461010e57806318160ddd1461013157806323b872dd14610143578063313ce5671461015657806339509351146101655780633badca251461017857806342966c681461018d575b600080fd5b6100f8610253565b6040516101059190610a3d565b60405180910390f35b61012161011c366004610aa7565b6102e5565b6040519015158152602001610105565b6002545b604051908152602001610105565b610121610151366004610ad1565b6102ff565b60405160128152602001610105565b610121610173366004610aa7565b610323565b61018b610186366004610be3565b610345565b005b61018b61019b366004610ca3565b6103a5565b6101356101ae366004610cbc565b6001600160a01b031660009081526020819052604090205490565b61018b6103b2565b61018b6101df366004610aa7565b6103c6565b6005546040516001600160a01b039091168152602001610105565b6100f86103df565b610121610215366004610aa7565b6103ee565b610121610228366004610aa7565b61046e565b61013561023b366004610cde565b61047c565b61018b61024e366004610cbc565b6104a7565b60606003805461026290610d11565b80601f016020809104026020016040519081016040528092919081815260200182805461028e90610d11565b80156102db5780601f106102b0576101008083540402835291602001916102db565b820191906000526020600020905b8154815290600101906020018083116102be57829003601f168201915b5050505050905090565b6000336102f381858561051d565b60019150505b92915050565b60003361030d858285610641565b6103188585856106bb565b506001949350505050565b6000336102f3818585610336838361047c565b6103409190610d61565b61051d565b60005b82518110156103a05761038d83828151811061036657610366610d74565b602002602001015183838151811061038057610380610d74565b602002602001015161046e565b508061039881610d8a565b915050610348565b505050565b6103af338261085f565b50565b6103ba610991565b6103c460006109eb565b565b6103d1823383610641565b6103db828261085f565b5050565b60606004805461026290610d11565b600033816103fc828661047c565b9050838110156104615760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610318828686840361051d565b6000336102f38185856106bb565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6104af610991565b6001600160a01b0381166105145760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610458565b6103af816109eb565b6001600160a01b03831661057f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610458565b6001600160a01b0382166105e05760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610458565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061064d848461047c565b905060001981146106b557818110156106a85760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610458565b6106b5848484840361051d565b50505050565b6001600160a01b03831661071f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610458565b6001600160a01b0382166107815760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610458565b6001600160a01b038316600090815260208190526040902054818110156107f95760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610458565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36106b5565b6001600160a01b0382166108bf5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610458565b6001600160a01b038216600090815260208190526040902054818110156109335760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610458565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b6005546001600160a01b031633146103c45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610458565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060208083528351808285015260005b81811015610a6a57858101830151858201604001528201610a4e565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610aa257600080fd5b919050565b60008060408385031215610aba57600080fd5b610ac383610a8b565b946020939093013593505050565b600080600060608486031215610ae657600080fd5b610aef84610a8b565b9250610afd60208501610a8b565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610b4c57610b4c610b0d565b604052919050565b600067ffffffffffffffff821115610b6e57610b6e610b0d565b5060051b60200190565b600082601f830112610b8957600080fd5b81356020610b9e610b9983610b54565b610b23565b82815260059290921b84018101918181019086841115610bbd57600080fd5b8286015b84811015610bd85780358352918301918301610bc1565b509695505050505050565b60008060408385031215610bf657600080fd5b823567ffffffffffffffff80821115610c0e57600080fd5b818501915085601f830112610c2257600080fd5b81356020610c32610b9983610b54565b82815260059290921b84018101918181019089841115610c5157600080fd5b948201945b83861015610c7657610c6786610a8b565b82529482019490820190610c56565b96505086013592505080821115610c8c57600080fd5b50610c9985828601610b78565b9150509250929050565b600060208284031215610cb557600080fd5b5035919050565b600060208284031215610cce57600080fd5b610cd782610a8b565b9392505050565b60008060408385031215610cf157600080fd5b610cfa83610a8b565b9150610d0860208401610a8b565b90509250929050565b600181811c90821680610d2557607f821691505b602082108103610d4557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156102f9576102f9610d4b565b634e487b7160e01b600052603260045260246000fd5b600060018201610d9c57610d9c610d4b565b506001019056fea264697066735822122019249693124583b9120c5de7d8f24242019481709a528738c3bee677894776ea64736f6c63430008130033

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000bebc200000000000000000000000000000000000000000000000000000000000000000549504d4254000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000549504d4254000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): IPMBT
Arg [1] : _symbol (string): IPMBT
Arg [2] : amount (uint256): 200000000

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 000000000000000000000000000000000000000000000000000000000bebc200
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [4] : 49504d4254000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [6] : 49504d4254000000000000000000000000000000000000000000000000000000


Deployed Bytecode Sourcemap

20694:498:10:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8934:98;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;11220:197;;;;;;:::i;:::-;;:::i;:::-;;;1169:14:11;;1162:22;1144:41;;1132:2;1117:18;11220:197:10;1004:187:11;10031:106:10;10118:12;;10031:106;;;1342:25:11;;;1330:2;1315:18;10031:106:10;1196:177:11;11979:256:10;;;;;;:::i;:::-;;:::i;9880:91::-;;;9962:2;1853:36:11;;1841:2;1826:18;9880:91:10;1711:184:11;12630:234:10;;;;;;:::i;:::-;;:::i;20981:209::-;;;;;;:::i;:::-;;:::i;:::-;;20108:89;;;;;;:::i;:::-;;:::i;10195:125::-;;;;;;:::i;:::-;-1:-1:-1;;;;;10295:18:10;10269:7;10295:18;;;;;;;;;;;;10195:125;2783:101;;;:::i;20503:161::-;;;;;;:::i;:::-;;:::i;2160:85::-;2232:6;;2160:85;;-1:-1:-1;;;;;2232:6:10;;;4840:51:11;;4828:2;4813:18;2160:85:10;4694:203:11;9145:102:10;;;:::i;13351:427::-;;;;;;:::i;:::-;;:::i;10516:189::-;;;;;;:::i;:::-;;:::i;10763:149::-;;;;;;:::i;:::-;;:::i;3033:198::-;;;;;;:::i;:::-;;:::i;8934:98::-;8988:13;9020:5;9013:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8934:98;:::o;11220:197::-;11303:4;897:10;11357:32;897:10;11373:7;11382:6;11357:8;:32::i;:::-;11406:4;11399:11;;;11220:197;;;;;:::o;11979:256::-;12076:4;897:10;12132:38;12148:4;897:10;12163:6;12132:15;:38::i;:::-;12180:27;12190:4;12196:2;12200:6;12180:9;:27::i;:::-;-1:-1:-1;12224:4:10;;11979:256;-1:-1:-1;;;;11979:256:10:o;12630:234::-;12718:4;897:10;12772:64;897:10;12788:7;12825:10;12797:25;897:10;12788:7;12797:9;:25::i;:::-;:38;;;;:::i;:::-;12772:8;:64::i;20981:209::-;21083:9;21078:106;21099:10;:17;21096:1;:20;21078:106;;;21137:36;21146:10;21157:1;21146:13;;;;;;;;:::i;:::-;;;;;;;21161:8;21170:1;21161:11;;;;;;;;:::i;:::-;;;;;;;21137:8;:36::i;:::-;-1:-1:-1;21118:3:10;;;;:::i;:::-;;;;21078:106;;;;20981:209;;:::o;20108:89::-;20163:27;897:10;20183:6;20163:5;:27::i;:::-;20108:89;:::o;2783:101::-;2053:13;:11;:13::i;:::-;2847:30:::1;2874:1;2847:18;:30::i;:::-;2783:101::o:0;20503:161::-;20579:46;20595:7;897:10;20618:6;20579:15;:46::i;:::-;20635:22;20641:7;20650:6;20635:5;:22::i;:::-;20503:161;;:::o;9145:102::-;9201:13;9233:7;9226:14;;;;;:::i;13351:427::-;13444:4;897:10;13444:4;13525:25;897:10;13542:7;13525:9;:25::i;:::-;13498:52;;13588:15;13568:16;:35;;13560:85;;;;-1:-1:-1;;;13560:85:10;;6288:2:11;13560:85:10;;;6270:21:11;6327:2;6307:18;;;6300:30;6366:34;6346:18;;;6339:62;-1:-1:-1;;;6417:18:11;;;6410:35;6462:19;;13560:85:10;;;;;;;;;13679:60;13688:5;13695:7;13723:15;13704:16;:34;13679:8;:60::i;10516:189::-;10595:4;897:10;10649:28;897:10;10666:2;10670:6;10649:9;:28::i;10763:149::-;-1:-1:-1;;;;;10878:18:10;;;10852:7;10878:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;10763:149::o;3033:198::-;2053:13;:11;:13::i;:::-;-1:-1:-1;;;;;3121:22:10;::::1;3113:73;;;::::0;-1:-1:-1;;;3113:73:10;;6694:2:11;3113:73:10::1;::::0;::::1;6676:21:11::0;6733:2;6713:18;;;6706:30;6772:34;6752:18;;;6745:62;-1:-1:-1;;;6823:18:11;;;6816:36;6869:19;;3113:73:10::1;6492:402:11::0;3113:73:10::1;3196:28;3215:8;3196:18;:28::i;17233:340::-:0;-1:-1:-1;;;;;17334:19:10;;17326:68;;;;-1:-1:-1;;;17326:68:10;;7101:2:11;17326:68:10;;;7083:21:11;7140:2;7120:18;;;7113:30;7179:34;7159:18;;;7152:62;-1:-1:-1;;;7230:18:11;;;7223:34;7274:19;;17326:68:10;6899:400:11;17326:68:10;-1:-1:-1;;;;;17412:21:10;;17404:68;;;;-1:-1:-1;;;17404:68:10;;7506:2:11;17404:68:10;;;7488:21:11;7545:2;7525:18;;;7518:30;7584:34;7564:18;;;7557:62;-1:-1:-1;;;7635:18:11;;;7628:32;7677:19;;17404:68:10;7304:398:11;17404:68:10;-1:-1:-1;;;;;17483:18:10;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;17534:32;;1342:25:11;;;17534:32:10;;1315:18:11;17534:32:10;;;;;;;17233:340;;;:::o;17854:411::-;17954:24;17981:25;17991:5;17998:7;17981:9;:25::i;:::-;17954:52;;-1:-1:-1;;18020:16:10;:37;18016:243;;18101:6;18081:16;:26;;18073:68;;;;-1:-1:-1;;;18073:68:10;;7909:2:11;18073:68:10;;;7891:21:11;7948:2;7928:18;;;7921:30;7987:31;7967:18;;;7960:59;8036:18;;18073:68:10;7707:353:11;18073:68:10;18183:51;18192:5;18199:7;18227:6;18208:16;:25;18183:8;:51::i;:::-;17944:321;17854:411;;;:::o;14232:788::-;-1:-1:-1;;;;;14328:18:10;;14320:68;;;;-1:-1:-1;;;14320:68:10;;8267:2:11;14320:68:10;;;8249:21:11;8306:2;8286:18;;;8279:30;8345:34;8325:18;;;8318:62;-1:-1:-1;;;8396:18:11;;;8389:35;8441:19;;14320:68:10;8065:401:11;14320:68:10;-1:-1:-1;;;;;14406:16:10;;14398:64;;;;-1:-1:-1;;;14398:64:10;;8673:2:11;14398:64:10;;;8655:21:11;8712:2;8692:18;;;8685:30;8751:34;8731:18;;;8724:62;-1:-1:-1;;;8802:18:11;;;8795:33;8845:19;;14398:64:10;8471:399:11;14398:64:10;-1:-1:-1;;;;;14544:15:10;;14522:19;14544:15;;;;;;;;;;;14577:21;;;;14569:72;;;;-1:-1:-1;;;14569:72:10;;9077:2:11;14569:72:10;;;9059:21:11;9116:2;9096:18;;;9089:30;9155:34;9135:18;;;9128:62;-1:-1:-1;;;9206:18:11;;;9199:36;9252:19;;14569:72:10;8875:402:11;14569:72:10;-1:-1:-1;;;;;14675:15:10;;;:9;:15;;;;;;;;;;;14693:20;;;14675:38;;14890:13;;;;;;;;;;:23;;;;;;14939:26;;1342:25:11;;;14890:13:10;;14939:26;;1315:18:11;14939:26:10;;;;;;;14976:37;20981:209;16151:659;-1:-1:-1;;;;;16234:21:10;;16226:67;;;;-1:-1:-1;;;16226:67:10;;9484:2:11;16226:67:10;;;9466:21:11;9523:2;9503:18;;;9496:30;9562:34;9542:18;;;9535:62;-1:-1:-1;;;9613:18:11;;;9606:31;9654:19;;16226:67:10;9282:397:11;16226:67:10;-1:-1:-1;;;;;16389:18:10;;16364:22;16389:18;;;;;;;;;;;16425:24;;;;16417:71;;;;-1:-1:-1;;;16417:71:10;;9886:2:11;16417:71:10;;;9868:21:11;9925:2;9905:18;;;9898:30;9964:34;9944:18;;;9937:62;-1:-1:-1;;;10015:18:11;;;10008:32;10057:19;;16417:71:10;9684:398:11;16417:71:10;-1:-1:-1;;;;;16522:18:10;;:9;:18;;;;;;;;;;;16543:23;;;16522:44;;16659:12;:22;;;;;;;16707:37;1342:25:11;;;16522:9:10;;:18;16707:37;;1315:18:11;16707:37:10;;;;;;;21078:106;20981:209;;:::o;2318:130::-;2232:6;;-1:-1:-1;;;;;2232:6:10;897:10;2381:23;2373:68;;;;-1:-1:-1;;;2373:68:10;;10289:2:11;2373:68:10;;;10271:21:11;;;10308:18;;;10301:30;10367:34;10347:18;;;10340:62;10419:18;;2373:68:10;10087:356:11;3385:187:10;3477:6;;;-1:-1:-1;;;;;3493:17:10;;;-1:-1:-1;;;;;;3493:17:10;;;;;;;3525:40;;3477:6;;;3493:17;3477:6;;3525:40;;3458:16;;3525:40;3448:124;3385:187;:::o;14:548:11:-;126:4;155:2;184;173:9;166:21;216:6;210:13;259:6;254:2;243:9;239:18;232:34;284:1;294:140;308:6;305:1;302:13;294:140;;;403:14;;;399:23;;393:30;369:17;;;388:2;365:26;358:66;323:10;;294:140;;;298:3;483:1;478:2;469:6;458:9;454:22;450:31;443:42;553:2;546;542:7;537:2;529:6;525:15;521:29;510:9;506:45;502:54;494:62;;;;14:548;;;;:::o;567:173::-;635:20;;-1:-1:-1;;;;;684:31:11;;674:42;;664:70;;730:1;727;720:12;664:70;567:173;;;:::o;745:254::-;813:6;821;874:2;862:9;853:7;849:23;845:32;842:52;;;890:1;887;880:12;842:52;913:29;932:9;913:29;:::i;:::-;903:39;989:2;974:18;;;;961:32;;-1:-1:-1;;;745:254:11:o;1378:328::-;1455:6;1463;1471;1524:2;1512:9;1503:7;1499:23;1495:32;1492:52;;;1540:1;1537;1530:12;1492:52;1563:29;1582:9;1563:29;:::i;:::-;1553:39;;1611:38;1645:2;1634:9;1630:18;1611:38;:::i;:::-;1601:48;;1696:2;1685:9;1681:18;1668:32;1658:42;;1378:328;;;;;:::o;1900:127::-;1961:10;1956:3;1952:20;1949:1;1942:31;1992:4;1989:1;1982:15;2016:4;2013:1;2006:15;2032:275;2103:2;2097:9;2168:2;2149:13;;-1:-1:-1;;2145:27:11;2133:40;;2203:18;2188:34;;2224:22;;;2185:62;2182:88;;;2250:18;;:::i;:::-;2286:2;2279:22;2032:275;;-1:-1:-1;2032:275:11:o;2312:183::-;2372:4;2405:18;2397:6;2394:30;2391:56;;;2427:18;;:::i;:::-;-1:-1:-1;2472:1:11;2468:14;2484:4;2464:25;;2312:183::o;2500:662::-;2554:5;2607:3;2600:4;2592:6;2588:17;2584:27;2574:55;;2625:1;2622;2615:12;2574:55;2661:6;2648:20;2687:4;2711:60;2727:43;2767:2;2727:43;:::i;:::-;2711:60;:::i;:::-;2805:15;;;2891:1;2887:10;;;;2875:23;;2871:32;;;2836:12;;;;2915:15;;;2912:35;;;2943:1;2940;2933:12;2912:35;2979:2;2971:6;2967:15;2991:142;3007:6;3002:3;2999:15;2991:142;;;3073:17;;3061:30;;3111:12;;;;3024;;2991:142;;;-1:-1:-1;3151:5:11;2500:662;-1:-1:-1;;;;;;2500:662:11:o;3167:1146::-;3285:6;3293;3346:2;3334:9;3325:7;3321:23;3317:32;3314:52;;;3362:1;3359;3352:12;3314:52;3402:9;3389:23;3431:18;3472:2;3464:6;3461:14;3458:34;;;3488:1;3485;3478:12;3458:34;3526:6;3515:9;3511:22;3501:32;;3571:7;3564:4;3560:2;3556:13;3552:27;3542:55;;3593:1;3590;3583:12;3542:55;3629:2;3616:16;3651:4;3675:60;3691:43;3731:2;3691:43;:::i;3675:60::-;3769:15;;;3851:1;3847:10;;;;3839:19;;3835:28;;;3800:12;;;;3875:19;;;3872:39;;;3907:1;3904;3897:12;3872:39;3931:11;;;;3951:148;3967:6;3962:3;3959:15;3951:148;;;4033:23;4052:3;4033:23;:::i;:::-;4021:36;;3984:12;;;;4077;;;;3951:148;;;4118:5;-1:-1:-1;;4161:18:11;;4148:32;;-1:-1:-1;;4192:16:11;;;4189:36;;;4221:1;4218;4211:12;4189:36;;4244:63;4299:7;4288:8;4277:9;4273:24;4244:63;:::i;:::-;4234:73;;;3167:1146;;;;;:::o;4318:180::-;4377:6;4430:2;4418:9;4409:7;4405:23;4401:32;4398:52;;;4446:1;4443;4436:12;4398:52;-1:-1:-1;4469:23:11;;4318:180;-1:-1:-1;4318:180:11:o;4503:186::-;4562:6;4615:2;4603:9;4594:7;4590:23;4586:32;4583:52;;;4631:1;4628;4621:12;4583:52;4654:29;4673:9;4654:29;:::i;:::-;4644:39;4503:186;-1:-1:-1;;;4503:186:11:o;4902:260::-;4970:6;4978;5031:2;5019:9;5010:7;5006:23;5002:32;4999:52;;;5047:1;5044;5037:12;4999:52;5070:29;5089:9;5070:29;:::i;:::-;5060:39;;5118:38;5152:2;5141:9;5137:18;5118:38;:::i;:::-;5108:48;;4902:260;;;;;:::o;5167:380::-;5246:1;5242:12;;;;5289;;;5310:61;;5364:4;5356:6;5352:17;5342:27;;5310:61;5417:2;5409:6;5406:14;5386:18;5383:38;5380:161;;5463:10;5458:3;5454:20;5451:1;5444:31;5498:4;5495:1;5488:15;5526:4;5523:1;5516:15;5380:161;;5167:380;;;:::o;5552:127::-;5613:10;5608:3;5604:20;5601:1;5594:31;5644:4;5641:1;5634:15;5668:4;5665:1;5658:15;5684:125;5749:9;;;5770:10;;;5767:36;;;5783:18;;:::i;5814:127::-;5875:10;5870:3;5866:20;5863:1;5856:31;5906:4;5903:1;5896:15;5930:4;5927:1;5920:15;5946:135;5985:3;6006:17;;;6003:43;;6026:18;;:::i;:::-;-1:-1:-1;6073:1:11;6062:13;;5946:135::o

Swarm Source

ipfs://19249693124583b9120c5de7d8f24242019481709a528738c3bee677894776ea

Block Transaction 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
Loading...
Loading
[ 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.