Questions tagged [contract-deployment]

The act of pushing a compiled smart contract in byte code to the Ethereum blockchain.

Filter by
Sorted by
Tagged with
5
votes
2answers
1k views

Contract creation gas cost depends on code in library function?

I have a contract fooContract which is using a fooLib library, calling fooLib.foo(LibStruct storage param) The transaction cost to create fooContract seems to depend on the code in the fooLib.foo() ...
5
votes
0answers
390 views

How to deploy a contract with inputs by using JSON-RPC? [duplicate]

I can deploy a simple contract without any input by using JSON-RPC, like: curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from":"sender's address","code":"compiled ...
4
votes
2answers
747 views

Etherscan verification purpose

What is the purpose of the smart contract code Etherscan verification? Is it meant to verify ownership, or malicious lines of code, or something else?
4
votes
3answers
2k views

Compiling contract in web3: “Method eth_compileSolidity not supported”

I have web3 and truffle running. I am able to execute the following commands: > node > Web3 = require('web3') > web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); >...
4
votes
3answers
835 views

What is the right way to store and retrieve a contract address?

Suppose I create a new contract with: web3.eth.contract(abi).new({ data: code }, (err, contract) => { ... }) Inside the callback I am able to get the contract.address of the new contract. I can ...
4
votes
2answers
5k views

Truffle migrate: store deployed contract address in variable

How can I store the address of a deployed contract into a variable of another contract, e.g. using a placeholder? contract One{ function One(){ } } contract Two{ address oneAdd = "Put ...
4
votes
2answers
2k views

Contract deployment throws block gas limit error

I'm trying to deploy a smart contract in a test network, using a [meteor DApp][1]. I have this parameters for the genesis block: gasLimit: "0x1388" However, any time I try to deploy any single ...
4
votes
2answers
775 views

Can an ENS name point to a contract address?

I know that an ethereum wallet address can have a ENS (Ethereum Name Service) name, but it is possible for a contract? So instead of giving the contract address is it possible to give the contract's ...
4
votes
3answers
3k 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 ...
4
votes
2answers
3k views

How much does it cost to upload a smart contract?

I'm using a local Ethereum testnet and it seems to me that the price of uploading a smart contract is a bit too high. This is the code for the smart contract: contract Transfer { address owner; ...
4
votes
1answer
3k views

How can I know how much a contract deployment will cost?

I'm trying to deploy a contract into ethereum, but I keep getting "out of gas" error. How can I know in advance how much ethers I need to deploy a contract?
4
votes
3answers
158 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 ...
4
votes
1answer
3k views

Max possible ERC20 Tokens allowed with 18 decimals?

I would like my token to have the maximum possible amount of tokens issued as a novelty. I would like to use 18 decimals standard ERC20 token, what value can I put in to get the maximum amount of ...
4
votes
1answer
578 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
2answers
556 views

Contract created by another contract and exceptions

I have two questions regarding contract creation and exceptions: If contract A creates contract B and then throws in the same function, is B also deleted? If contract A creates contract B, and B ...
4
votes
1answer
2k views

Exceeds gas block limit error when deploying near block gas limit contract

I'm trying to create a wallet contract using Geth 1.5 --light and Mist Wallet 0.8.7. Estimated gas cost for the contract creation is 1,962,239 while the gas limit is 1,998,227. So, everything should ...
4
votes
1answer
633 views

Understanding TokenCreator/OwnedToken example from Solidity documentation

Here's the page containing the example https://solidity.readthedocs.io Here are two contracts that are supposed to work together(my questions are below): Here's how I think it works. Please correct ...
4
votes
2answers
350 views

Contract deployment - Error URI Too Long

I was trying to deploy a smart contract using the remix IDE. Everything was working fine and suddenly I started getting this error. Spent a couple hours solving it. No luck! Is this an issue with the ...
4
votes
1answer
355 views

How to pass parameters to Contract constructor using when using assembly?

Here I have a function which deploys a Contract straight from bytecode, but let say my contract needs some arguments in the constructor, is it possible to pass them through create opcode? function ...
4
votes
2answers
734 views

Deploy Contract (compiled by Truffle) without using Truffle

A contract SimpleStorage.sol has been compiled by Truffle using truffle compile. Its artifact is found at build/contracts/SimpleStorage.json. However, this contract should only be deployed to the ...
4
votes
1answer
6k views

Constructing contract with an address array

Please correct me if I am wrong but I understand you cannot initialise a contract with a string array as it is a dynamic type but can I initalise a contract with a fixed type? specifically an array of ...
4
votes
1answer
619 views

When i am deploying contract getting the “Error: The contract code couldn't be stored, please check your gas amout”

case 1. When my contract estimate gas is 72,75,790 by web3.eth.estimateGas method in my private blockchain.It works fine and contract deployed. case 2. My Contract estimate gas is 50,000,000.and ...
4
votes
1answer
4k views

How to specify the gas when deploying a new contract in Mist?

When I send transactions to my contract, the wallet tells me that the gas runs out, so how can I specify the gas amount when deploy a new contract?
4
votes
1answer
1k views

Can't deploy a contract that calls another contract

When I run the below code when connected to geth --dev --mine, the output is: A transmitted, waiting for mining... aAddress: 0xbaxxxxx4ae42d B transmitted, waiting for mining... bAddress: ...
4
votes
2answers
923 views

How to compile Solidity ^0.5.5 contract with Node.js?

I am terribly new in Solidity and now I try to learn how to compile a contract in Solidity ^0.5.5 (No versions below). I have the contract as follow (UsersContract.sol) pragma solidity ^0.5.5; ...
4
votes
1answer
860 views

Error: invalid address during truffle migration process in Rinkeby network

I can't deploy my contract to Rinkeby network through truffle migrate --reset --network rinkeby. My truffle.js file looks like this: { networks: { rinkeby: { { ...
4
votes
1answer
261 views

Error deploying Ethereum contract: The transaction from “Account Name” to undefined couldn't be successfully executed

I'm going through the tutorial in Ethereum website and trying to Deploy a contract to TESTNET, copied from the Ethereum page. When I deploy it, it errors out: "The transaction from Test Contract ...
4
votes
2answers
3k views

Address is undefined after deploying a smart contract

I tried deploying a greeter contract as shown here , I thought the deployment is suceess but i am unable to get the address of the contract, it always shows undefined. When I tried to execute the ...
4
votes
2answers
1k views

truffle deploy to geth failing, generating “receipt not found” repeatedly from geth

I've just installed truffle on an ubuntu virtualbox, and it is failing to deploy to a geth dev setup. Geth gives me a never-ending receipt not found for transaction ...
4
votes
3answers
2k views

How to inspect state of smart-contract whose code I do not have?

Often it is argued that one big advantage of blockchains is that anyone can come along and inspect the state. However I have not found any practical guide for doing this. Block explorers allow us to ...
4
votes
2answers
2k views

Using a contract multiple times with multiple people

Just a question for my understanding. Let's say I have a contract that has two people involved (for example, a buyer and a seller). Through ethereum, is it possible to re-use this contract and use an ...
4
votes
1answer
1k views

Contract deployed successfully to Ganache via Truffle, fails to deploy on live network

I basically followed this Zeppelin crowdsale tutorial, just changed the names of the contracts. I was able to successfully deploy on a local Ganache, but then when trying to deploy to the live ...
4
votes
1answer
928 views

Using truffle migrate with Ledger Nano S

I am using truffle to develop new contracts and I have successfully deployed contracts to the Rinkeby Testnet directly with truffle. However, this process, like the one using the MainNet, requires ...
4
votes
1answer
2k views

How to minimize gas consumption during contract creation

I have trouble deploying a contract to the main network and I believe this is due to high gas consumption. An earlier version of the contract worked on the main network. The current version works in ...
4
votes
1answer
953 views

How to deploy dependent contracts with Ethereum Wallet

I have two contracts (i.e. contractA, contractB) located in different files (i.e, contractA.sol, contractB.sol) to deploy. The contractB is dependent on contractA. In contractB.sol, import "...
4
votes
3answers
560 views

how do you sign transactions programatically?

imagine there's a dapp you're building and on your website users type the receiver address, the value and what you do is send from that user's address to the receiver's address the value ether. My ...
4
votes
3answers
392 views

Publishing contracts with libraries using web3.py

Im trying to publish contracts with libraries in them and im getting the below issue. Contracts without libraries publish just fine. Can someone who might have faced this issue before advise what the ...
4
votes
4answers
657 views

how to deploy a smart contract in private blockchain

I established a private network with 10 computers(nodes). I created a sample smart contract. Now I need to deploy these contract in my private blockchain. As we know that we need ethers to deploy a ...
4
votes
2answers
401 views

If two people create the same smart contract, is it stored twice?

There are many cases where the same contract gets deployed many times. Now obviously each contract has its own persistent data storage and everything, but is each contract’s bytecode also taking up ...
4
votes
2answers
899 views

should we create a contract instance every time we interact with the contract?

I am following a tutorial. contract contract Auction { event AuctionClosed (uint highestBid); //declare eventto be triggered when Auction closes address public creator; function Auction () {...
4
votes
1answer
3k views

Contract deployment error : value.forEach is not a function

This is a simple contract I am trying out with an Ethereum testrpc instance. pragma solidity ^0.4.11; /// @title List // Begin contract defintion contract List { struct ListMembers { ...
4
votes
1answer
444 views

Trying to deploy a contract on Kovan testnet with Parity and it's waiting forever for a confirmation

It says it's waiting for a contract deployment transaction receipt and it just sits there and waits. It never moves to the completed stage. It was working fine for me a week ago. What's going on?
4
votes
1answer
877 views

Parity private chain: Contract deployment transaction not getting mined

I have some simple Solidity code to test contract deployment and invocation. It has methods to write a value to storage, and a method to read it. This worked perfectly well with a private chain with a ...
4
votes
1answer
225 views

Contract storage not changing on calling function

contract SimpleStorage { mapping(bytes32 => string) storedData; function set(bytes32 key, string value) { storedData[key] = value; } function get(bytes32 key) constant ...
4
votes
1answer
1k views

Create a new contract by JSON-RPC of cpp-ethereum

I want to create a new contract by JSON-RPC and cpp-ethereum. I find out eth_sendTransaction can help me to do this. And let do it, I need to set "to" parameter like that: to: DATA, 20 Bytes - (...
4
votes
1answer
1k views

Truffle Dapp Deployed Contract Access

Which function we need to use in truffle for the communication of second Dapp to the contract deployed on blockchain by first Dapp, because contract deployed by truffle is not accessible by geth node. ...
4
votes
1answer
666 views

How do you provide a GasPrice and GasLimit to overcome the “low tx nonce or out of funds” log message

I am getting the following logged by my private chain geth node when running a test in truffle: removed tx ( TX(ff8ec4f713e64fb25df07d153607e29629c9276b57e0b7e331f17b5a3c31fdd1) Contract: ...
4
votes
1answer
1k views

MIX dapp IDE - how to run your dapp after deployment, error web3 is not defined

I managed to run a personal test chain. I deploy the Sample contract and everything is ok. Transactions included. Now how can I run the dapp? I go to the local package folder inside www I open the ...
4
votes
3answers
117 views

What are the available options (March 2021) for bridging tokens across the chains?

Actual problem in mind I would like to release a token for the Island DAO. I'm worried that ETH gas prices are prohibitively expensive - if I use ETH, the smaller guys will not come. But ETH is the ...
4
votes
0answers
64 views

What's the point of Truffle Migrations?

I've been reading a few articles and StackExchange posts (e.g. What are truffle migrations?) about Truffle Migrations, but I still don't get it: why do we need them? It seems they do only one thing (...

1 2
3
4 5
25