Verified contractPartialUNLISENCED
Minter
Address0xd6972184fa1d1990fafe88070e7ec8809372b73d
- Balance
0 ETH
- Transactions
144
- Compiler
solc 0.8.13
- Same code
Only this contract
Details
- Compiler
- solc 0.8.13+commit.abaa5c0e
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- london
- License
- UNLISENCED
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 16,797,600
- Creation transaction
- 0xbf5a1b7837…9dc634ac48
Minter.sol
// SPDX-License-Identifier: UNLISENCED
/**
* @title NTP Collabs
* @author 0xSumo
*/
pragma solidity ^0.8.0;
abstract contract OwnControll {
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
address public owner;
mapping(address => bool) public admin;
constructor() { owner = msg.sender; }
modifier onlyOwner { require(owner == msg.sender, "Not Owner");_; }
modifier onlyAdmin { require(admin[msg.sender], "Not Admin"); _; }
function setAdmin(address address_, bool bool_) external onlyOwner { admin[address_] = bool_; }
function transferOwnership(address new_) external onlyOwner { address _old = owner; owner = new_; emit OwnershipTransferred(_old, new_); }
}
interface iToken { function mintToken(address to, uint256 id, uint256 amount, bytes memory data) external; }
contract Minter is OwnControll {
iToken public Token = iToken(0x68607266e9118B971901239891e6280a8066fCEb);
uint256 public numberOfToken;
uint256 constant public mintPrice = 0.015 ether;
mapping(address => uint256) private minted;
modifier onlySender() { require(msg.sender == tx.origin, "No smart contract");_; }
bool public active;
function setActive() public onlyOwner { active = !active; }
function mintMany(bytes memory data) external payable onlySender {
require(minted[msg.sender] == 0, "Exceed max per addy and tx");
require(msg.value == mintPrice, "Value sent is not correct");
require(active, "Inactive");
require(numberOfToken < 100, "Exceed max token");
numberOfToken++;
minted[msg.sender]++;
Token.mintToken(msg.sender, 5, 1, data);
}
function withdraw() public onlyAdmin {
uint balance = address(this).balance;
payable(msg.sender).transfer(balance);
}
}Compiler settingsShow
{
"metadata": {
"bytecodeHash": "ipfs"
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "london",
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.