Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 13 from a total of 13 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Update Price | 1126139 | 11 hrs ago | IN | 1 wei | 0.00001564 | ||||
Update Price | 1088111 | 21 hrs ago | IN | 1 wei | 0.00001788 | ||||
Update Price | 1041706 | 34 hrs ago | IN | 1 wei | 0.00001506 | ||||
Update Price | 937762 | 2 days ago | IN | 1 wei | 0.0000185 | ||||
Update Price | 926355 | 2 days ago | IN | 1 wei | 0.00001877 | ||||
Update Price | 921237 | 2 days ago | IN | 1 wei | 0.00002025 | ||||
Update Price | 912030 | 2 days ago | IN | 1 wei | 0.00001759 | ||||
Update Price | 862743 | 3 days ago | IN | 1 wei | 0.00002427 | ||||
Update Price | 854855 | 3 days ago | IN | 1 wei | 0.00001795 | ||||
Update Price | 852135 | 3 days ago | IN | 1 wei | 0.00001801 | ||||
Update Price | 851900 | 3 days ago | IN | 1 wei | 0.0000209 | ||||
Update Price | 426953 | 8 days ago | IN | 1 wei | 0.00001744 | ||||
Update Price | 426253 | 8 days ago | IN | 1 wei | 0.00002004 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
1126139 | 11 hrs ago | 1 wei | ||||
1126139 | 11 hrs ago | 1 wei | ||||
1126139 | 11 hrs ago | 1 wei | ||||
1088111 | 21 hrs ago | 1 wei | ||||
1088111 | 21 hrs ago | 1 wei | ||||
1088111 | 21 hrs ago | 1 wei | ||||
1041706 | 34 hrs ago | 1 wei | ||||
1041706 | 34 hrs ago | 1 wei | ||||
1041706 | 34 hrs ago | 1 wei | ||||
937762 | 2 days ago | 1 wei | ||||
937762 | 2 days ago | 1 wei | ||||
937762 | 2 days ago | 1 wei | ||||
926355 | 2 days ago | 1 wei | ||||
926355 | 2 days ago | 1 wei | ||||
926355 | 2 days ago | 1 wei | ||||
921237 | 2 days ago | 1 wei | ||||
921237 | 2 days ago | 1 wei | ||||
921237 | 2 days ago | 1 wei | ||||
912030 | 2 days ago | 1 wei | ||||
912030 | 2 days ago | 1 wei | ||||
912030 | 2 days ago | 1 wei | ||||
862743 | 3 days ago | 1 wei | ||||
862743 | 3 days ago | 1 wei | ||||
862743 | 3 days ago | 1 wei | ||||
854855 | 3 days ago | 1 wei |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
ChainlinkPythOracleWrapper
Compiler Version
v0.8.17+commit.8df45f5f
ZkSolc Version
v1.5.7
Optimization Enabled:
Yes with Mode 3
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./interfaces/AggregatorV3Interface.sol"; import "./interfaces/IPyth.sol"; import "./PriceFactory.sol"; import "@openzeppelin/contracts/utils/math/SafeCast.sol"; /** * @dev A Chainlink AggregatorV3-compatible wrapper on top of Pyth. * It references a single Pyth price feed (given by `pythFeedId`). */ contract ChainlinkPythOracleWrapper is AggregatorV3Interface { // ------------------ // Storage // ------------------ /// @dev Address of the Pyth contract on this chain (e.g. 0x8739d5024B5143278E2b15Bd9e7C26f6CEc658F1). IPyth public pyth; /// @dev The feed ID for Pyth. E.g. BTC/USD "0xe62df6c8b4a85fe1..." bytes32 public pythFeedId; /// @dev The movement threshold in BPS for determining "significant" price movement. E.g. 200 = 2% uint256 public movementThresholdBps; /// @dev The last aggregator round ID we assigned. uint80 public latestRoundId; /// @dev The aggregator description (e.g. "BTC/USD from Pyth"). string public aggregatorDescription; /// @dev The last stored price in Chainlink aggregator style (8 decimals). int256 public lastPrice; /// @dev The last stored EMA price (8 decimals). /// For demonstration, updated by a simple alpha factor if desired. uint256 public lastEma; /// @dev A basis point representation of alpha for the EMA. E.g. 2000 = 20%. uint256 public alphaInBps; /// @dev The last time we successfully updated from Pyth. uint256 public lastUpdateTimestamp; /// @dev The PriceFactory that deployed us. We read config from it, and call mintReward on it. PriceFactory public factory; /// @dev For storing round data in a chainlink-compatible way struct RoundData { int256 answer; uint256 startedAt; uint256 updatedAt; uint80 answeredInRound; } /// @dev roundId => RoundData mapping(uint80 => RoundData) public rounds; // ------------------ // Constructor // ------------------ constructor( address _pythAddress, bytes32 _pythFeedId, uint256 _movementThresholdBps, uint256 _alphaInBps, string memory _description, address _factory ) { pyth = IPyth(_pythAddress); pythFeedId = _pythFeedId; movementThresholdBps = _movementThresholdBps; alphaInBps = _alphaInBps; aggregatorDescription = _description; factory = PriceFactory(_factory); } // ------------------ // Chainlink AggregatorV3Interface // ------------------ function decimals() external pure override returns (uint8) { // For a typical aggregator, we return 8 decimals. return 8; } function description() external view override returns (string memory) { return aggregatorDescription; } function version() external pure override returns (uint256) { return 1; } function getRoundData(uint80 _roundId) external view override returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ) { RoundData memory r = rounds[_roundId]; require(r.updatedAt > 0, "No data present"); // If whitelisting is on and caller not whitelisted => return zero price if (factory.isWhitelistingOn() && !factory.whitelist(msg.sender)) { return (_roundId, 0, r.startedAt, r.updatedAt, r.answeredInRound); } return (_roundId, r.answer, r.startedAt, r.updatedAt, r.answeredInRound); } function latestRoundData() external view override returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ) { RoundData memory r = rounds[latestRoundId]; // If whitelisting is on and caller not whitelisted => return zero price if (factory.isWhitelistingOn() && !factory.whitelist(msg.sender)) { return (latestRoundId, 0, r.startedAt, r.updatedAt, r.answeredInRound); } return (latestRoundId, r.answer, r.startedAt, r.updatedAt, r.answeredInRound); } // ------------------ // Price Update Logic // ------------------ /** * @dev The user calls this so the contract can figure out the fee from Pyth, * require it to be provided, then call updatePriceFeeds on Pyth, * then fetch the new price from Pyth and store. * * @param updateData The serialized price update data from Pyth */ function updatePrice(bytes[] calldata updateData) external payable { // 1) Check the fee uint256 fee = pyth.getUpdateFee(updateData); require(msg.value >= fee, "Insufficient fee sent"); // 2) Call pyth.updatePriceFeeds // If the provided update is more recent than the on-chain price, it updates. pyth.updatePriceFeeds{value: fee}(updateData); // Refund leftover if sender sent more than the exact fee (use .call instead of .transfer) if (msg.value > fee) { (bool success, ) = msg.sender.call{value: (msg.value - fee)}(""); require(success, "Refund transfer failed"); } // 3) Now read the updated Pyth price // We convert it to an 8-decimal chainlink style int256 PythStructs.Price memory pythPrice = pyth.getPriceUnsafe(pythFeedId); // Convert pythPrice to chainlink (8 decimals) style // pythPrice.expo can be negative. Example: expo = -8 => price is already 8 decimals // If expo is -6, then we must scale to -8. Etc. // We'll do: finalPrice = pythPrice.price * 10^(8 - (-expo)) = pythPrice.price * 10^(expoDiff) // But must do carefully with negative. Let's define: int256 exponent = int256(pythPrice.expo); // We want a price with 8 decimals. So we want exponent to be -8 int256 exponentDiff = -8 - exponent; // how much we shift the base price by int256 scaledPrice; if (exponentDiff == 0) { scaledPrice = int256(pythPrice.price); } else if (exponentDiff > 0) { // means we need to divide // e.g. exponentDiff = 2 => we do price / 10^2 int256 divisor = int256(10 ** uint256(exponentDiff)); scaledPrice = int256(pythPrice.price) / divisor; } else { // exponentDiff < 0 => we multiply // e.g. exponentDiff = -2 => we do price * 10^2 uint256 multiplier = 10 ** uint256(-exponentDiff); scaledPrice = int256(pythPrice.price) * int256(multiplier); } // 4) Store in aggregator data structures latestRoundId += 1; uint80 thisRoundId = latestRoundId; // We'll define startedAt = block.timestamp, updatedAt = block.timestamp rounds[thisRoundId] = RoundData({ answer: scaledPrice, startedAt: block.timestamp, updatedAt: block.timestamp, answeredInRound: thisRoundId }); // Update lastPrice lastPrice = scaledPrice; // Update time uint256 oldTimestamp = lastUpdateTimestamp; lastUpdateTimestamp = block.timestamp; // Update EMA if alphaInBps > 0 // simple formula: newEma = (oldEma * (10000 - alpha) + newPrice * alpha) / 10000 if (lastEma == 0) { // first time, let's just set it to the scaledPrice if it's positive // (handle negative by taking absolute or forcing to zero, but let's just cast) if (scaledPrice > 0) { lastEma = uint256(scaledPrice); } else { lastEma = 0; } } else { uint256 absPrice = scaledPrice < 0 ? uint256(-scaledPrice) : uint256(scaledPrice); uint256 newEma = (lastEma * (10000 - alphaInBps) + absPrice * alphaInBps) / 10000; lastEma = newEma; } // 5) If rewards are on in the factory, we apply the reward logic if (factory.isRewardsOn()) { // We check how many tokens to mint uint256 rewardAmount = _calculateReward(oldTimestamp, uint256(scaledPrice)); if (rewardAmount > 0) { factory.mintReward(msg.sender, rewardAmount); } } } /** * @dev Helper to compute how many reward tokens to mint, per user specification: * - If >= 15 minutes (900 sec) have passed since last update: * reward = floor((deltaTime / 900)) + 2 if price changed > threshold, else just the base * - If < 15 min have passed: * reward = 5 if price changed > threshold, else 0 * - If last update was never set (0), treat it as no threshold check or 0-based? * We'll do a simple approach that the first update yields 0 if it's the first time. */ function _calculateReward(uint256 oldTimestamp, uint256 newPrice) internal view returns (uint256) { // If it's the very first update, lastUpdateTimestamp was 0 if (oldTimestamp == 0) { // no reward for first time return 0; } uint256 timeDiff = block.timestamp - oldTimestamp; // Compute price difference in BPS if lastPrice != 0 // lastPrice is int256; let's get oldPrice = its absolute value uint256 oldPrice = lastPrice < 0 ? uint256(-lastPrice) : uint256(lastPrice); bool significantMove = false; if (oldPrice > 0) { uint256 diff = (newPrice > oldPrice) ? (newPrice - oldPrice) : (oldPrice - newPrice); uint256 diffBps = (diff * 10000) / oldPrice; if (diffBps >= movementThresholdBps) { significantMove = true; } } // If at least 15 minutes if (timeDiff >= 900) { // 1 token for each 15 min uint256 base = timeDiff / 900; if (significantMove) { // +2 return base + 2; } else { return base; } } else { // If under 15 minutes, 5 if price changed beyond threshold, else 0 if (significantMove) { return 5; } else { return 0; } } } /** * @dev Convenience function to see how much fee we'd need to pass into `updatePrice(...)`. */ function getRequiredFee(bytes[] calldata updateData) external view returns (uint256) { return pyth.getUpdateFee(updateData); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./ChainlinkPythOracleWrapper.sol"; import "./RewardToken.sol"; import "./Ownable.sol"; contract PriceFactory is Ownable { Bonfire public rewardToken; // Mapping of feedKey => wrapper mapping(bytes32 => address) public registry; // Mapping of deployed wrappers => bool mapping(address => bool) public authorizedWrappers; bool public isWhitelistingOn; bool public isRewardsOn; uint256 public rewardRate = 1; mapping(address => bool) public whitelist; event WrapperDeployed(bytes32 indexed feedKey, address wrapperAddress); event WhitelistUpdated(address indexed user, bool status); event ToggledWhitelisting(bool status); event ToggledRewards(bool status); event RewardRateUpdated(uint256 newRate); event RewardTokenUpdated(address newToken); constructor(address payable _rewardToken) { rewardToken = Bonfire(_rewardToken); } function deployWrapper( bytes32 feedKey, address pythContract, bytes32 pythFeedId, uint256 movementThresholdBps, uint256 alphaInBps, string calldata description_ ) external onlyOwner returns (address) { require(registry[feedKey] == address(0), "Wrapper already exists for key"); ChainlinkPythOracleWrapper wrapper = new ChainlinkPythOracleWrapper( pythContract, pythFeedId, movementThresholdBps, alphaInBps, description_, address(this) ); registry[feedKey] = address(wrapper); authorizedWrappers[address(wrapper)] = true; emit WrapperDeployed(feedKey, address(wrapper)); return address(wrapper); } function setWhitelist(address user, bool status) external onlyOwner { whitelist[user] = status; emit WhitelistUpdated(user, status); } function toggleWhitelisting(bool _status) external onlyOwner { isWhitelistingOn = _status; emit ToggledWhitelisting(_status); } function toggleRewards(bool _status) external onlyOwner { isRewardsOn = _status; emit ToggledRewards(_status); } function setRewardRate(uint256 _rate) external onlyOwner { rewardRate = _rate; emit RewardRateUpdated(_rate); } function setRewardToken(address payable _rewardToken) external onlyOwner { rewardToken = Bonfire(_rewardToken); emit RewardTokenUpdated(_rewardToken); } /** * @dev Called by the wrapper to mint tokens to `to`. * Only authorized wrappers can call. */ function mintReward(address to, uint256 amount) external { require(authorizedWrappers[msg.sender], "Caller not authorized wrapper"); if (!isRewardsOn) { return; } uint256 finalAmount = amount * rewardRate; rewardToken.mint(to, finalAmount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /* Minimal IPyth interface. If you install @pythnetwork/pyth-sdk-solidity, you can import from there. */ library PythStructs { struct Price { // Price int64 price; // Confidence interval around the price uint64 conf; // Price exponent int32 expo; // Unix timestamp describing when the price was published uint publishTime; } } interface IPyth { function getPriceUnsafe(bytes32 id) external view returns (PythStructs.Price memory price); function updatePriceFeeds(bytes[] calldata updateData) external payable; function getUpdateFee(bytes[] calldata updateData) external view returns (uint); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface AggregatorV3Interface { 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 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 ); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; pragma experimental ABIEncoderV2; import "./Ownable.sol"; ////// lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) /* pragma solidity ^0.8.0; */ /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } ////// lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol // OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol) /* pragma solidity ^0.8.0; */ /* import "../IERC20.sol"; */ /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ 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) { unchecked { 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) { unchecked { 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) { unchecked { // 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) { unchecked { 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) { unchecked { 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) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return 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) { return a * b; } /** * @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. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { 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) { 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) { unchecked { 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. * * 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) { unchecked { 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) { unchecked { require(b > 0, errorMessage); return a % b; } } } interface IUniswapV2Factory { event PairCreated( address indexed token0, address indexed token1, address pair, uint256 ); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } ////// src/IUniswapV2Pair.sol /* pragma solidity 0.8.10; */ /* pragma experimental ABIEncoderV2; */ interface IUniswapV2Pair { event Approval( address indexed owner, address indexed spender, uint256 value ); event Transfer(address indexed from, address indexed to, uint256 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 (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 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 (uint256); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; event Mint(address indexed sender, uint256 amount0, uint256 amount1); event Burn( address indexed sender, uint256 amount0, uint256 amount1, address indexed to ); event Swap( address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint256); 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 (uint256); function price1CumulativeLast() external view returns (uint256); function kLast() external view returns (uint256); function mint(address to) external returns (uint256 liquidity); function burn(address to) external returns (uint256 amount0, uint256 amount1); function swap( uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data ) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } contract Bonfire is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public revShareWallet; address public teamWallet; uint256 public maxTransactionAmount; uint256 public swapTokensAtAmount; uint256 public maxWallet; bool public limitsInEffect = true; bool public tradingActive = false; bool public swapEnabled = false; bool public blacklistRenounced = false; // Anti-bot and anti-whale mapping(address => bool) blacklisted; uint256 public buyTotalFees; uint256 public buyRevShareFee; uint256 public buyLiquidityFee; uint256 public buyTeamFee; uint256 public sellTotalFees; uint256 public sellRevShareFee; uint256 public sellLiquidityFee; uint256 public sellTeamFee; uint256 public tokensForRevShare; uint256 public tokensForLiquidity; uint256 public tokensForTeam; // Exclusions from fees & max TX mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) public _isExcludedMaxTransactionAmount; // Automated Market Maker pairs mapping(address => bool) public automatedMarketMakerPairs; bool public preMigrationPhase = true; mapping(address => bool) public preMigrationTransferrable; mapping(address => bool) public approvedMinter; event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress); event ExcludeFromFees(address indexed account, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event revShareWalletUpdated(address indexed newWallet, address indexed oldWallet); event teamWalletUpdated(address indexed newWallet, address indexed oldWallet); event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity); constructor() ERC20("Bonfire", "FIRE") { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0xad1eCa41E6F772bE3cb5A48A6141f9bcc1AF9F7c ); excludeFromMaxTransaction(address(_uniswapV2Router), true); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); excludeFromMaxTransaction(address(uniswapV2Pair), true); _setAutomatedMarketMakerPair(address(uniswapV2Pair), true); uint256 _buyRevShareFee = 0; uint256 _buyLiquidityFee = 1; uint256 _buyTeamFee = 1; uint256 _sellRevShareFee = 1; uint256 _sellLiquidityFee = 1; uint256 _sellTeamFee = 3; uint256 totalSupply = 100_000_000 * 1e18; maxTransactionAmount = 1_000_000 * 1e18; // 1% maxWallet = 10_000 * 1e18; // 1% swapTokensAtAmount = (totalSupply * 5) / 10000; // 0.05% buyRevShareFee = _buyRevShareFee; buyLiquidityFee = _buyLiquidityFee; buyTeamFee = _buyTeamFee; buyTotalFees = buyRevShareFee + buyLiquidityFee + buyTeamFee; sellRevShareFee = _sellRevShareFee; sellLiquidityFee = _sellLiquidityFee; sellTeamFee = _sellTeamFee; sellTotalFees = sellRevShareFee + sellLiquidityFee + sellTeamFee; revShareWallet = address(0xA4EC345C71106Dd7e7315404DeE0B77120711C94); teamWallet = owner(); // exclude from paying fees or having max transaction excludeFromFees(owner(), true); excludeFromFees(address(this), true); excludeFromFees(address(0xdead), true); excludeFromMaxTransaction(owner(), true); excludeFromMaxTransaction(address(this), true); excludeFromMaxTransaction(address(0xdead), true); preMigrationTransferrable[owner()] = true; _mint(msg.sender, totalSupply); tradingActive = true; swapEnabled = true; preMigrationPhase = false; limitsInEffect = false; } function mint(address _to, uint _amount) public { require(msg.sender == owner() || approvedMinter[msg.sender] == true); _mint(_to, _amount); } function setMinter(address _minter, bool _bool) public onlyOwner { approvedMinter[_minter] = _bool; } receive() external payable {} function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner { _isExcludedMaxTransactionAmount[updAds] = isEx; } function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool) { require( newAmount >= (totalSupply() * 1) / 100000, "Swap amt cannot be < 0.001% total supply." ); require( newAmount <= (totalSupply() * 5) / 1000, "Swap amt cannot be > 0.5% total supply." ); swapTokensAtAmount = newAmount; return true; } // Only use if absolutely needed function updateSwapEnabled(bool enabled) external onlyOwner { swapEnabled = enabled; } function updateBuyFees( uint256 _revShareFee, uint256 _liquidityFee, uint256 _teamFee ) external onlyOwner { buyRevShareFee = _revShareFee; buyLiquidityFee = _liquidityFee; buyTeamFee = _teamFee; buyTotalFees = buyRevShareFee + buyLiquidityFee + buyTeamFee; require(buyTotalFees <= 5, "Buy fees must be <= 5."); } function updateSellFees( uint256 _revShareFee, uint256 _liquidityFee, uint256 _teamFee ) external onlyOwner { sellRevShareFee = _revShareFee; sellLiquidityFee = _liquidityFee; sellTeamFee = _teamFee; sellTotalFees = sellRevShareFee + sellLiquidityFee + sellTeamFee; require(sellTotalFees <= 5, "Sell fees must be <= 5."); } function excludeFromFees(address account, bool excluded) public onlyOwner { _isExcludedFromFees[account] = excluded; emit ExcludeFromFees(account, excluded); } function setAutomatedMarketMakerPair( address pair, bool value ) public onlyOwner { require( pair != uniswapV2Pair, "Cannot remove main pair" ); _setAutomatedMarketMakerPair(pair, value); } function _setAutomatedMarketMakerPair(address pair, bool value) private { automatedMarketMakerPairs[pair] = value; emit SetAutomatedMarketMakerPair(pair, value); } function updateRevShareWallet(address newRevShareWallet) external onlyOwner { emit revShareWalletUpdated(newRevShareWallet, revShareWallet); revShareWallet = newRevShareWallet; } function updateTeamWallet(address newWallet) external onlyOwner { emit teamWalletUpdated(newWallet, teamWallet); teamWallet = newWallet; } function isExcludedFromFees(address account) public view returns (bool) { return _isExcludedFromFees[account]; } function isBlacklisted(address account) public view returns (bool) { return blacklisted[account]; } function _transfer( address from, address to, uint256 amount ) internal override { require(from != address(0), "ERC20: xfer from zero"); require(to != address(0), "ERC20: xfer to zero"); require(!blacklisted[from], "Sender blacklisted"); require(!blacklisted[to], "Receiver blacklisted"); if (amount == 0) { super._transfer(from, to, 0); return; } if (limitsInEffect) { if ( from != owner() && to != owner() && to != address(0) && to != address(0xdead) && !swapping ) { if (!tradingActive) { require( _isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading not active." ); } // buy if ( automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to] ) { require( amount <= maxTransactionAmount, "Buy > maxTransactionAmount" ); require( amount + balanceOf(to) <= maxWallet, "Max wallet exceeded" ); } // sell else if ( automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from] ) { require( amount <= maxTransactionAmount, "Sell > maxTransactionAmount" ); } else if (!_isExcludedMaxTransactionAmount[to]) { require( amount + balanceOf(to) <= maxWallet, "Max wallet exceeded" ); } } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= swapTokensAtAmount; if ( canSwap && swapEnabled && !swapping && !automatedMarketMakerPairs[from] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to] ) { swapping = true; swapBack(); swapping = false; } bool takeFee = !swapping; if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) { takeFee = false; } uint256 fees = 0; if (takeFee) { // sell if (automatedMarketMakerPairs[to] && sellTotalFees > 0) { fees = amount.mul(sellTotalFees).div(100); tokensForLiquidity += (fees * sellLiquidityFee) / sellTotalFees; tokensForTeam += (fees * sellTeamFee) / sellTotalFees; tokensForRevShare += (fees * sellRevShareFee) / sellTotalFees; } // buy else if (automatedMarketMakerPairs[from] && buyTotalFees > 0) { fees = amount.mul(buyTotalFees).div(100); tokensForLiquidity += (fees * buyLiquidityFee) / buyTotalFees; tokensForTeam += (fees * buyTeamFee) / buyTotalFees; tokensForRevShare += (fees * buyRevShareFee) / buyTotalFees; } if (fees > 0) { super._transfer(from, address(this), fees); } amount -= fees; } super._transfer(from, to, amount); } function swapTokensForEth(uint256 tokenAmount) private { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, 0, owner(), block.timestamp ); } function swapBack() private { uint256 contractBalance = balanceOf(address(this)); uint256 totalTokensToSwap = tokensForLiquidity + tokensForRevShare + tokensForTeam; if (contractBalance == 0 || totalTokensToSwap == 0) { return; } if (contractBalance > swapTokensAtAmount * 20) { contractBalance = swapTokensAtAmount * 20; } // half for liquidity uint256 liquidityTokens = (contractBalance * tokensForLiquidity) / totalTokensToSwap / 2; uint256 amountToSwapForETH = contractBalance.sub(liquidityTokens); uint256 initialETHBalance = address(this).balance; swapTokensForEth(amountToSwapForETH); uint256 ethBalance = address(this).balance.sub(initialETHBalance); uint256 ethForRevShare = ethBalance.mul(tokensForRevShare).div( totalTokensToSwap - (tokensForLiquidity / 2) ); uint256 ethForTeam = ethBalance.mul(tokensForTeam).div( totalTokensToSwap - (tokensForLiquidity / 2) ); uint256 ethForLiquidity = ethBalance - ethForRevShare - ethForTeam; tokensForLiquidity = 0; tokensForRevShare = 0; tokensForTeam = 0; (bool success, ) = address(teamWallet).call{value: ethForTeam}(""); if (liquidityTokens > 0 && ethForLiquidity > 0) { addLiquidity(liquidityTokens, ethForLiquidity); emit SwapAndLiquify( amountToSwapForETH, ethForLiquidity, tokensForLiquidity ); } (success, ) = address(revShareWallet).call{value: address(this).balance}(""); } function withdrawStuckBonfire() external onlyOwner { uint256 balance_ = IERC20(address(this)).balanceOf(address(this)); IERC20(address(this)).transfer(msg.sender, balance_); // Replaced `payable(msg.sender).transfer(...)` (bool success, ) = payable(msg.sender).call{value: address(this).balance}(""); require(success, "Transfer failed"); } function withdrawStuckToken(address _token, address _to) external onlyOwner { require(_token != address(0), "_token cannot be 0"); uint256 _contractBalance = IERC20(_token).balanceOf(address(this)); IERC20(_token).transfer(_to, _contractBalance); } // Now uses .call for leftover ETH function withdrawStuckEth(address toAddr) external onlyOwner { (bool success, ) = toAddr.call{value: address(this).balance}(""); require(success, "Transfer failed"); } function renounceBlacklist() public onlyOwner { blacklistRenounced = true; } function blacklist(address _addr) public onlyOwner { require(!blacklistRenounced, "Team has revoked blacklist rights"); require( _addr != address(uniswapV2Pair) && _addr != address(0xad1eCa41E6F772bE3cb5A48A6141f9bcc1AF9F7c), "Cannot blacklist token's v2 router or v2 pool" ); blacklisted[_addr] = true; } function blacklistLiquidityPool(address lpAddress) public onlyOwner { require(!blacklistRenounced, "Team has revoked blacklist rights"); require( lpAddress != address(uniswapV2Pair) && lpAddress != address(0xad1eCa41E6F772bE3cb5A48A6141f9bcc1AF9F7c), "Cannot blacklist token's v2 router or v2 pool" ); blacklisted[lpAddress] = true; } function unblacklist(address _addr) public onlyOwner { blacklisted[_addr] = false; } function setPreMigrationTransferable(address _addr, bool isAuthorized) public onlyOwner { preMigrationTransferrable[_addr] = isAuthorized; excludeFromFees(_addr, isAuthorized); excludeFromMaxTransaction(_addr, isAuthorized); } }
/** * @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; } } /** * @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 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 { _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. pragma solidity ^0.8.0; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such 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. * * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing * all math on `uint256` and `int256` and then downcasting. */ library SafeCast { /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). * * Counterpart to Solidity's `uint248` operator. * * Requirements: * * - input must fit into 248 bits * * _Available since v4.7._ */ function toUint248(uint256 value) internal pure returns (uint248) { require(value <= type(uint248).max, "SafeCast: value doesn't fit in 248 bits"); return uint248(value); } /** * @dev Returns the downcasted uint240 from uint256, reverting on * overflow (when the input is greater than largest uint240). * * Counterpart to Solidity's `uint240` operator. * * Requirements: * * - input must fit into 240 bits * * _Available since v4.7._ */ function toUint240(uint256 value) internal pure returns (uint240) { require(value <= type(uint240).max, "SafeCast: value doesn't fit in 240 bits"); return uint240(value); } /** * @dev Returns the downcasted uint232 from uint256, reverting on * overflow (when the input is greater than largest uint232). * * Counterpart to Solidity's `uint232` operator. * * Requirements: * * - input must fit into 232 bits * * _Available since v4.7._ */ function toUint232(uint256 value) internal pure returns (uint232) { require(value <= type(uint232).max, "SafeCast: value doesn't fit in 232 bits"); return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits * * _Available since v4.2._ */ function toUint224(uint256 value) internal pure returns (uint224) { require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits"); return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits * * _Available since v4.7._ */ function toUint216(uint256 value) internal pure returns (uint216) { require(value <= type(uint216).max, "SafeCast: value doesn't fit in 216 bits"); return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits * * _Available since v4.7._ */ function toUint208(uint256 value) internal pure returns (uint208) { require(value <= type(uint208).max, "SafeCast: value doesn't fit in 208 bits"); return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits * * _Available since v4.7._ */ function toUint200(uint256 value) internal pure returns (uint200) { require(value <= type(uint200).max, "SafeCast: value doesn't fit in 200 bits"); return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits * * _Available since v4.7._ */ function toUint192(uint256 value) internal pure returns (uint192) { require(value <= type(uint192).max, "SafeCast: value doesn't fit in 192 bits"); return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits * * _Available since v4.7._ */ function toUint184(uint256 value) internal pure returns (uint184) { require(value <= type(uint184).max, "SafeCast: value doesn't fit in 184 bits"); return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits * * _Available since v4.7._ */ function toUint176(uint256 value) internal pure returns (uint176) { require(value <= type(uint176).max, "SafeCast: value doesn't fit in 176 bits"); return uint176(value); } /** * @dev Returns the downcasted uint168 from uint256, reverting on * overflow (when the input is greater than largest uint168). * * Counterpart to Solidity's `uint168` operator. * * Requirements: * * - input must fit into 168 bits * * _Available since v4.7._ */ function toUint168(uint256 value) internal pure returns (uint168) { require(value <= type(uint168).max, "SafeCast: value doesn't fit in 168 bits"); return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits * * _Available since v4.7._ */ function toUint160(uint256 value) internal pure returns (uint160) { require(value <= type(uint160).max, "SafeCast: value doesn't fit in 160 bits"); return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits * * _Available since v4.7._ */ function toUint152(uint256 value) internal pure returns (uint152) { require(value <= type(uint152).max, "SafeCast: value doesn't fit in 152 bits"); return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits * * _Available since v4.7._ */ function toUint144(uint256 value) internal pure returns (uint144) { require(value <= type(uint144).max, "SafeCast: value doesn't fit in 144 bits"); return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits * * _Available since v4.7._ */ function toUint136(uint256 value) internal pure returns (uint136) { require(value <= type(uint136).max, "SafeCast: value doesn't fit in 136 bits"); return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v2.5._ */ function toUint128(uint256 value) internal pure returns (uint128) { require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits"); return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits * * _Available since v4.7._ */ function toUint120(uint256 value) internal pure returns (uint120) { require(value <= type(uint120).max, "SafeCast: value doesn't fit in 120 bits"); return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits * * _Available since v4.7._ */ function toUint112(uint256 value) internal pure returns (uint112) { require(value <= type(uint112).max, "SafeCast: value doesn't fit in 112 bits"); return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits * * _Available since v4.7._ */ function toUint104(uint256 value) internal pure returns (uint104) { require(value <= type(uint104).max, "SafeCast: value doesn't fit in 104 bits"); return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits * * _Available since v4.2._ */ function toUint96(uint256 value) internal pure returns (uint96) { require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits"); return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits * * _Available since v4.7._ */ function toUint88(uint256 value) internal pure returns (uint88) { require(value <= type(uint88).max, "SafeCast: value doesn't fit in 88 bits"); return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits * * _Available since v4.7._ */ function toUint80(uint256 value) internal pure returns (uint80) { require(value <= type(uint80).max, "SafeCast: value doesn't fit in 80 bits"); return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits * * _Available since v4.7._ */ function toUint72(uint256 value) internal pure returns (uint72) { require(value <= type(uint72).max, "SafeCast: value doesn't fit in 72 bits"); return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v2.5._ */ function toUint64(uint256 value) internal pure returns (uint64) { require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits"); return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits * * _Available since v4.7._ */ function toUint56(uint256 value) internal pure returns (uint56) { require(value <= type(uint56).max, "SafeCast: value doesn't fit in 56 bits"); return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits * * _Available since v4.7._ */ function toUint48(uint256 value) internal pure returns (uint48) { require(value <= type(uint48).max, "SafeCast: value doesn't fit in 48 bits"); return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits * * _Available since v4.7._ */ function toUint40(uint256 value) internal pure returns (uint40) { require(value <= type(uint40).max, "SafeCast: value doesn't fit in 40 bits"); return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v2.5._ */ function toUint32(uint256 value) internal pure returns (uint32) { require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits"); return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits * * _Available since v4.7._ */ function toUint24(uint256 value) internal pure returns (uint24) { require(value <= type(uint24).max, "SafeCast: value doesn't fit in 24 bits"); return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v2.5._ */ function toUint16(uint256 value) internal pure returns (uint16) { require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits"); return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits * * _Available since v2.5._ */ function toUint8(uint256 value) internal pure returns (uint8) { require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits"); return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. * * _Available since v3.0._ */ function toUint256(int256 value) internal pure returns (uint256) { require(value >= 0, "SafeCast: value must be positive"); return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits * * _Available since v4.7._ */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); require(downcasted == value, "SafeCast: value doesn't fit in 248 bits"); } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits * * _Available since v4.7._ */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); require(downcasted == value, "SafeCast: value doesn't fit in 240 bits"); } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits * * _Available since v4.7._ */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); require(downcasted == value, "SafeCast: value doesn't fit in 232 bits"); } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits * * _Available since v4.7._ */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); require(downcasted == value, "SafeCast: value doesn't fit in 224 bits"); } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits * * _Available since v4.7._ */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); require(downcasted == value, "SafeCast: value doesn't fit in 216 bits"); } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits * * _Available since v4.7._ */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); require(downcasted == value, "SafeCast: value doesn't fit in 208 bits"); } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits * * _Available since v4.7._ */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); require(downcasted == value, "SafeCast: value doesn't fit in 200 bits"); } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits * * _Available since v4.7._ */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); require(downcasted == value, "SafeCast: value doesn't fit in 192 bits"); } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits * * _Available since v4.7._ */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); require(downcasted == value, "SafeCast: value doesn't fit in 184 bits"); } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits * * _Available since v4.7._ */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); require(downcasted == value, "SafeCast: value doesn't fit in 176 bits"); } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits * * _Available since v4.7._ */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); require(downcasted == value, "SafeCast: value doesn't fit in 168 bits"); } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits * * _Available since v4.7._ */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); require(downcasted == value, "SafeCast: value doesn't fit in 160 bits"); } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits * * _Available since v4.7._ */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); require(downcasted == value, "SafeCast: value doesn't fit in 152 bits"); } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits * * _Available since v4.7._ */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); require(downcasted == value, "SafeCast: value doesn't fit in 144 bits"); } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits * * _Available since v4.7._ */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); require(downcasted == value, "SafeCast: value doesn't fit in 136 bits"); } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v3.1._ */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); require(downcasted == value, "SafeCast: value doesn't fit in 128 bits"); } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits * * _Available since v4.7._ */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); require(downcasted == value, "SafeCast: value doesn't fit in 120 bits"); } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits * * _Available since v4.7._ */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); require(downcasted == value, "SafeCast: value doesn't fit in 112 bits"); } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits * * _Available since v4.7._ */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); require(downcasted == value, "SafeCast: value doesn't fit in 104 bits"); } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits * * _Available since v4.7._ */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); require(downcasted == value, "SafeCast: value doesn't fit in 96 bits"); } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits * * _Available since v4.7._ */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); require(downcasted == value, "SafeCast: value doesn't fit in 88 bits"); } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits * * _Available since v4.7._ */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); require(downcasted == value, "SafeCast: value doesn't fit in 80 bits"); } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits * * _Available since v4.7._ */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); require(downcasted == value, "SafeCast: value doesn't fit in 72 bits"); } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v3.1._ */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); require(downcasted == value, "SafeCast: value doesn't fit in 64 bits"); } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits * * _Available since v4.7._ */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); require(downcasted == value, "SafeCast: value doesn't fit in 56 bits"); } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits * * _Available since v4.7._ */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); require(downcasted == value, "SafeCast: value doesn't fit in 48 bits"); } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits * * _Available since v4.7._ */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); require(downcasted == value, "SafeCast: value doesn't fit in 40 bits"); } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v3.1._ */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); require(downcasted == value, "SafeCast: value doesn't fit in 32 bits"); } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits * * _Available since v4.7._ */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); require(downcasted == value, "SafeCast: value doesn't fit in 24 bits"); } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v3.1._ */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); require(downcasted == value, "SafeCast: value doesn't fit in 16 bits"); } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits * * _Available since v3.1._ */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); require(downcasted == value, "SafeCast: value doesn't fit in 8 bits"); } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. * * _Available since v3.0._ */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256"); return int256(value); } }
{ "optimizer": { "enabled": true, "mode": "3" }, "outputSelection": { "*": { "*": [ "abi", "metadata" ], "": [ "ast" ] } }, "detectMissingLibraries": false, "forceEVMLA": false, "enableEraVMExtensions": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_pythAddress","type":"address"},{"internalType":"bytes32","name":"_pythFeedId","type":"bytes32"},{"internalType":"uint256","name":"_movementThresholdBps","type":"uint256"},{"internalType":"uint256","name":"_alphaInBps","type":"uint256"},{"internalType":"string","name":"_description","type":"string"},{"internalType":"address","name":"_factory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"aggregatorDescription","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"alphaInBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract PriceFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"updateData","type":"bytes[]"}],"name":"getRequiredFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastEma","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPrice","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundId","outputs":[{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"movementThresholdBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pyth","outputs":[{"internalType":"contract IPyth","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pythFeedId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"","type":"uint80"}],"name":"rounds","outputs":[{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"updateData","type":"bytes[]"}],"name":"updatePrice","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
a66cd87845544800000000000000000000000000000000000000000000000000000000000000000000000000000000008739d5024b5143278e2b15bd9e7c26f6cec658f1ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace00000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000000007d000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000c4554482f55534420507974680000000000000000000000000000000000000000
Deployed Bytecode
0x0004000000000002000800000000000200000060031002700000023c05300197000300000051035500020000000103550000023c0030019d0000008004000039000000400040043f0000000100200190000800000005001d000000240000c13d000000040050008c000000470000413d000000000201043b000000e002200270000002470020009c000000490000213d000002540020009c0000000803000029000000a50000a13d000002550020009c000001340000a13d000002560020009c000001d90000613d000002570020009c000001cc0000613d000002580020009c000000470000c13d0000000001000416000000000001004b000000470000c13d0000000101000039000000800010043f0000026601000041000008ee0001042e0000000002000416000000000002004b000000470000c13d00000008080000290000001f028000390000023d022001970000008002200039000000400020043f0000001f0580018f0000023e068001980000008002600039000000350000613d000000000701034f000000007307043c0000000004340436000000000024004b000000310000c13d000000000005004b000000420000613d000000000161034f0000000303500210000000000402043300000000043401cf000000000434022f000000000101043b0000010003300089000000000131022f00000000013101cf000000000141019f0000000000120435000000c00080008c000000470000413d000000800100043d0000023f0010009c0000008c0000a13d0000000001000019000008ef00010430000002480020009c000000b40000a13d000002490020009c000001560000a13d0000024a0020009c000001e00000613d0000024b0020009c000001d10000613d0000024c0020009c000000470000c13d0000000001000416000000000001004b000000470000c13d0000000301000039000000000101041a0000026001100197000800000001001d000000000010043f0000000a01000039000000200010043f00000000010004140000023c0010009c0000023c01008041000000c00110021000000261011001c7000080100200003908ed08e80000040f0000000100200190000000470000613d000000400500043d000002620050009c0000009f0000213d000000000101043b0000008002500039000000400020043f000000000201041a00000000032504360000000102100039000000000202041a000500000003001d00000000002304350000000202100039000000000202041a0000004003500039000400000003001d000000000023043500000060025000390000000301100039000000000101041a0000026001100197000300000002001d00000000001204350000000901000039000000000201041a0000026301000041000000400b00043d00000000001b043500000000010004140000023f02200197000000040020008c000600000002001d0000021a0000c13d0000000103000031000000200030008c00000020040000390000000004034019000002480000013d000001000400043d000002400040009c000000470000213d0000001f02400039000000080020006c000000000300001900000241030080410000024102200197000000000002004b00000000050000190000024105004041000002410020009c000000000503c019000000000005004b000000470000c13d00000080024000390000000002020433000002400020009c000001710000a13d0000024501000041000000000010043f0000004101000039000000040010043f0000024601000041000008ef000104300000025b0020009c000000f90000213d0000025e0020009c000001bc0000613d0000025f0020009c000000470000c13d0000000001000416000000000001004b000000470000c13d0000000301000039000000000101041a0000026001100197000000800010043f0000026601000041000008ee0001042e0000024f0020009c0000012b0000213d000002520020009c0000015f0000613d000002530020009c000000470000c13d0000000802000029000000240020008c000000470000413d0000000002000416000000000002004b000000470000c13d0000000401100370000000000101043b000800000001001d000002600010009c000000470000213d0000000801000029000000000010043f0000000a01000039000000200010043f00000000010004140000023c0010009c0000023c01008041000000c00110021000000261011001c7000080100200003908ed08e80000040f0000000100200190000000470000613d000000400500043d000002620050009c0000009f0000213d000000000101043b0000008002500039000000400020043f000000000201041a00000000032504360000000102100039000000000202041a0000000000230435000000600450003900000040065000390000000202100039000000000202041a00000000002604350000000301100039000000000101041a00000260011001970000000000140435000000400b00043d000000000002004b000002a30000c13d0000004401b00039000002670200004100000000002104350000002401b000390000000f020000390000000000210435000002680100004100000000001b04350000000401b00039000000200200003900000000002104350000023c00b0009c0000023c0b0080410000004001b0021000000269011001c7000008ef000104300000025c0020009c000001c10000613d0000025d0020009c000000470000c13d0000000802000029000000240020008c000000470000413d0000000002000416000000000002004b000000470000c13d0000000402100370000000000602043b000002400060009c000000470000213d0000002302600039000000080020006c000000470000813d0000000402600039000000000221034f000000000202043b000700000002001d000002400020009c000000470000213d000600240060003d000000070200002900000005032002100000000602300029000000080020006c000000470000213d000000000200041a000500000002001d0000026b02000041000000800020043f0000002002000039000000840020043f000000c40c3000390000000702000029000000a40020043f000000000002004b000002b30000c13d00000005010000290000023f021001970000000001000414000000040020008c0000035a0000c13d0000000103000031000000200030008c00000020040000390000000004034019000003840000013d000002500020009c000001c60000613d000002510020009c000000470000c13d0000000001000416000000000001004b000000470000c13d0000000701000039000001d50000013d000002590020009c000001e80000613d0000025a0020009c000000470000c13d0000000802000029000000240020008c000000470000413d0000000002000416000000000002004b000000470000c13d0000000401100370000000000101043b000002600010009c000000470000213d000000000010043f0000000a01000039000000200010043f0000004002000039000000000100001908ed08ce0000040f0000000302100039000000000202041a0000000203100039000000000303041a0000000104100039000000000404041a000000000101041a000000800010043f000000a00040043f000000c00030043f0000026001200197000000e00010043f0000026a01000041000008ee0001042e0000024d0020009c0000015f0000613d0000024e0020009c000000470000c13d0000000001000416000000000001004b000000470000c13d0000000201000039000001d50000013d0000000001000416000000000001004b000000470000c13d08ed08930000040f0000000002010019000000400100043d000800000001001d08ed08710000040f000000080200002900000000012100490000023c0010009c0000023c0100804100000060011002100000023c0020009c0000023c020080410000004002200210000000000121019f000008ee0001042e0000001f0320003900000282033001970000003f033000390000028203300197000000400900043d0000000007390019000000000097004b00000000030000390000000103004039000002400070009c0000009f0000213d00000001003001900000009f0000c13d00000008030000290000008008300039000000e00300043d000000c00500043d000000a00600043d000000400070043f000800000009001d0000000007290436000700000007001d000000a0044000390000000007420019000000000087004b000000470000213d000000000002004b000000070a000029000001960000613d000000000700001900000000087a00190000000009470019000000000909043300000000009804350000002007700039000000000027004b0000018f0000413d000000080220002900000020022000390000000000020435000001200200043d000600000002001d0000023f0020009c000000470000213d0000023f01100197000000000200041a0000024202200197000000000112019f000000000010041b0000000101000039000000000061041b0000000201000039000000000051041b0000000701000039000000000031041b00000008010000290000000005010433000002400050009c0000009f0000213d0000000404000039000000000104041a000000010210019000000001031002700000007f0330618f0000001f0030008c00000000010000390000000101002039000000000012004b0000026f0000613d0000024501000041000000000010043f0000002201000039000000040010043f0000024601000041000008ef000104300000000001000416000000000001004b000000470000c13d0000000501000039000001d50000013d0000000001000416000000000001004b000000470000c13d0000000801000039000001d50000013d0000000001000416000000000001004b000000470000c13d0000000901000039000000000101041a000001e40000013d0000000001000416000000000001004b000000470000c13d0000000601000039000001d50000013d0000000001000416000000000001004b000000470000c13d0000000101000039000000000101041a000000800010043f0000026601000041000008ee0001042e0000000001000416000000000001004b000000470000c13d0000000801000039000000800010043f0000026601000041000008ee0001042e0000000001000416000000000001004b000000470000c13d000000000100041a0000023f01100197000000800010043f0000026601000041000008ee0001042e000000240030008c000000470000413d0000000402100370000000000202043b000400000002001d000002400020009c000000470000213d00000004020000290000002302200039000000080020006c000000470000813d00000004020000290000000402200039000000000221034f000000000202043b000700000002001d000002400020009c000000470000213d0000000402000029000000240320003900000007020000290000000502200210000600000003001d000500000002001d0000000002320019000000080020006c000000470000213d000000000200041a000300000002001d0000026b03000041000000800030043f0000002002000039000000840020043f0000000502000029000000c40a2000390000000702000029000000a40020043f000000000002004b0000030c0000c13d00000003010000290000023f021001970000000001000414000000040020008c000300000002001d0000038f0000c13d0000000103000031000000200030008c00000020040000390000000004034019000003b90000013d000700000005001d0000023c00b0009c0000023c0300004100000000030b401900000040033002100000023c0010009c0000023c01008041000000c001100210000000000131019f00000264011001c700020000000b001d08ed08e80000040f000000020b00002900000060031002700000023c03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057b0019000002360000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000002320000c13d000000000006004b000002430000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f00030000000103550000000100200190000003000000613d00000007050000290000001f01400039000000600110018f0000000004b10019000000000014004b00000000020000390000000102004039000002400040009c0000009f0000213d00000001002001900000009f0000c13d000700000005001d000200000004001d000000400040043f000000200030008c000000470000413d00000000020b0433000000000002004b0000000004000039000000010400c039000000000042004b000000470000c13d000000000002004b000004a00000c13d000000020200002900000007010000290000000003010433000700000002001d00000004010000290000000005010433000000050100002900000000040104330000000301000029000000000101043300000260061001970000000001020019000000080200002908ed08860000040f0000000702000029000001680000013d000000200030008c0000028f0000413d000400000003001d000500000005001d000000000040043f00000000010004140000023c0010009c0000023c01008041000000c00110021000000243011001c7000080100200003908ed08e80000040f0000000100200190000000470000613d00000005050000290000001f025000390000000502200270000000200050008c0000000002004019000000000301043b00000004010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b00000004040000390000028f0000813d000000000002041b0000000102200039000000000012004b0000028b0000413d0000001f0050008c0000042a0000a13d000500000005001d000000000040043f00000000010004140000023c0010009c0000023c01008041000000c00110021000000243011001c7000080100200003908ed08e80000040f0000000100200190000000470000613d000000200300008a0000000502300180000000000101043b000004eb0000c13d00000020030000390000000806000029000004f80000013d000300000004001d000400000003001d0000000901000039000000000201041a000002630100004100000000001b043500000000010004140000023f02200197000000040020008c000500000002001d000003d20000c13d0000000103000031000000200030008c00000020040000390000000004034019000004020000013d0000000802600069000000c406000039000000430720008a0000024108700197000000000a000019000000060b000029000002c30000013d0000001f03d00039000002820330019700000000042d00190000000000040435000000000c230019000000200bb00039000000010aa000390000000700a0006c000001210000813d000000c402c0008a00000000062604360000000002b1034f000000000502043b0000024102500197000000000382013f000000000082004b00000000020000190000024102004041000000000075004b000000000d000019000002410d008041000002410030009c00000000020dc019000000000002004b000000470000c13d0000000602500029000000000321034f000000000d03043b0000024000d0009c000000470000213d00000020052000390000000802d00069000000000025004b000000000300001900000241030020410000024102200197000002410e500197000000000f2e013f00000000002e004b000000000200001900000241020040410000024100f0009c000000000203c019000000000002004b000000470000c13d000000000351034f0000000002dc04360000028205d00198000000000e520019000002f20000613d000000000f03034f000000000c02001900000000f40f043c000000000c4c04360000000000ec004b000002ee0000c13d0000001f0cd00190000002ba0000613d000000000353034f0000000304c0021000000000050e043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f00000000003e0435000002ba0000013d0000001f0530018f0000023e06300198000000400200043d0000000004620019000004590000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000003070000c13d000004590000013d00000004030000290000000803300069000000c404000039000000430530008a0000024106500197000000000800001900000006090000290000031d0000013d0000001f02b0003900000282022001970000000003ab00190000000000030435000000000aa2001900000020099000390000000108800039000000070080006c0000020f0000813d000000c403a0008a0000000004340436000000000391034f000000000b03043b0000024103b00197000000000c63013f000000000063004b0000000003000019000002410300404100000000005b004b000000000d000019000002410d0080410000024100c0009c00000000030dc019000000000003004b000000470000c13d0000000603b00029000000000b31034f000000000b0b043b0000024000b0009c000000470000213d000000200c3000390000000803b0006900000000003c004b000000000d000019000002410d0020410000024103300197000002410ec00197000000000f3e013f00000000003e004b000000000300001900000241030040410000024100f0009c00000000030dc019000000000003004b000000470000c13d000000000dc1034f000000000aba0436000002820eb00198000000000cea00190000034c0000613d00000000030d034f000000000f0a0019000000003203043c000000000f2f04360000000000cf004b000003480000c13d0000001f03b00190000003140000613d0000000002ed034f0000000303300210000000000d0c0433000000000d3d01cf000000000d3d022f000000000202043b0000010003300089000000000232022f00000000023201cf0000000002d2019f00000000002c0435000003140000013d0000023c0010009c0000023c01008041000000c0011002100000008003c0008a0000023c0030009c0000023c030080410000006003300210000000000113019f0000026c011001c708ed08e80000040f00000060031002700000023c03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf000003730000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b0000036f0000c13d000000000006004b000003800000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f00030000000103550000000100200190000004360000613d0000001f01400039000000600110018f00000080011001bf000000400010043f000000200030008c000000470000413d000000800200043d0000000000210435000000400110021000000281011001c7000008ee0001042e0000023c0010009c0000023c01008041000000c0011002100000008003a0008a0000023c0030009c0000023c030080410000006003300210000000000113019f0000026c011001c708ed08e80000040f00000060031002700000023c03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf000003a80000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b000003a40000c13d000000000006004b000003b50000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f00030000000103550000000100200190000004420000613d0000001f01400039000000600210018f00000080012001bf000000400010043f000000200030008c000000470000413d0000000003000416000000800400043d000200000004001d000000000043004b0000046c0000813d0000026803000041000000000031043500000084032001bf00000020040000390000000000430435000000c40320003900000280040000410000000000430435000000a40220003900000015030000390000000000320435000000400110021000000269011001c7000008ef00010430000700000006001d000600000005001d0000023c00b0009c0000023c0300004100000000030b401900000040033002100000023c0010009c0000023c01008041000000c001100210000000000131019f00000264011001c700020000000b001d08ed08e80000040f000000020b00002900000060031002700000023c03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057b0019000003ef0000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000003eb0000c13d000000000006004b000003fc0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f000300000001035500000001002001900000044e0000613d000000060500002900000007060000290000001f01400039000000600110018f0000000004b10019000000000014004b00000000020000390000000102004039000002400040009c0000009f0000213d00000001002001900000009f0000c13d000700000006001d000600000005001d000200000004001d000000400040043f000000200030008c000000470000413d00000000020b0433000000000002004b0000000004000039000000010400c039000000000042004b000000470000c13d000000000002004b000005140000c13d00000002070000290000000601000029000000000301043300000007010000290000000005010433000000040100002900000000040104330000000301000029000000000101043300000260061001970000000001070019000600000007001d000000080200002908ed08860000040f0000000602000029000001680000013d000000000005004b00000000010000190000042f0000613d000000070100002900000000010104330000000302500210000002830220027f0000028302200167000000000121016f00000001035002100000000602000029000005070000013d0000001f0530018f0000023e06300198000000400200043d0000000004620019000004590000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000043d0000c13d000004590000013d0000001f0530018f0000023e06300198000000400200043d0000000004620019000004590000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000004490000c13d000004590000013d0000001f0530018f0000023e06300198000000400200043d0000000004620019000004590000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000004550000c13d000000000005004b000004660000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f000000000014043500000060013002100000023c0020009c0000023c020080410000004002200210000000000112019f000008ef000104300000026d0100004100000000001004430000000301000029000000040010044300000000010004140000023c0010009c0000023c01008041000000c0011002100000026e011001c7000080020200003908ed08e80000040f0000000100200190000008630000613d000000000101043b000000000001004b000000470000613d000000400200043d0000026f01000041000000000012043500000024012000390000000703000029000000000031043500000004042000390000002001000039000100000004001d0000000000140435000800000002001d00000044012000390000000509100029000000000003004b000005690000c13d00000000010004140000000302000029000000040020008c000005d00000613d000000080300002900000000023900490000023c0020009c0000023c0200804100000060022002100000023c0030009c0000023c030080410000004003300210000000000232019f0000023c0010009c0000023c01008041000000c001100210000000000112019f000000020000006b000005c50000c13d0000000302000029000005ca0000013d00000265020000410000000205000029000000000025043500000004025000390000000004000411000000000042043500000000020004140000000604000029000000040040008c000004d80000613d0000023c0050009c0000023c01000041000000000105401900000040011002100000023c0020009c0000023c02008041000000c002200210000000000112019f00000246011001c7000000060200002908ed08e80000040f00000060031002700000023c03300197000000200030008c000000200400003900000000040340190000001f0640018f00000020074001900000000205700029000004c40000613d000000000801034f0000000209000029000000008a08043c0000000009a90436000000000059004b000004c00000c13d000000000006004b000004d10000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f000300000001035500000001002001900000055d0000613d0000001f01400039000000600110018f00000002050000290000000001510019000002400010009c0000009f0000213d0000000004010019000000400010043f000000200030008c000000470000413d00000002010000290000000001010433000000000001004b0000000002000039000000010200c039000000000021004b000000470000c13d000000000001004b00000000030000190000000002040019000002600000c13d000002620000013d000000010320008a0000000503300270000000000431001900000020030000390000000104400039000000080600002900000000056300190000000005050433000000000051041b00000020033000390000000101100039000000000041004b000004f10000c13d0000000505000029000000000052004b000005030000813d0000000302500210000000f80220018f000002830220027f000002830220016700000000036300190000000003030433000000000223016f000000000021041b0000000101500210000000060200002900000004040000390000000103000039000000000131019f000000000014041b0000023f012001970000000902000039000000000302041a0000024203300197000000000113019f000000000012041b0000002001000039000001000010044300000120000004430000024401000041000008ee0001042e00000265020000410000000204000029000000000024043500000004024000390000000004000411000000000042043500000000020004140000000504000029000000040040008c0000054b0000613d00000002010000290000023c0010009c0000023c0100804100000040011002100000023c0020009c0000023c02008041000000c002200210000000000112019f00000246011001c7000000050200002908ed08e80000040f00000060031002700000023c03300197000000200030008c000000200400003900000000040340190000001f0640018f00000020074001900000000205700029000005380000613d000000000801034f0000000209000029000000008a08043c0000000009a90436000000000059004b000005340000c13d000000000006004b000005450000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f00030000000103550000000100200190000005b90000613d0000001f01400039000000600110018f0000000201100029000002400010009c0000009f0000213d0000000007010019000000400010043f000000200030008c000000470000413d00000002010000290000000001010433000000000001004b0000000002000039000000010200c039000000000021004b000000470000c13d000000000001004b00000000030000190000041b0000c13d0000041d0000013d0000001f0530018f0000023e06300198000000400200043d0000000004620019000004590000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000005640000c13d000004590000013d0000000402000029000500000000003500000000042000790000000203000367000000430440008a0000024105400197000000000700001900000006080000290000057b0000013d0000001f02a000390000028202200197000000000a9a001900000000000a0435000000000992001900000020088000390000000107700039000000070070006c0000048b0000813d000000080a90006a000000440aa0008a0000000001a10436000000000a83034f000000000a0a043b000002410ba00197000000000c5b013f00000000005b004b000000000b000019000002410b00404100000000004a004b000000000d000019000002410d0080410000024100c0009c000000000b0dc01900000000000b004b000000470000c13d000000060ba00029000000000ab3034f000000000a0a043b0000024000a0009c000000470000213d000000200bb00039000000050ca000690000000000cb004b000000000d000019000002410d002041000002410cc00197000002410eb00197000000000fce013f0000000000ce004b000000000c000019000002410c0040410000024100f0009c000000000c0dc01900000000000c004b000000470000c13d000000000cb3034f0000000009a90436000002820da00198000000000bd90019000005ab0000613d000000000e0c034f000000000f09001900000000e20e043c000000000f2f04360000000000bf004b000005a70000c13d0000001f0ea00190000005720000613d0000000002dc034f000000030ce00210000000000d0b0433000000000dcd01cf000000000dcd022f000000000202043b000001000cc000890000000002c2022f0000000002c201cf0000000002d2019f00000000002b0435000005720000013d0000001f0530018f0000023e06300198000000400200043d0000000004620019000004590000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000005c00000c13d000004590000013d00000270011001c7000080090200003900000002030000290000000304000029000000000500001908ed08e30000040f000300000001035500000060031002700001023c0030019d0000000100200190000005df0000613d0000000801000029000002400010009c0000009f0000213d0000000801000029000000400010043f0000000001000416000000020310006c000006270000a13d00000000010004140000000004000411000000040040008c000005ec0000c13d00000001020000390000000101000031000005f90000013d0000023c033001970000001f0530018f0000023e06300198000000400200043d0000000004620019000004590000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000005e70000c13d000004590000013d0000023c0010009c0000023c01008041000000c00110021000000270011001c70000800902000039000000000500001908ed08e30000040f000300000001035500000060011002700001023c0010019d0000023c01100197000000400300043d000800000003001d000000000001004b000006230000613d0000001f0410003900000282044001970000003f0440003900000282054001970000000804500029000000000054004b00000000050000390000000105004039000002400040009c0000009f0000213d00000001005001900000009f0000c13d000000400040043f0000000804000029000000000614043600000282031001980000001f0410018f00000000013600190000000305000367000006140000613d000000000705034f000000007807043c0000000006860436000000000016004b000006100000c13d000000000004004b000006210000613d000000000335034f0000000304400210000000000501043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f0000000000310435000000400100043d000800000001001d0000000801000029000100040010003d00000001002001900000070e0000613d0000000101000039000700000001001d000000000101041a000000000200041a0000027203000041000000080400002900000000003404350000000103000029000000000013043500000000010004140000023f02200197000000040020008c000006390000c13d0000000103000031000000800030008c00000080040000390000000004034019000006640000013d0000000803000029000800000003001d0000023c0030009c0000023c0300804100000040033002100000023c0010009c0000023c01008041000000c001100210000000000131019f00000246011001c708ed08e80000040f00000060031002700000023c03300197000000800030008c000000800400003900000000040340190000001f0640018f000000e0074001900000000805700029000006530000613d000000000801034f0000000809000029000000008a08043c0000000009a90436000000000059004b0000064f0000c13d000000000006004b000006600000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f000300000001035500000001002001900000071f0000613d0000001f01400039000001e00110018f0000000802100029000000000012004b00000000010000390000000101004039000002400020009c0000009f0000213d00000001001001900000009f0000c13d000000400020043f000000800030008c000000470000413d000002620020009c0000009f0000213d0000008001200039000000400010043f000000080100002900000000010104330000027300100198000002740300004100000000030060190000027504100197000000000343019f000000000031004b000000470000c13d0000000003120436000000080400002900000020044000390000000004040433000002400040009c000000470000213d00000000004304350000000803000029000000400330003900000000030304330000027600300198000002770400004100000000040060190000027805300197000000000454019f000000000043004b000000470000c13d0000004004200039000000000034043500000060022000390000000804000029000000600440003900000000040404330000000000420435000000080230003a0000072b0000c13d000800000001001d0000000301000039000000000201041a0000026003200197000002600030009c0000074e0000613d00000279032001970000000102200039000602600020019b00000006023001af000000000021041b000000400100043d000700000001001d000002620010009c0000009f0000213d00000007020000290000008001200039000000400010043f00000008010000290000000001120436000500000001001d0000027a01000041000000000010044300000000010004140000023c0010009c0000023c01008041000000c0011002100000027b011001c70000800b0200003908ed08e80000040f0000000100200190000008630000613d000000000201043b000000070100002900000060041000390000000603000029000300000004001d00000000003404350000004001100039000200000001001d00000000002104350000000501000029000400000002001d0000000000210435000000000030043f0000000a01000039000000200010043f00000000010004140000023c0010009c0000023c01008041000000c00110021000000261011001c7000080100200003908ed08e80000040f0000000100200190000000470000613d00000007020000290000000002020433000000000101043b000000000021041b000000050200002900000000020204330000000103100039000000000023041b000000020200002900000000020204330000000203100039000000000023041b0000000302000029000000000202043300000260022001970000000301100039000000000301041a0000027903300197000000000223019f000000000021041b00000005020000390000000801000029000500000002001d000000000012041b0000000801000039000000000201041a000600000002001d0000000402000029000000000021041b0000000601000039000000000201041a000000000002004b000007910000c13d0000000805000029000000000005004b000000000200001900000241020020410000024103500197000000000003004b00000000040000190000024104004041000002410030009c000000000402c019000000000004004b0000000002000019000000000205c019000000000021041b0000000901000039000000000201041a000000400300043d0000027d01000041000700000003001d000000000013043500000000010004140000023f02200197000400000002001d000000040020008c000007ad0000c13d0000000104000031000000200040008c0000002004008039000007d80000013d0000026801000041000000080300002900000000001304350000002001000039000000010200002900000000001204350000004401300039000002710200004100000000002104350000002401300039000000160200003900000000002104350000023c0030009c0000023c03008041000000400130021000000269011001c7000008ef000104300000001f0530018f0000023e06300198000000400200043d0000000004620019000004590000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000007260000c13d000004590000013d000002840030009c0000000005000019000002410500404100000241063001970000024107600167000002410060009c00000000060000190000024106002041000002410070009c000000000605c019000000000006004b0000074b0000613d00000284033000990000004d0030008c0000074e0000213d0000000a040000390000000102000039000000010030019000000000054400a9000000010400603900000000022400a9000000010330027200000000040500190000073c0000c13d000000000002004b0000077f0000c13d0000024501000041000000000010043f0000001201000039000000040010043f0000024601000041000008ef00010430000000460330008a000002850030009c000007540000213d0000024501000041000000000010043f0000001101000039000000040010043f0000024601000041000008ef00010430000000000002004b000800000001001d000007670000613d0000000a030000390000000105000039000000010020019000000000043300a9000000010300603900000000055300a900000001022002720000000003040019000007590000c13d000700000005001d00080000001500ad000002410010009c000007670000413d0000000702000029000002410020009c0000074e0000613d000000000001004b000006990000613d000002830010009c0000076f0000c13d00000241020000410000000803000029000002410030009c0000077c0000613d000002412110012c000002410220c0990000000803000029000002414330012c000000000113013f000002410440c09900000000022400d9000000ff011002120000000003210049000000000113019f0000000001026019000000000002004b000000000201c019000000070020006b000006990000613d0000074e0000013d000002410010009c000007830000c13d000002830020009c0000074e0000613d000002413220012c000002410330c099000002414110012c000000000121013f000002410440c09900000000033400d9000000ff011002120000000002310049000000000112019f0000000001036019000000000003004b000000000301c019000800000003001d000006990000013d00000008030000290000027c0030009c000007990000a13d0000000803000029000002410030009c0000074e0000613d000000080300002900000000033000890000000704000039000000000504041a000027100050008c0000074e0000213d000027100650008900000000042600a900000000022400d9000000000062004b0000074e0000c13d00000000023500a9000000000003004b000007a80000613d00000000033200d9000000000053004b0000074e0000c13d000000000024001a0000074e0000413d0000000002240019000027100220011a000006fe0000013d00000007020000290000023c0020009c0000023c0200804100000040022002100000023c0010009c0000023c01008041000000c001100210000000000121019f00000264011001c7000000040200002908ed08e80000040f00000060031002700000023c03300197000000200030008c000000200400003900000000040340190000001f0640018f00000020074001900000000705700029000007c70000613d000000000801034f0000000709000029000000008a08043c0000000009a90436000000000059004b000007c30000c13d000000000006004b000007d40000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000100000003001f00030000000103550000000100200190000008050000613d0000001f01400039000000600210018f0000000701200029000000000021004b00000000020000390000000102004039000002400010009c0000009f0000213d00000001002001900000009f0000c13d000000400010043f000000200040008c000000470000413d00000007010000290000000001010433000000000001004b0000000002000039000000010200c039000000000021004b000000470000c13d000000000001004b000008250000613d000000060000006b000008250000613d0000027a01000041000000000010044300000000010004140000023c0010009c0000023c01008041000000c0011002100000027b011001c70000800b0200003908ed08e80000040f0000000100200190000008630000613d000000000101043b000000060110006c0000074e0000413d0000000502000039000000000202041a0000027c0020009c000008110000213d000000000002004b000008140000c13d000008230000013d0000001f0530018f0000023e06300198000000400200043d0000000004620019000004590000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000080c0000c13d000004590000013d000002410020009c0000074e0000613d0000000002200089000000080320006a0000000804200069000000080020006c000000000403801900002710034000c9000000000004004b0000081e0000613d00000000044300d9000027100040008c0000074e0000c13d00000000022300d90000000203000039000000000303041a000000000032004b000008290000813d000003840010008c000008270000813d0000000001000019000008ee0001042e000003840110011a0000082d0000013d000003840010008c0000082e0000413d000003840110011a0000000201100039000500000001001d0000026d0100004100000000001004430000000401000029000000040010044300000000010004140000023c0010009c0000023c01008041000000c0011002100000026e011001c7000080020200003908ed08e80000040f0000000100200190000008630000613d000000000101043b000000000001004b000000470000613d000000400300043d0000002401300039000000050200002900000000002104350000027e010000410000000000130435000800000003001d00000004013000390000000002000411000000000021043500000000010004140000000402000029000000040020008c0000085c0000613d00000008020000290000023c0020009c0000023c0200804100000040022002100000023c0010009c0000023c01008041000000c001100210000000000121019f0000027f011001c7000000040200002908ed08e30000040f00000060031002700001023c0030019d00030000000103550000000100200190000008640000613d0000000801000029000002400010009c0000009f0000213d0000000801000029000000400010043f0000000001000019000008ee0001042e000000000001042f0000023c033001970000001f0530018f0000023e06300198000000400200043d0000000004620019000004590000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000086c0000c13d000004590000013d00000020030000390000000004310436000000003202043400000000002404350000004001100039000000000002004b000008800000613d000000000400001900000000054100190000000006430019000000000606043300000000006504350000002004400039000000000024004b000008790000413d000000000321001900000000000304350000001f0220003900000282022001970000000001210019000000000001042d00000260066001970000008007100039000000000067043500000060061000390000000000560435000000400510003900000000004504350000002004100039000000000034043500000260022001970000000000210435000000a001100039000000000001042d0000000405000039000000000405041a000000010640019000000001024002700000007f0220618f0000001f0020008c00000000010000390000000101002039000000000016004b000008c10000c13d000000400100043d0000000003210436000000000006004b000008ae0000613d000000000050043f000000000002004b000008b40000613d000002860500004100000000040000190000000006430019000000000705041a000000000076043500000001055000390000002004400039000000000024004b000008a60000413d000008b50000013d00000287044001970000000000430435000000000002004b00000020040000390000000004006039000008b50000013d00000000040000190000003f0240003900000282032001970000000002130019000000000032004b00000000030000390000000103004039000002400020009c000008c70000213d0000000100300190000008c70000c13d000000400020043f000000000001042d0000024501000041000000000010043f0000002201000039000000040010043f0000024601000041000008ef000104300000024501000041000000000010043f0000004101000039000000040010043f0000024601000041000008ef00010430000000000001042f0000023c0010009c0000023c0100804100000040011002100000023c0020009c0000023c020080410000006002200210000000000112019f00000000020004140000023c0020009c0000023c02008041000000c002200210000000000112019f00000270011001c7000080100200003908ed08e80000040f0000000100200190000008e10000613d000000000101043b000000000001042d0000000001000019000008ef00010430000008e6002104210000000102000039000000000001042d0000000002000019000000000001042d000008eb002104230000000102000039000000000001042d0000000002000019000000000001042d000008ed00000432000008ee0001042e000008ef0001043000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000000ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffff8000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000020000000000000000000000000000000000002000000000000000000000000000000002000000000000000000000000000000400000010000000000000000004e487b71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000000000000000000007284e41500000000000000000000000000000000000000000000000000000000cff23b2b00000000000000000000000000000000000000000000000000000000f98d06ef00000000000000000000000000000000000000000000000000000000f98d06f000000000000000000000000000000000000000000000000000000000fa20ade100000000000000000000000000000000000000000000000000000000feaf968c00000000000000000000000000000000000000000000000000000000cff23b2c00000000000000000000000000000000000000000000000000000000d107169600000000000000000000000000000000000000000000000000000000c45a015400000000000000000000000000000000000000000000000000000000c45a015500000000000000000000000000000000000000000000000000000000ceb41b94000000000000000000000000000000000000000000000000000000007284e416000000000000000000000000000000000000000000000000000000009a6fc8f5000000000000000000000000000000000000000000000000000000002592c0be00000000000000000000000000000000000000000000000000000000313ce56600000000000000000000000000000000000000000000000000000000313ce56700000000000000000000000000000000000000000000000000000000342f506c0000000000000000000000000000000000000000000000000000000054fd4d50000000000000000000000000000000000000000000000000000000002592c0bf000000000000000000000000000000000000000000000000000000002ede662f0000000000000000000000000000000000000000000000000000000014bcec9e0000000000000000000000000000000000000000000000000000000014bcec9f0000000000000000000000000000000000000000000000000000000024cdf55600000000000000000000000000000000000000000000000000000000053f14da0000000000000000000000000000000000000000000000000000000011a8f41300000000000000000000000000000000000000000000ffffffffffffffffffff0200000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff7f8298c22a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000009b19251a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000008000000000000000004e6f20646174612070726573656e74000000000000000000000000000000000008c379a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000080000000800000000000000000d47eed450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000ef9e5e28000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000526566756e64207472616e73666572206661696c65640000000000000000000096834ad3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000000000000007fffffffffffffff0000000000000000000000000000000000000000000000000000000080000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff80000000000000000000000000000000000000000000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000796b89b91644bc98cd93958e4c9038275d622183e25ac5af08cc6b5d9553913202000002000000000000000000000000000000040000000000000000000000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc909a409000000000000000000000000000000000000000000000000000000009a49090e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044000000000000000000000000496e73756666696369656e74206665652073656e7400000000000000000000000000000000000000000000000000000000000020000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb18a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00d8dfecfaacf6f9c1e49af00c4d177791ebf95a8dcc2c9403875065503c76b6c1
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008739d5024b5143278e2b15bd9e7c26f6cec658f1ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace00000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000000007d000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000003c8351d78bae36aac0e92e3708567d779d54d80f000000000000000000000000000000000000000000000000000000000000000c4554482f55534420507974680000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _pythAddress (address): 0x8739d5024B5143278E2b15Bd9e7C26f6CEc658F1
Arg [1] : _pythFeedId (bytes32): 0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace
Arg [2] : _movementThresholdBps (uint256): 200
Arg [3] : _alphaInBps (uint256): 2000
Arg [4] : _description (string): ETH/USD Pyth
Arg [5] : _factory (address): 0x3C8351d78bae36AaC0e92e3708567D779d54d80F
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000008739d5024b5143278e2b15bd9e7c26f6cec658f1
Arg [1] : ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c8
Arg [3] : 00000000000000000000000000000000000000000000000000000000000007d0
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [5] : 0000000000000000000000003c8351d78bae36aac0e92e3708567d779d54d80f
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [7] : 4554482f55534420507974680000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.