# \#design

**URL:** https://forum.openzeppelin.com/tag/design/6.md

[Latest](https://forum.openzeppelin.com/latest.md) · [Categories](https://forum.openzeppelin.com/categories.md) · [Tags](https://forum.openzeppelin.com/tags.md)

---

## [Introduction to the Diamond Standard, EIP-2535 Diamonds](https://forum.openzeppelin.com/t/introduction-to-the-diamond-standard-eip-2535-diamonds/12505)

<div class="topic-metadata">

**Author:** [@Nick\_Mudge](https://forum.openzeppelin.com/u/Nick_Mudge)\
**Replies:** 12\
**Last updated:** [October 11, 2025, 11:40am UTC](https://forum.openzeppelin.com/t/introduction-to-the-diamond-standard-eip-2535-diamonds/12505 "2025-10-11T11:40:06Z")

</div>

---

## [Is it possible to force a user who has 100 tokens to have the voting power of 50 tokens in Oppenzeppelin Governor](https://forum.openzeppelin.com/t/is-it-possible-to-force-a-user-who-has-100-tokens-to-have-the-voting-power-of-50-tokens-in-oppenzeppelin-governor/38399)

<div class="topic-metadata">

**Author:** [@cuhoangngoc](https://forum.openzeppelin.com/u/cuhoangngoc)\
**Replies:** 2\
**Last updated:** [November 9, 2023, 3:42pm UTC](https://forum.openzeppelin.com/t/is-it-possible-to-force-a-user-who-has-100-tokens-to-have-the-voting-power-of-50-tokens-in-oppenzeppelin-governor/38399 "2023-11-09T15:42:45Z")

</div>

Hi community, I am building a Token-based DAO using Openzeppelin Governor and I want to force a user who has 100 tokens to have the voting power of 50 tokens in certain proposal scenarios. Is it possible to customize O…

---

## [Simple Burnable Token Incompatible with (Uni|Pancake)Swap](https://forum.openzeppelin.com/t/simple-burnable-token-incompatible-with-uni-pancake-swap/8465)

<div class="topic-metadata">

**Author:** [@aress31](https://forum.openzeppelin.com/u/aress31)\
**Replies:** 2\
**Last updated:** [September 8, 2023, 10:14am UTC](https://forum.openzeppelin.com/t/simple-burnable-token-incompatible-with-uni-pancake-swap/8465 "2023-09-08T10:14:27Z")

</div>

I am experiencing a recurring bug when extending Openzepplin ERC20 contracts. This issue is that my ERC20 tokens are not “tradeable”. AMM DEX platform such as UniSwap or PancakeSwap allow privileged users only to trade. …

---

## [How to find a function's body in the bytecode of a contract?](https://forum.openzeppelin.com/t/how-to-find-a-functions-body-in-the-bytecode-of-a-contract/7380)

<div class="topic-metadata">

**Author:** [@Dyno](https://forum.openzeppelin.com/u/Dyno)\
**Replies:** 5\
**Last updated:** [September 1, 2023, 12:52pm UTC](https://forum.openzeppelin.com/t/how-to-find-a-functions-body-in-the-bytecode-of-a-contract/7380 "2023-09-01T12:52:04Z")

</div>

Hi all, I’m trying to figure out how to dynamically look-up a function’s body in the bytecode of a compiled contract. The basis of my project is a helpful tool for users and the community to use where they input a token…

---

## [Improve Contract Importability/Create modular SDKs for smaller and optimized contracts](https://forum.openzeppelin.com/t/improve-contract-importability-create-modular-sdks-for-smaller-and-optimized-contracts/34581)

<div class="topic-metadata">

**Author:** [@sambacha](https://forum.openzeppelin.com/u/sambacha)\
**Replies:** 2\
**Last updated:** [February 7, 2023, 3:43pm UTC](https://forum.openzeppelin.com/t/improve-contract-importability-create-modular-sdks-for-smaller-and-optimized-contracts/34581 "2023-02-07T15:43:31Z")

</div>

Gas and Size savings: Offer a OpenZeppelin Lite distro SDK to the mainline SDK offering I was looking at including OZ ECDSA contracts for a project, and comparing the releases saw a sizable difference in compiled output. …

---

## [ERC721 Development: Should you write metadata for tokens before or after minting?](https://forum.openzeppelin.com/t/erc721-development-should-you-write-metadata-for-tokens-before-or-after-minting/14111)

<div class="topic-metadata">

**Author:** [@IttaiSvidler](https://forum.openzeppelin.com/u/IttaiSvidler)\
**Replies:** 12\
**Last updated:** [November 1, 2021, 5:03am UTC](https://forum.openzeppelin.com/t/erc721-development-should-you-write-metadata-for-tokens-before-or-after-minting/14111 "2021-11-01T05:03:37Z")

</div>

If you're building an ERC721 collectible series, should you write metadata (to IPFS for off-chain metadata, and directly to the contract for on-chain metadata) before a user mints a token, or should you write the metadat…

---

## [Implementation ERC20 Permit (EIP 2612) compatible with EIP 1271](https://forum.openzeppelin.com/t/implementation-erc20-permit-eip-2612-compatible-with-eip-1271/8830)

<div class="topic-metadata">

**Author:** [@alfredolopez80](https://forum.openzeppelin.com/u/alfredolopez80)\
**Replies:** 4\
**Last updated:** [June 3, 2021, 11:33pm UTC](https://forum.openzeppelin.com/t/implementation-erc20-permit-eip-2612-compatible-with-eip-1271/8830 "2021-06-03T23:33:33Z")

</div>

Implementation ERC20 Permit (EIP 2612) compatible with EIP 1271 The best way to implement the new Utils Library of SignatureChecker and the integration with ERC20 Permit, and guarantee compatibility with Smart Contract …

---

## [Signature Verification](https://forum.openzeppelin.com/t/signature-verification/31720)

<div class="topic-metadata">

**Author:** [@saif](https://forum.openzeppelin.com/u/saif)\
**Replies:** 3\
**Last updated:** [September 8, 2022, 3:19pm UTC](https://forum.openzeppelin.com/t/signature-verification/31720 "2022-09-08T15:19:45Z")

</div>

Hello Everyone' I am facing problem in verifying of Struct OrderComponents i get the hash and signature but i can't verify with ECDSA This is my Solidity code function verifyOwnerSignature(bytes32 hash, bytes memory…

---

## [Developer wanted for smart contract with frontend $2800](https://forum.openzeppelin.com/t/developer-wanted-for-smart-contract-with-frontend-2800/31182)

<div class="topic-metadata">

**Author:** [@Persianknight](https://forum.openzeppelin.com/u/Persianknight)\
**Replies:** 7\
**Last updated:** [August 19, 2022, 9:12am UTC](https://forum.openzeppelin.com/t/developer-wanted-for-smart-contract-with-frontend-2800/31182 "2022-08-19T09:12:05Z")

</div>

Hi i am looking for a developer who can help me developer a website budget $2800 before i send the requirements please send me a private message with website links to projects you have created "if you write down what ar…

---

## [BSC-Testnet Contract address verification always fails: Error! Unable to generate Contract ByteCode and ABI](https://forum.openzeppelin.com/t/bsc-testnet-contract-address-verification-always-fails-error-unable-to-generate-contract-bytecode-and-abi/23460)

<div class="topic-metadata">

**Author:** [@Ealcober](https://forum.openzeppelin.com/u/Ealcober)\
**Replies:** 3\
**Last updated:** [July 19, 2022, 2:54pm UTC](https://forum.openzeppelin.com/t/bsc-testnet-contract-address-verification-always-fails-error-unable-to-generate-contract-bytecode-and-abi/23460 "2022-07-19T14:54:40Z")

</div>

I've been struggling with this with different methods. As the most straightforward, I tried manually-flattening the code in REMIX, and verifying it on bscscan. Compiler version OK, Runs for optimization 200 OK, Optimizat…

---

## [Question about the design of ERC20 transferFrom function](https://forum.openzeppelin.com/t/question-about-the-design-of-erc20-transferfrom-function/29414)

<div class="topic-metadata">

**Author:** [@greentriangles1](https://forum.openzeppelin.com/u/greentriangles1)\
**Replies:** 5\
**Last updated:** [June 8, 2022, 9:31pm UTC](https://forum.openzeppelin.com/t/question-about-the-design-of-erc20-transferfrom-function/29414 "2022-06-08T21:31:18Z")

</div>

In the OpenZeppelin ERC20 contract, the code is written in such a way that user must manually approve spenders to spend their tokens on the user's behalf. This allowance is then checked when a transfer is made: fun…

---

## [Contract "NFTMarket" should be marked as abstract (when implementing IERC721Receiver interface along with ReentrancyGuard)](https://forum.openzeppelin.com/t/contract-nftmarket-should-be-marked-as-abstract-when-implementing-ierc721receiver-interface-along-with-reentrancyguard/27244)

<div class="topic-metadata">

**Author:** [@elvismdev](https://forum.openzeppelin.com/u/elvismdev)\
**Replies:** 2\
**Last updated:** [April 6, 2022, 4:44pm UTC](https://forum.openzeppelin.com/t/contract-nftmarket-should-be-marked-as-abstract-when-implementing-ierc721receiver-interface-along-with-reentrancyguard/27244 "2022-04-06T16:44:28Z")

</div>

Currently I have a working smart contract that only implements ReentrancyGuard. Here below an snippet of this code for major reference about what works: // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "…

---

## [Using libraries in Solidity to save on Bytecode size](https://forum.openzeppelin.com/t/using-libraries-in-solidity-to-save-on-bytecode-size/4997)

<div class="topic-metadata">

**Author:** [@miguelmtzinf](https://forum.openzeppelin.com/u/miguelmtzinf)\
**Replies:** 5\
**Last updated:** [May 9, 2022, 6:33pm UTC](https://forum.openzeppelin.com/t/using-libraries-in-solidity-to-save-on-bytecode-size/4997 "2022-05-09T18:33:14Z")

</div>

I am trying to prove that using libraries can save contract bytecode. In this way, I am comparing bytecode using a library (with internal modifiers) and a library (with external modifiers). The thing is that the latter w…

---

## [Looking to Create an NFT staking Dapp but based on Rarity](https://forum.openzeppelin.com/t/looking-to-create-an-nft-staking-dapp-but-based-on-rarity/23434)

<div class="topic-metadata">

**Author:** [@Charles](https://forum.openzeppelin.com/u/Charles)\
**Replies:** 2\
**Last updated:** [April 30, 2022, 3:01am UTC](https://forum.openzeppelin.com/t/looking-to-create-an-nft-staking-dapp-but-based-on-rarity/23434 "2022-04-30T03:01:45Z")

</div>

Looking to Create an NFT staking Dapp but I want each nft should be rewarded based on rarity. Like trait distribution-based equation that determines the rarity of the NFT. What to build/designed the first-ever non-fung…

---

## [Contract factory for upgradeable erc721](https://forum.openzeppelin.com/t/contract-factory-for-upgradeable-erc721/11153)

<div class="topic-metadata">

**Author:** [@Lorenzo\_Melendez](https://forum.openzeppelin.com/u/Lorenzo_Melendez)\
**Replies:** 13\
**Last updated:** [April 28, 2022, 6:16pm UTC](https://forum.openzeppelin.com/t/contract-factory-for-upgradeable-erc721/11153 "2022-04-28T18:16:04Z")

</div>

I am trying to find some way for users to deploy an erc721 contract and would like to clone an implementation contract through a contract factory like eip-1167. However when the contract factory deploys a new contract, t…

---

## [ERC1155, ERC721 or ERC20?](https://forum.openzeppelin.com/t/erc1155-erc721-or-erc20/23276)

<div class="topic-metadata">

**Author:** [@Julez95](https://forum.openzeppelin.com/u/Julez95)\
**Replies:** 3\
**Last updated:** [March 1, 2022, 12:23am UTC](https://forum.openzeppelin.com/t/erc1155-erc721-or-erc20/23276 "2022-03-01T00:23:41Z")

</div>

Hello, Just wanted to run a concept by everyone and see if it is viable/if any developers would be interested in helping out. For this project we have two tokens: a game “card” (NFT) and a reward “token” (Fungible). How…

---

## [Making sure I understand how SafeERC20 works](https://forum.openzeppelin.com/t/making-sure-i-understand-how-safeerc20-works/2940)

<div class="topic-metadata">

**Author:** [@PaulRBerg](https://forum.openzeppelin.com/u/PaulRBerg)\
**Replies:** 6\
**Last updated:** [July 15, 2021, 7:18am UTC](https://forum.openzeppelin.com/t/making-sure-i-understand-how-safeerc20-works/2940 "2021-07-15T07:18:23Z")

</div>

:computer: Environment @openzeppelin/contracts@3.0.1 :memo:Details This post is about best practices on how to handle the missing return value bug, a well-known vulnerability that exists in hundreds of ERC20 token…

---

## [How to implement whitelist to the OpenZeppelin solidity v2.1.1](https://forum.openzeppelin.com/t/how-to-implement-whitelist-to-the-openzeppelin-solidity-v2-1-1/214)

<div class="topic-metadata">

**Author:** [@Thirupathi](https://forum.openzeppelin.com/u/Thirupathi)\
**Replies:** 2\
**Last updated:** [January 27, 2022, 2:19pm UTC](https://forum.openzeppelin.com/t/how-to-implement-whitelist-to-the-openzeppelin-solidity-v2-1-1/214 "2022-01-27T14:19:31Z")

</div>

I want to implement whitelist to the OpenZeppelin solidity v2.1.1. I checked inside the package, there is no whitelist solidity file. can you please clarify me

---

## [How to initialize a new variable from a new contract when upgrading original contract (UUPSUpgradeable)?](https://forum.openzeppelin.com/t/how-to-initialize-a-new-variable-from-a-new-contract-when-upgrading-original-contract-uupsupgradeable/23011)

<div class="topic-metadata">

**Author:** [@lalalei](https://forum.openzeppelin.com/u/lalalei)\
**Replies:** 2\
**Last updated:** [January 21, 2022, 6:52am UTC](https://forum.openzeppelin.com/t/how-to-initialize-a-new-variable-from-a-new-contract-when-upgrading-original-contract-uupsupgradeable/23011 "2022-01-21T06:52:06Z")

</div>

I have a UUPS Upgradeable ERC20 contract deployed to a testnet using Truffle. Let's call it ContractA.sol, which looks like the following: contractA.sol: // pragma, imports and docstrings contract ContractA is Initial…

---

## [Setting state variables after contract deployment?](https://forum.openzeppelin.com/t/setting-state-variables-after-contract-deployment/22272)

<div class="topic-metadata">

**Author:** [@SeaMini](https://forum.openzeppelin.com/u/SeaMini)\
**Replies:** 0\
**Last updated:** [January 6, 2022, 8:16pm UTC](https://forum.openzeppelin.com/t/setting-state-variables-after-contract-deployment/22272 "2022-01-06T20:16:26Z")

</div>

Hi, I'm still a beginner Solidity dev so bare with me. I don't want to hardcode any state variables such as external addresses and other state fields. Instead I plan to set them as public and then after deployment I wi…

---

## [Patterns for secure off-chain storage and retrieval of EIP-712 structs](https://forum.openzeppelin.com/t/patterns-for-secure-off-chain-storage-and-retrieval-of-eip-712-structs/21694)

<div class="topic-metadata">

**Author:** [@leeren](https://forum.openzeppelin.com/u/leeren)\
**Replies:** 0\
**Last updated:** [December 27, 2021, 3:10am UTC](https://forum.openzeppelin.com/t/patterns-for-secure-off-chain-storage-and-retrieval-of-eip-712-structs/21694 "2021-12-27T03:10:09Z")

</div>

Many useful resources have been created for implementing logic for utilizing EIP-712 signatures, e.g. EIP-2612 style permits or Compound-style voting delegation. However, very few resources exist on best-practices for o…

---

## [DeFi Threat Matrix v3 - Feedback and Contributions welcomed](https://forum.openzeppelin.com/t/defi-threat-matrix-v3-feedback-and-contributions-welcomed/21613)

<div class="topic-metadata">

**Author:** [@sambacha](https://forum.openzeppelin.com/u/sambacha)\
**Replies:** 0\
**Last updated:** [December 25, 2021, 3:11pm UTC](https://forum.openzeppelin.com/t/defi-threat-matrix-v3-feedback-and-contributions-welcomed/21613 "2021-12-25T15:11:14Z")

</div>

DeFi Threat Matrix Last year right after the bZk/fulcrum hack I started working on a MITRE ATT&K Threat Matrix equivalent for DeFi/smart contract protocols/applications.. for a proper release I am hoping to re-categoriz…

---

## [How do inherit from ERC721, ERC721Enumerable and ERC721URIStorage in v4 of OpenZeppelin Contracts?](https://forum.openzeppelin.com/t/how-do-inherit-from-erc721-erc721enumerable-and-erc721uristorage-in-v4-of-openzeppelin-contracts/6656)

<div class="topic-metadata">

**Author:** [@rotcivegaf](https://forum.openzeppelin.com/u/rotcivegaf)\
**Replies:** 5\
**Last updated:** [December 15, 2021, 2:22am UTC](https://forum.openzeppelin.com/t/how-do-inherit-from-erc721-erc721enumerable-and-erc721uristorage-in-v4-of-openzeppelin-contracts/6656 "2021-12-15T02:22:12Z")

</div>

Hi, I use the V4.0 of openzeppelin-contracts How do I use ERC721 contract and inherit ERC721 extensions? pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contrac…

---

## [Does a inheritable token sweeping contract exist?](https://forum.openzeppelin.com/t/does-a-inheritable-token-sweeping-contract-exist/20951)

<div class="topic-metadata">

**Author:** [@monkey\_scratch\_head](https://forum.openzeppelin.com/u/monkey_scratch_head)\
**Replies:** 1\
**Last updated:** [December 14, 2021, 11:27am UTC](https://forum.openzeppelin.com/t/does-a-inheritable-token-sweeping-contract-exist/20951 "2021-12-14T11:27:33Z")

</div>

Hello! Does anyone know of an existing contract that can be inherited to provide the sweeping up of arbitrary tokens from a contract address to a benefactor address. A user can use a contract address as the recipient i…

---

## [Developer wanted for Meta Industry](https://forum.openzeppelin.com/t/developer-wanted-for-meta-industry/20460)

<div class="topic-metadata">

**Author:** [@Kresch](https://forum.openzeppelin.com/u/Kresch)\
**Replies:** 0\
**Last updated:** [December 7, 2021, 2:21pm UTC](https://forum.openzeppelin.com/t/developer-wanted-for-meta-industry/20460 "2021-12-07T14:21:16Z")

</div>

We are looking for a token developer on BSC or similar. We have built a platform with which it is possible to find the right service provider in the entire world of industry. In the future we want to develop more addons …

---

## [Import holder data from one contract to another - safemoon fork](https://forum.openzeppelin.com/t/import-holder-data-from-one-contract-to-another-safemoon-fork/19814)

<div class="topic-metadata">

**Author:** [@hintabaun](https://forum.openzeppelin.com/u/hintabaun)\
**Replies:** 2\
**Last updated:** [December 2, 2021, 2:32am UTC](https://forum.openzeppelin.com/t/import-holder-data-from-one-contract-to-another-safemoon-fork/19814 "2021-12-02T02:32:12Z")

</div>

I have a safemoon fork contract with 1000 holders. I have holder data in both CSV and JSON. Now I have a new and better contract, still safemoon fork. What is the simplest way to import the holder data (balances) from …

---

## [ERC1155: storing and retrieving IPFS hash using 'uri' method](https://forum.openzeppelin.com/t/erc1155-storing-and-retrieving-ipfs-hash-using-uri-method/12104)

<div class="topic-metadata">

**Author:** [@spobwoode](https://forum.openzeppelin.com/u/spobwoode)\
**Replies:** 2\
**Last updated:** [December 1, 2021, 11:11am UTC](https://forum.openzeppelin.com/t/erc1155-storing-and-retrieving-ipfs-hash-using-uri-method/12104 "2021-12-01T11:11:55Z")

</div>

I’m using the OpenZeppelin implementation of ERC1155 and want to explore the possibility of storing my metadata JSON file on IPFS. Unfortunately, the metadata will not be known ahead of time and needs to be added dynamic…

---

## [Contract Cryto- Check code](https://forum.openzeppelin.com/t/contract-cryto-check-code/18470)

<div class="topic-metadata">

**Author:** [@DocDonete](https://forum.openzeppelin.com/u/DocDonete)\
**Replies:** 0\
**Last updated:** [November 8, 2021, 11:29am UTC](https://forum.openzeppelin.com/t/contract-cryto-check-code/18470 "2021-11-08T11:29:27Z")

</div>

Please check this code and let me know if in this contract I can give 1% to the holders, 1% cash and 3% marketing tax that I want to send to a different wallet. It’s not clear to me whether the code I’ve modified allows …

---

## [How to recover tokens sent to the token contract instead of a wallet?](https://forum.openzeppelin.com/t/how-to-recover-tokens-sent-to-the-token-contract-instead-of-a-wallet/17668)

<div class="topic-metadata">

**Author:** [@Joshua\_Tree](https://forum.openzeppelin.com/u/Joshua_Tree)\
**Replies:** 3\
**Last updated:** [October 28, 2021, 4:07pm UTC](https://forum.openzeppelin.com/t/how-to-recover-tokens-sent-to-the-token-contract-instead-of-a-wallet/17668 "2021-10-28T16:07:59Z")

</div>

Hello, I am playing around with a token smart contract on Mumbai net. I asked a friend to send back some of them and instead, he sent them to the contract. The tokens are stuck in the contract here: I have Approve an…

---

## [Deflationary token with owner wallet](https://forum.openzeppelin.com/t/deflationary-token-with-owner-wallet/17626)

<div class="topic-metadata">

**Author:** [@Joshua\_Tree](https://forum.openzeppelin.com/u/Joshua_Tree)\
**Replies:** 0\
**Last updated:** [October 26, 2021, 8:49pm UTC](https://forum.openzeppelin.com/t/deflationary-token-with-owner-wallet/17626 "2021-10-26T20:49:15Z")

</div>

Hello, This is the simple code I have created for deflationary token I want to deploy. The tokenomics is quite simple: a percentage gets burned (hard burned, remove from total supply) a percentage goes to the owner. A…

[Next page](https://forum.openzeppelin.com/tag/design/6.md?match_all_tags=true&page=1&tags%5B%5D=design)
