Questions tagged [openzeppelin-contracts]
OpenZeppelin Contracts is a library for secure smart contract development. It provides implementations of standards like ERC20 and ERC721 which you can deploy as-is or extend to suit your needs, as well as Solidity components to build custom contracts and more complex decentralized systems.
323 questions
1 vote
1 answer
52 views
Why does recover different signer address than the token owner in EIP-712 signature verification?
I'm trying to implement a burnWithSig function that verifies an EIP-712 signature off-chain and then replicates the verification on-chain. Here’s my test (using ethers.js) to generate the signature ...
0 votes
0 answers
30 views
i'm creating a forwarder contract that inherits ERC2771ForwarderUpgradeable.sol but while deploying the contract I get the not upgrade safe error
This is the TrustedForwarder.sol, which acts as the forwarder contract for meta transactions. // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts-upgradeable/...
0 votes
1 answer
80 views
Unable to Verify UUPSUpgradeable Proxy Contract on Etherscan
I have created a proxy contract using the UUPSUpgradeable pattern from OpenZeppelin, but I am facing issues verifying the contract on Etherscan. I have followed the usual steps, such as: Deploying the ...
0 votes
1 answer
70 views
Attempting to create a Proxy
I have to create a Proxy, first I created my own then I found out that is better to use TransparentUpgradeableProxy.sol My initial logic implementation. The upgraded implementation. This is the proxy ...
1 vote
1 answer
107 views
What is the correct usage of `initializer` and `onlyInitializing` modifiers in case of multi-level inheritance in upgradeable contracts?
I know there’s a similar question, but it doesn’t address the case of multi-level inheritance. I even commented on the answer, and the original respondent (i.e., Lauri Peltonen) recommended that I ...
0 votes
1 answer
126 views
ERC721Enumerable - Getting all tokens owned by an address using balanceOf(owner) and tokenOfOwnerByIndex(owner, index)
I've been looking for a solution to retrieve all tokens from an address using ERC721Enumerable Openzeppelin extension. Please note that my purpose is not to get ALL tokens owned by an address, but all ...
1 vote
1 answer
34 views
Can I use the OZ Ownable contract with a multisig wallet if I want some functions to require varying voting thresholds?
Some functions like the mint() will require unanimous approval from contract owners, while others will only require simple majority of contract owners. I want to use Safe Wallet or some other ...
0 votes
2 answers
169 views
Trying to override non-virtual function. Did you forget to add "virtual"?
pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract OC is ERC20, Ownable { uint256 ...