Contract Overview
Balance:
0 CELO
CELO Value:
$0.00
My Name Tag:
Not Available, login to update
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0x24a89754ee9e174a49c0cf26cd050cc5a24b9553b8f356541440eac0c68d1a91 | 0x60a06040 | 17367760 | 124 days 3 hrs ago | 0xa39ec816154f8048f505735485bdf9d0eaf10f4f | IN | Create: NatureCarbonTonne | 0 CELO | 0.0025930205 |
[ Download CSV Export ]
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
NatureCarbonTonne
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-FileCopyrightText: 2021 Toucan Labs // // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <[email protected]> or visit security.toucan.earth pragma solidity 0.8.14; import './Pool.sol'; /// @notice Nature Carbon Tonne (or NatureCarbonTonne) /// Contract is an ERC20 compliant token that acts as a pool for TCO2 tokens contract NatureCarbonTonne is Pool { // ---------------------------------------- // Constants // ---------------------------------------- string public constant VERSION = '1.4.0'; uint256 public constant VERSION_RELEASE_CANDIDATE = 2; // ---------------------------------------- // Upgradable related functions // ---------------------------------------- function initialize() external virtual initializer { __Context_init_unchained(); __Ownable_init_unchained(); __Pausable_init_unchained(); __ERC20_init_unchained('Toucan Protocol: Nature Carbon Tonne', 'NCT'); _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); } }
// SPDX-FileCopyrightText: 2021 Toucan Labs // // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <[email protected]> or visit security.toucan.earth pragma solidity 0.8.14; import '@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol'; import '../cross-chain/interfaces/IToucanCrosschainMessenger.sol'; import '../interfaces/ICarbonOffsetBatches.sol'; import '../interfaces/IToucanCarbonOffsets.sol'; import '../interfaces/IToucanContractRegistry.sol'; import '../libraries/Errors.sol'; import './PoolStorage.sol'; /// @notice Pool template contract /// ERC20 compliant token that acts as a pool for TCO2 tokens abstract contract Pool is ContextUpgradeable, ERC20Upgradeable, OwnableUpgradeable, PausableUpgradeable, AccessControlUpgradeable, UUPSUpgradeable, PoolStorage { using SafeERC20Upgradeable for IERC20Upgradeable; // ---------------------------------------- // Constants // ---------------------------------------- bytes32 public constant PAUSER_ROLE = keccak256('PAUSER_ROLE'); bytes32 public constant MANAGER_ROLE = keccak256('MANAGER_ROLE'); /// @dev fees redeem percentage with 2 fixed decimals precision uint256 public constant feeRedeemDivider = 1e4; // ---------------------------------------- // Events // ---------------------------------------- event Deposited(address erc20Addr, uint256 amount); event Redeemed(address account, address erc20, uint256 amount); event ExternalAddressWhitelisted(address erc20addr); event ExternalAddressRemovedFromWhitelist(address erc20addr); event InternalAddressWhitelisted(address erc20addr); event InternalAddressBlacklisted(address erc20addr); event InternalAddressRemovedFromBlackList(address erc20addr); event InternalAddressRemovedFromWhitelist(address erc20addr); event AttributeStandardAdded(string standard); event AttributeStandardRemoved(string standard); event AttributeMethodologyAdded(string methodology); event AttributeMethodologyRemoved(string methodology); event AttributeRegionAdded(string region); event AttributeRegionRemoved(string region); event RedeemFeePaid(address redeemer, uint256 fees); event RedeemFeeBurnt(address redeemer, uint256 fees); event ToucanRegistrySet(address ContractRegistry); event MappingSwitched(string mappingName, bool accepted); event SupplyCapUpdated(uint256 newCap); event MinimumVintageStartTimeUpdated(uint256 minimumVintageStartTime); event TCO2ScoringUpdated(address[] tco2s); event AddFeeExemptedTCO2(address tco2); event RemoveFeeExemptedTCO2(address tco2); event RouterUpdated(address router); /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } // ---------------------------------------- // Upgradable related functions // ---------------------------------------- function _authorizeUpgrade(address) internal virtual override { onlyPoolOwner(); } // ------------------------ // Poor person's modifiers // ------------------------ /// @dev function that checks whether the caller is the /// contract owner function onlyPoolOwner() internal view virtual { require(owner() == msg.sender, Errors.CP_ONLY_OWNER); } /// @dev function that only lets the contract's owner and granted role to execute function onlyWithRole(bytes32 role) internal view virtual { require( hasRole(role, msg.sender) || owner() == msg.sender, Errors.CP_UNAUTHORIZED ); } /// @dev function that checks whether the contract is paused function onlyUnpaused() internal view { require(!paused(), Errors.CP_PAUSED_CONTRACT); } // ------------------------ // Admin functions // ------------------------ /// @notice Emergency function to disable contract's core functionality /// @dev wraps _pause(), only Admin function pause() external virtual { onlyWithRole(PAUSER_ROLE); _pause(); } /// @dev Unpause the system, wraps _unpause(), only Admin function unpause() external virtual { onlyWithRole(PAUSER_ROLE); _unpause(); } function setToucanContractRegistry(address _address) external virtual { onlyPoolOwner(); contractRegistry = _address; emit ToucanRegistrySet(_address); } /// @notice Generic function to switch attributes mappings into either /// acceptance or rejection criteria /// @param _mappingName attribute mapping of project-vintage data /// @param accepted determines if mapping works as black or whitelist function switchMapping(string memory _mappingName, bool accepted) external virtual { onlyPoolOwner(); if (strcmp(_mappingName, 'regions')) { accepted ? regionsIsAcceptedMapping = true : regionsIsAcceptedMapping = false; } else if (strcmp(_mappingName, 'standards')) { accepted ? standardsIsAcceptedMapping = true : standardsIsAcceptedMapping = false; } else if (strcmp(_mappingName, 'methodologies')) { accepted ? methodologiesIsAcceptedMapping = true : methodologiesIsAcceptedMapping = false; } emit MappingSwitched(_mappingName, accepted); } /// @notice Function to add attributes for filtering (does not support complex AttributeSets) /// @param addToList determines whether attribute should be added or removed /// Other params are arrays of attributes to be added function addAttributes( bool addToList, string[] memory _regions, string[] memory _standards, string[] memory _methodologies ) external virtual { onlyPoolOwner(); //slither-disable-next-line uninitialized-local for (uint256 i; i < _standards.length; ++i) { if (addToList == true) { standards[_standards[i]] = true; emit AttributeStandardAdded(_standards[i]); } else { standards[_standards[i]] = false; emit AttributeStandardRemoved(_standards[i]); } } //slither-disable-next-line uninitialized-local for (uint256 i; i < _methodologies.length; ++i) { if (addToList == true) { methodologies[_methodologies[i]] = true; emit AttributeMethodologyAdded(_methodologies[i]); } else { methodologies[_methodologies[i]] = false; emit AttributeMethodologyRemoved(_methodologies[i]); } } //slither-disable-next-line uninitialized-local for (uint256 i; i < _regions.length; ++i) { if (addToList == true) { regions[_regions[i]] = true; emit AttributeRegionAdded(_regions[i]); } else { regions[_regions[i]] = false; emit AttributeRegionRemoved(_regions[i]); } } } /// @notice Function to whitelist selected external non-TCO2 contracts by their address /// @param erc20Addr accepts an array of contract addresses function addToExternalWhiteList(address[] memory erc20Addr) external { onlyPoolOwner(); //slither-disable-next-line uninitialized-local for (uint256 i; i < erc20Addr.length; ++i) { externalWhiteList[erc20Addr[i]] = true; emit ExternalAddressWhitelisted(erc20Addr[i]); } } /// @notice Function to whitelist certain TCO2 contracts by their address /// @param erc20Addr accepts an array of contract addresses function addToInternalWhiteList(address[] memory erc20Addr) external { onlyPoolOwner(); //slither-disable-next-line uninitialized-local for (uint256 i; i < erc20Addr.length; ++i) { internalWhiteList[erc20Addr[i]] = true; emit InternalAddressWhitelisted(erc20Addr[i]); } } /// @notice Function to blacklist certain TCO2 contracts by their address /// @param erc20Addr accepts an array of contract addresses function addToInternalBlackList(address[] memory erc20Addr) external { onlyPoolOwner(); //slither-disable-next-line uninitialized-local for (uint256 i; i < erc20Addr.length; ++i) { internalBlackList[erc20Addr[i]] = true; emit InternalAddressBlacklisted(erc20Addr[i]); } } /// @notice Function to remove ERC20 addresses from external whitelist /// @param erc20Addr accepts an array of contract addresses function removeFromExternalWhiteList(address[] memory erc20Addr) external { onlyPoolOwner(); //slither-disable-next-line uninitialized-local for (uint256 i; i < erc20Addr.length; ++i) { externalWhiteList[erc20Addr[i]] = false; emit ExternalAddressRemovedFromWhitelist(erc20Addr[i]); } } /// @notice Function to remove TCO2 addresses from internal blacklist /// @param erc20Addr accepts an array of contract addresses function removeFromInternalBlackList(address[] memory erc20Addr) external { onlyPoolOwner(); //slither-disable-next-line uninitialized-local for (uint256 i; i < erc20Addr.length; ++i) { internalBlackList[erc20Addr[i]] = false; emit InternalAddressRemovedFromBlackList(erc20Addr[i]); } } /// @notice Function to remove TCO2 addresses from internal whitelist /// @param erc20Addr accepts an array of contract addressesc function removeFromInternalWhiteList(address[] memory erc20Addr) external { onlyPoolOwner(); //slither-disable-next-line uninitialized-local for (uint256 i; i < erc20Addr.length; ++i) { internalWhiteList[erc20Addr[i]] = false; emit InternalAddressRemovedFromWhitelist(erc20Addr[i]); } } /// @notice Update the fee redeem percentage /// @param _feeRedeemPercentageInBase percentage of fee in base function setFeeRedeemPercentage(uint256 _feeRedeemPercentageInBase) external virtual { onlyPoolOwner(); require( _feeRedeemPercentageInBase < feeRedeemDivider, Errors.CP_INVALID_FEE ); feeRedeemPercentageInBase = _feeRedeemPercentageInBase; } /// @notice Update the fee redeem receiver /// @param _feeRedeemReceiver address to transfer the fees function setFeeRedeemReceiver(address _feeRedeemReceiver) external virtual { onlyPoolOwner(); require(_feeRedeemReceiver != address(0), Errors.CP_EMPTY_ADDRESS); feeRedeemReceiver = _feeRedeemReceiver; } /// @notice Update the fee redeem burn percentage /// @param _feeRedeemBurnPercentageInBase percentage of fee in base function setFeeRedeemBurnPercentage(uint256 _feeRedeemBurnPercentageInBase) external virtual { onlyPoolOwner(); require( _feeRedeemBurnPercentageInBase < feeRedeemDivider, Errors.CP_INVALID_FEE ); feeRedeemBurnPercentageInBase = _feeRedeemBurnPercentageInBase; } /// @notice Update the fee redeem burn address /// @param _feeRedeemBurnAddress address to transfer the fees to burn function setFeeRedeemBurnAddress(address _feeRedeemBurnAddress) external virtual { onlyPoolOwner(); require(_feeRedeemBurnAddress != address(0), Errors.CP_EMPTY_ADDRESS); feeRedeemBurnAddress = _feeRedeemBurnAddress; } /// @notice Adds a new address for redeem fees exemption /// @param _address address to be exempted on redeem fees function addRedeemFeeExemptedAddress(address _address) external virtual { onlyPoolOwner(); redeemFeeExemptedAddresses[_address] = true; } /// @notice Removes an address from redeem fees exemption /// @param _address address to be removed from exemption function removeRedeemFeeExemptedAddress(address _address) external virtual { onlyPoolOwner(); redeemFeeExemptedAddresses[_address] = false; } /// @notice Adds a new TCO2 for redeem fees exemption /// @param _tco2 TCO2 to be exempted on redeem fees function addRedeemFeeExemptedTCO2(address _tco2) external virtual { onlyPoolOwner(); redeemFeeExemptedTCO2s[_tco2] = true; emit AddFeeExemptedTCO2(_tco2); } /// @notice Removes a TCO2 from redeem fees exemption /// @param _tco2 TCO2 to be removed from exemption function removeRedeemFeeExemptedTCO2(address _tco2) external virtual { onlyPoolOwner(); redeemFeeExemptedTCO2s[_tco2] = false; emit RemoveFeeExemptedTCO2(_tco2); } /// @notice Function to limit the maximum pool supply /// @dev supplyCap is initially set to 0 and must be increased before deposits function setSupplyCap(uint256 newCap) external virtual { onlyPoolOwner(); supplyCap = newCap; emit SupplyCapUpdated(newCap); } /// @notice Determines the minimum vintage start time acceptance criteria of TCO2s /// @param _minimumVintageStartTime unix time format function setMinimumVintageStartTime(uint64 _minimumVintageStartTime) external virtual { onlyPoolOwner(); minimumVintageStartTime = _minimumVintageStartTime; emit MinimumVintageStartTimeUpdated(_minimumVintageStartTime); } /// @notice Allows MANAGERs or the owner to pass an array to hold TCO2 contract addesses that are /// ordered by some form of scoring mechanism /// @param tco2s array of ordered TCO2 addresses function setTCO2Scoring(address[] calldata tco2s) external { onlyWithRole(MANAGER_ROLE); require(tco2s.length != 0, Errors.CP_EMPTY_ARRAY); scoredTCO2s = tco2s; emit TCO2ScoringUpdated(tco2s); } // ------------------------------------- // ToucanCrosschainMessenger functions // ------------------------------------- function onlyRouter() internal view { require(msg.sender == router, Errors.CP_ONLY_ROUTER); } /// @notice method to set router address /// @dev use this method to set router address /// @param _router address of ToucanCrosschainMessenger function setRouter(address _router) external { onlyPoolOwner(); // router address can be set to zero to make bridgeMint and bridgeBurn unusable router = _router; emit RouterUpdated(_router); } /// @notice mint tokens to receiver account that were cross-chain bridged /// @dev invoked only by the ToucanCrosschainMessenger (Router) /// @param _account account that will be minted with corss-chain bridged tokens /// @param _amount amount of tokens that will be minted function bridgeMint(address _account, uint256 _amount) external { onlyRouter(); _mint(_account, _amount); } /// @notice burn tokens from account to be cross-chain bridged /// @dev invoked only by the ToucanCrosschainMessenger (Router) /// @param _account account that will be burned with corss-chain bridged tokens /// @param _amount amount of tokens that will be burned function bridgeBurn(address _account, uint256 _amount) external { onlyRouter(); _burn(_account, _amount); } /// @notice Allows MANAGER or the owner to bridge TCO2s into /// another domain. /// @param destinationDomain The domain to bridge TCO2s to /// @param tco2s The TCO2s to bridge /// @param amounts The amounts of TCO2s to bridge function bridgeTCO2s( uint32 destinationDomain, address[] calldata tco2s, uint256[] calldata amounts ) external { onlyWithRole(MANAGER_ROLE); uint256 tco2Length = tco2s.length; require(tco2Length != 0, Errors.CP_EMPTY_ARRAY); require(tco2Length == amounts.length, Errors.CP_LENGTH_MISMATCH); // TODO: Disallow bridging more TCO2s than an amount that // would bring the pool to imbalance, ie., end up with more // pool tokens than TCO2s in the pool in the source chain. // Read the address of the remote pool from ToucanCrosschainMessenger // and set that as a recipient in our cross-chain messages. address tcm = router; RemoteTokenInformation memory remoteInfo = IToucanCrosschainMessenger( tcm ).remoteTokens(address(this), destinationDomain); address recipient = remoteInfo.tokenAddress; require(recipient != address(0), Errors.CP_EMPTY_ADDRESS); //slither-disable-next-line uninitialized-local for (uint256 i; i < tco2Length; ++i) { IToucanCrosschainMessenger(tcm).sendMessageWithRecipient( destinationDomain, tco2s[i], amounts[i], recipient ); } } // ---------------------------- // Permissionless functions // ---------------------------- /// @notice Deposit function for pool that accepts TCO2s and mints pool token 1:1 /// @param erc20Addr ERC20 contract address to be deposited, requires approve /// @dev Eligibility is checked via `checkEligible`, balances are tracked /// for each TCO2 separately function deposit(address erc20Addr, uint256 amount) external virtual { onlyUnpaused(); checkEligible(erc20Addr); uint256 remainingSpace = getRemaining(); require(remainingSpace != 0, Errors.CP_FULL_POOL); if (amount > remainingSpace) amount = remainingSpace; _mint(msg.sender, amount); emit Deposited(erc20Addr, amount); IERC20Upgradeable(erc20Addr).safeTransferFrom( msg.sender, address(this), amount ); } /// @notice Checks if token to be deposited is eligible for this pool function checkEligible(address erc20Addr) public view virtual returns (bool) { bool isToucanContract = IToucanContractRegistry(contractRegistry) .checkERC20(erc20Addr); if (isToucanContract) { if (internalWhiteList[erc20Addr]) { return true; } require(!internalBlackList[erc20Addr], Errors.CP_BLACKLISTED); checkAttributeMatching(erc20Addr); } else { /// @dev If not Toucan native contract, check if address is whitelisted require(externalWhiteList[erc20Addr], Errors.CP_NOT_WHITELISTED); } return true; } /// @notice Checks whether incoming TCO2s match the accepted criteria/attributes function checkAttributeMatching(address erc20Addr) public view virtual returns (bool) { ProjectData memory projectData; VintageData memory vintageData; (projectData, vintageData) = IToucanCarbonOffsets(erc20Addr) .getAttributes(); /// @dev checks if any one of the attributes are blacklisted. /// If mappings are set to "whitelist"-mode, require the opposite require( vintageData.startTime >= minimumVintageStartTime, Errors.CP_START_TIME_TOO_OLD ); require( regions[projectData.region] == regionsIsAcceptedMapping, Errors.CP_REGION_NOT_ACCEPTED ); require( standards[projectData.standard] == standardsIsAcceptedMapping, Errors.CP_STANDARD_NOT_ACCEPTED ); require( methodologies[projectData.methodology] == methodologiesIsAcceptedMapping, Errors.CP_METHODOLOGY_NOT_ACCEPTED ); return true; } /// @notice View function to calculate fees pre-execution /// @dev User specifies in front-end the addresses and amounts they want /// @param tco2s Array of TCO2 contract addresses /// @param amounts Array of amounts to redeem for each tco2s /// @return Total fees amount function calculateRedeemFees( address[] memory tco2s, uint256[] memory amounts ) external view virtual returns (uint256) { onlyUnpaused(); if (redeemFeeExemptedAddresses[msg.sender]) { return 0; } uint256 tco2Length = tco2s.length; require(tco2Length == amounts.length, Errors.CP_LENGTH_MISMATCH); //slither-disable-next-line uninitialized-local uint256 totalFee; uint256 _feeRedeemPercentageInBase = feeRedeemPercentageInBase; //slither-disable-next-line uninitialized-local for (uint256 i; i < tco2Length; ++i) { uint256 feeAmount = (amounts[i] * _feeRedeemPercentageInBase) / feeRedeemDivider; totalFee += feeAmount; } return totalFee; } /// @notice Redeem a whitelisted TCO2 without paying any fees and burn /// the TCO2. Initially added to burn HFC-23 credits, can be used in the /// future to dispose of any other whitelisted credits. /// @dev User needs to approve the pool contract in the TCO2 contract for /// the amount to be burnt before executing this function. /// @param tco2 TCO2 to redeem and burn /// @param amount Amount to redeem and burn function redeemAndBurn(address tco2, uint256 amount) external { onlyUnpaused(); require(redeemFeeExemptedTCO2s[tco2], Errors.CP_NOT_EXEMPTED); redeemSingle(tco2, amount); // User has to approve the pool contract in the TCO2 contract // in order for this function to successfully burn the tokens IToucanCarbonOffsets(tco2).burnFrom(msg.sender, amount); } /// @notice Redeems Pool tokens for multiple underlying TCO2s 1:1 minus fees /// @dev User specifies in front-end the addresses and amounts they want /// @param tco2s Array of TCO2 contract addresses /// @param amounts Array of amounts to redeem for each tco2s /// Pool token in user's wallet get burned function redeemMany(address[] memory tco2s, uint256[] memory amounts) external virtual { onlyUnpaused(); uint256 tco2Length = tco2s.length; require(tco2Length == amounts.length, Errors.CP_LENGTH_MISMATCH); //slither-disable-next-line uninitialized-local uint256 totalFee; uint256 _feeRedeemPercentageInBase = feeRedeemPercentageInBase; bool isExempted = redeemFeeExemptedAddresses[msg.sender]; //slither-disable-next-line uninitialized-local uint256 feeAmount; //slither-disable-next-line uninitialized-local for (uint256 i; i < tco2Length; ++i) { if (!isExempted) { feeAmount = (amounts[i] * _feeRedeemPercentageInBase) / feeRedeemDivider; totalFee += feeAmount; } else { feeAmount = 0; } redeemSingle(tco2s[i], amounts[i] - feeAmount); } if (totalFee != 0) { uint256 burnAmount = (totalFee * feeRedeemBurnPercentageInBase) / feeRedeemDivider; totalFee -= burnAmount; transfer(feeRedeemReceiver, totalFee); emit RedeemFeePaid(msg.sender, totalFee); if (burnAmount > 0) { transfer(feeRedeemBurnAddress, burnAmount); emit RedeemFeeBurnt(msg.sender, burnAmount); } } } /// @notice Automatically redeems an amount of Pool tokens for underlying /// TCO2s from an array of ranked TCO2 contracts /// starting from contract at index 0 until amount is satisfied /// @param amount Total amount to be redeemed /// @dev Pool tokens in user's wallet get burned function redeemAuto(uint256 amount) external virtual { redeemAuto2(amount); } /// @notice Automatically redeems an amount of Pool tokens for underlying /// TCO2s from an array of ranked TCO2 contracts starting from contract at /// index 0 until amount is satisfied. /// @param amount Total amount to be redeemed /// @return tco2s amounts The addresses and amounts of the TCO2s that were /// automatically redeemed function redeemAuto2(uint256 amount) public virtual returns (address[] memory tco2s, uint256[] memory amounts) { onlyUnpaused(); require(amount != 0, Errors.CP_ZERO_AMOUNT); //slither-disable-next-line uninitialized-local uint256 i; // Non-zero count tracks TCO2s with a balance //slither-disable-next-line uninitialized-local uint256 nonZeroCount; uint256 scoredTCO2Len = scoredTCO2s.length; while (amount > 0 && i < scoredTCO2Len) { address tco2 = scoredTCO2s[i]; uint256 balance = tokenBalances(tco2); //slither-disable-next-line uninitialized-local uint256 amountToRedeem; // Only TCO2s with a balance should be included for a redemption. if (balance != 0) { amountToRedeem = amount > balance ? balance : amount; amount -= amountToRedeem; unchecked { ++nonZeroCount; } } unchecked { ++i; } // Create return arrays statically since Solidity does not // support dynamic arrays or mappings in-memory (EIP-1153). // Do it here to avoid having to fill out the last indexes // during the second iteration. //slither-disable-next-line incorrect-equality if (amount == 0) { tco2s = new address[](nonZeroCount); amounts = new uint256[](nonZeroCount); tco2s[nonZeroCount - 1] = tco2; amounts[nonZeroCount - 1] = amountToRedeem; redeemSingle(tco2, amountToRedeem); } } require(amount == 0, Errors.CP_NON_ZERO_REMAINING); // Execute the second iteration by avoiding to run the last index // since we have already executed that in the first iteration. nonZeroCount = 0; //slither-disable-next-line uninitialized-local for (uint256 j; j < i - 1; ++j) { address tco2 = scoredTCO2s[j]; // This second loop only gets called when the `amount` is larger // than the first tco2 balance in the array. Here, in every iteration the // tco2 balance is smaller than the remaining amount while the last bit of // the `amount` which is smaller than the tco2 balance, got redeemed // in the first loop. uint256 balance = tokenBalances(tco2); // Ignore empty balances so we don't generate redundant transactions. //slither-disable-next-line incorrect-equality if (balance == 0) continue; tco2s[nonZeroCount] = tco2; amounts[nonZeroCount] = balance; redeemSingle(tco2, balance); unchecked { ++nonZeroCount; } } } /// @dev Internal function that redeems a single underlying token function redeemSingle(address erc20, uint256 amount) internal virtual { _burn(msg.sender, amount); IERC20Upgradeable(erc20).safeTransfer(msg.sender, amount); emit Redeemed(msg.sender, erc20, amount); } /// @dev Implemented in order to disable transfers when paused function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override { super._beforeTokenTransfer(from, to, amount); onlyUnpaused(); } /// @dev Returns the remaining space in pool before hitting the cap function getRemaining() public view returns (uint256) { return (supplyCap - totalSupply()); } /// @notice Returns the balance of the TCO2 found in the pool function tokenBalances(address tco2) public view returns (uint256) { return IERC20Upgradeable(tco2).balanceOf(address(this)); } // ----------------------------- // Locked ERC20 safety // ----------------------------- /// @dev Function to disallowing sending tokens to either the 0-address /// or this contract itself function validDestination(address to) internal view { require(to != address(0x0), Errors.CP_INVALID_DESTINATION_ZERO); require(to != address(this), Errors.CP_INVALID_DESTINATION_SELF); } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { validDestination(recipient); super.transfer(recipient, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { validDestination(recipient); super.transferFrom(sender, recipient, amount); return true; } // ----------------------------- // Helper Functions // ----------------------------- function memcmp(bytes memory a, bytes memory b) internal pure returns (bool) { return (a.length == b.length) && (keccak256(a) == keccak256(b)); } function strcmp(string memory a, string memory b) internal pure returns (bool) { return memcmp(bytes(a), bytes(b)); } function getScoredTCO2s() external view returns (address[] memory) { return scoredTCO2s; } }
// SPDX-FileCopyrightText: 2021 Toucan Labs // // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <[email protected]> or visit security.toucan.earth pragma solidity 0.8.14; import '../CarbonOffsetBatchesTypes.sol'; interface ICarbonOffsetBatches { function getConfirmationStatus(uint256 tokenId) external view returns (RetirementStatus); function getBatchNFTData(uint256 tokenId) external view returns ( uint256, uint256, RetirementStatus ); }
// SPDX-FileCopyrightText: 2022 Toucan Labs // // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <[email protected]> or visit security.toucan.earth pragma solidity 0.8.14; import '../CarbonProjectVintageTypes.sol'; import '../CarbonProjectTypes.sol'; interface IToucanCarbonOffsets { function burnFrom(address account, uint256 amount) external; function getAttributes() external view returns (ProjectData memory, VintageData memory); }
// SPDX-FileCopyrightText: 2021 Toucan Labs // // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <[email protected]> or visit security.toucan.earth pragma solidity 0.8.14; interface IToucanContractRegistry { function carbonOffsetBatchesAddress() external view returns (address); function carbonProjectsAddress() external view returns (address); function carbonProjectVintagesAddress() external view returns (address); function toucanCarbonOffsetsFactoryAddress() external view returns (address); function carbonOffsetBadgesAddress() external view returns (address); function checkERC20(address _address) external view returns (bool); function addERC20(address _address) external; }
// SPDX-FileCopyrightText: 2022 Toucan Labs // // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <[email protected]> or visit security.toucan.earth pragma solidity 0.8.14; /** * @title Errors library * @notice Defines the error messages emitted by the different contracts of the Toucan protocol * @dev Inspired by the AAVE error library: * https://github.com/aave/protocol-v2/blob/5df59ec74a0c635d877dc1c5ee4a165d41488352/contracts/protocol/libraries/helpers/Errors.sol * Error messages prefix glossary: * - CP = CarbonPool */ library Errors { // User is not authorized string public constant CP_UNAUTHORIZED = '1'; // Empty array provided as input string public constant CP_EMPTY_ARRAY = '2'; // Pool is full of TCO2s string public constant CP_FULL_POOL = '3'; // ERC20 is blacklisted in the pool. This error // is returned for TCO2s that have been blacklisted // like the HFC-23 project. string public constant CP_BLACKLISTED = '4'; // ERC20 is not whitelisted in the pool // This error is returned in case the ERC20 is // not a TCO2 in which case it has to be manually // whitelisted in order to be allowed in the pool. string public constant CP_NOT_WHITELISTED = '5'; // Vintage start time of a TCO2 is too old string public constant CP_START_TIME_TOO_OLD = '6'; string public constant CP_REGION_NOT_ACCEPTED = '7'; string public constant CP_STANDARD_NOT_ACCEPTED = '8'; string public constant CP_METHODOLOGY_NOT_ACCEPTED = '9'; // Provided fee is invalid, not in a basis points format: [0,10000) string public constant CP_INVALID_FEE = '10'; // Provided address needs to be non-zero string public constant CP_EMPTY_ADDRESS = '11'; // Validation check to ensure array lengths match string public constant CP_LENGTH_MISMATCH = '12'; // TCO2 not exempted from redeem fees string public constant CP_NOT_EXEMPTED = '13'; // A contract has been paused string public constant CP_PAUSED_CONTRACT = '14'; // Redemption has leftover unredeemed value string public constant CP_NON_ZERO_REMAINING = '15'; // Redemption exceeds deposited TCO2 supply string public constant CP_EXCEEDS_TCO2_SUPPLY = '16'; // User must be a router string public constant CP_ONLY_ROUTER = '17'; // User must be the owner string public constant CP_ONLY_OWNER = '18'; // Zero destination address is invalid for pool token transfers string public constant CP_INVALID_DESTINATION_ZERO = '19'; // Self destination address is invalid for pool token transfers string public constant CP_INVALID_DESTINATION_SELF = '20'; // Zero amount provided as an input (eg., in redemptions) in invalid string public constant CP_ZERO_AMOUNT = '21'; }
// SPDX-FileCopyrightText: 2021 Toucan Labs // // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <[email protected]> or visit security.toucan.earth pragma solidity 0.8.14; abstract contract PoolStorageV1 { /// @notice The supply cap is used as a measure to guard deposits /// in the pool. It is meant to minimize the impact a potential /// compromise in the source registry (eg. Verra) can have to the pool. uint256 public supplyCap; mapping(address => uint256) private DEPRECATED_tokenBalances; address public contractRegistry; /// @notice array used to read from when redeeming TCO2s automatically address[] public scoredTCO2s; /// @dev Mappings for attributes that can be included or excluded /// if set to `false`, attribute-values are blacklisted/rejected /// if set to `true`, attribute-values are whitelisted/accepted mapping(string => bool) public regions; mapping(string => bool) public standards; mapping(string => bool) public methodologies; /// @dev mapping to whitelist external non-TCO2 contracts by address mapping(address => bool) public externalWhiteList; /// @dev mapping to include certain TCO2 contracts by address, /// overriding attribute matching checks mapping(address => bool) public internalWhiteList; /// @dev mapping to exclude certain TCO2 contracts by address, /// even if the attribute matching would pass mapping(address => bool) public internalBlackList; /// @dev fees redeem receiver address address public feeRedeemReceiver; uint256 public feeRedeemPercentageInBase; /// @dev fees redeem burn address address public feeRedeemBurnAddress; /// @dev fees redeem burn percentage with 2 fixed decimals precision uint256 public feeRedeemBurnPercentageInBase; /// @dev repacked smaller variables here so new bools can be added below uint64 public minimumVintageStartTime; //slither-disable-next-line constable-states bool public seedMode; bool public regionsIsAcceptedMapping; bool public standardsIsAcceptedMapping; bool public methodologiesIsAcceptedMapping; } abstract contract PoolStorageV1_1 { /// @notice End users exempted from redeem fees mapping(address => bool) public redeemFeeExemptedAddresses; } abstract contract PoolStorageV1_2 { /// @notice TCO2s exempted from redeem fees mapping(address => bool) public redeemFeeExemptedTCO2s; } abstract contract PoolStorageV1_3 { /// @notice bridge router who has access to the bridgeMint & bridgeBurn functions which /// mint/burn pool tokens for cross chain messenges address public router; } abstract contract PoolStorage is PoolStorageV1, PoolStorageV1_1, PoolStorageV1_2, PoolStorageV1_3 {}
// SPDX-FileCopyrightText: 2022 Toucan Labs // // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <[email protected]> or visit security.toucan.earth pragma solidity 0.8.14; import {RemoteTokenInformation} from '../ToucanCrosschainMessengerStorage.sol'; interface IToucanCrosschainMessenger { function sendMessage( uint32 destinationDomain, address token, uint256 amount ) external payable; function sendMessageWithRecipient( uint32 destinationDomain, address token, uint256 amount, address recipient ) external payable; function remoteTokens(address _token, uint32 _destinationDomain) external view returns (RemoteTokenInformation memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) 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 onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", StringsUpgradeable.toHexString(uint160(account), 20), " is missing role ", StringsUpgradeable.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) 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 onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol) 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 onlyInitializing { __ERC20_init_unchained(name_, symbol_); } function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _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: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, 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}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, 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}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, 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) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, 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) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, 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: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, 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 Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[45] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); _; } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate that the this implementation remains valid after an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) 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"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-FileCopyrightText: 2021 Toucan Labs // // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <[email protected]> or visit security.toucan.earth pragma solidity 0.8.14; enum RetirementStatus { Pending, // 0 Rejected, // 1 Confirmed // 2 }
// SPDX-FileCopyrightText: 2021 Toucan Labs // // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <[email protected]> or visit security.toucan.earth pragma solidity 0.8.14; struct VintageData { /// @dev A human-readable string which differentiates this from other vintages in /// the same project, and helps build the corresponding TCO2 name and symbol. string name; uint64 startTime; // UNIX timestamp uint64 endTime; // UNIX timestamp uint256 projectTokenId; uint64 totalVintageQuantity; bool isCorsiaCompliant; bool isCCPcompliant; string coBenefits; string correspAdjustment; string additionalCertification; string uri; }
// SPDX-FileCopyrightText: 2021 Toucan Labs // // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <[email protected]> or visit security.toucan.earth pragma solidity 0.8.14; /// @dev CarbonProject related data and attributes struct ProjectData { string projectId; string standard; string methodology; string region; string storageMethod; string method; string emissionType; string category; string uri; address beneficiary; }
// SPDX-FileCopyrightText: 2021 Toucan Labs // // SPDX-License-Identifier: UNLICENSED // If you encounter a vulnerability or an issue, please contact <[email protected]> or visit security.toucan.earthz pragma solidity 0.8.14; struct RemoteTokenInformation { /// @notice address of the token in the remote chain address tokenAddress; /// @notice timer keeps track of when the token pair /// was created in order to disallow updates to the /// pair after a specific amount of time elapses uint256 timer; } /// @dev Separate storage contract to improve upgrade safety abstract contract ToucanCrosschainMessengerStorageV1 { enum BridgeRequestType { NOT_REGISTERED, // 0 SENT, // 1 RECEIVED // 2 } enum MessageTypes { MINT } struct BridgeRequest { bool isReverted; // this state is added for future addition of revert functionality uint256 timestamp; BridgeRequestType requestType; MessageTypes messageType; } /// @dev nonce is used to serialize requests executed /// by the source chain in order to avoid duplicates /// from being processed in the remote chain uint256 public nonce; //slither-disable-next-line constable-states bytes32 private DEPRECATED_DOMAIN_SEPARATOR; /// @dev requests keeps track of a hash of the request /// to the request info in order to avoid duplicates /// from being processed in the remote chain mapping(bytes32 => BridgeRequest) public requests; /// @notice remoteTokens maps a token (address) in the source /// chain to the domain id of the remote chain (uint32) /// to info about the token in the remote chain (RemoteTokenInformation) mapping(address => mapping(uint32 => RemoteTokenInformation)) public remoteTokens; } abstract contract ToucanCrosschainMessengerStorage is ToucanCrosschainMessengerStorageV1 {}
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @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 proxied contracts do not make use of 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. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * 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. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = _setInitializedVersion(1); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { bool isTopLevelCall = _setInitializedVersion(version); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(version); } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { _setInitializedVersion(type(uint8).max); } function _setInitializedVersion(uint8 version) private returns (bool) { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level // of initializers, because in other contexts the contract may have been reentered. if (_initializing) { require( version == 1 && !AddressUpgradeable.isContract(address(this)), "Initializable: contract is already initialized" ); return false; } else { require(_initialized < version, "Initializable: contract is already initialized"); _initialized = version; return true; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822ProxiableUpgradeable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal onlyInitializing { } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS( address newImplementation, bytes memory data, bool forceCall ) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tco2","type":"address"}],"name":"AddFeeExemptedTCO2","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"methodology","type":"string"}],"name":"AttributeMethodologyAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"methodology","type":"string"}],"name":"AttributeMethodologyRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"region","type":"string"}],"name":"AttributeRegionAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"region","type":"string"}],"name":"AttributeRegionRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"standard","type":"string"}],"name":"AttributeStandardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"standard","type":"string"}],"name":"AttributeStandardRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"erc20Addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"erc20addr","type":"address"}],"name":"ExternalAddressRemovedFromWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"erc20addr","type":"address"}],"name":"ExternalAddressWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"erc20addr","type":"address"}],"name":"InternalAddressBlacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"erc20addr","type":"address"}],"name":"InternalAddressRemovedFromBlackList","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"erc20addr","type":"address"}],"name":"InternalAddressRemovedFromWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"erc20addr","type":"address"}],"name":"InternalAddressWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"mappingName","type":"string"},{"indexed":false,"internalType":"bool","name":"accepted","type":"bool"}],"name":"MappingSwitched","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minimumVintageStartTime","type":"uint256"}],"name":"MinimumVintageStartTimeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"RedeemFeeBurnt","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"RedeemFeePaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"address","name":"erc20","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tco2","type":"address"}],"name":"RemoveFeeExemptedTCO2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"router","type":"address"}],"name":"RouterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newCap","type":"uint256"}],"name":"SupplyCapUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"tco2s","type":"address[]"}],"name":"TCO2ScoringUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"ContractRegistry","type":"address"}],"name":"ToucanRegistrySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION_RELEASE_CANDIDATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"addToList","type":"bool"},{"internalType":"string[]","name":"_regions","type":"string[]"},{"internalType":"string[]","name":"_standards","type":"string[]"},{"internalType":"string[]","name":"_methodologies","type":"string[]"}],"name":"addAttributes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"addRedeemFeeExemptedAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tco2","type":"address"}],"name":"addRedeemFeeExemptedTCO2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"erc20Addr","type":"address[]"}],"name":"addToExternalWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"erc20Addr","type":"address[]"}],"name":"addToInternalBlackList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"erc20Addr","type":"address[]"}],"name":"addToInternalWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"bridgeBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"bridgeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"destinationDomain","type":"uint32"},{"internalType":"address[]","name":"tco2s","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"bridgeTCO2s","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tco2s","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"calculateRedeemFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Addr","type":"address"}],"name":"checkAttributeMatching","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Addr","type":"address"}],"name":"checkEligible","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Addr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"externalWhiteList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRedeemBurnAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRedeemBurnPercentageInBase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRedeemDivider","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRedeemPercentageInBase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRedeemReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getScoredTCO2s","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"internalBlackList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"internalWhiteList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"methodologies","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"methodologiesIsAcceptedMapping","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumVintageStartTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tco2","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeemAndBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeemAuto","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeemAuto2","outputs":[{"internalType":"address[]","name":"tco2s","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"redeemFeeExemptedAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"redeemFeeExemptedTCO2s","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tco2s","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"redeemMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"regions","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"regionsIsAcceptedMapping","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"erc20Addr","type":"address[]"}],"name":"removeFromExternalWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"erc20Addr","type":"address[]"}],"name":"removeFromInternalBlackList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"erc20Addr","type":"address[]"}],"name":"removeFromInternalWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeRedeemFeeExemptedAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tco2","type":"address"}],"name":"removeRedeemFeeExemptedTCO2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"scoredTCO2s","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seedMode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_feeRedeemBurnAddress","type":"address"}],"name":"setFeeRedeemBurnAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeRedeemBurnPercentageInBase","type":"uint256"}],"name":"setFeeRedeemBurnPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeRedeemPercentageInBase","type":"uint256"}],"name":"setFeeRedeemPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeRedeemReceiver","type":"address"}],"name":"setFeeRedeemReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_minimumVintageStartTime","type":"uint64"}],"name":"setMinimumVintageStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newCap","type":"uint256"}],"name":"setSupplyCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tco2s","type":"address[]"}],"name":"setTCO2Scoring","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setToucanContractRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"standards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"standardsIsAcceptedMapping","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"supplyCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_mappingName","type":"string"},{"internalType":"bool","name":"accepted","type":"bool"}],"name":"switchMapping","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tco2","type":"address"}],"name":"tokenBalances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60a0604052306080523480156200001557600080fd5b506200002062000026565b62000156565b6200003260ff62000035565b50565b60008054610100900460ff1615620000ce578160ff1660011480156200006e57506200006c306200014760201b6200370e1760201c565b155b620000c65760405162461bcd60e51b815260206004820152602e602482015260008051602062005ded83398151915260448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b506000919050565b60005460ff8084169116106200012d5760405162461bcd60e51b815260206004820152602e602482015260008051602062005ded83398151915260448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620000bd565b506000805460ff191660ff92909216919091179055600190565b6001600160a01b03163b151590565b608051615c5f6200018e600039600081816115180152818161155801528181611f8e01528181611fce01526120c80152615c5f6000f3fe6080604052600436106104d65760003560e01c80638456cb5911610281578063c0d786551161015a578063e63ab1e9116100cc578063f141b84f11610085578063f141b84f14610fbe578063f2fde38b14610fe0578063f3edb9ec14611000578063f75991cd1461103c578063f887ea4014611078578063ffa1ad741461109957600080fd5b8063e63ab1e914610eb4578063e882e37b14610ee8578063e9d131ad14610f08578063ec87621c14610f28578063f06f510314610f5c578063f138ac1614610f8d57600080fd5b8063d80e05aa1161011e578063d80e05aa14610e07578063dc5f560e14610e27578063dd62ed3e14610e47578063dff0f52314610e67578063e07f744c14610e7e578063e0d7cad914610e9e57600080fd5b8063c0d7865514610d6e578063c36a257314610d8e578063d4e457ec14610db0578063d547741f14610dd2578063d6a022b814610df257600080fd5b8063a1631e4b116101f3578063a9a484c5116101b7578063a9a484c514610cab578063abf410e514610ccb578063b516f8cf14610cec578063b6a3f59a14610d0c578063bbe669eb14610d2c578063bf2f870f14610d4c57600080fd5b8063a1631e4b14610c06578063a217fddf14610c3f578063a457c2d714610c54578063a7381a6414610c74578063a9059cbb14610c8b57600080fd5b80638da5cb5b116102455780638da5cb5b14610b5c5780638dcb01ec14610b7a5780638f770ad014610b9a57806391d1485414610bb157806395d89b4114610bd1578063963ff55e14610be657600080fd5b80638456cb5914610aab5780638662522f14610ac057806388c9cf6e14610afc57806389022e2e14610b1c5780638c2a993e14610b3c57600080fd5b80633f4ba83a116103b35780635db44cef11610325578063715018a6116102e9578063715018a614610a0157806374f4f54714610a1657806379255ddd14610a365780637966529d14610a565780638129fc1c14610a7657806381e48e9014610a8b57600080fd5b80635db44cef146109455780636ca0b0d7146109655780636dbb31021461097a5780636fd2f1811461099a57806370a08231146109cb57600080fd5b80634c02cad1116103775780634c02cad1146108975780634f1ef286146108c5578063523fba7f146108d857806352d1902d146108f857806354c9c9701461090d5780635c975abb1461092d57600080fd5b80633f4ba83a1461080257806341dbbb2a146108175780634642547b1461083757806346518b0a1461085757806347e7ef241461087757600080fd5b806329f4c7a31161044c57806336568abe1161041057806336568abe146107415780633659cfe614610761578063395093511461078157806339cd7a8a146107a15780633a9a77ee146107c15780633d2afced146107e257600080fd5b806329f4c7a31461068d5780632b540f19146106b45780632b554142146106e55780632f2ff15d14610705578063313ce5671461072557600080fd5b80630e2d15ab1161049e5780630e2d15ab1461059457806318160ddd146105c557806320b167f9146105e457806323b872dd14610604578063248a9ca31461062457806324adbf4d1461065457600080fd5b806301ffc9a7146104db57806306fdde0314610510578063095ea7b3146105325780630b7d28c7146105525780630c0efecc14610574575b600080fd5b3480156104e757600080fd5b506104fb6104f6366004614c5f565b6110ca565b60405190151581526020015b60405180910390f35b34801561051c57600080fd5b50610525611101565b6040516105079190614ce1565b34801561053e57600080fd5b506104fb61054d366004614d09565b611193565b34801561055e57600080fd5b5061057261056d366004614d35565b6111ab565b005b34801561058057600080fd5b5061057261058f366004614d67565b6111d8565b3480156105a057600080fd5b506104fb6105af366004614d35565b6101a06020526000908152604090205460ff1681565b3480156105d157600080fd5b506035545b604051908152602001610507565b3480156105f057600080fd5b506105726105ff366004614d84565b611237565b34801561061057600080fd5b506104fb61061f366004614d9d565b611245565b34801561063057600080fd5b506105d661063f366004614d84565b600090815260fb602052604090206001015490565b34801561066057600080fd5b5061019b54610675906001600160a01b031681565b6040516001600160a01b039091168152602001610507565b34801561069957600080fd5b5061019f546104fb9068010000000000000000900460ff1681565b3480156106c057600080fd5b506104fb6106cf366004614d35565b6101a16020526000908152604090205460ff1681565b3480156106f157600080fd5b50610572610700366004614f07565b611268565b34801561071157600080fd5b50610572610720366004614fc1565b61146b565b34801561073157600080fd5b5060405160128152602001610507565b34801561074d57600080fd5b5061057261075c366004614fc1565b611490565b34801561076d57600080fd5b5061057261077c366004614d35565b61150e565b34801561078d57600080fd5b506104fb61079c366004614d09565b6115ed565b3480156107ad57600080fd5b506105726107bc36600461507f565b61160f565b3480156107cd57600080fd5b5061019d54610675906001600160a01b031681565b3480156107ee57600080fd5b506105726107fd366004615110565b611783565b34801561080e57600080fd5b506105726119d0565b34801561082357600080fd5b506105d6610832366004614f07565b611a03565b34801561084357600080fd5b50610572610852366004614d35565b611adc565b34801561086357600080fd5b5061057261087236600461519b565b611b06565b34801561088357600080fd5b50610572610892366004614d09565b611be1565b3480156108a357600080fd5b506108b76108b2366004614d84565b611ca4565b604051610507929190615213565b6105726108d336600461526a565b611f84565b3480156108e457600080fd5b506105d66108f3366004614d35565b612050565b34801561090457600080fd5b506105d66120bb565b34801561091957600080fd5b5061057261092836600461519b565b61216e565b34801561093957600080fd5b5060975460ff166104fb565b34801561095157600080fd5b5061057261096036600461519b565b612249565b34801561097157600080fd5b506105d6600281565b34801561098657600080fd5b50610572610995366004614d35565b612324565b3480156109a657600080fd5b506104fb6109b5366004614d35565b6101986020526000908152604090205460ff1681565b3480156109d757600080fd5b506105d66109e6366004614d35565b6001600160a01b031660009081526033602052604090205490565b348015610a0d57600080fd5b50610572612381565b348015610a2257600080fd5b50610572610a31366004614d09565b6123e5565b348015610a4257600080fd5b50610572610a51366004614d84565b6123f7565b348015610a6257600080fd5b50610572610a7136600461519b565b612441565b348015610a8257600080fd5b5061057261251c565b348015610a9757600080fd5b50610572610aa636600461534c565b6125e2565b348015610ab757600080fd5b50610572612a3d565b348015610acc57600080fd5b506104fb610adb3660046153e6565b80516020818301810180516101958252928201919093012091525460ff1681565b348015610b0857600080fd5b50610572610b1736600461519b565b612a6e565b348015610b2857600080fd5b50610572610b37366004614d09565b612b49565b348015610b4857600080fd5b50610572610b57366004614d09565b612c17565b348015610b6857600080fd5b506065546001600160a01b0316610675565b348015610b8657600080fd5b50610572610b9536600461519b565b612c29565b348015610ba657600080fd5b506105d66101915481565b348015610bbd57600080fd5b506104fb610bcc366004614fc1565b612d04565b348015610bdd57600080fd5b50610525612d2f565b348015610bf257600080fd5b50610675610c01366004614d84565b612d3e565b348015610c1257600080fd5b5061019f54610c27906001600160401b031681565b6040516001600160401b039091168152602001610507565b348015610c4b57600080fd5b506105d6600081565b348015610c6057600080fd5b506104fb610c6f366004614d09565b612d69565b348015610c8057600080fd5b506105d661019e5481565b348015610c9757600080fd5b506104fb610ca6366004614d09565b612def565b348015610cb757600080fd5b506104fb610cc6366004614d35565b612e04565b348015610cd757600080fd5b5061019354610675906001600160a01b031681565b348015610cf857600080fd5b50610572610d07366004614d35565b613101565b348015610d1857600080fd5b50610572610d27366004614d84565b61316d565b348015610d3857600080fd5b50610572610d4736600461541a565b6131ab565b348015610d5857600080fd5b50610d6161324a565b604051610507919061545b565b348015610d7a57600080fd5b50610572610d89366004614d35565b6132ac565b348015610d9a57600080fd5b5061019f546104fb90600160501b900460ff1681565b348015610dbc57600080fd5b5061019f546104fb90600160581b900460ff1681565b348015610dde57600080fd5b50610572610ded366004614fc1565b613303565b348015610dfe57600080fd5b506105d6613328565b348015610e1357600080fd5b50610572610e22366004614d35565b613346565b348015610e3357600080fd5b506104fb610e42366004614d35565b6133a0565b348015610e5357600080fd5b506105d6610e6236600461546e565b61350e565b348015610e7357600080fd5b506105d661019c5481565b348015610e8a57600080fd5b50610572610e99366004614d35565b613539565b348015610eaa57600080fd5b506105d661271081565b348015610ec057600080fd5b506105d67f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b348015610ef457600080fd5b50610572610f03366004614d35565b6135a5565b348015610f1457600080fd5b50610572610f23366004614d84565b6135fc565b348015610f3457600080fd5b506105d67f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0881565b348015610f6857600080fd5b506104fb610f77366004614d35565b61019a6020526000908152604090205460ff1681565b348015610f9957600080fd5b506104fb610fa8366004614d35565b6101996020526000908152604090205460ff1681565b348015610fca57600080fd5b5061019f546104fb90600160481b900460ff1681565b348015610fec57600080fd5b50610572610ffb366004614d35565b613646565b34801561100c57600080fd5b506104fb61101b3660046153e6565b80516020818301810180516101968252928201919093012091525460ff1681565b34801561104857600080fd5b506104fb6110573660046153e6565b80516020818301810180516101978252928201919093012091525460ff1681565b34801561108457600080fd5b506101a254610675906001600160a01b031681565b3480156110a557600080fd5b50610525604051806040016040528060058152602001640312e342e360dc1b81525081565b60006001600160e01b03198216637965db0b60e01b14806110fb57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060603680546111109061549c565b80601f016020809104026020016040519081016040528092919081815260200182805461113c9061549c565b80156111895780601f1061115e57610100808354040283529160200191611189565b820191906000526020600020905b81548152906001019060200180831161116c57829003601f168201915b5050505050905090565b6000336111a181858561371d565b5060019392505050565b6111b3613841565b6001600160a01b031660009081526101a060205260409020805460ff19166001179055565b6111e0613841565b61019f805467ffffffffffffffff19166001600160401b0383169081179091556040519081527f87f670402a6c72fff3b60ba5223165f062b58d671871fc2c49ea96101fdd19a0906020015b60405180910390a150565b61124081611ca4565b505050565b600061125083613897565b61125b84848461391a565b50600190505b9392505050565b611270613933565b81518151604080518082019091526002815261189960f11b60208201529082146112b65760405162461bcd60e51b81526004016112ad9190614ce1565b60405180910390fd5b5061019c543360009081526101a0602052604081205490919060ff1682805b85811015611383578261132757612710848883815181106112f8576112f86154d6565b602002602001015161130a9190615502565b6113149190615521565b91506113208286615543565b945061132c565b600091505b611373888281518110611341576113416154d6565b60200260200101518389848151811061135c5761135c6154d6565b602002602001015161136e919061555b565b613973565b61137c81615572565b90506112d5565b50831561146257600061271061019e548661139e9190615502565b6113a89190615521565b90506113b4818661555b565b61019b549095506113ce906001600160a01b031686612def565b5060408051338152602081018790527f3f89e1d936a29a8de9ae9040436992721a00bc63bbe3ca55692b95f0311640b2910160405180910390a180156114605761019d54611425906001600160a01b031682612def565b5060408051338152602081018390527f932bd968974f0b6fa1cb59bf961f81d2e57b39332d311b413dceae17966387db910160405180910390a15b505b50505050505050565b600082815260fb6020526040902060010154611486816139d7565b61124083836139e1565b6001600160a01b03811633146115005760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016112ad565b61150a8282613a67565b5050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036115565760405162461bcd60e51b81526004016112ad9061558b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661159f600080516020615bbf833981519152546001600160a01b031690565b6001600160a01b0316146115c55760405162461bcd60e51b81526004016112ad906155d7565b6115ce81613ace565b604080516000808252602082019092526115ea91839190613ad6565b50565b6000336111a1818585611600838361350e565b61160a9190615543565b61371d565b611617613841565b6116408260405180604001604052806007815260200166726567696f6e7360c81b815250613c41565b1561167c578061165f5761019f805460ff60481b191690556000611676565b61019f805460ff60481b1916600160481b17905560015b50611746565b6116a782604051806040016040528060098152602001687374616e646172647360b81b815250613c41565b156116df57806116c65761019f805460ff60501b191690556000611676565b61019f805460ff60501b1916600160501b179055611746565b61170e826040518060400160405280600d81526020016c6d6574686f646f6c6f6769657360981b815250613c41565b15611746578061172d5761019f805460ff60581b191690556000611744565b61019f805460ff60581b1916600160581b17905560015b505b7fcdc35455a1217219a4240bb18a7d2978eb98208f22f7ec36d6a1381c28f9d0f58282604051611777929190615623565b60405180910390a15050565b6117ac7f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08613c4d565b6040805180820190915260018152601960f91b60208201528390816117e45760405162461bcd60e51b81526004016112ad9190614ce1565b50604080518082019091526002815261189960f11b602082015281831461181e5760405162461bcd60e51b81526004016112ad9190614ce1565b506101a254604051635ed6513d60e11b815230600482015263ffffffff881660248201526001600160a01b0390911690600090829063bdaca27a906044016040805180830381865afa158015611878573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061189c9190615652565b8051604080518082019091526002815261313160f01b6020820152919250906001600160a01b0382166118e25760405162461bcd60e51b81526004016112ad9190614ce1565b5060005b848110156119c457836001600160a01b031663255e0ae48b8b8b85818110611910576119106154d6565b90506020020160208101906119259190614d35565b8a8a86818110611937576119376154d6565b6040516001600160e01b031960e088901b16815263ffffffff9590951660048601526001600160a01b039384166024860152602002919091013560448401525085166064820152608401600060405180830381600087803b15801561199b57600080fd5b505af11580156119af573d6000803e3d6000fd5b50505050806119bd90615572565b90506118e6565b50505050505050505050565b6119f97f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a613c4d565b611a01613cb3565b565b6000611a0d613933565b3360009081526101a0602052604090205460ff1615611a2e575060006110fb565b82518251604080518082019091526002815261189960f11b6020820152908214611a6b5760405162461bcd60e51b81526004016112ad9190614ce1565b5061019c54600090815b83811015611ad157600061271083888481518110611a9557611a956154d6565b6020026020010151611aa79190615502565b611ab19190615521565b9050611abd8185615543565b93505080611aca90615572565b9050611a75565b509095945050505050565b611ae4613841565b6001600160a01b031660009081526101a060205260409020805460ff19169055565b611b0e613841565b60005b815181101561150a5760016101986000848481518110611b3357611b336154d6565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f29b8b184f4394a88477750516a3701dd0c9409451be78c24428bf5f827f527a5828281518110611ba557611ba56154d6565b6020026020010151604051611bc991906001600160a01b0391909116815260200190565b60405180910390a1611bda81615572565b9050611b11565b611be9613933565b611bf2826133a0565b506000611bfd613328565b6040805180820190915260018152603360f81b602082015290915081611c365760405162461bcd60e51b81526004016112ad9190614ce1565b5080821115611c43578091505b611c4d3383613d46565b604080516001600160a01b0385168152602081018490527f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4910160405180910390a16112406001600160a01b038416333085613e31565b606080611caf613933565b604080518082019091526002815261323160f01b602082015283611ce65760405162461bcd60e51b81526004016112ad9190614ce1565b506101945460009081905b600086118015611d0057508083105b15611e6e5760006101948481548110611d1b57611d1b6154d6565b60009182526020822001546001600160a01b03169150611d3a82612050565b905060008115611d6857818911611d515788611d53565b815b9050611d5f818a61555b565b98508460010194505b85600101955088600003611e6657846001600160401b03811115611d8e57611d8e614dde565b604051908082528060200260200182016040528015611db7578160200160208202803683370190505b509750846001600160401b03811115611dd257611dd2614dde565b604051908082528060200260200182016040528015611dfb578160200160208202803683370190505b5096508288611e0b60018861555b565b81518110611e1b57611e1b6154d6565b6001600160a01b03909216602092830291909101909101528087611e4060018861555b565b81518110611e5057611e506154d6565b602002602001018181525050611e668382613973565b505050611cf1565b604080518082019091526002815261313560f01b60208201528615611ea65760405162461bcd60e51b81526004016112ad9190614ce1565b506000915060005b611eb960018561555b565b811015611f7b5760006101948281548110611ed657611ed66154d6565b60009182526020822001546001600160a01b03169150611ef582612050565b905080600003611f06575050611f6b565b81888681518110611f1957611f196154d6565b60200260200101906001600160a01b031690816001600160a01b03168152505080878681518110611f4c57611f4c6154d6565b602002602001018181525050611f628282613973565b84600101945050505b611f7481615572565b9050611eae565b50505050915091565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003611fcc5760405162461bcd60e51b81526004016112ad9061558b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612015600080516020615bbf833981519152546001600160a01b031690565b6001600160a01b03161461203b5760405162461bcd60e51b81526004016112ad906155d7565b61204482613ace565b61150a82826001613ad6565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015612097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fb91906156a9565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461215b5760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016112ad565b50600080516020615bbf83398151915290565b612176613841565b60005b815181101561150a57600161019a600084848151811061219b5761219b6154d6565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f43388d274033333ceb567d699874be067ce7411c2bfc989f8e623694c9b3284f82828151811061220d5761220d6154d6565b602002602001015160405161223191906001600160a01b0391909116815260200190565b60405180910390a161224281615572565b9050612179565b612251613841565b60005b815181101561150a57600061019a6000848481518110612276576122766154d6565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507fa7f25a7a7bea0a3fabbe5dc8b6176bd9a603925da390010a10998148c192b6708282815181106122e8576122e86154d6565b602002602001015160405161230c91906001600160a01b0391909116815260200190565b60405180910390a161231d81615572565b9050612254565b61232c613841565b6001600160a01b03811660008181526101a16020908152604091829020805460ff1916600117905590519182527fbfe78aa03afab7296923112293cb902a2fe6df5a6d3d81e1933c652c4cf860f4910161122c565b6065546001600160a01b031633146123db5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016112ad565b611a016000613ea2565b6123ed613ef4565b61150a8282613f3a565b6123ff613841565b604080518082019091526002815261031360f41b6020820152612710821061243a5760405162461bcd60e51b81526004016112ad9190614ce1565b5061019e55565b612449613841565b60005b815181101561150a576000610198600084848151811061246e5761246e6154d6565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f3c36656d3e8c3db21a1c7d0a7208d73387e15535964c44c30b20c45ab51b3c388282815181106124e0576124e06154d6565b602002602001015160405161250491906001600160a01b0391909116815260200190565b60405180910390a161251581615572565b905061244c565b60006125286001614094565b90508015612540576000805461ff0019166101001790555b612548614121565b612550614148565b612558614178565b612595604051806060016040528060248152602001615c0660249139604051806040016040528060038152602001621390d560ea1b8152506141ab565b6125a06000336139e1565b80156115ea576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200161122c565b6125ea613841565b60005b8251811015612758578415156001036126a6576001610196848381518110612617576126176154d6565b602002602001015160405161262c91906156c2565b908152602001604051809103902060006101000a81548160ff0219169083151502179055507fa27e97999993c298fae0b7088ff732fe078cc1585665ee1554220b3cbe6317a9838281518110612684576126846154d6565b60200260200101516040516126999190614ce1565b60405180910390a1612748565b60006101968483815181106126bd576126bd6154d6565b60200260200101516040516126d291906156c2565b908152602001604051809103902060006101000a81548160ff0219169083151502179055507f0127ddc00426c693b5becb26ba43a260c781ebc323b61d3b24b61e4dc5c93c7183828151811061272a5761272a6154d6565b602002602001015160405161273f9190614ce1565b60405180910390a15b61275181615572565b90506125ed565b5060005b81518110156128c757841515600103612815576001610197838381518110612786576127866154d6565b602002602001015160405161279b91906156c2565b908152602001604051809103902060006101000a81548160ff0219169083151502179055507f156643e9a7f860e95993739893595e6ee1d04d9ff1b98567dbe9d5681cd152b28282815181106127f3576127f36154d6565b60200260200101516040516128089190614ce1565b60405180910390a16128b7565b600061019783838151811061282c5761282c6154d6565b602002602001015160405161284191906156c2565b908152602001604051809103902060006101000a81548160ff0219169083151502179055507f21a77ac4edf49633047cc4e32b10dfe633811216214400e0e1f507c3f7287b61828281518110612899576128996154d6565b60200260200101516040516128ae9190614ce1565b60405180910390a15b6128c081615572565b905061275c565b5060005b8351811015612a36578415156001036129845760016101958583815181106128f5576128f56154d6565b602002602001015160405161290a91906156c2565b908152602001604051809103902060006101000a81548160ff0219169083151502179055507f3df7a1330febee3646ae4a0f0e46c94c046f0ee810b2b7f1fa10fa8f34d7b7ef848281518110612962576129626154d6565b60200260200101516040516129779190614ce1565b60405180910390a1612a26565b600061019585838151811061299b5761299b6154d6565b60200260200101516040516129b091906156c2565b908152602001604051809103902060006101000a81548160ff0219169083151502179055507fc84badb33408cce6e89b30a735d8f06e094fa4a19c01c2da66718f490c672f65848281518110612a0857612a086154d6565b6020026020010151604051612a1d9190614ce1565b60405180910390a15b612a2f81615572565b90506128cb565b5050505050565b612a667f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a613c4d565b611a016141f9565b612a76613841565b60005b815181101561150a5760016101996000848481518110612a9b57612a9b6154d6565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f2e333bce7bf5a0097fbb4fef2a950809960b5a4aa1a63cbcffc24ac62dc4fd07828281518110612b0d57612b0d6154d6565b6020026020010151604051612b3191906001600160a01b0391909116815260200190565b60405180910390a1612b4281615572565b9050612a79565b612b51613933565b6001600160a01b03821660009081526101a160209081526040918290205482518084019093526002835261313360f01b9183019190915260ff16612ba85760405162461bcd60e51b81526004016112ad9190614ce1565b50612bb38282613973565b60405163079cc67960e41b8152336004820152602481018290526001600160a01b038316906379cc679090604401600060405180830381600087803b158015612bfb57600080fd5b505af1158015612c0f573d6000803e3d6000fd5b505050505050565b612c1f613ef4565b61150a8282613d46565b612c31613841565b60005b815181101561150a5760006101996000848481518110612c5657612c566154d6565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f9cee5064afac40e291311ecb6a670ef3ef652131fb1ed15c1266fb22cffd6bdd828281518110612cc857612cc86154d6565b6020026020010151604051612cec91906001600160a01b0391909116815260200190565b60405180910390a1612cfd81615572565b9050612c34565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060603780546111109061549c565b6101948181548110612d4f57600080fd5b6000918252602090912001546001600160a01b0316905081565b60003381612d77828661350e565b905083811015612dd75760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016112ad565b612de4828686840361371d565b506001949350505050565b6000612dfa83613897565b6111a18383614274565b6000612e6560405180610140016040528060608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200160006001600160a01b031681525090565b612ee16040518061016001604052806060815260200160006001600160401b0316815260200160006001600160401b031681526020016000815260200160006001600160401b03168152602001600015158152602001600015158152602001606081526020016060815260200160608152602001606081525090565b836001600160a01b031663152583de6040518163ffffffff1660e01b8152600401600060405180830381865afa158015612f1f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612f47919081019061587c565b61019f546020808301516040805180820190915260018152601b60f91b9281019290925293955091935090916001600160401b0391821691161015612f9f5760405162461bcd60e51b81526004016112ad9190614ce1565b5061019f60099054906101000a900460ff1615156101958360600151604051612fc891906156c2565b9081526040805191829003602090810183205483830190925260018352603760f81b90830152909160ff9091161515146130155760405162461bcd60e51b81526004016112ad9190614ce1565b5061019f600a9054906101000a900460ff161515610196836020015160405161303e91906156c2565b9081526040805191829003602090810183205483830190925260018352600760fb1b90830152909160ff90911615151461308b5760405162461bcd60e51b81526004016112ad9190614ce1565b5061019f600b9054906101000a900460ff16151561019783604001516040516130b491906156c2565b9081526040805191829003602090810183205483830190925260018352603960f81b90830152909160ff909116151514612de45760405162461bcd60e51b81526004016112ad9190614ce1565b613109613841565b604080518082019091526002815261313160f01b60208201526001600160a01b0382166131495760405162461bcd60e51b81526004016112ad9190614ce1565b5061019b80546001600160a01b0319166001600160a01b0392909216919091179055565b613175613841565b6101918190556040518181527f4e44c8be34d12f1b7f56b13b4bbe97e64ca37a91916f86c73412da80c21748e29060200161122c565b6131d47f241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08613c4d565b6040805180820190915260018152601960f91b60208201528161320a5760405162461bcd60e51b81526004016112ad9190614ce1565b506132186101948383614b73565b507f9204d457ace303c5dbbeaa6966e5ec65661a390007a367c6645e52b4ef4b528e8282604051611777929190615a39565b606061019480548060200260200160405190810160405280929190818152602001828054801561118957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613285575050505050905090565b6132b4613841565b6101a280546001600160a01b0319166001600160a01b0383169081179091556040519081527f7aed1d3e8155a07ccf395e44ea3109a0e2d6c9b29bbbe9f142d9790596f4dc809060200161122c565b600082815260fb602052604090206001015461331e816139d7565b6112408383613a67565b600061333360355490565b61019154613341919061555b565b905090565b61334e613841565b6001600160a01b03811660008181526101a16020908152604091829020805460ff1916905590519182527fd1fc9d8986829d0ba9df2bc201a2c76327e0f71567b5a2fb82ba464bf4a03f44910161122c565b6101935460405163787d871360e01b81526001600160a01b038381166004830152600092839291169063787d871390602401602060405180830381865afa1580156133ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134139190615a7c565b905080156134ad576001600160a01b0383166000908152610199602052604090205460ff16156134465750600192915050565b6001600160a01b038316600090815261019a602090815260409182902054825180840190935260018352600d60fa1b9183019190915260ff161561349d5760405162461bcd60e51b81526004016112ad9190614ce1565b506134a783612e04565b50613505565b6001600160a01b0383166000908152610198602090815260409182902054825180840190935260018352603560f81b9183019190915260ff166135035760405162461bcd60e51b81526004016112ad9190614ce1565b505b50600192915050565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b613541613841565b604080518082019091526002815261313160f01b60208201526001600160a01b0382166135815760405162461bcd60e51b81526004016112ad9190614ce1565b5061019d80546001600160a01b0319166001600160a01b0392909216919091179055565b6135ad613841565b61019380546001600160a01b0319166001600160a01b0383169081179091556040519081527f86907b53cf2024579968511876daf0b4620d65803b550e33101baf70aeb6f5eb9060200161122c565b613604613841565b604080518082019091526002815261031360f41b6020820152612710821061363f5760405162461bcd60e51b81526004016112ad9190614ce1565b5061019c55565b6065546001600160a01b031633146136a05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016112ad565b6001600160a01b0381166137055760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016112ad565b6115ea81613ea2565b6001600160a01b03163b151590565b6001600160a01b03831661377f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016112ad565b6001600160a01b0382166137e05760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016112ad565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b336138546065546001600160a01b031690565b6001600160a01b03161460405180604001604052806002815260200161062760f31b815250906115ea5760405162461bcd60e51b81526004016112ad9190614ce1565b604080518082019091526002815261313960f01b60208201526001600160a01b0382166138d75760405162461bcd60e51b81526004016112ad9190614ce1565b50604080518082019091526002815261032360f41b60208201526001600160a01b038216300361150a5760405162461bcd60e51b81526004016112ad9190614ce1565b600033613928858285614282565b612de48585856142f6565b60975460ff1615604051806040016040528060028152602001610c4d60f21b815250906115ea5760405162461bcd60e51b81526004016112ad9190614ce1565b61397d3382613f3a565b6139916001600160a01b03831633836144cf565b604080513381526001600160a01b03841660208201529081018290527f27d4634c833b7622a0acddbf7f746183625f105945e95c723ad1d5a9f2a0b6fc90606001611777565b6115ea81336144ff565b6139eb8282612d04565b61150a57600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613a233390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b613a718282612d04565b1561150a57600082815260fb602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6115ea613841565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615613b095761124083614563565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613b63575060408051601f3d908101601f19168201909252613b60918101906156a9565b60015b613bc65760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016112ad565b600080516020615bbf8339815191528114613c355760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016112ad565b506112408383836145ff565b60006112618383614624565b613c578133612d04565b80613c7b575033613c706065546001600160a01b031690565b6001600160a01b0316145b604051806040016040528060018152602001603160f81b8152509061150a5760405162461bcd60e51b81526004016112ad9190614ce1565b60975460ff16613cfc5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016112ad565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038216613d9c5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016112ad565b613da860008383614649565b8060356000828254613dba9190615543565b90915550506001600160a01b03821660009081526033602052604081208054839290613de7908490615543565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052613e9c9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614651565b50505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6101a254604080518082019091526002815261313760f01b6020820152906001600160a01b031633146115ea5760405162461bcd60e51b81526004016112ad9190614ce1565b6001600160a01b038216613f9a5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016112ad565b613fa682600083614649565b6001600160a01b0382166000908152603360205260409020548181101561401a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016112ad565b6001600160a01b038316600090815260336020526040812083830390556035805484929061404990849061555b565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60008054610100900460ff16156140db578160ff1660011480156140b75750303b155b6140d35760405162461bcd60e51b81526004016112ad90615a99565b506000919050565b60005460ff8084169116106141025760405162461bcd60e51b81526004016112ad90615a99565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff16611a015760405162461bcd60e51b81526004016112ad90615ae7565b600054610100900460ff1661416f5760405162461bcd60e51b81526004016112ad90615ae7565b611a0133613ea2565b600054610100900460ff1661419f5760405162461bcd60e51b81526004016112ad90615ae7565b6097805460ff19169055565b600054610100900460ff166141d25760405162461bcd60e51b81526004016112ad90615ae7565b81516141e5906036906020850190614bd6565b508051611240906037906020840190614bd6565b60975460ff161561423f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016112ad565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258613d293390565b6000336111a18185856142f6565b600061428e848461350e565b90506000198114613e9c57818110156142e95760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016112ad565b613e9c848484840361371d565b6001600160a01b03831661435a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016112ad565b6001600160a01b0382166143bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016112ad565b6143c7838383614649565b6001600160a01b0383166000908152603360205260409020548181101561443f5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016112ad565b6001600160a01b03808516600090815260336020526040808220858503905591851681529081208054849290614476908490615543565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516144c291815260200190565b60405180910390a3613e9c565b6040516001600160a01b03831660248201526044810182905261124090849063a9059cbb60e01b90606401613e65565b6145098282612d04565b61150a57614521816001600160a01b03166014614723565b61452c836020614723565b60405160200161453d929190615b32565b60408051601f198184030181529082905262461bcd60e51b82526112ad91600401614ce1565b6001600160a01b0381163b6145d05760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016112ad565b600080516020615bbf83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b614608836148be565b6000825111806146155750805b1561124057613e9c83836148fe565b6000815183511480156112615750508051602091820120825192909101919091201490565b611240613933565b60006146a6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166149f29092919063ffffffff16565b80519091501561124057808060200190518101906146c49190615a7c565b6112405760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016112ad565b60606000614732836002615502565b61473d906002615543565b6001600160401b0381111561475457614754614dde565b6040519080825280601f01601f19166020018201604052801561477e576020820181803683370190505b509050600360fc1b81600081518110614799576147996154d6565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106147c8576147c86154d6565b60200101906001600160f81b031916908160001a90535060006147ec846002615502565b6147f7906001615543565b90505b600181111561486f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061482b5761482b6154d6565b1a60f81b828281518110614841576148416154d6565b60200101906001600160f81b031916908160001a90535060049490941c9361486881615ba7565b90506147fa565b5083156112615760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016112ad565b6148c781614563565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6149665760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016112ad565b600080846001600160a01b03168460405161498191906156c2565b600060405180830381855af49150503d80600081146149bc576040519150601f19603f3d011682016040523d82523d6000602084013e6149c1565b606091505b50915091506149e98282604051806060016040528060278152602001615bdf60279139614a09565b95945050505050565b6060614a018484600085614a42565b949350505050565b60608315614a18575081611261565b825115614a285782518084602001fd5b8160405162461bcd60e51b81526004016112ad9190614ce1565b606082471015614aa35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016112ad565b6001600160a01b0385163b614afa5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016112ad565b600080866001600160a01b03168587604051614b1691906156c2565b60006040518083038185875af1925050503d8060008114614b53576040519150601f19603f3d011682016040523d82523d6000602084013e614b58565b606091505b5091509150614b68828286614a09565b979650505050505050565b828054828255906000526020600020908101928215614bc6579160200282015b82811115614bc65781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190614b93565b50614bd2929150614c4a565b5090565b828054614be29061549c565b90600052602060002090601f016020900481019282614c045760008555614bc6565b82601f10614c1d57805160ff1916838001178555614bc6565b82800160010185558215614bc6579182015b82811115614bc6578251825591602001919060010190614c2f565b5b80821115614bd25760008155600101614c4b565b600060208284031215614c7157600080fd5b81356001600160e01b03198116811461126157600080fd5b60005b83811015614ca4578181015183820152602001614c8c565b83811115613e9c5750506000910152565b60008151808452614ccd816020860160208601614c89565b601f01601f19169290920160200192915050565b6020815260006112616020830184614cb5565b6001600160a01b03811681146115ea57600080fd5b60008060408385031215614d1c57600080fd5b8235614d2781614cf4565b946020939093013593505050565b600060208284031215614d4757600080fd5b813561126181614cf4565b6001600160401b03811681146115ea57600080fd5b600060208284031215614d7957600080fd5b813561126181614d52565b600060208284031215614d9657600080fd5b5035919050565b600080600060608486031215614db257600080fd5b8335614dbd81614cf4565b92506020840135614dcd81614cf4565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60405161016081016001600160401b0381118282101715614e1757614e17614dde565b60405290565b60405161014081016001600160401b0381118282101715614e1757614e17614dde565b604051601f8201601f191681016001600160401b0381118282101715614e6857614e68614dde565b604052919050565b60006001600160401b03821115614e8957614e89614dde565b5060051b60200190565b600082601f830112614ea457600080fd5b81356020614eb9614eb483614e70565b614e40565b82815260059290921b84018101918181019086841115614ed857600080fd5b8286015b84811015614efc578035614eef81614cf4565b8352918301918301614edc565b509695505050505050565b60008060408385031215614f1a57600080fd5b82356001600160401b0380821115614f3157600080fd5b614f3d86838701614e93565b9350602091508185013581811115614f5457600080fd5b85019050601f81018613614f6757600080fd5b8035614f75614eb482614e70565b81815260059190911b82018301908381019088831115614f9457600080fd5b928401925b82841015614fb257833582529284019290840190614f99565b80955050505050509250929050565b60008060408385031215614fd457600080fd5b823591506020830135614fe681614cf4565b809150509250929050565b60006001600160401b0382111561500a5761500a614dde565b50601f01601f191660200190565b6000615026614eb484614ff1565b905082815283838301111561503a57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261506257600080fd5b61126183833560208501615018565b80151581146115ea57600080fd5b6000806040838503121561509257600080fd5b82356001600160401b038111156150a857600080fd5b6150b485828601615051565b9250506020830135614fe681615071565b60008083601f8401126150d757600080fd5b5081356001600160401b038111156150ee57600080fd5b6020830191508360208260051b850101111561510957600080fd5b9250929050565b60008060008060006060868803121561512857600080fd5b853563ffffffff8116811461513c57600080fd5b945060208601356001600160401b038082111561515857600080fd5b61516489838a016150c5565b9096509450604088013591508082111561517d57600080fd5b5061518a888289016150c5565b969995985093965092949392505050565b6000602082840312156151ad57600080fd5b81356001600160401b038111156151c357600080fd5b614a0184828501614e93565b600081518084526020808501945080840160005b838110156152085781516001600160a01b0316875295820195908201906001016151e3565b509495945050505050565b60408152600061522660408301856151cf565b82810360208481019190915284518083528582019282019060005b8181101561525d57845183529383019391830191600101615241565b5090979650505050505050565b6000806040838503121561527d57600080fd5b823561528881614cf4565b915060208301356001600160401b038111156152a357600080fd5b8301601f810185136152b457600080fd5b6152c385823560208401615018565b9150509250929050565b600082601f8301126152de57600080fd5b813560206152ee614eb483614e70565b82815260059290921b8401810191818101908684111561530d57600080fd5b8286015b84811015614efc5780356001600160401b038111156153305760008081fd5b61533e8986838b0101615051565b845250918301918301615311565b6000806000806080858703121561536257600080fd5b843561536d81615071565b935060208501356001600160401b038082111561538957600080fd5b615395888389016152cd565b945060408701359150808211156153ab57600080fd5b6153b7888389016152cd565b935060608701359150808211156153cd57600080fd5b506153da878288016152cd565b91505092959194509250565b6000602082840312156153f857600080fd5b81356001600160401b0381111561540e57600080fd5b614a0184828501615051565b6000806020838503121561542d57600080fd5b82356001600160401b0381111561544357600080fd5b61544f858286016150c5565b90969095509350505050565b60208152600061126160208301846151cf565b6000806040838503121561548157600080fd5b823561548c81614cf4565b91506020830135614fe681614cf4565b600181811c908216806154b057607f821691505b6020821081036154d057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561551c5761551c6154ec565b500290565b60008261553e57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115615556576155566154ec565b500190565b60008282101561556d5761556d6154ec565b500390565b600060018201615584576155846154ec565b5060010190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6040815260006156366040830185614cb5565b905082151560208301529392505050565b805161411c81614cf4565b60006040828403121561566457600080fd5b604051604081018181106001600160401b038211171561568657615686614dde565b604052825161569481614cf4565b81526020928301519281019290925250919050565b6000602082840312156156bb57600080fd5b5051919050565b600082516156d4818460208701614c89565b9190910192915050565b600082601f8301126156ef57600080fd5b81516156fd614eb482614ff1565b81815284602083860101111561571257600080fd5b614a01826020830160208701614c89565b805161411c81614d52565b805161411c81615071565b6000610160828403121561574c57600080fd5b615754614df4565b905081516001600160401b038082111561576d57600080fd5b615779858386016156de565b835261578760208501615723565b602084015261579860408501615723565b6040840152606084015160608401526157b360808501615723565b60808401526157c460a0850161572e565b60a08401526157d560c0850161572e565b60c084015260e08401519150808211156157ee57600080fd5b6157fa858386016156de565b60e08401526101009150818401518181111561581557600080fd5b615821868287016156de565b83850152506101209150818401518181111561583c57600080fd5b615848868287016156de565b83850152506101409150818401518181111561586357600080fd5b61586f868287016156de565b8385015250505092915050565b6000806040838503121561588f57600080fd5b82516001600160401b03808211156158a657600080fd5b9084019061014082870312156158bb57600080fd5b6158c3614e1d565b8251828111156158d257600080fd5b6158de888286016156de565b8252506020830151828111156158f357600080fd5b6158ff888286016156de565b60208301525060408301518281111561591757600080fd5b615923888286016156de565b60408301525060608301518281111561593b57600080fd5b615947888286016156de565b60608301525060808301518281111561595f57600080fd5b61596b888286016156de565b60808301525060a08301518281111561598357600080fd5b61598f888286016156de565b60a08301525060c0830151828111156159a757600080fd5b6159b3888286016156de565b60c08301525060e0830151828111156159cb57600080fd5b6159d7888286016156de565b60e08301525061010080840151838111156159f157600080fd5b6159fd898287016156de565b828401525050610120615a11818501615647565b908201526020860151909450915080821115615a2c57600080fd5b506152c385828601615739565b60208082528181018390526000908460408401835b86811015614efc578235615a6181614cf4565b6001600160a01b031682529183019190830190600101615a4e565b600060208284031215615a8e57600080fd5b815161126181615071565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615b6a816017850160208801614c89565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615b9b816028840160208801614c89565b01602801949350505050565b600081615bb657615bb66154ec565b50600019019056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564546f7563616e2050726f746f636f6c3a204e617475726520436172626f6e20546f6e6e65a2646970667358221220aaa140752e38010005420a96fd68b8b2a748a023277c1b81f3014080e306413964736f6c634300080e0033496e697469616c697a61626c653a20636f6e747261637420697320616c726561
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.