# Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Returned error: {"jsonrpc":"2.0","error":"execution reverted",

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Returned error: {"jsonrpc":"2.0","error":"execution reverted","errorData" #2468

iam already have deployed contract but i dont click on proxy before i doplying is there is any update i can do after i have deploying contract ?

Can you provide more information on what you are trying to do and when you are getting the error?

What network are you deploying to? Which EVM version are you targeting in the compiler configuration (Solidity tab -> Advanced configurations)?

It looks like you deployed an implementation for an upgradeable contract. If you choose "Deploy with Proxy" in Remix, it will redeploy the implementation. You can avoid that if you deploy the proxy contract directly, and pass in the implementation contract address to the proxy constructor arguments..

1 Like

hello ericglau
Thanks for you try to help me
Iam trying to Safemint NFT while i click on Transact i got that error
i already deploy with ethereum network
and this is my contract:
i dont change any code iam new here and
and opensea answer that iam e rooting outside of OpenSea :slight_smile:
and this is the error

On the transactions page of your contract on Etherscan https://etherscan.io/address/0xdc4586d1444a10710d2fd948d470ad192c1aaa59 , you can see that each of your calls to safeMint are getting reverted with Fail with Custom Error 'OwnableUnauthorizedAccount (account=0x64c20eE5b4476bC4eB5dD236498669335382cd31)'

This is because what you have deployed is an implementation of an upgradeable contract, but the implementation itself is not meant to be used directly. Particularly, your implementation has no owner, so you cannot invoke safeMint on it.

To use this contract, you have to deploy a proxy which uses it as the implementation. See https://docs.openzeppelin.com/upgrades-plugins/1.x/proxies to learn more about the proxy concept.

You can deploy https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol , and for the constructor arguments, pass in your implementation address 0xDC4586d1444A10710d2fd948D470Ad192C1AAa59, the initial owner that you want to have admin privileges to update the proxy, and the ABI encoding of the initializer function (go to https://abi.hashex.org/ and encode the initializer function name, and add your address as the parameter, e.g.

then copy the encoded data to use as the _data parameter of TransparentUpgradeableProxy's constructor)

1 Like

i add https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.8.2/contracts/proxy/Proxy.sol

OR i just add proxy https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/proxy/transparent/TransparentUpgradeableProxy.sol

sorry i there is example of how i use in remix ?

is there any steps ?

hey eric

here i should put my wallet address ?

Copy that and append 0x c4d66de800000000000000000000000064c20ee5b4476bc4eb5dd236498669335382cd31

i get that error

can you check please

That looks right to me. I'm not sure what's causing your error, but you should try it on development networks or testnets before deploying to mainnet.

1 Like

Hey Eric
Thank you very much for your support
I try another time with same parameters you told me and its done :slight_smile:

and this is the deploy contract : 0x99f44314c9c8e5220ef0c29d8f97800096ec09b2
Is that contract belongs to first contract ?
First contract : 0xdc4586d1444a10710d2fd948d470ad192c1aaa59
is there any steps that i can do by your Advise ?

0x99f44314c9c8e5220ef0c29d8f97800096ec09b2 is your proxy and is owned by your address 0x64c20eE5b4476bC4eB5dD236498669335382cd31. You can call your contract's functions using your proxy address 0x99f44314c9c8e5220ef0c29d8f97800096ec09b2 instead of the implementation address.

1 Like

can you please explian if i want transact safemint to my NFT
what i should do .. sorry i am just begginer

You can use 0x99f44314c9c8e5220ef0c29d8f97800096ec09b2 with your contract's functions from your contract's ABI.

1 Like

Thank you eric :slight_smile: :100:
I am so lucky because you are here
wish you have a good day

Hello I'm having an issue with my Contract, it seems to be a similar issue.

Polygon Contract: 0xDb2C3F64d6ECF0378EC267AbfCdaE98Cea4E55B6