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
0 answers

Upgradable smart contracts - a new instance is created

A new instance is created everytime I migrate my upgradable smart contract. I am using openzeppelin upgrade plugins on truffle. I tried what is discussed in …
0
votes
0 answers

Signed token approvals with web3.js: ERC20Permit signature valid but allowance remains 0

My app lets users make a signed token approval to transfer an ERC20Permit token, using web3.js injected. Token contract is canonical from OpenZeppelin. Signature seems to be valid (permit call does not revert) but calling allowance on the token…
Pm Rivière
  • 191
  • 2
  • 13
0
votes
1 answer

How to deploy a UUPS proxy contract using ethers.js?

I have erc721 uups proxy contract with initializer as : function initialize(address owner) public initializer { __ERC721_init("demo", "demo"); __ERC721URIStorage_init(); __Pausable_init(); __AccessControl_init(); …
Mueed
  • 31
  • 5
0
votes
2 answers

What does nonReentrant modifier do for multiple transactions in one block

If nonReentrant modifier is used for transfer function, or mint function, and during periods of high volume of transactions if multiple transactions get submitted in one block, then what does nonReentrant do to subsequent transactions in the same…
Majoris
  • 2,963
  • 6
  • 47
  • 81
0
votes
2 answers

Inheriting multiple ERC721 extensions

I would like to use both ERC721URIStorage for setting token URI easily but I would also like the methods in ERC721Enumberable to fetch the number of tokens made by an address. I get this error when trying to use both : Derived contract must override…
0
votes
1 answer

Unable to create contract clone on Hardhat. "Error: Transaction reverted: function call to a non-contract account"

I'm trying to create a clone using OpenZeppelin Clones library. However, it seems that hardhat is not able to recognize the created clone contracts address. The same code works on Remix, so does this have something to with Hardhat? NOTE: I have…
ethereumboy
  • 101
  • 1
  • 6
0
votes
1 answer

How to correctly test the initialisation of a clone contract on Hardhat? (EIP-1167)

So I have created an 'implementation contract' and a 'clone factory' which creates clones of the implementation contract. I have tested the functionality of the CloneFactory and it works in Remix. However, I am now writing tests for the contract in…
ethereumboy
  • 101
  • 1
  • 6
0
votes
1 answer

openzeppline 'npm i @openzeppline/contracts' error

I am creating a react app, I am facing these errors while I ran. npm i @openzeppline/contracts Errors I am getting, I have tried many solutions but it's not working. @openzeppline/contracts@*' is not in this registry. GET…
stofu
  • 110
  • 2
  • 11
0
votes
1 answer

Ethernaut level 24 - Puzzle Wallet: to which contract the wallet object on the browser console refers to?

I got a little confused when trying to solve this level and I got even more confused when I read this solution. I thought that the contract object loaded in the browser console was the PuzzleWallet contract, because when I look at its ABI, there are…
WestC
  • 11
  • 3
0
votes
1 answer

Require statement reverting transaction everytime

something strange is going on. I'm testing some contracts on remix EVM. I have some pretty basic NFT staking contracts that works fine when comes to staking and transfering the token. However, if I try to execute the unstake function, the…
yieniggu
  • 384
  • 1
  • 7
  • 20
0
votes
1 answer

when trying to withdraw BUSD from a smart contract am gettting Gas Estimate Error - JSON-RPC : 32000

i would like to send BUSD to a smart contract and then only owner can withdraw these BUSD from this smart contract. can someone help me to program the same? i tried below but doesn't think it will work. // SPDX-License-Identifier: MIT pragma…
0
votes
0 answers

Test case for vestingWallet smart contract returning "header not found"

network, I've been trying to finish a unit test for an investing wallet smart contract on Solidity as mentioned above: The idea is to create a test cenarium for a vesting wallet smart contract. // SPDX-License-Identifier: MIT pragma solidity…
0
votes
2 answers

Why is the open zeppelin Safe Math contract not importing?

I am using the following contract from Ethernaut and did sudo npm i @openzeppelin/contracts pragma solidity 0.6.0; import "@openzeppelin/contracts/math/SafeMath.sol"; contract CoinFlip { using SafeMath for uint256; uint256 public…
Emily Kuo
  • 121
  • 1
  • 5
0
votes
1 answer

Trying to RUN "npx hardhat compile" and getting openzeppellin error

When i run npx hardhat compile I get Solidity ^0.8.9; is not fully supported yet. You can still use Hardhat, but some features, like stack traces, might not work correctly. Learn more at https://hardhat.org/reference/solidity-support Error…
Ítalo Maciel
  • 39
  • 1
  • 1
  • 6
0
votes
1 answer

Unable to require ERC-20 tokens in a Solidity function

I have a basic ERC-20 Token defined as import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract Token is ERC20 { constructor() ERC20("Token", "TOKEN") {} function mint(address account, uint256 amount) public { …
Joshua Ohana
  • 5,613
  • 12
  • 56
  • 112