Contract Address Details

0xFEabeFDf5823f36D3918a753aa5962c96E275126

Contract Name
CyberBoxCertMinter
Creator
0x8b2f36–66963a at 0xd441ce–65f37a
Balance
0 CELO ( )
Tokens
Fetching tokens...
Transactions
Transfers
Gas Used
Last Balance Update
14052353
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
CyberBoxCertMinter




Optimization enabled
false
Compiler version
v0.8.3+commit.8d00100c




EVM Version
istanbul




Verified at
2022-06-23 08:59:09.091667Z

contracts/CyberBoxCertMinter.sol

// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.3;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {ERC777} from "@openzeppelin/contracts/token/ERC777/ERC777.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "hardhat/console.sol";
import "./DateTimeManager.sol";
import "./CyberBoxCertNFT.sol";
import "./CyberBoxCertInterface.sol";
import "./CyberBoxCertResource.sol";
import "./Uniswap/uniswpv2.sol";
import "./MarketPlace/CertificationMarketPlace.sol";
contract CyberBoxCertMinter is DateTimeManager, CyberBoxCertInterface, CyberBoxCertResource, CertificationMarketPlace {
using Address for address;
struct NFTMAP {
uint256 tokenType;
uint256 year;
uint256 month;
}
address public dev;
address public owner;
address public c02Owner;
uint256 public offsetFee;
uint256 public carvonFeeOnOffset;
address public linkedNFTAddress;
address private constant UNISWAP_V2_ROUTER = 0xE3D8bd6Aed4F159bc8000a9cD47CffDb95F96121;
address private constant WETH = 0x471EcE3750Da237f93B8E339c536989b8978a438;
address public CARBOM = 0x32A9FE697a32135BFd313a6Ac28792DaE4D9979d;
uint256 public limitMonthNFTPrice;
uint256 public limitBonusNFTPrice;
//////// owner address => year_month_key => token id
mapping (address => mapping(uint256 => uint256)) public ownedMonthData;
mapping (address => mapping(uint256 => uint256)) public ownedYearData;
mapping (address => mapping(uint256 => uint256)) public ownedBonusData;
mapping (uint256 => NFTMAP) private _nftDateMap;
uint256 private TOKEN_TYPE_MONTH = 0;
uint256 private TOKEN_TYPE_YEAR = 1;
uint256 private TOKEN_TYPE_BONUS = 2;
constructor(
address _nft,
address _dev,
address _owner,
address _carvon
) public {
linkedNFTAddress = _nft;
initializeWithERC721(_nft, _owner);
dev = _dev;
owner = _owner;
c02Owner = _carvon;
offsetFee = 400;
carvonFeeOnOffset = 1000;
limitMonthNFTPrice = 15e18;
limitBonusNFTPrice = 15e18;
uint256 producerFee = (offsetFee * carvonFeeOnOffset) / 1000;
uint256 devFee = (offsetFee * (1000 - carvonFeeOnOffset)) / 1000;
uint256 createrFee = 1000 - producerFee - devFee;
emit CertificationTokenCreaterChanged(owner);
emit CertificationTokenProducerChanged(c02Owner);
emit CertificationFeeChanged(createrFee, producerFee);
emit CertificationDevFeeChanged(dev, devFee);
}
function uniwapCarbon(address _to, uint256 _amountIn) public returns (uint256[] memory amounts){
IERC20(WETH).approve(UNISWAP_V2_ROUTER, _amountIn);
address[] memory path = new address[](2);
path[0] = WETH;
path[1] = CARBOM;
return IUniswapV2Router(UNISWAP_V2_ROUTER).swapExactTokensForTokens(_amountIn, 0, path, _to, block.timestamp);
}
function offset(uint256 amount) private returns(uint256 sf, uint256 df, uint256 co2) {
uint256 totalFee = (amount * offsetFee) / 1000;
uint256 c02Fee = (totalFee * carvonFeeOnOffset) / 1000;
uint256 devFee = totalFee - c02Fee;
uint256 sellerFee = amount - totalFee;
payable(owner).transfer(sellerFee);
payable(dev).transfer(devFee);
uint256[] memory amounts = uniwapCarbon(c02Owner, c02Fee);
uint256 co2Value = amounts[amounts.length - 1];
return (sellerFee, devFee, co2Value);
}
function mintMonthNFT() external payable {
(uint256 year, uint256 month) = getDateTimeSymbol();
uint256 current_nft_id = getCurrentMonthNFTID(msg.sender);
require(current_nft_id < 1, "This user already mint nft for this month.");
require(msg.value >= limitMonthNFTPrice, "This user must pay for mint nft.");
uint256 totalValue = msg.value;
(uint256 sellerFee, uint256 devFee, uint256 co2Value) = offset(totalValue);
string memory token_uri = getMonthTokenURI(year, month);
uint256 nft_id = CyberBoxCertNFT(linkedNFTAddress).mintNFT(msg.sender, token_uri);
ownedMonthData[msg.sender][year*100 + month] = nft_id;
_nftDateMap[nft_id] = NFTMAP(TOKEN_TYPE_MONTH, year, month);
emit CertificationNFTMinted(msg.sender, TOKEN_TYPE_MONTH, nft_id, year, month, totalValue, devFee, co2Value);
}
function adminMintMonthlyNFT(address user, uint256 month) public onlyDev {
uint256 year = 2022;
require(month < 7, "You can't mint over June.");
uint256 current_nft_id = getMonthNFTID(user, year, month);
if(current_nft_id < 1) {
string memory token_uri = getMonthTokenURI(year, month);
uint256 nft_id = CyberBoxCertNFT(linkedNFTAddress).mintNFT(user, token_uri);
ownedMonthData[user][year*100 + month] = nft_id;
_nftDateMap[nft_id] = NFTMAP(TOKEN_TYPE_MONTH, year, month);
emit CertificationNFTMinted(user, TOKEN_TYPE_MONTH, nft_id, year, month, 0, 0, 0);
}
}
function adminMintAllNFTs(address user) public onlyDev {
uint256 year = 2022;
for(uint256 month = 1; month<=6; month++){
uint256 current_nft_id = getMonthNFTID(user, year, month);
if(current_nft_id < 1) {
string memory token_uri = getMonthTokenURI(year, month);
uint256 nft_id = CyberBoxCertNFT(linkedNFTAddress).mintNFT(user, token_uri);
ownedMonthData[user][year*100 + month] = nft_id;
_nftDateMap[nft_id] = NFTMAP(TOKEN_TYPE_MONTH, year, month);
emit CertificationNFTMinted(user, TOKEN_TYPE_MONTH, nft_id, year, month, 0, 0, 0);
}
}
}
function mintMonthNFTFor(address receipt, uint256 year, uint256 month) private {
uint256 current_nft_id = getMonthNFTID(receipt, year, month);
if(current_nft_id < 1) {
string memory token_uri = getMonthTokenURI(year, month);
uint256 nft_id = CyberBoxCertNFT(linkedNFTAddress).mintNFT(msg.sender, token_uri);
ownedMonthData[msg.sender][year*100 + month] = nft_id;
_nftDateMap[nft_id] = NFTMAP(TOKEN_TYPE_MONTH, year, month);
emit CertificationNFTMinted(msg.sender, TOKEN_TYPE_MONTH, nft_id, year, month, 0, 0, 0);
}
}
function mintYearNFT() external onlyDev payable {
(uint256 year, uint256 month) = getDateTimeSymbol();
uint256 current_nft_id = getCurrentYearNFTID(msg.sender);
require(current_nft_id < 1, "This user already mint nft for this month.");
require(msg.value >= limitMonthNFTPrice, "This user must pay for mint nft.");
uint256 totalValue = msg.value;
(uint256 sellerFee, uint256 devFee, uint256 co2Value) = offset(totalValue);
string memory token_uri = getYearTokenURI(year);
uint256 nft_id = CyberBoxCertNFT(linkedNFTAddress).mintNFT(msg.sender, token_uri);
ownedYearData[msg.sender][year] = nft_id;
_nftDateMap[nft_id] = NFTMAP(TOKEN_TYPE_YEAR, year, 0);
emit CertificationNFTMinted(msg.sender, TOKEN_TYPE_YEAR, nft_id, year, 0, totalValue, devFee, co2Value);
}
function mintBonusNFT() external onlyDev payable {
(uint256 year, uint256 month) = getDateTimeSymbol();
uint256 current_nft_id = getCurrentBonusNFTID(msg.sender);
require(current_nft_id < 1, "This user already mint nft for this month.");
require(msg.value >= limitBonusNFTPrice, "This user must pay for mint nft.");
uint256 totalValue = msg.value;
(uint256 sellerFee, uint256 devFee, uint256 co2Value) = offset(totalValue);
string memory token_uri = getBonusTokenURI(year);
uint256 nft_id = CyberBoxCertNFT(linkedNFTAddress).mintNFT(msg.sender, token_uri);
ownedBonusData[msg.sender][year] = nft_id;
_nftDateMap[nft_id] = NFTMAP(TOKEN_TYPE_BONUS, year, 0);
emit CertificationNFTMinted(msg.sender, TOKEN_TYPE_BONUS, nft_id, year, 0, totalValue, devFee, co2Value);
}
function exchangeBonusNFTToMonth(uint256 year) public {
uint256 current_nft_id = getBonusNFTID(msg.sender, year);
require(current_nft_id > 0, "This user don't have bonus NFT.");
CyberBoxCertNFT(linkedNFTAddress).burn(msg.sender, current_nft_id);
ownedBonusData[msg.sender][year] = 0;
emit CertificationNFTBurned(msg.sender, TOKEN_TYPE_BONUS, current_nft_id, year, 0);
for(uint256 month = 1; month<=12; month++){
mintMonthNFTFor(msg.sender, year, month);
}
}
function exchangeMonthNFTToBonus(uint256 year) public {
uint256 current_bonus_id = getCurrentBonusNFTID(msg.sender);
require(current_bonus_id < 1, "This user already mint nft for this month.");
for(uint256 month = 1; month<=12; month++){
uint256 current_nft_id = getMonthNFTID(msg.sender, year, month);
require(current_nft_id > 0, "This user don't have all month NFT.");
CyberBoxCertNFT(linkedNFTAddress).burn(msg.sender, current_nft_id);
ownedMonthData[msg.sender][year*100 + month] = 0;
emit CertificationNFTBurned(msg.sender, TOKEN_TYPE_MONTH, current_nft_id, year, 0);
}
string memory token_uri = getBonusTokenURI(year);
uint256 nft_id = CyberBoxCertNFT(linkedNFTAddress).mintNFT(msg.sender, token_uri);
ownedBonusData[msg.sender][year] = nft_id;
emit CertificationNFTMinted(msg.sender, TOKEN_TYPE_BONUS, nft_id, year, 0, 0, 0, 0);
}
function transferNFTOwnedData(address from, address to, uint256 tokenId) private {
NFTMAP memory mapData = _nftDateMap[tokenId];
uint256 tokenType = mapData.tokenType;
uint256 year = mapData.year;
uint256 month = mapData.month;
if (tokenType == TOKEN_TYPE_MONTH){
ownedMonthData[from][year*100 + month] = 0;
ownedMonthData[to][year*100 + month] = tokenId;
}
if (tokenType == TOKEN_TYPE_YEAR) {
ownedYearData[from][year] = 0;
ownedYearData[to][year] = tokenId;
}
if (tokenType == TOKEN_TYPE_BONUS) {
ownedBonusData[from][year] = 0;
ownedBonusData[to][year] = tokenId;
}
}
function getMonthNFTID(address owner, uint256 year, uint256 month) public returns (uint256){
return ownedMonthData[owner][year * 100 + month];
}
function getYearNFTID(address owner, uint256 year) public returns (uint256) {
return ownedYearData[owner][year];
}
function getBonusNFTID(address owner, uint256 year) public returns (uint256) {
return ownedBonusData[owner][year];
}
function getCurrentMonthNFTID(address owner) public returns (uint256) {
(uint256 year, uint256 month) = getDateTimeSymbol();
return ownedMonthData[owner][year * 100 + month];
}
function getCurrentYearNFTID(address owner) public returns (uint256) {
(uint256 year, uint256 month) = getDateTimeSymbol();
return ownedYearData[owner][year];
}
function getCurrentBonusNFTID(address owner) public returns (uint256) {
(uint256 year, uint256 month) = getDateTimeSymbol();
return ownedBonusData[owner][year];
}
function changeDev(address _newDev) public onlyDev {
dev = _newDev;
uint256 producerFee = (offsetFee * carvonFeeOnOffset) / 1000;
uint256 devFee = (offsetFee * (1000 - carvonFeeOnOffset)) / 1000;
uint256 createrFee = 1000 - producerFee - devFee;
emit CertificationTokenCreaterChanged(owner);
emit CertificationTokenProducerChanged(c02Owner);
emit CertificationFeeChanged(createrFee, producerFee);
emit CertificationDevFeeChanged(dev, devFee);
}
function changeOwner(address _newOnwer) public onlyDev {
owner = _newOnwer;
uint256 producerFee = (offsetFee * carvonFeeOnOffset) / 1000;
uint256 devFee = (offsetFee * (1000 - carvonFeeOnOffset)) / 1000;
uint256 createrFee = 1000 - producerFee - devFee;
emit CertificationTokenCreaterChanged(owner);
emit CertificationTokenProducerChanged(c02Owner);
emit CertificationFeeChanged(createrFee, producerFee);
emit CertificationDevFeeChanged(dev, devFee);
}
function changeCo2Owner(address _newOnwer) public onlyDev {
c02Owner = _newOnwer;
uint256 producerFee = (offsetFee * carvonFeeOnOffset) / 1000;
uint256 devFee = (offsetFee * (1000 - carvonFeeOnOffset)) / 1000;
uint256 createrFee = 1000 - producerFee - devFee;
emit CertificationTokenCreaterChanged(owner);
emit CertificationTokenProducerChanged(c02Owner);
emit CertificationFeeChanged(createrFee, producerFee);
emit CertificationDevFeeChanged(dev, devFee);
}
function changeCarvonTokenAddress(address _carvonToken) public onlyDev {CARBOM = _carvonToken;}
function changeOffsetFee(uint256 _offsetFee) public onlyDev {
offsetFee = _offsetFee;
uint256 producerFee = (offsetFee * carvonFeeOnOffset) / 1000;
uint256 devFee = (offsetFee * (1000 - carvonFeeOnOffset)) / 1000;
uint256 createrFee = 1000 - producerFee - devFee;
emit CertificationTokenCreaterChanged(owner);
emit CertificationTokenProducerChanged(c02Owner);
emit CertificationFeeChanged(createrFee, producerFee);
emit CertificationDevFeeChanged(dev, devFee);
}
function changeCarbonPercent(uint256 _carbonPercent) public onlyDev {
carvonFeeOnOffset = _carbonPercent;
uint256 producerFee = (offsetFee * carvonFeeOnOffset) / 1000;
uint256 devFee = (offsetFee * (1000 - carvonFeeOnOffset)) / 1000;
uint256 createrFee = 1000 - producerFee - devFee;
emit CertificationTokenCreaterChanged(owner);
emit CertificationTokenProducerChanged(c02Owner);
emit CertificationFeeChanged(createrFee, producerFee);
emit CertificationDevFeeChanged(dev, devFee);
}
function changeMonthNFTLimitPrice(uint256 _price) public onlyDev {limitMonthNFTPrice = _price;}
function changeBonusNFTLimitPrice(uint256 _price) public onlyDev {limitBonusNFTPrice = _price;}
modifier onlyDev() { require(msg.sender == dev, "CyberBoxCertNFT: wrong developer");_;}
/**
* @dev List token for sale
* @param tokenId erc721 token Id
* @param value min price to sell the token
*/
function listToken(
uint256 tokenId,
uint256 value
) external {
(
address fromAddress,
uint256 minValue
) = listToken(msg.sender, tokenId, value);
emit CertificationTokenListed(
linkedNFTAddress,
tokenId,
fromAddress,
minValue
);
}
/**
* @dev See {INFTKEYMarketPlaceV1-delistToken}.
* msg.sender must be the seller of the listing record
*/
function delistToken(
uint256 tokenId
) external {
delistToken(msg.sender, tokenId);
emit CertificationTokenDelisted(
linkedNFTAddress,
tokenId
);
}
/**
* @dev See {INFTKEYMarketPlaceV1-cleanAllInvalidListings}.
*/
function cleanAllInvalidListings() external {
(uint256[] memory idList) = certCleanAllInvalidListings();
for (uint256 i = 0; i < idList.length; i++) {
uint256 contract_id = idList[i];
emit CertificationCleanList(
linkedNFTAddress,
contract_id
);
}
deleteTempTokenIdStorage();
}
function buyToken(
uint256 tokenId,
uint256 value
) external payable{
(
address sellerAddress,
address devAddress,
address createrAddress,
address producerAddress
) = buyTokenPrepare(msg.sender, tokenId, value);
uint256 payment_value = msg.value;
address nftAddress = linkedNFTAddress;
uint256 sellerFee = calculateSellerFee(payment_value);
uint256 devFee = calculateDevFee(payment_value);
uint256 createrFee = calculateCreaterFee(payment_value);
uint256 producerFee = calculateProducerFee(payment_value);
transferCelo(msg.sender, sellerAddress, sellerFee);
emit CertificationPayment(msg.sender, sellerAddress, tokenId, nftAddress, 0, sellerFee);
transferCelo(msg.sender, devAddress, devFee);
emit CertificationPayment(msg.sender, devAddress, tokenId, nftAddress, 1, devFee);
if(createrAddress != address(0) && createrFee > 0){
transferCelo(msg.sender, createrAddress, createrFee);
emit CertificationPayment(msg.sender, createrAddress, tokenId, nftAddress, 2, createrFee);
}
if(producerAddress != address(0) && producerFee > 0){
transferCelo(msg.sender, producerAddress, producerFee);
emit CertificationPayment(msg.sender, producerAddress, tokenId, nftAddress, 3, producerFee);
}
buyTokenComplete(msg.sender, tokenId);
transferNFTOwnedData(sellerAddress, msg.sender, tokenId);
emit CertificationTokenBought(
nftAddress,
tokenId,
sellerAddress,
msg.sender,
payment_value,
sellerFee,
devFee + createrFee + producerFee
);
}
function transfer(
address to,
uint256 tokenId
)external {
transfer(msg.sender, to, tokenId);
transferNFTOwnedData(msg.sender, to, tokenId);
emit CertificationTokenTransfered(
linkedNFTAddress,
tokenId,
msg.sender,
to,
0
);
}
function changePrice(address _nftAddress, uint256 tokenId, uint256 newPrice) external {
certChangePrice(msg.sender, tokenId, newPrice);
emit CertificationTokenPriceChanged(
_nftAddress,
tokenId,
newPrice
);
}
function transferCelo(address sender, address receiver, uint256 value) private{
require(sender != address(0), "transfer address must not 0x0");
require(receiver != address(0), "transfer address must not 0x0");
require(value > 0, "transfer amount must large than 0");
if(sender == address(this)){
payable(receiver).transfer(value);
}else{
Address.sendValue(payable(receiver), value);
}
}
}

/contracts/CyberBoxCertInterface.sol

// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.3;
pragma experimental ABIEncoderV2;
interface CyberBoxCertInterface {
event CertificationNFTMinted(
address owner,
uint256 tokenType,
uint256 tokenId,
uint256 year,
uint256 month,
uint256 price,
uint256 devFee,
uint256 c02
);
event CertificationNFTBurned(
address owner,
uint256 tokenType,
uint256 tokenId,
uint256 year,
uint256 month
);
event CertificationNFTExchanged(
address owner,
uint256 fromType,
uint256 toType,
uint256 year
);
event CertificationTokenListed(
address nftAddress,
uint256 indexed tokenId,
address indexed fromAddress,
uint256 minValue
);
event CertificationTokenDelisted(
address nftAddress,
uint256 indexed tokenId
);
event CertificationCleanList(
address nftAddress,
uint256 tokenId
);
event CertificationPayment(
address fromAddress,
address toAddress,
uint256 tokenId,
address nftAddress,
uint256 paymentType,
uint256 amount
);
event CertificationTokenBought(
address nftAddress,
uint256 tokenId,
address fromAddress,
address toAddress,
uint256 total,
uint256 value,
uint256 fees
);
event CertificationTokenTransfered(
address nftAddress,
uint256 indexed tokenId,
address indexed from,
address indexed to,
uint256 total
);
event CertificationTokenPriceChanged(
address nftAddress,
uint256 indexed tokenId,
uint256 price
);
event CertificationFeeChanged(
uint256 createrFee,
uint256 producerFee
);
event CertificationDevFeeChanged(
address marketPlaceFeeAddress,
uint256 marketFee
);
event CertificationTokenCreaterChanged(
address tokenCreaterAddress
);
event CertificationTokenProducerChanged(
address tokenCreaterAddress
);
}

/hardhat/console.sol

// SPDX-License-Identifier: MIT
pragma solidity >= 0.4.22 <0.9.0;
library console {
address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);
function _sendLogPayload(bytes memory payload) private view {
uint256 payloadLength = payload.length;
address consoleAddress = CONSOLE_ADDRESS;
assembly {
let payloadStart := add(payload, 32)
let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)
}
}
function log() internal view {
_sendLogPayload(abi.encodeWithSignature("log()"));
}
function logInt(int p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(int)", p0));
}
function logUint(uint p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
}
function logString(string memory p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
}
function logBool(bool p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
}
function logAddress(address p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
}
function logBytes(bytes memory p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
}
function logBytes1(bytes1 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
}
function logBytes2(bytes2 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
}
function logBytes3(bytes3 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
}
function logBytes4(bytes4 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
}
function logBytes5(bytes5 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
}
function logBytes6(bytes6 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
}
function logBytes7(bytes7 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
}
function logBytes8(bytes8 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
}
function logBytes9(bytes9 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
}
function logBytes10(bytes10 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
}
function logBytes11(bytes11 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
}
function logBytes12(bytes12 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
}
function logBytes13(bytes13 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
}
function logBytes14(bytes14 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
}
function logBytes15(bytes15 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
}
function logBytes16(bytes16 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
}
function logBytes17(bytes17 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
}
function logBytes18(bytes18 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
}
function logBytes19(bytes19 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
}
function logBytes20(bytes20 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
}
function logBytes21(bytes21 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
}
function logBytes22(bytes22 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
}
function logBytes23(bytes23 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
}
function logBytes24(bytes24 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
}
function logBytes25(bytes25 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
}
function logBytes26(bytes26 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
}
function logBytes27(bytes27 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
}
function logBytes28(bytes28 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
}
function logBytes29(bytes29 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
}
function logBytes30(bytes30 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
}
function logBytes31(bytes31 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
}
function logBytes32(bytes32 p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
}
function log(uint p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
}
function log(string memory p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
}
function log(bool p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
}
function log(address p0) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
}
function log(uint p0, uint p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1));
}
function log(uint p0, string memory p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1));
}
function log(uint p0, bool p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1));
}
function log(uint p0, address p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1));
}
function log(string memory p0, uint p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1));
}
function log(string memory p0, string memory p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
}
function log(string memory p0, bool p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
}
function log(string memory p0, address p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
}
function log(bool p0, uint p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1));
}
function log(bool p0, string memory p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
}
function log(bool p0, bool p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
}
function log(bool p0, address p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
}
function log(address p0, uint p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1));
}
function log(address p0, string memory p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
}
function log(address p0, bool p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
}
function log(address p0, address p1) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
}
function log(uint p0, uint p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2));
}
function log(uint p0, uint p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2));
}
function log(uint p0, uint p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2));
}
function log(uint p0, uint p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2));
}
function log(uint p0, string memory p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2));
}
function log(uint p0, string memory p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2));
}
function log(uint p0, string memory p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2));
}
function log(uint p0, string memory p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2));
}
function log(uint p0, bool p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2));
}
function log(uint p0, bool p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2));
}
function log(uint p0, bool p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2));
}
function log(uint p0, bool p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2));
}
function log(uint p0, address p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2));
}
function log(uint p0, address p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2));
}
function log(uint p0, address p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2));
}
function log(uint p0, address p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2));
}
function log(string memory p0, uint p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2));
}
function log(string memory p0, uint p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2));
}
function log(string memory p0, uint p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2));
}
function log(string memory p0, uint p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2));
}
function log(string memory p0, string memory p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2));
}
function log(string memory p0, string memory p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
}
function log(string memory p0, string memory p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
}
function log(string memory p0, string memory p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
}
function log(string memory p0, bool p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2));
}
function log(string memory p0, bool p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
}
function log(string memory p0, bool p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
}
function log(string memory p0, bool p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
}
function log(string memory p0, address p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2));
}
function log(string memory p0, address p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
}
function log(string memory p0, address p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
}
function log(string memory p0, address p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
}
function log(bool p0, uint p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2));
}
function log(bool p0, uint p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2));
}
function log(bool p0, uint p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2));
}
function log(bool p0, uint p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2));
}
function log(bool p0, string memory p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2));
}
function log(bool p0, string memory p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
}
function log(bool p0, string memory p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
}
function log(bool p0, string memory p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
}
function log(bool p0, bool p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2));
}
function log(bool p0, bool p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
}
function log(bool p0, bool p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
}
function log(bool p0, bool p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
}
function log(bool p0, address p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2));
}
function log(bool p0, address p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
}
function log(bool p0, address p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
}
function log(bool p0, address p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
}
function log(address p0, uint p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2));
}
function log(address p0, uint p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2));
}
function log(address p0, uint p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2));
}
function log(address p0, uint p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2));
}
function log(address p0, string memory p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2));
}
function log(address p0, string memory p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
}
function log(address p0, string memory p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
}
function log(address p0, string memory p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
}
function log(address p0, bool p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2));
}
function log(address p0, bool p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
}
function log(address p0, bool p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
}
function log(address p0, bool p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
}
function log(address p0, address p1, uint p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2));
}
function log(address p0, address p1, string memory p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
}
function log(address p0, address p1, bool p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
}
function log(address p0, address p1, address p2) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
}
function log(uint p0, uint p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3));
}
function log(uint p0, uint p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3));
}
function log(uint p0, string memory p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3));
}
function log(uint p0, bool p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3));
}
function log(uint p0, address p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3));
}
function log(uint p0, address p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3));
}
function log(uint p0, address p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3));
}
function log(uint p0, address p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3));
}
function log(uint p0, address p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3));
}
function log(uint p0, address p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3));
}
function log(uint p0, address p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3));
}
function log(uint p0, address p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3));
}
function log(uint p0, address p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3));
}
function log(uint p0, address p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3));
}
function log(uint p0, address p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3));
}
function log(uint p0, address p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3));
}
function log(uint p0, address p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3));
}
function log(uint p0, address p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3));
}
function log(uint p0, address p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3));
}
function log(uint p0, address p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, uint p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, string memory p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, bool p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
}
function log(string memory p0, address p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, uint p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, string memory p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, bool p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
}
function log(bool p0, address p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
}
function log(address p0, uint p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3));
}
function log(address p0, uint p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3));
}
function log(address p0, uint p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3));
}
function log(address p0, uint p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3));
}
function log(address p0, uint p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3));
}
function log(address p0, uint p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3));
}
function log(address p0, uint p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3));
}
function log(address p0, uint p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3));
}
function log(address p0, uint p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3));
}
function log(address p0, uint p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3));
}
function log(address p0, uint p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, uint p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3));
}
function log(address p0, uint p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3));
}
function log(address p0, uint p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3));
}
function log(address p0, uint p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3));
}
function log(address p0, uint p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
}
function log(address p0, string memory p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
}
function log(address p0, bool p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, uint p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, string memory p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, bool p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, uint p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, string memory p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, bool p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
}
function log(address p0, address p1, address p2, address p3) internal view {
_sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3));
}
}

/_openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol

// 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);
}
}

/contracts/Uniswap/uniswpv2.sol

// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.3;
pragma experimental ABIEncoderV2;
interface IUniswapV2Router {
function getAmountsOut(uint256 amountIn, address[] memory path)
external
view
returns (uint256[] memory amounts);
function swapExactTokensForTokens(
//amount of tokens we are sending in
uint256 amountIn,
//the minimum amount of tokens we want out of the trade
uint256 amountOutMin,
//list of token addresses we are going to trade in. this is necessary to calculate amounts
address[] calldata path,
//this is the address we are going to send the output tokens to
address to,
//the last time that the trade is valid for
uint256 deadline
) external returns (uint256[] memory amounts);
}
interface IUniswapV2Pair {
function token0() external view returns (address);
function token1() external view returns (address);
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
}
interface IUniswapV2Factory {
function getPair(address token0, address token1) external returns (address);
}

/contracts/MarketPlace/CertificationMarketPlace.sol

// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.3;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./CertificationMarketAPI.sol";
contract CertificationMarketPlace is CertificationMarketAPI {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableSet for EnumerableSet.AddressSet;
struct Listing {
uint256 tokenId;
uint256 listingPrice;
address seller;
}
mapping(uint256 => Listing) private _tokenListings;
EnumerableSet.UintSet private _tokenIdWithListing;
uint256[] private _tempTokenIdStorage; // Storage to assist cleaning
function initializeWithERC721(
address _erc721Address,
address _owner
) public {
initializeAPI(_owner, _erc721Address);
}
function _isListingValid(Listing memory listing) private view returns (bool) {
if (
_isTokenOwner(listing.tokenId, listing.seller) &&
(_isTokenApproved(listing.tokenId) || _isAllTokenApproved(listing.seller)) &&
listing.listingPrice > 0) {
return true;
}
}
function deleteTempTokenIdStorage() public {
delete _tempTokenIdStorage;
}
function getTokenListing(uint256 tokenId) public view returns (Listing memory) {
Listing memory listing = _tokenListings[tokenId];
if (_isListingValid(listing)) {
return listing;
}
}
function getTokenListings(uint256 from, uint256 size)
public
view
returns (Listing[] memory)
{
if (from < _tokenIdWithListing.length() && size > 0) {
uint256 querySize = size;
if ((from + size) > _tokenIdWithListing.length()) {
querySize = _tokenIdWithListing.length() - from;
}
Listing[] memory listings = new Listing[](querySize);
for (uint256 i = 0; i < querySize; i++) {
Listing memory listing = _tokenListings[_tokenIdWithListing.at(i + from)];
if (_isListingValid(listing)) {
listings[i] = listing;
}
}
return listings;
}
}
function getAllTokenListings() external view returns (Listing[] memory) {
return getTokenListings(0, _tokenIdWithListing.length());
}
function _delistToken(uint256 tokenId) private {
if (_tokenIdWithListing.contains(tokenId)) {
delete _tokenListings[tokenId];
_tokenIdWithListing.remove(tokenId);
}
}
function getInvalidListingCount() external view returns (uint256) {
uint256 count = 0;
for (uint256 i = 0; i < _tokenIdWithListing.length(); i++) {
if (!_isListingValid(_tokenListings[_tokenIdWithListing.at(i)])) {
count = count.add(1);
}
}
return count;
}
function listToken(
address sender,
uint256 tokenId,
uint256 value
) public
returns (
address,
uint256
) {
require(value > 0, "Please list for more than 0 or use the transfer function");
require(_isTokenOwner(tokenId, sender), "Only token owner can list token");
require(
_isTokenApproved(tokenId) || _isAllTokenApproved(sender),
"This token is not allowed to transfer by this contract"
);
_tokenListings[tokenId] = Listing(tokenId, value, sender);
_tokenIdWithListing.add(tokenId);
return ( sender, value);
}
function delistToken(address sender, uint256 tokenId) public {
require(_tokenListings[tokenId].seller == sender, "Only token seller can delist token");
_delistToken(tokenId);
}
function certCleanAllInvalidListings() public returns(uint256[] memory){
for (uint256 i = 0; i < _tokenIdWithListing.length(); i++) {
uint256 tokenId = _tokenIdWithListing.at(i);
if (!_isListingValid(_tokenListings[tokenId])) {
_tempTokenIdStorage.push(tokenId);
}
}
for (uint256 i = 0; i < _tempTokenIdStorage.length; i++) {
_delistToken(_tempTokenIdStorage[i]);
}
return (_tempTokenIdStorage);
}
function certChangePrice(address sender,uint256 tokenId, uint256 newPrice) public {
Listing memory listing = getTokenListing(tokenId); // Get valid listing
require(_isTokenOwner(tokenId, sender), "Only token owner can change price of token");
require(listing.seller != address(0), "Token is not for sale"); // Listing not valid
require(
newPrice >= 0,
"The value send is below zero"
);
_tokenListings[tokenId].listingPrice = newPrice;
}
function buyTokenPrepare(address sender, uint256 tokenId, uint256 value) public returns (
address,
address,
address,
address
) {
Listing memory listing = getTokenListing(tokenId); // Get valid listing
require(listing.seller != address(0), "Token is not for sale"); // Listing not valid
require(!_isTokenOwner(tokenId, sender), "Token owner can't buy their own token");
require(
value >= listing.listingPrice,
"The value send is below sale price plus fees"
);
return (
listing.seller,
maketPlaceFeeAddress,
nftCreaterAddress,
nftProducerAddress
);
}
function buyTokenComplete(address sender, uint256 tokenId) public {
Listing memory listing = getTokenListing(tokenId); // Get valid listing
nftTransferFrom(listing.seller, sender, tokenId);
// Remove token listing
_delistToken(tokenId);
}
}

/contracts/MarketPlace/CertificationMarketAPI.sol

// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.3;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "../CyberBoxCertInterface.sol";
contract CertificationMarketAPI is CyberBoxCertInterface {
using SafeMath for uint256;
uint256 private _baseFeeTokenSeller;
uint256 private _baseFeeTokenProducer;
uint256 private _baseFeeTokenCreater;
uint256 private _baseFeeTokenDev;
uint256 private _baseFeeFraction;
uint256 private _baseFeeTokenBase;
address public maketPlaceFeeAddress;
address public nftCreaterAddress;
address public nftProducerAddress;
IERC721 private _erc721;
function initializeAPI(
address _owner,
address _certNft
) public {
_baseFeeTokenSeller = 975;
_baseFeeTokenProducer = 0;
_baseFeeTokenCreater = 0;
_baseFeeTokenDev = 25;
_baseFeeFraction = 25;
_baseFeeTokenBase = 1000;
maketPlaceFeeAddress = _owner;
_erc721 = IERC721(_certNft);
emit CertificationDevFeeChanged(
maketPlaceFeeAddress,
_baseFeeTokenDev
);
}
function calculateSellerFee(uint256 value) public returns(uint256){
return value.sub(value.mul(_baseFeeFraction).div(_baseFeeTokenBase));
}
function calculateDevFee(uint256 value) public returns(uint256){
return value.mul(_baseFeeTokenDev).div(_baseFeeTokenBase);
}
function calculateCreaterFee(uint256 value) public returns(uint256){
return value.mul(_baseFeeTokenCreater).div(_baseFeeTokenBase);
}
function calculateProducerFee(uint256 value) public returns(uint256){
return value.mul(_baseFeeTokenProducer).div(_baseFeeTokenBase);
}
function setNFTFees(
uint256 _feeCreater,
uint256 _feeProducer
)
external
{
require(
_feeCreater == 0 || nftCreaterAddress != address(0), "This token don't set creater address"
);
require(
_feeProducer == 0 || nftProducerAddress != address(0), "This token don't set producer address"
);
_baseFeeTokenCreater = _feeCreater;
_baseFeeTokenProducer = _feeProducer;
_baseFeeTokenSeller = _baseFeeTokenBase - _baseFeeTokenCreater - _baseFeeTokenDev - _baseFeeTokenProducer;
_baseFeeFraction = _baseFeeTokenCreater + _baseFeeTokenDev + _baseFeeTokenProducer;
emit CertificationFeeChanged(_feeCreater, _feeProducer);
}
function setMaketPlaceAddressAndDevFee(
address _maketPlaceFeeAddress,
uint256 _maketPlaceFeePercentage)
external
{
require(
_maketPlaceFeePercentage > 0 && _maketPlaceFeePercentage <= 1000,
"Allowed percentage range is 1 to 1000"
);
maketPlaceFeeAddress = _maketPlaceFeeAddress;
require(
1000 == _baseFeeTokenBase, "This token is not registed"
);
_baseFeeTokenDev = _maketPlaceFeePercentage;
_baseFeeTokenSeller = _baseFeeTokenBase - _baseFeeTokenDev - _baseFeeTokenCreater - _baseFeeTokenProducer;
_baseFeeFraction = _baseFeeTokenDev + _baseFeeTokenCreater + _baseFeeTokenProducer;
emit CertificationDevFeeChanged(_maketPlaceFeeAddress, _maketPlaceFeePercentage);
}
function setTokenCreaterAddress(
address _tokenCreaterAddress)
external
{
require(_tokenCreaterAddress != address(0), "Can't set to address 0x0");
require(
1000 == _baseFeeTokenBase, "This token is not registed"
);
nftCreaterAddress = _tokenCreaterAddress;
emit CertificationTokenCreaterChanged(_tokenCreaterAddress);
}
function setTokenProducerAddress(
address _tokenProducerAddress)
external
{
require(_tokenProducerAddress != address(0), "Can't set to address 0x0");
require(
1000 == _baseFeeTokenBase, "This token is not registed"
);
nftProducerAddress = _tokenProducerAddress;
emit CertificationTokenProducerChanged(_tokenProducerAddress);
}
function changeTokenCreaterAddress(
address _tokenCreaterAddress) external {
nftCreaterAddress = _tokenCreaterAddress;
}
function _isTokenOwner(uint256 tokenId, address account) public view returns (bool) {
try _erc721.ownerOf(tokenId) returns (address tokenOwner) {
return tokenOwner == account;
} catch {
return false;
}
}
function _isTokenApproved(uint256 tokenId) public view returns (bool) {
try _erc721.getApproved(tokenId) returns (address tokenOperator) {
return tokenOperator == address(this);
} catch {
return false;
}
}
function _isAllTokenApproved(address owner) public view returns (bool) {
return _erc721.isApprovedForAll(owner, address(this));
}
function nftTransferFrom(
address sender,
address to,
uint256 tokenId
) public {
_erc721.safeTransferFrom(sender, to, tokenId);
}
function transfer(
address sender,
address to,
uint256 tokenId
) public {
require(_isTokenOwner(tokenId, sender), "Only token owner can accept bid of token");
require(
_isTokenApproved(tokenId) || _isAllTokenApproved(sender),
"The token is not approved to transfer by the contract"
);
_erc721.safeTransferFrom(sender, to, tokenId);
}
}

/contracts/DateTimeManager.sol

// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.3;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "hardhat/console.sol";
contract DateTimeManager {
mapping (uint256 => uint256) public YEARS; /// year num => year start timestamp
mapping (uint256 => uint256) public MONTHS; /// year num * 100 + month num => month start timestamp
uint256 public current_year;
uint256 public current_month;
constructor() public {
YEARS[2022] = 1641020400; /// timestamp of 2022-01-01
YEARS[2023] = 1672556400; /// timestamp of 2023-01-01
YEARS[2024] = 1704092400; /// timestamp of 2024-01-01
MONTHS[202203] = 1646118000; /// timestamp of 2022-03-01
MONTHS[202303] = 1677654000; /// timestamp of 2023-03-01
MONTHS[202403] = 1709276400; /// timestamp of 2024-03-01
current_year = 2022;
current_month = 5;
generateMonthStartTimes(current_year);
determineDateTime();
}
function generateMonthStartTimes(uint256 year) private {
MONTHS[year * 100 + 1] = YEARS[year];
MONTHS[year * 100 + 2] = YEARS[year] + (24*3600*31);
MONTHS[year * 100 + 4] = MONTHS[year * 100 + 3] + (24*3600*31);
MONTHS[year * 100 + 5] = MONTHS[year * 100 + 4] + (24*3600*30);
MONTHS[year * 100 + 6] = MONTHS[year * 100 + 5] + (24*3600*31);
MONTHS[year * 100 + 7] = MONTHS[year * 100 + 6] + (24*3600*30);
MONTHS[year * 100 + 8] = MONTHS[year * 100 + 7] + (24*3600*31);
MONTHS[year * 100 + 9] = MONTHS[year * 100 + 8] + (24*3600*31);
MONTHS[year * 100 + 10] = MONTHS[year * 100 + 9] + (24*3600*30);
MONTHS[year * 100 + 11] = MONTHS[year * 100 + 10] + (24*3600*31);
MONTHS[year * 100 + 12] = MONTHS[year * 100 + 11] + (24*3600*30);
}
function determineDateTime() public {
uint256 current_time = block.timestamp;
uint256 nextYearStartTime = YEARS[current_year + 1];
if(current_time > nextYearStartTime) {
current_year = current_year + 1;
generateMonthStartTimes(current_year);
}
uint256 current_month_start = MONTHS[current_year * 100 + current_month];
uint256 next_month_start = MONTHS[current_year * 100 + current_month + 1];
if(current_time > next_month_start || current_time < current_month_start){
for(uint256 i = 1; i <= 12; i ++){
uint256 select_month_start = MONTHS[current_year * 100 + i];
if(current_time < select_month_start){
break;
}
current_month = i;
}
}
}
function getDateTimeSymbol() public returns (uint256 year, uint256 month){
determineDateTime();
return (current_year, current_month);
}
function addNewYear(uint256 year, uint256 startTimeStamp) public {
YEARS[year] = startTimeStamp;
}
function addNewMarch(uint256 year, uint256 startTimeStamp) public {
uint256 march_key = year * 100 + 3;
MONTHS[march_key] = startTimeStamp;
}
function setCurrentYear(uint256 year) public {
current_year = year;
}
function setCurrentMonth(uint256 month) public {
current_month = month;
}
}

/contracts/CyberBoxCertResource.sol

// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.3;
pragma experimental ABIEncoderV2;
import {StringsUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
contract CyberBoxCertResource {
string public baseURI;
function setBaseURI(string memory _uri) public {
baseURI = _uri;
}
function numberToString(uint256 value)
public
pure
returns (string memory)
{
return StringsUpgradeable.toString(value);
}
function getMonthTokenURI(uint256 year, uint256 month) public returns (string memory) {
return string(
abi.encodePacked(
baseURI,
"/m",
numberToString(year),
numberToString(month),
".json"
)
);
}
function getYearTokenURI(uint256 year) public returns (string memory) {
return string(
abi.encodePacked(
baseURI,
"/y",
numberToString(year),
".json"
)
);
}
function getBonusTokenURI(uint256 year) public returns (string memory) {
return string(
abi.encodePacked(
baseURI,
"/b",
numberToString(year),
".json"
)
);
}
}

/contracts/CyberBoxCertNFT.sol

// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.3;
import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import {CountersUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "hardhat/console.sol";
contract CyberBoxCertNFT is ERC721URIStorage {
address public dev;
address public owner;
using CountersUpgradeable for CountersUpgradeable.Counter;
CountersUpgradeable.Counter private atEditionId;
constructor(
address _owner,
address _dev
) public ERC721("CyberBoxCertNFT", "CBCN") {
owner = _owner;
dev = _dev;
}
function mintNFT(address _recipient, string memory _tokenURI) public onlyDev returns (uint256) {
atEditionId.increment();
uint256 tokenId = atEditionId.current();
_mint(_recipient, tokenId);
_setTokenURI(tokenId, _tokenURI);
return (tokenId);
}
function burn(address _recipient, uint256 tokenId) public onlyDev {
require(_isApprovedOrOwner(_recipient, tokenId), "Not approved");
_burn(tokenId);
}
function changeDev(address _newDev) public onlyDev {
dev = _newDev;
}
modifier onlyDev() {
require((msg.sender == dev || msg.sender == owner), "CyberBoxCertNFT: wrong developer");
_;
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
return super.tokenURI(tokenId);
}
}

/_openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library CountersUpgradeable {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}

/_openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol

// 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;
}

/_openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol

// 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);
}
}
}
}

/_openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol

// 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;
}
}
}

/_openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol

// 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;
}

/_openzeppelin/contracts/utils/structs/EnumerableSet.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/structs/EnumerableSet.sol)
pragma solidity ^0.8.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping(bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
// Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
if (lastIndex != toDeleteIndex) {
bytes32 lastValue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastValue;
// Update the index for the moved value
set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
return _values(set._inner);
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
assembly {
result := store
}
return result;
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
assembly {
result := store
}
return result;
}
}

/_openzeppelin/contracts/utils/math/SafeMath.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}

/_openzeppelin/contracts/utils/introspection/IERC1820Registry.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/introspection/IERC1820Registry.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the global ERC1820 Registry, as defined in the
* https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register
* implementers for interfaces in this registry, as well as query support.
*
* Implementers may be shared by multiple accounts, and can also implement more
* than a single interface for each account. Contracts can implement interfaces
* for themselves, but externally-owned accounts (EOA) must delegate this to a
* contract.
*
* {IERC165} interfaces can also be queried via the registry.
*
* For an in-depth explanation and source code analysis, see the EIP text.
*/
interface IERC1820Registry {
event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer);
event ManagerChanged(address indexed account, address indexed newManager);
/**
* @dev Sets `newManager` as the manager for `account`. A manager of an
* account is able to set interface implementers for it.
*
* By default, each account is its own manager. Passing a value of `0x0` in
* `newManager` will reset the manager to this initial state.
*
* Emits a {ManagerChanged} event.
*
* Requirements:
*
* - the caller must be the current manager for `account`.
*/
function setManager(address account, address newManager) external;
/**
* @dev Returns the manager for `account`.
*
* See {setManager}.
*/
function getManager(address account) external view returns (address);
/**
* @dev Sets the `implementer` contract as ``account``'s implementer for
* `interfaceHash`.
*
* `account` being the zero address is an alias for the caller's address.
* The zero address can also be used in `implementer` to remove an old one.
*
* See {interfaceHash} to learn how these are created.
*
* Emits an {InterfaceImplementerSet} event.
*
* Requirements:
*
* - the caller must be the current manager for `account`.
* - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not
* end in 28 zeroes).
* - `implementer` must implement {IERC1820Implementer} and return true when
* queried for support, unless `implementer` is the caller. See
* {IERC1820Implementer-canImplementInterfaceForAddress}.
*/
function setInterfaceImplementer(
address account,
bytes32 _interfaceHash,
address implementer
) external;
/**
* @dev Returns the implementer of `interfaceHash` for `account`. If no such
* implementer is registered, returns the zero address.
*
* If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28
* zeroes), `account` will be queried for support of it.
*
* `account` being the zero address is an alias for the caller's address.
*/
function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address);
/**
* @dev Returns the interface hash for an `interfaceName`, as defined in the
* corresponding
* https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP].
*/
function interfaceHash(string calldata interfaceName) external pure returns (bytes32);
/**
* @notice Updates the cache with whether the contract implements an ERC165 interface or not.
* @param account Address of the contract for which to update the cache.
* @param interfaceId ERC165 interface for which to update the cache.
*/
function updateERC165Cache(address account, bytes4 interfaceId) external;
/**
* @notice Checks whether a contract implements an ERC165 interface or not.
* If the result is not cached a direct lookup on the contract address is performed.
* If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling
* {updateERC165Cache} with the contract address.
* @param account Address of the contract to check.
* @param interfaceId ERC165 interface to check.
* @return True if `account` implements `interfaceId`, false otherwise.
*/
function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool);
/**
* @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache.
* @param account Address of the contract to check.
* @param interfaceId ERC165 interface to check.
* @return True if `account` implements `interfaceId`, false otherwise.
*/
function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool);
}

/_openzeppelin/contracts/utils/introspection/IERC165.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

/_openzeppelin/contracts/utils/introspection/ERC165.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}

/_openzeppelin/contracts/utils/Strings.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}

/_openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}

/_openzeppelin/contracts/utils/Address.sol

// 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 Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}

/_openzeppelin/contracts/token/ERC777/IERC777Sender.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Sender.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC777TokensSender standard as defined in the EIP.
*
* {IERC777} Token holders can be notified of operations performed on their
* tokens by having a contract implement this interface (contract holders can be
* their own implementer) and registering it on the
* https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry].
*
* See {IERC1820Registry} and {ERC1820Implementer}.
*/
interface IERC777Sender {
/**
* @dev Called by an {IERC777} token contract whenever a registered holder's
* (`from`) tokens are about to be moved or destroyed. The type of operation
* is conveyed by `to` being the zero address or not.
*
* This call occurs _before_ the token contract's state is updated, so
* {IERC777-balanceOf}, etc., can be used to query the pre-operation state.
*
* This function may revert to prevent the operation from being executed.
*/
function tokensToSend(
address operator,
address from,
address to,
uint256 amount,
bytes calldata userData,
bytes calldata operatorData
) external;
}

/_openzeppelin/contracts/token/ERC777/IERC777Recipient.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Recipient.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC777TokensRecipient standard as defined in the EIP.
*
* Accounts can be notified of {IERC777} tokens being sent to them by having a
* contract implement this interface (contract holders can be their own
* implementer) and registering it on the
* https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry].
*
* See {IERC1820Registry} and {ERC1820Implementer}.
*/
interface IERC777Recipient {
/**
* @dev Called by an {IERC777} token contract whenever tokens are being
* moved or created into a registered account (`to`). The type of operation
* is conveyed by `from` being the zero address or not.
*
* This call occurs _after_ the token contract's state is updated, so
* {IERC777-balanceOf}, etc., can be used to query the post-operation state.
*
* This function may revert to prevent the operation from being executed.
*/
function tokensReceived(
address operator,
address from,
address to,
uint256 amount,
bytes calldata userData,
bytes calldata operatorData
) external;
}

/_openzeppelin/contracts/token/ERC777/IERC777.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC777/IERC777.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC777Token standard as defined in the EIP.
*
* This contract uses the
* https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let
* token holders and recipients react to token movements by using setting implementers
* for the associated interfaces in said registry. See {IERC1820Registry} and
* {ERC1820Implementer}.
*/
interface IERC777 {
/**
* @dev Emitted when `amount` tokens are created by `operator` and assigned to `to`.
*
* Note that some additional user `data` and `operatorData` can be logged in the event.
*/
event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData);
/**
* @dev Emitted when `operator` destroys `amount` tokens from `account`.
*
* Note that some additional user `data` and `operatorData` can be logged in the event.
*/
event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData);
/**
* @dev Emitted when `operator` is made operator for `tokenHolder`
*/
event AuthorizedOperator(address indexed operator, address indexed tokenHolder);
/**
* @dev Emitted when `operator` is revoked its operator status for `tokenHolder`
*/
event RevokedOperator(address indexed operator, address indexed tokenHolder);
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the smallest part of the token that is not divisible. This
* means all token operations (creation, movement and destruction) must have
* amounts that are a multiple of this number.
*
* For most token contracts, this value will equal 1.
*/
function granularity() external view returns (uint256);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by an account (`owner`).
*/
function balanceOf(address owner) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* If send or receive hooks are registered for the caller and `recipient`,
* the corresponding functions will be called with `data` and empty
* `operatorData`. See {IERC777Sender} and {IERC777Recipient}.
*
* Emits a {Sent} event.
*
* Requirements
*
* - the caller must have at least `amount` tokens.
* - `recipient` cannot be the zero address.
* - if `recipient` is a contract, it must implement the {IERC777Recipient}
* interface.
*/
function send(
address recipient,
uint256 amount,
bytes calldata data
) external;
/**
* @dev Destroys `amount` tokens from the caller's account, reducing the
* total supply.
*
* If a send hook is registered for the caller, the corresponding function
* will be called with `data` and empty `operatorData`. See {IERC777Sender}.
*
* Emits a {Burned} event.
*
* Requirements
*
* - the caller must have at least `amount` tokens.
*/
function burn(uint256 amount, bytes calldata data) external;
/**
* @dev Returns true if an account is an operator of `tokenHolder`.
* Operators can send and burn tokens on behalf of their owners. All
* accounts are their own operator.
*
* See {operatorSend} and {operatorBurn}.
*/
function isOperatorFor(address operator, address tokenHolder) external view returns (bool);
/**
* @dev Make an account an operator of the caller.
*
* See {isOperatorFor}.
*
* Emits an {AuthorizedOperator} event.
*
* Requirements
*
* - `operator` cannot be calling address.
*/
function authorizeOperator(address operator) external;
/**
* @dev Revoke an account's operator status for the caller.
*
* See {isOperatorFor} and {defaultOperators}.
*
* Emits a {RevokedOperator} event.
*
* Requirements
*
* - `operator` cannot be calling address.
*/
function revokeOperator(address operator) external;
/**
* @dev Returns the list of default operators. These accounts are operators
* for all token holders, even if {authorizeOperator} was never called on
* them.
*
* This list is immutable, but individual holders may revoke these via
* {revokeOperator}, in which case {isOperatorFor} will return false.
*/
function defaultOperators() external view returns (address[] memory);
/**
* @dev Moves `amount` tokens from `sender` to `recipient`. The caller must
* be an operator of `sender`.
*
* If send or receive hooks are registered for `sender` and `recipient`,
* the corresponding functions will be called with `data` and
* `operatorData`. See {IERC777Sender} and {IERC777Recipient}.
*
* Emits a {Sent} event.
*
* Requirements
*
* - `sender` cannot be the zero address.
* - `sender` must have at least `amount` tokens.
* - the caller must be an operator for `sender`.
* - `recipient` cannot be the zero address.
* - if `recipient` is a contract, it must implement the {IERC777Recipient}
* interface.
*/
function operatorSend(
address sender,
address recipient,
uint256 amount,
bytes calldata data,
bytes calldata operatorData
) external;
/**
* @dev Destroys `amount` tokens from `account`, reducing the total supply.
* The caller must be an operator of `account`.
*
* If a send hook is registered for `account`, the corresponding function
* will be called with `data` and `operatorData`. See {IERC777Sender}.
*
* Emits a {Burned} event.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
* - the caller must be an operator for `account`.
*/
function operatorBurn(
address account,
uint256 amount,
bytes calldata data,
bytes calldata operatorData
) external;
event Sent(
address indexed operator,
address indexed from,
address indexed to,
uint256 amount,
bytes data,
bytes operatorData
);
}

/_openzeppelin/contracts/token/ERC777/ERC777.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC777/ERC777.sol)
pragma solidity ^0.8.0;
import "./IERC777.sol";
import "./IERC777Recipient.sol";
import "./IERC777Sender.sol";
import "../ERC20/IERC20.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/IERC1820Registry.sol";
/**
* @dev Implementation of the {IERC777} 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}.
*
* Support for ERC20 is included in this contract, as specified by the EIP: both
* the ERC777 and ERC20 interfaces can be safely used when interacting with it.
* Both {IERC777-Sent} and {IERC20-Transfer} events are emitted on token
* movements.
*
* Additionally, the {IERC777-granularity} value is hard-coded to `1`, meaning that there
* are no special restrictions in the amount of tokens that created, moved, or
* destroyed. This makes integration with ERC20 applications seamless.
*/
contract ERC777 is Context, IERC777, IERC20 {
using Address for address;
IERC1820Registry internal constant _ERC1820_REGISTRY = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);
mapping(address => uint256) private _balances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
bytes32 private constant _TOKENS_SENDER_INTERFACE_HASH = keccak256("ERC777TokensSender");
bytes32 private constant _TOKENS_RECIPIENT_INTERFACE_HASH = keccak256("ERC777TokensRecipient");
// This isn't ever read from - it's only used to respond to the defaultOperators query.
address[] private _defaultOperatorsArray;
// Immutable, but accounts may revoke them (tracked in __revokedDefaultOperators).
mapping(address => bool) private _defaultOperators;
// For each account, a mapping of its operators and revoked default operators.
mapping(address => mapping(address => bool)) private _operators;
mapping(address => mapping(address => bool)) private _revokedDefaultOperators;
// ERC20-allowances
mapping(address => mapping(address => uint256)) private _allowances;
/**
* @dev `defaultOperators` may be an empty array.
*/
constructor(
string memory name_,
string memory symbol_,
address[] memory defaultOperators_
) {
_name = name_;
_symbol = symbol_;
_defaultOperatorsArray = defaultOperators_;
for (uint256 i = 0; i < defaultOperators_.length; i++) {
_defaultOperators[defaultOperators_[i]] = true;
}
// register interfaces
_ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC777Token"), address(this));
_ERC1820_REGISTRY.setInterfaceImplementer(address(this), keccak256("ERC20Token"), address(this));
}
/**
* @dev See {IERC777-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC777-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {ERC20-decimals}.
*
* Always returns 18, as per the
* [ERC777 EIP](https://eips.ethereum.org/EIPS/eip-777#backward-compatibility).
*/
function decimals() public pure virtual returns (uint8) {
return 18;
}
/**
* @dev See {IERC777-granularity}.
*
* This implementation always returns `1`.
*/
function granularity() public view virtual override returns (uint256) {
return 1;
}
/**
* @dev See {IERC777-totalSupply}.
*/
function totalSupply() public view virtual override(IERC20, IERC777) returns (uint256) {
return _totalSupply;
}
/**
* @dev Returns the amount of tokens owned by an account (`tokenHolder`).
*/
function balanceOf(address tokenHolder) public view virtual override(IERC20, IERC777) returns (uint256) {
return _balances[tokenHolder];
}
/**
* @dev See {IERC777-send}.
*
* Also emits a {IERC20-Transfer} event for ERC20 compatibility.
*/
function send(
address recipient,
uint256 amount,
bytes memory data
) public virtual override {
_send(_msgSender(), recipient, amount, data, "", true);
}
/**
* @dev See {IERC20-transfer}.
*
* Unlike `send`, `recipient` is _not_ required to implement the {IERC777Recipient}
* interface if it is a contract.
*
* Also emits a {Sent} event.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_send(_msgSender(), recipient, amount, "", "", false);
return true;
}
/**
* @dev See {IERC777-burn}.
*
* Also emits a {IERC20-Transfer} event for ERC20 compatibility.
*/
function burn(uint256 amount, bytes memory data) public virtual override {
_burn(_msgSender(), amount, data, "");
}
/**
* @dev See {IERC777-isOperatorFor}.
*/
function isOperatorFor(address operator, address tokenHolder) public view virtual override returns (bool) {
return
operator == tokenHolder ||
(_defaultOperators[operator] && !_revokedDefaultOperators[tokenHolder][operator]) ||
_operators[tokenHolder][operator];
}
/**
* @dev See {IERC777-authorizeOperator}.
*/
function authorizeOperator(address operator) public virtual override {
require(_msgSender() != operator, "ERC777: authorizing self as operator");
if (_defaultOperators[operator]) {
delete _revokedDefaultOperators[_msgSender()][operator];
} else {
_operators[_msgSender()][operator] = true;
}
emit AuthorizedOperator(operator, _msgSender());
}
/**
* @dev See {IERC777-revokeOperator}.
*/
function revokeOperator(address operator) public virtual override {
require(operator != _msgSender(), "ERC777: revoking self as operator");
if (_defaultOperators[operator]) {
_revokedDefaultOperators[_msgSender()][operator] = true;
} else {
delete _operators[_msgSender()][operator];
}
emit RevokedOperator(operator, _msgSender());
}
/**
* @dev See {IERC777-defaultOperators}.
*/
function defaultOperators() public view virtual override returns (address[] memory) {
return _defaultOperatorsArray;
}
/**
* @dev See {IERC777-operatorSend}.
*
* Emits {Sent} and {IERC20-Transfer} events.
*/
function operatorSend(
address sender,
address recipient,
uint256 amount,
bytes memory data,
bytes memory operatorData
) public virtual override {
require(isOperatorFor(_msgSender(), sender), "ERC777: caller is not an operator for holder");
_send(sender, recipient, amount, data, operatorData, true);
}
/**
* @dev See {IERC777-operatorBurn}.
*
* Emits {Burned} and {IERC20-Transfer} events.
*/
function operatorBurn(
address account,
uint256 amount,
bytes memory data,
bytes memory operatorData
) public virtual override {
require(isOperatorFor(_msgSender(), account), "ERC777: caller is not an operator for holder");
_burn(account, amount, data, operatorData);
}
/**
* @dev See {IERC20-allowance}.
*
* Note that operator and allowance concepts are orthogonal: operators may
* not have allowance, and accounts with allowance may not be operators
* themselves.
*/
function allowance(address holder, address spender) public view virtual override returns (uint256) {
return _allowances[holder][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Note that accounts cannot have allowance issued by their operators.
*/
function approve(address spender, uint256 value) public virtual override returns (bool) {
address holder = _msgSender();
_approve(holder, spender, value);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Note that operator and allowance concepts are orthogonal: operators cannot
* call `transferFrom` (unless they have allowance), and accounts with
* allowance cannot call `operatorSend` (unless they are operators).
*
* Emits {Sent}, {IERC20-Transfer} and {IERC20-Approval} events.
*/
function transferFrom(
address holder,
address recipient,
uint256 amount
) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(holder, spender, amount);
_send(holder, recipient, amount, "", "", false);
return true;
}
/**
* @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* If a send hook is registered for `account`, the corresponding function
* will be called with `operator`, `data` and `operatorData`.
*
* See {IERC777Sender} and {IERC777Recipient}.
*
* Emits {Minted} and {IERC20-Transfer} events.
*
* Requirements
*
* - `account` cannot be the zero address.
* - if `account` is a contract, it must implement the {IERC777Recipient}
* interface.
*/
function _mint(
address account,
uint256 amount,
bytes memory userData,
bytes memory operatorData
) internal virtual {
_mint(account, amount, userData, operatorData, true);
}
/**
* @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* If `requireReceptionAck` is set to true, and if a send hook is
* registered for `account`, the corresponding function will be called with
* `operator`, `data` and `operatorData`.
*
* See {IERC777Sender} and {IERC777Recipient}.
*
* Emits {Minted} and {IERC20-Transfer} events.
*
* Requirements
*
* - `account` cannot be the zero address.
* - if `account` is a contract, it must implement the {IERC777Recipient}
* interface.
*/
function _mint(
address account,
uint256 amount,
bytes memory userData,
bytes memory operatorData,
bool requireReceptionAck
) internal virtual {
require(account != address(0), "ERC777: mint to the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, address(0), account, amount);
// Update state variables
_totalSupply += amount;
_balances[account] += amount;
_callTokensReceived(operator, address(0), account, amount, userData, operatorData, requireReceptionAck);
emit Minted(operator, account, amount, userData, operatorData);
emit Transfer(address(0), account, amount);
}
/**
* @dev Send tokens
* @param from address token holder address
* @param to address recipient address
* @param amount uint256 amount of tokens to transfer
* @param userData bytes extra information provided by the token holder (if any)
* @param operatorData bytes extra information provided by the operator (if any)
* @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient
*/
function _send(
address from,
address to,
uint256 amount,
bytes memory userData,
bytes memory operatorData,
bool requireReceptionAck
) internal virtual {
require(from != address(0), "ERC777: transfer from the zero address");
require(to != address(0), "ERC777: transfer to the zero address");
address operator = _msgSender();
_callTokensToSend(operator, from, to, amount, userData, operatorData);
_move(operator, from, to, amount, userData, operatorData);
_callTokensReceived(operator, from, to, amount, userData, operatorData, requireReceptionAck);
}
/**
* @dev Burn tokens
* @param from address token holder address
* @param amount uint256 amount of tokens to burn
* @param data bytes extra information provided by the token holder
* @param operatorData bytes extra information provided by the operator (if any)
*/
function _burn(
address from,
uint256 amount,
bytes memory data,
bytes memory operatorData
) internal virtual {
require(from != address(0), "ERC777: burn from the zero address");
address operator = _msgSender();
_callTokensToSend(operator, from, address(0), amount, data, operatorData);
_beforeTokenTransfer(operator, from, address(0), amount);
// Update state variables
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC777: burn amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
}
_totalSupply -= amount;
emit Burned(operator, from, amount, data, operatorData);
emit Transfer(from, address(0), amount);
}
function _move(
address operator,
address from,
address to,
uint256 amount,
bytes memory userData,
bytes memory operatorData
) private {
_beforeTokenTransfer(operator, from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC777: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
}
_balances[to] += amount;
emit Sent(operator, from, to, amount, userData, operatorData);
emit Transfer(from, to, amount);
}
/**
* @dev See {ERC20-_approve}.
*
* Note that accounts cannot have allowance issued by their operators.
*/
function _approve(
address holder,
address spender,
uint256 value
) internal virtual {
require(holder != address(0), "ERC777: approve from the zero address");
require(spender != address(0), "ERC777: approve to the zero address");
_allowances[holder][spender] = value;
emit Approval(holder, spender, value);
}
/**
* @dev Call from.tokensToSend() if the interface is registered
* @param operator address operator requesting the transfer
* @param from address token holder address
* @param to address recipient address
* @param amount uint256 amount of tokens to transfer
* @param userData bytes extra information provided by the token holder (if any)
* @param operatorData bytes extra information provided by the operator (if any)
*/
function _callTokensToSend(
address operator,
address from,
address to,
uint256 amount,
bytes memory userData,
bytes memory operatorData
) private {
address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(from, _TOKENS_SENDER_INTERFACE_HASH);
if (implementer != address(0)) {
IERC777Sender(implementer).tokensToSend(operator, from, to, amount, userData, operatorData);
}
}
/**
* @dev Call to.tokensReceived() if the interface is registered. Reverts if the recipient is a contract but
* tokensReceived() was not registered for the recipient
* @param operator address operator requesting the transfer
* @param from address token holder address
* @param to address recipient address
* @param amount uint256 amount of tokens to transfer
* @param userData bytes extra information provided by the token holder (if any)
* @param operatorData bytes extra information provided by the operator (if any)
* @param requireReceptionAck if true, contract recipients are required to implement ERC777TokensRecipient
*/
function _callTokensReceived(
address operator,
address from,
address to,
uint256 amount,
bytes memory userData,
bytes memory operatorData,
bool requireReceptionAck
) private {
address implementer = _ERC1820_REGISTRY.getInterfaceImplementer(to, _TOKENS_RECIPIENT_INTERFACE_HASH);
if (implementer != address(0)) {
IERC777Recipient(implementer).tokensReceived(operator, from, to, amount, userData, operatorData);
} else if (requireReceptionAck) {
require(!to.isContract(), "ERC777: token recipient contract has no implementer for ERC777TokensRecipient");
}
}
/**
* @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, "ERC777: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any token transfer. This includes
* calls to {send}, {transfer}, {operatorSend}, minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to 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 operator,
address from,
address to,
uint256 amount
) internal virtual {}
}

/_openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}

/_openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol)
pragma solidity ^0.8.0;
import "../ERC721.sol";
/**
* @dev ERC721 token with storage based token URI management.
*/
abstract contract ERC721URIStorage is ERC721 {
using Strings for uint256;
// Optional mapping for token URIs
mapping(uint256 => string) private _tokenURIs;
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token");
string memory _tokenURI = _tokenURIs[tokenId];
string memory base = _baseURI();
// If there is no base URI, return the token URI.
if (bytes(base).length == 0) {
return _tokenURI;
}
// If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
if (bytes(_tokenURI).length > 0) {
return string(abi.encodePacked(base, _tokenURI));
}
return super.tokenURI(tokenId);
}
/**
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
_tokenURIs[tokenId] = _tokenURI;
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual override {
super._burn(tokenId);
if (bytes(_tokenURIs[tokenId]).length != 0) {
delete _tokenURIs[tokenId];
}
}
}

/_openzeppelin/contracts/token/ERC721/IERC721Receiver.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}

/_openzeppelin/contracts/token/ERC721/IERC721.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}

/_openzeppelin/contracts/token/ERC721/ERC721.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` 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 tokenId
) 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.
* - `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 tokenId
) internal virtual {}
}

/_openzeppelin/contracts/token/ERC20/IERC20.sol

// 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 IERC20 {
/**
* @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);
}

/_openzeppelin/contracts/security/ReentrancyGuard.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}

/_openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_nft","internalType":"address"},{"type":"address","name":"_dev","internalType":"address"},{"type":"address","name":"_owner","internalType":"address"},{"type":"address","name":"_carvon","internalType":"address"}]},{"type":"event","name":"CertificationCleanList","inputs":[{"type":"address","name":"nftAddress","internalType":"address","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CertificationDevFeeChanged","inputs":[{"type":"address","name":"marketPlaceFeeAddress","internalType":"address","indexed":false},{"type":"uint256","name":"marketFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CertificationFeeChanged","inputs":[{"type":"uint256","name":"createrFee","internalType":"uint256","indexed":false},{"type":"uint256","name":"producerFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CertificationNFTBurned","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":false},{"type":"uint256","name":"tokenType","internalType":"uint256","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":false},{"type":"uint256","name":"year","internalType":"uint256","indexed":false},{"type":"uint256","name":"month","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CertificationNFTExchanged","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":false},{"type":"uint256","name":"fromType","internalType":"uint256","indexed":false},{"type":"uint256","name":"toType","internalType":"uint256","indexed":false},{"type":"uint256","name":"year","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CertificationNFTMinted","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":false},{"type":"uint256","name":"tokenType","internalType":"uint256","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":false},{"type":"uint256","name":"year","internalType":"uint256","indexed":false},{"type":"uint256","name":"month","internalType":"uint256","indexed":false},{"type":"uint256","name":"price","internalType":"uint256","indexed":false},{"type":"uint256","name":"devFee","internalType":"uint256","indexed":false},{"type":"uint256","name":"c02","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CertificationPayment","inputs":[{"type":"address","name":"fromAddress","internalType":"address","indexed":false},{"type":"address","name":"toAddress","internalType":"address","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":false},{"type":"address","name":"nftAddress","internalType":"address","indexed":false},{"type":"uint256","name":"paymentType","internalType":"uint256","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CertificationTokenBought","inputs":[{"type":"address","name":"nftAddress","internalType":"address","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":false},{"type":"address","name":"fromAddress","internalType":"address","indexed":false},{"type":"address","name":"toAddress","internalType":"address","indexed":false},{"type":"uint256","name":"total","internalType":"uint256","indexed":false},{"type":"uint256","name":"value","internalType":"uint256","indexed":false},{"type":"uint256","name":"fees","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CertificationTokenCreaterChanged","inputs":[{"type":"address","name":"tokenCreaterAddress","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"CertificationTokenDelisted","inputs":[{"type":"address","name":"nftAddress","internalType":"address","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"CertificationTokenListed","inputs":[{"type":"address","name":"nftAddress","internalType":"address","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"address","name":"fromAddress","internalType":"address","indexed":true},{"type":"uint256","name":"minValue","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CertificationTokenPriceChanged","inputs":[{"type":"address","name":"nftAddress","internalType":"address","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"uint256","name":"price","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CertificationTokenProducerChanged","inputs":[{"type":"address","name":"tokenCreaterAddress","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"CertificationTokenTransfered","inputs":[{"type":"address","name":"nftAddress","internalType":"address","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"total","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"CARBOM","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MONTHS","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"YEARS","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"_isAllTokenApproved","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"_isTokenApproved","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"_isTokenOwner","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addNewMarch","inputs":[{"type":"uint256","name":"year","internalType":"uint256"},{"type":"uint256","name":"startTimeStamp","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addNewYear","inputs":[{"type":"uint256","name":"year","internalType":"uint256"},{"type":"uint256","name":"startTimeStamp","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"adminMintAllNFTs","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"adminMintMonthlyNFT","inputs":[{"type":"address","name":"user","internalType":"address"},{"type":"uint256","name":"month","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"baseURI","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"buyToken","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"buyTokenComplete","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}],"name":"buyTokenPrepare","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"c02Owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculateCreaterFee","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculateDevFee","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculateProducerFee","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculateSellerFee","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"carvonFeeOnOffset","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"certChangePrice","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"newPrice","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"certCleanAllInvalidListings","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeBonusNFTLimitPrice","inputs":[{"type":"uint256","name":"_price","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeCarbonPercent","inputs":[{"type":"uint256","name":"_carbonPercent","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeCarvonTokenAddress","inputs":[{"type":"address","name":"_carvonToken","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeCo2Owner","inputs":[{"type":"address","name":"_newOnwer","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeDev","inputs":[{"type":"address","name":"_newDev","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeMonthNFTLimitPrice","inputs":[{"type":"uint256","name":"_price","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeOffsetFee","inputs":[{"type":"uint256","name":"_offsetFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeOwner","inputs":[{"type":"address","name":"_newOnwer","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changePrice","inputs":[{"type":"address","name":"_nftAddress","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"newPrice","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeTokenCreaterAddress","inputs":[{"type":"address","name":"_tokenCreaterAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cleanAllInvalidListings","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"current_month","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"current_year","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deleteTempTokenIdStorage","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"delistToken","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"delistToken","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"determineDateTime","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"dev","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"exchangeBonusNFTToMonth","inputs":[{"type":"uint256","name":"year","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"exchangeMonthNFTToBonus","inputs":[{"type":"uint256","name":"year","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct CertificationMarketPlace.Listing[]","components":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"listingPrice","internalType":"uint256"},{"type":"address","name":"seller","internalType":"address"}]}],"name":"getAllTokenListings","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getBonusNFTID","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"year","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"getBonusTokenURI","inputs":[{"type":"uint256","name":"year","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getCurrentBonusNFTID","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getCurrentMonthNFTID","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getCurrentYearNFTID","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"year","internalType":"uint256"},{"type":"uint256","name":"month","internalType":"uint256"}],"name":"getDateTimeSymbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getInvalidListingCount","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getMonthNFTID","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"year","internalType":"uint256"},{"type":"uint256","name":"month","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"getMonthTokenURI","inputs":[{"type":"uint256","name":"year","internalType":"uint256"},{"type":"uint256","name":"month","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct CertificationMarketPlace.Listing","components":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"listingPrice","internalType":"uint256"},{"type":"address","name":"seller","internalType":"address"}]}],"name":"getTokenListing","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct CertificationMarketPlace.Listing[]","components":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"listingPrice","internalType":"uint256"},{"type":"address","name":"seller","internalType":"address"}]}],"name":"getTokenListings","inputs":[{"type":"uint256","name":"from","internalType":"uint256"},{"type":"uint256","name":"size","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getYearNFTID","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"year","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"getYearTokenURI","inputs":[{"type":"uint256","name":"year","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initializeAPI","inputs":[{"type":"address","name":"_owner","internalType":"address"},{"type":"address","name":"_certNft","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initializeWithERC721","inputs":[{"type":"address","name":"_erc721Address","internalType":"address"},{"type":"address","name":"_owner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"limitBonusNFTPrice","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"limitMonthNFTPrice","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"linkedNFTAddress","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"listToken","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"listToken","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"maketPlaceFeeAddress","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mintBonusNFT","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mintMonthNFT","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mintYearNFT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"nftCreaterAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"nftProducerAddress","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"nftTransferFrom","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"numberToString","inputs":[{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"offsetFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ownedBonusData","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ownedMonthData","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ownedYearData","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBaseURI","inputs":[{"type":"string","name":"_uri","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setCurrentMonth","inputs":[{"type":"uint256","name":"month","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setCurrentYear","inputs":[{"type":"uint256","name":"year","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMaketPlaceAddressAndDevFee","inputs":[{"type":"address","name":"_maketPlaceFeeAddress","internalType":"address"},{"type":"uint256","name":"_maketPlaceFeePercentage","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setNFTFees","inputs":[{"type":"uint256","name":"_feeCreater","internalType":"uint256"},{"type":"uint256","name":"_feeProducer","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTokenCreaterAddress","inputs":[{"type":"address","name":"_tokenCreaterAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTokenProducerAddress","inputs":[{"type":"address","name":"_tokenProducerAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transfer","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transfer","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256[]","name":"amounts","internalType":"uint256[]"}],"name":"uniwapCarbon","inputs":[{"type":"address","name":"_to","internalType":"address"},{"type":"uint256","name":"_amountIn","internalType":"uint256"}]}]
            

Deployed ByteCode

0x6080604052600436106104b55760003560e01c806399f3b7ce1161026b578063cd2a43921161014f578063e1548702116100c1578063f1d6c74411610085578063f1d6c744146112f5578063f5a9ae2914611332578063f5e1b9fe1461136f578063faeaa2e114611398578063fddb64f8146113d5578063feb88406146113fe576104b5565b8063e154870214611226578063e7bad30414611251578063e7f7fb861461127a578063e9c13f65146112a3578063f1807442146112cc576104b5565b8063db75b26b11610113578063db75b26b146110f0578063dc36bb9a1461112d578063dcc1ecd91461116a578063dccee07414611181578063dfcdc5e6146111be578063e002650a146111e9576104b5565b8063cd2a439214610ff8578063cd4ce44314611024578063cfad045514611061578063d8a0b5b61461109e578063d9420c2a146110c7576104b5565b8063ae4044d4116101e8578063bbaed38f116101ac578063bbaed38f14610efe578063beabacc814610f15578063bed659bc14610f3e578063c09daa9c14610f67578063c3e0e88914610f90578063c93a187714610fcd576104b5565b8063ae4044d414610e26578063aea6e6de14610e63578063b3c8974714610e8c578063b7e6a19414610e96578063ba9a001614610ec1576104b5565b8063a6369d771161022f578063a6369d7714610d57578063a6a27f3a14610d80578063a6ed933e14610dab578063a6f9dae114610dd4578063a9059cbb14610dfd576104b5565b806399f3b7ce14610c935780639a1ed3e914610c9d5780639a6fba4b14610cc65780639a8cea8214610cf15780639d19de9914610d2e576104b5565b80636747412c1161039d57806383528e161161030f57806388a8c95c116102d357806388a8c95c14610b7157806388bae3b514610b9a5780638da5cb5b14610bd757806391cca3db14610c0257806398792eec14610c2d5780639912cd8c14610c6a576104b5565b806383528e1614610aa257806384091a3714610acb57806384244add14610af4578063847a221814610b1f5780638573f22e14610b48576104b5565b8063745f43e411610361578063745f43e41461095957806375c1631d1461099657806375ccb1f2146109bf57806379815dee146109fc5780637e07590d14610a275780638178daf214610a65576104b5565b80636747412c146108605780636c0360eb1461089d5780636ce7769f146108c857806373dcfa0e14610905578063741cbae414610930576104b5565b806320ffffaa116104365780633fde13fb116103fa5780633fde13fb146107405780634c21db3e1461076b57806355f804b314610794578063589fff36146107bd57806359819ec4146107e657806363c46cdf14610823576104b5565b806320ffffaa1461067f57806321cb2aed146106aa5780632761f011146106d557806331d9387c146106fe578063383fba2514610729576104b5565b80630b7239191161047d5780630b723919146105a55780630d4b404f146105d0578063170dc660146105fb57806318eac0e9146106385780631faaf11014610675576104b5565b8063049c51a6146104ba578063057466ea146104e357806307da163b146104ff57806309fb6fde1461053c5780630ade770214610565575b600080fd5b3480156104c657600080fd5b506104e160048036038101906104dc919061735e565b611427565b005b6104fd60048036038101906104f891906174e6565b611556565b005b34801561050b57600080fd5b5061052660048036038101906105219190617458565b611805565b60405161053391906186e1565b60405180910390f35b34801561054857600080fd5b50610563600480360381019061055e9190617458565b611837565b005b34801561057157600080fd5b5061058c6004803603810190610587919061735e565b611a86565b60405161059c9493929190617dc9565b60405180910390f35b3480156105b157600080fd5b506105ba611c1e565b6040516105c791906186e1565b60405180910390f35b3480156105dc57600080fd5b506105e5611c24565b6040516105f29190617d85565b60405180910390f35b34801561060757600080fd5b50610622600480360381019061061d9190617458565b611c4a565b60405161062f9190618364565b60405180910390f35b34801561064457600080fd5b5061065f600480360381019061065a919061735e565b611c5c565b60405161066c91906186e1565b60405180910390f35b61067d611ccf565b005b34801561068b57600080fd5b50610694611fd6565b6040516106a19190617d85565b60405180910390f35b3480156106b657600080fd5b506106bf611ffc565b6040516106cc9190617d85565b60405180910390f35b3480156106e157600080fd5b506106fc60048036038101906106f791906174e6565b612022565b005b34801561070a57600080fd5b5061071361205c565b6040516107209190617d85565b60405180910390f35b34801561073557600080fd5b5061073e612082565b005b34801561074c57600080fd5b5061075561215a565b60405161076291906186e1565b60405180910390f35b34801561077757600080fd5b50610792600480360381019061078d9190617245565b612160565b005b3480156107a057600080fd5b506107bb60048036038101906107b69190617417565b612291565b005b3480156107c957600080fd5b506107e460048036038101906107df9190617297565b6122ab565b005b3480156107f257600080fd5b5061080d60048036038101906108089190617458565b6122b9565b60405161081a91906186e1565b60405180910390f35b34801561082f57600080fd5b5061084a60048036038101906108459190617458565b6122d1565b60405161085791906186e1565b60405180910390f35b34801561086c57600080fd5b50610887600480360381019061088291906174aa565b612303565b6040516108949190618349565b60405180910390f35b3480156108a957600080fd5b506108b26123ef565b6040516108bf9190618364565b60405180910390f35b3480156108d457600080fd5b506108ef60048036038101906108ea9190617322565b61247d565b6040516108fc91906186e1565b60405180910390f35b34801561091157600080fd5b5061091a6124d8565b6040516109279190618327565b60405180910390f35b34801561093c57600080fd5b506109576004803603810190610952919061735e565b6126a0565b005b34801561096557600080fd5b50610980600480360381019061097b9190617322565b6126ea565b60405161098d91906186e1565b60405180910390f35b3480156109a257600080fd5b506109bd60048036038101906109b891906174e6565b61270f565b005b3480156109cb57600080fd5b506109e660048036038101906109e191906174e6565b61279a565b6040516109f39190618305565b60405180910390f35b348015610a0857600080fd5b50610a1161299f565b604051610a1e91906186e1565b60405180910390f35b348015610a3357600080fd5b50610a4e6004803603810190610a49919061735e565b6129a5565b604051610a5c929190618022565b60405180910390f35b348015610a7157600080fd5b50610a8c6004803603810190610a879190617458565b612b51565b604051610a999190618364565b60405180910390f35b348015610aae57600080fd5b50610ac96004803603810190610ac49190617458565b612b85565b005b348015610ad757600080fd5b50610af26004803603810190610aed9190617245565b612c1f565b005b348015610b0057600080fd5b50610b09612cf3565b604051610b1691906186e1565b60405180910390f35b348015610b2b57600080fd5b50610b466004803603810190610b419190617245565b612cf9565b005b348015610b5457600080fd5b50610b6f6004803603810190610b6a9190617245565b612f82565b005b348015610b7d57600080fd5b50610b986004803603810190610b939190617245565b6130b3565b005b348015610ba657600080fd5b50610bc16004803603810190610bbc9190617458565b61333c565b604051610bce9190618349565b60405180910390f35b348015610be357600080fd5b50610bec613427565b604051610bf99190617d85565b60405180910390f35b348015610c0e57600080fd5b50610c1761344d565b604051610c249190617d85565b60405180910390f35b348015610c3957600080fd5b50610c546004803603810190610c4f9190617458565b613473565b604051610c6191906186c6565b60405180910390f35b348015610c7657600080fd5b50610c916004803603810190610c8c9190617322565b613525565b005b610c9b61354f565b005b348015610ca957600080fd5b50610cc46004803603810190610cbf9190617458565b613856565b005b348015610cd257600080fd5b50610cdb613bbe565b604051610ce89190617d85565b60405180910390f35b348015610cfd57600080fd5b50610d186004803603810190610d139190617458565b613be4565b604051610d2591906186e1565b60405180910390f35b348015610d3a57600080fd5b50610d556004803603810190610d5091906174e6565b613c16565b005b348015610d6357600080fd5b50610d7e6004803603810190610d799190617458565b613c31565b005b348015610d8c57600080fd5b50610d95613c3b565b604051610da291906186e1565b60405180910390f35b348015610db757600080fd5b50610dd26004803603810190610dcd9190617458565b613d2f565b005b348015610de057600080fd5b50610dfb6004803603810190610df69190617245565b613ed9565b005b348015610e0957600080fd5b50610e246004803603810190610e1f9190617322565b614162565b005b348015610e3257600080fd5b50610e4d6004803603810190610e489190617458565b614207565b604051610e5a91906186e1565b60405180910390f35b348015610e6f57600080fd5b50610e8a6004803603810190610e859190617297565b61424b565b005b610e94614360565b005b348015610ea257600080fd5b50610eab6145ed565b604051610eb89190617d85565b60405180910390f35b348015610ecd57600080fd5b50610ee86004803603810190610ee39190617322565b614613565b604051610ef59190618327565b60405180910390f35b348015610f0a57600080fd5b50610f13614915565b005b348015610f2157600080fd5b50610f3c6004803603810190610f3791906172d3565b614925565b005b348015610f4a57600080fd5b50610f656004803603810190610f609190617458565b614a5c565b005b348015610f7357600080fd5b50610f8e6004803603810190610f899190617245565b614ac3565b005b348015610f9c57600080fd5b50610fb76004803603810190610fb29190617322565b614d64565b604051610fc491906186e1565b60405180910390f35b348015610fd957600080fd5b50610fe2614d89565b604051610fef91906186e1565b60405180910390f35b34801561100457600080fd5b5061100d614d8f565b60405161101b929190618756565b60405180910390f35b34801561103057600080fd5b5061104b60048036038101906110469190617458565b614da8565b6040516110589190618364565b60405180910390f35b34801561106d57600080fd5b5061108860048036038101906110839190617322565b614ddc565b60405161109591906186e1565b60405180910390f35b3480156110aa57600080fd5b506110c560048036038101906110c09190617322565b614e37565b005b3480156110d357600080fd5b506110ee60048036038101906110e99190617245565b6150f9565b005b3480156110fc57600080fd5b5061111760048036038101906111129190617245565b61513d565b60405161112491906186e1565b60405180910390f35b34801561113957600080fd5b50611154600480360381019061114f9190617245565b6151a8565b6040516111619190618349565b60405180910390f35b34801561117657600080fd5b5061117f61525e565b005b34801561118d57600080fd5b506111a860048036038101906111a39190617245565b6153a6565b6040516111b591906186e1565b60405180910390f35b3480156111ca57600080fd5b506111d3615411565b6040516111e091906186e1565b60405180910390f35b3480156111f557600080fd5b50611210600480360381019061120b9190617245565b615417565b60405161121d91906186e1565b60405180910390f35b34801561123257600080fd5b5061123b615499565b6040516112489190618305565b60405180910390f35b34801561125d57600080fd5b5061127860048036038101906112739190617322565b6154b4565b005b34801561128657600080fd5b506112a1600480360381019061129c91906172d3565b615623565b005b3480156112af57600080fd5b506112ca60048036038101906112c59190617458565b6156b9565b005b3480156112d857600080fd5b506112f360048036038101906112ee9190617458565b6156c3565b005b34801561130157600080fd5b5061131c60048036038101906113179190617322565b615912565b60405161132991906186e1565b60405180910390f35b34801561133e57600080fd5b5061135960048036038101906113549190617458565b615937565b60405161136691906186e1565b60405180910390f35b34801561137b57600080fd5b5061139660048036038101906113919190617458565b61594f565b005b3480156113a457600080fd5b506113bf60048036038101906113ba91906174e6565b6159e9565b6040516113cc9190618364565b60405180910390f35b3480156113e157600080fd5b506113fc60048036038101906113f791906174e6565b615a28565b005b34801561140a57600080fd5b5061142560048036038101906114209190617322565b615c00565b005b600061143283613473565b905061143e8385612303565b61147d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611474906185c6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff1614156114f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e890618566565b60405180910390fd5b6000821015611535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152c90618646565b60405180910390fd5b81600f60008581526020019081526020016000206001018190555050505050565b600080600080611567338787611a86565b935093509350935060003490506000601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060006115a683614207565b905060006115b384613be4565b905060006115c085611805565b905060006115cd866122d1565b90506115da338b86615cb1565b7f7d9fc874d6eeb4569582b66d8cf4cce13a9dfe4a1997aa6482a1538c731520ca338b8e8860008960405161161496959493929190617e45565b60405180910390a1611627338a85615cb1565b7f7d9fc874d6eeb4569582b66d8cf4cce13a9dfe4a1997aa6482a1538c731520ca338a8e8860018860405161166196959493929190617ea6565b60405180910390a1600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16141580156116a65750600082115b156116f9576116b6338984615cb1565b7f7d9fc874d6eeb4569582b66d8cf4cce13a9dfe4a1997aa6482a1538c731520ca33898e886002876040516116f096959493929190617f07565b60405180910390a15b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16141580156117365750600081115b1561178957611746338883615cb1565b7f7d9fc874d6eeb4569582b66d8cf4cce13a9dfe4a1997aa6482a1538c731520ca33888e8860038660405161178096959493929190617f68565b60405180910390a15b611793338d613525565b61179e8a338e615e64565b7ff0682ff6a8936c1a0cfefc9caf10548c6a050cf5da05d249df19fd0591d7c474858d8c338a8987898b6117d291906188f3565b6117dc91906188f3565b6040516117ef979695949392919061804b565b60405180910390a1505050505050505050505050565b6000611830600a546118226007548561611890919063ffffffff16565b61612e90919063ffffffff16565b9050919050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118be906184e6565b60405180910390fd5b8060168190555060006103e86017546016546118e3919061897a565b6118ed9190618949565b905060006103e86017546103e861190491906189d4565b601654611911919061897a565b61191b9190618949565b9050600081836103e861192e91906189d4565b61193891906189d4565b90507f5d493a507dde4566192b32178ed9bb4a4ceef82470d4ab7f96411894d4057679601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161198b9190617d85565b60405180910390a17fff02d2154c125d9e48fd5f3f466b07cd9e1bbf7ac863d5b2957404969cfa31f1601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516119e49190617d85565b60405180910390a17f050f791308895b9f0174a8b7be6dc130cea5a53e163cf3fde15f3fb76cf33b978184604051611a1d929190618756565b60405180910390a17fc0573502df2e2f554c163b3db168335005168ca392fd73879262d5389b889e80601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683604051611a78929190618022565b60405180910390a150505050565b6000806000806000611a9787613473565b9050600073ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff161415611b0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b0490618566565b60405180910390fd5b611b178789612303565b15611b57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b4e90618406565b60405180910390fd5b8060200151861015611b9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b95906184a6565b60405180910390fd5b8060400151600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1694509450945094505093509350935093565b601b5481565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060611c5582616144565b9050919050565b6000601c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083606486611cad919061897a565b611cb791906188f3565b81526020019081526020016000205490509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d56906184e6565b60405180910390fd5b600080611d6a614d8f565b915091506000611d793361513d565b905060018110611dbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db590618466565b60405180910390fd5b601a54341015611e03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dfa906183c6565b60405180910390fd5b60003490506000806000611e16846162f1565b9250925092506000611e2788614da8565b90506000601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eacabe1433846040518363ffffffff1660e01b8152600401611e88929190617ff2565b602060405180830381600087803b158015611ea257600080fd5b505af1158015611eb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eda9190617481565b905080601d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008b815260200190815260200160002081905550604051806060016040528060215481526020018a81526020016000815250601f60008381526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050507ff7c6ae46b7604e94d129cb5993b87f71af0d6b1120cd7107924496aa99b8803e33602154838c60008b8a8a604051611fc398979695949392919061818b565b60405180910390a1505050505050505050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006003606484612033919061897a565b61203d91906188f3565b9050816001600083815260200190815260200160002081905550505050565b601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061208c6124d8565b905060005b815181101561214e5760008282815181106120d5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190507f9fb489ea779fdca986e895f5a5a5a996cd9dced4d04c47961ee299724e4a607f601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682604051612132929190618022565b60405180910390a150808061214690618b3d565b915050612091565b50612157614915565b50565b601a5481565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156121d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c7906183e6565b60405180910390fd5b600a546103e814612216576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161220d90618426565b60405180910390fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f5d493a507dde4566192b32178ed9bb4a4ceef82470d4ab7f96411894d4057679816040516122869190617d85565b60405180910390a150565b80600490805190602001906122a7929190616fe3565b5050565b6122b5818361424b565b5050565b60016020528060005260406000206000915090505481565b60006122fc600a546122ee6006548561611890919063ffffffff16565b61612e90919063ffffffff16565b9050919050565b6000600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161236091906186e1565b60206040518083038186803b15801561237857600080fd5b505afa9250505080156123a957506040513d601f19601f820116820180604052508101906123a6919061726e565b60015b6123b657600090506123e9565b8273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149150505b92915050565b600480546123fc90618ada565b80601f016020809104026020016040519081016040528092919081815260200182805461242890618ada565b80156124755780601f1061244a57610100808354040283529160200191612475565b820191906000526020600020905b81548152906001019060200180831161245857829003601f168201915b505050505081565b6000601d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b606060005b6124e760106164bd565b8110156125d85760006125048260106164d290919063ffffffff16565b9050612596600f600083815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250506164ec565b6125c45760128190806001815401808255809150506001900390600052602060002001600090919091909150555b5080806125d090618b3d565b9150506124dd565b5060005b6012805490508110156126495761263660128281548110612626577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020015461654d565b808061264190618b3d565b9150506125dc565b50601280548060200260200160405190810160405280929190818152602001828054801561269657602002820191906000526020600020905b815481526020019060010190808311612682575b5050505050905090565b6126ab338383611427565b817f63413248e542160c78ba2b468f3cdde5097263cc8742e8215e77e5935615327884836040516126dd929190618022565b60405180910390a2505050565b601e602052816000526040600020602052806000526040600020600091509150505481565b60008061271d3385856129a5565b915091508173ffffffffffffffffffffffffffffffffffffffff16847f337f7ef373d1779106db5838d4fe4f15e6e18a1676d2a9f2135165c6f540a66e601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168460405161278c929190618022565b60405180910390a350505050565b60606127a660106164bd565b831080156127b45750600082115b156129985760008290506127c860106164bd565b83856127d491906188f3565b11156127f257836127e560106164bd565b6127ef91906189d4565b90505b60008167ffffffffffffffff811115612834577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561286d57816020015b61285a617069565b8152602001906001900390816128525790505b50905060005b8281101561298d576000600f60006128a0898561289091906188f3565b60106164d290919063ffffffff16565b815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525050905061292e816164ec565b15612979578083838151811061296d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101819052505b50808061298590618b3d565b915050612873565b508092505050612999565b5b92915050565b60175481565b600080600083116129eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129e290618526565b60405180910390fd5b6129f58486612303565b612a34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2b90618666565b60405180910390fd5b612a3d8461333c565b80612a4d5750612a4c856151a8565b5b612a8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a83906185a6565b60405180910390fd5b60405180606001604052808581526020018481526020018673ffffffffffffffffffffffffffffffffffffffff16815250600f6000868152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050612b428460106165cc90919063ffffffff16565b50848391509150935093915050565b60606004612b5e83611c4a565b604051602001612b6f929190617cfc565b6040516020818303038152906040529050919050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612c15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c0c906184e6565b60405180910390fd5b80601a8190555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ca6906184e6565b60405180910390fd5b80601960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60165481565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612d89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d80906184e6565b60405180910390fd5b80601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006103e8601754601654612ddf919061897a565b612de99190618949565b905060006103e86017546103e8612e0091906189d4565b601654612e0d919061897a565b612e179190618949565b9050600081836103e8612e2a91906189d4565b612e3491906189d4565b90507f5d493a507dde4566192b32178ed9bb4a4ceef82470d4ab7f96411894d4057679601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051612e879190617d85565b60405180910390a17fff02d2154c125d9e48fd5f3f466b07cd9e1bbf7ac863d5b2957404969cfa31f1601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051612ee09190617d85565b60405180910390a17f050f791308895b9f0174a8b7be6dc130cea5a53e163cf3fde15f3fb76cf33b978184604051612f19929190618756565b60405180910390a17fc0573502df2e2f554c163b3db168335005168ca392fd73879262d5389b889e80601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683604051612f74929190618022565b60405180910390a150505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612ff2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fe9906183e6565b60405180910390fd5b600a546103e814613038576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161302f90618426565b60405180910390fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fff02d2154c125d9e48fd5f3f466b07cd9e1bbf7ac863d5b2957404969cfa31f1816040516130a89190617d85565b60405180910390a150565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613143576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161313a906184e6565b60405180910390fd5b80601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006103e8601754601654613199919061897a565b6131a39190618949565b905060006103e86017546103e86131ba91906189d4565b6016546131c7919061897a565b6131d19190618949565b9050600081836103e86131e491906189d4565b6131ee91906189d4565b90507f5d493a507dde4566192b32178ed9bb4a4ceef82470d4ab7f96411894d4057679601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516132419190617d85565b60405180910390a17fff02d2154c125d9e48fd5f3f466b07cd9e1bbf7ac863d5b2957404969cfa31f1601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161329a9190617d85565b60405180910390a17f050f791308895b9f0174a8b7be6dc130cea5a53e163cf3fde15f3fb76cf33b9781846040516132d3929190618756565b60405180910390a17fc0573502df2e2f554c163b3db168335005168ca392fd73879262d5389b889e80601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168360405161332e929190618022565b60405180910390a150505050565b6000600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663081812fc836040518263ffffffff1660e01b815260040161339991906186e1565b60206040518083038186803b1580156133b157600080fd5b505afa9250505080156133e257506040513d601f19601f820116820180604052508101906133df919061726e565b60015b6133ef5760009050613422565b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149150505b919050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61347b617069565b6000600f600084815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250509050613510816164ec565b1561351e5780915050613520565b505b919050565b600061353082613473565b905061354181604001518484615623565b61354a8261654d565b505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146135df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135d6906184e6565b60405180910390fd5b6000806135ea614d8f565b9150915060006135f9336153a6565b90506001811061363e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161363590618466565b60405180910390fd5b601b54341015613683576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161367a906183c6565b60405180910390fd5b60003490506000806000613696846162f1565b92509250925060006136a788612b51565b90506000601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eacabe1433846040518363ffffffff1660e01b8152600401613708929190617ff2565b602060405180830381600087803b15801561372257600080fd5b505af1158015613736573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061375a9190617481565b905080601e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008b815260200190815260200160002081905550604051806060016040528060225481526020018a81526020016000815250601f60008381526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050507ff7c6ae46b7604e94d129cb5993b87f71af0d6b1120cd7107924496aa99b8803e33602254838c60008b8a8a60405161384398979695949392919061818b565b60405180910390a1505050505050505050565b6000613861336153a6565b9050600181106138a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161389d90618466565b60405180910390fd5b6000600190505b600c8111613a595760006138c2338584611c5c565b905060008111613907576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016138fe90618446565b60405180910390fd5b601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639dc29fac33836040518363ffffffff1660e01b8152600401613964929190618022565b600060405180830381600087803b15801561397e57600080fd5b505af1158015613992573d6000803e3d6000fd5b505050506000601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000846064886139e7919061897a565b6139f191906188f3565b8152602001908152602001600020819055507fb441164e60719b2320b36c2ab191177a80f4737029cb8026064be14b5d3e07ee3360205483876000604051613a3d9594939291906180ba565b60405180910390a1508080613a5190618b3d565b9150506138ad565b506000613a6583612b51565b90506000601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eacabe1433846040518363ffffffff1660e01b8152600401613ac6929190617ff2565b602060405180830381600087803b158015613ae057600080fd5b505af1158015613af4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b189190617481565b905080601e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000868152602001908152602001600020819055507ff7c6ae46b7604e94d129cb5993b87f71af0d6b1120cd7107924496aa99b8803e336022548387600080600080604051613bb098979695949392919061810d565b60405180910390a150505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000613c0f600a54613c016008548561611890919063ffffffff16565b61612e90919063ffffffff16565b9050919050565b80600080848152602001908152602001600020819055505050565b8060038190555050565b6000806000905060005b613c4f60106164bd565b811015613d2757613cf9600f6000613c718460106164d290919063ffffffff16565b815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250506164ec565b613d1457613d116001836165e690919063ffffffff16565b91505b8080613d1f90618b3d565b915050613c45565b508091505090565b6000613d3b3383614ddc565b905060008111613d80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d77906185e6565b60405180910390fd5b601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639dc29fac33836040518363ffffffff1660e01b8152600401613ddd929190618022565b600060405180830381600087803b158015613df757600080fd5b505af1158015613e0b573d6000803e3d6000fd5b505050506000601e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000848152602001908152602001600020819055507fb441164e60719b2320b36c2ab191177a80f4737029cb8026064be14b5d3e07ee3360225483856000604051613e9f9594939291906180ba565b60405180910390a16000600190505b600c8111613ed457613ec13384836165fc565b8080613ecc90618b3d565b915050613eae565b505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613f69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613f60906184e6565b60405180910390fd5b80601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060006103e8601754601654613fbf919061897a565b613fc99190618949565b905060006103e86017546103e8613fe091906189d4565b601654613fed919061897a565b613ff79190618949565b9050600081836103e861400a91906189d4565b61401491906189d4565b90507f5d493a507dde4566192b32178ed9bb4a4ceef82470d4ab7f96411894d4057679601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516140679190617d85565b60405180910390a17fff02d2154c125d9e48fd5f3f466b07cd9e1bbf7ac863d5b2957404969cfa31f1601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516140c09190617d85565b60405180910390a17f050f791308895b9f0174a8b7be6dc130cea5a53e163cf3fde15f3fb76cf33b9781846040516140f9929190618756565b60405180910390a17fc0573502df2e2f554c163b3db168335005168ca392fd73879262d5389b889e80601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683604051614154929190618022565b60405180910390a150505050565b61416d338383614925565b614178338383615e64565b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16827fef1c448ed9ac146c524b945298fc7673ae69b91968d52622f9e15885fb4f8b02601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660006040516141fb929190617fc9565b60405180910390a45050565b6000614244614235600a546142276009548661611890919063ffffffff16565b61612e90919063ffffffff16565b836167e490919063ffffffff16565b9050919050565b6103cf60058190555060006006819055506000600781905550601960088190555060196009819055506103e8600a8190555081600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fc0573502df2e2f554c163b3db168335005168ca392fd73879262d5389b889e80600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600854604051614354929190618022565b60405180910390a15050565b60008061436b614d8f565b91509150600061437a33615417565b9050600181106143bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016143b690618466565b60405180910390fd5b601a54341015614404576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016143fb906183c6565b60405180910390fd5b60003490506000806000614417846162f1565b925092509250600061442988886159e9565b90506000601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eacabe1433846040518363ffffffff1660e01b815260040161448a929190617ff2565b602060405180830381600087803b1580156144a457600080fd5b505af11580156144b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144dc9190617481565b905080601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a60648d61452e919061897a565b61453891906188f3565b815260200190815260200160002081905550604051806060016040528060205481526020018a815260200189815250601f60008381526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050507ff7c6ae46b7604e94d129cb5993b87f71af0d6b1120cd7107924496aa99b8803e33602054838c8c8b8a8a6040516145da989796959493929190618287565b60405180910390a1505050505050505050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606073471ece3750da237f93b8e339c536989b8978a43873ffffffffffffffffffffffffffffffffffffffff1663095ea7b373e3d8bd6aed4f159bc8000a9cd47cffdb95f96121846040518363ffffffff1660e01b8152600401614678929190618022565b602060405180830381600087803b15801561469257600080fd5b505af11580156146a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146ca91906173ee565b506000600267ffffffffffffffff81111561470e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561473c5781602001602082028036833780820191505090505b50905073471ece3750da237f93b8e339c536989b8978a4388160008151811061478e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110614825577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505073e3d8bd6aed4f159bc8000a9cd47cffdb95f9612173ffffffffffffffffffffffffffffffffffffffff166338ed17398460008488426040518663ffffffff1660e01b81526004016148b59594939291906186fc565b600060405180830381600087803b1580156148cf57600080fd5b505af11580156148e3573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061490c91906173ad565b91505092915050565b6012600061492391906170a0565b565b61492f8184612303565b61496e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401614965906186a6565b60405180910390fd5b6149778161333c565b806149875750614986836151a8565b5b6149c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016149bd90618386565b60405180910390fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e8484846040518463ffffffff1660e01b8152600401614a2593929190617e0e565b600060405180830381600087803b158015614a3f57600080fd5b505af1158015614a53573d6000803e3d6000fd5b50505050505050565b614a663382615c00565b807f0adc87dec77f360387016077376c170774d5f3f5f8d6dafee200cfa3e09a44e5601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051614ab89190617d85565b60405180910390a250565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614614b53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401614b4a906184e6565b60405180910390fd5b60006107e690506000600190505b60068111614d5f576000614b76848484611c5c565b90506001811015614d4b576000614b8d84846159e9565b90506000601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eacabe1487846040518363ffffffff1660e01b8152600401614bee929190617ff2565b602060405180830381600087803b158015614c0857600080fd5b505af1158015614c1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614c409190617481565b905080601c60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600086606489614c92919061897a565b614c9c91906188f3565b8152602001908152602001600020819055506040518060600160405280602054815260200186815260200185815250601f60008381526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050507ff7c6ae46b7604e94d129cb5993b87f71af0d6b1120cd7107924496aa99b8803e866020548388886000806000604051614d40989796959493929190618209565b60405180910390a150505b508080614d5790618b3d565b915050614b61565b505050565b601c602052816000526040600020602052806000526040600020600091509150505481565b60025481565b600080614d9a61525e565b600254600354915091509091565b60606004614db583611c4a565b604051602001614dc6929190617d36565b6040516020818303038152906040529050919050565b6000601e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614614ec7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401614ebe906184e6565b60405180910390fd5b60006107e6905060078210614f11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401614f08906183a6565b60405180910390fd5b6000614f1e848385611c5c565b905060018110156150f3576000614f3583856159e9565b90506000601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eacabe1487846040518363ffffffff1660e01b8152600401614f96929190617ff2565b602060405180830381600087803b158015614fb057600080fd5b505af1158015614fc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614fe89190617481565b905080601c60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008760648861503a919061897a565b61504491906188f3565b8152602001908152602001600020819055506040518060600160405280602054815260200185815260200186815250601f60008381526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050507ff7c6ae46b7604e94d129cb5993b87f71af0d6b1120cd7107924496aa99b8803e8660205483878960008060006040516150e8989796959493929190618209565b60405180910390a150505b50505050565b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600061514a614d8f565b91509150601d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000205492505050919050565b6000600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e985e9c583306040518363ffffffff1660e01b8152600401615207929190617da0565b60206040518083038186803b15801561521f57600080fd5b505afa158015615233573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061525791906173ee565b9050919050565b60004290506000806000600160025461527791906188f3565b8152602001908152602001600020549050808211156152b157600160025461529f91906188f3565b6002819055506152b06002546167fa565b5b60006001600060035460646002546152c9919061897a565b6152d391906188f3565b8152602001908152602001600020549050600060016000600160035460646002546152fe919061897a565b61530891906188f3565b61531291906188f3565b81526020019081526020016000205490508084118061533057508184105b156153a0576000600190505b600c811161539e5760006001600083606460025461535a919061897a565b61536491906188f3565b815260200190815260200160002054905080861015615383575061539e565b8160038190555050808061539690618b3d565b91505061533c565b505b50505050565b60008060006153b3614d8f565b91509150601e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000205492505050919050565b60035481565b6000806000615424614d8f565b91509150601c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082606485615477919061897a565b61548191906188f3565b81526020019081526020016000205492505050919050565b60606154af60006154aa60106164bd565b61279a565b905090565b6000811180156154c657506103e88111155b615505576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016154fc90618686565b60405180910390fd5b81600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a546103e81461558c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161558390618426565b60405180910390fd5b80600881905550600654600754600854600a546155a991906189d4565b6155b391906189d4565b6155bd91906189d4565b6005819055506006546007546008546155d691906188f3565b6155e091906188f3565b6009819055507fc0573502df2e2f554c163b3db168335005168ca392fd73879262d5389b889e808282604051615617929190618022565b60405180910390a15050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e8484846040518463ffffffff1660e01b815260040161568293929190617e0e565b600060405180830381600087803b15801561569c57600080fd5b505af11580156156b0573d6000803e3d6000fd5b50505050505050565b8060028190555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614615753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161574a906184e6565b60405180910390fd5b8060178190555060006103e860175460165461576f919061897a565b6157799190618949565b905060006103e86017546103e861579091906189d4565b60165461579d919061897a565b6157a79190618949565b9050600081836103e86157ba91906189d4565b6157c491906189d4565b90507f5d493a507dde4566192b32178ed9bb4a4ceef82470d4ab7f96411894d4057679601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516158179190617d85565b60405180910390a17fff02d2154c125d9e48fd5f3f466b07cd9e1bbf7ac863d5b2957404969cfa31f1601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516158709190617d85565b60405180910390a17f050f791308895b9f0174a8b7be6dc130cea5a53e163cf3fde15f3fb76cf33b9781846040516158a9929190618756565b60405180910390a17fc0573502df2e2f554c163b3db168335005168ca392fd73879262d5389b889e80601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683604051615904929190618022565b60405180910390a150505050565b601d602052816000526040600020602052806000526040600020600091509150505481565b60006020528060005260406000206000915090505481565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146159df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016159d6906184e6565b60405180910390fd5b80601b8190555050565b606060046159f684611c4a565b6159ff84611c4a565b604051602001615a1193929190617cb5565b604051602081830303815290604052905092915050565b6000821480615a865750600073ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b615ac5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401615abc90618586565b60405180910390fd5b6000811480615b235750600073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b615b62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401615b5990618606565b60405180910390fd5b8160078190555080600681905550600654600854600754600a54615b8691906189d4565b615b9091906189d4565b615b9a91906189d4565b600581905550600654600854600754615bb391906188f3565b615bbd91906188f3565b6009819055507f050f791308895b9f0174a8b7be6dc130cea5a53e163cf3fde15f3fb76cf33b978282604051615bf4929190618756565b60405180910390a15050565b8173ffffffffffffffffffffffffffffffffffffffff16600f600083815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614615ca4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401615c9b90618626565b60405180910390fd5b615cad8161654d565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415615d21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401615d1890618546565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415615d91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401615d8890618546565b60405180910390fd5b60008111615dd4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401615dcb90618506565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415615e54578173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015615e4e573d6000803e3d6000fd5b50615e5f565b615e5e8282616c40565b5b505050565b6000601f600083815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820154815250509050600081600001519050600082602001519050600083604001519050602054831415615fa3576000601c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083606486615f1a919061897a565b615f2491906188f3565b81526020019081526020016000208190555084601c60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083606486615f86919061897a565b615f9091906188f3565b8152602001908152602001600020819055505b602154831415616059576000601d60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000208190555084601d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000848152602001908152602001600020819055505b60225483141561610f576000601e60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000208190555084601e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000848152602001908152602001600020819055505b50505050505050565b60008183616126919061897a565b905092915050565b6000818361613c9190618949565b905092915050565b6060600082141561618c576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506162ec565b600082905060005b600082146161be5780806161a790618b3d565b915050600a826161b79190618949565b9150616194565b60008167ffffffffffffffff811115616200577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156162325781602001600182028036833780820191505090505b5090505b600085146162e55760018261624b91906189d4565b9150600a8561625a9190618b86565b603061626691906188f3565b60f81b8183815181106162a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856162de9190618949565b9450616236565b8093505050505b919050565b6000806000806103e860165486616308919061897a565b6163129190618949565b905060006103e860175483616327919061897a565b6163319190618949565b90506000818361634191906189d4565b90506000838861635191906189d4565b9050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156163bb573d6000803e3d6000fd5b50601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015616424573d6000803e3d6000fd5b506000616453601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685614613565b90506000816001835161646691906189d4565b8151811061649d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190508284829850985098505050505050509193909250565b60006164cb82600001616d34565b9050919050565b60006164e18360000183616d45565b60001c905092915050565b600061650082600001518360400151612303565b80156165295750616514826000015161333c565b80616528575061652782604001516151a8565b5b5b8015616539575060008260200151115b156165475760019050616548565b5b919050565b616561816010616d9690919063ffffffff16565b156165c957600f600082815260200190815260200160002060008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550506165c7816010616db090919063ffffffff16565b505b50565b60006165de836000018360001b616dca565b905092915050565b600081836165f491906188f3565b905092915050565b6000616609848484611c5c565b905060018110156167de57600061662084846159e9565b90506000601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eacabe1433846040518363ffffffff1660e01b8152600401616681929190617ff2565b602060405180830381600087803b15801561669b57600080fd5b505af11580156166af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906166d39190617481565b905080601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600086606489616725919061897a565b61672f91906188f3565b8152602001908152602001600020819055506040518060600160405280602054815260200186815260200185815250601f60008381526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050507ff7c6ae46b7604e94d129cb5993b87f71af0d6b1120cd7107924496aa99b8803e3360205483888860008060006040516167d3989796959493929190618209565b60405180910390a150505b50505050565b600081836167f291906189d4565b905092915050565b60008082815260200190815260200160002054600160006001606485616820919061897a565b61682a91906188f3565b8152602001908152602001600020819055506228de806000808381526020019081526020016000205461685d91906188f3565b600160006002606485616870919061897a565b61687a91906188f3565b8152602001908152602001600020819055506228de806001600060036064856168a3919061897a565b6168ad91906188f3565b8152602001908152602001600020546168c691906188f3565b6001600060046064856168d9919061897a565b6168e391906188f3565b81526020019081526020016000208190555062278d0060016000600460648561690c919061897a565b61691691906188f3565b81526020019081526020016000205461692f91906188f3565b600160006005606485616942919061897a565b61694c91906188f3565b8152602001908152602001600020819055506228de80600160006005606485616975919061897a565b61697f91906188f3565b81526020019081526020016000205461699891906188f3565b6001600060066064856169ab919061897a565b6169b591906188f3565b81526020019081526020016000208190555062278d006001600060066064856169de919061897a565b6169e891906188f3565b815260200190815260200160002054616a0191906188f3565b600160006007606485616a14919061897a565b616a1e91906188f3565b8152602001908152602001600020819055506228de80600160006007606485616a47919061897a565b616a5191906188f3565b815260200190815260200160002054616a6a91906188f3565b600160006008606485616a7d919061897a565b616a8791906188f3565b8152602001908152602001600020819055506228de80600160006008606485616ab0919061897a565b616aba91906188f3565b815260200190815260200160002054616ad391906188f3565b600160006009606485616ae6919061897a565b616af091906188f3565b81526020019081526020016000208190555062278d00600160006009606485616b19919061897a565b616b2391906188f3565b815260200190815260200160002054616b3c91906188f3565b60016000600a606485616b4f919061897a565b616b5991906188f3565b8152602001908152602001600020819055506228de8060016000600a606485616b82919061897a565b616b8c91906188f3565b815260200190815260200160002054616ba591906188f3565b60016000600b606485616bb8919061897a565b616bc291906188f3565b81526020019081526020016000208190555062278d0060016000600b606485616beb919061897a565b616bf591906188f3565b815260200190815260200160002054616c0e91906188f3565b60016000600c606485616c21919061897a565b616c2b91906188f3565b81526020019081526020016000208190555050565b80471015616c83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401616c7a906184c6565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1682604051616ca990617d70565b60006040518083038185875af1925050503d8060008114616ce6576040519150601f19603f3d011682016040523d82523d6000602084013e616ceb565b606091505b5050905080616d2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401616d2690618486565b60405180910390fd5b505050565b600081600001805490509050919050565b6000826000018281548110616d83577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200154905092915050565b6000616da8836000018360001b616e3a565b905092915050565b6000616dc2836000018360001b616e5d565b905092915050565b6000616dd68383616e3a565b616e2f578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050616e34565b600090505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b60008083600101600084815260200190815260200160002054905060008114616fd7576000600182616e8f91906189d4565b9050600060018660000180549050616ea791906189d4565b9050818114616f62576000866000018281548110616eee577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200154905080876000018481548110616f38577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480616f9c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050616fdd565b60009150505b92915050565b828054616fef90618ada565b90600052602060002090601f0160209004810192826170115760008555617058565b82601f1061702a57805160ff1916838001178555617058565b82800160010185558215617058579182015b8281111561705757825182559160200191906001019061703c565b5b50905061706591906170c1565b5090565b60405180606001604052806000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b50805460008255906000526020600020908101906170be91906170c1565b50565b5b808211156170da5760008160009055506001016170c2565b5090565b60006170f16170ec846187a4565b61877f565b9050808382526020820190508285602086028201111561711057600080fd5b60005b8581101561714057816171268882617230565b845260208401935060208301925050600181019050617113565b5050509392505050565b600061715d617158846187d0565b61877f565b90508281526020810184848401111561717557600080fd5b617180848285618a98565b509392505050565b6000813590506171978161938f565b92915050565b6000815190506171ac8161938f565b92915050565b600082601f8301126171c357600080fd5b81516171d38482602086016170de565b91505092915050565b6000815190506171eb816193a6565b92915050565b600082601f83011261720257600080fd5b813561721284826020860161714a565b91505092915050565b60008135905061722a816193bd565b92915050565b60008151905061723f816193bd565b92915050565b60006020828403121561725757600080fd5b600061726584828501617188565b91505092915050565b60006020828403121561728057600080fd5b600061728e8482850161719d565b91505092915050565b600080604083850312156172aa57600080fd5b60006172b885828601617188565b92505060206172c985828601617188565b9150509250929050565b6000806000606084860312156172e857600080fd5b60006172f686828701617188565b935050602061730786828701617188565b92505060406173188682870161721b565b9150509250925092565b6000806040838503121561733557600080fd5b600061734385828601617188565b92505060206173548582860161721b565b9150509250929050565b60008060006060848603121561737357600080fd5b600061738186828701617188565b93505060206173928682870161721b565b92505060406173a38682870161721b565b9150509250925092565b6000602082840312156173bf57600080fd5b600082015167ffffffffffffffff8111156173d957600080fd5b6173e5848285016171b2565b91505092915050565b60006020828403121561740057600080fd5b600061740e848285016171dc565b91505092915050565b60006020828403121561742957600080fd5b600082013567ffffffffffffffff81111561744357600080fd5b61744f848285016171f1565b91505092915050565b60006020828403121561746a57600080fd5b60006174788482850161721b565b91505092915050565b60006020828403121561749357600080fd5b60006174a184828501617230565b91505092915050565b600080604083850312156174bd57600080fd5b60006174cb8582860161721b565b92505060206174dc85828601617188565b9150509250929050565b600080604083850312156174f957600080fd5b60006175078582860161721b565b92505060206175188582860161721b565b9150509250929050565b600061752e838361756a565b60208301905092915050565b60006175468383617c13565b60608301905092915050565b600061755e8383617c97565b60208301905092915050565b61757381618a08565b82525050565b61758281618a08565b82525050565b600061759382618846565b61759d8185618899565b93506175a883618801565b8060005b838110156175d95781516175c08882617522565b97506175cb83618872565b9250506001810190506175ac565b5085935050505092915050565b60006175f182618851565b6175fb81856188aa565b935061760683618811565b8060005b8381101561763757815161761e888261753a565b97506176298361887f565b92505060018101905061760a565b5085935050505092915050565b600061764f8261885c565b61765981856188bb565b935061766483618821565b8060005b8381101561769557815161767c8882617552565b97506176878361888c565b925050600181019050617668565b5085935050505092915050565b6176ab81618a1a565b82525050565b6176ba81618a50565b82525050565b6176c981618a62565b82525050565b6176d881618a74565b82525050565b6176e781618a86565b82525050565b60006176f882618867565b61770281856188d7565b9350617712818560208601618aa7565b61771b81618c73565b840191505092915050565b600061773182618867565b61773b81856188e8565b935061774b818560208601618aa7565b80840191505092915050565b6000815461776481618ada565b61776e81866188e8565b94506001821660008114617789576001811461779a576177cd565b60ff198316865281860193506177cd565b6177a385618831565b60005b838110156177c5578154818901526001820191506020810190506177a6565b838801955050505b50505092915050565b60006177e36035836188d7565b91506177ee82618c84565b604082019050919050565b60006178066019836188d7565b915061781182618cd3565b602082019050919050565b60006178296002836188e8565b915061783482618cfc565b600282019050919050565b600061784c6020836188d7565b915061785782618d25565b602082019050919050565b600061786f6018836188d7565b915061787a82618d4e565b602082019050919050565b60006178926025836188d7565b915061789d82618d77565b604082019050919050565b60006178b5601a836188d7565b91506178c082618dc6565b602082019050919050565b60006178d86023836188d7565b91506178e382618def565b604082019050919050565b60006178fb602a836188d7565b915061790682618e3e565b604082019050919050565b600061791e603a836188d7565b915061792982618e8d565b604082019050919050565b6000617941602c836188d7565b915061794c82618edc565b604082019050919050565b6000617964601d836188d7565b915061796f82618f2b565b602082019050919050565b60006179876020836188d7565b915061799282618f54565b602082019050919050565b60006179aa6021836188d7565b91506179b582618f7d565b604082019050919050565b60006179cd6038836188d7565b91506179d882618fcc565b604082019050919050565b60006179f06002836188e8565b91506179fb8261901b565b600282019050919050565b6000617a13601d836188d7565b9150617a1e82619044565b602082019050919050565b6000617a366015836188d7565b9150617a418261906d565b602082019050919050565b6000617a596005836188e8565b9150617a6482619096565b600582019050919050565b6000617a7c6024836188d7565b9150617a87826190bf565b604082019050919050565b6000617a9f6036836188d7565b9150617aaa8261910e565b604082019050919050565b6000617ac26000836188cc565b9150617acd8261915d565b600082019050919050565b6000617ae5602a836188d7565b9150617af082619160565b604082019050919050565b6000617b086002836188e8565b9150617b13826191af565b600282019050919050565b6000617b2b601f836188d7565b9150617b36826191d8565b602082019050919050565b6000617b4e6025836188d7565b9150617b5982619201565b604082019050919050565b6000617b716022836188d7565b9150617b7c82619250565b604082019050919050565b6000617b94601c836188d7565b9150617b9f8261929f565b602082019050919050565b6000617bb7601f836188d7565b9150617bc2826192c8565b602082019050919050565b6000617bda6025836188d7565b9150617be5826192f1565b604082019050919050565b6000617bfd6028836188d7565b9150617c0882619340565b604082019050919050565b606082016000820151617c296000850182617c97565b506020820151617c3c6020850182617c97565b506040820151617c4f604085018261756a565b50505050565b606082016000820151617c6b6000850182617c97565b506020820151617c7e6020850182617c97565b506040820151617c91604085018261756a565b50505050565b617ca081618a46565b82525050565b617caf81618a46565b82525050565b6000617cc18286617757565b9150617ccc8261781c565b9150617cd88285617726565b9150617ce48284617726565b9150617cef82617a4c565b9150819050949350505050565b6000617d088285617757565b9150617d13826179e3565b9150617d1f8284617726565b9150617d2a82617a4c565b91508190509392505050565b6000617d428285617757565b9150617d4d82617afb565b9150617d598284617726565b9150617d6482617a4c565b91508190509392505050565b6000617d7b82617ab5565b9150819050919050565b6000602082019050617d9a6000830184617579565b92915050565b6000604082019050617db56000830185617579565b617dc26020830184617579565b9392505050565b6000608082019050617dde6000830187617579565b617deb6020830186617579565b617df86040830185617579565b617e056060830184617579565b95945050505050565b6000606082019050617e236000830186617579565b617e306020830185617579565b617e3d6040830184617ca6565b949350505050565b600060c082019050617e5a6000830189617579565b617e676020830188617579565b617e746040830187617ca6565b617e816060830186617579565b617e8e60808301856176b1565b617e9b60a0830184617ca6565b979650505050505050565b600060c082019050617ebb6000830189617579565b617ec86020830188617579565b617ed56040830187617ca6565b617ee26060830186617579565b617eef60808301856176c0565b617efc60a0830184617ca6565b979650505050505050565b600060c082019050617f1c6000830189617579565b617f296020830188617579565b617f366040830187617ca6565b617f436060830186617579565b617f5060808301856176cf565b617f5d60a0830184617ca6565b979650505050505050565b600060c082019050617f7d6000830189617579565b617f8a6020830188617579565b617f976040830187617ca6565b617fa46060830186617579565b617fb160808301856176de565b617fbe60a0830184617ca6565b979650505050505050565b6000604082019050617fde6000830185617579565b617feb60208301846176b1565b9392505050565b60006040820190506180076000830185617579565b818103602083015261801981846176ed565b90509392505050565b60006040820190506180376000830185617579565b6180446020830184617ca6565b9392505050565b600060e082019050618060600083018a617579565b61806d6020830189617ca6565b61807a6040830188617579565b6180876060830187617579565b6180946080830186617ca6565b6180a160a0830185617ca6565b6180ae60c0830184617ca6565b98975050505050505050565b600060a0820190506180cf6000830188617579565b6180dc6020830187617ca6565b6180e96040830186617ca6565b6180f66060830185617ca6565b61810360808301846176b1565b9695505050505050565b600061010082019050618123600083018b617579565b618130602083018a617ca6565b61813d6040830189617ca6565b61814a6060830188617ca6565b61815760808301876176b1565b61816460a08301866176b1565b61817160c08301856176b1565b61817e60e08301846176b1565b9998505050505050505050565b6000610100820190506181a1600083018b617579565b6181ae602083018a617ca6565b6181bb6040830189617ca6565b6181c86060830188617ca6565b6181d560808301876176b1565b6181e260a0830186617ca6565b6181ef60c0830185617ca6565b6181fc60e0830184617ca6565b9998505050505050505050565b60006101008201905061821f600083018b617579565b61822c602083018a617ca6565b6182396040830189617ca6565b6182466060830188617ca6565b6182536080830187617ca6565b61826060a08301866176b1565b61826d60c08301856176b1565b61827a60e08301846176b1565b9998505050505050505050565b60006101008201905061829d600083018b617579565b6182aa602083018a617ca6565b6182b76040830189617ca6565b6182c46060830188617ca6565b6182d16080830187617ca6565b6182de60a0830186617ca6565b6182eb60c0830185617ca6565b6182f860e0830184617ca6565b9998505050505050505050565b6000602082019050818103600083015261831f81846175e6565b905092915050565b600060208201905081810360008301526183418184617644565b905092915050565b600060208201905061835e60008301846176a2565b92915050565b6000602082019050818103600083015261837e81846176ed565b905092915050565b6000602082019050818103600083015261839f816177d6565b9050919050565b600060208201905081810360008301526183bf816177f9565b9050919050565b600060208201905081810360008301526183df8161783f565b9050919050565b600060208201905081810360008301526183ff81617862565b9050919050565b6000602082019050818103600083015261841f81617885565b9050919050565b6000602082019050818103600083015261843f816178a8565b9050919050565b6000602082019050818103600083015261845f816178cb565b9050919050565b6000602082019050818103600083015261847f816178ee565b9050919050565b6000602082019050818103600083015261849f81617911565b9050919050565b600060208201905081810360008301526184bf81617934565b9050919050565b600060208201905081810360008301526184df81617957565b9050919050565b600060208201905081810360008301526184ff8161797a565b9050919050565b6000602082019050818103600083015261851f8161799d565b9050919050565b6000602082019050818103600083015261853f816179c0565b9050919050565b6000602082019050818103600083015261855f81617a06565b9050919050565b6000602082019050818103600083015261857f81617a29565b9050919050565b6000602082019050818103600083015261859f81617a6f565b9050919050565b600060208201905081810360008301526185bf81617a92565b9050919050565b600060208201905081810360008301526185df81617ad8565b9050919050565b600060208201905081810360008301526185ff81617b1e565b9050919050565b6000602082019050818103600083015261861f81617b41565b9050919050565b6000602082019050818103600083015261863f81617b64565b9050919050565b6000602082019050818103600083015261865f81617b87565b9050919050565b6000602082019050818103600083015261867f81617baa565b9050919050565b6000602082019050818103600083015261869f81617bcd565b9050919050565b600060208201905081810360008301526186bf81617bf0565b9050919050565b60006060820190506186db6000830184617c55565b92915050565b60006020820190506186f66000830184617ca6565b92915050565b600060a0820190506187116000830188617ca6565b61871e60208301876176b1565b81810360408301526187308186617588565b905061873f6060830185617579565b61874c6080830184617ca6565b9695505050505050565b600060408201905061876b6000830185617ca6565b6187786020830184617ca6565b9392505050565b600061878961879a565b90506187958282618b0c565b919050565b6000604051905090565b600067ffffffffffffffff8211156187bf576187be618c44565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156187eb576187ea618c44565b5b6187f482618c73565b9050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006188fe82618a46565b915061890983618a46565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561893e5761893d618bb7565b5b828201905092915050565b600061895482618a46565b915061895f83618a46565b92508261896f5761896e618be6565b5b828204905092915050565b600061898582618a46565b915061899083618a46565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156189c9576189c8618bb7565b5b828202905092915050565b60006189df82618a46565b91506189ea83618a46565b9250828210156189fd576189fc618bb7565b5b828203905092915050565b6000618a1382618a26565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000618a5b82618a46565b9050919050565b6000618a6d82618a46565b9050919050565b6000618a7f82618a46565b9050919050565b6000618a9182618a46565b9050919050565b82818337600083830152505050565b60005b83811015618ac5578082015181840152602081019050618aaa565b83811115618ad4576000848401525b50505050565b60006002820490506001821680618af257607f821691505b60208210811415618b0657618b05618c15565b5b50919050565b618b1582618c73565b810181811067ffffffffffffffff82111715618b3457618b33618c44565b5b80604052505050565b6000618b4882618a46565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415618b7b57618b7a618bb7565b5b600182019050919050565b6000618b9182618a46565b9150618b9c83618a46565b925082618bac57618bab618be6565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f54686520746f6b656e206973206e6f7420617070726f76656420746f2074726160008201527f6e736665722062792074686520636f6e74726163740000000000000000000000602082015250565b7f596f752063616e2774206d696e74206f766572204a756e652e00000000000000600082015250565b7f2f6d000000000000000000000000000000000000000000000000000000000000600082015250565b7f546869732075736572206d7573742070617920666f72206d696e74206e66742e600082015250565b7f43616e27742073657420746f2061646472657373203078300000000000000000600082015250565b7f546f6b656e206f776e65722063616e277420627579207468656972206f776e2060008201527f746f6b656e000000000000000000000000000000000000000000000000000000602082015250565b7f5468697320746f6b656e206973206e6f74207265676973746564000000000000600082015250565b7f54686973207573657220646f6e2774206861766520616c6c206d6f6e7468204e60008201527f46542e0000000000000000000000000000000000000000000000000000000000602082015250565b7f54686973207573657220616c7265616479206d696e74206e667420666f72207460008201527f686973206d6f6e74682e00000000000000000000000000000000000000000000602082015250565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b7f5468652076616c75652073656e642069732062656c6f772073616c652070726960008201527f636520706c757320666565730000000000000000000000000000000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b7f4379626572426f78436572744e46543a2077726f6e6720646576656c6f706572600082015250565b7f7472616e7366657220616d6f756e74206d757374206c61726765207468616e2060008201527f3000000000000000000000000000000000000000000000000000000000000000602082015250565b7f506c65617365206c69737420666f72206d6f7265207468616e2030206f72207560008201527f736520746865207472616e736665722066756e6374696f6e0000000000000000602082015250565b7f2f62000000000000000000000000000000000000000000000000000000000000600082015250565b7f7472616e736665722061646472657373206d757374206e6f7420307830000000600082015250565b7f546f6b656e206973206e6f7420666f722073616c650000000000000000000000600082015250565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b7f5468697320746f6b656e20646f6e27742073657420637265617465722061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f5468697320746f6b656e206973206e6f7420616c6c6f77656420746f2074726160008201527f6e73666572206279207468697320636f6e747261637400000000000000000000602082015250565b50565b7f4f6e6c7920746f6b656e206f776e65722063616e206368616e6765207072696360008201527f65206f6620746f6b656e00000000000000000000000000000000000000000000602082015250565b7f2f79000000000000000000000000000000000000000000000000000000000000600082015250565b7f54686973207573657220646f6e2774206861766520626f6e7573204e46542e00600082015250565b7f5468697320746f6b656e20646f6e2774207365742070726f647563657220616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f4f6e6c7920746f6b656e2073656c6c65722063616e2064656c69737420746f6b60008201527f656e000000000000000000000000000000000000000000000000000000000000602082015250565b7f5468652076616c75652073656e642069732062656c6f77207a65726f00000000600082015250565b7f4f6e6c7920746f6b656e206f776e65722063616e206c69737420746f6b656e00600082015250565b7f416c6c6f7765642070657263656e746167652072616e6765206973203120746f60008201527f2031303030000000000000000000000000000000000000000000000000000000602082015250565b7f4f6e6c7920746f6b656e206f776e65722063616e20616363657074206269642060008201527f6f6620746f6b656e000000000000000000000000000000000000000000000000602082015250565b61939881618a08565b81146193a357600080fd5b50565b6193af81618a1a565b81146193ba57600080fd5b50565b6193c681618a46565b81146193d157600080fd5b5056fea2646970667358221220ee144a61b93f95e156e572d57bbca3b779e875c6bfa0bc966a8bd9f509d1698764736f6c63430008030033