Linked Questions

2
votes
1answer
201 views

How upgradeable smart contracts work? Is it possible to deploy a contract at a self-chosen address? [duplicate]

Is it possible to deploy a contract on the blockchain at a self-chosen address? When deploying a contract by sending contract code to the address null, the contract is created at a "random" address ...
0
votes
1answer
342 views

Calculating the address for a soon-to-be-deployed contract [duplicate]

How is it possible to calculate the address for a soon-to-be-deployed contract? Does anyone know?
0
votes
1answer
296 views

How are addresses generated for Smart Contracts? [duplicate]

How does ethereum generate Smart Contract addresses? It is any different from Ethereum generating addresses for accounts, (which uses rightmost 160 bits of the keccak256(Elliptic curve pub key) - ...
1
vote
0answers
116 views

How to compute the Contract Address from the Transaction Hash? [duplicate]

I am aware that different versions of this question were asked but my interest is specifically working out the contract address following dynamic deployment in a UI using web3 or something similar. I ...
0
votes
0answers
24 views

Predict a contract's deployment address [duplicate]

I have read it was possible to predict the address of a contract before deploying it. Do you know how can this be possible ? What happens if we send some Ether to this address before deploying the ...
0
votes
0answers
13 views

What is impacting generated contract address? [duplicate]

What is used to generate contract address. I found this project https://github.com/johguse/profanity And I want to generate vanity contract address. If I understand correctly it not depends from ...
33
votes
2answers
5k views

Do contracts also have a nonce?

Do contracts also have a nonce and if so how is it calculated? Usual accounts have a nonce that is increased with every transaction. However, contracts can't make transactions, they can only make ...
20
votes
6answers
20k views

How to find contract's address?

I successfully setup a private blockchain and created the "hello world" contract according to tutorial from etherium web site. One thing that I can't figure out is how to find the contract later. I ...
8
votes
2answers
4k views

Is address(this) a valid address in a contract's constructor?

When does a smart contract's address first become valid? Is the address during the execution of the contract, or only after it's been fully instantiated and initialized? In other words, is a contract'...
10
votes
1answer
2k views

Why was RLP chosen as the low level protocol encoding algorithm?

Is this an ad-hoc decision? Why RLP? Is it specifically suited to something?
2
votes
3answers
6k views

What is address(this) in solidity?

As per my understanding contract`s own address is the address which we assign to owner of contract using msg.sender. But I saw this question on SE where it was described that a contract can access its ...
6
votes
4answers
2k views

How to deploy smart contract in predefined contract address in private ethereum network?

Is there any method to deploy our smart contract in a particular address (ie. predefined contract address) in private ethereum network? Yes, I have built my own private blockchain based on Ethereum ...
4
votes
3answers
2k views

How do I determine whether the transaction is used for the contract creation?

I want to monitor Ethereum and memorise every contract published on the blockchain (basically the same thing that Etherscan does). How it is possible to do this using NodeJS & web3? How can I ...
13
votes
4answers
1k views

Deploying a contract from a multisig wallet

I created a multisig wallet using Mist, but don't know how to deploy a contract from the wallet address. Is it even possible? If so, how to do this?
6
votes
2answers
1k views

Generate contract address using nonce

Good day, I was looking at the way contracts addresses are created and it seems that the process is quite deterministic (depends on the nonce). Is there a way to get the address of a contract that ...
5
votes
2answers
2k views

Is it possible to send a smart contract to an address wallet?

As explained here, a smart contract is deployed on the blockchain via a transaction, with the following code: var primaryAddress = eth.accounts[0] var abi = [{ constant: false, inputs: { name: 'a', ...
3
votes
4answers
2k views

How to calculate an Ethereum Contract's address during its creation using the Solidity language?

Now I know and have read the other thread saying that a contract's address is created deterministically via RLP encoding the creator's address and his nonce and then hashed with Keccak-256 but the ...
3
votes
1answer
1k views

Can I deploy a contract to an arbitrary address that I choose?

If I want to create a smart contract by executing a raw tx, is it mandatory to compute the new contracts address the way it's been defined, or could I pick my own address arbitrarly? Why?
1
vote
6answers
1k views

How to get all contracts deployed by the address, given the address?

I want to get addresses of all instances of Contract X deployed by Account Y. How can I do that? I have to do it programmatically and fastest possible way.
7
votes
2answers
218 views

Avoiding ownership cycles in contracts

I am repeatedly facing this issue with structuring contracts' code: contract Allower { Allowed allowed; function doSth() onlyallowed; modifier onlyallowed { if (msg.sender != ...
0
votes
3answers
2k views

How to get blockNumber of contracts deployed with truffle?

We deploy our contracts with truffle migrate. We need the blockNumber of the contract deployment transaction in the webapp. We could use web3.eth.getTransaction(txhash).blockNumber() but can't get ...
4
votes
1answer
583 views

From an account's address is it possible to tell whether the account is a contract account or externally owned contract?

I am trying to visualise transactions for Ethereum, currently, I know there are blockchain explorers such as Etherscan.io and Etherchain.org, however I don't want to keep calling their API to get data,...
4
votes
1answer
540 views

Is there any way to re-deploy, to the same address, a contract that wasn't deployed due to an out-of-gas error?

Suppose that you deployed a contract, but your transaction got canceled due to an out-of-gas error. Is there any way to re-deploy the contract so that it takes the same address?
4
votes
1answer
539 views

Is the address of a Smart Contract fixed?

I would like to know if the address of the smart contract is fixed. I want some privacy for my application, so I would like to change the sending address and receiving address each time the smart ...
2
votes
1answer
967 views

Determining Contract Address with web3 1.0

I am using a local testnet node (Geth 1.7.3) in light mode, and in such case the transaction receipt does not contain the contractAddress when a new contract is deployed. Therefore I am looking to ...
4
votes
3answers
151 views

Deployed contract not callable anymore

I deployed a contract yesterday which was mined and which was responding to calls. Today the contract "does not live" anymore. Do I need to redeploy? Is there a way to find addresses of contracts I ...
0
votes
3answers
660 views

Create a smart contract with ether balance

If i want write a smart contract with having a ether balance what should i do? for example writing a smart contract that send a ether to a address.
0
votes
2answers
592 views

How to get deployed contract's address via JSON RPC?

Knowing the hash of a transaction that created the contract, how do I get the address of created contract? For instance: curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","...
1
vote
2answers
575 views

Lost my deployed contract code. Anyway of viewing this?

Long story short I lost the contract code that I deployed. This is deployed to the live net. Is there anyway of being able to view the source of the contract code that has been deployed?
1
vote
1answer
434 views

Creating a contract ERC20 and sending a transaction, get balance (web3)

This is my first time creating a contract. I need to create a TEST contract ERC20. After researching I understand ERC20 is like an abstract class which tells which methods should be implemented in ...
1
vote
2answers
342 views

Create a contract at a defined address?

Is it possible to define a smart contract at a predictable address? 0xf0 CREATE in the Yellow Paper suggests that the address is deterministically determined by x = A(Ia, σ[Ia]n) page 29 of http://...
1
vote
1answer
310 views

Deploy new contract through another contract function in Truffle

I have a function in my contract minter.sol that creates another contract etnX.sol: function createNewContract(string memory name, string memory symbol, uint256 _maxSupply) public onlyOwner { ...
0
votes
1answer
470 views

How to compute ethereum contract address with java?

I'm looking for the java version of the solution of this question. How is the address of an Ethereum contract computed? Actually I want have a solution of the problem below. I have a master ...
2
votes
2answers
190 views

Is there any difference between address that have Smart Contract and “normal” one? [duplicate]

Is there any difference between address that have smart contract on it, and "normal" address (address that You can create private and public key pair)? For more context, this is the problem I'm ...
2
votes
1answer
223 views

Random contract address generated by sendTransaction when receiver is undefined

I am new to Ethereum, trying to get the hang of using geth and web3js. Looked around and could not find a similar issue, would appreciate some explanation over the following. I tried to create a ...
2
votes
1answer
363 views

How are addresses created if deploying a new bound contract

How exactly are the contract addresses created that are returned by the DeployNewXYZ() method a bound contracts? Is it possible that, if the method is called rapidly consecutively, the same address is ...
3
votes
1answer
218 views

contract address without transaction

In the documentation for parity's PoA chain it is mentioned that you should add the address of the contract which determines the validators to the genesis file. The function getValidators will be ...
2
votes
3answers
275 views

How to generate an ethereum address?

How an EOA, contract address can be achieved? What is an mechanism for generating these?
2
votes
1answer
262 views

Vanity Contract Address with Solidity Deployment?

I would like for my contracts to have vanity addresses, more specifically to begin with the word "face" such as "0xface...". I have the following code to deploy a Token, and my problem is deploying ...
1
vote
2answers
413 views

Transaction Hash after deploying contract with Web3.py too long

I managed to successfully deploy a contract using Web3.py to the Ethereum Ropsten network using this bit of code def deploy(self): instance = self.w3.eth.contract(abi=self.abi, bytecode=self.bin) ...
1
vote
1answer
300 views

Correct way to deterministically compute contract address in Python

To begin with, I have already gone through the approach outlined in the following thread: How is the address of an Ethereum contract computed? I wanted to test if the approach actually works. On my ...
1
vote
1answer
174 views

How can I increase the nonce in Smart Contract?

We all know that the nonce of smart contract can be added 1 time when one subcontract is created using solidity. I'd like to know if the creation of subcontract is the only way to increase nonce. If ...
0
votes
1answer
280 views

CREATE / CREATE2 Verification

Where do I verify whether a contract has been created with CREATE or CREATE2, would I have to disassemble the contract and look for a CREATE2 opcode in the contract creation code?
1
vote
1answer
241 views

newing up a new contract in solidity

I'm attempting to copy the same concept as used in the ENS registrar contract like line 355: // Creates a new hash contract with the owner Deed newBid = (new Deed).value(msg.value)(msg.sender)...
3
votes
2answers
85 views

Making a contract unreproducible

I want to make a contract, from a factory contract, that can't be replicated by contracts deployed by other addresses. The factory contract will be called by different addresses so signing a piece of ...
3
votes
1answer
165 views

Can I send ether when a contract creates a new contract?

Is it possible to do something like registry = new assetRegistry.value(1 ether)(); ? This is particularly useful when the constructor function of assetRegistry calls the ethereum alarm service,...
2
votes
1answer
172 views

Contract addresses and Unused Wallet addresses

As I understand it, you can instantiate a contract at any valid address that hasn't yet received ether, by sending a transaction, which contains the contract code as the data payload, to that address. ...
1
vote
3answers
198 views

Is it possible to deploy a contract on the same address after self-destruct?

As far as I understand self-destruct simply deletes the code from a contract and turns it into a regular wallet + it sends all funds to caller/argument. But is there a way to recreate the contract? I ...
3
votes
2answers
68 views

Smart contract - require token balance in constructor

I want to build a smart contract which can only be constructed, if there's an amount x of a specific ERC20 token available to spend for this contract. So either the contract has to be allowed to spend ...
1
vote
2answers
52 views

find out network using contract address

I know that in Ethereum, same addresses works across the network(mainnet and all testnets). But I am looking to know if there are any chances to find out the network on which a contract is deployed ...

15 30 50 per page