Skip to main content

New answers tagged

0 votes

Function is callable from Thirdweb Dashboard but not from the front end

I figured out what was the issue, I had a typo calling the getMultiplier() with a msg.sender as an argument in a view function.
Mohamed Wael's user avatar
0 votes

Very High gas fee in my staking contract

To reduce gas costs, it’s important to consider the efficiency of your code when using for-loops in Solidity. Here are some gas optimization strategies and loop unrolling techniques you can employ: ...
Toni Dev's user avatar
  • 155
0 votes

"ContractExecutionError: Error happened while trying to execute a function inside a smart contract" after calling it via mint button

You're facing the error because you're not passing the signer by creating it using the browser's injected provider (i.e., window.ethereum) from the frontend. To achieve that, you also need to ...
SYED ASAD KAZMI's user avatar
0 votes

how to verify contracts in contract (created with contract ) polygon

You can verify using tool like Foundry or Hardhat, after compiling the contract that’s being created by your factory contract. Using Foundry: Compile the contract: forge compile Then, you can use ...
SYED ASAD KAZMI's user avatar
0 votes
Accepted

Openzeppelin ERC721Enumerable getTokenIdsOfOwner reverts and I don't know why

It seems that the mainNft contract you're instantiating hasn't extended the ERC721Enumerable contract in its implementation. It would work fine if the NFT contract being created inherits/extends the ...
SYED ASAD KAZMI's user avatar
1 vote
Accepted

LP contract doesn't approve

It seems like you are trying to approve from the contract address, meaning that your contract is approving the lp to take the tokens. When in reality you want the user to call approve before calling ...
Rohan Nero's user avatar
  • 1,577
0 votes
Accepted

Sent Eth to contract address can I get it back

The ETH can be withdrawn to your wallet address by the owner of the contract using the withdrawETH function. You can try messaging to the owner address using the Blockscan Chat. Or, you can also try ...
SYED ASAD KAZMI's user avatar

Top 50 recent answers are included