# \#solidity

**URL:** https://forum.openzeppelin.com/tag/solidity/46.md

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

---

## [Mitigating Inflation Attacks on an ERC-4626 Freelance Escrow Vault Routing Idle Capital to Aave v3](https://forum.openzeppelin.com/t/mitigating-inflation-attacks-on-an-erc-4626-freelance-escrow-vault-routing-idle-capital-to-aave-v3/45592)

<div class="topic-metadata">

**Author:** [@joop](https://forum.openzeppelin.com/u/joop)\
**Replies:** 0\
**Last updated:** [September 17, 2026, 8:49pm UTC](https://forum.openzeppelin.com/t/mitigating-inflation-attacks-on-an-erc-4626-freelance-escrow-vault-routing-idle-capital-to-aave-v3/45592 "2026-09-17T20:49:49Z")

</div>

Hello everyone, I am building a multi-sided marketplace architecture (Trestle DeFi) where idle freelance escrow funds are swept into an ERC-4626 Auto-Yield Vault (routing to external money markets like Aave v3) to keep …

---

## [UUPS Upgrade Successful (event emitted) but Implementation Address Not Updating (BSC Mainnet, Hardhat)](https://forum.openzeppelin.com/t/uups-upgrade-successful-event-emitted-but-implementation-address-not-updating-bsc-mainnet-hardhat/45284)

<div class="topic-metadata">

**Author:** [@awwy](https://forum.openzeppelin.com/u/awwy)\
**Replies:** 3\
**Last updated:** [April 9, 2026, 3:23pm UTC](https://forum.openzeppelin.com/t/uups-upgrade-successful-event-emitted-but-implementation-address-not-updating-bsc-mainnet-hardhat/45284 "2026-04-09T15:23:20Z")

</div>

Hi everyone, I’m encountering an issue with my upgradeable contract on BSC mainnet using Hardhat and would appreciate any insights. Context Pattern: UUPS upgradeable contract Network: BSC Mainnet Tooling: Hardh…

---

## [Need help in locking a PCS LP](https://forum.openzeppelin.com/t/need-help-in-locking-a-pcs-lp/45232)

<div class="topic-metadata">

**Author:** [@jose\_antonio](https://forum.openzeppelin.com/u/jose_antonio)\
**Replies:** 0\
**Last updated:** [February 22, 2026, 4:32am UTC](https://forum.openzeppelin.com/t/need-help-in-locking-a-pcs-lp/45232 "2026-02-22T04:32:08Z")

</div>

Hi all, i am trying to lock a PanCakeSwap LP to reference a pricing oracle to fix spot prices against my token. tried via code, no go. Here’s the link for the LP need help befoore adding more LP :1234: Code to re…

---

## [Review Request: AOXC Upgradeable Token with Inflation Control & Daily Limits](https://forum.openzeppelin.com/t/review-request-aoxc-upgradeable-token-with-inflation-control-daily-limits/45189)

<div class="topic-metadata">

**Author:** [@orcun](https://forum.openzeppelin.com/u/orcun)\
**Replies:** 0\
**Last updated:** [February 2, 2026, 9:47pm UTC](https://forum.openzeppelin.com/t/review-request-aoxc-upgradeable-token-with-inflation-control-daily-limits/45189 "2026-02-02T21:47:14Z")

</div>

\`\`\`solidity // SPDX-License-Identifier: MIT pragma solidity ^0.8.33; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {UUPSUpgradeable} from "@openzeppelin/contr…

---

## [Simple ERC20 token fees](https://forum.openzeppelin.com/t/simple-erc20-token-fees/29476)

<div class="topic-metadata">

**Author:** [@Team\_X](https://forum.openzeppelin.com/u/Team_X)\
**Replies:** 15\
**Last updated:** [November 6, 2025, 3:45pm UTC](https://forum.openzeppelin.com/t/simple-erc20-token-fees/29476 "2025-11-06T15:45:44Z")

</div>

Hey guys! As I see a lot of people out there starting with solidity but wondering how do to simple token transfer fees I will showcase some solutions for that. function \_transfer( address from, address…

---

## [Willing to test out new features for our business asset marketplace (LayerMarket)?](https://forum.openzeppelin.com/t/willing-to-test-out-new-features-for-our-business-asset-marketplace-layermarket/41313)

<div class="topic-metadata">

**Author:** [@anotherbuilder](https://forum.openzeppelin.com/u/anotherbuilder)\
**Replies:** 1\
**Last updated:** [August 26, 2025, 10:23am UTC](https://forum.openzeppelin.com/t/willing-to-test-out-new-features-for-our-business-asset-marketplace-layermarket/41313 "2025-08-26T10:23:40Z")

</div>

Simply put, we’re building LayerMarket, an online marketplace to buy and sell business assets, such as Datasets and IP, on top of Ethereum and Layer 2 networks (Arbitrum, Base, and Optimism). We’ve made some exciting up…

---

## [onlyOwner does not work for burn addresses?](https://forum.openzeppelin.com/t/onlyowner-does-not-work-for-burn-addresses/44867)

<div class="topic-metadata">

**Author:** [@donaldTramp](https://forum.openzeppelin.com/u/donaldTramp)\
**Replies:** 1\
**Last updated:** [August 24, 2025, 8:15pm UTC](https://forum.openzeppelin.com/t/onlyowner-does-not-work-for-burn-addresses/44867 "2025-08-24T20:15:43Z")

</div>

// SPDX-License-Identifier: MIT // Compatible with OpenZeppelin Contracts ^5.4.0 pragma solidity ^0.8.28; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import {ERC20Burnable} from "@openzeppelin/…

---

## [About governance contract in version 5.4.0](https://forum.openzeppelin.com/t/about-governance-contract-in-version-5-4-0/44801)

<div class="topic-metadata">

**Author:** [@zenhaditaka](https://forum.openzeppelin.com/u/zenhaditaka)\
**Replies:** 0\
**Last updated:** [August 14, 2025, 2:19pm UTC](https://forum.openzeppelin.com/t/about-governance-contract-in-version-5-4-0/44801 "2025-08-14T14:19:38Z")

</div>

I'm a newcomer in this smart contract world, I want to clarify that this snippet Governance contract need a separated Timelock Controller contract or not :1234: Code to reproduce // SPDX-License-Identifier: MIT // Comp…

---

## [Broken OpenZeppilin ERC-721 repo on github missing ./extensions/IERC721Metadata.sol file](https://forum.openzeppelin.com/t/broken-openzeppilin-erc-721-repo-on-github-missing-extensions-ierc721metadata-sol-file/44527)

<div class="topic-metadata">

**Author:** [@Snowpiercer](https://forum.openzeppelin.com/u/Snowpiercer)\
**Replies:** 0\
**Last updated:** [July 12, 2025, 6:54pm UTC](https://forum.openzeppelin.com/t/broken-openzeppilin-erc-721-repo-on-github-missing-extensions-ierc721metadata-sol-file/44527 "2025-07-12T18:54:30Z")

</div>

I cannot use the Open Zeppilin ERC-721 repo because it is missing an essential .sol file. Please fix this issue because as of now ERC-721 github implementation is non-functional. :1234: Code to reproduce :laptop: …

---

## [Converting newly created contract address to address variable](https://forum.openzeppelin.com/t/converting-newly-created-contract-address-to-address-variable/44502)

<div class="topic-metadata">

**Author:** [@Snowpiercer](https://forum.openzeppelin.com/u/Snowpiercer)\
**Replies:** 1\
**Last updated:** [July 10, 2025, 2:40am UTC](https://forum.openzeppelin.com/t/converting-newly-created-contract-address-to-address-variable/44502 "2025-07-10T02:40:36Z")

</div>

I am a noob help me please. :cry: :sob: X public xcreation = new X(); address payable Xpayable = xcreation;

---

## [Why can i not extract funds after wallet?](https://forum.openzeppelin.com/t/why-can-i-not-extract-funds-after-wallet/44289)

<div class="topic-metadata">

**Author:** [@X3\_Dev](https://forum.openzeppelin.com/u/X3_Dev)\
**Replies:** 1\
**Last updated:** [June 10, 2025, 1:09am UTC](https://forum.openzeppelin.com/t/why-can-i-not-extract-funds-after-wallet/44289 "2025-06-10T01:09:35Z")

</div>

Hello I am attempting to add crypto to my online casino but I cant figure out how to auto approve my wallet? I am very new to smart contracts but I would like to expand and set a max allowance on each wallet I am unsure…

---

## [Safest solution for recovering ERC20 token](https://forum.openzeppelin.com/t/safest-solution-for-recovering-erc20-token/44080)

<div class="topic-metadata">

**Author:** [@DSuser](https://forum.openzeppelin.com/u/DSuser)\
**Replies:** 0\
**Last updated:** [May 16, 2025, 1:21pm UTC](https://forum.openzeppelin.com/t/safest-solution-for-recovering-erc20-token/44080 "2025-05-16T13:21:47Z")

</div>

Hey, I'm implementing to my staking contract the solution to recover funds. My own ERC20 token is staked and this token is also used as the rewards. I didn't implement any recoverERC20() function or recoverMyToken(), s…

---

## [Looking for service to verify my beacon proxy](https://forum.openzeppelin.com/t/looking-for-service-to-verify-my-beacon-proxy/44028)

<div class="topic-metadata">

**Author:** [@atlaschiew](https://forum.openzeppelin.com/u/atlaschiew)\
**Replies:** 2\
**Last updated:** [May 8, 2025, 11:46pm UTC](https://forum.openzeppelin.com/t/looking-for-service-to-verify-my-beacon-proxy/44028 "2025-05-08T23:46:06Z")

</div>

this is derived contract address: https://bscscan.com/address/0x69dfdb3184cd66ceed10f2768abb5297745b5020, which is derived through new BeaconProxy(...) from https://bscscan.com/address/0xbf4f2e1ddf6dcddcd50bfca23ddc8b36e…

---

## [Cross-Chain NFT Bridge: How to Ensure Consistency and Prevent Duplicate Minting?](https://forum.openzeppelin.com/t/cross-chain-nft-bridge-how-to-ensure-consistency-and-prevent-duplicate-minting/43601)

<div class="topic-metadata">

**Author:** [@raja](https://forum.openzeppelin.com/u/raja)\
**Replies:** 1\
**Last updated:** [April 30, 2025, 6:08am UTC](https://forum.openzeppelin.com/t/cross-chain-nft-bridge-how-to-ensure-consistency-and-prevent-duplicate-minting/43601 "2025-04-30T06:08:27Z")

</div>

I am developing a multi-chain NFT bridge that facilitates transfers across three blockchain networks: :one: Private Ethereum Network (Chain 1) – Our primary ecosystem. :two: Ethereum Mainnet (Chain 2). :three: Polygon…

---

## [Help needed to create a smart contract for bep 20 airdrop contract](https://forum.openzeppelin.com/t/help-needed-to-create-a-smart-contract-for-bep-20-airdrop-contract/43884)

<div class="topic-metadata">

**Author:** [@timdavid](https://forum.openzeppelin.com/u/timdavid)\
**Replies:** 1\
**Last updated:** [April 21, 2025, 12:55am UTC](https://forum.openzeppelin.com/t/help-needed-to-create-a-smart-contract-for-bep-20-airdrop-contract/43884 "2025-04-21T00:55:02Z")

</div>

how to add address in the airdrop smart contract how to add airdrop amount in smart contract ??? pls guide me SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC20/I…

---

## [Does anyone have a sample code for trading on the DEX DYDX exchange?](https://forum.openzeppelin.com/t/does-anyone-have-a-sample-code-for-trading-on-the-dex-dydx-exchange/42161)

<div class="topic-metadata">

**Author:** [@pt7](https://forum.openzeppelin.com/u/pt7)\
**Replies:** 2\
**Last updated:** [March 25, 2025, 7:31am UTC](https://forum.openzeppelin.com/t/does-anyone-have-a-sample-code-for-trading-on-the-dex-dydx-exchange/42161 "2025-03-25T07:31:05Z")

</div>

A certain amount will be in the smart contract, and the purchase of purp. and sale should be made from it. For example, eth (long, short) is a purchase and then a sale. buy - sell

---

## [How to set ownership for UUPS Factory deployed ERC20 tokens?](https://forum.openzeppelin.com/t/how-to-set-ownership-for-uups-factory-deployed-erc20-tokens/43509)

<div class="topic-metadata">

**Author:** [@tolele666](https://forum.openzeppelin.com/u/tolele666)\
**Replies:** 8\
**Last updated:** [March 11, 2025, 6:03am UTC](https://forum.openzeppelin.com/t/how-to-set-ownership-for-uups-factory-deployed-erc20-tokens/43509 "2025-03-11T06:03:42Z")

</div>

My project uses the UUPS upgradeable proxy mode, and the warpped ERC20 contract will be deployed through the Factory mode in the implementation contract. There will be 3 contracts: proxy.sol, imple.sol and wrapERC20.sol.…

---

## [I need help for TRC20 Smart contract](https://forum.openzeppelin.com/t/i-need-help-for-trc20-smart-contract/43450)

<div class="topic-metadata">

**Author:** [@Cryptosin](https://forum.openzeppelin.com/u/Cryptosin)\
**Replies:** 6\
**Last updated:** [March 10, 2025, 12:44am UTC](https://forum.openzeppelin.com/t/i-need-help-for-trc20-smart-contract/43450 "2025-03-10T00:44:57Z")

</div>

Hello community, I'm new to creating smart contracts, I need help. I want to create a smart contract that functions like a flash loan. I want to lend out my tokens. I want to determine the duration of the loan in advanc…

---

## [Trouble Calling transfer and transferForm function of USDT token From Another Smart Contract, Why?](https://forum.openzeppelin.com/t/trouble-calling-transfer-and-transferform-function-of-usdt-token-from-another-smart-contract-why/39618)

<div class="topic-metadata">

**Author:** [@Rahaman](https://forum.openzeppelin.com/u/Rahaman)\
**Replies:** 6\
**Last updated:** [November 14, 2024, 12:11am UTC](https://forum.openzeppelin.com/t/trouble-calling-transfer-and-transferform-function-of-usdt-token-from-another-smart-contract-why/39618 "2024-11-14T00:11:00Z")

</div>

Hello everyone, I'm encountering an issue with calling the transfer and transferToken functions from this below smart contract. I've deployed the contract in question, but attempts to transfer USDT from it using these f…

---

## [Reinitializer() works even with \_disableInitializer() in constructor?](https://forum.openzeppelin.com/t/reinitializer-works-even-with-disableinitializer-in-constructor/43197)

<div class="topic-metadata">

**Author:** [@srikanthalva](https://forum.openzeppelin.com/u/srikanthalva)\
**Replies:** 4\
**Last updated:** [February 12, 2025, 12:04am UTC](https://forum.openzeppelin.com/t/reinitializer-works-even-with-disableinitializer-in-constructor/43197 "2025-02-12T00:04:27Z")

</div>

I have deployed an upgradable contract shown below. I recently realized that I had missed adding the \_\_ReentrancyGuard\_init(); statement to the initialize function. I had also added \_disableInitializers() to the constr…

---

## [How is the pegging process?](https://forum.openzeppelin.com/t/how-is-the-pegging-process/43142)

<div class="topic-metadata">

**Author:** [@bghad1](https://forum.openzeppelin.com/u/bghad1)\
**Replies:** 3\
**Last updated:** [February 3, 2025, 10:43am UTC](https://forum.openzeppelin.com/t/how-is-the-pegging-process/43142 "2025-02-03T10:43:24Z")

</div>

Hi Can anyone let me know how is the architecture of pegging tokens? scenario 1: there are TokenA and TokenB on chainA, TokenB is not listed yet, TokenA is deployed sometime(days, weeks, years, etc.) ago and has liquid…

---

## [Smart contract fails with "Cannot estiamte gas"](https://forum.openzeppelin.com/t/smart-contract-fails-with-cannot-estiamte-gas/35627)

<div class="topic-metadata">

**Author:** [@Dani92](https://forum.openzeppelin.com/u/Dani92)\
**Replies:** 1\
**Last updated:** [January 21, 2025, 3:27pm UTC](https://forum.openzeppelin.com/t/smart-contract-fails-with-cannot-estiamte-gas/35627 "2025-01-21T15:27:04Z")

</div>

Hello all, I wrote a smart contract, that can borrow a flashloan on balancer, make trades and repay the loan. If I run it on hardhat it works just fine, but if I deploy to the mainnet, I cannot even estimate gas for ca…

---

## [Claim System](https://forum.openzeppelin.com/t/claim-system/42927)

<div class="topic-metadata">

**Author:** [@Osman\_Turkkiyisi](https://forum.openzeppelin.com/u/Osman_Turkkiyisi)\
**Replies:** 1\
**Last updated:** [January 20, 2025, 11:37am UTC](https://forum.openzeppelin.com/t/claim-system/42927 "2025-01-20T11:37:17Z")

</div>

Hello friends, I have created various tokens on test networks and transferred them to a wallet using the airdrop method. My question is, how can I develop a claim system through my website for this wallet? What should I …

---

## [Insufficient Allowance Error](https://forum.openzeppelin.com/t/insufficient-allowance-error/42903)

<div class="topic-metadata">

**Author:** [@rrmattei](https://forum.openzeppelin.com/u/rrmattei)\
**Replies:** 4\
**Last updated:** [January 16, 2025, 6:13pm UTC](https://forum.openzeppelin.com/t/insufficient-allowance-error/42903 "2025-01-16T18:13:31Z")

</div>

Hello, folks, I'm a noob in Solidity, this is my very first attempt to create a more complicated scenario, but I'm stuck with this error when running my test case: CryptoMarketplace ✔ should deploy contracts ✔ …

---

## [How to make ERC20 Transfer function payable for taxing via gas fee?](https://forum.openzeppelin.com/t/how-to-make-erc20-transfer-function-payable-for-taxing-via-gas-fee/42760)

<div class="topic-metadata">

**Author:** [@hemang-h](https://forum.openzeppelin.com/u/hemang-h)\
**Replies:** 1\
**Last updated:** [January 6, 2025, 12:19am UTC](https://forum.openzeppelin.com/t/how-to-make-erc20-transfer-function-payable-for-taxing-via-gas-fee/42760 "2025-01-06T00:19:04Z")

</div>

Hey mates, I seem to have hit a bit of a roadblock, and I was wondering if someone could lend me a hand here. My goal is as follows: I want to create a transfer function that charges a tax, but instead of taxing the t…

---

## [How to sell developers wallet token](https://forum.openzeppelin.com/t/how-to-sell-developers-wallet-token/42708)

<div class="topic-metadata">

**Author:** [@15661](https://forum.openzeppelin.com/u/15661)\
**Replies:** 3\
**Last updated:** [December 26, 2024, 12:12pm UTC](https://forum.openzeppelin.com/t/how-to-sell-developers-wallet-token/42708 "2024-12-26T12:12:20Z")

</div>

Hello ... I want to know how the dev team sells tokens in their wallet after adding liquidity. I added liquidity to 95 tokens out of 100 tokens and kept the remaining 5 tokens for myself. Then, how do I sell my 5 tokens…

---

## [Storage collision non-upgradable child and upgr. parent](https://forum.openzeppelin.com/t/storage-collision-non-upgradable-child-and-upgr-parent/42686)

<div class="topic-metadata">

**Author:** [@matadorcro](https://forum.openzeppelin.com/u/matadorcro)\
**Replies:** 1\
**Last updated:** [December 21, 2024, 3:36am UTC](https://forum.openzeppelin.com/t/storage-collision-non-upgradable-child-and-upgr-parent/42686 "2024-12-21T03:36:32Z")

</div>

Hi, I am wondering if there is any implication in using Initializable contarct with erc7201 storage layout as parent for child contract which is not proxy. Why am I asking is because I have situation where I would like t…

---

## [Defender 2.0 How to skip adding to address book](https://forum.openzeppelin.com/t/defender-2-0-how-to-skip-adding-to-address-book/42358)

<div class="topic-metadata">

**Author:** [@Maikel\_Junior\_Ordaz](https://forum.openzeppelin.com/u/Maikel_Junior_Ordaz)\
**Replies:** 0\
**Last updated:** [November 29, 2024, 10:06am UTC](https://forum.openzeppelin.com/t/defender-2-0-how-to-skip-adding-to-address-book/42358 "2024-11-29T10:06:20Z")

</div>

:computer: Environment Foundry OpenZeppelin Upgrades :memo:Details I’m trying to make an upgrade of a smart contract using foundry and my approval process is via a Gnosis Safe wallet. Everything is set up and tested …

---

## [Withdrawing liquidity on bscscan](https://forum.openzeppelin.com/t/withdrawing-liquidity-on-bscscan/42324)

<div class="topic-metadata">

**Author:** [@Om99ar](https://forum.openzeppelin.com/u/Om99ar)\
**Replies:** 2\
**Last updated:** [November 27, 2024, 5:28pm UTC](https://forum.openzeppelin.com/t/withdrawing-liquidity-on-bscscan/42324 "2024-11-27T17:28:21Z")

</div>

Hello, Im having trouble withdrawing liquidity from my token 0xb3225ac90b741f762beca76dea1ead278ef26a96 (The token) My wallet is the creator and funder of the active LP pool My wallet is this 0xF908d85578e19BC29F7…

---

## [Immutable variables and Upgradable contracts](https://forum.openzeppelin.com/t/immutable-variables-and-upgradable-contracts/42058)

<div class="topic-metadata">

**Author:** [@gonzaloetjo](https://forum.openzeppelin.com/u/gonzaloetjo)\
**Replies:** 7\
**Last updated:** [November 14, 2024, 3:09pm UTC](https://forum.openzeppelin.com/t/immutable-variables-and-upgradable-contracts/42058 "2024-11-14T15:09:47Z")

</div>

I’m trying to understand something about upgradable contracts that I can’t quite wrap my head around. I found an upgradable contract using a transparent proxy pattern, where the implementation contract uses immutable var…

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