Contract 0x9b2dc82eb709040f43b38c4246f96b4f73c63400 1

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x0febfa9abc64db2e8145c8c6b6a2a1515c99d1e653012961ab4da174a043e75eSet Asset Source146800122022-05-14 10:04:147 days 21 hrs ago0x5b3415f36ab5abe6ec66faba9dd8c7fee8cdb5c2 IN  0x9b2dc82eb709040f43b38c4246f96b4f73c634000 AVAX0.001777875 25
0x98f50b1926558cbb0bc4888b1f5770add04eec13eeb8cd069c5846de10c0c39fSet Kalm Price O...146799662022-05-14 10:02:427 days 21 hrs ago0x5b3415f36ab5abe6ec66faba9dd8c7fee8cdb5c2 IN  0x9b2dc82eb709040f43b38c4246f96b4f73c634000 AVAX0.0011509 25
0x753d6c4018f2b315e93f2cb5c0d2acb5df1058eb37240cac37f6d516ad55eef00x60a06040146799212022-05-14 10:01:147 days 21 hrs ago0x5b3415f36ab5abe6ec66faba9dd8c7fee8cdb5c2 IN  Create: PriceFeedData0 AVAX0.0261193075 27.5
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PriceFeedData

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at snowtrace.io on 2022-05-14
*/

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

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

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

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/utils/Context.sol



pragma solidity >=0.6.0 <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 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 payable) {
        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: @openzeppelin/contracts/access/Ownable.sol



pragma solidity >=0.6.0 <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 () 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: contracts/libs/Math.sol



pragma solidity 0.6.12;

// a library for performing various math operations

library Math {
    /**
     * @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, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

// File: contracts/interfaces/IChainlinkAggregator.sol



pragma solidity 0.6.12;

interface IChainlinkAggregator {

  function decimals() external view returns (uint8);
  function description() external view returns (string memory);
  function version() external view returns (uint256);

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

    function latestAnswer() external view returns (int256);
}

// File: contracts/interfaces/IKalmOraclePrice.sol



pragma solidity 0.6.12;

interface IKalmOraclePrice {
    
    function kalmPrice() external view returns (uint256);
}

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



pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

// File: contracts/interfaces/IERC20Detailed.sol



pragma solidity 0.6.12;

interface IERC20Detailed is IERC20 {
  function name() external view returns (string memory);

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

  function decimals() external view returns (uint8);
}

// File: contracts/interfaces/IPancakeswapV2Pair.sol



pragma solidity 0.6.12;

interface IPancakeswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(
        address owner,
        address spender,
        uint value,
        uint deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (
        uint112 reserve0,
        uint112 reserve1,
        uint32 blockTimestampLast
    );
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

// File: contracts/PriceFeedData.sol



pragma solidity 0.6.12;






/*
* PriceFeed for mainnet deployment, to be connected to Chainlink's live ETH:USD aggregator reference
* contract, and a wrapper contract bandOracle, which connects to BandMaster contract.
*
* The PriceFeed uses Chainlink as primary oracle, and Band as fallback. It contains logic for
* switching oracles based on oracle failures, timeouts, and conditions for returning to the primary
* Chainlink oracle.
*/
contract PriceFeedData is Ownable {
    using SafeMath for uint256;

    address public immutable kalm;
    // kalm oracle address
    address public kalmOracle; 

    mapping (address => address) public assetChainlink;

    /* ========== CONSTRUCTOR ========== */

    constructor(
        address _kalm
    ) public {
        kalm = _kalm;
    }


    /* ========== VIEW ========== */

    function kalmPriceInUsd() external view returns (uint256) {
         return _kalmPrice();
    }

    function lpPriceInUsd(address lp) external view returns (uint256) {
        return _getLpPrice(lp);
    }

    function otherPriceInUsd(address asset) external view returns (uint256) {
        return _otherTokenPrice(asset);
    }

    /* ========== MUTATIVE FUNCTION ========== */

    function setAssetSource(address[] memory _asset, address[] memory _chainlink) external onlyOwner {
        require(_asset.length == _chainlink.length);
        for (uint i; i < _asset.length; i++) {
            assetChainlink[_asset[i]] = _chainlink[i];
        }
    }

    function setKalmPriceOracle(address _oracle) external onlyOwner {
        kalmOracle = _oracle;
    }

    /* ========== INTERNAL FUNCTION ========== */

    function _kalmPrice() internal view returns (uint256) {
        uint256 price = IKalmOraclePrice(kalmOracle).kalmPrice();
        return price;
    }

    function _otherTokenPrice(address asset) internal view returns (uint256) {
        address chainlink = assetChainlink[asset];
        int256 ans = IChainlinkAggregator(chainlink).latestAnswer();
        uint256 price = uint256(ans).mul(1e10);
        return price;

    }

    function _fairAssetReserve(address lp) internal view returns(uint256 fairReserveKalm, uint256 fairReserveOther)
    {
      IPancakeswapV2Pair pair = IPancakeswapV2Pair(lp);
      address other = pair.token0() == kalm ? pair.token1() : pair.token0();
      (uint256 Res0, uint256 Res1,) = pair.getReserves();
      (uint256 kalmReserve, uint256 otherReserve) = pair.token0() == kalm ? (Res0, Res1) : (Res1, Res0);
      uint256 decimalsOther = IERC20Detailed(other).decimals();

      otherReserve = otherReserve.mul(1e18).div(10**decimalsOther);
      uint256 k = kalmReserve.mul(otherReserve);
      uint256 p = _kalmPrice().mul(1e18).div(_otherTokenPrice(other));

      fairReserveKalm = Math.sqrt(k.div(p)).mul(1e9);
      fairReserveOther = Math.sqrt(k.mul(p)).div(1e9);
    }

    function _getLpPrice(address lp) internal view returns(uint256)
    {
      IPancakeswapV2Pair pair = IPancakeswapV2Pair(lp);
      uint totalSupply = pair.totalSupply();
      if (totalSupply == 0) return 0;
      address other = pair.token0() == kalm ? pair.token1() : pair.token0();
      (uint256 fairReserveKalm, uint256 fairReserveOther) = _fairAssetReserve(lp);

      uint256 totalOtherPrice = fairReserveOther.mul(_otherTokenPrice(other));
      uint256 totalKalmPrice = fairReserveKalm.mul(_kalmPrice());

      uint256 lpPrice = (totalOtherPrice.add(totalKalmPrice)).div(totalSupply);
      return lpPrice;
    }

}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_kalm","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assetChainlink","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kalm","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kalmOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kalmPriceInUsd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"lp","type":"address"}],"name":"lpPriceInUsd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"otherPriceInUsd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"address[]","name":"_asset","type":"address[]"},{"internalType":"address[]","name":"_chainlink","type":"address[]"}],"name":"setAssetSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"}],"name":"setKalmPriceOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405234801561001057600080fd5b506040516110933803806110938339818101604052602081101561003357600080fd5b5051600061003f61009e565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060601b6001600160601b0319166080526100a2565b3390565b60805160601c610fc56100ce6000398061052852806107175280610a105280610c255250610fc56000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80639293dbf5116100715780639293dbf514610261578063a374861d14610269578063af01127c1461028f578063b8bd5d4e14610297578063dc8bbdce146102bd578063f2fde38b146102c5576100a9565b80635a3cfb28146100ae5780635ababf22146100d6578063715018a61461010e5780637528282b146101165780638da5cb5b1461023d575b600080fd5b6100d4600480360360208110156100c457600080fd5b50356001600160a01b03166102eb565b005b6100fc600480360360208110156100ec57600080fd5b50356001600160a01b031661036f565b60408051918252519081900360200190f35b6100d4610382565b6100d46004803603604081101561012c57600080fd5b81019060208101813564010000000081111561014757600080fd5b82018360208201111561015957600080fd5b8035906020019184602083028401116401000000008311171561017b57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092959493602081019350359150506401000000008111156101cb57600080fd5b8201836020820111156101dd57600080fd5b803590602001918460208302840111640100000000831117156101ff57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061042e945050505050565b610245610517565b604080516001600160a01b039092168252519081900360200190f35b610245610526565b6100fc6004803603602081101561027f57600080fd5b50356001600160a01b031661054a565b610245610555565b610245600480360360208110156102ad57600080fd5b50356001600160a01b0316610564565b6100fc61057f565b6100d4600480360360208110156102db57600080fd5b50356001600160a01b031661058e565b6102f3610690565b6001600160a01b0316610304610517565b6001600160a01b03161461034d576040805162461bcd60e51b81526020600482018190526024820152600080516020610f70833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600061037a82610694565b90505b919050565b61038a610690565b6001600160a01b031661039b610517565b6001600160a01b0316146103e4576040805162461bcd60e51b81526020600482018190526024820152600080516020610f70833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b610436610690565b6001600160a01b0316610447610517565b6001600160a01b031614610490576040805162461bcd60e51b81526020600482018190526024820152600080516020610f70833981519152604482015290519081900360640190fd5b805182511461049e57600080fd5b60005b8251811015610512578181815181106104b657fe5b6020026020010151600260008584815181106104ce57fe5b6020908102919091018101516001600160a01b0390811683529082019290925260400160002080546001600160a01b031916929091169190911790556001016104a1565b505050565b6000546001600160a01b031690565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061037a826108e5565b6001546001600160a01b031681565b6002602052600090815260409020546001600160a01b031681565b6000610589610981565b905090565b610596610690565b6001600160a01b03166105a7610517565b6001600160a01b0316146105f0576040805162461bcd60e51b81526020600482018190526024820152600080516020610f70833981519152604482015290519081900360640190fd5b6001600160a01b0381166106355760405162461bcd60e51b8152600401808060200182810382526026815260200180610f296026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6000808290506000816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106d557600080fd5b505afa1580156106e9573d6000803e3d6000fd5b505050506040513d60208110156106ff57600080fd5b50519050806107135760009250505061037d565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561077857600080fd5b505afa15801561078c573d6000803e3d6000fd5b505050506040513d60208110156107a257600080fd5b50516001600160a01b03161461081c57826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156107eb57600080fd5b505afa1580156107ff573d6000803e3d6000fd5b505050506040513d602081101561081557600080fd5b5051610882565b826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561085557600080fd5b505afa158015610869573d6000803e3d6000fd5b505050506040513d602081101561087f57600080fd5b50515b905060008061089087610a04565b9150915060006108a96108a2856108e5565b8390610db4565b905060006108bf6108b8610981565b8590610db4565b905060006108d7876108d18585610e16565b90610e70565b9a9950505050505050505050565b6001600160a01b0380821660009081526002602090815260408083205481516350d25bcd60e01b8152915193941692849284926350d25bcd9260048083019392829003018186803b15801561093957600080fd5b505afa15801561094d573d6000803e3d6000fd5b505050506040513d602081101561096357600080fd5b505190506000610978826402540be400610db4565b95945050505050565b600080600160009054906101000a90046001600160a01b03166001600160a01b03166370ecfe3b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109d257600080fd5b505afa1580156109e6573d6000803e3d6000fd5b505050506040513d60208110156109fc57600080fd5b505191505090565b600080600083905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610a7157600080fd5b505afa158015610a85573d6000803e3d6000fd5b505050506040513d6020811015610a9b57600080fd5b50516001600160a01b031614610b1557816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610ae457600080fd5b505afa158015610af8573d6000803e3d6000fd5b505050506040513d6020811015610b0e57600080fd5b5051610b7b565b816001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610b4e57600080fd5b505afa158015610b62573d6000803e3d6000fd5b505050506040513d6020811015610b7857600080fd5b50515b9050600080836001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610bb957600080fd5b505afa158015610bcd573d6000803e3d6000fd5b505050506040513d6060811015610be357600080fd5b50805160209182015160408051630dfe168160e01b815290516dffffffffffffffffffffffffffff938416965092909116935060009283926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811693908a1692630dfe168192600480840193829003018186803b158015610c6b57600080fd5b505afa158015610c7f573d6000803e3d6000fd5b505050506040513d6020811015610c9557600080fd5b50516001600160a01b031614610cac578284610caf565b83835b915091506000856001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610cee57600080fd5b505afa158015610d02573d6000803e3d6000fd5b505050506040513d6020811015610d1857600080fd5b505160ff169050610d39600a82900a6108d184670de0b6b3a7640000610db4565b91506000610d478484610db4565b90506000610d71610d57896108e5565b6108d1670de0b6b3a7640000610d6b610981565b90610db4565b9050610d8d633b9aca00610d6b610d888585610e70565b610ed7565b9a50610da4633b9aca006108d1610d888585610db4565b9950505050505050505050915091565b600082610dc357506000610e10565b82820282848281610dd057fe5b0414610e0d5760405162461bcd60e51b8152600401808060200182810382526021815260200180610f4f6021913960400191505060405180910390fd5b90505b92915050565b600082820183811015610e0d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000808211610ec6576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610ecf57fe5b049392505050565b60006003821115610f1a575080600160028204015b81811015610f1457809150600281828581610f0357fe5b040181610f0c57fe5b049050610eec565b5061037d565b811561037d5750600191905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220d6b2ea6640efbc31def9a8fcacaf23bd6c43228f16a43ea8edc61e5e5ce756d164736f6c634300060c003300000000000000000000000062aceea3e666c5706ce1c61055fac1a669d31d93

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

00000000000000000000000062aceea3e666c5706ce1c61055fac1a669d31d93

-----Decoded View---------------
Arg [0] : _kalm (address): 0x62aceea3e666c5706ce1c61055fac1a669d31d93

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000062aceea3e666c5706ce1c61055fac1a669d31d93


Deployed ByteCode Sourcemap

19485:3150:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20581:103;;;;;;;;;;;;;;;;-1:-1:-1;20581:103:0;-1:-1:-1;;;;;20581:103:0;;:::i;:::-;;20002:107;;;;;;;;;;;;;;;;-1:-1:-1;20002:107:0;-1:-1:-1;;;;;20002:107:0;;:::i;:::-;;;;;;;;;;;;;;;;10247:148;;;:::i;20299:274::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20299:274:0;;;;;;;;-1:-1:-1;20299:274:0;;-1:-1:-1;;20299:274:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20299:274:0;;-1:-1:-1;20299:274:0;;-1:-1:-1;;;;;20299:274:0:i;9596:87::-;;;:::i;:::-;;;;-1:-1:-1;;;;;9596:87:0;;;;;;;;;;;;;;19561:29;;;:::i;20117:121::-;;;;;;;;;;;;;;;;-1:-1:-1;20117:121:0;-1:-1:-1;;;;;20117:121:0;;:::i;19625:25::-;;;:::i;19660:50::-;;;;;;;;;;;;;;;;-1:-1:-1;19660:50:0;-1:-1:-1;;;;;19660:50:0;;:::i;19897:97::-;;;:::i;10550:244::-;;;;;;;;;;;;;;;;-1:-1:-1;10550:244:0;-1:-1:-1;;;;;10550:244:0;;:::i;20581:103::-;9827:12;:10;:12::i;:::-;-1:-1:-1;;;;;9816:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;9816:23:0;;9808:68;;;;;-1:-1:-1;;;9808:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9808:68:0;;;;;;;;;;;;;;;20656:10:::1;:20:::0;;-1:-1:-1;;;;;;20656:20:0::1;-1:-1:-1::0;;;;;20656:20:0;;;::::1;::::0;;;::::1;::::0;;20581:103::o;20002:107::-;20059:7;20086:15;20098:2;20086:11;:15::i;:::-;20079:22;;20002:107;;;;:::o;10247:148::-;9827:12;:10;:12::i;:::-;-1:-1:-1;;;;;9816:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;9816:23:0;;9808:68;;;;;-1:-1:-1;;;9808:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9808:68:0;;;;;;;;;;;;;;;10354:1:::1;10338:6:::0;;10317:40:::1;::::0;-1:-1:-1;;;;;10338:6:0;;::::1;::::0;10317:40:::1;::::0;10354:1;;10317:40:::1;10385:1;10368:19:::0;;-1:-1:-1;;;;;;10368:19:0::1;::::0;;10247:148::o;20299:274::-;9827:12;:10;:12::i;:::-;-1:-1:-1;;;;;9816:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;9816:23:0;;9808:68;;;;;-1:-1:-1;;;9808:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9808:68:0;;;;;;;;;;;;;;;20432:10:::1;:17;20415:6;:13;:34;20407:43;;;::::0;::::1;;20466:6;20461:105;20478:6;:13;20474:1;:17;20461:105;;;20541:10;20552:1;20541:13;;;;;;;;;;;;;;20513:14;:25;20528:6;20535:1;20528:9;;;;;;;;;::::0;;::::1;::::0;;;;;;;-1:-1:-1;;;;;20513:25:0;;::::1;::::0;;;;::::1;::::0;;;;;;-1:-1:-1;20513:25:0;:41;;-1:-1:-1;;;;;;20513:41:0::1;::::0;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;20493:3:0::1;20461:105;;;;20299:274:::0;;:::o;9596:87::-;9642:7;9669:6;-1:-1:-1;;;;;9669:6:0;9596:87;:::o;19561:29::-;;;:::o;20117:121::-;20180:7;20207:23;20224:5;20207:16;:23::i;19625:25::-;;;-1:-1:-1;;;;;19625:25:0;;:::o;19660:50::-;;;;;;;;;;;;-1:-1:-1;;;;;19660:50:0;;:::o;19897:97::-;19946:7;19974:12;:10;:12::i;:::-;19967:19;;19897:97;:::o;10550:244::-;9827:12;:10;:12::i;:::-;-1:-1:-1;;;;;9816:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;9816:23:0;;9808:68;;;;;-1:-1:-1;;;9808:68:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;9808:68:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;10639:22:0;::::1;10631:73;;;;-1:-1:-1::0;;;10631:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10741:6;::::0;;10720:38:::1;::::0;-1:-1:-1;;;;;10720:38:0;;::::1;::::0;10741:6;::::1;::::0;10720:38:::1;::::0;::::1;10769:6;:17:::0;;-1:-1:-1;;;;;;10769:17:0::1;-1:-1:-1::0;;;;;10769:17:0;;;::::1;::::0;;;::::1;::::0;;10550:244::o;8131:106::-;8219:10;8131:106;:::o;21994:636::-;22049:7;22072:23;22117:2;22072:48;;22129:16;22148:4;-1:-1:-1;;;;;22148:16:0;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22148:18:0;;-1:-1:-1;22179:16:0;22175:30;;22204:1;22197:8;;;;;;22175:30;22214:13;22247:4;-1:-1:-1;;;;;22230:21:0;:4;-1:-1:-1;;;;;22230:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22230:13:0;-1:-1:-1;;;;;22230:21:0;;:53;;22270:4;-1:-1:-1;;;;;22270:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22270:13:0;22230:53;;;22254:4;-1:-1:-1;;;;;22254:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22254:13:0;22230:53;22214:69;;22293:23;22318:24;22346:21;22364:2;22346:17;:21::i;:::-;22292:75;;;;22378:23;22404:45;22425:23;22442:5;22425:16;:23::i;:::-;22404:16;;:20;:45::i;:::-;22378:71;;22458:22;22483:33;22503:12;:10;:12::i;:::-;22483:15;;:19;:33::i;:::-;22458:58;-1:-1:-1;22527:15:0;22545:54;22587:11;22546:35;:15;22458:58;22546:19;:35::i;:::-;22545:41;;:54::i;:::-;22527:72;21994:636;-1:-1:-1;;;;;;;;;;21994:636:0:o;20905:277::-;-1:-1:-1;;;;;21009:21:0;;;20969:7;21009:21;;;:14;:21;;;;;;;;;21054:46;;-1:-1:-1;;;21054:46:0;;;;20969:7;;21009:21;;20969:7;;21009:21;;21054:44;;:46;;;;;21009:21;21054:46;;;;;21009:21;21054:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21054:46:0;;-1:-1:-1;21111:13:0;21127:22;21054:46;21144:4;21127:16;:22::i;:::-;21111:38;20905:277;-1:-1:-1;;;;;20905:277:0:o;20745:152::-;20790:7;20810:13;20843:10;;;;;;;;;-1:-1:-1;;;;;20843:10:0;-1:-1:-1;;;;;20826:38:0;;:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;20826:40:0;;-1:-1:-1;;20745:152:0;:::o;21190:796::-;21251:23;21276:24;21316:23;21361:2;21316:48;;21373:13;21406:4;-1:-1:-1;;;;;21389:21:0;:4;-1:-1:-1;;;;;21389:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21389:13:0;-1:-1:-1;;;;;21389:21:0;;:53;;21429:4;-1:-1:-1;;;;;21429:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21429:13:0;21389:53;;;21413:4;-1:-1:-1;;;;;21413:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21413:13:0;21389:53;21373:69;;21452:12;21466;21483:4;-1:-1:-1;;;;;21483:16:0;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21483:18:0;;;;;;;;21556:13;;-1:-1:-1;;;21556:13:0;;;;21451:50;;;;;-1:-1:-1;21451:50:0;;;;;-1:-1:-1;21511:19:0;;;;-1:-1:-1;;;;;21573:4:0;21556:21;;;:11;;;;;;:13;;;;;;;;;;:11;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21556:13:0;-1:-1:-1;;;;;21556:21:0;;:51;;21596:4;21602;21556:51;;;21581:4;21587;21556:51;21510:97;;;;21616:21;21655:5;-1:-1:-1;;;;;21640:30:0;;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21640:32:0;21616:56;;;-1:-1:-1;21698:45:0;21725:2;:17;;;21698:22;:12;21715:4;21698:16;:22::i;:45::-;21683:60;-1:-1:-1;21752:9:0;21764:29;:11;21683:60;21764:15;:29::i;:::-;21752:41;;21802:9;21814:51;21841:23;21858:5;21841:16;:23::i;:::-;21814:22;21831:4;21814:12;:10;:12::i;:::-;:16;;:22::i;:51::-;21802:63;-1:-1:-1;21894:28:0;21918:3;21894:19;21904:8;:1;21802:63;21904:5;:8::i;:::-;21894:9;:19::i;:28::-;21876:46;-1:-1:-1;21950:28:0;21974:3;21950:19;21960:8;:1;21966;21960:5;:8::i;21950:28::-;21931:47;;21190:796;;;;;;;;;;;;:::o;3707:220::-;3765:7;3789:6;3785:20;;-1:-1:-1;3804:1:0;3797:8;;3785:20;3828:5;;;3832:1;3828;:5;:1;3852:5;;;;;:10;3844:56;;;;-1:-1:-1;;;3844:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3918:1;-1:-1:-1;3707:220:0;;;;;:::o;2828:179::-;2886:7;2918:5;;;2942:6;;;;2934:46;;;;;-1:-1:-1;;;2934:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;4405:153;4463:7;4495:1;4491;:5;4483:44;;;;;-1:-1:-1;;;4483:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;4549:1;4545;:5;;;;;;;4405:153;-1:-1:-1;;;4405:153:0:o;11729:303::-;11774:6;11801:1;11797;:5;11793:232;;;-1:-1:-1;11823:1:0;11856;11852;11848:5;;:9;11872:92;11883:1;11879;:5;11872:92;;;11909:1;11905:5;;11947:1;11942;11938;11934;:5;;;;;;:9;11933:15;;;;;;11929:19;;11872:92;;;11793:232;;;;11985:6;;11981:44;;-1:-1:-1;12012:1:0;11729:303;;;:::o

Swarm Source

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