Address Details
contract
0x1168b2135BD2f6DeC0afFcE9bd61118052605B9A
- Contract Name
- CarbonCreditToken
- Creator
- 0x382e12–15731b at 0x650d21–457af2
- 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
- 0 Transactions
- Transfers
- 0 Transfers
- Gas Used
- Fetching gas used...
- Last Balance Update
- 13924498
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- CarbonCreditToken
- Optimization enabled
- false
- Compiler version
- v0.8.13+commit.abaa5c0e
- EVM Version
- london
- Verified at
- 2022-06-09T09:40:39.181897Z
contracts/CarbonCreditToken.sol
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import './abstracts/AbstractToken.sol'; import './interfaces/ICarbonCreditPermissionList.sol'; import './CarbonCreditBundleTokenFactory.sol'; /// @author FlowCarbon LLC /// @title A Carbon Credit Token Reference Implementation contract CarbonCreditToken is AbstractToken { /// @notice Emitted when a token renounces its permission list /// @param renouncedPermissionListAddress - The address of the renounced permission list event PermissionListRenounced(address renouncedPermissionListAddress); /// @notice Emitted when the used permission list changes /// @param oldPermissionListAddress - The address of the old permission list /// @param newPermissionListAddress - The address of the new permission list event PermissionListChanged(address oldPermissionListAddress, address newPermissionListAddress); /// @notice The details of a token struct TokenDetails { /// The methodology of the token (e.g. VERRA) string methodology; /// The credit type of the token (e.g. FORESTRY) string creditType; /// The year in which the offset took place uint16 vintage; } /// @notice Token metadata TokenDetails private _details; /// @notice The permissionlist associated with this token ICarbonCreditPermissionList public permissionList; /// @notice The bundle token factory associated with this token CarbonCreditBundleTokenFactory public carbonCreditBundleTokenFactory; /// @notice Emitted when the contract owner mints new tokens /// @dev The account is already in the Transfer Event and thus omitted here /// @param amount - The amount of tokens that were minted /// @param checksum - A checksum associated with the underlying purchase event event Mint(uint256 amount, bytes32 checksum); /// @notice Checksums associated with the underlying mapped to the number of minted tokens mapping (bytes32 => uint256) private _checksums; /// @notice Checksums associated with the underlying offset event mapped to the number of finally offsetted tokens mapping (bytes32 => uint256) private _offsetChecksums; /// @notice Number of tokens removed from chain uint256 public movedOffChain; function initialize( string memory name_, string memory symbol_, TokenDetails memory details_, ICarbonCreditPermissionList permissionList_, address owner_, CarbonCreditBundleTokenFactory carbonCreditBundleTokenFactory_ ) external initializer { require(details_.vintage > 2000, 'vintage out of bounds'); require(details_.vintage < 2100, 'vintage out of bounds'); require(bytes(details_.methodology).length > 0, 'methodology is required'); require(bytes(details_.creditType).length > 0, 'credit type is required'); require(address(carbonCreditBundleTokenFactory_) != address(0), 'bundle token factory is required'); __AbstractToken_init(name_, symbol_, owner_); _details = details_; permissionList = permissionList_; carbonCreditBundleTokenFactory = carbonCreditBundleTokenFactory_; } /// @notice Mints new tokens, a checksum representing purchase of the underlying with the minting event /// @param account_ - The account that will receive the new tokens /// @param amount_ - The amount of new tokens to be minted /// @param checksum_ - A checksum associated with the underlying purchase event function mint(address account_, uint256 amount_, bytes32 checksum_) external onlyOwner returns (bool) { require(checksum_ > 0, 'checksum is required'); require(_checksums[checksum_] == 0, 'checksum was already used'); _mint(account_, amount_); _checksums[checksum_] = amount_; emit Mint(amount_, checksum_); return true; } /// @notice Get the amount of tokens minted with the given checksum /// @param checksum_ - The checksum associated with a minting event /// @return The amount minted with the associated checksum function amountMintedWithChecksum(bytes32 checksum_) external view returns (uint256) { return _checksums[checksum_]; } /// @notice The contract owner can finalize the offsetting process once the underlying tokens have been offset /// @param amount_ - The number of token to finalize offsetting /// @param checksum_ - The checksum associated with the underlying offset event function finalizeOffset(uint256 amount_, bytes32 checksum_) external onlyOwner returns (bool) { require(checksum_ > 0, 'checksum is required'); require(_offsetChecksums[checksum_] == 0, 'checksum was already used'); require(amount_ <= pendingBalance, 'offset exceeds pending balance'); _offsetChecksums[checksum_] = amount_; pendingBalance -= amount_; offsetBalance += amount_; emit FinalizeOffset(amount_, checksum_); return true; } /// @dev Allow only privileged users to burn the given amount of tokens /// @param amount_ - The amount of tokens to burn function burn(uint256 amount_) public virtual { require( _msgSender() == owner() || carbonCreditBundleTokenFactory.hasContractDeployedAt(_msgSender()), 'sender does not have permission to burn' ); _burn(_msgSender(), amount_); if (owner() == _msgSender()) { movedOffChain += amount_; } } /// @notice Return the balance of tokens offsetted by an address that match the given checksum /// @param checksum_ - The checksum of the associated offset event of the underlying token /// @return The number of tokens that have been offsetted with this checksum function amountOffsettedWithChecksum(bytes32 checksum_) external view returns (uint256) { return _offsetChecksums[checksum_]; } /// @notice The methodology of this token (e.g. VERRA or GOLDSTANDARD) function methodology() external view returns (string memory) { return _details.methodology; } /// @notice The creditType of this token (e.g. 'WETLAND_RESTORATION', or 'REFORESTATION') function creditType() external view returns (string memory) { return _details.creditType; } /// @notice The guaranteed vintage of this year - newer is possible because new is always better :-) function vintage() external view returns (uint16) { return _details.vintage; } /// @notice Renounce the permission list, making this token accessible to everyone /// NOTE: This operation is *irreversible* and will leave the token permanently non-permissioned! function renouncePermissionList() onlyOwner external { permissionList = ICarbonCreditPermissionList(address(0)); emit PermissionListRenounced(address(this)); } /// @notice Set the permission list /// @param permissionList_ - The permission list to use function setPermissionList(ICarbonCreditPermissionList permissionList_) onlyOwner external { require(address(permissionList) != address(0), 'this operation is not allowed for non-permissioned tokens'); require(address(permissionList_) != address(0), 'invalid attempt at renouncing the permission list - use renouncePermissionList() instead'); address oldPermissionListAddress = address(permissionList); permissionList = permissionList_; emit PermissionListChanged(oldPermissionListAddress, address(permissionList_)); } /// @notice Override ERC20.transfer to respect permission lists /// @param from_ - The senders address /// @param to_ - The recipients address /// @param amount_ - The amount of tokens to send function _transfer(address from_, address to_, uint256 amount_) internal virtual override { if (address(permissionList) != address(0)) { require(permissionList.hasPermission(from_), 'the sender is not permitted to transfer this token'); require(permissionList.hasPermission(to_), 'the recipient is not permitted to receive this token'); } return super._transfer(from_, to_, amount_); } }
/_openzeppelin/contracts/access/Ownable.sol
// SPDX-License-Identifier: MIT 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() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
/_openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT 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-upgradeable/access/OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; }
/_openzeppelin/contracts-upgradeable/proxy/ClonesUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. * * _Available since v3.4._ */ library ClonesUpgradeable { /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create(0, ptr, 0x37) } require(instance != address(0), "ERC1167: create failed"); } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple time will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create2(0, ptr, 0x37, salt) } require(instance != address(0), "ERC1167: create2 failed"); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000) mstore(add(ptr, 0x38), shl(0x60, deployer)) mstore(add(ptr, 0x4c), salt) mstore(add(ptr, 0x6c), keccak256(ptr, 0x37)) predicted := keccak256(add(ptr, 0x37), 0x55) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress(address implementation, bytes32 salt) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } }
/_openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
/_openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20Upgradeable.sol"; import "./extensions/IERC20MetadataUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ function __ERC20_init(string memory name_, string memory symbol_) internal initializer { __Context_init_unchained(); __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} uint256[45] private __gap; }
/_openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20MetadataUpgradeable is IERC20Upgradeable { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
/_openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable 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( IERC20Upgradeable 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' 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( IERC20Upgradeable 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( IERC20Upgradeable 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(IERC20Upgradeable 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 require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
/_openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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; 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"); (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"); (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"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/_openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
/_openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
/contracts/CarbonCreditBundleToken.sol
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import '@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol'; import './abstracts/AbstractToken.sol'; import './CarbonCreditToken.sol'; import './CarbonCreditTokenFactory.sol'; /// @author FlowCarbon LLC /// @title A Carbon Credit Bundle Token Reference Implementation contract CarbonCreditBundleToken is AbstractToken { /// @notice The token address and amount of an offset event /// @dev The struct is stored for each checksum struct TokenChecksum { address _tokenAddress; uint256 _amount; } /// @notice Emitted when someone bundles tokens into the bundle token /// @param account - The token sender /// @param amount - The amount of tokens to bundle /// @param tokenAddress - The address of the vanilla underlying event Bundle(address account, uint256 amount, address tokenAddress); /// @notice Emitted when someone unbundles tokens from the bundle /// @param account - The token recipient /// @param amount - The amount of unbundled tokens /// @param tokenAddress - The address of the vanilla underlying event Unbundle(address account, uint256 amount, address tokenAddress); /// @notice Emitted when a new token is added to the bundle /// @param tokenAddress - The new token that is added event TokenAdded(address tokenAddress); /// @notice Emitted when a new token is removed from the bundle /// @param tokenAddress - The token that has been removed event TokenRemoved(address tokenAddress); /// @notice Emitted when a token is paused for deposited or removed /// @param token - the token paused for deposits /// @param paused - whether the token was paused (true) or reactivated (false) event TokenPaused(address token, bool paused); /// @notice Emitted when the minimum vintage requirements change /// @param vintage - The new vintage after the update event VintageIncremented(uint16 vintage); /// @notice The token factory for carbon credit tokens CarbonCreditTokenFactory public carbonCreditTokenFactory; /// @notice The fee divisor taken upon unbundling /// @dev 1/feeDivisor is the fee in % uint256 public feeDivisor; /// @notice The minimal vintage uint16 public vintage; /// @notice The CarbonCreditTokens that form this bundle EnumerableSetUpgradeable.AddressSet private _tokenAddresses; /// @notice Tokens disabled for deposit EnumerableSetUpgradeable.AddressSet private _pausedForDepositTokenAddresses; /// @notice The bookkeeping method on the bundled tokens /// @dev This could differ from the balance if someone sends raw tokens to the contract mapping (CarbonCreditToken => uint256) public bundledAmount; /// @notice Keeps track of checksums, amounts and underlying tokens mapping (bytes32 => TokenChecksum) private _offsetChecksums; uint16 constant MIN_VINTAGE_YEAR = 2000; uint16 constant MAX_VINTAGE_YEAR = 2100; uint8 constant MAX_VINTAGE_INCREMENT = 10; function initialize( string memory name_, string memory symbol_, uint16 vintage_, CarbonCreditToken[] memory tokens_, address owner_, uint256 feeDivisor_, CarbonCreditTokenFactory carbonCreditTokenFactory_ ) external initializer { require(vintage_ > MIN_VINTAGE_YEAR, 'vintage out of bounds'); require(vintage_ < MAX_VINTAGE_YEAR, 'vintage out of bounds'); require(address(carbonCreditTokenFactory_) != address(0), 'token factory is required'); __AbstractToken_init(name_, symbol_, owner_); vintage = vintage_; feeDivisor = feeDivisor_; carbonCreditTokenFactory = carbonCreditTokenFactory_; for (uint256 i = 0; i < tokens_.length; i++) { _addToken(tokens_[i]); } } /// @notice Increasing the vintage /// @dev Existing tokens can no longer be bundled, new tokens require the new vintage /// @param years_ - Number of years to increment the vintage, needs to be smaller than MAX_VINTAGE_INCREMENT function incrementVintage(uint16 years_) external onlyOwner returns (uint16) { require(years_ <= MAX_VINTAGE_INCREMENT, 'vintage increment is too large'); require(vintage + years_ < MAX_VINTAGE_YEAR, 'vintage too high'); vintage += years_; emit VintageIncremented(vintage); return vintage; } /// @notice Check if a token is paused for deposits /// @param token_ - The token to check /// @return Whether the token is paused or not function pausedForDeposits(CarbonCreditToken token_) public view returns (bool) { return EnumerableSetUpgradeable.contains(_pausedForDepositTokenAddresses, address(token_)); } /// @notice Pauses or reactivates deposits for carbon credits /// @param token_ - The token to pause or reactivate /// @return Whether the action had an effect (the token was not already flagged for the respective action) or not function pauseOrReactivateForDeposits(CarbonCreditToken token_, bool pause_) external onlyOwner returns(bool) { require(hasToken(token_), 'token not part of the bundle'); bool actionHadEffect; if (pause_) { actionHadEffect = EnumerableSetUpgradeable.add(_pausedForDepositTokenAddresses, address(token_)); } else { actionHadEffect = EnumerableSetUpgradeable.remove(_pausedForDepositTokenAddresses, address(token_)); } if (actionHadEffect) { emit TokenPaused(address(token_), pause_); } return actionHadEffect; } /// @notice Withdraws tokens that have been transferred to the contract /// @dev This may happen if people accidentally transfer tokens to the bundle instead of using the bundle function /// @param token_ - The token to withdraw orphans for /// @return The amount withdrawn to the owner function withdrawOrphanToken(CarbonCreditToken token_) public returns (uint256) { uint256 _orphanTokens = token_.balanceOf(address(this)) - bundledAmount[token_]; if (_orphanTokens > 0) { SafeERC20Upgradeable.safeTransfer(token_, owner(), _orphanTokens); } return _orphanTokens; } /// @notice Checks if a token exists /// @param token_ - A carbon credit token function hasToken(CarbonCreditToken token_) public view returns (bool) { return EnumerableSetUpgradeable.contains(_tokenAddresses, address(token_)); } /// @notice Number of tokens in this bundle function tokenCount() external view returns (uint256) { return EnumerableSetUpgradeable.length(_tokenAddresses); } /// @notice A token from the bundle /// @dev The ordering may change upon adding / removing /// @param index_ - The index position taken from tokenCount() function tokenAtIndex(uint256 index_) external view returns (address) { return EnumerableSetUpgradeable.at(_tokenAddresses, index_); } /// @notice Adds a new token to the bundle. The token has to match the TokenDetails signature of the bundle /// @param token_ - A carbon credit token that is added to the bundle. /// @return True if token was added, false it if did already exist function addToken(CarbonCreditToken token_) external onlyOwner returns (bool) { return _addToken(token_); } /// @dev Private function to execute addToken so it can be used in the initializer /// @return True if token was added, false it if did already exist function _addToken(CarbonCreditToken token_) private returns (bool) { require(!hasToken(token_), 'token already added to bundle'); require( carbonCreditTokenFactory.hasContractDeployedAt(address(token_)), 'token is not a carbon credit token' ); require(token_.vintage() >= vintage, 'vintage mismatch'); if (EnumerableSetUpgradeable.length(_tokenAddresses) > 0) { address existingBundleFactoryAddress = address( CarbonCreditToken(EnumerableSetUpgradeable.at(_tokenAddresses, 0)).carbonCreditBundleTokenFactory() ); require( existingBundleFactoryAddress == address(token_.carbonCreditBundleTokenFactory()), 'all tokens must share the same bundle token factory' ); } bool isAdded = EnumerableSetUpgradeable.add(_tokenAddresses, address(token_)); emit TokenAdded(address(token_)); return isAdded; } /// @notice Removes a token from the bundle /// @param token_ - The carbon credit token to remove function removeToken(CarbonCreditToken token_) external onlyOwner { address tokenAddress = address(token_); require(EnumerableSetUpgradeable.contains(_tokenAddresses, tokenAddress), 'token is not part of bundle'); withdrawOrphanToken(token_); require(token_.balanceOf(address(this)) == 0, 'token has remaining balance'); EnumerableSetUpgradeable.remove(_tokenAddresses, tokenAddress); emit TokenRemoved(tokenAddress); } /// @notice Bundles an underlying into the bundle, bundle need to be approved beforehand /// @param token_ - The carbon credit token to bundle /// @param amount_ - The amount one wants to bundle function bundle(CarbonCreditToken token_, uint256 amount_) external returns (bool) { address tokenAddress = address(token_); require(EnumerableSetUpgradeable.contains(_tokenAddresses, tokenAddress), 'token is not part of bundle'); require(token_.vintage() >= vintage, 'token outdated'); require(amount_ > 0, 'amount may not be zero'); require(!pausedForDeposits(token_), 'token is paused for bundling'); _mint(_msgSender(), amount_); bundledAmount[token_] += amount_; SafeERC20Upgradeable.safeTransferFrom(token_, _msgSender(), address(this), amount_); emit Bundle(_msgSender(), amount_, tokenAddress); return true; } /// @notice Unbundles an underlying from the bundle, note that a fee may apply /// @param token_ - The carbon credit token to undbundle /// @param amount_ - The amount one wants to unbundle (including fee) /// @return The amount of tokens after fees function unbundle(CarbonCreditToken token_, uint256 amount_) external returns (uint256) { address tokenAddress = address(token_); require(EnumerableSetUpgradeable.contains(_tokenAddresses, tokenAddress), 'token is not part of bundle'); require(token_.balanceOf(address(this)) >= amount_, 'amount exceeds the token balance'); require(amount_ > 0, 'amount may not be zero'); require(amount_ >= feeDivisor, 'fee divisor exceeds amount'); _burn(_msgSender(), amount_); uint256 amountToUnbundle = amount_; if (feeDivisor > 0) { uint256 feeAmount = amount_ / feeDivisor; amountToUnbundle = amount_ - feeAmount; SafeERC20Upgradeable.safeTransfer(token_, owner(), feeAmount); } bundledAmount[token_] -= amount_; SafeERC20Upgradeable.safeTransfer(token_, _msgSender(), amountToUnbundle); emit Unbundle(_msgSender(), amountToUnbundle, tokenAddress); return amountToUnbundle; } /// @notice The contract owner can finalize the offsetting process once the underlying tokens have been offset /// @param token_ - The carbon credit token to finalize the offsetting process for /// @param amount_ - The number of token to finalize offsetting process for /// @param checksum_ - The checksum associated with the underlying offset event function finalizeOffset(CarbonCreditToken token_, uint256 amount_, bytes32 checksum_) external onlyOwner returns (bool) { address tokenAddress = address(token_); require(EnumerableSetUpgradeable.contains(_tokenAddresses, tokenAddress), 'token is not part of bundle'); require(checksum_ > 0, 'checksum is required'); require(_offsetChecksums[checksum_]._amount == 0, 'checksum was already used'); require(amount_ <= pendingBalance, 'offset exceeds pending balance'); require(token_.balanceOf(address(this)) >= amount_, 'amount exceeds the token balance'); pendingBalance -= amount_; _offsetChecksums[checksum_] = TokenChecksum(tokenAddress, amount_); offsetBalance += amount_; bundledAmount[token_] -= amount_; token_.burn(amount_); emit FinalizeOffset(amount_, checksum_); return true; } /// @notice Return the balance of tokens offsetted by an address that match the given checksum /// @param checksum_ - The checksum of the associated offset event of the underlying token /// @return The number of tokens that have been offsetted with this checksum function amountOffsettedWithChecksum(bytes32 checksum_) external view returns (uint256) { return _offsetChecksums[checksum_]._amount; } /// @param checksum_ - The checksum of the associated offset event of the underlying /// @return The address of the CarbonCreditToken that has been offset with this checksum function tokenAddressOffsettedWithChecksum(bytes32 checksum_) external view returns (address) { return _offsetChecksums[checksum_]._tokenAddress; } }
/contracts/CarbonCreditBundleTokenFactory.sol
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import '@openzeppelin/contracts-upgradeable/proxy/ClonesUpgradeable.sol'; import './abstracts/AbstractFactory.sol'; import './CarbonCreditBundleToken.sol'; import './CarbonCreditToken.sol'; import './CarbonCreditTokenFactory.sol'; import './abstracts/AbstractToken.sol'; /// @author FlowCarbon LLC /// @title A Carbon Credit Bundle Token Factory contract CarbonCreditBundleTokenFactory is AbstractFactory { using ClonesUpgradeable for address; /// @notice The token factory for carbon credit tokens CarbonCreditTokenFactory public carbonCreditTokenFactory; /// @param implementationContract_ - The contract to be used as implementation base for new tokens /// @param owner_ - The owner of the contract /// @param carbonCreditTokenFactory_ - The factory used to deploy carbon credits tokens constructor (CarbonCreditBundleToken implementationContract_, address owner_, CarbonCreditTokenFactory carbonCreditTokenFactory_) { require(address(carbonCreditTokenFactory_) != address(0), 'carbonCreditTokenFactory_ may not be zero address'); swapImplementationContract(address(implementationContract_)); carbonCreditTokenFactory = carbonCreditTokenFactory_; transferOwnership(owner_); } /// @notice Deploy a new carbon credit token /// @param name_ - The name of the new token, should be unique within the Flow Carbon Ecosystem /// @param symbol_ - The token symbol of the ERC-20, should be unique within the Flow Carbon Ecosystem /// @param vintage_ - The minimum vintage of this bundle /// @param tokens_ - Initial set of tokens /// @param owner_ - The owner of the bundle token, eligible for fees and able to finalize offsets /// @param feeDivisor_ - The fee divisor that should be taken upon unbundling /// @return The address of the newly created token function createCarbonCreditBundleToken( string memory name_, string memory symbol_, uint16 vintage_, CarbonCreditToken[] memory tokens_, address owner_, uint256 feeDivisor_ ) onlyOwner external returns (address) { CarbonCreditBundleToken token = CarbonCreditBundleToken(implementationContract.clone()); token.initialize(name_, symbol_, vintage_, tokens_, owner_, feeDivisor_, carbonCreditTokenFactory); finalizeCreation(address(token)); return address(token); } }
/contracts/CarbonCreditPermissionList.sol
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; import './interfaces/ICarbonCreditPermissionList.sol'; import './CarbonCreditPermissionList.sol'; /// @author FlowCarbon LLC /// @title List of accounts permitted to transfer or receive carbon credit tokens contract CarbonCreditPermissionList is ICarbonCreditPermissionList, OwnableUpgradeable { using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; EnumerableSetUpgradeable.AddressSet private _permissionList; /// @dev The ecosystem-internal name given to the permission list string private _name; /// @param name_ - The name of the permission list /// @param owner_ - The owner of the permission list, allowed manage it's entries function initialize(string memory name_, address owner_) external initializer { __Ownable_init(); _name = name_; transferOwnership(owner_); } // @notice Return the name of the list function name() external view returns (string memory) { return _name; } // @notice Batch update to grant or revoke permissions of an account // @param []accounts_ - The address to which to grant or revoke permissions // @param []permissions_ - Flags indicating whether to grant or revoke permissions function setPermissions(address[] memory accounts_, bool[] memory permissions_) onlyOwner external { require(accounts_.length == permissions_.length, 'accounts and permissions must have the same length'); for (uint256 i=0; i < accounts_.length; i++) { setPermission(accounts_[i], permissions_[i]); } } // @notice Grant or revoke permissions of an account // @param account_ - The address to which to grant or revoke permissions // @param hasPermission_ - Flag indicating whether to grant or revoke permissions function setPermission(address account_, bool hasPermission_) onlyOwner public { require(account_ != address(0), 'account is required'); bool changed; if (hasPermission_) { changed = _permissionList.add(account_); } else { changed = _permissionList.remove(account_); } if (changed) { emit PermissionChanged(account_, hasPermission_); } } // @notice Return the current permissions of an account // @param account_ - The address to check // @return Flag indicating whether this account has permission or not function hasPermission(address account_) external view returns (bool) { return _permissionList.contains(account_); } // @notice Return the address at the given list index // @dev The ordering may change upon adding / removing // @param index_ - The index into the list // @return Address at the given index function at(uint256 index_) external view returns (address) { return _permissionList.at(index_); } // @notice Get the number of accounts that have been granted permission // @return Number of accounts that have been granted permission function length() external view returns (uint256) { return _permissionList.length(); } /// @dev Overridden to disable renouncing ownership function renounceOwnership() public virtual override onlyOwner { revert('renouncing ownership is disabled'); } }
/contracts/CarbonCreditTokenFactory.sol
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import '@openzeppelin/contracts-upgradeable/proxy/ClonesUpgradeable.sol'; import './abstracts/AbstractFactory.sol'; import './CarbonCreditToken.sol'; import './CarbonCreditPermissionList.sol'; import './CarbonCreditBundleTokenFactory.sol'; /// @author FlowCarbon LLC /// @title A Carbon Credit Token Factory contract CarbonCreditTokenFactory is AbstractFactory { using ClonesUpgradeable for address; CarbonCreditBundleTokenFactory public carbonCreditBundleTokenFactory; /// @param implementationContract_ - the contract that is used a implementation base for new tokens constructor (CarbonCreditToken implementationContract_, address owner_) { swapImplementationContract(address(implementationContract_)); transferOwnership(owner_); } /// @notice Set the carbon credit bundle token factory which is passed to token instances /// @param carbonCreditBundleTokenFactory_ - The factory instance associated with new tokens function setCarbonCreditBundleTokenFactory(CarbonCreditBundleTokenFactory carbonCreditBundleTokenFactory_) external onlyOwner { carbonCreditBundleTokenFactory = carbonCreditBundleTokenFactory_; } /// @notice Deploy a new carbon credit token /// @param name_ - the name of the new token, should be unique within the Flow Carbon Ecosystem /// @param symbol_ - the token symbol of the ERC-20, should be unique within the Flow Carbon Ecosystem /// @param details_ - token details to define the fungibillity characteristics of this token /// @param owner_ - the owner of the new token, able to mint and finalize offsets /// @return the address of the newly created token function createCarbonCreditToken( string memory name_, string memory symbol_, CarbonCreditToken.TokenDetails memory details_, ICarbonCreditPermissionList permissionList_, address owner_) onlyOwner external returns (address) { require(address(carbonCreditBundleTokenFactory) != address(0), 'bundle token factory is not set'); CarbonCreditToken token = CarbonCreditToken(implementationContract.clone()); token.initialize(name_, symbol_, details_, permissionList_, owner_, carbonCreditBundleTokenFactory); finalizeCreation(address(token)); return address(token); } }
/contracts/abstracts/AbstractFactory.sol
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol'; /// @author FlowCarbon LLC /// @title A Carbon Credit Token Factory abstract contract AbstractFactory is Ownable { using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; /// @notice Emitted after the implementation contract has been swapped /// @param contractAddress - The address of the new implementation contract event SwappedImplementationContract(address contractAddress); /// @notice Emitted after a new token has been created by this factory /// @param instanceAddress - The address of the freshly deployed contract event InstanceCreated(address instanceAddress); /// @notice The implementation contract used to create new instances address public implementationContract; /// @dev Discoverable contracts that have been deployed by this factory EnumerableSetUpgradeable.AddressSet private _deployedContracts; /// @notice The owner is able to swap out the underlying token implementation /// @param implementationContract_ - The contract to be used from now on function swapImplementationContract(address implementationContract_) onlyOwner public returns (bool) { require(implementationContract_ != address(0), 'null address given as implementation contract'); implementationContract = implementationContract_; emit SwappedImplementationContract(implementationContract_); return true; } /// @notice Check if a contract as been released by this factory /// @param address_ - The address of the contract /// @return Whether this contract has been deployed by this factory function hasContractDeployedAt(address address_) external view returns (bool) { return _deployedContracts.contains(address_); } /// @notice The number of contracts deployed by this factory function deployedContractsCount() external view returns (uint256) { return _deployedContracts.length(); } /// @notice The contract deployed at a specific index /// @dev The ordering may change upon adding / removing /// @param index_ - The index into the set function deployedContractAt(uint256 index_) external view returns (address) { return _deployedContracts.at(index_); } /// @dev Internal function that should be called after each clone /// @param address_ - A freshly created token address function finalizeCreation(address address_) internal { _deployedContracts.add(address_); emit InstanceCreated(address_); } /// @dev Overridden to disable renouncing ownership function renounceOwnership() public virtual override onlyOwner { revert('renouncing ownership is disabled'); } }
/contracts/abstracts/AbstractToken.sol
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; import '@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol'; import '../interfaces/ICarbonCreditTokenInterface.sol'; /// @author FlowCarbon LLC /// @title An Abstract Carbon Credit Token abstract contract AbstractToken is ICarbonCreditTokenInterface, Initializable, OwnableUpgradeable, ERC20Upgradeable { /// @notice the time and amount of a specific offset struct OffsetEntry { uint time; uint amount; } /// @notice Emitted when the underlying token is offset /// @param amount - The amount of tokens offset /// @param checksum - The checksum associated with the offset event event FinalizeOffset(uint256 amount, bytes32 checksum); /// @notice User mapping to the amount of offset tokens mapping (address => uint256) internal _offsetBalances; /// @notice Number of tokens offset by the protocol that have not been finalized yet uint256 public pendingBalance; /// @notice Number of tokens fully offset uint256 public offsetBalance; /// @dev Mapping of user to offsets to make them discoverable mapping(address => OffsetEntry[]) private _offsets; function __AbstractToken_init(string memory name_, string memory symbol_, address owner_) internal initializer { require(bytes(name_).length > 0, 'name is required'); require(bytes(symbol_).length > 0, 'symbol is required'); __ERC20_init(name_, symbol_); __Ownable_init(); transferOwnership(owner_); } /// @dev See ICarbonCreditTokenInterface function offsetCountOf(address address_) external view returns (uint256) { return _offsets[address_].length; } /// @dev See ICarbonCreditTokenInterface function offsetAmountAtIndex(address address_, uint256 index_) external view returns(uint256) { return _offsets[address_][index_].amount; } /// @dev See ICarbonCreditTokenInterface function offsetTimeAtIndex(address address_, uint256 index_) external view returns(uint256) { return _offsets[address_][index_].time; } //// @dev See ICarbonCreditTokenInterface function offsetBalanceOf(address account_) external view returns (uint256) { return _offsetBalances[account_]; } /// @dev Common functionality of the two offset functions function _offset(address account_, uint256 amount_) internal { _burn(_msgSender(), amount_); _offsetBalances[account_] += amount_; pendingBalance += amount_; _offsets[account_].push(OffsetEntry(block.timestamp, amount_)); emit Offset(account_, amount_); } /// @dev See ICarbonCreditTokenInterface function offsetOnBehalfOf(address account_, uint256 amount_) external { _offset(account_, amount_); } /// @dev See ICarbonCreditTokenInterface function offset(uint256 amount_) external { _offset(_msgSender(), amount_); } /// @dev Overridden to disable renouncing ownership function renounceOwnership() public virtual override onlyOwner { revert('renouncing ownership is disabled'); } }
/contracts/interfaces/ICarbonCreditPermissionList.sol
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; /// @author FlowCarbon LLC /// @title The common interface of carbon credit permission lists interface ICarbonCreditPermissionList { /// @notice Emitted when the list state changes /// @param account - The account for which permissions have changed /// @param hasPermission - Flag indicating whether permissions were granted or revoked event PermissionChanged(address account, bool hasPermission); // @notice Return the name of the list function name() external view returns (string memory); // @notice Grant or revoke permissions of an account // @param account_ - The address to which to grant or revoke permissions // @param hasPermission_ - Flag indicating whether to grant or revoke permissions function setPermission(address account_, bool hasPermission_) external; // @notice Return the current permissions of an account // @param account_ - The address to check // @return Flag indicating whether this account has permission or not function hasPermission(address account_) external view returns (bool); // @notice Return the address at the given list index // @param index_ - The index into the list // @return Address at the given index function at(uint256 index_) external view returns (address); // @notice Get the number of accounts that have been granted permission // @return Number of accounts that have been granted permission function length() external view returns (uint256); }
/contracts/interfaces/ICarbonCreditTokenInterface.sol
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; /// @author FlowCarbon LLC /// @title The common interface of carbon credit tokens interface ICarbonCreditTokenInterface { /// @notice Emitted when someone offsets carbon tokens /// @param account - The account credited with offsetting /// @param amount - The amount of carbon that was offset event Offset(address account, uint256 amount); /// @notice Offset on behalf of the user /// @dev This will only offset tokens send by msg.sender, increases tokens awaiting finalization /// @param amount_ - The number of tokens to be offset function offset(uint256 amount_) external; /// @notice Offsets on behalf of the given address /// @dev This will offset tokens on behalf of account, increases tokens awaiting finalization /// @param account_ - The address of the account to offset on behalf of /// @param amount_ - The number of tokens to be offset function offsetOnBehalfOf(address account_, uint256 amount_) external; /// @notice Return the balance of tokens offsetted by the given address /// @param account_ - The account for which to check the number of tokens that were offset /// @return The number of tokens offsetted by the given account function offsetBalanceOf(address account_) external view returns (uint256); /// @notice Returns the number of offsets for the given address /// @dev This is a pattern to discover all offsets and their occurrences for a user /// @param address_ - Address of the user that offsetted the tokens function offsetCountOf(address address_) external view returns(uint256); /// @notice Returns amount of offsetted tokens for the given address and index /// @param address_ - Address of the user who did the offsets /// @param index_ - Index into the list function offsetAmountAtIndex(address address_, uint256 index_) external view returns(uint256); /// @notice Returns the timestamp of an offset for the given address and index /// @param address_ - Address of the user who did the offsets /// @param index_ - Index into the list function offsetTimeAtIndex(address address_, uint256 index_) external view returns(uint256); }
Contract ABI
[{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FinalizeOffset","inputs":[{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"bytes32","name":"checksum","internalType":"bytes32","indexed":false}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"bytes32","name":"checksum","internalType":"bytes32","indexed":false}],"anonymous":false},{"type":"event","name":"Offset","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"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":"PermissionListChanged","inputs":[{"type":"address","name":"oldPermissionListAddress","internalType":"address","indexed":false},{"type":"address","name":"newPermissionListAddress","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"PermissionListRenounced","inputs":[{"type":"address","name":"renouncedPermissionListAddress","internalType":"address","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":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"amountMintedWithChecksum","inputs":[{"type":"bytes32","name":"checksum_","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"amountOffsettedWithChecksum","inputs":[{"type":"bytes32","name":"checksum_","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"amount_","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract CarbonCreditBundleTokenFactory"}],"name":"carbonCreditBundleTokenFactory","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"creditType","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"finalizeOffset","inputs":[{"type":"uint256","name":"amount_","internalType":"uint256"},{"type":"bytes32","name":"checksum_","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"string","name":"name_","internalType":"string"},{"type":"string","name":"symbol_","internalType":"string"},{"type":"tuple","name":"details_","internalType":"struct CarbonCreditToken.TokenDetails","components":[{"type":"string","name":"methodology","internalType":"string"},{"type":"string","name":"creditType","internalType":"string"},{"type":"uint16","name":"vintage","internalType":"uint16"}]},{"type":"address","name":"permissionList_","internalType":"contract ICarbonCreditPermissionList"},{"type":"address","name":"owner_","internalType":"address"},{"type":"address","name":"carbonCreditBundleTokenFactory_","internalType":"contract CarbonCreditBundleTokenFactory"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"methodology","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"mint","inputs":[{"type":"address","name":"account_","internalType":"address"},{"type":"uint256","name":"amount_","internalType":"uint256"},{"type":"bytes32","name":"checksum_","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"movedOffChain","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"offset","inputs":[{"type":"uint256","name":"amount_","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"offsetAmountAtIndex","inputs":[{"type":"address","name":"address_","internalType":"address"},{"type":"uint256","name":"index_","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"offsetBalance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"offsetBalanceOf","inputs":[{"type":"address","name":"account_","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"offsetCountOf","inputs":[{"type":"address","name":"address_","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"offsetOnBehalfOf","inputs":[{"type":"address","name":"account_","internalType":"address"},{"type":"uint256","name":"amount_","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"offsetTimeAtIndex","inputs":[{"type":"address","name":"address_","internalType":"address"},{"type":"uint256","name":"index_","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"pendingBalance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ICarbonCreditPermissionList"}],"name":"permissionList","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renouncePermissionList","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPermissionList","inputs":[{"type":"address","name":"permissionList_","internalType":"contract ICarbonCreditPermissionList"}]},{"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":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint16","name":"","internalType":"uint16"}],"name":"vintage","inputs":[]}]
Contract Creation Code
0x608060405234801561001057600080fd5b506148d0806100206000396000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c80638da5cb5b11610125578063b434b82c116100ad578063bc1905cb1161007c578063bc1905cb14610669578063cdcf35b814610699578063dd62ed3e146106b7578063e097d633146106e7578063f2fde38b146107175761021c565b8063b434b82c146105e3578063b4f74380146105ff578063b55c1b6e1461062f578063ba0c41761461064b5761021c565b80639bb316dd116100f45780639bb316dd146105175780639bd2ef98146105355780639eeb1d5014610565578063a457c2d714610583578063a9059cbb146105b35761021c565b80638da5cb5b146104a15780638da61ee0146104bf57806392003cec146104dd57806395d89b41146104f95761021c565b806339509351116101a857806357b4d18e1161017757806357b4d18e146103e95780636202b6421461040757806370a0823114610437578063715018a61461046757806389004413146104715761021c565b8063395093511461034f57806341815ee41461037f57806342966c681461039d5780635726dd86146103b95761021c565b8063169da045116101ef578063169da0451461029757806318160ddd146102b35780631e458bee146102d157806323b872dd14610301578063313ce567146103315761021c565b806305491d6a1461022157806306fdde031461022b578063095ea7b31461024957806313b56bbf14610279575b600080fd5b610229610733565b005b61023361082a565b6040516102409190612fec565b60405180910390f35b610263600480360381019061025e91906130b6565b6108bc565b6040516102709190613111565b60405180910390f35b6102816108da565b60405161028e919061318b565b60405180910390f35b6102b160048036038101906102ac91906130b6565b610900565b005b6102bb61090e565b6040516102c891906131b5565b60405180910390f35b6102eb60048036038101906102e69190613206565b610918565b6040516102f89190613111565b60405180910390f35b61031b60048036038101906103169190613259565b610a97565b6040516103289190613111565b60405180910390f35b610339610b8f565b60405161034691906132c8565b60405180910390f35b610369600480360381019061036491906130b6565b610b98565b6040516103769190613111565b60405180910390f35b610387610c44565b6040516103949190612fec565b60405180910390f35b6103b760048036038101906103b291906132e3565b610cd9565b005b6103d360048036038101906103ce9190613310565b610e6e565b6040516103e091906131b5565b60405180910390f35b6103f1610e8b565b6040516103fe91906131b5565b60405180910390f35b610421600480360381019061041c91906130b6565b610e91565b60405161042e91906131b5565b60405180910390f35b610451600480360381019061044c919061333d565b610efe565b60405161045e91906131b5565b60405180910390f35b61046f610f47565b005b61048b60048036038101906104869190613310565b610ffe565b60405161049891906131b5565b60405180910390f35b6104a961101b565b6040516104b69190613379565b60405180910390f35b6104c7611045565b6040516104d491906133b1565b60405180910390f35b6104f760048036038101906104f291906132e3565b611060565b005b610501611074565b60405161050e9190612fec565b60405180910390f35b61051f611106565b60405161052c91906133ed565b60405180910390f35b61054f600480360381019061054a919061333d565b61112c565b60405161055c91906131b5565b60405180910390f35b61056d611178565b60405161057a9190612fec565b60405180910390f35b61059d600480360381019061059891906130b6565b61120d565b6040516105aa9190613111565b60405180910390f35b6105cd60048036038101906105c891906130b6565b6112f8565b6040516105da9190613111565b60405180910390f35b6105fd60048036038101906105f8919061368b565b611316565b005b610619600480360381019061061491906130b6565b61167c565b60405161062691906131b5565b60405180910390f35b6106496004803603810190610644919061376c565b6116e9565b005b61065361190a565b60405161066091906131b5565b60405180910390f35b610683600480360381019061067e919061333d565b611910565b60405161069091906131b5565b60405180910390f35b6106a1611959565b6040516106ae91906131b5565b60405180910390f35b6106d160048036038101906106cc9190613799565b61195f565b6040516106de91906131b5565b60405180910390f35b61070160048036038101906106fc91906137d9565b6119e6565b60405161070e9190613111565b60405180910390f35b610731600480360381019061072c919061333d565b611bd1565b005b61073b611cc8565b73ffffffffffffffffffffffffffffffffffffffff1661075961101b565b73ffffffffffffffffffffffffffffffffffffffff16146107af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a690613865565b60405180910390fd5b6000609e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f04bd2ccff622685b2eec8351c69709e7b65be2427411189caf339bc41722b02b306040516108209190613379565b60405180910390a1565b606060688054610839906138b4565b80601f0160208091040260200160405190810160405280929190818152602001828054610865906138b4565b80156108b25780601f10610887576101008083540402835291602001916108b2565b820191906000526020600020905b81548152906001019060200180831161089557829003601f168201915b5050505050905090565b60006108d06108c9611cc8565b8484611cd0565b6001905092915050565b609f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61090a8282611e99565b5050565b6000606754905090565b6000610922611cc8565b73ffffffffffffffffffffffffffffffffffffffff1661094061101b565b73ffffffffffffffffffffffffffffffffffffffff1614610996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098d90613865565b60405180910390fd5b6000801b82116109db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d290613931565b60405180910390fd5b600060a060008481526020019081526020016000205414610a31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a289061399d565b60405180910390fd5b610a3b8484611fe9565b8260a06000848152602001908152602001600020819055507fa1b5a5ca3372cb8497824d875a6262debd1f02d8a4a4b3970b79e283bdd6404b8383604051610a849291906139cc565b60405180910390a1600190509392505050565b6000610aa4848484612149565b6000606660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610aef611cc8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610b6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6690613a67565b60405180910390fd5b610b8385610b7b611cc8565b858403611cd0565b60019150509392505050565b60006012905090565b6000610c3a610ba5611cc8565b848460666000610bb3611cc8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610c359190613ab6565b611cd0565b6001905092915050565b6060609b6001018054610c56906138b4565b80601f0160208091040260200160405190810160405280929190818152602001828054610c82906138b4565b8015610ccf5780601f10610ca457610100808354040283529160200191610ccf565b820191906000526020600020905b815481529060010190602001808311610cb257829003601f168201915b5050505050905090565b610ce161101b565b73ffffffffffffffffffffffffffffffffffffffff16610cff611cc8565b73ffffffffffffffffffffffffffffffffffffffff161480610dc05750609f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379222db8610d62611cc8565b6040518263ffffffff1660e01b8152600401610d7e9190613379565b602060405180830381865afa158015610d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbf9190613b38565b5b610dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df690613bd7565b60405180910390fd5b610e10610e0a611cc8565b82612366565b610e18611cc8565b73ffffffffffffffffffffffffffffffffffffffff16610e3661101b565b73ffffffffffffffffffffffffffffffffffffffff1603610e6b578060a26000828254610e639190613ab6565b925050819055505b50565b600060a16000838152602001908152602001600020549050919050565b60985481565b6000609a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110610ee457610ee3613bf7565b5b906000526020600020906002020160000154905092915050565b6000606560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610f4f611cc8565b73ffffffffffffffffffffffffffffffffffffffff16610f6d61101b565b73ffffffffffffffffffffffffffffffffffffffff1614610fc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fba90613865565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff590613c72565b60405180910390fd5b600060a06000838152602001908152602001600020549050919050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000609b60020160009054906101000a900461ffff16905090565b61107161106b611cc8565b82611e99565b50565b606060698054611083906138b4565b80601f01602080910402602001604051908101604052809291908181526020018280546110af906138b4565b80156110fc5780601f106110d1576101008083540402835291602001916110fc565b820191906000526020600020905b8154815290600101906020018083116110df57829003601f168201915b5050505050905090565b609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000609a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6060609b600001805461118a906138b4565b80601f01602080910402602001604051908101604052809291908181526020018280546111b6906138b4565b80156112035780601f106111d857610100808354040283529160200191611203565b820191906000526020600020905b8154815290600101906020018083116111e657829003601f168201915b5050505050905090565b6000806066600061121c611cc8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156112d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d090613d04565b60405180910390fd5b6112ed6112e4611cc8565b85858403611cd0565b600191505092915050565b600061130c611305611cc8565b8484612149565b6001905092915050565b600060019054906101000a900460ff168061133c575060008054906101000a900460ff16155b61137b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137290613d96565b60405180910390fd5b60008060019054906101000a900460ff1615905080156113cb576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6107d0856040015161ffff1611611417576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140e90613e02565b60405180910390fd5b610834856040015161ffff1610611463576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145a90613e02565b60405180910390fd5b6000856000015151116114ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a290613e6e565b60405180910390fd5b6000856020015151116114f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ea90613eda565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155990613f46565b60405180910390fd5b61156d87878561253e565b84609b600082015181600001908051906020019061158c929190612eb0565b5060208201518160010190805190602001906115a9929190612eb0565b5060408201518160020160006101000a81548161ffff021916908361ffff16021790555090505083609e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081609f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080156116735760008060016101000a81548160ff0219169083151502179055505b50505050505050565b6000609a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106116cf576116ce613bf7565b5b906000526020600020906002020160010154905092915050565b6116f1611cc8565b73ffffffffffffffffffffffffffffffffffffffff1661170f61101b565b73ffffffffffffffffffffffffffffffffffffffff1614611765576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161175c90613865565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036117f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ed90613fd8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185c90614090565b60405180910390fd5b6000609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081609e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f9bd0fe40275fbf617308607102b18959fd7afd75840e32597c44b7aefd9e624081836040516118fe9291906140b0565b60405180910390a15050565b60a25481565b6000609760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60995481565b6000606660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006119f0611cc8565b73ffffffffffffffffffffffffffffffffffffffff16611a0e61101b565b73ffffffffffffffffffffffffffffffffffffffff1614611a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a5b90613865565b60405180910390fd5b6000801b8211611aa9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa090613931565b60405180910390fd5b600060a160008481526020019081526020016000205414611aff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611af69061399d565b60405180910390fd5b609854831115611b44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3b90614125565b60405180910390fd5b8260a16000848152602001908152602001600020819055508260986000828254611b6e9190614145565b925050819055508260996000828254611b879190613ab6565b925050819055507f532709d2ea1c0a15357d1ecde99a26077d0d42cc72899a902bc9bc019b57224e8383604051611bbf9291906139cc565b60405180910390a16001905092915050565b611bd9611cc8565b73ffffffffffffffffffffffffffffffffffffffff16611bf761101b565b73ffffffffffffffffffffffffffffffffffffffff1614611c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4490613865565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb3906141eb565b60405180910390fd5b611cc5816126bd565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611d3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d369061427d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611dae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da59061430f565b60405180910390fd5b80606660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611e8c91906131b5565b60405180910390a3505050565b611eaa611ea4611cc8565b82612366565b80609760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ef99190613ab6565b925050819055508060986000828254611f129190613ab6565b92505081905550609a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405280428152602001838152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550507f34ea76956884cf5a870184e95247be7a9ce55b0fd84ac7a88665a0bdad0085f18282604051611fdd92919061432f565b60405180910390a15050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612058576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204f906143a4565b60405180910390fd5b61206460008383612783565b80606760008282546120769190613ab6565b9250508190555080606560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120cc9190613ab6565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161213191906131b5565b60405180910390a361214560008383612788565b5050565b600073ffffffffffffffffffffffffffffffffffffffff16609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461235657609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166397128e00846040518263ffffffff1660e01b81526004016121fa9190613379565b602060405180830381865afa158015612217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061223b9190613b38565b61227a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227190614436565b60405180910390fd5b609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166397128e00836040518263ffffffff1660e01b81526004016122d59190613379565b602060405180830381865afa1580156122f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123169190613b38565b612355576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234c906144c8565b60405180910390fd5b5b61236183838361278d565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036123d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123cc9061455a565b60405180910390fd5b6123e182600083612783565b6000606560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612468576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245f906145ec565b60405180910390fd5b818103606560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081606760008282546124c09190614145565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161252591906131b5565b60405180910390a361253983600084612788565b505050565b600060019054906101000a900460ff1680612564575060008054906101000a900460ff16155b6125a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161259a90613d96565b60405180910390fd5b60008060019054906101000a900460ff1615905080156125f3576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6000845111612637576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161262e90614658565b60405180910390fd5b600083511161267b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612672906146c4565b60405180910390fd5b6126858484612a0f565b61268d612afc565b61269682611bd1565b80156126b75760008060016101000a81548160ff0219169083151502179055505b50505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b505050565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036127fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127f390614756565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361286b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612862906147e8565b60405180910390fd5b612876838383612783565b6000606560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156128fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128f49061487a565b60405180910390fd5b818103606560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081606560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129929190613ab6565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516129f691906131b5565b60405180910390a3612a09848484612788565b50505050565b600060019054906101000a900460ff1680612a35575060008054906101000a900460ff16155b612a74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a6b90613d96565b60405180910390fd5b60008060019054906101000a900460ff161590508015612ac4576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612acc612be5565b612ad68383612cbe565b8015612af75760008060016101000a81548160ff0219169083151502179055505b505050565b600060019054906101000a900460ff1680612b22575060008054906101000a900460ff16155b612b61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b5890613d96565b60405180910390fd5b60008060019054906101000a900460ff161590508015612bb1576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612bb9612be5565b612bc1612dc7565b8015612be25760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680612c0b575060008054906101000a900460ff16155b612c4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c4190613d96565b60405180910390fd5b60008060019054906101000a900460ff161590508015612c9a576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8015612cbb5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680612ce4575060008054906101000a900460ff16155b612d23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d1a90613d96565b60405180910390fd5b60008060019054906101000a900460ff161590508015612d73576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8260689080519060200190612d89929190612eb0565b508160699080519060200190612da0929190612eb0565b508015612dc25760008060016101000a81548160ff0219169083151502179055505b505050565b600060019054906101000a900460ff1680612ded575060008054906101000a900460ff16155b612e2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e2390613d96565b60405180910390fd5b60008060019054906101000a900460ff161590508015612e7c576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612e8c612e87611cc8565b6126bd565b8015612ead5760008060016101000a81548160ff0219169083151502179055505b50565b828054612ebc906138b4565b90600052602060002090601f016020900481019282612ede5760008555612f25565b82601f10612ef757805160ff1916838001178555612f25565b82800160010185558215612f25579182015b82811115612f24578251825591602001919060010190612f09565b5b509050612f329190612f36565b5090565b5b80821115612f4f576000816000905550600101612f37565b5090565b600081519050919050565b600082825260208201905092915050565b60005b83811015612f8d578082015181840152602081019050612f72565b83811115612f9c576000848401525b50505050565b6000601f19601f8301169050919050565b6000612fbe82612f53565b612fc88185612f5e565b9350612fd8818560208601612f6f565b612fe181612fa2565b840191505092915050565b600060208201905081810360008301526130068184612fb3565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061304d82613022565b9050919050565b61305d81613042565b811461306857600080fd5b50565b60008135905061307a81613054565b92915050565b6000819050919050565b61309381613080565b811461309e57600080fd5b50565b6000813590506130b08161308a565b92915050565b600080604083850312156130cd576130cc613018565b5b60006130db8582860161306b565b92505060206130ec858286016130a1565b9150509250929050565b60008115159050919050565b61310b816130f6565b82525050565b60006020820190506131266000830184613102565b92915050565b6000819050919050565b600061315161314c61314784613022565b61312c565b613022565b9050919050565b600061316382613136565b9050919050565b600061317582613158565b9050919050565b6131858161316a565b82525050565b60006020820190506131a0600083018461317c565b92915050565b6131af81613080565b82525050565b60006020820190506131ca60008301846131a6565b92915050565b6000819050919050565b6131e3816131d0565b81146131ee57600080fd5b50565b600081359050613200816131da565b92915050565b60008060006060848603121561321f5761321e613018565b5b600061322d8682870161306b565b935050602061323e868287016130a1565b925050604061324f868287016131f1565b9150509250925092565b60008060006060848603121561327257613271613018565b5b60006132808682870161306b565b93505060206132918682870161306b565b92505060406132a2868287016130a1565b9150509250925092565b600060ff82169050919050565b6132c2816132ac565b82525050565b60006020820190506132dd60008301846132b9565b92915050565b6000602082840312156132f9576132f8613018565b5b6000613307848285016130a1565b91505092915050565b60006020828403121561332657613325613018565b5b6000613334848285016131f1565b91505092915050565b60006020828403121561335357613352613018565b5b60006133618482850161306b565b91505092915050565b61337381613042565b82525050565b600060208201905061338e600083018461336a565b92915050565b600061ffff82169050919050565b6133ab81613394565b82525050565b60006020820190506133c660008301846133a2565b92915050565b60006133d782613158565b9050919050565b6133e7816133cc565b82525050565b600060208201905061340260008301846133de565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61344a82612fa2565b810181811067ffffffffffffffff8211171561346957613468613412565b5b80604052505050565b600061347c61300e565b90506134888282613441565b919050565b600067ffffffffffffffff8211156134a8576134a7613412565b5b6134b182612fa2565b9050602081019050919050565b82818337600083830152505050565b60006134e06134db8461348d565b613472565b9050828152602081018484840111156134fc576134fb61340d565b5b6135078482856134be565b509392505050565b600082601f83011261352457613523613408565b5b81356135348482602086016134cd565b91505092915050565b600080fd5b600080fd5b61355081613394565b811461355b57600080fd5b50565b60008135905061356d81613547565b92915050565b6000606082840312156135895761358861353d565b5b6135936060613472565b9050600082013567ffffffffffffffff8111156135b3576135b2613542565b5b6135bf8482850161350f565b600083015250602082013567ffffffffffffffff8111156135e3576135e2613542565b5b6135ef8482850161350f565b60208301525060406136038482850161355e565b60408301525092915050565b600061361a82613042565b9050919050565b61362a8161360f565b811461363557600080fd5b50565b60008135905061364781613621565b92915050565b600061365882613042565b9050919050565b6136688161364d565b811461367357600080fd5b50565b6000813590506136858161365f565b92915050565b60008060008060008060c087890312156136a8576136a7613018565b5b600087013567ffffffffffffffff8111156136c6576136c561301d565b5b6136d289828a0161350f565b965050602087013567ffffffffffffffff8111156136f3576136f261301d565b5b6136ff89828a0161350f565b955050604087013567ffffffffffffffff8111156137205761371f61301d565b5b61372c89828a01613573565b945050606061373d89828a01613638565b935050608061374e89828a0161306b565b92505060a061375f89828a01613676565b9150509295509295509295565b60006020828403121561378257613781613018565b5b600061379084828501613638565b91505092915050565b600080604083850312156137b0576137af613018565b5b60006137be8582860161306b565b92505060206137cf8582860161306b565b9150509250929050565b600080604083850312156137f0576137ef613018565b5b60006137fe858286016130a1565b925050602061380f858286016131f1565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061384f602083612f5e565b915061385a82613819565b602082019050919050565b6000602082019050818103600083015261387e81613842565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806138cc57607f821691505b6020821081036138df576138de613885565b5b50919050565b7f636865636b73756d206973207265717569726564000000000000000000000000600082015250565b600061391b601483612f5e565b9150613926826138e5565b602082019050919050565b6000602082019050818103600083015261394a8161390e565b9050919050565b7f636865636b73756d2077617320616c7265616479207573656400000000000000600082015250565b6000613987601983612f5e565b915061399282613951565b602082019050919050565b600060208201905081810360008301526139b68161397a565b9050919050565b6139c6816131d0565b82525050565b60006040820190506139e160008301856131a6565b6139ee60208301846139bd565b9392505050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b6000613a51602883612f5e565b9150613a5c826139f5565b604082019050919050565b60006020820190508181036000830152613a8081613a44565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613ac182613080565b9150613acc83613080565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613b0157613b00613a87565b5b828201905092915050565b613b15816130f6565b8114613b2057600080fd5b50565b600081519050613b3281613b0c565b92915050565b600060208284031215613b4e57613b4d613018565b5b6000613b5c84828501613b23565b91505092915050565b7f73656e64657220646f6573206e6f742068617665207065726d697373696f6e2060008201527f746f206275726e00000000000000000000000000000000000000000000000000602082015250565b6000613bc1602783612f5e565b9150613bcc82613b65565b604082019050919050565b60006020820190508181036000830152613bf081613bb4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f72656e6f756e63696e67206f776e6572736869702069732064697361626c6564600082015250565b6000613c5c602083612f5e565b9150613c6782613c26565b602082019050919050565b60006020820190508181036000830152613c8b81613c4f565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000613cee602583612f5e565b9150613cf982613c92565b604082019050919050565b60006020820190508181036000830152613d1d81613ce1565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000613d80602e83612f5e565b9150613d8b82613d24565b604082019050919050565b60006020820190508181036000830152613daf81613d73565b9050919050565b7f76696e74616765206f7574206f6620626f756e64730000000000000000000000600082015250565b6000613dec601583612f5e565b9150613df782613db6565b602082019050919050565b60006020820190508181036000830152613e1b81613ddf565b9050919050565b7f6d6574686f646f6c6f6779206973207265717569726564000000000000000000600082015250565b6000613e58601783612f5e565b9150613e6382613e22565b602082019050919050565b60006020820190508181036000830152613e8781613e4b565b9050919050565b7f6372656469742074797065206973207265717569726564000000000000000000600082015250565b6000613ec4601783612f5e565b9150613ecf82613e8e565b602082019050919050565b60006020820190508181036000830152613ef381613eb7565b9050919050565b7f62756e646c6520746f6b656e20666163746f7279206973207265717569726564600082015250565b6000613f30602083612f5e565b9150613f3b82613efa565b602082019050919050565b60006020820190508181036000830152613f5f81613f23565b9050919050565b7f74686973206f7065726174696f6e206973206e6f7420616c6c6f77656420666f60008201527f72206e6f6e2d7065726d697373696f6e656420746f6b656e7300000000000000602082015250565b6000613fc2603983612f5e565b9150613fcd82613f66565b604082019050919050565b60006020820190508181036000830152613ff181613fb5565b9050919050565b7f696e76616c696420617474656d70742061742072656e6f756e63696e6720746860008201527f65207065726d697373696f6e206c697374202d207573652072656e6f756e636560208201527f5065726d697373696f6e4c697374282920696e73746561640000000000000000604082015250565b600061407a605883612f5e565b915061408582613ff8565b606082019050919050565b600060208201905081810360008301526140a98161406d565b9050919050565b60006040820190506140c5600083018561336a565b6140d2602083018461336a565b9392505050565b7f6f666673657420657863656564732070656e64696e672062616c616e63650000600082015250565b600061410f601e83612f5e565b915061411a826140d9565b602082019050919050565b6000602082019050818103600083015261413e81614102565b9050919050565b600061415082613080565b915061415b83613080565b92508282101561416e5761416d613a87565b5b828203905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006141d5602683612f5e565b91506141e082614179565b604082019050919050565b60006020820190508181036000830152614204816141c8565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000614267602483612f5e565b91506142728261420b565b604082019050919050565b600060208201905081810360008301526142968161425a565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006142f9602283612f5e565b91506143048261429d565b604082019050919050565b60006020820190508181036000830152614328816142ec565b9050919050565b6000604082019050614344600083018561336a565b61435160208301846131a6565b9392505050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b600061438e601f83612f5e565b915061439982614358565b602082019050919050565b600060208201905081810360008301526143bd81614381565b9050919050565b7f7468652073656e646572206973206e6f74207065726d697474656420746f207460008201527f72616e73666572207468697320746f6b656e0000000000000000000000000000602082015250565b6000614420603283612f5e565b915061442b826143c4565b604082019050919050565b6000602082019050818103600083015261444f81614413565b9050919050565b7f74686520726563697069656e74206973206e6f74207065726d6974746564207460008201527f6f2072656365697665207468697320746f6b656e000000000000000000000000602082015250565b60006144b2603483612f5e565b91506144bd82614456565b604082019050919050565b600060208201905081810360008301526144e1816144a5565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000614544602183612f5e565b915061454f826144e8565b604082019050919050565b6000602082019050818103600083015261457381614537565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b60006145d6602283612f5e565b91506145e18261457a565b604082019050919050565b60006020820190508181036000830152614605816145c9565b9050919050565b7f6e616d6520697320726571756972656400000000000000000000000000000000600082015250565b6000614642601083612f5e565b915061464d8261460c565b602082019050919050565b6000602082019050818103600083015261467181614635565b9050919050565b7f73796d626f6c2069732072657175697265640000000000000000000000000000600082015250565b60006146ae601283612f5e565b91506146b982614678565b602082019050919050565b600060208201905081810360008301526146dd816146a1565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000614740602583612f5e565b915061474b826146e4565b604082019050919050565b6000602082019050818103600083015261476f81614733565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006147d2602383612f5e565b91506147dd82614776565b604082019050919050565b60006020820190508181036000830152614801816147c5565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000614864602683612f5e565b915061486f82614808565b604082019050919050565b6000602082019050818103600083015261489381614857565b905091905056fea26469706673582212208d1d8f5d95a0238833ac7b566895371f8fd25c3ed1cdf716349c10166ca1d3b364736f6c634300080d0033
Deployed ByteCode
0x608060405234801561001057600080fd5b506004361061021c5760003560e01c80638da5cb5b11610125578063b434b82c116100ad578063bc1905cb1161007c578063bc1905cb14610669578063cdcf35b814610699578063dd62ed3e146106b7578063e097d633146106e7578063f2fde38b146107175761021c565b8063b434b82c146105e3578063b4f74380146105ff578063b55c1b6e1461062f578063ba0c41761461064b5761021c565b80639bb316dd116100f45780639bb316dd146105175780639bd2ef98146105355780639eeb1d5014610565578063a457c2d714610583578063a9059cbb146105b35761021c565b80638da5cb5b146104a15780638da61ee0146104bf57806392003cec146104dd57806395d89b41146104f95761021c565b806339509351116101a857806357b4d18e1161017757806357b4d18e146103e95780636202b6421461040757806370a0823114610437578063715018a61461046757806389004413146104715761021c565b8063395093511461034f57806341815ee41461037f57806342966c681461039d5780635726dd86146103b95761021c565b8063169da045116101ef578063169da0451461029757806318160ddd146102b35780631e458bee146102d157806323b872dd14610301578063313ce567146103315761021c565b806305491d6a1461022157806306fdde031461022b578063095ea7b31461024957806313b56bbf14610279575b600080fd5b610229610733565b005b61023361082a565b6040516102409190612fec565b60405180910390f35b610263600480360381019061025e91906130b6565b6108bc565b6040516102709190613111565b60405180910390f35b6102816108da565b60405161028e919061318b565b60405180910390f35b6102b160048036038101906102ac91906130b6565b610900565b005b6102bb61090e565b6040516102c891906131b5565b60405180910390f35b6102eb60048036038101906102e69190613206565b610918565b6040516102f89190613111565b60405180910390f35b61031b60048036038101906103169190613259565b610a97565b6040516103289190613111565b60405180910390f35b610339610b8f565b60405161034691906132c8565b60405180910390f35b610369600480360381019061036491906130b6565b610b98565b6040516103769190613111565b60405180910390f35b610387610c44565b6040516103949190612fec565b60405180910390f35b6103b760048036038101906103b291906132e3565b610cd9565b005b6103d360048036038101906103ce9190613310565b610e6e565b6040516103e091906131b5565b60405180910390f35b6103f1610e8b565b6040516103fe91906131b5565b60405180910390f35b610421600480360381019061041c91906130b6565b610e91565b60405161042e91906131b5565b60405180910390f35b610451600480360381019061044c919061333d565b610efe565b60405161045e91906131b5565b60405180910390f35b61046f610f47565b005b61048b60048036038101906104869190613310565b610ffe565b60405161049891906131b5565b60405180910390f35b6104a961101b565b6040516104b69190613379565b60405180910390f35b6104c7611045565b6040516104d491906133b1565b60405180910390f35b6104f760048036038101906104f291906132e3565b611060565b005b610501611074565b60405161050e9190612fec565b60405180910390f35b61051f611106565b60405161052c91906133ed565b60405180910390f35b61054f600480360381019061054a919061333d565b61112c565b60405161055c91906131b5565b60405180910390f35b61056d611178565b60405161057a9190612fec565b60405180910390f35b61059d600480360381019061059891906130b6565b61120d565b6040516105aa9190613111565b60405180910390f35b6105cd60048036038101906105c891906130b6565b6112f8565b6040516105da9190613111565b60405180910390f35b6105fd60048036038101906105f8919061368b565b611316565b005b610619600480360381019061061491906130b6565b61167c565b60405161062691906131b5565b60405180910390f35b6106496004803603810190610644919061376c565b6116e9565b005b61065361190a565b60405161066091906131b5565b60405180910390f35b610683600480360381019061067e919061333d565b611910565b60405161069091906131b5565b60405180910390f35b6106a1611959565b6040516106ae91906131b5565b60405180910390f35b6106d160048036038101906106cc9190613799565b61195f565b6040516106de91906131b5565b60405180910390f35b61070160048036038101906106fc91906137d9565b6119e6565b60405161070e9190613111565b60405180910390f35b610731600480360381019061072c919061333d565b611bd1565b005b61073b611cc8565b73ffffffffffffffffffffffffffffffffffffffff1661075961101b565b73ffffffffffffffffffffffffffffffffffffffff16146107af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a690613865565b60405180910390fd5b6000609e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f04bd2ccff622685b2eec8351c69709e7b65be2427411189caf339bc41722b02b306040516108209190613379565b60405180910390a1565b606060688054610839906138b4565b80601f0160208091040260200160405190810160405280929190818152602001828054610865906138b4565b80156108b25780601f10610887576101008083540402835291602001916108b2565b820191906000526020600020905b81548152906001019060200180831161089557829003601f168201915b5050505050905090565b60006108d06108c9611cc8565b8484611cd0565b6001905092915050565b609f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61090a8282611e99565b5050565b6000606754905090565b6000610922611cc8565b73ffffffffffffffffffffffffffffffffffffffff1661094061101b565b73ffffffffffffffffffffffffffffffffffffffff1614610996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098d90613865565b60405180910390fd5b6000801b82116109db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d290613931565b60405180910390fd5b600060a060008481526020019081526020016000205414610a31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a289061399d565b60405180910390fd5b610a3b8484611fe9565b8260a06000848152602001908152602001600020819055507fa1b5a5ca3372cb8497824d875a6262debd1f02d8a4a4b3970b79e283bdd6404b8383604051610a849291906139cc565b60405180910390a1600190509392505050565b6000610aa4848484612149565b6000606660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610aef611cc8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610b6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6690613a67565b60405180910390fd5b610b8385610b7b611cc8565b858403611cd0565b60019150509392505050565b60006012905090565b6000610c3a610ba5611cc8565b848460666000610bb3611cc8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610c359190613ab6565b611cd0565b6001905092915050565b6060609b6001018054610c56906138b4565b80601f0160208091040260200160405190810160405280929190818152602001828054610c82906138b4565b8015610ccf5780601f10610ca457610100808354040283529160200191610ccf565b820191906000526020600020905b815481529060010190602001808311610cb257829003601f168201915b5050505050905090565b610ce161101b565b73ffffffffffffffffffffffffffffffffffffffff16610cff611cc8565b73ffffffffffffffffffffffffffffffffffffffff161480610dc05750609f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379222db8610d62611cc8565b6040518263ffffffff1660e01b8152600401610d7e9190613379565b602060405180830381865afa158015610d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbf9190613b38565b5b610dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df690613bd7565b60405180910390fd5b610e10610e0a611cc8565b82612366565b610e18611cc8565b73ffffffffffffffffffffffffffffffffffffffff16610e3661101b565b73ffffffffffffffffffffffffffffffffffffffff1603610e6b578060a26000828254610e639190613ab6565b925050819055505b50565b600060a16000838152602001908152602001600020549050919050565b60985481565b6000609a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110610ee457610ee3613bf7565b5b906000526020600020906002020160000154905092915050565b6000606560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610f4f611cc8565b73ffffffffffffffffffffffffffffffffffffffff16610f6d61101b565b73ffffffffffffffffffffffffffffffffffffffff1614610fc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fba90613865565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff590613c72565b60405180910390fd5b600060a06000838152602001908152602001600020549050919050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000609b60020160009054906101000a900461ffff16905090565b61107161106b611cc8565b82611e99565b50565b606060698054611083906138b4565b80601f01602080910402602001604051908101604052809291908181526020018280546110af906138b4565b80156110fc5780601f106110d1576101008083540402835291602001916110fc565b820191906000526020600020905b8154815290600101906020018083116110df57829003601f168201915b5050505050905090565b609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000609a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490509050919050565b6060609b600001805461118a906138b4565b80601f01602080910402602001604051908101604052809291908181526020018280546111b6906138b4565b80156112035780601f106111d857610100808354040283529160200191611203565b820191906000526020600020905b8154815290600101906020018083116111e657829003601f168201915b5050505050905090565b6000806066600061121c611cc8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156112d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d090613d04565b60405180910390fd5b6112ed6112e4611cc8565b85858403611cd0565b600191505092915050565b600061130c611305611cc8565b8484612149565b6001905092915050565b600060019054906101000a900460ff168061133c575060008054906101000a900460ff16155b61137b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137290613d96565b60405180910390fd5b60008060019054906101000a900460ff1615905080156113cb576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6107d0856040015161ffff1611611417576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140e90613e02565b60405180910390fd5b610834856040015161ffff1610611463576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145a90613e02565b60405180910390fd5b6000856000015151116114ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114a290613e6e565b60405180910390fd5b6000856020015151116114f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ea90613eda565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155990613f46565b60405180910390fd5b61156d87878561253e565b84609b600082015181600001908051906020019061158c929190612eb0565b5060208201518160010190805190602001906115a9929190612eb0565b5060408201518160020160006101000a81548161ffff021916908361ffff16021790555090505083609e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081609f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080156116735760008060016101000a81548160ff0219169083151502179055505b50505050505050565b6000609a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002082815481106116cf576116ce613bf7565b5b906000526020600020906002020160010154905092915050565b6116f1611cc8565b73ffffffffffffffffffffffffffffffffffffffff1661170f61101b565b73ffffffffffffffffffffffffffffffffffffffff1614611765576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161175c90613865565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036117f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ed90613fd8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185c90614090565b60405180910390fd5b6000609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081609e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f9bd0fe40275fbf617308607102b18959fd7afd75840e32597c44b7aefd9e624081836040516118fe9291906140b0565b60405180910390a15050565b60a25481565b6000609760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60995481565b6000606660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006119f0611cc8565b73ffffffffffffffffffffffffffffffffffffffff16611a0e61101b565b73ffffffffffffffffffffffffffffffffffffffff1614611a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a5b90613865565b60405180910390fd5b6000801b8211611aa9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa090613931565b60405180910390fd5b600060a160008481526020019081526020016000205414611aff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611af69061399d565b60405180910390fd5b609854831115611b44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3b90614125565b60405180910390fd5b8260a16000848152602001908152602001600020819055508260986000828254611b6e9190614145565b925050819055508260996000828254611b879190613ab6565b925050819055507f532709d2ea1c0a15357d1ecde99a26077d0d42cc72899a902bc9bc019b57224e8383604051611bbf9291906139cc565b60405180910390a16001905092915050565b611bd9611cc8565b73ffffffffffffffffffffffffffffffffffffffff16611bf761101b565b73ffffffffffffffffffffffffffffffffffffffff1614611c4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c4490613865565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611cbc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb3906141eb565b60405180910390fd5b611cc5816126bd565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611d3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d369061427d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611dae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da59061430f565b60405180910390fd5b80606660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611e8c91906131b5565b60405180910390a3505050565b611eaa611ea4611cc8565b82612366565b80609760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ef99190613ab6565b925050819055508060986000828254611f129190613ab6565b92505081905550609a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405280428152602001838152509080600181540180825580915050600190039060005260206000209060020201600090919091909150600082015181600001556020820151816001015550507f34ea76956884cf5a870184e95247be7a9ce55b0fd84ac7a88665a0bdad0085f18282604051611fdd92919061432f565b60405180910390a15050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612058576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204f906143a4565b60405180910390fd5b61206460008383612783565b80606760008282546120769190613ab6565b9250508190555080606560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120cc9190613ab6565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161213191906131b5565b60405180910390a361214560008383612788565b5050565b600073ffffffffffffffffffffffffffffffffffffffff16609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461235657609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166397128e00846040518263ffffffff1660e01b81526004016121fa9190613379565b602060405180830381865afa158015612217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061223b9190613b38565b61227a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227190614436565b60405180910390fd5b609e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166397128e00836040518263ffffffff1660e01b81526004016122d59190613379565b602060405180830381865afa1580156122f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123169190613b38565b612355576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234c906144c8565b60405180910390fd5b5b61236183838361278d565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036123d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123cc9061455a565b60405180910390fd5b6123e182600083612783565b6000606560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612468576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245f906145ec565b60405180910390fd5b818103606560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081606760008282546124c09190614145565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161252591906131b5565b60405180910390a361253983600084612788565b505050565b600060019054906101000a900460ff1680612564575060008054906101000a900460ff16155b6125a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161259a90613d96565b60405180910390fd5b60008060019054906101000a900460ff1615905080156125f3576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6000845111612637576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161262e90614658565b60405180910390fd5b600083511161267b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612672906146c4565b60405180910390fd5b6126858484612a0f565b61268d612afc565b61269682611bd1565b80156126b75760008060016101000a81548160ff0219169083151502179055505b50505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b505050565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036127fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127f390614756565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361286b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612862906147e8565b60405180910390fd5b612876838383612783565b6000606560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156128fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128f49061487a565b60405180910390fd5b818103606560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081606560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129929190613ab6565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516129f691906131b5565b60405180910390a3612a09848484612788565b50505050565b600060019054906101000a900460ff1680612a35575060008054906101000a900460ff16155b612a74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a6b90613d96565b60405180910390fd5b60008060019054906101000a900460ff161590508015612ac4576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612acc612be5565b612ad68383612cbe565b8015612af75760008060016101000a81548160ff0219169083151502179055505b505050565b600060019054906101000a900460ff1680612b22575060008054906101000a900460ff16155b612b61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b5890613d96565b60405180910390fd5b60008060019054906101000a900460ff161590508015612bb1576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612bb9612be5565b612bc1612dc7565b8015612be25760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680612c0b575060008054906101000a900460ff16155b612c4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c4190613d96565b60405180910390fd5b60008060019054906101000a900460ff161590508015612c9a576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8015612cbb5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680612ce4575060008054906101000a900460ff16155b612d23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d1a90613d96565b60405180910390fd5b60008060019054906101000a900460ff161590508015612d73576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b8260689080519060200190612d89929190612eb0565b508160699080519060200190612da0929190612eb0565b508015612dc25760008060016101000a81548160ff0219169083151502179055505b505050565b600060019054906101000a900460ff1680612ded575060008054906101000a900460ff16155b612e2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e2390613d96565b60405180910390fd5b60008060019054906101000a900460ff161590508015612e7c576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b612e8c612e87611cc8565b6126bd565b8015612ead5760008060016101000a81548160ff0219169083151502179055505b50565b828054612ebc906138b4565b90600052602060002090601f016020900481019282612ede5760008555612f25565b82601f10612ef757805160ff1916838001178555612f25565b82800160010185558215612f25579182015b82811115612f24578251825591602001919060010190612f09565b5b509050612f329190612f36565b5090565b5b80821115612f4f576000816000905550600101612f37565b5090565b600081519050919050565b600082825260208201905092915050565b60005b83811015612f8d578082015181840152602081019050612f72565b83811115612f9c576000848401525b50505050565b6000601f19601f8301169050919050565b6000612fbe82612f53565b612fc88185612f5e565b9350612fd8818560208601612f6f565b612fe181612fa2565b840191505092915050565b600060208201905081810360008301526130068184612fb3565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061304d82613022565b9050919050565b61305d81613042565b811461306857600080fd5b50565b60008135905061307a81613054565b92915050565b6000819050919050565b61309381613080565b811461309e57600080fd5b50565b6000813590506130b08161308a565b92915050565b600080604083850312156130cd576130cc613018565b5b60006130db8582860161306b565b92505060206130ec858286016130a1565b9150509250929050565b60008115159050919050565b61310b816130f6565b82525050565b60006020820190506131266000830184613102565b92915050565b6000819050919050565b600061315161314c61314784613022565b61312c565b613022565b9050919050565b600061316382613136565b9050919050565b600061317582613158565b9050919050565b6131858161316a565b82525050565b60006020820190506131a0600083018461317c565b92915050565b6131af81613080565b82525050565b60006020820190506131ca60008301846131a6565b92915050565b6000819050919050565b6131e3816131d0565b81146131ee57600080fd5b50565b600081359050613200816131da565b92915050565b60008060006060848603121561321f5761321e613018565b5b600061322d8682870161306b565b935050602061323e868287016130a1565b925050604061324f868287016131f1565b9150509250925092565b60008060006060848603121561327257613271613018565b5b60006132808682870161306b565b93505060206132918682870161306b565b92505060406132a2868287016130a1565b9150509250925092565b600060ff82169050919050565b6132c2816132ac565b82525050565b60006020820190506132dd60008301846132b9565b92915050565b6000602082840312156132f9576132f8613018565b5b6000613307848285016130a1565b91505092915050565b60006020828403121561332657613325613018565b5b6000613334848285016131f1565b91505092915050565b60006020828403121561335357613352613018565b5b60006133618482850161306b565b91505092915050565b61337381613042565b82525050565b600060208201905061338e600083018461336a565b92915050565b600061ffff82169050919050565b6133ab81613394565b82525050565b60006020820190506133c660008301846133a2565b92915050565b60006133d782613158565b9050919050565b6133e7816133cc565b82525050565b600060208201905061340260008301846133de565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61344a82612fa2565b810181811067ffffffffffffffff8211171561346957613468613412565b5b80604052505050565b600061347c61300e565b90506134888282613441565b919050565b600067ffffffffffffffff8211156134a8576134a7613412565b5b6134b182612fa2565b9050602081019050919050565b82818337600083830152505050565b60006134e06134db8461348d565b613472565b9050828152602081018484840111156134fc576134fb61340d565b5b6135078482856134be565b509392505050565b600082601f83011261352457613523613408565b5b81356135348482602086016134cd565b91505092915050565b600080fd5b600080fd5b61355081613394565b811461355b57600080fd5b50565b60008135905061356d81613547565b92915050565b6000606082840312156135895761358861353d565b5b6135936060613472565b9050600082013567ffffffffffffffff8111156135b3576135b2613542565b5b6135bf8482850161350f565b600083015250602082013567ffffffffffffffff8111156135e3576135e2613542565b5b6135ef8482850161350f565b60208301525060406136038482850161355e565b60408301525092915050565b600061361a82613042565b9050919050565b61362a8161360f565b811461363557600080fd5b50565b60008135905061364781613621565b92915050565b600061365882613042565b9050919050565b6136688161364d565b811461367357600080fd5b50565b6000813590506136858161365f565b92915050565b60008060008060008060c087890312156136a8576136a7613018565b5b600087013567ffffffffffffffff8111156136c6576136c561301d565b5b6136d289828a0161350f565b965050602087013567ffffffffffffffff8111156136f3576136f261301d565b5b6136ff89828a0161350f565b955050604087013567ffffffffffffffff8111156137205761371f61301d565b5b61372c89828a01613573565b945050606061373d89828a01613638565b935050608061374e89828a0161306b565b92505060a061375f89828a01613676565b9150509295509295509295565b60006020828403121561378257613781613018565b5b600061379084828501613638565b91505092915050565b600080604083850312156137b0576137af613018565b5b60006137be8582860161306b565b92505060206137cf8582860161306b565b9150509250929050565b600080604083850312156137f0576137ef613018565b5b60006137fe858286016130a1565b925050602061380f858286016131f1565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061384f602083612f5e565b915061385a82613819565b602082019050919050565b6000602082019050818103600083015261387e81613842565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806138cc57607f821691505b6020821081036138df576138de613885565b5b50919050565b7f636865636b73756d206973207265717569726564000000000000000000000000600082015250565b600061391b601483612f5e565b9150613926826138e5565b602082019050919050565b6000602082019050818103600083015261394a8161390e565b9050919050565b7f636865636b73756d2077617320616c7265616479207573656400000000000000600082015250565b6000613987601983612f5e565b915061399282613951565b602082019050919050565b600060208201905081810360008301526139b68161397a565b9050919050565b6139c6816131d0565b82525050565b60006040820190506139e160008301856131a6565b6139ee60208301846139bd565b9392505050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b6000613a51602883612f5e565b9150613a5c826139f5565b604082019050919050565b60006020820190508181036000830152613a8081613a44565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613ac182613080565b9150613acc83613080565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613b0157613b00613a87565b5b828201905092915050565b613b15816130f6565b8114613b2057600080fd5b50565b600081519050613b3281613b0c565b92915050565b600060208284031215613b4e57613b4d613018565b5b6000613b5c84828501613b23565b91505092915050565b7f73656e64657220646f6573206e6f742068617665207065726d697373696f6e2060008201527f746f206275726e00000000000000000000000000000000000000000000000000602082015250565b6000613bc1602783612f5e565b9150613bcc82613b65565b604082019050919050565b60006020820190508181036000830152613bf081613bb4565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f72656e6f756e63696e67206f776e6572736869702069732064697361626c6564600082015250565b6000613c5c602083612f5e565b9150613c6782613c26565b602082019050919050565b60006020820190508181036000830152613c8b81613c4f565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000613cee602583612f5e565b9150613cf982613c92565b604082019050919050565b60006020820190508181036000830152613d1d81613ce1565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000613d80602e83612f5e565b9150613d8b82613d24565b604082019050919050565b60006020820190508181036000830152613daf81613d73565b9050919050565b7f76696e74616765206f7574206f6620626f756e64730000000000000000000000600082015250565b6000613dec601583612f5e565b9150613df782613db6565b602082019050919050565b60006020820190508181036000830152613e1b81613ddf565b9050919050565b7f6d6574686f646f6c6f6779206973207265717569726564000000000000000000600082015250565b6000613e58601783612f5e565b9150613e6382613e22565b602082019050919050565b60006020820190508181036000830152613e8781613e4b565b9050919050565b7f6372656469742074797065206973207265717569726564000000000000000000600082015250565b6000613ec4601783612f5e565b9150613ecf82613e8e565b602082019050919050565b60006020820190508181036000830152613ef381613eb7565b9050919050565b7f62756e646c6520746f6b656e20666163746f7279206973207265717569726564600082015250565b6000613f30602083612f5e565b9150613f3b82613efa565b602082019050919050565b60006020820190508181036000830152613f5f81613f23565b9050919050565b7f74686973206f7065726174696f6e206973206e6f7420616c6c6f77656420666f60008201527f72206e6f6e2d7065726d697373696f6e656420746f6b656e7300000000000000602082015250565b6000613fc2603983612f5e565b9150613fcd82613f66565b604082019050919050565b60006020820190508181036000830152613ff181613fb5565b9050919050565b7f696e76616c696420617474656d70742061742072656e6f756e63696e6720746860008201527f65207065726d697373696f6e206c697374202d207573652072656e6f756e636560208201527f5065726d697373696f6e4c697374282920696e73746561640000000000000000604082015250565b600061407a605883612f5e565b915061408582613ff8565b606082019050919050565b600060208201905081810360008301526140a98161406d565b9050919050565b60006040820190506140c5600083018561336a565b6140d2602083018461336a565b9392505050565b7f6f666673657420657863656564732070656e64696e672062616c616e63650000600082015250565b600061410f601e83612f5e565b915061411a826140d9565b602082019050919050565b6000602082019050818103600083015261413e81614102565b9050919050565b600061415082613080565b915061415b83613080565b92508282101561416e5761416d613a87565b5b828203905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006141d5602683612f5e565b91506141e082614179565b604082019050919050565b60006020820190508181036000830152614204816141c8565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000614267602483612f5e565b91506142728261420b565b604082019050919050565b600060208201905081810360008301526142968161425a565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006142f9602283612f5e565b91506143048261429d565b604082019050919050565b60006020820190508181036000830152614328816142ec565b9050919050565b6000604082019050614344600083018561336a565b61435160208301846131a6565b9392505050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b600061438e601f83612f5e565b915061439982614358565b602082019050919050565b600060208201905081810360008301526143bd81614381565b9050919050565b7f7468652073656e646572206973206e6f74207065726d697474656420746f207460008201527f72616e73666572207468697320746f6b656e0000000000000000000000000000602082015250565b6000614420603283612f5e565b915061442b826143c4565b604082019050919050565b6000602082019050818103600083015261444f81614413565b9050919050565b7f74686520726563697069656e74206973206e6f74207065726d6974746564207460008201527f6f2072656365697665207468697320746f6b656e000000000000000000000000602082015250565b60006144b2603483612f5e565b91506144bd82614456565b604082019050919050565b600060208201905081810360008301526144e1816144a5565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000614544602183612f5e565b915061454f826144e8565b604082019050919050565b6000602082019050818103600083015261457381614537565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b60006145d6602283612f5e565b91506145e18261457a565b604082019050919050565b60006020820190508181036000830152614605816145c9565b9050919050565b7f6e616d6520697320726571756972656400000000000000000000000000000000600082015250565b6000614642601083612f5e565b915061464d8261460c565b602082019050919050565b6000602082019050818103600083015261467181614635565b9050919050565b7f73796d626f6c2069732072657175697265640000000000000000000000000000600082015250565b60006146ae601283612f5e565b91506146b982614678565b602082019050919050565b600060208201905081810360008301526146dd816146a1565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000614740602583612f5e565b915061474b826146e4565b604082019050919050565b6000602082019050818103600083015261476f81614733565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006147d2602383612f5e565b91506147dd82614776565b604082019050919050565b60006020820190508181036000830152614801816147c5565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000614864602683612f5e565b915061486f82614808565b604082019050919050565b6000602082019050818103600083015261489381614857565b905091905056fea26469706673582212208d1d8f5d95a0238833ac7b566895371f8fd25c3ed1cdf716349c10166ca1d3b364736f6c634300080d0033