Skip to main content

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
1 answer
1k views

Do you need to publish the contract ABI and address for others to interact with the contract?

Suppose you write a contract that you want others to interact with. My understanding is that if you want others to interact with your contract, you need to provide the contract's ABI and address. Is ...
David's user avatar
  • 301
5 votes
1 answer
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 ...
Max Binnewies's user avatar
5 votes
3 answers
4k views

Deploying contracts on geth returns Error: connect ECONNREFUSED 127.0.0.1:8545

I'm using truffle (which uses pudding) to deploy contracts to my testrpc. No I'm running a geth instance locally with: geth --mine -rpccorsdomain "*" --ipcapi "admin,eth,miner" --rpcapi "eth,...
BlockChange's user avatar
4 votes
1 answer
736 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: ...
Interition's user avatar
4 votes
2 answers
790 views

Can the CALL opcode be used to create a contract?

The Yellow Paper Appendix H defines the CREATE and CALL opcodes. For CALL: the operand order is: gas, to, value, in offset, in size, out offset, out size. By setting the second operand (the "to"...
eth's user avatar
  • 86k
4 votes
2 answers
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 ...
mowliv's user avatar
  • 289
4 votes
1 answer
1k views

How to find constructor values being passed to a contract

I'd like to find out which values were passed in when someone deployed a CrowdSale token. Is there a way to find out. Here is Lunyr Crowdsale contract How would I find out which values they passed ...
rstormsf's user avatar
  • 4,357
4 votes
1 answer
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. ...
BlockA's user avatar
  • 857
4 votes
3 answers
1k views

Importing a contract from another contract in NodeJS app

I'm using a function in my NodeJS app to deploy contracts. The user inputs the contract he wishes to deploy and the app deploys it. The structure of the app is . ├── app │   ├── models │   │   └── ...
mcansado's user avatar
  • 841
4 votes
1 answer
4k 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 ...
daniel metlitski's user avatar
4 votes
1 answer
4k 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?
Resten's user avatar
  • 533
4 votes
1 answer
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?
Wang's user avatar
  • 2,426
4 votes
1 answer
1k views

What does scope do in the function itself?

Here is one of the functions I am curious about... function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external lock { require(amount0Out > 0 || amount1Out > 0, '...
Nika Kurashvili's user avatar
4 votes
1 answer
978 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 "...
Viking's user avatar
  • 41
4 votes
2 answers
598 views

How to deploy Smart Contract on Ethereum 2.0

I want to know how to deploy Smart Contract on Ethereum 2 Testnet using web3 ?
Amir Ali's user avatar
  • 447
4 votes
1 answer
3k views

Error: "The contract code couldn't be stored, please check your gas limit" [duplicate]

It's seem that is a very common topic but I couldn't find the solution in other questions, sorry for asking it again. I'm following a beginner example, trying to deploy a contract in Rinkeby Network ...
gbiatturi's user avatar
4 votes
1 answer
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 ...
manidos's user avatar
  • 4,298
4 votes
3 answers
1k views

how can library change state?

I have Very Interesting cases about Libraries. CASE 1: I read the following in the official solidity docs: Library functions can only be called directly (i.e. without the use of DELEGATECALL) if they ...
Nika Kurashvili's user avatar
4 votes
2 answers
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 ...
Buendiadas's user avatar
4 votes
0 answers
151 views

What happens in the account state when we pre-send ethers to a smart contract?

I'm asking this question in relation to this one : pre_sending Ether where the OP asked in a comment of the answer about what happens at the low-level when pre-sending ethers to a smart contract. As ...
clement's user avatar
  • 4,322
3 votes
1 answer
981 views

Could I give higher priority to transactions to mined right away?

For example on Linux we can give higher priority to processes for Linux Kernel to schedule. I am the owner of my Private Ethereum Network. As an owner, could I give higher priority to deploy or mine ...
alper's user avatar
  • 8,394
3 votes
1 answer
590 views

Should callbacks be called twice from both MyContract.new and MyContract.myFunction on web3 API?

When I instantiate a contract with myContract.new() like this: MyContract.new({ from: addr, data: code, gas: gas, gasPrice: price }, function (error, contract) { if (!error) { ...
Interition's user avatar
3 votes
1 answer
375 views

What will be the format of data to execute a function from web

I have deployed a cryptocurrent on Private testNet from here. I have deployed two contracts, lets call them contract1 and contract2. Contract1 has less features than contract2 (like transferFrom() ...
Prashant Prabhakar Singh's user avatar
3 votes
2 answers
319 views

Where to find the private key for my contract in blockapps?

I am trying to use blockapps-js to invoke functions on my smart contract deployed in blockapps. Since I need the private key for it, I am looking at the app/users/admin/.json file. Problem is I cannot ...
Clovis's user avatar
  • 881
3 votes
1 answer
1k views

Deploy a contract from Solidity Browser or geth on an external node(connected into private ethereum blockchain)

I am trying to deploy a Contract from Solidity browser || geth. On my server machine, inside solidity browser || geth I am able to deploy a contract. But from my external node, which is connected into ...
alper's user avatar
  • 8,394
3 votes
1 answer
5k views

Deploying contract with parameters using web3.js and Node.js

I try to deploy a ERC721 contract. Which is from OpenZeppelin. My contract constructor wants two input string fields. constructor(string _name, string _symbol) public { name_ = _name; ...
Amos Wu's user avatar
  • 33
3 votes
1 answer
481 views

No data is deployed in the contract address

I have followed the previous solutions to this problem as mentioned in this question: Mist: "No data is deployed on the contract address!" I also checked if the Estimated consumption fee ...
radiopassive's user avatar
3 votes
2 answers
1k views

Can we do ethereum transaction for free on private blockchain

I am very new to ethereum Blockchain. Please give some suggestion regarding one query regarding gas fee. Can we do ethereum transaction and smart contract deployment for free on private blockchain ...
Abhijeet1234's user avatar
3 votes
2 answers
1k views

Truffle on Windows 10: how to unlock an account for migration to a private network

I try to migrate a smart contract to a private network via truffle on Windows 10. I specify a certain account in truffle.js and so far I get the following error: Error encountered, bailing. Network ...
quervernetzt's user avatar
2 votes
1 answer
1k views

Ethereum Wallet: error of no key for given address or file

In etherum wallet I am getting an error of no key for given address or file during deployment of the contract. What will be the reason for the same? contract User{ string public userName; ...
M Pabari's user avatar
  • 111
2 votes
1 answer
185 views

where does function variables get created?

function element() public returns (uint) { uint test = 20; return test; } Where would test variable be created ? in memory or stack ? The funny thing is from testing assembly, I can see that it'...
Nika Kurashvili's user avatar
2 votes
3 answers
1k views

How do you implement a front-end contract with back-end functionality in Solidity?

How do you create a front end contract that calls a back end with the idea of being able to upgrade or change the back end contracts without having to redeploy the front end contracts?
Philip Rutovitz's user avatar
2 votes
1 answer
5k views

how do i pass by reference?

I have a couple of questions. First: So, In a function, i created memory array. I want to pass this memory by reference to another function.. function test2() public returns(uint a) { uint[2] ...
Nika Kurashvili's user avatar
2 votes
1 answer
2k views

How selfdestruct() works?

I'm wondering about how selfdestruct() actually works. Does it actually delete contract codes from the storage? Or just delete the contract address from state trie? If just deleting the contract ...
Guillaez's user avatar
2 votes
1 answer
1k views

Question about require keyword in solidity

Question 1) Let's imagine I have this code require(userVotes[msg.sender] == 0); presidents[_id-1].voteCount++; userVotes[msg.sender] = _id; so If I make a call to this function, and it doesn't pass ...
Chemistry's user avatar
  • 371
2 votes
2 answers
500 views

Why do people hash the address?

I recently saw a smart contract where the user used keccak256(address), is there any reason to do this, instead of just storing the address in the mapping?
WeCanBeFriends's user avatar
2 votes
4 answers
1k views

use web3js and infura deploy contract

const Web3 = require('web3'); const fs = require('fs'); const solc = require('solc'); let web3; if (typeof web3 !== 'undefined') { web3 = new Web3(web3.currentProvider); } else { web3 = new ...
Francis's user avatar
  • 21
2 votes
1 answer
72 views

Purchase real Ether and add to base/default account

I created an Ethereum Consortium Leader instance on Microsoft Azure and they provided us with an Admin site and RPC endpoint: http://someName.eastus.cloudapp.azure.com/ http://someName.eastus....
Vivek Sadh's user avatar
2 votes
1 answer
488 views

Truffle Deploy gas limit exhausted

I kept on getting this error. 9/10 of my deployment will fail. But out of the sudden it will be success without any reason. I have checked the transaction receipt and indeed it had reaches the gas ...
s k's user avatar
  • 886
2 votes
1 answer
916 views

Accessing/Modifying Options Parameters in Contract

I'm using truffle and metamask to deploy a very simple contract that enables the transfer of ether from one test account to another. How do I use my JavaScript file to access the options parameters ...
jwu's user avatar
  • 187
2 votes
1 answer
2k views

Stack too deep, try removing local variables with 13 variables [duplicate]

i am getting this error because i added so many arguments, i know it has a limit of 16 argument but i don't have 16 or more, yet i stil get the sam error. even when i used an array ( like some answers ...
Kaki Master Of Time's user avatar
2 votes
1 answer
1k views

Is it safe to publish to IPFS when deploying in Remix?

Could hackers use the metadata? Should I redeploy the contract? Since smart contracts cannot be changed it seems like a bad idea to let people see the source code/meta data despite mine being imported ...
fruit_punch_salad's user avatar
2 votes
1 answer
1k views

How can I decode transaction input to know what method was called and what arguments were passed in (and arguments types)?

following to the approach explained here to use etherscan api from Python to get transactions info such as input How to retrieve transactions' info such as gaslimit and gasprice from Etherscan? ...
MWH's user avatar
  • 363
1 vote
0 answers
46 views

abstract contract - how to do supportsInterface checks

OZ comes with UUPSUpgradable. My contract looks like this: abstract contract PluginUUPSUpgradeable is ERC165, UUPSUpgradable { // NOTE: I can't do type(PluginUUPSUpgradeable).interfaceId // ...
Giorgi Lagidze's user avatar
1 vote
1 answer
162 views

contracts being deployed via 0x61088480

Lately I am coming across different deployment tx data patterns. I am already familiar with how the free memory pointer is shifted from the usual 80 when there are immutables in the code (great ...
Pablo González's user avatar
1 vote
1 answer
915 views

Do contracts deploy their imported dependency contracts? Or do they point to live, already deployed versions?

This is a very newbie question about deploying contracts with imported dependencies. I'm using Chainlink's AggregatorV3Interface and SafeMath from openzeppelin. import "@chainlink/contracts/src/...
GN.'s user avatar
  • 643
1 vote
2 answers
576 views

What are Solidity Events in Etherscan?

When you go to a deployment contract on Etherscan, which are 0x addresses just like wallets, they have a tab called "Events". What are Events and how come only these deployment contracts ...
user610620's user avatar
  • 1,528
1 vote
2 answers
152 views

gas now strategy doesn't work

When I'm using GasNowStrategy("fast") in my contract deployment I get an error: from brownie.network.gas.strategies import GasNowStrategy def main(): dev = accounts.add(config["...
OmerS's user avatar
  • 13
1 vote
1 answer
1k views

Uniswap v2 running out of gas when deploying the Factory on ganache

I am trying to deploy the Uniswap v2 Factory contract on my ganache test network. I have compiled these contracts with my own compiler. But everything I attempt to deploy the Factory, I receive this ...
Cizia's user avatar
  • 263
1 vote
1 answer
448 views

Setting up a truffle project

I'm reading truffles's docs and am trying to build a custom project with a contract and a few test cases (written in a js file). I need to do this because testrpc is (considerably) faster than geth. ...
Sebi's user avatar
  • 5,284