Skip to main content
Share Your Experience: Take the 2024 Developer Survey
4 votes

Identify if a token contract was deployed using Create2

const ethers = require("ethers"); (async () => { const provider = new ethers.JsonRpcProvider("YOUR_PROVIDER"); const response = await provider.send("...
Foxxxey's user avatar
  • 4,337
3 votes
Accepted

Failed to parse as type `uint256`: a character is not in the range 0-9

Try converting the value from hexadecimal to decimal format cast --to-dec 0x1234567890ABcdeF When working with Makefile you may get same error: Failed to parse 4d5ef9****************************a38d7 ...
Alexey Smirnov's user avatar
3 votes

Please let me know if this smart contract is a crypto scam or not?

This a 100% scam, do not use it. Here's a quick walkthrough: Key generation. Initially generate a "key". This "key" is the balance in your wallet minus 0.025 ETH based on this: ...
Ake's user avatar
  • 1,139
2 votes

Please somebody help me with this error in getting transactionReceipt : "TypeError: contract.deploymentTransaction.wait is not a function"

remove this line: const transactionReceipt = await contract.deploymentTransaction.wait(1); And replace it by this: const transactionReceipt = await contract.deploymentTransaction().wait(1); ...
Al-Qa'qa''s user avatar
  • 296
2 votes
Accepted

Could not coalesce error. invalid opcode

This is because solidity 0.8.20 introduces the PUSH0(0x5f) opcode which is only supported on the ETH mainnet and not on any other chains. That's why other chains can't find the PUSH0(0x5f) opcode and ...
Zartaj Afser's user avatar
  • 4,271
2 votes

Retreiveing Bytecode of another smart contract through a smart contract

In solidity: contract Foo { function foo(address bar) public view returns (bytes memory) { return bar.code; } } The opcode is EXTCODECOPY
Maka's user avatar
  • 1,140
2 votes

Are there any no-code tools for deploying ERC-20 tokens?

Yes, there exist several solutions: Name Website ThirdWeb https://thirdweb.com/thirdweb.eth/TokenERC20 DeFiBuiler https://defibuilder.com OpenZeppelin Wizard https://wizard.openzeppelin.com/#erc20 ...
Paul Razvan Berg's user avatar
1 vote

Unable to connect to Testnet Sepolia

You need to pass the url and PK in a simple way, change your code to this: Pass the URL, not only the API key. sepolia: { url: process.env.ALCHEMY_API_KEY, // Pass the full URL here ...
Zartaj Afser's user avatar
  • 4,271
1 vote

Using meta transactions and a smart contract that creates contracts, how can I affect who the contract creator is?

The answer, after consulting several different forums and then thinking deeply about how this works, is that you cannot change the apparent from address for a transaction in the way I was thinking. ...
Paul Spencer's user avatar
1 vote
Accepted

Methods not appearing when printing contract but do appear on Etherscan

It seems just a problem with the ABI you import in the arbritage object. That object seems to refer to an arbitrage bot contract, like arb-bot or similar, not to your deployed contract.
Giuseppe Bertone's user avatar
1 vote

How to put .opezeppelin folder at desired directory in hardhat?

Depending on the deployment chain a new .json file (.openzeppelin/<network>.json) will be created and stored automatically inside the .openzeppelin folder so there's no need to duplicate it for ...
Gabriel Stoica's user avatar
1 vote
Accepted

Controlling Contract

You could use Remix, a web IDE which allows you to deploy a contract or call a deployed contract's functions using their interface. You can access it there: https://remix.ethereum.org/ It includes ...
Pacdac's user avatar
  • 80
1 vote

I need help from Expert Dev for POS bot

It is hard to know exactly what your problem is there with no information on the code you deployed, but it sounds like you have been scammed. If someone gave you some Smart Contract code, that you ...
Pacdac's user avatar
  • 80
1 vote
Accepted

Is it possible to deploy a smart contract using multi-sig? i.e. contract will deploy only when multiple parties approve the tx?

Yes it is. Two ways: As @Sky mentioned, you can create a factory contract with a multisig functionality that includes manual checks for signatures. but this route is tricky and will need more time ...
Zartaj Afser's user avatar
  • 4,271
1 vote

Is it possible to deploy a smart contract using multi-sig? i.e. contract will deploy only when multiple parties approve the tx?

It's possible, but note that on PUBLIC blockchain, everyone can deploy a SmartContract (if they can afford it). So you can't stop people from deploying code that you don't approve. For your use-case: ...
Sky's user avatar
  • 2,322
1 vote
Accepted

How to call a function from a separate contract

To create an attacker contract for a reentrancy attack, you need to send some ETH to the target contract and then call its withdraw() function from within the receive() function of your attacker ...
Mehran Ra's user avatar
  • 590
1 vote

It is safe to use allowUnlimitedContractSize: true?

EIP-170 introduced the 24576 byte limit on Ethereum mainnet smart contracts, however, other blockchains may not follow this standard, which I assume is why hardhat gives you the option to bypass the ...
Rohan Nero's user avatar
  • 1,607
1 vote
Accepted

Gnosis not signing on the contract

This error can occur due to RPC issues .If the transaction is confirmed on the Gnosis Safe dashboard, Check again after some time the transaction will be updated on the blockchain
Jaskaran Singh's user avatar
1 vote

contract.deploymentTransection.wait(1) not working in ethers version 6.4.0

Replace await simpleStorage.deploymentTransaction.wait(3); with await simpleStorage.deployTransaction.wait(6)
Zartaj Afser's user avatar
  • 4,271
1 vote

Error deploying Solidity contract: Expected 0 constructor arguments, got 6 in hardhat

Because of the abstract contract you defined in Lottery, remove abstract.(abstract contracts cannot be deployed directly.)
EthanOK's user avatar
  • 451
1 vote

Possible to verify a contract address without having access to the creator address?

It's only verified on the specific block explorer. It is up the the explorer to decide if and how to gate the process. Most don't. I have seen many examples where people have used that to include ...
Maka's user avatar
  • 1,140
1 vote
Accepted

Simple contract fails to deploy to Sepolia

Your code can be deployed, maybe there is a problem with the parameters of the constructor you passed in. You can try: _UID = 0xdd440df46537b153fd7dcb3d09fe2d20ab4650728dfc389f4fe51de36a8cab06 _Desc = ...
EthanOK's user avatar
  • 451
1 vote

TypeError: Cannot read properties of undefined (reading 'map')

You are setting your state with setFilter at the press of the button "onClick()" but you are mapping the state as soon as the components are rendered with useEffect. See useEffect ...
TheyCallMeCheng's user avatar
1 vote
Accepted

How to deploy smart contract with raw transaction

As written in the comment, just delete 'to' property in unserializedTx
rrrrssss's user avatar
1 vote

Foundry scripts run with an unknown tx.origin address. How do I change it?

I was also struggling with same problem. I discovered that you can override tx.origin address in foundry.toml file. I don't know why this is not working with vm.prank() or vm.startPrank(). I override ...
0xkornel's user avatar
  • 150
1 vote

Foundry scripts run with an unknown tx.origin address. How do I change it?

Answering to Yan's question in the comments. There's only two references to this address 0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38 in the Foundry docs. You can check them out here: https://book....
Ramon Royo's user avatar
1 vote

Deploy upgradable contracts using Remix

I do not know how to do it. You might be better off using Truffle and this tutorial: https://forum.openzeppelin.com/t/openzeppelin-upgrades-step-by-step-tutorial-for-truffle/3579 And then connecting ...
Mars Robertson's user avatar
1 vote
Accepted

How to deploy a bytecode-only contract without an ABI

Here's a solution with Ethers v6 and Hardhat, in Typescript: import { ethers } from "hardhat"; async function main() { const [wallet] = await ethers.getSigners(); const ...
Morgan W's user avatar
1 vote

Find freshly deployed contracts on ethereum network

You have to setup your own node, or use the service like Chainstack, and then listen to all txs. Then you have to develop your own set of filters on contract events like TokenCreation, PairCreated, ...
blockson's user avatar
1 vote

how to get contract creation code (bytecode) from etherscan api?

You can use the Etherscan API to get the contract creation code (bytecode) for deploying contracts by using the eth_getCode endpoint. This endpoint allows you to retrieve the bytecode at a specific ...
Salih Karadag's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible