Contract Overview
Balance:
0 MATIC
My Name Tag:
Not Available
[ Download CSV Export ]
Contract Name:
KatsuraOjisanAttribute
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // 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; 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); } } // File: contracts/KatsuraOjisanAttribute.sol pragma solidity ^0.8.0; contract KatsuraOjisanAttribute is Ownable { bool public isKatsuraOjisanAttribute = true; mapping(uint256 => string[]) attributes; function addAttributes(uint256 _token, string[] calldata _attribute) external onlyOwner { //clear old values for (uint256 i = 0; i < attributes[_token].length; i++) { attributes[_token].pop(); } for (uint256 i = 0; i < _attribute.length; i++) { attributes[_token].push(_attribute[i]); } } function getAttributes(uint256 _token) public view returns(string[] memory) { return attributes[_token]; } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"_token","type":"uint256"},{"internalType":"string[]","name":"_attribute","type":"string[]"}],"name":"addAttributes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"getAttributes","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isKatsuraOjisanAttribute","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526001600060146101000a81548160ff02191690831515021790555034801561002b57600080fd5b5061004861003d61004d60201b60201c565b61005560201b60201c565b610119565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b610d7f806101286000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80634378a6e3146100675780636c15186614610097578063715018a6146100b35780638da5cb5b146100bd57806393c38bea146100db578063f2fde38b146100f9575b600080fd5b610081600480360381019061007c91906107a4565b610115565b60405161008e9190610972565b60405180910390f35b6100b160048036038101906100ac91906107d1565b610201565b005b6100bb61038c565b005b6100c5610414565b6040516100d29190610957565b60405180910390f35b6100e361043d565b6040516100f09190610994565b60405180910390f35b610113600480360381019061010e9190610777565b610450565b005b606060016000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156101f657838290600052602060002001805461016990610b33565b80601f016020809104026020016040519081016040528092919081815260200182805461019590610b33565b80156101e25780601f106101b7576101008083540402835291602001916101e2565b820191906000526020600020905b8154815290600101906020018083116101c557829003601f168201915b50505050508152602001906001019061014a565b505050509050919050565b610209610548565b73ffffffffffffffffffffffffffffffffffffffff16610227610414565b73ffffffffffffffffffffffffffffffffffffffff161461027d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610274906109cf565b60405180910390fd5b60005b60016000858152602001908152602001600020805490508110156102f257600160008581526020019081526020016000208054806102c1576102c0610c0c565b5b6001900381819060005260206000200160006102dd9190610614565b905580806102ea90610b65565b915050610280565b5060005b82829050811015610386576001600085815260200190815260200160002083838381811061032757610326610c3b565b5b905060200281019061033991906109ef565b90918060018154018082558091505060019003906000526020600020016000909192909192909192909192509190610372929190610654565b50808061037e90610b65565b9150506102f6565b50505050565b610394610548565b73ffffffffffffffffffffffffffffffffffffffff166103b2610414565b73ffffffffffffffffffffffffffffffffffffffff1614610408576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ff906109cf565b60405180910390fd5b6104126000610550565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600060149054906101000a900460ff1681565b610458610548565b73ffffffffffffffffffffffffffffffffffffffff16610476610414565b73ffffffffffffffffffffffffffffffffffffffff16146104cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c3906109cf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561053c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610533906109af565b60405180910390fd5b61054581610550565b50565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b50805461062090610b33565b6000825580601f106106325750610651565b601f01602090049060005260206000209081019061065091906106da565b5b50565b82805461066090610b33565b90600052602060002090601f01602090048101928261068257600085556106c9565b82601f1061069b57803560ff19168380011785556106c9565b828001600101855582156106c9579182015b828111156106c85782358255916020019190600101906106ad565b5b5090506106d691906106da565b5090565b5b808211156106f35760008160009055506001016106db565b5090565b60008135905061070681610d1b565b92915050565b60008083601f84011261072257610721610c6f565b5b8235905067ffffffffffffffff81111561073f5761073e610c6a565b5b60208301915083602082028301111561075b5761075a610c7e565b5b9250929050565b60008135905061077181610d32565b92915050565b60006020828403121561078d5761078c610c8d565b5b600061079b848285016106f7565b91505092915050565b6000602082840312156107ba576107b9610c8d565b5b60006107c884828501610762565b91505092915050565b6000806000604084860312156107ea576107e9610c8d565b5b60006107f886828701610762565b935050602084013567ffffffffffffffff81111561081957610818610c88565b5b6108258682870161070c565b92509250509250925092565b600061083d83836108d8565b905092915050565b61084e81610ab8565b82525050565b600061085f82610a62565b6108698185610a85565b93508360208202850161087b85610a52565b8060005b858110156108b757848403895281516108988582610831565b94506108a383610a78565b925060208a0199505060018101905061087f565b50829750879550505050505092915050565b6108d281610aca565b82525050565b60006108e382610a6d565b6108ed8185610a96565b93506108fd818560208601610b00565b61090681610c92565b840191505092915050565b600061091e602683610aa7565b915061092982610ca3565b604082019050919050565b6000610941602083610aa7565b915061094c82610cf2565b602082019050919050565b600060208201905061096c6000830184610845565b92915050565b6000602082019050818103600083015261098c8184610854565b905092915050565b60006020820190506109a960008301846108c9565b92915050565b600060208201905081810360008301526109c881610911565b9050919050565b600060208201905081810360008301526109e881610934565b9050919050565b60008083356001602003843603038112610a0c57610a0b610c79565b5b80840192508235915067ffffffffffffffff821115610a2e57610a2d610c74565b5b602083019250600182023603831315610a4a57610a49610c83565b5b509250929050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610ac382610ad6565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610b1e578082015181840152602081019050610b03565b83811115610b2d576000848401525b50505050565b60006002820490506001821680610b4b57607f821691505b60208210811415610b5f57610b5e610bdd565b5b50919050565b6000610b7082610af6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610ba357610ba2610bae565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b610d2481610ab8565b8114610d2f57600080fd5b50565b610d3b81610af6565b8114610d4657600080fd5b5056fea26469706673582212203806d0e6bc7323d60959a7d2794f33954b2498262a40df80151a7d1f6709657564736f6c63430008070033
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|