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
1
vote
1 answer

User -> proxy -> proxies -> smart contract

I'm writing smart contract for Ethereum using Solidity and OpenZeppelin. I wish to implement this kind of situation this kind of situation Where I deploy a proxy for each user and the proxy uses the same smart contract with the storage of the…
Doe
  • 93
  • 5
1
vote
0 answers

How to generate java wrapper for solidity contract with openzeppelin imports

Suddenly I discovered web3j provides an option to auto-generate the Java contract from solidity contract. Sample case you can find here. Unfortunately it does not recognize the import of openzeppelin contracts: Error: Source…
Joe Dow
  • 583
  • 1
  • 3
  • 12
1
vote
0 answers

ERC2981 NFT Royalties Implementation in a ERC721 Marketplace

I've read already many posts regarding this topic, but I just can't wrap my head around this Royalty implementation thing. Pls help me out, I don't know how I should play with this thing. what is feeNumerator? _setDefaultRoyalty(address receiver,…
DevABDee
  • 180
  • 9
1
vote
2 answers

Optimiser settings in truffle config is not working while migrating open-zeppelin proxy using deployProxy

I have added the compiler options in truffle-config.js - compilers: { solc: { version: "0.8.16", settings: { optimizer: { enabled: false, runs: 200 } } } } I am deploying an upgradable…
1
vote
1 answer

What does a single underscore-command do in a modifier in solidity?

I would like to understand a part of the Ownable() contract of the OpenZeppelin Solidity library: modifier onlyOwner() { require(isOwner()); _; } The last line of this modifier consists only of an underscore. Can anybody please explain to me…
1
vote
1 answer

SyntaxError: Unexpected token '?' in upgrading smart contract using @openzeppelin/hardhat-upgrades

I am trying to deploy an upgradable smart contract on polygon Mumbai tesnet. I am getting this error smart-contract/node_modules/@openzeppelin/hardhat-upgrades/dist/index.js:108 compiler.settings ?? (compiler.settings = {}); …
1
vote
1 answer

How to compile OpenZeppelin contracts using solc from command line?

Originally posted to OpenZeppelin forums, figured I'd post this here in case someone runs into this down the road and needs a little help. Need the ABI and BIN for Rust web3 library (ick, I know). So far I've been using solc --bin…
reeslabree
  • 127
  • 13
1
vote
0 answers

tokenOfOwnerByIndex gives an error "Internal JSON-RPC error."

I am trying to get the NFT token id holding by the wallet address and code is compiled and deployed successfully but while calling the walletOfOwner function gives me the error below call to TestNFT.walletOfOwner errored: Internal JSON-RPC…
PKS
  • 11
  • 2
1
vote
1 answer

how to override openzeppelin _countVote function in GovernorCountingSimple.sol file?

I am making a DAO using openzeppelin and I downloaded the governance contract that they provide from the openzeppelin contract wizard. once I had imported this file into remix IDE an error popped up saying "Function has to override specified but…
TheGarry243
  • 63
  • 1
  • 7
1
vote
1 answer

Can't import openzeppelin library into smart contract in brownie framework

I can't import openzeppelin's ERC721 contract. I have installed it using brownie pm install and also added it to brownie-config.yaml I appreciate any help Test.sol brownie-config.sol
1
vote
3 answers

Error: VM Exception while processing transaction: reverted with reason string 'ERC721: transfer caller is not owner nor approved'

i try to write NFT marketplace and i have problem with reselling items from user that buy item from owner and new, third user. I use next.js + openzeppelin + hardhat + infura and metamask. Creating and buying NFT is successful, all params on…
Ilya
  • 11
  • 1
  • 2
1
vote
1 answer

Trying to run a Brownie Dapp in Docker

I'm trying to run my brownie dapp in a docker container, but i always have the same error and can't seem to fix it: FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/username/.brownie/packages/OpenZeppelin/openzeppelin-> >…
1
vote
1 answer

deploy erc721 contracts from a simple or factory contract

I want to deploy erc721 contracts from a simple factory contract and i have this error when I try to upload NFT - "transfer to non ERC721Receiver implementer", "data"enter image description here // SPDX-License-Identifier: MIT pragma solidity…
1
vote
0 answers

How do I enable 2/3 multisigs to approve the transaction before the admin cal call the withdraw method?

I have a function called withdraw in my code. I am using OpenZeppelin access control to limit access to approved managers. However for security reasons, I want two or more other admins to approve that transaction before the ether is sent to the…
1
vote
1 answer

Solidity constructor syntax

Looking through an OpenZeppelin tutorial, I came across this code snippet: pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract GameItem { constructor() ERC721("GameItem", "ITM") {} What is the syntax in…
David Stevens
  • 835
  • 1
  • 6
  • 15