Address Details
contract
token
0x00400FcbF0816bebB94654259de7273f4A05c762
- Token
- PoofCash (POOF)
- Creator
- 0x60483a–b00fa2 at 0x0caeb7–577ed8
- Balance
- 0 CELO ( )
- Locked CELO Balance
- 0.00 CELO
- Voting CELO Balance
- 0.00 CELO
- Pending Unlocked Gold
- 0.00 CELO
- Tokens
-
Fetching tokens...
- Transactions
- 4,535 Transactions
- Transfers
- 5 Transfers
- Gas Used
- 168,965,730
- Last Balance Update
- 28906738
Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- POOF
- Optimization enabled
- true
- Compiler version
- v0.8.3+commit.8d00100c
- Optimization runs
- 200
- EVM Version
- istanbul
- Verified at
- 2021-08-21T23:39:12.643393Z
/private/tmp/poof-deploy/poof-token/contracts/POOF.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@ubeswap/governance/contracts/voting/TransferrableVotingToken.sol"; import "./NomResolve.sol"; contract POOF is TransferrableVotingToken, NomResolve { using SafeMath for uint256; using SafeERC20 for IERC20; /// @notice The maximum supply of Ube Tokens. uint96 public constant MAX_SUPPLY = 100_000_000e18; struct Recipient { bytes32 to; uint256 amount; } /** * @notice Construct a new POOF token * Note: this contract doesn't specify an initial minter, so there is no way new * tokens can get created. */ constructor( Recipient[] memory recipients ) TransferrableVotingToken("PoofCash", "POOF", 18, 0, address(this)) { uint256 total = 0; for(uint i = 0; i < recipients.length; i++) { address resolution = resolve(recipients[i].to); total = total.add(recipients[i].amount); _mintVotes(resolution, uint96(recipients[i].amount)); } require(total == MAX_SUPPLY, "Should not have remaining POOF in the token contract"); } }
/@nomspace/nomspace/contracts/interfaces/INom.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // NOTE: Name == Nom in the documentation and is used interchangeably interface INom { // @dev Reserve a Nom for a duration of time // @param name The name to reserve // @param durationToReserve The length of time in seconds to reserve this name function reserve(bytes32 name, uint256 durationToReserve) external; // @dev Extend a Nom reservation // @param name The name to extend the reservation of // @param durationToExtend The length of time in seconds to extend function extend(bytes32 name, uint256 durationToExtend) external; // @dev Retrieve the address that a Nom points to // @param name The name to resolve // @returns resolution The address that the Nom points to function resolve(bytes32 name) external view returns (address resolution); // @dev Get the expiration timestamp of a Nom // @param name The name to get the expiration of // @returns expiration Time in seconds from epoch that this Nom expires function expirations(bytes32 name) external view returns (uint256 expiration); // @dev Change the resolution of a Nom // @param name The name to change the resolution of // @param newResolution The new address that should be pointed to function changeResolution(bytes32 name, address newResolution) external; // @dev Retrieve the owner of a Nom // @param name The name to find the owner of // @returns owner The address that owns the Nom function nameOwner(bytes32 name) external view returns (address owner); // @dev Change the owner of a Nom // @param name The name to change the owner of // @param newOwner The new owner function changeNameOwner(bytes32 name, address newOwner) external; // @dev Check whether a Nom is expired // @param name The name to check the expiration of // @param expired Flag indicating whether this Nom is expired function isExpired(bytes32 name) external view returns (bool expired); }
/@openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
/@openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/@openzeppelin/contracts/utils/math/SafeMath.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. 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. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * 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; } } }
/@ubeswap/governance/contracts/interfaces/IHasVotes.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; /** * Reads the votes that an account has. */ interface IHasVotes { /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint96); /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96); }
/@ubeswap/governance/contracts/interfaces/INonTransferrableToken.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; /** * A token that cannot be transferred. */ interface INonTransferrableToken { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); // Views function totalSupply() external view returns (uint256); function balanceOf(address _account) external view returns (uint256); }
/@ubeswap/governance/contracts/interfaces/IVotingDelegates.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; /** * Interface for a contract that keeps track of voting delegates. */ interface IVotingDelegates { /// @notice An event thats emitted when an account changes its delegate event DelegateChanged( address indexed delegator, address indexed fromDelegate, address indexed toDelegate ); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged( address indexed delegate, uint256 previousBalance, uint256 newBalance ); /// @notice An event emitted when an account's voting power is transferred. // - If `from` is `address(0)`, power was minted. // - If `to` is `address(0)`, power was burned. event Transfer(address indexed from, address indexed to, uint256 amount); /// @notice Name of the contract. // Required for signing. function name() external view returns (string memory); /// @notice A record of each accounts delegate function delegates(address delegatee) external view returns (address); /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) external; /** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig( address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) external; /** * @notice Get the amount of voting power of an account * @param account The address of the account to get the balance of * @return The amount of voting power held */ function votingPower(address account) external view returns (uint96); /// @notice Total voting power in existence. function totalVotingPower() external view returns (uint96); }
/@ubeswap/governance/contracts/voting/TransferrableVotingToken.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; import "./VotingToken.sol"; contract TransferrableVotingToken is VotingToken { /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. * @param initialSupply_ Initial supply of tokens * @param account_ The initial account to grant all the tokens */ constructor( string memory name_, string memory symbol_, uint8 decimals_, uint96 initialSupply_, address account_ ) VotingToken(name_, symbol_, decimals_) { _mintVotes(account_, initialSupply_); } //////////////////////////////// // // The below code is copied from Uniswap's Uni.sol. // Changes are marked with "XXX". // //////////////////////////////// // XXX: deleted name, symbol, decimals, totalSupply, minter, mintingAllowedAfter, // minimumTimeBetweenMints, mintCap // Allowance amounts on behalf of others mapping (address => mapping (address => uint96)) internal allowances; // XXX: balances, delegates, Checkpoint, checkpoints, // numCheckpoints, DOMAIN_TYPEHASH, DELEGATION_TYPEHASH // are inherited from VotingPower.sol /// @notice The EIP-712 typehash for the permit struct used by the contract bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); // XXX: nonces is inherited from VotingPower.sol // XXX: deleted MinterChanged // XXX: deleted DelegateChanged, DelegateVotesChanged, Transfer and moved them to IVotingPower /// @notice The standard EIP-20 approval event event Approval(address indexed owner, address indexed spender, uint256 amount); // XXX: deleted constructor, setMinter, mint /** * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` * @param account The address of the account holding the funds * @param spender The address of the account spending the funds * @return The number of tokens approved */ function allowance(address account, address spender) external view returns (uint) { return allowances[account][spender]; } // XXX_ADDED: upgrade to Solidity 0.8.3, which doesn't allow use of uintn(-1) uint256 internal constant MAX_INT = 2**256 - 1; uint96 internal constant MAX_INT_96 = 2**96 - 1; /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint rawAmount) external returns (bool) { uint96 amount; // XXX: uint256(-1) => MAX_INT if (rawAmount == MAX_INT) { // XXX: uint96(-1) => MAX_INT_96 amount = MAX_INT_96; } else { amount = safe96(rawAmount, "Uni::approve: amount exceeds 96 bits"); } allowances[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } /** * @notice Triggers an approval from owner to spends * @param owner The address to approve from * @param spender The address to be approved * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @param deadline The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function permit(address owner, address spender, uint rawAmount, uint deadline, uint8 v, bytes32 r, bytes32 s) external { uint96 amount; // XXX: uint256(-1) => MAX_INT if (rawAmount == MAX_INT) { // XXX: uint96(-1) => MAX_INT_oy amount = MAX_INT_96; } else { amount = safe96(rawAmount, "Uni::permit: amount exceeds 96 bits"); } // XXX_CHANGED: name => name() bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, rawAmount, nonces[owner]++, deadline)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "Uni::permit: invalid signature"); require(signatory == owner, "Uni::permit: unauthorized"); // XXX: added linter disable // solhint-disable-next-line not-rely-on-time require(block.timestamp <= deadline, "Uni::permit: signature expired"); allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } // XXX: deleted balanceOf /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint rawAmount) external returns (bool) { // XXX_ADDED require( dst != address(this), "TransferrableVotingToken::transfer: cannot send tokens to contract" ); uint96 amount = safe96(rawAmount, "Uni::transfer: amount exceeds 96 bits"); _transferTokens(msg.sender, dst, amount); return true; } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint rawAmount) external returns (bool) { // XXX_ADDED require( dst != address(this), "TransferrableVotingToken::transferFrom: cannot send tokens to contract" ); address spender = msg.sender; uint96 spenderAllowance = allowances[src][spender]; uint96 amount = safe96(rawAmount, "Uni::approve: amount exceeds 96 bits"); // XXX: uint96(-1) => MAX_INT_96 if (spender != src && spenderAllowance != MAX_INT_96) { uint96 newAllowance = sub96(spenderAllowance, amount, "Uni::transferFrom: transfer amount exceeds spender allowance"); allowances[src][spender] = newAllowance; emit Approval(src, spender, newAllowance); } _transferTokens(src, dst, amount); return true; } // XXX: rest is in VotingPower.sol }
/@ubeswap/governance/contracts/voting/VotingPower.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; import "../interfaces/IHasVotes.sol"; import "../interfaces/IVotingDelegates.sol"; /** * Power to vote. Heavily based on Uni. */ contract VotingPower is IHasVotes, IVotingDelegates { // Name of the token. This cannot be changed after creating the token. string private _name; // Total amount of voting power available. uint96 private totalVotingPowerSupply; constructor(string memory name_) { _name = name_; } function name() public view virtual override returns (string memory) { return _name; } /** * @notice Mint new voting power * @param dst The address of the destination account * @param amount The amount of voting power to be minted */ function _mintVotes(address dst, uint96 amount) internal { require(dst != address(0), "VotingPower::_mintVotes: cannot mint to the zero address"); // transfer the amount to the recipient balances[dst] = add96(balances[dst], amount, "VotingPower::_mintVotes: mint amount overflows"); totalVotingPowerSupply = add96( totalVotingPowerSupply, amount, "VotingPower::_mintVotes: total supply overflows" ); emit Transfer(address(0), dst, amount); // move delegates _moveDelegates(address(0), delegates[dst], amount); } /** * @notice Burn voting power * @param src The address of the source account * @param amount The amount of voting power to be burned */ function _burnVotes(address src, uint96 amount) internal { require(src != address(0), "VotingPower::_burnVotes: cannot burn from the zero address"); // transfer the amount to the recipient balances[src] = sub96(balances[src], amount, "VotingPower::_burnVotes: burn amount underflows"); totalVotingPowerSupply = sub96( totalVotingPowerSupply, amount, "VotingPower::_burnVotes: total supply underflows" ); emit Transfer(src, address(0), amount); // move delegates _moveDelegates(delegates[src], address(0), amount); } /** * @notice Get the amount of voting power of an account * @param account The address of the account to get the balance of * @return The amount of voting power held */ function votingPower(address account) public view override returns (uint96) { return balances[account]; } function totalVotingPower() public view override returns (uint96) { return totalVotingPowerSupply; } //////////////////////////////// // // The below code is copied from ../uniswap-governance/contracts/Uni.sol. // Changes are marked with "XXX". // //////////////////////////////// // XXX: deleted name, symbol, decimals, totalSupply, minter, mintingAllowedAfter, // minimumTimeBetweenMints, mintCap, allowances // Official record of token balances for each account // XXX: internal => private visibility mapping (address => uint96) private balances; /// @notice A record of each accounts delegate mapping (address => address) public override delegates; /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint96 votes; } /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); // XXX: deleted PERMIT_TYPEHASH /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; // XXX: deleted MinterChanged // XXX: deleted DelegateChanged, DelegateVotesChanged, Transfer and moved them to IVotingPower // XXX: deleted Approval // XXX: deleted constructor, setMinter, mint, allowance, approve, permit, balanceOf // XXX: deleted transfer, transferFrom /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) public override { return _delegate(msg.sender, delegatee); } /** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public override { // XXX_CHANGED: name => _name bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(_name)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "Uni::delegateBySig: invalid signature"); require(nonce == nonces[signatory]++, "Uni::delegateBySig: invalid nonce"); // XXX: added linter disable // solhint-disable-next-line not-rely-on-time require(block.timestamp <= expiry, "Uni::delegateBySig: signature expired"); return _delegate(signatory, delegatee); } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view override returns (uint96) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber) public view override returns (uint96) { require(blockNumber < block.number, "Uni::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First check most recent balance if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { return checkpoints[account][nCheckpoints - 1].votes; } // Next check implicit zero balance if (checkpoints[account][0].fromBlock > blockNumber) { return 0; } uint32 lower = 0; uint32 upper = nCheckpoints - 1; while (upper > lower) { uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow Checkpoint memory cp = checkpoints[account][center]; if (cp.fromBlock == blockNumber) { return cp.votes; } else if (cp.fromBlock < blockNumber) { lower = center; } else { upper = center - 1; } } return checkpoints[account][lower].votes; } function _delegate(address delegator, address delegatee) internal { address currentDelegate = delegates[delegator]; uint96 delegatorBalance = balances[delegator]; delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveDelegates(currentDelegate, delegatee, delegatorBalance); } function _transferTokens(address src, address dst, uint96 amount) internal { require(src != address(0), "Uni::_transferTokens: cannot transfer from the zero address"); require(dst != address(0), "Uni::_transferTokens: cannot transfer to the zero address"); balances[src] = sub96(balances[src], amount, "Uni::_transferTokens: transfer amount exceeds balance"); balances[dst] = add96(balances[dst], amount, "Uni::_transferTokens: transfer amount overflows"); emit Transfer(src, dst, amount); _moveDelegates(delegates[src], delegates[dst], amount); } function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal { if (srcRep != dstRep && amount > 0) { if (srcRep != address(0)) { uint32 srcRepNum = numCheckpoints[srcRep]; uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; uint96 srcRepNew = sub96(srcRepOld, amount, "Uni::_moveVotes: vote amount underflows"); _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); } if (dstRep != address(0)) { uint32 dstRepNum = numCheckpoints[dstRep]; uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; uint96 dstRepNew = add96(dstRepOld, amount, "Uni::_moveVotes: vote amount overflows"); _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); } } } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { uint32 blockNumber = safe32(block.number, "Uni::_writeCheckpoint: block number exceeds 32 bits"); if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; } else { checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); numCheckpoints[delegatee] = nCheckpoints + 1; } emit DelegateVotesChanged(delegatee, oldVotes, newVotes); } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { require(n < 2**32, errorMessage); return uint32(n); } function safe96(uint n, string memory errorMessage) internal pure returns (uint96) { require(n < 2**96, errorMessage); return uint96(n); } function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { uint96 c = a + b; require(c >= a, errorMessage); return c; } function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { require(b <= a, errorMessage); return a - b; } function getChainId() internal view returns (uint) { uint256 chainId; // XXX: added linter disable // solhint-disable-next-line no-inline-assembly assembly { chainId := chainid() } return chainId; } }
/@ubeswap/governance/contracts/voting/VotingToken.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; import "../interfaces/INonTransferrableToken.sol"; import "./VotingPower.sol"; /** * A non-transferrable token that can vote. */ contract VotingToken is INonTransferrableToken, VotingPower { string private _symbol; uint8 private immutable _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ constructor( string memory name_, string memory symbol_, uint8 decimals_ ) VotingPower(name_) { _symbol = symbol_; _decimals = decimals_; } function name() public view override(INonTransferrableToken, VotingPower) returns (string memory) { return VotingPower.name(); } function symbol() public view override returns (string memory) { return _symbol; } function decimals() public view override returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return totalVotingPower(); } function balanceOf(address _account) public view override returns (uint256) { return votingPower(_account); } }
/private/tmp/poof-deploy/poof-token/contracts/NomResolve.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@nomspace/nomspace/contracts/interfaces/INom.sol"; contract NomResolve { function resolve(bytes32 name) public view virtual returns (address) { INom nom = INom( computeChainId() == 42220 ? 0xABf8faBbC071F320F222A526A2e1fBE26429344d : 0x36C976Da6A6499Cad683064F849afa69CD4dec2e ); return nom.resolve(name); } function computeChainId() internal view returns (uint256) { uint256 chainId; assembly { chainId := chainid() } return chainId; } }
Compiler Settings
{"remappings":[],"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"istanbul","compilationTarget":{"/private/tmp/poof-deploy/poof-token/contracts/POOF.sol":"POOF"}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"tuple[]","name":"recipients","internalType":"struct POOF.Recipient[]","components":[{"type":"bytes32","name":"to","internalType":"bytes32"},{"type":"uint256","name":"amount","internalType":"uint256"}]}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"DelegateChanged","inputs":[{"type":"address","name":"delegator","internalType":"address","indexed":true},{"type":"address","name":"fromDelegate","internalType":"address","indexed":true},{"type":"address","name":"toDelegate","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"DelegateVotesChanged","inputs":[{"type":"address","name":"delegate","internalType":"address","indexed":true},{"type":"uint256","name":"previousBalance","internalType":"uint256","indexed":false},{"type":"uint256","name":"newBalance","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DELEGATION_TYPEHASH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DOMAIN_TYPEHASH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint96","name":"","internalType":"uint96"}],"name":"MAX_SUPPLY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"PERMIT_TYPEHASH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"rawAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"_account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"fromBlock","internalType":"uint32"},{"type":"uint96","name":"votes","internalType":"uint96"}],"name":"checkpoints","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint32","name":"","internalType":"uint32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"delegate","inputs":[{"type":"address","name":"delegatee","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"delegateBySig","inputs":[{"type":"address","name":"delegatee","internalType":"address"},{"type":"uint256","name":"nonce","internalType":"uint256"},{"type":"uint256","name":"expiry","internalType":"uint256"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"delegates","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint96","name":"","internalType":"uint96"}],"name":"getCurrentVotes","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint96","name":"","internalType":"uint96"}],"name":"getPriorVotes","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"blockNumber","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nonces","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"","internalType":"uint32"}],"name":"numCheckpoints","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"permit","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"rawAmount","internalType":"uint256"},{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"resolve","inputs":[{"type":"bytes32","name":"name","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint96","name":"","internalType":"uint96"}],"name":"totalVotingPower","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"dst","internalType":"address"},{"type":"uint256","name":"rawAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"src","internalType":"address"},{"type":"address","name":"dst","internalType":"address"},{"type":"uint256","name":"rawAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint96","name":"","internalType":"uint96"}],"name":"votingPower","inputs":[{"type":"address","name":"account","internalType":"address"}]}]
Contract Creation Code
0x60a06040523480156200001157600080fd5b5060405162002eec38038062002eec833981016040819052620000349162000a54565b604051806040016040528060088152602001670a0dedecc86c2e6d60c31b815250604051806040016040528060048152602001632827a7a360e11b81525060126000308484848280600090805190602001906200009392919062000985565b50508151620000aa90600790602085019062000985565b5060f81b7fff000000000000000000000000000000000000000000000000000000000000001660805250620000e29050818362000261565b50505050506000805b8251811015620001d2576000620001348483815181106200011c57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001516200041b60201b60201c565b90506200017c8483815181106200015b57634e487b7160e01b600052603260045260246000fd5b60200260200101516020015184620004df60201b6200136e1790919060201c565b9250620001bc81858481518110620001a457634e487b7160e01b600052603260045260246000fd5b6020026020010151602001516200026160201b60201c565b5080620001c98162000ca8565b915050620000eb565b506a52b7d2dcc80cd2e40000008114620002595760405162461bcd60e51b815260206004820152603460248201527f53686f756c64206e6f7420686176652072656d61696e696e6720504f4f46206960448201527f6e2074686520746f6b656e20636f6e747261637400000000000000000000000060648201526084015b60405180910390fd5b505062000cf2565b6001600160a01b038216620002df5760405162461bcd60e51b815260206004820152603860248201527f566f74696e67506f7765723a3a5f6d696e74566f7465733a2063616e6e6f742060448201527f6d696e7420746f20746865207a65726f20616464726573730000000000000000606482015260840162000250565b6001600160a01b03821660009081526002602090815260409182902054825160608101909352602e8084526200032d936001600160601b03909216928592919062002e0f90830139620004ed565b6001600160a01b03831660009081526002602090815260409182902080546001600160601b0319166001600160601b03948516179055600154825160608101909352602f80845262000391949190911692859290919062002e3d90830139620004ed565b600180546001600160601b0319166001600160601b0392831617905560405190821681526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36001600160a01b03808316600090815260036020526040812054620004179216836200053f565b5050565b6000804661a4ec1462000443577336c976da6a6499cad683064f849afa69cd4dec2e62000459565b73abf8fabbc071f320f222a526a2e1fbe26429344d5b604051635c23bdf560e01b8152600481018590529091506001600160a01b03821690635c23bdf59060240160206040518083038186803b1580156200049d57600080fd5b505afa158015620004b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004d8919062000a2b565b9392505050565b6000620004d8828462000bb5565b600080620004fc848662000bfb565b9050846001600160601b0316816001600160601b031610158390620005365760405162461bcd60e51b815260040162000250919062000b2c565b50949350505050565b816001600160a01b0316836001600160a01b0316141580156200056b57506000816001600160601b0316115b1562000707576001600160a01b038316156200063c576001600160a01b03831660009081526005602052604081205463ffffffff169081620005af576000620005fe565b6001600160a01b038516600090815260046020526040812090620005d560018562000c20565b63ffffffff16815260208101919091526040016000205464010000000090046001600160601b03165b9050600062000628828560405180606001604052806027815260200162002ec5602791396200070c565b905062000638868484846200075b565b5050505b6001600160a01b0382161562000707576001600160a01b03821660009081526005602052604081205463ffffffff1690816200067a576000620006c9565b6001600160a01b038416600090815260046020526040812090620006a060018562000c20565b63ffffffff16815260208101919091526040016000205464010000000090046001600160601b03165b90506000620006f3828560405180606001604052806026815260200162002e6c60269139620004ed565b905062000703858484846200075b565b5050505b505050565b6000836001600160601b0316836001600160601b031611158290620007465760405162461bcd60e51b815260040162000250919062000b2c565b5062000753838562000c48565b949350505050565b6000620007824360405180606001604052806033815260200162002e926033913962000952565b905060008463ffffffff16118015620007df57506001600160a01b038516600090815260046020526040812063ffffffff831691620007c360018862000c20565b63ffffffff908116825260208201929092526040016000205416145b1562000852576001600160a01b038516600090815260046020526040812083916200080c60018862000c20565b63ffffffff168152602081019190915260400160002080546001600160601b039290921664010000000002600160201b600160801b0319909216919091179055620008fd565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000908152600482528681208b8616825290915294909420925183549451909116640100000000026001600160801b0319909416911617919091179055620008cc84600162000bd0565b6001600160a01b0386166000908152600560205260409020805463ffffffff191663ffffffff929092169190911790555b604080516001600160601b038086168252841660208201526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b60008164010000000084106200097d5760405162461bcd60e51b815260040162000250919062000b2c565b509192915050565b828054620009939062000c6b565b90600052602060002090601f016020900481019282620009b7576000855562000a02565b82601f10620009d257805160ff191683800117855562000a02565b8280016001018555821562000a02579182015b8281111562000a02578251825591602001919060010190620009e5565b5062000a1092915062000a14565b5090565b5b8082111562000a10576000815560010162000a15565b60006020828403121562000a3d578081fd5b81516001600160a01b0381168114620004d8578182fd5b6000602080838503121562000a67578182fd5b82516001600160401b038082111562000a7e578384fd5b818501915085601f83011262000a92578384fd5b81518181111562000aa75762000aa762000cdc565b62000ab7848260051b0162000b82565b8181528481019250838501600683901b8501860189101562000ad7578687fd5b8694505b8285101562000b2057604080828b03121562000af5578788fd5b62000b008162000b82565b825181528783015188820152855260019590950194938601930162000adb565b50979650505050505050565b6000602080835283518082850152825b8181101562000b5a5785810183015185820160400152820162000b3c565b8181111562000b6c5783604083870101525b50601f01601f1916929092016040019392505050565b604051601f8201601f191681016001600160401b038111828210171562000bad5762000bad62000cdc565b604052919050565b6000821982111562000bcb5762000bcb62000cc6565b500190565b600063ffffffff80831681851680830382111562000bf25762000bf262000cc6565b01949350505050565b60006001600160601b0382811684821680830382111562000bf25762000bf262000cc6565b600063ffffffff8381169083168181101562000c405762000c4062000cc6565b039392505050565b60006001600160601b038381169083168181101562000c405762000c4062000cc6565b600181811c9082168062000c8057607f821691505b6020821081141562000ca257634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000cbf5762000cbf62000cc6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60805160f81c6120fe62000d11600039600061023701526120fe6000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80636fcfff45116100de578063b4b5ea5711610097578063d505accf11610071578063d505accf146103f4578063dd62ed3e14610407578063e7a324dc14610449578063f1127ed81461047057610173565b8063b4b5ea57146103c0578063c07473f6146103d3578063c3cda520146103e157610173565b80636fcfff451461030557806370a0823114610340578063782d6fe1146103725780637ecebe001461038557806395d89b41146103a5578063a9059cbb146103ad57610173565b8063313ce56711610130578063313ce5671461023057806332cb6b0c14610261578063587cde1e1461028b5780635c19a95c146102cc5780635c23bdf5146102e1578063671b3793146102f457610173565b806306fdde0314610178578063095ea7b31461019657806318160ddd146101b957806320606b70146101cf57806323b872dd146101f657806330adf81f14610209575b600080fd5b6101806104d7565b60405161018d9190611d92565b60405180910390f35b6101a96101a4366004611c26565b6104e6565b604051901515815260200161018d565b6101c16105a7565b60405190815260200161018d565b6101c17f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6101a9610204366004611b79565b6105c9565b6101c17f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60405160ff7f000000000000000000000000000000000000000000000000000000000000000016815260200161018d565b6102736a52b7d2dcc80cd2e400000081565b6040516001600160601b03909116815260200161018d565b6102b4610299366004611b09565b6003602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161018d565b6102df6102da366004611b09565b6107a1565b005b6102b46102ef366004611cdf565b6107ae565b6001546001600160601b0316610273565b61032b610313366004611b09565b60056020526000908152604090205463ffffffff1681565b60405163ffffffff909116815260200161018d565b6101c161034e366004611b09565b6001600160a01b03166000908152600260205260409020546001600160601b031690565b610273610380366004611c26565b61086e565b6101c1610393366004611b09565b60066020526000908152604090205481565b610180610af4565b6101a96103bb366004611c26565b610b86565b6102736103ce366004611b09565b610c4d565b61027361034e366004611b09565b6102df6103ef366004611c51565b610cca565b6102df610402366004611bb9565b610f9d565b6101c1610415366004611b41565b6001600160a01b0391821660009081526008602090815260408083209390941682529190915220546001600160601b031690565b6101c17fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b6104b361047e366004611caa565b600460209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b6040805163ffffffff90931683526001600160601b0390911660208301520161018d565b60606104e1611381565b905090565b60008060001983141561050157506001600160601b03610526565b6105238360405180606001604052806024815260200161207660249139611390565b90505b3360008181526008602090815260408083206001600160a01b0389168085529083529281902080546001600160601b0319166001600160601b03871690811790915590519081529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a360019150505b92915050565b60006105bb6001546001600160601b031690565b6001600160601b0316905090565b60006001600160a01b03831630141561065e5760405162461bcd60e51b815260206004820152604660248201527f5472616e736665727261626c65566f74696e67546f6b656e3a3a7472616e736660448201527f657246726f6d3a2063616e6e6f742073656e6420746f6b656e7320746f20636f6064820152651b9d1c9858dd60d21b608482015260a4015b60405180910390fd5b6001600160a01b03841660009081526008602090815260408083203380855290835281842054825160608101909352602480845291946001600160601b039091169390926106b492889261207690830139611390565b9050866001600160a01b0316836001600160a01b0316141580156106e157506001600160601b0382811614155b1561078957600061070b83836040518060600160405280603c8152602001611f3d603c91396113bf565b6001600160a01b038981166000818152600860209081526040808320948a168084529482529182902080546001600160601b0319166001600160601b0387169081179091559151918252939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b610794878783611409565b5060019695505050505050565b6107ab338261165a565b50565b6000804661a4ec146107d4577336c976da6a6499cad683064f849afa69cd4dec2e6107ea565b73abf8fabbc071f320f222a526a2e1fbe26429344d5b604051635c23bdf560e01b8152600481018590529091506001600160a01b03821690635c23bdf59060240160206040518083038186803b15801561082d57600080fd5b505afa158015610841573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108659190611b25565b9150505b919050565b60004382106108ce5760405162461bcd60e51b815260206004820152602660248201527f556e693a3a6765745072696f72566f7465733a206e6f742079657420646574656044820152651c9b5a5b995960d21b6064820152608401610655565b6001600160a01b03831660009081526005602052604090205463ffffffff16806108fc5760009150506105a1565b6001600160a01b03841660009081526004602052604081208491610921600185611e76565b63ffffffff90811682526020820192909252604001600020541611610994576001600160a01b038416600090815260046020526040812090610964600184611e76565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b031691506105a19050565b6001600160a01b038416600090815260046020908152604080832083805290915290205463ffffffff168310156109cf5760009150506105a1565b6000806109dd600184611e76565b90505b8163ffffffff168163ffffffff161115610aaf5760006002610a028484611e76565b610a0c9190611e47565b610a169083611e76565b6001600160a01b038816600090815260046020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b031691810191909152919250871415610a83576020015194506105a19350505050565b805163ffffffff16871115610a9a57819350610aa8565b610aa5600183611e76565b92505b50506109e0565b506001600160a01b038516600090815260046020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b606060078054610b0390611ebb565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2f90611ebb565b8015610b7c5780601f10610b5157610100808354040283529160200191610b7c565b820191906000526020600020905b815481529060010190602001808311610b5f57829003601f168201915b5050505050905090565b60006001600160a01b038316301415610c125760405162461bcd60e51b815260206004820152604260248201527f5472616e736665727261626c65566f74696e67546f6b656e3a3a7472616e736660448201527f65723a2063616e6e6f742073656e6420746f6b656e7320746f20636f6e74726160648201526118dd60f21b608482015260a401610655565b6000610c368360405180606001604052806025815260200161205160259139611390565b9050610c43338583611409565b5060019392505050565b6001600160a01b03811660009081526005602052604081205463ffffffff1680610c78576000610865565b6001600160a01b038316600090815260046020526040812090610c9c600184611e76565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03169392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8666000604051610cfc9190611cf7565b6040518091039020610d0b4690565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a90528251808503909101815261014084019092528151919093012061190160f01b610160830152610162820183905261018282018190529192506000906101a20160408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa158015610e37573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610ea85760405162461bcd60e51b815260206004820152602560248201527f556e693a3a64656c656761746542795369673a20696e76616c6964207369676e604482015264617475726560d81b6064820152608401610655565b6001600160a01b0381166000908152600660205260408120805491610ecc83611ef6565b919050558914610f285760405162461bcd60e51b815260206004820152602160248201527f556e693a3a64656c656761746542795369673a20696e76616c6964206e6f6e636044820152606560f81b6064820152608401610655565b87421115610f865760405162461bcd60e51b815260206004820152602560248201527f556e693a3a64656c656761746542795369673a207369676e61747572652065786044820152641c1a5c995960da1b6064820152608401610655565b610f90818b61165a565b505050505b505050505050565b6000600019861415610fb757506001600160601b03610fdc565b610fd986604051806060016040528060238152602001611fae60239139611390565b90505b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8666110076104d7565b805190602001206110154690565b604080516020810194909452830191909152606082015230608082015260a00160408051601f1981840301815291815281516020928301206001600160a01b038c166000908152600690935290822080549193507f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918661109b83611ef6565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012090506000828260405160200161111a92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8b169284019290925260608301899052608083018890529092509060019060a0016020604051602081039080840390855afa158015611185573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166111e85760405162461bcd60e51b815260206004820152601e60248201527f556e693a3a7065726d69743a20696e76616c6964207369676e617475726500006044820152606401610655565b8b6001600160a01b0316816001600160a01b0316146112495760405162461bcd60e51b815260206004820152601960248201527f556e693a3a7065726d69743a20756e617574686f72697a6564000000000000006044820152606401610655565b884211156112995760405162461bcd60e51b815260206004820152601e60248201527f556e693a3a7065726d69743a207369676e6174757265206578706972656400006044820152606401610655565b84600860008e6001600160a01b03166001600160a01b0316815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b031602179055508a6001600160a01b03168c6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258760405161135891906001600160601b0391909116815260200190565b60405180910390a3505050505050505050505050565b600061137a8284611de5565b9392505050565b606060008054610b0390611ebb565b600081600160601b84106113b75760405162461bcd60e51b81526004016106559190611d92565b509192915050565b6000836001600160601b0316836001600160601b0316111582906113f65760405162461bcd60e51b81526004016106559190611d92565b506114018385611e9b565b949350505050565b6001600160a01b0383166114855760405162461bcd60e51b815260206004820152603b60248201527f556e693a3a5f7472616e73666572546f6b656e733a2063616e6e6f742074726160448201527f6e736665722066726f6d20746865207a65726f206164647265737300000000006064820152608401610655565b6001600160a01b0382166115015760405162461bcd60e51b815260206004820152603960248201527f556e693a3a5f7472616e73666572546f6b656e733a2063616e6e6f742074726160448201527f6e7366657220746f20746865207a65726f2061646472657373000000000000006064820152608401610655565b6001600160a01b03831660009081526002602090815260409182902054825160608101909352603580845261154c936001600160601b039092169285929190611f79908301396113bf565b6001600160a01b03848116600090815260026020908152604080832080546001600160601b0319166001600160601b0396871617905592861682529082902054825160608101909352602f8084526115b4949190911692859290919061209a908301396116e4565b6001600160a01b0383811660008181526002602090815260409182902080546001600160601b0319166001600160601b03968716179055905193851684529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36001600160a01b0380841660009081526003602052604080822054858416835291205461165592918216911683611731565b505050565b6001600160a01b03808316600081815260036020818152604080842080546002845282862054949093528787166001600160a01b031984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46116de828483611731565b50505050565b6000806116f18486611e25565b9050846001600160601b0316816001600160601b0316101583906117285760405162461bcd60e51b81526004016106559190611d92565b50949350505050565b816001600160a01b0316836001600160a01b03161415801561175c57506000816001600160601b0316115b15611655576001600160a01b03831615611821576001600160a01b03831660009081526005602052604081205463ffffffff16908161179c5760006117e8565b6001600160a01b0385166000908152600460205260408120906117c0600185611e76565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03165b9050600061180f828560405180606001604052806027815260200161202a602791396113bf565b905061181d868484846118d9565b5050505b6001600160a01b03821615611655576001600160a01b03821660009081526005602052604081205463ffffffff16908161185c5760006118a8565b6001600160a01b038416600090815260046020526040812090611880600185611e76565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03165b905060006118cf8285604051806060016040528060268152602001611fd1602691396116e4565b9050610f95858484845b60006118fd43604051806060016040528060338152602001611ff760339139611ad1565b905060008463ffffffff1611801561195757506001600160a01b038516600090815260046020526040812063ffffffff83169161193b600188611e76565b63ffffffff908116825260208201929092526040016000205416145b156119cb576001600160a01b03851660009081526004602052604081208391611981600188611e76565b63ffffffff168152602081019190915260400160002080546001600160601b0392909216600160201b026fffffffffffffffffffffffff0000000019909216919091179055611a7c565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000908152600482528681208b8616825290915294909420925183549451909116600160201b026fffffffffffffffffffffffffffffffff19909416911617919091179055611a4b846001611dfd565b6001600160a01b0386166000908152600560205260409020805463ffffffff191663ffffffff929092169190911790555b604080516001600160601b038086168252841660208201526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b600081600160201b84106113b75760405162461bcd60e51b81526004016106559190611d92565b803560ff8116811461086957600080fd5b600060208284031215611b1a578081fd5b813561137a81611f27565b600060208284031215611b36578081fd5b815161137a81611f27565b60008060408385031215611b53578081fd5b8235611b5e81611f27565b91506020830135611b6e81611f27565b809150509250929050565b600080600060608486031215611b8d578081fd5b8335611b9881611f27565b92506020840135611ba881611f27565b929592945050506040919091013590565b600080600080600080600060e0888a031215611bd3578283fd5b8735611bde81611f27565b96506020880135611bee81611f27565b95506040880135945060608801359350611c0a60808901611af8565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215611c38578182fd5b8235611c4381611f27565b946020939093013593505050565b60008060008060008060c08789031215611c69578182fd5b8635611c7481611f27565b95506020870135945060408701359350611c9060608801611af8565b92506080870135915060a087013590509295509295509295565b60008060408385031215611cbc578182fd5b8235611cc781611f27565b9150602083013563ffffffff81168114611b6e578182fd5b600060208284031215611cf0578081fd5b5035919050565b600080835482600182811c915080831680611d1357607f831692505b6020808410821415611d3357634e487b7160e01b87526022600452602487fd5b818015611d475760018114611d5857611d84565b60ff19861689528489019650611d84565b60008a815260209020885b86811015611d7c5781548b820152908501908301611d63565b505084890196505b509498975050505050505050565b6000602080835283518082850152825b81811015611dbe57858101830151858201604001528201611da2565b81811115611dcf5783604083870101525b50601f01601f1916929092016040019392505050565b60008219821115611df857611df8611f11565b500190565b600063ffffffff808316818516808303821115611e1c57611e1c611f11565b01949350505050565b60006001600160601b03808316818516808303821115611e1c57611e1c611f11565b600063ffffffff80841680611e6a57634e487b7160e01b83526012600452602483fd5b92169190910492915050565b600063ffffffff83811690831681811015611e9357611e93611f11565b039392505050565b60006001600160601b0383811690831681811015611e9357611e93611f11565b600181811c90821680611ecf57607f821691505b60208210811415611ef057634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415611f0a57611f0a611f11565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146107ab57600080fdfe556e693a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e6365556e693a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e6365556e693a3a7065726d69743a20616d6f756e7420657863656564732039362062697473556e693a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f7773556e693a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473556e693a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f7773556e693a3a7472616e736665723a20616d6f756e7420657863656564732039362062697473556e693a3a617070726f76653a20616d6f756e7420657863656564732039362062697473556e693a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f7773a26469706673582212201ccf4a3f39818df6759150aa3b63b6ef2cdb34f3587458889b24492e94ea8f7c64736f6c63430008030033566f74696e67506f7765723a3a5f6d696e74566f7465733a206d696e7420616d6f756e74206f766572666c6f7773566f74696e67506f7765723a3a5f6d696e74566f7465733a20746f74616c20737570706c79206f766572666c6f7773556e693a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f7773556e693a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473556e693a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f777300000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000006506f6f665265776172645377617000000000000000000000000000000000000000000000000000000000000000000000000000000022bdd88fed9efc6a000000506f6f66476f76416c6c6f6361746f72000000000000000000000000000000000000000000000000000000000000000000000000000ed4d33f64e49a72400000506f6f6652657365727665416c6c6f6361746f72000000000000000000000000000000000000000000000000000000000000000000069e10de76676d0800000072504f4f4600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018d0bf423c03d8de000000506f6f664c697175696469747954696d656c6f636b000000000000000000000000000000000000000000000000000000000000000001a784379d99db42000000506f6f66566f7563686572000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ed2b525841adfc00000
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80636fcfff45116100de578063b4b5ea5711610097578063d505accf11610071578063d505accf146103f4578063dd62ed3e14610407578063e7a324dc14610449578063f1127ed81461047057610173565b8063b4b5ea57146103c0578063c07473f6146103d3578063c3cda520146103e157610173565b80636fcfff451461030557806370a0823114610340578063782d6fe1146103725780637ecebe001461038557806395d89b41146103a5578063a9059cbb146103ad57610173565b8063313ce56711610130578063313ce5671461023057806332cb6b0c14610261578063587cde1e1461028b5780635c19a95c146102cc5780635c23bdf5146102e1578063671b3793146102f457610173565b806306fdde0314610178578063095ea7b31461019657806318160ddd146101b957806320606b70146101cf57806323b872dd146101f657806330adf81f14610209575b600080fd5b6101806104d7565b60405161018d9190611d92565b60405180910390f35b6101a96101a4366004611c26565b6104e6565b604051901515815260200161018d565b6101c16105a7565b60405190815260200161018d565b6101c17f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6101a9610204366004611b79565b6105c9565b6101c17f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60405160ff7f000000000000000000000000000000000000000000000000000000000000001216815260200161018d565b6102736a52b7d2dcc80cd2e400000081565b6040516001600160601b03909116815260200161018d565b6102b4610299366004611b09565b6003602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161018d565b6102df6102da366004611b09565b6107a1565b005b6102b46102ef366004611cdf565b6107ae565b6001546001600160601b0316610273565b61032b610313366004611b09565b60056020526000908152604090205463ffffffff1681565b60405163ffffffff909116815260200161018d565b6101c161034e366004611b09565b6001600160a01b03166000908152600260205260409020546001600160601b031690565b610273610380366004611c26565b61086e565b6101c1610393366004611b09565b60066020526000908152604090205481565b610180610af4565b6101a96103bb366004611c26565b610b86565b6102736103ce366004611b09565b610c4d565b61027361034e366004611b09565b6102df6103ef366004611c51565b610cca565b6102df610402366004611bb9565b610f9d565b6101c1610415366004611b41565b6001600160a01b0391821660009081526008602090815260408083209390941682529190915220546001600160601b031690565b6101c17fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b6104b361047e366004611caa565b600460209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b6040805163ffffffff90931683526001600160601b0390911660208301520161018d565b60606104e1611381565b905090565b60008060001983141561050157506001600160601b03610526565b6105238360405180606001604052806024815260200161207660249139611390565b90505b3360008181526008602090815260408083206001600160a01b0389168085529083529281902080546001600160601b0319166001600160601b03871690811790915590519081529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a360019150505b92915050565b60006105bb6001546001600160601b031690565b6001600160601b0316905090565b60006001600160a01b03831630141561065e5760405162461bcd60e51b815260206004820152604660248201527f5472616e736665727261626c65566f74696e67546f6b656e3a3a7472616e736660448201527f657246726f6d3a2063616e6e6f742073656e6420746f6b656e7320746f20636f6064820152651b9d1c9858dd60d21b608482015260a4015b60405180910390fd5b6001600160a01b03841660009081526008602090815260408083203380855290835281842054825160608101909352602480845291946001600160601b039091169390926106b492889261207690830139611390565b9050866001600160a01b0316836001600160a01b0316141580156106e157506001600160601b0382811614155b1561078957600061070b83836040518060600160405280603c8152602001611f3d603c91396113bf565b6001600160a01b038981166000818152600860209081526040808320948a168084529482529182902080546001600160601b0319166001600160601b0387169081179091559151918252939450919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505b610794878783611409565b5060019695505050505050565b6107ab338261165a565b50565b6000804661a4ec146107d4577336c976da6a6499cad683064f849afa69cd4dec2e6107ea565b73abf8fabbc071f320f222a526a2e1fbe26429344d5b604051635c23bdf560e01b8152600481018590529091506001600160a01b03821690635c23bdf59060240160206040518083038186803b15801561082d57600080fd5b505afa158015610841573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108659190611b25565b9150505b919050565b60004382106108ce5760405162461bcd60e51b815260206004820152602660248201527f556e693a3a6765745072696f72566f7465733a206e6f742079657420646574656044820152651c9b5a5b995960d21b6064820152608401610655565b6001600160a01b03831660009081526005602052604090205463ffffffff16806108fc5760009150506105a1565b6001600160a01b03841660009081526004602052604081208491610921600185611e76565b63ffffffff90811682526020820192909252604001600020541611610994576001600160a01b038416600090815260046020526040812090610964600184611e76565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b031691506105a19050565b6001600160a01b038416600090815260046020908152604080832083805290915290205463ffffffff168310156109cf5760009150506105a1565b6000806109dd600184611e76565b90505b8163ffffffff168163ffffffff161115610aaf5760006002610a028484611e76565b610a0c9190611e47565b610a169083611e76565b6001600160a01b038816600090815260046020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b031691810191909152919250871415610a83576020015194506105a19350505050565b805163ffffffff16871115610a9a57819350610aa8565b610aa5600183611e76565b92505b50506109e0565b506001600160a01b038516600090815260046020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b606060078054610b0390611ebb565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2f90611ebb565b8015610b7c5780601f10610b5157610100808354040283529160200191610b7c565b820191906000526020600020905b815481529060010190602001808311610b5f57829003601f168201915b5050505050905090565b60006001600160a01b038316301415610c125760405162461bcd60e51b815260206004820152604260248201527f5472616e736665727261626c65566f74696e67546f6b656e3a3a7472616e736660448201527f65723a2063616e6e6f742073656e6420746f6b656e7320746f20636f6e74726160648201526118dd60f21b608482015260a401610655565b6000610c368360405180606001604052806025815260200161205160259139611390565b9050610c43338583611409565b5060019392505050565b6001600160a01b03811660009081526005602052604081205463ffffffff1680610c78576000610865565b6001600160a01b038316600090815260046020526040812090610c9c600184611e76565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03169392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8666000604051610cfc9190611cf7565b6040518091039020610d0b4690565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a90528251808503909101815261014084019092528151919093012061190160f01b610160830152610162820183905261018282018190529192506000906101a20160408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa158015610e37573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610ea85760405162461bcd60e51b815260206004820152602560248201527f556e693a3a64656c656761746542795369673a20696e76616c6964207369676e604482015264617475726560d81b6064820152608401610655565b6001600160a01b0381166000908152600660205260408120805491610ecc83611ef6565b919050558914610f285760405162461bcd60e51b815260206004820152602160248201527f556e693a3a64656c656761746542795369673a20696e76616c6964206e6f6e636044820152606560f81b6064820152608401610655565b87421115610f865760405162461bcd60e51b815260206004820152602560248201527f556e693a3a64656c656761746542795369673a207369676e61747572652065786044820152641c1a5c995960da1b6064820152608401610655565b610f90818b61165a565b505050505b505050505050565b6000600019861415610fb757506001600160601b03610fdc565b610fd986604051806060016040528060238152602001611fae60239139611390565b90505b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8666110076104d7565b805190602001206110154690565b604080516020810194909452830191909152606082015230608082015260a00160408051601f1981840301815291815281516020928301206001600160a01b038c166000908152600690935290822080549193507f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c918661109b83611ef6565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012090506000828260405160200161111a92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8b169284019290925260608301899052608083018890529092509060019060a0016020604051602081039080840390855afa158015611185573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166111e85760405162461bcd60e51b815260206004820152601e60248201527f556e693a3a7065726d69743a20696e76616c6964207369676e617475726500006044820152606401610655565b8b6001600160a01b0316816001600160a01b0316146112495760405162461bcd60e51b815260206004820152601960248201527f556e693a3a7065726d69743a20756e617574686f72697a6564000000000000006044820152606401610655565b884211156112995760405162461bcd60e51b815260206004820152601e60248201527f556e693a3a7065726d69743a207369676e6174757265206578706972656400006044820152606401610655565b84600860008e6001600160a01b03166001600160a01b0316815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160601b0302191690836001600160601b031602179055508a6001600160a01b03168c6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258760405161135891906001600160601b0391909116815260200190565b60405180910390a3505050505050505050505050565b600061137a8284611de5565b9392505050565b606060008054610b0390611ebb565b600081600160601b84106113b75760405162461bcd60e51b81526004016106559190611d92565b509192915050565b6000836001600160601b0316836001600160601b0316111582906113f65760405162461bcd60e51b81526004016106559190611d92565b506114018385611e9b565b949350505050565b6001600160a01b0383166114855760405162461bcd60e51b815260206004820152603b60248201527f556e693a3a5f7472616e73666572546f6b656e733a2063616e6e6f742074726160448201527f6e736665722066726f6d20746865207a65726f206164647265737300000000006064820152608401610655565b6001600160a01b0382166115015760405162461bcd60e51b815260206004820152603960248201527f556e693a3a5f7472616e73666572546f6b656e733a2063616e6e6f742074726160448201527f6e7366657220746f20746865207a65726f2061646472657373000000000000006064820152608401610655565b6001600160a01b03831660009081526002602090815260409182902054825160608101909352603580845261154c936001600160601b039092169285929190611f79908301396113bf565b6001600160a01b03848116600090815260026020908152604080832080546001600160601b0319166001600160601b0396871617905592861682529082902054825160608101909352602f8084526115b4949190911692859290919061209a908301396116e4565b6001600160a01b0383811660008181526002602090815260409182902080546001600160601b0319166001600160601b03968716179055905193851684529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36001600160a01b0380841660009081526003602052604080822054858416835291205461165592918216911683611731565b505050565b6001600160a01b03808316600081815260036020818152604080842080546002845282862054949093528787166001600160a01b031984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46116de828483611731565b50505050565b6000806116f18486611e25565b9050846001600160601b0316816001600160601b0316101583906117285760405162461bcd60e51b81526004016106559190611d92565b50949350505050565b816001600160a01b0316836001600160a01b03161415801561175c57506000816001600160601b0316115b15611655576001600160a01b03831615611821576001600160a01b03831660009081526005602052604081205463ffffffff16908161179c5760006117e8565b6001600160a01b0385166000908152600460205260408120906117c0600185611e76565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03165b9050600061180f828560405180606001604052806027815260200161202a602791396113bf565b905061181d868484846118d9565b5050505b6001600160a01b03821615611655576001600160a01b03821660009081526005602052604081205463ffffffff16908161185c5760006118a8565b6001600160a01b038416600090815260046020526040812090611880600185611e76565b63ffffffff168152602081019190915260400160002054600160201b90046001600160601b03165b905060006118cf8285604051806060016040528060268152602001611fd1602691396116e4565b9050610f95858484845b60006118fd43604051806060016040528060338152602001611ff760339139611ad1565b905060008463ffffffff1611801561195757506001600160a01b038516600090815260046020526040812063ffffffff83169161193b600188611e76565b63ffffffff908116825260208201929092526040016000205416145b156119cb576001600160a01b03851660009081526004602052604081208391611981600188611e76565b63ffffffff168152602081019190915260400160002080546001600160601b0392909216600160201b026fffffffffffffffffffffffff0000000019909216919091179055611a7c565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000908152600482528681208b8616825290915294909420925183549451909116600160201b026fffffffffffffffffffffffffffffffff19909416911617919091179055611a4b846001611dfd565b6001600160a01b0386166000908152600560205260409020805463ffffffff191663ffffffff929092169190911790555b604080516001600160601b038086168252841660208201526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b600081600160201b84106113b75760405162461bcd60e51b81526004016106559190611d92565b803560ff8116811461086957600080fd5b600060208284031215611b1a578081fd5b813561137a81611f27565b600060208284031215611b36578081fd5b815161137a81611f27565b60008060408385031215611b53578081fd5b8235611b5e81611f27565b91506020830135611b6e81611f27565b809150509250929050565b600080600060608486031215611b8d578081fd5b8335611b9881611f27565b92506020840135611ba881611f27565b929592945050506040919091013590565b600080600080600080600060e0888a031215611bd3578283fd5b8735611bde81611f27565b96506020880135611bee81611f27565b95506040880135945060608801359350611c0a60808901611af8565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215611c38578182fd5b8235611c4381611f27565b946020939093013593505050565b60008060008060008060c08789031215611c69578182fd5b8635611c7481611f27565b95506020870135945060408701359350611c9060608801611af8565b92506080870135915060a087013590509295509295509295565b60008060408385031215611cbc578182fd5b8235611cc781611f27565b9150602083013563ffffffff81168114611b6e578182fd5b600060208284031215611cf0578081fd5b5035919050565b600080835482600182811c915080831680611d1357607f831692505b6020808410821415611d3357634e487b7160e01b87526022600452602487fd5b818015611d475760018114611d5857611d84565b60ff19861689528489019650611d84565b60008a815260209020885b86811015611d7c5781548b820152908501908301611d63565b505084890196505b509498975050505050505050565b6000602080835283518082850152825b81811015611dbe57858101830151858201604001528201611da2565b81811115611dcf5783604083870101525b50601f01601f1916929092016040019392505050565b60008219821115611df857611df8611f11565b500190565b600063ffffffff808316818516808303821115611e1c57611e1c611f11565b01949350505050565b60006001600160601b03808316818516808303821115611e1c57611e1c611f11565b600063ffffffff80841680611e6a57634e487b7160e01b83526012600452602483fd5b92169190910492915050565b600063ffffffff83811690831681811015611e9357611e93611f11565b039392505050565b60006001600160601b0383811690831681811015611e9357611e93611f11565b600181811c90821680611ecf57607f821691505b60208210811415611ef057634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415611f0a57611f0a611f11565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146107ab57600080fdfe556e693a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e6365556e693a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e6365556e693a3a7065726d69743a20616d6f756e7420657863656564732039362062697473556e693a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f7773556e693a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473556e693a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f7773556e693a3a7472616e736665723a20616d6f756e7420657863656564732039362062697473556e693a3a617070726f76653a20616d6f756e7420657863656564732039362062697473556e693a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f7773a26469706673582212201ccf4a3f39818df6759150aa3b63b6ef2cdb34f3587458889b24492e94ea8f7c64736f6c63430008030033