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

Questions tagged [create]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
21 views

What is the RLP encoding of an address whose first byte is 0?

It's technically possible for the first byte of an address in Ethereum to be 0. If this contract then deploys another contract using the CREATE opcode, the address of the new contract will be ...
BackusNaur's user avatar
1 vote
1 answer
79 views

Redeploy to same address using CREATE (not CREATE2) | aka does a nonce reset?

Let's say I am using a (Gnosis) Safe as my main deployer account (0xD1) to allow for use of CREATE2 calls. I use my main account, 0xD1, to deploy a "TempCreator" contract (0xC2) using ...
L Co's user avatar
  • 113
0 votes
1 answer
36 views

I can´t create a new folder [closed]

I am very busy because I can´t create a simple folder. Remix, I created a new folder but No make anything, and Remix is in no function. I am a new student of remix, can you help me?
Henry's user avatar
  • 11
0 votes
1 answer
216 views

What is the correlation between "Hash" (Method ID) & "Name"

I was checking Etherscan and come across a deployed contract (Create contract), but the method id was 0x60a06040. I then used https://openchain.xyz/signatures?query=0x60a06040 and found out that the ...
anon's user avatar
  • 25
0 votes
2 answers
540 views

How Can I Identify the Blockchain Where a Smart Contract Is Deployed Using Its Address?

I am trying to identify the specific blockchain where a smart contract has been deployed using its deployment address. However, I am unable to find a clear source or method for doing so. When I looked ...
Faisal Hussain's user avatar
3 votes
1 answer
154 views

Do dune analytics `creation_traces` data include contracts created by other contracts?

Or do they only check to see for a to address to be blank in a transaction. Does it find all CREATE/CREATE2 opcodes -> meaning an EoA or contract deployment?
Patrick Collins's user avatar
2 votes
1 answer
346 views

Trying to use CREATE opcode to deploy a new contract instance using bytecode of a deployed contract

I am trying to get the bytecode from a deployed contract, then by using that bytecode, use the CREATE opcode to deploy a new instance of that contract. Here is the code I'm trying out (but to no avail)...
Allan's user avatar
  • 41
1 vote
2 answers
273 views

Why do I not see CREATE or CREATE2 opcodes in traces of contract creating transactions?

I am trying to see smart contract creations from opcodes in transaction traces with debug_traceTransaction. But traces of transactions that created contracts do not seem to include the CREATE opcode. ...
ruben's user avatar
  • 13
1 vote
0 answers
41 views

Why does SudoSwap using opcode create not create2 to create a pair contract?

SudoSwap contract lib LSSVMPairCloner.sol source code: https://github.com/sudoswap/lssvm/blob/main/src/lib/LSSVMPairCloner.sol I don't understand why using opcode create not create2 to create a ...
Ted Zhu's user avatar
  • 11
3 votes
1 answer
1k views

How difficult is it to deploy a contract to one specific address that you want?

Let's consider two scenarios: Address X deployed Uniswap code to ETH mainnet with Create2 opcode to address Y Address X deployed Uniswap code to ETH mainnet with Create opcode to address Z I am an ...
Patrick Collins's user avatar
3 votes
1 answer
153 views

Is there any difference between the "new Contract()" syntax and the assembly "create" opcode?

Is there any difference between the two following ways of creating a smart contract via a smart contract? function create_v1() external { Contract c = new Contract(); } function create_v2() ...
Paul Razvan Berg's user avatar
0 votes
0 answers
518 views

Fail with error 'SafeMath: subtraction overflow'

I am trying to use the "create" function from an LSP smart contract from the UMA protocol but I can not use it it always returns the "Fail with error 'SafeMath: subtraction overflow'&...
Dimitri's user avatar
1 vote
1 answer
269 views

Is it possible to get the revert reason during CREATE?

I'm trying to return the revert reason of a revert that is triggered during a CREATE opcode. I'm currently using function deployCode(bytes memory bytecode) internal returns (address payable addr) {...
phaze's user avatar
  • 1,595
1 vote
2 answers
567 views

Does the max code size limitation apply to init code, too?

Deployed bytecode (i.e. the one returned by contract creation) ought to be at most 0x6000 = 24576 bytes long. Does this limitation apply to init code passed on as input data of a user triggered ...
Olivier Bégassat's user avatar
0 votes
1 answer
211 views

Nonce update for multiple CREATEs in a single transaction when some fail

Suppose executing the bytecode of a smart contract in a particular (single) transaction leads to several CREATE's in a row (triggered by the same smart contract). Is it true that the nonce of that ...
Olivier Bégassat's user avatar
0 votes
2 answers
1k views

Why command `npm hardhat` doesn't create a new sample project?

I have installed hardhat, and I'm trying to create a sample project structure using npm hardhat. But it just shows me basic commands of hardhat as follows: Hardhat version 2.9.1 Usage: hardhat [...
usarotonkachi's user avatar
0 votes
1 answer
877 views

EXTCODESIZE returning 32 for contract size less than 32

I'm currently completing the Ethernaut challenges, one of them is to deploy a small contract (runtime bytecode is 10 bytes long). I'm running the tests on my local machine, and using Solidity to ...
riordant's user avatar
1 vote
1 answer
595 views

Storing immutable state in contract data

This post highlights how to use CREATE2 to implement smart contract state using contract data. However, the author also says: "if storage doesn’t need to change, you can do away with metamorphic ...
pandichef's user avatar
1 vote
0 answers
2k views

How to convert my custom ERC20 token to BEP20?

I have my custom token on the Ethereum network and I want to send part of the tokens to the binance smart chain. That is, issue a wrapped token.For example: https://etherscan.io/token/...
rxxman's user avatar
  • 11
10 votes
3 answers
6k views

Passing constructor arguments to the CREATE assembly instruction in solidity

I have a contract which deploys other contracts by bytecode: contract DeployContract { function deploy(bytes calldata _bytecode) external returns(address addr) { bytes memory bytecode = ...
Bobface's user avatar
  • 385
1 vote
1 answer
144 views

How do I send funds from a contract to an account using bytecode?

The instruction CREATE will send funds to a new account. Is there another instruction for sending funds to an account that already exists? Or I just have to use CREATE as if the account doesn't exist?
alandefreitas's user avatar
1 vote
1 answer
731 views

ParserError: Expected token Semicolon

I got this particular Parser error and can you help me how to fix this issue:while using this code pragma solidity ^0.4.17; import "../node_modules/zeppelin-solidity/contracts/token/ERC20/...
Praneeth Vallabha's user avatar
0 votes
1 answer
157 views

How to determine if an internal transaction creates a new contract?

I'm working on programmatically analyzing smart contracts and I need a way to determine if an internal transaction is creating a new contract. Can this be done by looking at the event logs? Anyone ...
j4ys0n's user avatar
  • 193
7 votes
1 answer
5k views

CREATE opcode: what does it really do?

I am looking at the docs, but cannot really understand what CREATE opcode does. I can tell that CREATE does create a new smart contract from a memory chunk, pass the gas value to this new contract, ...
user311703's user avatar
134 votes
7 answers
73k views

How is the address of an Ethereum contract computed?

How is the address of an Ethereum contract computed? What use cases are there for knowing a contract's address in advance?
eth's user avatar
  • 85.9k