Address Details
contract
0xFe8e232B18fb6E6D3246D4eC13676D932962847e
- Contract Name
- CASRegistryManager
- Creator
- 0xb156c1–ebc770 at 0xff6b7a–abe7e4
- 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 Transactions
- Transfers
- 0 Transfers
- Gas Used
- 177,529
- Last Balance Update
- 16133060
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- CASRegistryManager
- Optimization enabled
- false
- Compiler version
- v0.8.7+commit.e28d00a7
- EVM Version
- istanbul
- Verified at
- 2023-02-01T16:17:53.555284Z
project:/contracts/CASRegistryManager.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; // get needed function and put them here import "./BytesLib.sol"; interface IProject { function createProject(bytes[] memory bytesParams) external; function changeProjectEndDate(bytes[] memory bytesParams) external; function getProject(bytes[] memory bytesParams) external view returns (uint, uint, uint); function addBundleVolume(bytes[] memory output) external; function subtractBundleVolume(bytes[] memory input) external; } interface IBuffer { function addBundleVolume(bytes[] memory output) external; } interface IHolder { function addBundleVolume(bytes[] memory output) external; } contract CASRegistryManager is Ownable, AccessControl { /// initialized contract addresses address private projectContractAddress; address private bufferContractAddress; address private holderContractAddress; /** * @dev Constant value to set up new role */ bytes32 public constant REGISTRY_ROLE = keccak256("REGISTRY_ROLE"); /** * @dev modifier to check if the sender has access to a function */ modifier checkAccess { require(hasRole(REGISTRY_ROLE, msg.sender), "Caller is not an admin or CAS proxy contract"); _; } /** * @dev Setter to add access to registry functions * (more precisely to give access to other our contracts call the function) * @param newAddress the address to which the role is assigned */ function addToRegistryRole(address newAddress) public onlyOwner { _setupRole(REGISTRY_ROLE, newAddress); } /** * @dev Remove an account from the registry role */ function removeFromRegistryRole(address account) public virtual onlyOwner { revokeRole(REGISTRY_ROLE, account); } /** * @dev Setter for a new project contract address * @param _projectContractAddress the new address of the project contract */ function setProjectContractAddress(address _projectContractAddress) external onlyOwner { projectContractAddress = _projectContractAddress; } /** * @dev Get a project contract address * @return projectAddress Current project address */ function getProjectContractAddress() external view returns(address projectAddress) { return projectContractAddress; } /** * @dev setter for a new buffer contract address * @param _bufferContractAddress the new address of the buffer contract */ function setBufferContractAddress(address _bufferContractAddress) external onlyOwner { bufferContractAddress = _bufferContractAddress; } /** * @dev Get a project contract address * @return bufferAddress Current buffer address */ function getBufferContractAddress() public view returns(address bufferAddress) { return bufferContractAddress; } /** * @dev Setter for a new holder contract address * @param _holderContractAddress the new address of the holder contract */ function setHolderContractAddress(address _holderContractAddress) external onlyOwner { holderContractAddress = _holderContractAddress; } /** * @dev Get a holder contract address * @return holderAddress Current holder address */ function getHolderContractAddress() external view returns(address holderAddress) { return holderContractAddress; } /** * @dev Initialization of a new project * @param bytesParams ( * projectAddress: bytes(address), * projectId: bytes(int), * startDate: bytes(string), * endDate: bytes(string) * ) * @notice All parameters must be passed in bytes and opened in the contract as the required type */ function createProject(bytes[] memory bytesParams) external checkAccess { IProject(projectContractAddress).createProject(bytesParams); } /** * @dev Function to change end date parameter * @param bytesParams ( * projectAddress: bytes(address), * endDate: bytes(string) * ) * @notice All parameters must be passed in bytes and opened in the contract as the required type */ function changeProjectEndDate(bytes[] memory bytesParams) external checkAccess { IProject(projectContractAddress).changeProjectEndDate(bytesParams); } /** * @dev Get project parameters * @param bytesParams ( * projectAddress: bytes(address) * ) * `projectAddress` parameter must be passed in bytes and opened in the contract as the required type * @return projectId Returns `projectId`, `startDate`, `endDate` of a given project * @return startDate Returns `projectId`, `startDate`, `endDate` of a given project * @return endDate Returns `projectId`, `startDate`, `endDate` of a given project */ function getProject(bytes[] memory bytesParams) external view returns(uint projectId, uint startDate, uint endDate) { return IProject(projectContractAddress).getProject(bytesParams); } /** * @dev create claim for a project (give FCRU to it) * @param projectOutput ( * projectAddress: bytes(address), * bundleId: bytes(string), * bundleVolume: bytes(int), * unitType: bytes(string), * metadataUrl: bytes(string) * projectAddress: bytes(address) * ) * @param bufferOutput ( * bufferAddress: bytes(address), * outputBundleId: bytes(string), * bundleVolume: bytes(int), * unitType: bytes(string), * metadataUrl: bytes(string) * projectAddress: bytes(address) * ) * @notice All parameters must be passed in bytes and opened in the contract as the required type */ function processClaim(bytes[] memory projectOutput, bytes[] memory bufferOutput) external checkAccess { require(keccak256(abi.encodePacked(projectOutput[3])) == keccak256(abi.encodePacked("FCRU")), "only FCRU type can be processed"); require(keccak256(abi.encodePacked(bufferOutput[3])) == keccak256(abi.encodePacked("FCRU")), "only FCRU type can be processed"); IProject(projectContractAddress).addBundleVolume(projectOutput); IBuffer(bufferContractAddress).addBundleVolume(bufferOutput); } /** * @dev assign tokens from the project to the holder * @param projectInput ( * projectAddress: bytes(address), * bundleId: bytes(string), * bundleVolume: bytes(int), * unitType: bytes(string), * metadataUrl: bytes(string) * projectAddress: bytes(address) * ) * @param holderOutput ( * holderAddress: bytes(address), * outputBundleId: bytes(string), * bundleVolume: bytes(int), * unitType: bytes(string), * metadataUrl: bytes(string) * projectAddress: bytes(address) * ) * @notice All parameters must be passed in bytes and opened in the contract as the required type */ function assignTokens(bytes[] memory projectInput, bytes[] memory holderOutput) external checkAccess { require( keccak256(abi.encodePacked(projectInput[3])) == keccak256(abi.encodePacked(holderOutput[3])), "same types must be assigned at projectInput, holderOutput" ); require( BytesLib.toUint256(projectInput[2], 0) == BytesLib.toUint256(holderOutput[2], 0), "same amount must be assigned at projectInput, holderOutput" ); IProject(projectContractAddress).subtractBundleVolume(projectInput); IHolder(holderContractAddress).addBundleVolume(holderOutput); } }
/_openzeppelin/contracts/access/AccessControl.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
/_openzeppelin/contracts/access/IAccessControl.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
/_openzeppelin/contracts/access/Ownable.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
/_openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
/_openzeppelin/contracts/utils/Strings.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
/_openzeppelin/contracts/utils/introspection/ERC165.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
/_openzeppelin/contracts/utils/introspection/IERC165.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
/project_/contracts/BytesLib.sol
// SPDX-License-Identifier: Unlicense /* * @title Solidity Bytes Arrays Utils * @author Gonçalo Sá <goncalo.sa@consensys.net> * * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity. * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage. */ pragma solidity >=0.8.0 <0.9.0; library BytesLib { function concat( bytes memory _preBytes, bytes memory _postBytes ) internal pure returns (bytes memory) { bytes memory tempBytes; assembly { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // Store the length of the first bytes array at the beginning of // the memory for tempBytes. let length := mload(_preBytes) mstore(tempBytes, length) // Maintain a memory counter for the current write location in the // temp bytes array by adding the 32 bytes for the array length to // the starting location. let mc := add(tempBytes, 0x20) // Stop copying when the memory counter reaches the length of the // first bytes array. let end := add(mc, length) for { // Initialize a copy counter to the start of the _preBytes data, // 32 bytes into its memory. let cc := add(_preBytes, 0x20) } lt(mc, end) { // Increase both counters by 32 bytes each iteration. mc := add(mc, 0x20) cc := add(cc, 0x20) } { // Write the _preBytes data into the tempBytes memory 32 bytes // at a time. mstore(mc, mload(cc)) } // Add the length of _postBytes to the current length of tempBytes // and store it as the new length in the first 32 bytes of the // tempBytes memory. length := mload(_postBytes) mstore(tempBytes, add(length, mload(tempBytes))) // Move the memory counter back from a multiple of 0x20 to the // actual end of the _preBytes data. mc := end // Stop copying when the memory counter reaches the new combined // length of the arrays. end := add(mc, length) for { let cc := add(_postBytes, 0x20) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } // Update the free-memory pointer by padding our last write location // to 32 bytes: add 31 bytes to the end of tempBytes to move to the // next 32 byte block, then round down to the nearest multiple of // 32. If the sum of the length of the two arrays is zero then add // one before rounding down to leave a blank 32 bytes (the length block with 0). mstore(0x40, and( add(add(end, iszero(add(length, mload(_preBytes)))), 31), not(31) // Round down to the nearest 32 bytes. )) } return tempBytes; } function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal { assembly { // Read the first 32 bytes of _preBytes storage, which is the length // of the array. (We don't need to use the offset into the slot // because arrays use the entire slot.) let fslot := sload(_preBytes.slot) // Arrays of 31 bytes or less have an even value in their slot, // while longer arrays have an odd value. The actual length is // the slot divided by two for odd values, and the lowest order // byte divided by two for even values. // If the slot is even, bitwise and the slot with 255 and divide by // two to get the length. If the slot is odd, bitwise and the slot // with -1 and divide by two. let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) let mlength := mload(_postBytes) let newlength := add(slength, mlength) // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage switch add(lt(slength, 32), lt(newlength, 32)) case 2 { // Since the new array still fits in the slot, we just need to // update the contents of the slot. // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length sstore( _preBytes.slot, // all the modifications to the slot are inside this // next block add( // we can just add to the slot contents because the // bytes we want to change are the LSBs fslot, add( mul( div( // load the bytes from memory mload(add(_postBytes, 0x20)), // zero all bytes to the right exp(0x100, sub(32, mlength)) ), // and now shift left the number of bytes to // leave space for the length in the slot exp(0x100, sub(32, newlength)) ), // increase length by the double of the memory // bytes length mul(mlength, 2) ) ) ) } case 1 { // The stored value fits in the slot, but the combined value // will exceed it. // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) let sc := add(keccak256(0x0, 0x20), div(slength, 32)) // save new length sstore(_preBytes.slot, add(mul(newlength, 2), 1)) // The contents of the _postBytes array start 32 bytes into // the structure. Our first read should obtain the `submod` // bytes that can fit into the unused space in the last word // of the stored array. To get this, we read 32 bytes starting // from `submod`, so the data we read overlaps with the array // contents by `submod` bytes. Masking the lowest-order // `submod` bytes allows us to add that value directly to the // stored value. let submod := sub(32, slength) let mc := add(_postBytes, submod) let end := add(_postBytes, mlength) let mask := sub(exp(0x100, submod), 1) sstore( sc, add( and( fslot, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00 ), and(mload(mc), mask) ) ) for { mc := add(mc, 0x20) sc := add(sc, 1) } lt(mc, end) { sc := add(sc, 1) mc := add(mc, 0x20) } { sstore(sc, mload(mc)) } mask := exp(0x100, sub(mc, end)) sstore(sc, mul(div(mload(mc), mask), mask)) } default { // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) // Start copying to the last used word of the stored array. let sc := add(keccak256(0x0, 0x20), div(slength, 32)) // save new length sstore(_preBytes.slot, add(mul(newlength, 2), 1)) // Copy over the first `submod` bytes of the new data as in // case 1 above. let slengthmod := mod(slength, 32) let mlengthmod := mod(mlength, 32) let submod := sub(32, slengthmod) let mc := add(_postBytes, submod) let end := add(_postBytes, mlength) let mask := sub(exp(0x100, submod), 1) sstore(sc, add(sload(sc), and(mload(mc), mask))) for { sc := add(sc, 1) mc := add(mc, 0x20) } lt(mc, end) { sc := add(sc, 1) mc := add(mc, 0x20) } { sstore(sc, mload(mc)) } mask := exp(0x100, sub(mc, end)) sstore(sc, mul(div(mload(mc), mask), mask)) } } } function slice( bytes memory _bytes, uint256 _start, uint256 _length ) internal pure returns (bytes memory) { require(_length + 31 >= _length, "slice_overflow"); require(_bytes.length >= _start + _length, "slice_outOfBounds"); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) //zero out the 32 bytes slice we are about to return //we need to do it because Solidity does not garbage collect mstore(tempBytes, 0) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) { require(_bytes.length >= _start + 20, "toAddress_outOfBounds"); address tempAddress; assembly { tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000) } return tempAddress; } function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) { require(_bytes.length >= _start + 1 , "toUint8_outOfBounds"); uint8 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x1), _start)) } return tempUint; } function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) { require(_bytes.length >= _start + 2, "toUint16_outOfBounds"); uint16 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x2), _start)) } return tempUint; } function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) { require(_bytes.length >= _start + 4, "toUint32_outOfBounds"); uint32 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x4), _start)) } return tempUint; } function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) { require(_bytes.length >= _start + 8, "toUint64_outOfBounds"); uint64 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x8), _start)) } return tempUint; } function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) { require(_bytes.length >= _start + 12, "toUint96_outOfBounds"); uint96 tempUint; assembly { tempUint := mload(add(add(_bytes, 0xc), _start)) } return tempUint; } function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) { require(_bytes.length >= _start + 16, "toUint128_outOfBounds"); uint128 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x10), _start)) } return tempUint; } function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) { require(_bytes.length >= _start + 32, "toUint256_outOfBounds"); uint256 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x20), _start)) } return tempUint; } function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) { require(_bytes.length >= _start + 32, "toBytes32_outOfBounds"); bytes32 tempBytes32; assembly { tempBytes32 := mload(add(add(_bytes, 0x20), _start)) } return tempBytes32; } function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) { bool success = true; assembly { let length := mload(_preBytes) // if lengths don't match the arrays are not equal switch eq(length, mload(_postBytes)) case 1 { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 let mc := add(_preBytes, 0x20) let end := add(mc, length) for { let cc := add(_postBytes, 0x20) // the next line is the loop condition: // while(uint256(mc < end) + cb == 2) } eq(add(lt(mc, end), cb), 2) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { // if any of these checks fails then arrays are not equal if iszero(eq(mload(mc), mload(cc))) { // unsuccess: success := 0 cb := 0 } } } default { // unsuccess: success := 0 } } return success; } function equalStorage( bytes storage _preBytes, bytes memory _postBytes ) internal view returns (bool) { bool success = true; assembly { // we know _preBytes_offset is 0 let fslot := sload(_preBytes.slot) // Decode the length of the stored array like in concatStorage(). let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2) let mlength := mload(_postBytes) // if lengths don't match the arrays are not equal switch eq(slength, mlength) case 1 { // slength can contain both the length and contents of the array // if length < 32 bytes so let's prepare for that // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage if iszero(iszero(slength)) { switch lt(slength, 32) case 1 { // blank the last byte which is the length fslot := mul(div(fslot, 0x100), 0x100) if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) { // unsuccess: success := 0 } } default { // cb is a circuit breaker in the for loop since there's // no said feature for inline assembly loops // cb = 1 - don't breaker // cb = 0 - break let cb := 1 // get the keccak hash to get the contents of the array mstore(0x0, _preBytes.slot) let sc := keccak256(0x0, 0x20) let mc := add(_postBytes, 0x20) let end := add(mc, mlength) // the next line is the loop condition: // while(uint256(mc < end) + cb == 2) for {} eq(add(lt(mc, end), cb), 2) { sc := add(sc, 1) mc := add(mc, 0x20) } { if iszero(eq(sload(sc), mload(mc))) { // unsuccess: success := 0 cb := 0 } } } } } default { // unsuccess: success := 0 } } return success; } }
Contract ABI
[{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"previousAdminRole","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"newAdminRole","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DEFAULT_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"REGISTRY_ROLE","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addToRegistryRole","inputs":[{"type":"address","name":"newAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"assignTokens","inputs":[{"type":"bytes[]","name":"projectInput","internalType":"bytes[]"},{"type":"bytes[]","name":"holderOutput","internalType":"bytes[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeProjectEndDate","inputs":[{"type":"bytes[]","name":"bytesParams","internalType":"bytes[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"createProject","inputs":[{"type":"bytes[]","name":"bytesParams","internalType":"bytes[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"bufferAddress","internalType":"address"}],"name":"getBufferContractAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"holderAddress","internalType":"address"}],"name":"getHolderContractAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"projectId","internalType":"uint256"},{"type":"uint256","name":"startDate","internalType":"uint256"},{"type":"uint256","name":"endDate","internalType":"uint256"}],"name":"getProject","inputs":[{"type":"bytes[]","name":"bytesParams","internalType":"bytes[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"projectAddress","internalType":"address"}],"name":"getProjectContractAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getRoleAdmin","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"processClaim","inputs":[{"type":"bytes[]","name":"projectOutput","internalType":"bytes[]"},{"type":"bytes[]","name":"bufferOutput","internalType":"bytes[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeFromRegistryRole","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBufferContractAddress","inputs":[{"type":"address","name":"_bufferContractAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setHolderContractAddress","inputs":[{"type":"address","name":"_holderContractAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setProjectContractAddress","inputs":[{"type":"address","name":"_projectContractAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]}]
Contract Creation Code
0x60806040523480156200001157600080fd5b5062000032620000266200003860201b60201c565b6200004060201b60201c565b62000104565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612a5980620001146000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c806371b44261116100c3578063beaad3bc1161007c578063beaad3bc146103a1578063ced1a214146103bd578063d547741f146103d9578063e652cacb146103f5578063f11ba5d814610411578063f2fde38b1461042d57610158565b806371b44261146102df57806389d8dbb0146102fb5780638da5cb5b1461031757806391d1485414610335578063a1c9ff9714610365578063a217fddf1461038357610158565b80632f2ff15d116101155780632f2ff15d1461022f57806334c100831461024b57806336568abe1461027d57806342f1e8791461029957806360a9f2a0146102b7578063715018a6146102d557610158565b806301ffc9a71461015d578063064f9f801461018d578063091a42ed146101ab5780630d5ab262146101c75780631437c309146101e3578063248a9ca3146101ff575b600080fd5b61017760048036038101906101729190611d83565b610449565b60405161018491906121e3565b60405180910390f35b6101956104c3565b6040516101a291906121a6565b60405180910390f35b6101c560048036038101906101c09190611c9e565b6104ed565b005b6101e160048036038101906101dc9190611c28565b6107c2565b005b6101fd60048036038101906101f89190611c28565b61086b565b005b61021960048036038101906102149190611d16565b610914565b60405161022691906121fe565b60405180910390f35b61024960048036038101906102449190611d43565b610934565b005b61026560048036038101906102609190611c55565b61095d565b6040516102749392919061235b565b60405180910390f35b61029760048036038101906102929190611d43565b610a1a565b005b6102a1610a9d565b6040516102ae91906121fe565b60405180910390f35b6102bf610ac1565b6040516102cc91906121a6565b60405180910390f35b6102dd610aeb565b005b6102f960048036038101906102f49190611c28565b610b73565b005b61031560048036038101906103109190611c55565b610c33565b005b61031f610d2c565b60405161032c91906121a6565b60405180910390f35b61034f600480360381019061034a9190611d43565b610d55565b60405161035c91906121e3565b60405180910390f35b61036d610dc0565b60405161037a91906121a6565b60405180910390f35b61038b610dea565b60405161039891906121fe565b60405180910390f35b6103bb60048036038101906103b69190611c28565b610df1565b005b6103d760048036038101906103d29190611c28565b610eb1565b005b6103f360048036038101906103ee9190611d43565b610f71565b005b61040f600480360381019061040a9190611c55565b610f9a565b005b61042b60048036038101906104269190611c9e565b611093565b005b61044760048036038101906104429190611c28565b61136a565b005b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104bc57506104bb82611462565b5b9050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6105177fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc33610d55565b610556576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054d9061225b565b60405180910390fd5b60405160200161056590612157565b604051602081830303815290604052805190602001208260038151811061058f5761058e612695565b5b60200260200101516040516020016105a79190612140565b60405160208183030381529060405280519060200120146105fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f49061229b565b60405180910390fd5b60405160200161060c90612157565b604051602081830303815290604052805190602001208160038151811061063657610635612695565b5b602002602001015160405160200161064e9190612140565b60405160208183030381529060405280519060200120146106a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069b9061229b565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ba028f75836040518263ffffffff1660e01b81526004016106ff91906121c1565b600060405180830381600087803b15801561071957600080fd5b505af115801561072d573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ba028f75826040518263ffffffff1660e01b815260040161078c91906121c1565b600060405180830381600087803b1580156107a657600080fd5b505af11580156107ba573d6000803e3d6000fd5b505050505050565b6107ca6114cc565b73ffffffffffffffffffffffffffffffffffffffff166107e8610d2c565b73ffffffffffffffffffffffffffffffffffffffff161461083e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610835906122db565b60405180910390fd5b6108687fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc826114d4565b50565b6108736114cc565b73ffffffffffffffffffffffffffffffffffffffff16610891610d2c565b73ffffffffffffffffffffffffffffffffffffffff16146108e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108de906122db565b60405180910390fd5b6109117fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc82610f71565b50565b600060016000838152602001908152602001600020600101549050919050565b61093d82610914565b61094e816109496114cc565b6114e2565b610958838361157f565b505050565b6000806000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334c10083856040518263ffffffff1660e01b81526004016109bd91906121c1565b60606040518083038186803b1580156109d557600080fd5b505afa1580156109e9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0d9190611db0565b9250925092509193909250565b610a226114cc565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a869061233b565b60405180910390fd5b610a99828261165f565b5050565b7fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc81565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610af36114cc565b73ffffffffffffffffffffffffffffffffffffffff16610b11610d2c565b73ffffffffffffffffffffffffffffffffffffffff1614610b67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5e906122db565b60405180910390fd5b610b716000611741565b565b610b7b6114cc565b73ffffffffffffffffffffffffffffffffffffffff16610b99610d2c565b73ffffffffffffffffffffffffffffffffffffffff1614610bef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be6906122db565b60405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610c5d7fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc33610d55565b610c9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c939061225b565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166389d8dbb0826040518263ffffffff1660e01b8152600401610cf791906121c1565b600060405180830381600087803b158015610d1157600080fd5b505af1158015610d25573d6000803e3d6000fd5b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000801b81565b610df96114cc565b73ffffffffffffffffffffffffffffffffffffffff16610e17610d2c565b73ffffffffffffffffffffffffffffffffffffffff1614610e6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e64906122db565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610eb96114cc565b73ffffffffffffffffffffffffffffffffffffffff16610ed7610d2c565b73ffffffffffffffffffffffffffffffffffffffff1614610f2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f24906122db565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610f7a82610914565b610f8b81610f866114cc565b6114e2565b610f95838361165f565b505050565b610fc47fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc33610d55565b611003576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffa9061225b565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e652cacb826040518263ffffffff1660e01b815260040161105e91906121c1565b600060405180830381600087803b15801561107857600080fd5b505af115801561108c573d6000803e3d6000fd5b5050505050565b6110bd7fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc33610d55565b6110fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f39061225b565b60405180910390fd5b806003815181106111105761110f612695565b5b60200260200101516040516020016111289190612140565b604051602081830303815290604052805190602001208260038151811061115257611151612695565b5b602002602001015160405160200161116a9190612140565b60405160208183030381529060405280519060200120146111c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b7906122fb565b60405180910390fd5b6111e6816002815181106111d7576111d6612695565b5b60200260200101516000611805565b61120c836002815181106111fd576111fc612695565b5b60200260200101516000611805565b1461124c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112439061231b565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b45e81bc836040518263ffffffff1660e01b81526004016112a791906121c1565b600060405180830381600087803b1580156112c157600080fd5b505af11580156112d5573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ba028f75826040518263ffffffff1660e01b815260040161133491906121c1565b600060405180830381600087803b15801561134e57600080fd5b505af1158015611362573d6000803e3d6000fd5b505050505050565b6113726114cc565b73ffffffffffffffffffffffffffffffffffffffff16611390610d2c565b73ffffffffffffffffffffffffffffffffffffffff16146113e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113dd906122db565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611456576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144d9061227b565b60405180910390fd5b61145f81611741565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b6114de828261157f565b5050565b6114ec8282610d55565b61157b576115118173ffffffffffffffffffffffffffffffffffffffff16601461186c565b61151f8360001c602061186c565b60405160200161153092919061216c565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115729190612219565b60405180910390fd5b5050565b6115898282610d55565b61165b57600180600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506116006114cc565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6116698282610d55565b1561173d5760006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506116e26114cc565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000602082611814919061249b565b83511015611857576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184e906122bb565b60405180910390fd5b60008260208501015190508091505092915050565b60606000600283600261187f91906124f1565b611889919061249b565b67ffffffffffffffff8111156118a2576118a16126c4565b5b6040519080825280601f01601f1916602001820160405280156118d45781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061190c5761190b612695565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106119705761196f612695565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026119b091906124f1565b6119ba919061249b565b90505b6001811115611a5a577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106119fc576119fb612695565b5b1a60f81b828281518110611a1357611a12612695565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611a539061260b565b90506119bd565b5060008414611a9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a959061223b565b60405180910390fd5b8091505092915050565b6000611abb611ab6846123b7565b612392565b90508083825260208201905082856020860282011115611ade57611add6126f8565b5b60005b85811015611b2c57813567ffffffffffffffff811115611b0457611b036126f3565b5b808601611b118982611be5565b85526020850194506020840193505050600181019050611ae1565b5050509392505050565b6000611b49611b44846123e3565b612392565b905082815260208101848484011115611b6557611b646126fd565b5b611b708482856125c9565b509392505050565b600081359050611b87816129c7565b92915050565b600082601f830112611ba257611ba16126f3565b5b8135611bb2848260208601611aa8565b91505092915050565b600081359050611bca816129de565b92915050565b600081359050611bdf816129f5565b92915050565b600082601f830112611bfa57611bf96126f3565b5b8135611c0a848260208601611b36565b91505092915050565b600081519050611c2281612a0c565b92915050565b600060208284031215611c3e57611c3d612707565b5b6000611c4c84828501611b78565b91505092915050565b600060208284031215611c6b57611c6a612707565b5b600082013567ffffffffffffffff811115611c8957611c88612702565b5b611c9584828501611b8d565b91505092915050565b60008060408385031215611cb557611cb4612707565b5b600083013567ffffffffffffffff811115611cd357611cd2612702565b5b611cdf85828601611b8d565b925050602083013567ffffffffffffffff811115611d0057611cff612702565b5b611d0c85828601611b8d565b9150509250929050565b600060208284031215611d2c57611d2b612707565b5b6000611d3a84828501611bbb565b91505092915050565b60008060408385031215611d5a57611d59612707565b5b6000611d6885828601611bbb565b9250506020611d7985828601611b78565b9150509250929050565b600060208284031215611d9957611d98612707565b5b6000611da784828501611bd0565b91505092915050565b600080600060608486031215611dc957611dc8612707565b5b6000611dd786828701611c13565b9350506020611de886828701611c13565b9250506040611df986828701611c13565b9150509250925092565b6000611e0f8383611eb9565b905092915050565b611e208161254b565b82525050565b6000611e3182612424565b611e3b8185612452565b935083602082028501611e4d85612414565b8060005b85811015611e895784840389528151611e6a8582611e03565b9450611e7583612445565b925060208a01995050600181019050611e51565b50829750879550505050505092915050565b611ea48161255d565b82525050565b611eb381612569565b82525050565b6000611ec48261242f565b611ece8185612463565b9350611ede8185602086016125d8565b611ee78161270c565b840191505092915050565b6000611efd8261242f565b611f078185612474565b9350611f178185602086016125d8565b80840191505092915050565b6000611f2e8261243a565b611f38818561247f565b9350611f488185602086016125d8565b611f518161270c565b840191505092915050565b6000611f678261243a565b611f718185612490565b9350611f818185602086016125d8565b80840191505092915050565b6000611f9a60208361247f565b9150611fa58261271d565b602082019050919050565b6000611fbd602c8361247f565b9150611fc882612746565b604082019050919050565b6000611fe060268361247f565b9150611feb82612795565b604082019050919050565b6000612003600483612490565b915061200e826127e4565b600482019050919050565b6000612026601f8361247f565b91506120318261280d565b602082019050919050565b600061204960158361247f565b915061205482612836565b602082019050919050565b600061206c60208361247f565b91506120778261285f565b602082019050919050565b600061208f60398361247f565b915061209a82612888565b604082019050919050565b60006120b2603a8361247f565b91506120bd826128d7565b604082019050919050565b60006120d5601783612490565b91506120e082612926565b601782019050919050565b60006120f8601183612490565b91506121038261294f565b601182019050919050565b600061211b602f8361247f565b915061212682612978565b604082019050919050565b61213a816125bf565b82525050565b600061214c8284611ef2565b915081905092915050565b600061216282611ff6565b9150819050919050565b6000612177826120c8565b91506121838285611f5c565b915061218e826120eb565b915061219a8284611f5c565b91508190509392505050565b60006020820190506121bb6000830184611e17565b92915050565b600060208201905081810360008301526121db8184611e26565b905092915050565b60006020820190506121f86000830184611e9b565b92915050565b60006020820190506122136000830184611eaa565b92915050565b600060208201905081810360008301526122338184611f23565b905092915050565b6000602082019050818103600083015261225481611f8d565b9050919050565b6000602082019050818103600083015261227481611fb0565b9050919050565b6000602082019050818103600083015261229481611fd3565b9050919050565b600060208201905081810360008301526122b481612019565b9050919050565b600060208201905081810360008301526122d48161203c565b9050919050565b600060208201905081810360008301526122f48161205f565b9050919050565b6000602082019050818103600083015261231481612082565b9050919050565b60006020820190508181036000830152612334816120a5565b9050919050565b600060208201905081810360008301526123548161210e565b9050919050565b60006060820190506123706000830186612131565b61237d6020830185612131565b61238a6040830184612131565b949350505050565b600061239c6123ad565b90506123a88282612635565b919050565b6000604051905090565b600067ffffffffffffffff8211156123d2576123d16126c4565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156123fe576123fd6126c4565b5b6124078261270c565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006124a6826125bf565b91506124b1836125bf565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156124e6576124e5612666565b5b828201905092915050565b60006124fc826125bf565b9150612507836125bf565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156125405761253f612666565b5b828202905092915050565b60006125568261259f565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156125f65780820151818401526020810190506125db565b83811115612605576000848401525b50505050565b6000612616826125bf565b9150600082141561262a57612629612666565b5b600182039050919050565b61263e8261270c565b810181811067ffffffffffffffff8211171561265d5761265c6126c4565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b7f43616c6c6572206973206e6f7420616e2061646d696e206f722043415320707260008201527f6f787920636f6e74726163740000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4643525500000000000000000000000000000000000000000000000000000000600082015250565b7f6f6e6c79204643525520747970652063616e2062652070726f63657373656400600082015250565b7f746f55696e743235365f6f75744f66426f756e64730000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f73616d65207479706573206d7573742062652061737369676e6564206174207060008201527f726f6a656374496e7075742c20686f6c6465724f757470757400000000000000602082015250565b7f73616d6520616d6f756e74206d7573742062652061737369676e65642061742060008201527f70726f6a656374496e7075742c20686f6c6465724f7574707574000000000000602082015250565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6129d08161254b565b81146129db57600080fd5b50565b6129e781612569565b81146129f257600080fd5b50565b6129fe81612573565b8114612a0957600080fd5b50565b612a15816125bf565b8114612a2057600080fd5b5056fea2646970667358221220076fa66a14d39007a6bd0357db99b29d912c763ee6aa1d7d92b253d0b489c02c64736f6c63430008070033
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101585760003560e01c806371b44261116100c3578063beaad3bc1161007c578063beaad3bc146103a1578063ced1a214146103bd578063d547741f146103d9578063e652cacb146103f5578063f11ba5d814610411578063f2fde38b1461042d57610158565b806371b44261146102df57806389d8dbb0146102fb5780638da5cb5b1461031757806391d1485414610335578063a1c9ff9714610365578063a217fddf1461038357610158565b80632f2ff15d116101155780632f2ff15d1461022f57806334c100831461024b57806336568abe1461027d57806342f1e8791461029957806360a9f2a0146102b7578063715018a6146102d557610158565b806301ffc9a71461015d578063064f9f801461018d578063091a42ed146101ab5780630d5ab262146101c75780631437c309146101e3578063248a9ca3146101ff575b600080fd5b61017760048036038101906101729190611d83565b610449565b60405161018491906121e3565b60405180910390f35b6101956104c3565b6040516101a291906121a6565b60405180910390f35b6101c560048036038101906101c09190611c9e565b6104ed565b005b6101e160048036038101906101dc9190611c28565b6107c2565b005b6101fd60048036038101906101f89190611c28565b61086b565b005b61021960048036038101906102149190611d16565b610914565b60405161022691906121fe565b60405180910390f35b61024960048036038101906102449190611d43565b610934565b005b61026560048036038101906102609190611c55565b61095d565b6040516102749392919061235b565b60405180910390f35b61029760048036038101906102929190611d43565b610a1a565b005b6102a1610a9d565b6040516102ae91906121fe565b60405180910390f35b6102bf610ac1565b6040516102cc91906121a6565b60405180910390f35b6102dd610aeb565b005b6102f960048036038101906102f49190611c28565b610b73565b005b61031560048036038101906103109190611c55565b610c33565b005b61031f610d2c565b60405161032c91906121a6565b60405180910390f35b61034f600480360381019061034a9190611d43565b610d55565b60405161035c91906121e3565b60405180910390f35b61036d610dc0565b60405161037a91906121a6565b60405180910390f35b61038b610dea565b60405161039891906121fe565b60405180910390f35b6103bb60048036038101906103b69190611c28565b610df1565b005b6103d760048036038101906103d29190611c28565b610eb1565b005b6103f360048036038101906103ee9190611d43565b610f71565b005b61040f600480360381019061040a9190611c55565b610f9a565b005b61042b60048036038101906104269190611c9e565b611093565b005b61044760048036038101906104429190611c28565b61136a565b005b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104bc57506104bb82611462565b5b9050919050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6105177fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc33610d55565b610556576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054d9061225b565b60405180910390fd5b60405160200161056590612157565b604051602081830303815290604052805190602001208260038151811061058f5761058e612695565b5b60200260200101516040516020016105a79190612140565b60405160208183030381529060405280519060200120146105fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f49061229b565b60405180910390fd5b60405160200161060c90612157565b604051602081830303815290604052805190602001208160038151811061063657610635612695565b5b602002602001015160405160200161064e9190612140565b60405160208183030381529060405280519060200120146106a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069b9061229b565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ba028f75836040518263ffffffff1660e01b81526004016106ff91906121c1565b600060405180830381600087803b15801561071957600080fd5b505af115801561072d573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ba028f75826040518263ffffffff1660e01b815260040161078c91906121c1565b600060405180830381600087803b1580156107a657600080fd5b505af11580156107ba573d6000803e3d6000fd5b505050505050565b6107ca6114cc565b73ffffffffffffffffffffffffffffffffffffffff166107e8610d2c565b73ffffffffffffffffffffffffffffffffffffffff161461083e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610835906122db565b60405180910390fd5b6108687fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc826114d4565b50565b6108736114cc565b73ffffffffffffffffffffffffffffffffffffffff16610891610d2c565b73ffffffffffffffffffffffffffffffffffffffff16146108e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108de906122db565b60405180910390fd5b6109117fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc82610f71565b50565b600060016000838152602001908152602001600020600101549050919050565b61093d82610914565b61094e816109496114cc565b6114e2565b610958838361157f565b505050565b6000806000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334c10083856040518263ffffffff1660e01b81526004016109bd91906121c1565b60606040518083038186803b1580156109d557600080fd5b505afa1580156109e9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0d9190611db0565b9250925092509193909250565b610a226114cc565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a869061233b565b60405180910390fd5b610a99828261165f565b5050565b7fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc81565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610af36114cc565b73ffffffffffffffffffffffffffffffffffffffff16610b11610d2c565b73ffffffffffffffffffffffffffffffffffffffff1614610b67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5e906122db565b60405180910390fd5b610b716000611741565b565b610b7b6114cc565b73ffffffffffffffffffffffffffffffffffffffff16610b99610d2c565b73ffffffffffffffffffffffffffffffffffffffff1614610bef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be6906122db565b60405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610c5d7fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc33610d55565b610c9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c939061225b565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166389d8dbb0826040518263ffffffff1660e01b8152600401610cf791906121c1565b600060405180830381600087803b158015610d1157600080fd5b505af1158015610d25573d6000803e3d6000fd5b5050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000801b81565b610df96114cc565b73ffffffffffffffffffffffffffffffffffffffff16610e17610d2c565b73ffffffffffffffffffffffffffffffffffffffff1614610e6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e64906122db565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610eb96114cc565b73ffffffffffffffffffffffffffffffffffffffff16610ed7610d2c565b73ffffffffffffffffffffffffffffffffffffffff1614610f2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f24906122db565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610f7a82610914565b610f8b81610f866114cc565b6114e2565b610f95838361165f565b505050565b610fc47fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc33610d55565b611003576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffa9061225b565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e652cacb826040518263ffffffff1660e01b815260040161105e91906121c1565b600060405180830381600087803b15801561107857600080fd5b505af115801561108c573d6000803e3d6000fd5b5050505050565b6110bd7fc2979137d1774e40fe2638d355bf7a7b092be4c67f242aad1655e1e27f9df9cc33610d55565b6110fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f39061225b565b60405180910390fd5b806003815181106111105761110f612695565b5b60200260200101516040516020016111289190612140565b604051602081830303815290604052805190602001208260038151811061115257611151612695565b5b602002602001015160405160200161116a9190612140565b60405160208183030381529060405280519060200120146111c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b7906122fb565b60405180910390fd5b6111e6816002815181106111d7576111d6612695565b5b60200260200101516000611805565b61120c836002815181106111fd576111fc612695565b5b60200260200101516000611805565b1461124c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112439061231b565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b45e81bc836040518263ffffffff1660e01b81526004016112a791906121c1565b600060405180830381600087803b1580156112c157600080fd5b505af11580156112d5573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ba028f75826040518263ffffffff1660e01b815260040161133491906121c1565b600060405180830381600087803b15801561134e57600080fd5b505af1158015611362573d6000803e3d6000fd5b505050505050565b6113726114cc565b73ffffffffffffffffffffffffffffffffffffffff16611390610d2c565b73ffffffffffffffffffffffffffffffffffffffff16146113e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113dd906122db565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611456576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144d9061227b565b60405180910390fd5b61145f81611741565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b6114de828261157f565b5050565b6114ec8282610d55565b61157b576115118173ffffffffffffffffffffffffffffffffffffffff16601461186c565b61151f8360001c602061186c565b60405160200161153092919061216c565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115729190612219565b60405180910390fd5b5050565b6115898282610d55565b61165b57600180600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506116006114cc565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6116698282610d55565b1561173d5760006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506116e26114cc565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000602082611814919061249b565b83511015611857576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184e906122bb565b60405180910390fd5b60008260208501015190508091505092915050565b60606000600283600261187f91906124f1565b611889919061249b565b67ffffffffffffffff8111156118a2576118a16126c4565b5b6040519080825280601f01601f1916602001820160405280156118d45781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061190c5761190b612695565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106119705761196f612695565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026119b091906124f1565b6119ba919061249b565b90505b6001811115611a5a577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106119fc576119fb612695565b5b1a60f81b828281518110611a1357611a12612695565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611a539061260b565b90506119bd565b5060008414611a9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a959061223b565b60405180910390fd5b8091505092915050565b6000611abb611ab6846123b7565b612392565b90508083825260208201905082856020860282011115611ade57611add6126f8565b5b60005b85811015611b2c57813567ffffffffffffffff811115611b0457611b036126f3565b5b808601611b118982611be5565b85526020850194506020840193505050600181019050611ae1565b5050509392505050565b6000611b49611b44846123e3565b612392565b905082815260208101848484011115611b6557611b646126fd565b5b611b708482856125c9565b509392505050565b600081359050611b87816129c7565b92915050565b600082601f830112611ba257611ba16126f3565b5b8135611bb2848260208601611aa8565b91505092915050565b600081359050611bca816129de565b92915050565b600081359050611bdf816129f5565b92915050565b600082601f830112611bfa57611bf96126f3565b5b8135611c0a848260208601611b36565b91505092915050565b600081519050611c2281612a0c565b92915050565b600060208284031215611c3e57611c3d612707565b5b6000611c4c84828501611b78565b91505092915050565b600060208284031215611c6b57611c6a612707565b5b600082013567ffffffffffffffff811115611c8957611c88612702565b5b611c9584828501611b8d565b91505092915050565b60008060408385031215611cb557611cb4612707565b5b600083013567ffffffffffffffff811115611cd357611cd2612702565b5b611cdf85828601611b8d565b925050602083013567ffffffffffffffff811115611d0057611cff612702565b5b611d0c85828601611b8d565b9150509250929050565b600060208284031215611d2c57611d2b612707565b5b6000611d3a84828501611bbb565b91505092915050565b60008060408385031215611d5a57611d59612707565b5b6000611d6885828601611bbb565b9250506020611d7985828601611b78565b9150509250929050565b600060208284031215611d9957611d98612707565b5b6000611da784828501611bd0565b91505092915050565b600080600060608486031215611dc957611dc8612707565b5b6000611dd786828701611c13565b9350506020611de886828701611c13565b9250506040611df986828701611c13565b9150509250925092565b6000611e0f8383611eb9565b905092915050565b611e208161254b565b82525050565b6000611e3182612424565b611e3b8185612452565b935083602082028501611e4d85612414565b8060005b85811015611e895784840389528151611e6a8582611e03565b9450611e7583612445565b925060208a01995050600181019050611e51565b50829750879550505050505092915050565b611ea48161255d565b82525050565b611eb381612569565b82525050565b6000611ec48261242f565b611ece8185612463565b9350611ede8185602086016125d8565b611ee78161270c565b840191505092915050565b6000611efd8261242f565b611f078185612474565b9350611f178185602086016125d8565b80840191505092915050565b6000611f2e8261243a565b611f38818561247f565b9350611f488185602086016125d8565b611f518161270c565b840191505092915050565b6000611f678261243a565b611f718185612490565b9350611f818185602086016125d8565b80840191505092915050565b6000611f9a60208361247f565b9150611fa58261271d565b602082019050919050565b6000611fbd602c8361247f565b9150611fc882612746565b604082019050919050565b6000611fe060268361247f565b9150611feb82612795565b604082019050919050565b6000612003600483612490565b915061200e826127e4565b600482019050919050565b6000612026601f8361247f565b91506120318261280d565b602082019050919050565b600061204960158361247f565b915061205482612836565b602082019050919050565b600061206c60208361247f565b91506120778261285f565b602082019050919050565b600061208f60398361247f565b915061209a82612888565b604082019050919050565b60006120b2603a8361247f565b91506120bd826128d7565b604082019050919050565b60006120d5601783612490565b91506120e082612926565b601782019050919050565b60006120f8601183612490565b91506121038261294f565b601182019050919050565b600061211b602f8361247f565b915061212682612978565b604082019050919050565b61213a816125bf565b82525050565b600061214c8284611ef2565b915081905092915050565b600061216282611ff6565b9150819050919050565b6000612177826120c8565b91506121838285611f5c565b915061218e826120eb565b915061219a8284611f5c565b91508190509392505050565b60006020820190506121bb6000830184611e17565b92915050565b600060208201905081810360008301526121db8184611e26565b905092915050565b60006020820190506121f86000830184611e9b565b92915050565b60006020820190506122136000830184611eaa565b92915050565b600060208201905081810360008301526122338184611f23565b905092915050565b6000602082019050818103600083015261225481611f8d565b9050919050565b6000602082019050818103600083015261227481611fb0565b9050919050565b6000602082019050818103600083015261229481611fd3565b9050919050565b600060208201905081810360008301526122b481612019565b9050919050565b600060208201905081810360008301526122d48161203c565b9050919050565b600060208201905081810360008301526122f48161205f565b9050919050565b6000602082019050818103600083015261231481612082565b9050919050565b60006020820190508181036000830152612334816120a5565b9050919050565b600060208201905081810360008301526123548161210e565b9050919050565b60006060820190506123706000830186612131565b61237d6020830185612131565b61238a6040830184612131565b949350505050565b600061239c6123ad565b90506123a88282612635565b919050565b6000604051905090565b600067ffffffffffffffff8211156123d2576123d16126c4565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156123fe576123fd6126c4565b5b6124078261270c565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006124a6826125bf565b91506124b1836125bf565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156124e6576124e5612666565b5b828201905092915050565b60006124fc826125bf565b9150612507836125bf565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156125405761253f612666565b5b828202905092915050565b60006125568261259f565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b838110156125f65780820151818401526020810190506125db565b83811115612605576000848401525b50505050565b6000612616826125bf565b9150600082141561262a57612629612666565b5b600182039050919050565b61263e8261270c565b810181811067ffffffffffffffff8211171561265d5761265c6126c4565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b7f43616c6c6572206973206e6f7420616e2061646d696e206f722043415320707260008201527f6f787920636f6e74726163740000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4643525500000000000000000000000000000000000000000000000000000000600082015250565b7f6f6e6c79204643525520747970652063616e2062652070726f63657373656400600082015250565b7f746f55696e743235365f6f75744f66426f756e64730000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f73616d65207479706573206d7573742062652061737369676e6564206174207060008201527f726f6a656374496e7075742c20686f6c6465724f757470757400000000000000602082015250565b7f73616d6520616d6f756e74206d7573742062652061737369676e65642061742060008201527f70726f6a656374496e7075742c20686f6c6465724f7574707574000000000000602082015250565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6129d08161254b565b81146129db57600080fd5b50565b6129e781612569565b81146129f257600080fd5b50565b6129fe81612573565b8114612a0957600080fd5b50565b612a15816125bf565b8114612a2057600080fd5b5056fea2646970667358221220076fa66a14d39007a6bd0357db99b29d912c763ee6aa1d7d92b253d0b489c02c64736f6c63430008070033