Questions tagged [openzeppelin]

OpenZeppelin provides tools to write, deploy and operate decentralized applications. It also protects leading organizations by performing security audits on their systems and products.

OpenZeppelin provides tools to write, deploy and operate decentralized applications.

It also protects leading organizations by performing security audits on their systems and products.

237 questions
0
votes
1 answer

Issue Verifying Implementation Smart Contract (from upgradeable) on etherscan

I am trying to verify an implementation smart contract, however I get the following error(s), it was deployed using hardhat deployProxy, all 3 contracts are deployed and working fine. What I've done: After deploying, I copy-paste the .sol file to…
0
votes
1 answer

Should this smart contract function be marked nonReentrant?

Should this function be marked as nonReentrant or is it overkill? function sendEthToTokenOwner(uint256 _tokenId) external payable nonReentrant { address _tokenOwner = ownerOf(_tokenId); require(msg.sender != _tokenOwner, "Sender…
jwarshack
  • 89
  • 1
  • 5
0
votes
1 answer

How to modify PaymentSplitter.sol to autopay?

I've done little tests with the paymentSplitter code from OpenZeppelin and I don't seem to find a proper way to make it pay automatically. Gotta say that I'm a rookie at this and probably theres a stupid thing I'm missing The PaymentSplitter…
0
votes
2 answers

When using Remix Ethereum get Error types/value length mismatch (previously run was ok.)

creation of meatFarm errored: Error encoding arguments: Error: types/values length mismatch (count={"types":2,"values":4},…
longtech
  • 93
  • 1
  • 9
0
votes
1 answer

Can't inherit contract from other one correctly

I have a ERC-721 smart contract defined like this contract MintNFT is ERC721Enumerable, Ownable { constructor(string _name, string _symbol) ERC721(_name, _symbol){} } in which I mint the NFTs and few more functions. Then I have created a new…
brt88
  • 37
  • 6
0
votes
1 answer

Brownie compile ValueError: Invalid NPM block with OpenZeppelin

*****top lines of my .sol file // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract ParcelAsset is ERC721 { ******command line VScode brownie compile contracts\ParcelAsset.sol I…
0
votes
2 answers

Testing contracts using time from OpenZepplin library: Error: Invalid JSON RPC response: ""

I increase time the same way as described in OpenZepplin samples in the test below: it("should revert claim drawing with 'Android: bad state'", async () => { const [owner, signer1] = await ethers.getSigners(); let duration =…
invisiblecat
  • 125
  • 1
  • 10
0
votes
1 answer

Why does this import statement syntax work for me when the syntax in the Open Zeppelin documentation does not?

import "@openzeppelin/contracts/access/Ownable.sol"; DOES NOT WORK (but is what the documentation shows and the course I'm taking shows) import "OpenZeppelin/openzeppelin-contracts@3.4.0/contracts/access/Ownable.sol"; WORKS (I found from another SO…
user12457151
  • 853
  • 2
  • 12
  • 25
0
votes
1 answer

Solidity Smart Contracts redundant inheritance

I'm reviewing OpenZeppelin's smart contracts and in many cases I find that there tends to be a redundant or duplicate inheritance. contract ERC20 is IERC20, IERC20Metadata {} interface IERC20 {} interface IERC20Metadata is IERC20 {} In this…
0
votes
1 answer

Reason provided by the contract: "ERC20: transfer amount exceeds allowance"

I'm new to solidity and I wanted to develop a subscription contract where a user can subscribe to a merchants plan and pay. But I'm unable to subscribe function and transfer the token to merchant. I'm using open zeppelin ERC20 standard token to…
Chirag Gupta
  • 469
  • 1
  • 7
  • 16
0
votes
2 answers

Interacting with a publicly deployed upgradable openzeppelin smart contract

I have deployed a smart contract to a public network like binance smart chain network that is viewable on a blockchain explorer like bscscan. The deployed smart contract was developed with Openzeppelin upgrades plugin to be upgradable. Once…
goonerify
  • 1,668
  • 25
  • 27
0
votes
1 answer

Using Strings for uint256 not working with ERC721EnumerableUpgradeable

just like the title says I cannot get using Strings to compile, I keep getting the identifier not found. This is the start of my .sol contract import…
ThomasDEV
  • 75
  • 7
0
votes
1 answer

DeclarationError: undefined Identifier - solidity

I am getting this very strange error message --DeclarationError:undefined identifier. And it's giving this in all of my Functions, I don't know why. Can anyone please tell me what's is going on ? I am using Ethereum, Solidity and Openzepellinn to do…
calibre24
  • 359
  • 1
  • 3
  • 7
0
votes
0 answers

Can’t withdrawal ERC-20 tokens from faucet contract

I recently published an ERC-20 token on mainnet and all is working well. Now I am attempting to write a Faucet smart contract in order to distribute coins to whoever asks for them. Note that this wouldn't be a faucet that mints new tokens directly…
jspru
  • 1,060
  • 1
  • 9
  • 17
0
votes
1 answer

Figuring out addresses in an ERC20 contract

I'm writing an ERC20 contract that would allow another ERC20 to be able to work with my contract, and am unsure how to get a specific address in the scenario given below. Say my contract is CoinA, and someone else's contract is PartnerCoin. I'm…