Address Details
contract

0xEA7945C69172bC9cF46F4B51B06762De767A6Ec1

Contract Name
VIP
Creator
0xd40d50–b31c8c at 0x665550–8ad2df
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
9175021
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
VIP




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




Optimization runs
200
EVM Version
istanbul




Verified at
2021-10-05T17:24:34.069295Z

Contract source code

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

contract VIP {
  mapping(address => bool) public invited;

  event Invited(address indexed guest, address indexed by);
  
  constructor() {
    invited[msg.sender] = true;
  }

  function invite(address _guest) external {
    require(invited[msg.sender], "Uninvited guest inviting another uninvited guest");
    invited[_guest] = true;
    emit Invited(_guest, msg.sender);
  }

  function batchInvite(address[] memory _guests) external {
    require(invited[msg.sender], "Uninvited guest inviting another uninvited guest");
    uint256 length = _guests.length;
    for (uint i = 0; i < length; i++) {
      address guest = _guests[i];
      invited[guest] = true;
      emit Invited(guest, msg.sender);
    }
  }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"Invited","inputs":[{"type":"address","name":"guest","internalType":"address","indexed":true},{"type":"address","name":"by","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"batchInvite","inputs":[{"type":"address[]","name":"_guests","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"invite","inputs":[{"type":"address","name":"_guest","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"invited","inputs":[{"type":"address","name":"","internalType":"address"}]}]
              

Contract Creation Code

0x608060405234801561001057600080fd5b50336000908152602081905260409020805460ff191660011790556103c38061003a6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806303f82419146100465780634b77c4681461005b578063f0cd59451461006e575b600080fd5b610059610054366004610239565b6100a5565b005b610059610069366004610218565b61017f565b61009161007c366004610218565b60006020819052908152604090205460ff1681565b604051901515815260200160405180910390f35b3360009081526020819052604090205460ff166100dd5760405162461bcd60e51b81526004016100d490610300565b60405180910390fd5b805160005b8181101561017a57600083828151811061010c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b0381166000818152928390526040808420805460ff1916600117905551919350339290917fb6ad88daba4879d21bbe1e42915abf3399a739fc317bca8fe6f8c4b6b9b58e6d9190a3508061017281610350565b9150506100e2565b505050565b3360009081526020819052604090205460ff166101ae5760405162461bcd60e51b81526004016100d490610300565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055513392917fb6ad88daba4879d21bbe1e42915abf3399a739fc317bca8fe6f8c4b6b9b58e6d91a350565b80356001600160a01b038116811461021357600080fd5b919050565b600060208284031215610229578081fd5b610232826101fc565b9392505050565b6000602080838503121561024b578182fd5b823567ffffffffffffffff80821115610262578384fd5b818501915085601f830112610275578384fd5b81358181111561028757610287610377565b8060051b604051601f19603f830116810181811085821117156102ac576102ac610377565b604052828152858101935084860182860187018a10156102ca578788fd5b8795505b838610156102f3576102df816101fc565b8552600195909501949386019386016102ce565b5098975050505050505050565b60208082526030908201527f556e696e766974656420677565737420696e766974696e6720616e6f7468657260408201526f081d5b9a5b9d9a5d19590819dd595cdd60821b606082015260800190565b600060001982141561037057634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fdfea26469706673582212208149a526af857ac75fe4596baa672e0f201bd88b39047dc84e099f432f70575364736f6c63430008030033

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c806303f82419146100465780634b77c4681461005b578063f0cd59451461006e575b600080fd5b610059610054366004610239565b6100a5565b005b610059610069366004610218565b61017f565b61009161007c366004610218565b60006020819052908152604090205460ff1681565b604051901515815260200160405180910390f35b3360009081526020819052604090205460ff166100dd5760405162461bcd60e51b81526004016100d490610300565b60405180910390fd5b805160005b8181101561017a57600083828151811061010c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b0381166000818152928390526040808420805460ff1916600117905551919350339290917fb6ad88daba4879d21bbe1e42915abf3399a739fc317bca8fe6f8c4b6b9b58e6d9190a3508061017281610350565b9150506100e2565b505050565b3360009081526020819052604090205460ff166101ae5760405162461bcd60e51b81526004016100d490610300565b6001600160a01b038116600081815260208190526040808220805460ff19166001179055513392917fb6ad88daba4879d21bbe1e42915abf3399a739fc317bca8fe6f8c4b6b9b58e6d91a350565b80356001600160a01b038116811461021357600080fd5b919050565b600060208284031215610229578081fd5b610232826101fc565b9392505050565b6000602080838503121561024b578182fd5b823567ffffffffffffffff80821115610262578384fd5b818501915085601f830112610275578384fd5b81358181111561028757610287610377565b8060051b604051601f19603f830116810181811085821117156102ac576102ac610377565b604052828152858101935084860182860187018a10156102ca578788fd5b8795505b838610156102f3576102df816101fc565b8552600195909501949386019386016102ce565b5098975050505050505050565b60208082526030908201527f556e696e766974656420677565737420696e766974696e6720616e6f7468657260408201526f081d5b9a5b9d9a5d19590819dd595cdd60821b606082015260800190565b600060001982141561037057634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fdfea26469706673582212208149a526af857ac75fe4596baa672e0f201bd88b39047dc84e099f432f70575364736f6c63430008030033