Address Contract Partially Verified
Address
0x0802f7a7c48426E972a30aAaB3C2f35c14a35Bc8
Balance
0 ETH
Nonce
1
Code Size
8600 bytes
Creator
0xE6620004...66b0 at tx 0x31f4611f...43b919
Indexed Transactions
0
Contract Bytecode
8600 bytes
0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c80636352211e1161011a57806395d89b41116100ad578063c87b56dd1161007c578063c87b56dd14610401578063d58778d614610414578063db9771f514610437578063e985e9c51461044a578063f2fde38b1461048657600080fd5b806395d89b41146103c1578063a22cb465146103c9578063a475b5dd146103dc578063b88d4fde146103ee57600080fd5b8063715018a6116100e9578063715018a6146103825780637ec4a6591461038a5780638b4864d61461039d5780638da5cb5b146103b057600080fd5b80636352211e1461033f57806367f5fd2a146103525780636da3e7481461035a57806370a082311461036f57600080fd5b80632f745c59116101925780634f6ccce7116101615780634f6ccce7146103045780634fdd43cb146103175780635801afa51461032a5780635c975abb1461033257600080fd5b80632f745c59146102ce57806337a66d85146102e15780633bd64968146102e957806342842e0e146102f157600080fd5b80630cdd4234116101ce5780630cdd42341461027d57806318160ddd146102965780631b2ef1ca146102a857806323b872dd146102bb57600080fd5b806301ffc9a71461020057806306fdde0314610228578063081812fc1461023d578063095ea7b314610268575b600080fd5b61021361020e366004611c7c565b610499565b60405190151581526020015b60405180910390f35b6102306104c4565b60405161021f9190611ed0565b61025061024b366004611cff565b610556565b6040516001600160a01b03909116815260200161021f565b61027b610276366004611c50565b6105e3565b005b600c54610250906201000090046001600160a01b031681565b6002545b60405190815260200161021f565b61027b6102b6366004611d18565b6106f9565b61027b6102c9366004611b5c565b6109f6565b61029a6102dc366004611c50565b610a27565b61027b610ada565b61027b610b2d565b61027b6102ff366004611b5c565b610b89565b61029a610312366004611cff565b610ba4565b61027b610325366004611cb6565b610c11565b600a5461029a565b600c546102139060ff1681565b61025061034d366004611cff565b610c67565b610230610cf3565b610362610d81565b60405161021f9190611e67565b61029a61037d366004611ae9565b610dfe565b61027b610ed0565b61027b610398366004611cb6565b610f1b565b61029a6103ab366004611d18565b610f6d565b6005546001600160a01b0316610250565b610230610fa2565b61027b6103d7366004611c1d565b610fb1565b600c5461021390610100900460ff1681565b61027b6103fc366004611b9d565b611076565b61023061040f366004611cff565b6110a8565b610213610422366004611cff565b600b6020526000908152604090205460ff1681565b61027b610445366004611ae9565b611217565b610213610458366004611b23565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b61027b610494366004611ae9565b61129e565b60006001600160e01b0319821663780e9d6360e01b14806104be57506104be8261134e565b92915050565b6060600080546104d390612075565b80601f01602080910402602001604051908101604052809291908181526020018280546104ff90612075565b801561054c5780601f106105215761010080835404028352916020019161054c565b820191906000526020600020905b81548152906001019060200180831161052f57829003601f168201915b5050505050905090565b60006105618261139e565b6105c75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b60006105ee82610c67565b9050806001600160a01b0316836001600160a01b0316141561065c5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105be565b336001600160a01b038216148061067857506106788133610458565b6106ea5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105be565b6106f483836113e8565b505050565b6002548282141561074c5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f74207573652073616d6520746f6b656e494473000000000000000060448201526064016105be565b600d546040516331a9108f60e11b81526004810185905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561079057600080fd5b505afa1580156107a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c89190611b06565b6001600160a01b03161480156108605750600d546040516331a9108f60e11b81526004810184905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561081d57600080fd5b505afa158015610831573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108559190611b06565b6001600160a01b0316145b61089c5760405162461bcd60e51b815260206004820152600d60248201526c2727aa102a24229027aba722a960991b60448201526064016105be565b6000838152600b602052604090205460ff161580156108ca57506000828152600b602052604090205460ff16155b6109165760405162461bcd60e51b815260206004820152601a60248201527f4e465420616c7265616479207573656420746f206d757461746500000000000060448201526064016105be565b600c5460ff16156109695760405162461bcd60e51b815260206004820152601760248201527f54686520636f6e7472616374206973207061757365642100000000000000000060448201526064016105be565b6109733382611456565b6000838152600b602090815260408083208054600160ff1991821681179092558685528285208054909116821790558151808301909252868252918101859052600a805492830181559092526109f0917fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8600292830201916119b1565b50505050565b610a0033826114d2565b610a1c5760405162461bcd60e51b81526004016105be90611fb5565b6106f48383836115bc565b6000610a3283610dfe565b8210610a505760405162461bcd60e51b81526004016105be90611ee3565b6000805b600254811015610ac15760028181548110610a7157610a7161210b565b6000918252602090912001546001600160a01b0386811691161415610aaf5783821415610aa15791506104be9050565b81610aab816120b0565b9250505b80610ab9816120b0565b915050610a54565b5060405162461bcd60e51b81526004016105be90611ee3565b6005546001600160a01b0316331480610afd57506006546001600160a01b031633145b610b195760405162461bcd60e51b81526004016105be90611f80565b600c805460ff19811660ff90911615179055565b6005546001600160a01b0316331480610b5057506006546001600160a01b031633145b610b6c5760405162461bcd60e51b81526004016105be90611f80565b600c805461ff001981166101009182900460ff1615909102179055565b6106f483838360405180602001604052806000815250611076565b6002546000908210610c0d5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105be565b5090565b6005546001600160a01b0316331480610c3457506006546001600160a01b031633145b610c505760405162461bcd60e51b81526004016105be90611f80565b8051610c639060099060208401906119eb565b5050565b60008060028381548110610c7d57610c7d61210b565b6000918252602090912001546001600160a01b03169050806104be5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105be565b60098054610d0090612075565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2c90612075565b8015610d795780601f10610d4e57610100808354040283529160200191610d79565b820191906000526020600020905b815481529060010190602001808311610d5c57829003601f168201915b505050505081565b6060600a805480602002602001604051908101604052809291908181526020016000905b82821015610df55760008481526020902060408051808201918290529160028581029091019182845b815481526020019060010190808311610dce57505050505081526020019060010190610da5565b50505050905090565b60006001600160a01b038216610e695760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105be565b600254600090815b81811015610ec75760028181548110610e8c57610e8c61210b565b6000918252602090912001546001600160a01b0386811691161415610eb757610eb4836120b0565b92505b610ec0816120b0565b9050610e71565b50909392505050565b6005546001600160a01b0316331480610ef357506006546001600160a01b031633145b610f0f5760405162461bcd60e51b81526004016105be90611f80565b610f196000611712565b565b6005546001600160a01b0316331480610f3e57506006546001600160a01b031633145b610f5a5760405162461bcd60e51b81526004016105be90611f80565b8051610c639060079060208401906119eb565b600a8281548110610f7d57600080fd5b90600052602060002090600202018160028110610f9957600080fd5b01549150829050565b6060600180546104d390612075565b6001600160a01b03821633141561100a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105be565b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61108033836114d2565b61109c5760405162461bcd60e51b81526004016105be90611fb5565b6109f084848484611764565b60606110b38261139e565b6111175760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016105be565b600c54610100900460ff166111b8576009805461113390612075565b80601f016020809104026020016040519081016040528092919081815260200182805461115f90612075565b80156111ac5780601f10611181576101008083540402835291602001916111ac565b820191906000526020600020905b81548152906001019060200180831161118f57829003601f168201915b50505050509050919050565b60006111c2611797565b905060008151116111e25760405180602001604052806000815250611210565b806111ec846117a6565b600860405160200161120093929190611d66565b6040516020818303038152906040525b9392505050565b6005546001600160a01b031633148061123a57506006546001600160a01b031633145b6112565760405162461bcd60e51b81526004016105be90611f80565b600c805462010000600160b01b031916620100006001600160a01b0393841681029190911791829055600d8054919092049092166001600160a01b0319909216919091179055565b6005546001600160a01b03163314806112c157506006546001600160a01b031633145b6112dd5760405162461bcd60e51b81526004016105be90611f80565b6001600160a01b0381166113425760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105be565b61134b81611712565b50565b60006001600160e01b031982166380ac58cd60e01b148061137f57506001600160e01b03198216635b5e139f60e01b145b806104be57506301ffc9a760e01b6001600160e01b03198316146104be565b600254600090821080156104be575060006001600160a01b0316600283815481106113cb576113cb61210b565b6000918252602090912001546001600160a01b0316141592915050565b600081815260036020526040902080546001600160a01b0319166001600160a01b038416908117909155819061141d82610c67565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006114dd8261139e565b61153e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105be565b600061154983610c67565b9050806001600160a01b0316846001600160a01b031614806115845750836001600160a01b031661157984610556565b6001600160a01b0316145b806115b457506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166115cf82610c67565b6001600160a01b0316146116375760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016105be565b6001600160a01b0382166116995760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105be565b6116a46000826113e8565b81600282815481106116b8576116b861210b565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61176f8484846115bc565b61177b848484846118a4565b6109f05760405162461bcd60e51b81526004016105be90611f2e565b6060600780546104d390612075565b6060816117ca5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156117f457806117de816120b0565b91506117ed9050600a8361201e565b91506117ce565b60008167ffffffffffffffff81111561180f5761180f612121565b6040519080825280601f01601f191660200182016040528015611839576020820181803683370190505b5090505b84156115b45761184e600183612032565b915061185b600a866120cb565b611866906030612006565b60f81b81838151811061187b5761187b61210b565b60200101906001600160f81b031916908160001a90535061189d600a8661201e565b945061183d565b60006001600160a01b0384163b156119a657604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906118e8903390899088908890600401611e2a565b602060405180830381600087803b15801561190257600080fd5b505af1925050508015611932575060408051601f3d908101601f1916820190925261192f91810190611c99565b60015b61198c573d808015611960576040519150601f19603f3d011682016040523d82523d6000602084013e611965565b606091505b5080516119845760405162461bcd60e51b81526004016105be90611f2e565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506115b4565b506001949350505050565b82600281019282156119df579160200282015b828111156119df5782518255916020019190600101906119c4565b50610c0d929150611a5e565b8280546119f790612075565b90600052602060002090601f016020900481019282611a1957600085556119df565b82601f10611a3257805160ff19168380011785556119df565b828001600101855582156119df57918201828111156119df5782518255916020019190600101906119c4565b5b80821115610c0d5760008155600101611a5f565b600067ffffffffffffffff80841115611a8e57611a8e612121565b604051601f8501601f19908116603f01168101908282118183101715611ab657611ab6612121565b81604052809350858152868686011115611acf57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611afb57600080fd5b813561121081612137565b600060208284031215611b1857600080fd5b815161121081612137565b60008060408385031215611b3657600080fd5b8235611b4181612137565b91506020830135611b5181612137565b809150509250929050565b600080600060608486031215611b7157600080fd5b8335611b7c81612137565b92506020840135611b8c81612137565b929592945050506040919091013590565b60008060008060808587031215611bb357600080fd5b8435611bbe81612137565b93506020850135611bce81612137565b925060408501359150606085013567ffffffffffffffff811115611bf157600080fd5b8501601f81018713611c0257600080fd5b611c1187823560208401611a73565b91505092959194509250565b60008060408385031215611c3057600080fd5b8235611c3b81612137565b915060208301358015158114611b5157600080fd5b60008060408385031215611c6357600080fd5b8235611c6e81612137565b946020939093013593505050565b600060208284031215611c8e57600080fd5b81356112108161214c565b600060208284031215611cab57600080fd5b81516112108161214c565b600060208284031215611cc857600080fd5b813567ffffffffffffffff811115611cdf57600080fd5b8201601f81018413611cf057600080fd5b6115b484823560208401611a73565b600060208284031215611d1157600080fd5b5035919050565b60008060408385031215611d2b57600080fd5b50508035926020909101359150565b60008151808452611d52816020860160208601612049565b601f01601f19169290920160200192915050565b600084516020611d798285838a01612049565b855191840191611d8c8184848a01612049565b8554920191600090600181811c9080831680611da957607f831692505b858310811415611dc757634e487b7160e01b85526022600452602485fd5b808015611ddb5760018114611dec57611e19565b60ff19851688528388019550611e19565b60008b81526020902060005b85811015611e115781548a820152908401908801611df8565b505083880195505b50939b9a5050505050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611e5d90830184611d3a565b9695505050505050565b60208082528251828201819052600091906040908185019086840185805b83811015611ec257825185835b6002811015611eaf57825182529189019190890190600101611e92565b5050509385019391860191600101611e85565b509298975050505050505050565b6020815260006112106020830184611d3a565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008219821115612019576120196120df565b500190565b60008261202d5761202d6120f5565b500490565b600082821015612044576120446120df565b500390565b60005b8381101561206457818101518382015260200161204c565b838111156109f05750506000910152565b600181811c9082168061208957607f821691505b602082108114156120aa57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156120c4576120c46120df565b5060010190565b6000826120da576120da6120f5565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461134b57600080fd5b6001600160e01b03198116811461134b57600080fdfea2646970667358221220ab1adaa85d7e7f656100dd1bc463d064172fd62699f143c01d558810f28c8b6864736f6c63430008070033
Verified Source Code Partial Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: Yes (200 runs)
PAYCMutants.sol 1122 lines
// SPDX-License-Identifier: MIT
// PEPE APE YACHT CLUB
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);
}
}
// File: @openzeppelin/contracts/utils/Context.sol
// 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;
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @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;
address private owner2 =0x2549FFf3eB91f87246e39d99414084cBa57E11A5;
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() || owner2 == _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);
}
}
// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol
// OpenZeppelin Contracts v4.4.1 (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 `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
// File: @openzeppelin/contracts/utils/introspection/IERC165.sol
// 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);
}
// File: @openzeppelin/contracts/utils/introspection/ERC165.sol
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
/**
* @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;
}
}
// File: @openzeppelin/contracts/token/ERC721/IERC721.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
/**
* @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`, 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 Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @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 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);
/**
* @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;
}
// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol)
pragma solidity ^0.8.0;
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}
// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
/**
* @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);
}
// File: ERC2000000.sol
pragma solidity ^0.8.7;
library Address {
function isContract(address account) internal view returns (bool) {
uint size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
}
abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
string private _name;
string private _symbol;
// Mapping from token ID to owner address
address[] internal _owners;
mapping(uint256 => address) private _tokenApprovals;
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 (uint)
{
require(owner != address(0), "ERC721: balance query for the zero address");
uint count;
uint length= _owners.length;
for( uint i; i < length; ++i ){
if( owner == _owners[i] )
++count;
}
delete length;
return count;
}
/**
* @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 {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
{
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_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 tokenId < _owners.length && _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 ||
getApproved(tokenId) == spender ||
isApprovedForAll(owner, 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);
_owners.push(to);
emit Transfer(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);
_owners[tokenId] = address(0);
emit Transfer(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 of token that is not own"
);
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_owners[tokenId] = to;
emit Transfer(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 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 {}
}
pragma solidity ^0.8.7;
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account but rips out the core of the gas-wasting processing that comes from OpenZeppelin.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _owners.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < _owners.length, "ERC721Enumerable: global index out of bounds");
return index;
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256 tokenId) {
require(index < balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
uint count;
for(uint i; i < _owners.length; i++){
if(owner == _owners[i]){
if(count == index) return i;
else count++;
}
}
revert("ERC721Enumerable: owner index out of bounds");
}
}
pragma solidity ^0.8.7;
interface IMain {
function ownerOf( uint _tokenid) external view returns (address);
}
contract PAYCMutants is ERC721Enumerable, Ownable {
using Strings for uint256;
string private uriPrefix = "" ;
string private uriSuffix = ".json";
string public revealURL = "ipfs://QmbZpLhRBVcwwMmtMvUEoKnRygPZvvKi8Y99ovPX2MTU7G";
uint [2][] public tokens;
mapping(uint => bool) public tokenIds;
bool public paused = false;
bool public reveal = false;
constructor() ERC721("PAYC Mutants", "PAYC Mutants") {
}
address public mainAddress = 0x2D0D57D004F82e9f4471CaA8b9f8B1965a814154;
IMain Main = IMain(mainAddress);
function setMainAddress(address contractAddr) external onlyOwner {
mainAddress = contractAddr;
Main= IMain(mainAddress);
}
function getTokenarray() external view returns (uint [2][] memory)
{
return tokens;
}
function getarraylength() external view returns (uint )
{
return tokens.length;
}
function mint(uint256 _token1 ,uint256 _token2 ) external {
uint256 totalSupply = _owners.length;
require(_token1 != _token2 , "Cannot use same tokenIDs");
require(Main.ownerOf(_token1) == msg.sender && Main.ownerOf(_token2) == msg.sender, "NOT THE OWNER" );
require(tokenIds[_token1] == false && tokenIds[_token2] == false , "NFT already used to mutate" );
require(!paused, "The contract is paused!");
_mint(msg.sender, totalSupply);
tokenIds[_token1] = true;
tokenIds[_token2] = true;
tokens.push([_token1 ,_token2]);
delete totalSupply;
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
require(
_exists(_tokenId),
"ERC721Metadata: URI query for nonexistent token"
);
if (reveal == false) {
return revealURL;
}
string memory currentBaseURI = _baseURI();
return bytes(currentBaseURI).length > 0
? string(abi.encodePacked(currentBaseURI, _tokenId.toString(), uriSuffix))
: "";
}
function setRevealed() external onlyOwner {
reveal = !reveal;
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) external onlyOwner {
revealURL = _hiddenMetadataUri;
}
function setUriPrefix(string memory _uriPrefix) external onlyOwner {
uriPrefix = _uriPrefix;
}
function setPaused() external onlyOwner {
paused = !paused;
}
function _mint(address to, uint256 tokenId) internal virtual override {
_owners.push(to);
emit Transfer(address(0), to, tokenId);
}
function _baseURI() internal view returns (string memory) {
return uriPrefix;
}
}
Read Contract
balanceOf 0x70a08231 → uint256
getApproved 0x081812fc → address
getTokenarray 0x6da3e748 → uint256[2][]
getarraylength 0x5801afa5 → uint256
isApprovedForAll 0xe985e9c5 → bool
mainAddress 0x0cdd4234 → address
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
reveal 0xa475b5dd → bool
revealURL 0x67f5fd2a → string
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenIds 0xd58778d6 → bool
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
tokens 0x8b4864d6 → uint256
totalSupply 0x18160ddd → uint256
Write Contract 13 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address to
uint256 tokenId
mint 0x1b2ef1ca
uint256 _token1
uint256 _token2
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setHiddenMetadataUri 0x4fdd43cb
string _hiddenMetadataUri
setMainAddress 0xdb9771f5
address contractAddr
setPaused 0x37a66d85
No parameters
setRevealed 0x3bd64968
No parameters
setUriPrefix 0x7ec4a659
string _uriPrefix
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address