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

How to get the balance of a contract using web3.js?

I have deployed a contract as follows and determined its balance to be 5000 wei (value: 5000): const thisContract = new web3.eth.Contract(abi); thisContract.deploy({ data: bytecode, ...
0
votes
2answers
675 views

How to store a Big Number?

I need to determine an expiry date for a contract a for this I use the foloowing code as the constructor of the contract : constructor(address _recipient, uint256 duration) public ...
0
votes
1answer
343 views

Solidity: Send a new contract ether in constructor

I tried doing address NewContract = new SomeTest.value(1 ether)(); But this yields a syntax error. I try to call the payable constructor of a new contract with ether. What is the syntax for this?
0
votes
1answer
61 views

Is the Ethereum blockchain a list/chain of transactions or a list of contracts?

Ethereum newbie here with some general programming knowledge including basic Solidity. Below is my current mental picture of how Ehtereum works (please correct me if wrong). A contract is a class (in ...
1
vote
1answer
1k views

Getting this message in mist: Couldn't estimate gas, resorting to default parameters. Transaction is likely cheaper than the estimate

What is this error message in red: Couldn't estimate gas, resorting to default parameters. Transaction is likely cheaper than the estimate I have written a smart contract: pragma solidity ^0.4....
2
votes
1answer
681 views

Error from sendSignedTransaction: Error: Returned error: replacement transaction underpriced

I am the beginner in Ethereum stuff need guidance please help I am running a private ethereum network and using mist wallet here is my contract code pragma solidity ^0.4.0; contract MyFirstContract ...
0
votes
1answer
92 views

Is there a better way to implement search functionality?

Take the following code for example: pragma solidity ^0.4.23; import "./MyContract.sol"; contract MyFactory { address[] public myContracts; function createContract(string ...
0
votes
1answer
191 views

How can I access a contract deployed by another (deployed) contract?

I am currently working on voting contracts modeled after a particular electoral system. My intention is to first deploy the MasterConstituency contract manually and to have that contract deploy ...
1
vote
0answers
84 views

Why transaction hash isn't available inside solidity function call

I recently bumped into this Is it possible to get the transaction hash from within a Solidity function call? while I was looking for a way to save the transaction hash inside my contract. And ...
1
vote
2answers
341 views

Can't deploy to a private chain using Truffle

I created a private Parity chain using the official tutorial (https://wiki.parity.io/Demo-PoA-tutorial). Then I set it in my Truffle config: module.exports = { networks: { private: { host:...
0
votes
0answers
38 views

Solving forwarding issue in smart-contract deployment

I've tried to create a smart-contract that automatically forwards incoming transaction to parent address. The issue there is gas amount since I've failed to create a function that pays for gas from ...
0
votes
1answer
74 views

Is it good approach to interact with smart contract using c# library instead of Web3-js?

I'm learning Ethereum, and having web application development experience mostly with Microsoft Technologies such as ASP.NET MVC and WebAPI. I've learned Solidity recently!. After reading about ...
0
votes
1answer
154 views

Smart contract verification

I want to create a token using smart contract. Before deploying it on the blockchain, do I have to get the smart contract verified from the third party or can I directly deploy the contract?
1
vote
1answer
103 views

Deployment of DAPP smart Contract on Ethereum MainNet

We are developing a DAPP based on ethereum. Current we are developing based on testrpc and its working perfectly. We do want to decide on where to deploy DAPP. Can we deploy on public Ethereum ...
1
vote
1answer
54 views

Where do i put main address on this script to redirect eth to main address?

pragma solidity ^0.4.2; /** * Contract that will forward any incoming Ether to its creator */ contract Forwarder { // Address to which any funds sent to this contract will be forwarded address ...
0
votes
1answer
238 views

How to deploy a contract? [duplicate]

Say I have the Ballot Smart Contract on my Mist Remix IDE. Where do I go from there? I am completely lost. I compile the code. Then how do I deploy it. How do I provide the names for the proposals? ...
0
votes
2answers
50 views

Where the Smart Contract deployment charges goes?

I'm newbie to Ethereum, and finding answers of some questions that I have. I have learned about SC deployment that deploying the contract cost 0.01072934 ether, or about $3.21 USD So, where that cost ...
0
votes
1answer
61 views

Which is the correct spot to put destination address?

pragma solidity 0.4.21; contract Forwarder { address public destinationAddress; event LogForwarded(address indexed sender, uint amount); event LogFlushed(address indexed sender, uint amount); ...
2
votes
1answer
86 views

Interacting with a Custom Token Contract

I seem to be having problems interacting with a custom token contract. I am using truffle and ganache for my testing. I am trying to interact with the custom token contract so MyContract can ...
0
votes
1answer
168 views

Develop with Parity?

I've seen a few tutorials that explain how to write contract code right inside the Parity's web interface. However, web interface says it's deprecated, and when I open the desktop UI, it doesn't have ...
1
vote
1answer
441 views

How to deploy a contract using metamask and the callback?

I'm trying to deploy a new contract with metamask (in my javascript frontend app). The problem is that, when the receipt is returned, the address is "undefined" since, I suppose, the transaction is ...
0
votes
1answer
38 views

Contract deployment won't confirm in mist wallet

I'm trying to deploy a contract on the mainnet, and I'm using Solidity 0.4.24 I can only deploy the contract as byte code because I can't figure out how to upgrade the solidity compiler in mist (the ...
0
votes
2answers
86 views

How smart contract versioning work with compiler?

As Solidity is keep updating and so the compiler. In the beginning there was constant keyword which now is deprecated. So how does that smart contract is still working? If i make some contract with ^0....
0
votes
1answer
318 views

Basics and Workflow on Smart Contracts creation and execution

I'm confused about how the Smart Contracts work internally. I've read this: https://blog.zeppelin.solutions/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05 TLTR: there is an ...
1
vote
1answer
830 views

Error Deploying using truffle-contracts: Cannot read property 'apply' of undefined

I am using truffle-contract package to deploy a contract that was compiled by using truffle compile deploy.js const Web3 = require('web3'); var provider = new Web3.providers.HttpProvider("http://...
0
votes
1answer
34 views

How do I find how much money is stored on all deployed instances of a contract?

I am reviewing a certain contract, and would like to gauge how much money is stored on all deployed instances of this contract. Someone told me I can deploy a new instances of the contract to mainnet,...
2
votes
1answer
172 views

TimedCrowdsale.sol does not implement all functions and thus cannot be created

I found success in deploying Crowdsale.sol on ropsten testnet but I am finding trouble with TimedCrowdsale.sol I am using OpenZeppelin contracts of TimedCrowdsale.sol, SafeMath.sol, Crowdsale.sol, ...
0
votes
1answer
70 views

Transactions confirmation

I am using geth --dev --ipcpath ~/.ethereum/geth.ipc --minerthreads=5 console to run privatenet. So i use Etherium wallet to interact with it. The problem is that i need to do some transfer ...
1
vote
3answers
60 views

What’s the point of setting To when use using the create() opcode?

The to header is normally optional when creating a smart contract… But though reading JSON-RPC documentation, I saw it was possible to set the To field of a transaction creating a smart contract ? ...
0
votes
2answers
41 views

Is Ethereum a common blockchain for all type of smart contracts (several thousands)

I have read that full nodes run all the contracts(several thousands) to verify them so aren't they using too much energy (and also thus spending money) to verify each and every contract that is ...
2
votes
0answers
281 views

Can you deploy a contract from a Ledger Nano S using Remix?

I have deployed a contract from a Ledger Nano S before by connecting to MEW and deploying using Bytecode and ABI of the contract. However I do not know what compiler version MEW used and so cannot ...
5
votes
3answers
2k views

Deploying a contract with Web3.js

I am trying to deploy a contract as explained in this section on Web3.js docs. As I understand it, I need to do the following: Create a new contract via web3.eth.Contract Take the returned-object ...
1
vote
0answers
527 views

Deploying a contract to Parity via Web3.js

I am trying to deploy a contract to Parity via Web3.js. Here is my code: let fs = require("fs"); let Web3 = require('web3'); let NODE_URL = "http://localhost:8545"; let OWNER_ADDRESS = "0x..."; ...
2
votes
4answers
743 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 ...
0
votes
1answer
66 views

How do I deploy a contract when my blockchain isn't syncing?

I would like to deploy a smart contract using truffle but I got problems while syncing the etherum blockchain. There are always blocks left and the syncing process is never finished. I don't want to ...
-1
votes
1answer
93 views

why i have a lot of warnings in the function setprice part? Thanks [duplicate]

Can some one help in explaining why i have a lot of warnings in the ( function setprice ) part and why the contract dont compile in the Ethereum Windows wallet? I added the ( function setprice) so ...
2
votes
2answers
762 views

Constantly getting “Gas estimation failed” error when attempting to deploy ERC20 Token contract on Rinkeby testnet

I have included the code for the contract below. The error I get when attempting to deploy in remix via metamask is: Gas estimation errored with the following message (see below). The transaction ...
2
votes
1answer
38 views

Contract and the transaction that creates the contract

Are those different? Blockchain is a list of transactions bundled into blocks. Thus, it is clear that all transactions are recorded in the blockchain. But then where are the contracts stored?
2
votes
2answers
738 views

Creation of smart contracts (contract accounts)?

When I create a new Externally Owned Account it is not yet in the Ethereum blockchain. Information about this account appears (gets stored) on the blockchain only when the account balance changes. ...
3
votes
0answers
375 views

Truffle contract migration deploying same contract on multiple address

I deployed multiple contracts of which some are linked to one another using truffle migration on the testrpc . In my web3 call for a function of one of the contract, instead of returning the current ...
1
vote
3answers
664 views

Minimal investement is not working

uint256 public max_contribution = 50 ether; uint256 public min_contribution = 0.1 ether; function transfer(address to, uint tokens) public payable returns (bool success) { require(msg.value &...
0
votes
1answer
201 views

Best way to deploy a ERC20Token to the mainnet

I'm planning on deploy a ERC20 Token Contract to eh Main-net. I've tested it on both Rinkeby and Ropsten, deploying from different platforms. Parity,Ethereum Wallet, Remix with metamask. I wanted to ...
2
votes
0answers
57 views

Get Contracts Deployed Count on Quorum Blockchain?

I have lost count of the number of smart contracts deployed on my quorum blockchain. What are some negative impact/implications of forsaken smart contracts on a private blockchain such as Quorum? ...
0
votes
0answers
24 views

Minimal investement problem

uint256 public max_contribution = 50 ether; uint256 public min_contribution = 0.1 ether; function transfer(address to, uint tokens) public payable returns (bool success) { require(msg.value &...
0
votes
1answer
110 views

Cann`t deploy contract using pragma solidity 4.21 (after solidity 4.20)

I cant call me a pro at all. Rather newbie than pro, wishing to learn and develop. I`m sincerely asking you to help me. I have the token and crowdsale contract (testing) which I deploy and initialize ...
0
votes
2answers
264 views

Truffle deployment error with infura

I am stuck with an issue as the contract works fine with remix ide and local ganache provider but when I am trying to use truffle with infura apis to deploy the contract over rinkeby testnet, I keep ...
0
votes
1answer
210 views

How to get all the contracts deployed by a specific ethereum address?

It is anyhow possible to get all the contracts deployed by a specific ethereum address in lifetime? If yes, is it possible to get ABI details of the contract by their address?
0
votes
1answer
169 views

Ethereum account code hash

I've created a contract https://ropsten.etherscan.io/address/0xfaba4475358c1c23e37549f9bd54300261873d41#code And using its createChild() method I've created 3 children https://ropsten.etherscan....
1
vote
1answer
268 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 ...
0
votes
2answers
115 views

Unable to deploy smart conrtact using node js (not truffle)

here is the code as explained in web3 doc(node:13887) web3.eth.estimateGas({data: '0x' + bytecode}).then(value=>{ console.log('gasEstimate = ' + value); let MyContract = new web3.eth.Contract(...