Overview ERC20
PRICE
n/a

ON-CHAIN MARKET CAP n/a

Total Supply:
1,000,000.00

Holders:
1
Profile Summary
Blockchain:
Sepolia (11155111)


Decimals:
18
Contract Source Code Verified (Exact Match)
Contract Name:
AdCoin

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 200 runs

Created At:
Wed, 24 Jul 2024 04:07:12 GMT
AdCoin.sol
contracts
AdCoin.sol


Contract ABI
[
  {
    "inputs": [],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "spender",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "allowance",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "needed",
        "type": "uint256"
      }
    ],
    "name": "ERC20InsufficientAllowance",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "sender",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "balance",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "needed",
        "type": "uint256"
      }
    ],
    "name": "ERC20InsufficientBalance",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "approver",
        "type": "address"
      }
    ],
    "name": "ERC20InvalidApprover",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "receiver",
        "type": "address"
      }
    ],
    "name": "ERC20InvalidReceiver",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }
    ],
    "name": "ERC20InvalidSender",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "spender",
        "type": "address"
      }
    ],
    "name": "ERC20InvalidSpender",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "buyer",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "duration",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "string",
        "name": "message",
        "type": "string"
      }
    ],
    "name": "AdSpacePurchased",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "owner",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "spender",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "name": "Approval",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "from",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "name": "Transfer",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "owner",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "spender",
        "type": "address"
      }
    ],
    "name": "allowance",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "spender",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "name": "approve",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "balanceOf",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "decimals",
    "outputs": [
      {
        "internalType": "uint8",
        "name": "",
        "type": "uint8"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "fee",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getCurrentDay",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_timestamp",
        "type": "uint256"
      }
    ],
    "name": "getDayFromTimestamp",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_day",
        "type": "uint256"
      }
    ],
    "name": "getStartTimestampForDay",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "day",
        "type": "uint256"
      }
    ],
    "name": "isRented",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "isRentedNow",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "name",
    "outputs": [
      {
        "internalType": "string",
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "nextAvailableDay",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "duration",
        "type": "uint256"
      }
    ],
    "name": "quote",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "start",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "duration",
        "type": "uint256"
      },
      {
        "internalType": "string",
        "name": "_symbol",
        "type": "string"
      },
      {
        "internalType": "string",
        "name": "message",
        "type": "string"
      }
    ],
    "name": "rentAdSpace",
    "outputs": [],
    "stateMutability": "payable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "duration",
        "type": "uint256"
      },
      {
        "internalType": "string",
        "name": "_symbol",
        "type": "string"
      },
      {
        "internalType": "string",
        "name": "message",
        "type": "string"
      }
    ],
    "name": "rentAdSpaceNow",
    "outputs": [],
    "stateMutability": "payable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "symbol",
    "outputs": [
      {
        "internalType": "string",
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "totalSupply",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "name": "transfer",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "from",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "to",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "name": "transferFrom",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]


Contract Creation Code
608060405264174876e8006006553480156200001a57600080fd5b506040518060400160405280600681526020016520b221b7b4b760d11b8152506040518060400160405280600381526020016241444360e81b8152508160039081620000679190620002d7565b506004620000768282620002d7565b505050620000b0336200008e620000b660201b60201c565b6200009b90600a620004b8565b620000aa90620f4240620004d0565b620000bb565b62000500565b601290565b6001600160a01b038216620000eb5760405163ec442f0560e01b8152600060048201526024015b60405180910390fd5b620000f960008383620000fd565b5050565b6001600160a01b0383166200012c578060026000828254620001209190620004ea565b90915550620001a09050565b6001600160a01b03831660009081526020819052604090205481811015620001815760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401620000e2565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216620001be57600280548290039055620001dd565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200022391815260200190565b60405180910390a3505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200025b57607f821691505b6020821081036200027c57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002d2576000816000526020600020601f850160051c81016020861015620002ad5750805b601f850160051c820191505b81811015620002ce57828155600101620002b9565b5050505b505050565b81516001600160401b03811115620002f357620002f362000230565b6200030b8162000304845462000246565b8462000282565b602080601f8311600181146200034357600084156200032a5750858301515b600019600386901b1c1916600185901b178555620002ce565b600085815260208120601f198616915b82811015620003745788860151825594840194600190910190840162000353565b5085821015620003935787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115620003fa578160001904821115620003de57620003de620003a3565b80851615620003ec57918102915b93841c9390800290620003be565b509250929050565b6000826200041357506001620004b2565b816200042257506000620004b2565b81600181146200043b5760028114620004465762000466565b6001915050620004b2565b60ff8411156200045a576200045a620003a3565b50506001821b620004b2565b5060208310610133831016604e8410600b84101617156200048b575081810a620004b2565b620004978383620003b9565b8060001904821115620004ae57620004ae620003a3565b0290505b92915050565b6000620004c960ff84168362000402565b9392505050565b8082028115828204841417620004b257620004b2620003a3565b80820180821115620004b257620004b2620003a3565b610f2c80620005106000396000f3fe6080604052600436106101145760003560e01c80636b7dabb0116100a0578063a9059cbb11610064578063a9059cbb146102c2578063aa15d40f146102e2578063dd62ed3e14610302578063ddca3f4314610348578063ed1bd76c1461035e57600080fd5b80636b7dabb0146102215780636dec6b851461023757806370a08231146102575780637396af1b1461028d57806395d89b41146102ad57600080fd5b806323b872dd116100e757806323b872dd146101a85780632c8d8d9a146101c8578063313ce567146101dd5780633e6968b6146101f957806369c253ea1461020e57600080fd5b806306fdde0314610119578063095ea7b314610144578063129b2dd71461017457806318160ddd14610189575b600080fd5b34801561012557600080fd5b5061012e61037e565b60405161013b9190610a88565b60405180910390f35b34801561015057600080fd5b5061016461015f366004610af3565b610432565b604051901515815260200161013b565b610187610182366004610b66565b61044c565b005b34801561019557600080fd5b506002545b60405190815260200161013b565b3480156101b457600080fd5b506101646101c3366004610be9565b610462565b3480156101d457600080fd5b50610164610486565b3480156101e957600080fd5b506040516012815260200161013b565b34801561020557600080fd5b5061019a6104a3565b61018761021c366004610c25565b6104b3565b34801561022d57600080fd5b5061019a60075481565b34801561024357600080fd5b5061019a610252366004610c9f565b6104ce565b34801561026357600080fd5b5061019a610272366004610cb8565b6001600160a01b031660009081526020819052604090205490565b34801561029957600080fd5b5061019a6102a8366004610c9f565b6104dd565b3480156102b957600080fd5b5061012e610503565b3480156102ce57600080fd5b506101646102dd366004610af3565b610531565b3480156102ee57600080fd5b506101646102fd366004610c9f565b61053f565b34801561030e57600080fd5b5061019a61031d366004610cd3565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561035457600080fd5b5061019a60065481565b34801561036a57600080fd5b5061019a610379366004610c9f565b61054a565b6060600061038b426104ce565b6000818152600560205260408120600301805492935090916103ac90610d06565b80601f01602080910402602001604051908101604052809291908181526020018280546103d890610d06565b80156104255780601f106103fa57610100808354040283529160200191610425565b820191906000526020600020905b81548152906001019060200180831161040857829003601f168201915b5093979650505050505050565b60003361044081858561055a565b60019150505b92915050565b61045a86868686868661056c565b505050505050565b60003361047085828561075b565b61047b8585856107d9565b506001949350505050565b600080610492426104ce565b905061049d81610838565b91505090565b60006104ae426104ce565b905090565b60006104be426104ce565b905061045a81878787878761056c565b60006104466201518083610d56565b60006104ec600c610e10610d78565b6104f98362015180610d78565b6104469190610d8f565b60606000610510426104ce565b6000818152600560205260408120600201805492935090916103ac90610d06565b6000336104408185856107d9565b600061044682610838565b6000600654826104469190610d78565b6105678383836001610889565b505050565b61057586610838565b156105d25760405162461bcd60e51b815260206004820152602260248201527f4164436f696e3a20616420737061636520697320616c72656164792072656e74604482015261195960f21b60648201526084015b60405180910390fd5b6105db8561054a565b34101561062a5760405162461bcd60e51b815260206004820152601a60248201527f4164436f696e3a20696e73756666696369656e742066756e647300000000000060448201526064016105c9565b60006040518060800160405280888152602001876201518061064c9190610d78565b815260200186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250604080516020601f8701819004810282018101909252858152918101919086908690819084018382808284376000920182905250939094525050898152600560209081526040918290208451815590840151600182015590830151929350839290915060028201906106fc9082610e00565b50606082015160038201906107119082610e00565b50506040513391507f65288b53de46b182183d2f6ccd835b7dfd4dd812febfec21e271e22d12493af89061074a90899087908790610ec0565b60405180910390a250505050505050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146107d357818110156107c457604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064016105c9565b6107d384848484036000610889565b50505050565b6001600160a01b03831661080357604051634b637e8f60e11b8152600060048201526024016105c9565b6001600160a01b03821661082d5760405163ec442f0560e01b8152600060048201526024016105c9565b61056783838361095e565b600080610844426104ce565b6000818152600560205260409020549091508310801590610882575060008181526005602052604090206001810154905461087f9190610d8f565b83105b9392505050565b6001600160a01b0384166108b35760405163e602df0560e01b8152600060048201526024016105c9565b6001600160a01b0383166108dd57604051634a1406b160e11b8152600060048201526024016105c9565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156107d357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161095091815260200190565b60405180910390a350505050565b6001600160a01b03831661098957806002600082825461097e9190610d8f565b909155506109fb9050565b6001600160a01b038316600090815260208190526040902054818110156109dc5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016105c9565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610a1757600280548290039055610a36565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610a7b91815260200190565b60405180910390a3505050565b60006020808352835180602085015260005b81811015610ab657858101830151858201604001528201610a9a565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610aee57600080fd5b919050565b60008060408385031215610b0657600080fd5b610b0f83610ad7565b946020939093013593505050565b60008083601f840112610b2f57600080fd5b50813567ffffffffffffffff811115610b4757600080fd5b602083019150836020828501011115610b5f57600080fd5b9250929050565b60008060008060008060808789031215610b7f57600080fd5b8635955060208701359450604087013567ffffffffffffffff80821115610ba557600080fd5b610bb18a838b01610b1d565b90965094506060890135915080821115610bca57600080fd5b50610bd789828a01610b1d565b979a9699509497509295939492505050565b600080600060608486031215610bfe57600080fd5b610c0784610ad7565b9250610c1560208501610ad7565b9150604084013590509250925092565b600080600080600060608688031215610c3d57600080fd5b85359450602086013567ffffffffffffffff80821115610c5c57600080fd5b610c6889838a01610b1d565b90965094506040880135915080821115610c8157600080fd5b50610c8e88828901610b1d565b969995985093965092949392505050565b600060208284031215610cb157600080fd5b5035919050565b600060208284031215610cca57600080fd5b61088282610ad7565b60008060408385031215610ce657600080fd5b610cef83610ad7565b9150610cfd60208401610ad7565b90509250929050565b600181811c90821680610d1a57607f821691505b602082108103610d3a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082610d7357634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141761044657610446610d40565b8082018082111561044657610446610d40565b634e487b7160e01b600052604160045260246000fd5b601f821115610567576000816000526020600020601f850160051c81016020861015610de15750805b601f850160051c820191505b8181101561045a57828155600101610ded565b815167ffffffffffffffff811115610e1a57610e1a610da2565b610e2e81610e288454610d06565b84610db8565b602080601f831160018114610e635760008415610e4b5750858301515b600019600386901b1c1916600185901b17855561045a565b600085815260208120601f198616915b82811015610e9257888601518255948401946001909101908401610e73565b5085821015610eb05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f191601019291505056fea2646970667358221220fea28bb4a13a44890a4f44e6bd571387c8c55aa19e4b692632f8bc5d2eacdf8e64736f6c63430008180033

Loading