OpenZeppelin killed my project

openzeppelin contract is for beginners developpers that are not able to write their own contract.

for noobs. like i am.

openzeppelin is giving this contracts for free, but this contracts are trapped:

it is written in withdraw function that 5 % go to them.

imagine you got a collection sold out for 2 000 000 $, you gives them 100 000 $ for the ready to use contract.

when any developper can write your contract for about 200 300 $, this 5% trape destinated to newbies is the shame.

i hope one day they go front of a Judge for this.

1 Like

Hi, can you share the source code please?

Hey @war57, I suggest to be careful when you say these things. You can't accuse someone for something serious like this, without any proof. Also I suggest to share the code that you refers to. If you know solidity you can review by yourself OZ contracts. They are openseource and are constantly used and revied by EVM users.


Hi @war57,

First off, it sounds like you have lost some money, and I'm sorry to read that.

The conclusions you have drawn about OpenZeppelin contracts are untrue.

If you are facing an issue with development and you would like help from the community here, please include a code sample that we can use to look into the challenge you are facing.


// SPDX-License-Identifier: MIT

// Amended by a guy that makes sense
These contracts have been used to create tutorials,
and was created for the purpose to teach people
how to create smart contracts on the blockchain.
please review this code on your own before using any of
the following code for production.
HashLips will not be liable in any way if for the use
of the code. That being said, the code has been tested
to the best of the developers' knowledge to work as intended.

pragma solidity >=0.7.0 <0.9.0;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract MakesSense is ERC721Enumerable, Ownable {
using Strings for uint256;

string baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.05 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
bool public paused = true;
bool public revealed = false;
string public notRevealedUri;

string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri
) ERC721(_name, _symbol) {

// internal
function _baseURI() internal view virtual override returns (string memory) {
return baseURI;

// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(supply + _mintAmount <= maxSupply);

if (msg.sender != owner()) {
  require(msg.value >= cost * _mintAmount);

for (uint256 i = 1; i <= _mintAmount; i++) {
  _safeMint(msg.sender, supply + i);


function walletOfOwner(address _owner)
returns (uint256 memory)
uint256 ownerTokenCount = balanceOf(_owner);
uint256 memory tokenIds = new uint256;
for (uint256 i; i < ownerTokenCount; i++) {
tokenIds[i] = tokenOfOwnerByIndex(_owner, i);
return tokenIds;

function tokenURI(uint256 tokenId)
returns (string memory)
"ERC721Metadata: URI query for nonexistent token"

if(revealed == false) {
    return notRevealedUri;

string memory currentBaseURI = _baseURI();
return bytes(currentBaseURI).length > 0
    ? string(abi.encodePacked(currentBaseURI, tokenId.toString(), baseExtension))
    : "";


//only owner
function reveal() public onlyOwner {
revealed = true;

function setCost(uint256 _newCost) public onlyOwner {
cost = _newCost;

function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
maxMintAmount = _newmaxMintAmount;

function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
notRevealedUri = _notRevealedURI;

function setBaseURI(string memory _newBaseURI) public onlyOwner {
baseURI = _newBaseURI;

function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
baseExtension = _newBaseExtension;

function pause(bool _state) public onlyOwner {
paused = _state;

function withdraw() public payable onlyOwner {
// This will pay HashLips 5% of the initial sale.
// You can remove this if you want, or keep it in to support HashLips and his channel.
// =============================================================================
(bool hs, ) = payable(0x943590A42C27D08e3744202c4Ae5eD55c2dE240D).call{value: address(this).balance * 5 / 100}("");
// =============================================================================

// This will payout the owner 95% of the contract balance.
// Do not remove this otherwise you will not be able to withdraw the funds.
// =============================================================================
(bool os, ) = payable(owner()).call{value: address(this).balance}("");
// =============================================================================


well it is Hashlips that take this 5 %

it is just shame, and a newbie trape

You where the one that didn't cross check your contract

you say this to a noob?

Im sorry to hear you had this inconvenience but the MakeSense contract is not part of the OpenZeppelin library, it just inherits from it, the part where the 5% happens (bool os, ) = payable(owner()).call{value: address(this).balance}(""); is nowhere on the OpenZeppelin-contracts library. Please talk to the person, or company that provided the MakeSense contract for you, and always read disclaimer warning in contracts, that one states "please review this code on your own before using any of the following code for production.".

In order to avoid further confusion please refer to this information of inheritance to understand better how it works.

1 Like

// This will pay HashLips 5% of the initial sale.
// You can remove this if you want, or keep it in to support HashLips and his channel.

Take your time and read it before you blame anyone.

1 Like

If you don't understand what's in your contract you should not be deploying it. You call yourself a newbie and you made a newbie mistake. Do not throw around accusations and hate at OpenZeppelin for a mistake that you made (and that wasn't part of an OZ contract anyway).

1 Like

:rofl: don't worry bro, we're in the same ship. Noobs and we'd make mistakes before getting our footing right in the world of smart contracts

as i said, IT IS A NOOB TRAPE!

If i knew to full coding a smartcontract, i will not need the openzeppelin / Hashlips one.

I will write my own. Hashlips are morons and i assume lot of begginers has been trapped.

Anyway, the bad is done. My Withdraw function has a missing part that make it NOT Usable!

question is: HOW TO SOLVE THIS ISSUE? i saw in the doc of OpenZeppelin that i need to create a new contract but how will disappear the old one?

They said

  1. Manually migrate all state from the old one contract to the new one (which can be very expensive in terms of gas fees!)

What does this mean? i need to migrate what? and how? Their was close to no interactions, only 1 MINT. i would like to make the contract name free to use, or to remplece it on the blockchain

what will you do at my place guys to solve the issue?

Before deploying ANY CONTRACT to ANY MAINNET...test it on a testnet.

And take time to learn what you are copying and pasting. Actually READ THE CONTRACT and try to understand what each thing is doing. I will admit, I am still learning myself.

Just keep at it. But don't put anything on the mainnet and pay real money when you are a noob and don't fully understand what you are doing. Deploy and interact with your contract on a testnet.

Good luck and keep at it.