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
7
votes
2answers
940 views

Is there any limitation for the number of the return values from Solidity functions?

Answer of this question (https://ethereum.stackexchange.com/a/3590/4575) says that: "I am not allowed to return dynamic arrays from Solidity functions yet." On the other hand, Solidity supports ...
7
votes
2answers
8k views

How to give struct members default values

I am working on some complex Relational databases like structure in solidity and need to have some values initialized to a custom value not the usual 0. I want to do something like this : (Status is ...
7
votes
2answers
587 views

Is it possible to invalidate a smart contract?

How can I invalidate a smart contract that has already been deployed? I might want to do so because of business reasons, and maybe beneficial network effects. Is it possible to invalidate a smart ...
7
votes
2answers
2k views

Unable to deploy contract to private blockchain using Web3j (Java client) because of TransactionTimeoutException

I am using Web3j for interacting with my private blockchain network created in Azure. I have created contracts using Remix and Metamask and was able to view that Contract from Java. However I was ...
7
votes
3answers
4k views

Cannot verify contract with multiple arguments at etherscan.io

When I enter all the information about a contract, the system displays the error: Error! Invalid constructor arguments provided. Please verify that they are in ABI-encoded format I fill in the ...
7
votes
1answer
2k views

How can I deploy a contract with reference to a library contract without using a graphical user interface like Browser Solidity?

I am using Solidity Browser to deploy a contract due to from Library contract method failing #2831 issue. On this following answer https://ethereum.stackexchange.com/a/9181/4575 I have guided to use ...
7
votes
1answer
1k views

How to call Library Function from a Contract? => [error] The contract code couldn't be stored, please check your gas amount. undefined

When I compiled following code at "https://ethereum.github.io/browser-solidity/" it gives me two Web3 deploy code for: var libraryContract = web3.eth.contract(...); //Web3 deploy code var ...
7
votes
1answer
3k views

geth: view all current contracts on a private testnet?

How can I query a list of all current contracts with geth? Is there a way to see the contracts' class names?
7
votes
2answers
651 views

How many Ethereum contracts have been published?

Is there a place to see how many Ethereum contracts have been published? If someone wanted to calculate that, it would just be total number of accounts minus accounts with code, right? Any ...
7
votes
1answer
1k views

What is the best way to send multiple transactions without running out of gas for seeding?

I'm having an issue where sending a single transaction work but sending multiple doesn't. I'm attempting to Seed my contract with data using using web3.js and it works fine. mycontractinstance....
7
votes
2answers
6k views

What is use of HDWalletProvider in Truffle config?

The sample code here for deploying to Ropsten used HDWalletProvider and a mnemonic in the config, but I am not sure I understand its purpose. Is this just telling it the account that will become the ...
7
votes
1answer
170 views

Distinct, inconsistent compilation of inherited but identical contract in solidity

Consider the following solidity source file A.sol: pragma solidity ^0.4.8; contract A {} and B.sol: pragma solidity ^0.4.8; contract A {} contract B is A {} Using solc version 0.4.8, the code ...
7
votes
2answers
2k views

How do I determine the constructor ABI for Etherscan contract verification?

I am facing issues trying to verify a contract that I deployed on Rinkeby. My contract constructor has 3 parameters, how do I pass values of these parameters in the contract verification form? How ...
7
votes
1answer
891 views

Deploy contract in web3j quorum problem

I'm trying to deploy a smart contract (7 nodes sample from Quorum) using web3j. It fails at get() to get the contract wrapper object. If I check the logs, a new transaction will show up, but if I call ...
6
votes
5answers
3k views

How to deploy contract to the Ropsten test-net using web3.js

I am newbie in solidity. I don't understand what steps I must do for deploy contract in the Ropsten test-net. This is my contract: pragma solidity ^0.4.15; import './ERC20.sol'; import './SafeMath....
6
votes
3answers
3k views

Block gas limit exceeded when compiling contract Solidity browser

Using Solidity Browser ( https://ethereum.github.io/browser-solidity/ ) to mine a contract on testnet with injected web3 and metamask account, throws this error: callback contain no result Gas ...
6
votes
1answer
2k views

Can we modify a deployed contract in ethereum-wallet?

I have deployed a contract in ethereum-wallet for creating my own crypto-currency. I want to ask that in future if i want to add functionalities to my currency then is it possible ?
6
votes
3answers
2k views

Does deploying a contract mean it will overwrite the last instance?

I must have missed something about deploying contracts, but to be sure: I'm using Truffle, Does deploying a contract mean it will overwrite the last instance? Since I see that it gets a new address ...
6
votes
1answer
3k views

How many contract are currently deployed on the Ethereum blockchain?

I was recently asked what percentage of transactions represent smart contract deployments on Ethereum, and had no immediate answer. It is probably easier to ask how many contracts are currently ...
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 ...
6
votes
1answer
275 views

Deploying new contract in transaction MIX IDE

I'm running into an issue whenever i try to create a new transaction with my newly created contract "richoCoin". It seems like its expecting the "Sample.sample()" contract. How do I resolve this?
6
votes
3answers
2k views

Hardhat - How to interact with a deployed contract?

I can deploy a contract using ethers and Hardhat with the following: const myContract = await hre.ethers.getContractFactory("SomeContract"); const deployedContract = await myContract.deploy()...
6
votes
1answer
5k views

Unable to verify Solidity contract code on etherscan.io

I know this question has been asked many times before. I've read loads of answers, but nothing seems to work for me. I first tried to verify the source code of a much larger, more complex contract, ...
6
votes
1answer
78 views

Why is there a difference between the gas consumed by deploying contracts on mainnet and locally?

I've noticed a discrepancy between the gas cost to deploy our contracts locally and on mainnet. I would have guessed that they should cost exactly the same. Does anyone know why this happens?
5
votes
5answers
7k views

Is there a way to extract ABI from a deployed contract?

I am building a web UI for testing smart contracts and currently I have to supply the ABI for a contract I test. Is there a way to extract the ABI from a deployed contract (preferably programmatically)...
5
votes
3answers
5k views

Deploying a smart contract with just bytecode

I have the bytecode of a contract, can I deploy it to a private network without the need of source code? Does bytecode contain the deployers signature or somehow the network id? Here is the bytecode. ...
5
votes
2answers
4k views

Deploying contracts in Ropsten with Truffle

I have another n00b question... sorry about that :( I'm trying to deploy a smart contract to Ropsten. I have synched the Ropsten network with geth --testnet --fast --rpc --rpcapi eth,net,web3,...
5
votes
2answers
686 views

Calling specific functions within a contract using pyethereum

I've been going through this tutorial and got to the part where the contract is being sent to the block chain: pyethtool applytx $genesis $tx which should give the output: {“result”: “...
5
votes
4answers
1k views

Unhandled promise rejection(gas limit) when deploying Contract to rinkeby using truffle-hdwallet-provider

I am trying to Deploy a beginners contract onto the rinkeby test network through Infura node. It is throwing the following error. (node:35183) UnhandledPromiseRejectionWarning: Unhandled promise ...
5
votes
3answers
4k views

Truffle deployer.deploy() not working

I'm having problems deploying the contract via Trufflem, using Parity as my client, on the Kovan network. The contract is a slight variation of this one. When I ran $ truffle migrate using the ...
5
votes
2answers
871 views

What's the advantage of using mainnet over testnet for contract tokens?

Let's say that I crowdfund a project by selling shares in form of tokens on the Ethereum platform to investors. It seems that I can do this on the testnet without any disadvantage. Are real Ether ...
5
votes
3answers
632 views

Where can I get a contract review in Solidity? How much would it cost? [closed]

Basically, I want to deploy a lottery contract, which by default should be very precise and secure, as all balance will be stored on the contract, and I have to track winner balances there as well. I ...
5
votes
1answer
3k views

How to interact with contracts in C++ application?

Vast majority of resource about contracts deal with using them in web applications with JavaScript web3. But how you interact with contracts (create, call them, make transactions) in a C++ ...
5
votes
1answer
3k views

Interaction with a deployed smart contract from the geth command line

I have a contract which I'd like to be able to sum numbers submitted by any other address: contract UnitCounter { mapping (address => uint256) public UnitsFrom; uint256 public TotalUnits; ...
5
votes
1answer
695 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 ...
5
votes
1answer
2k views

How to install solidity in Visual Studio?

I see microsoft visual studio now supports solidity and smart contracts deployments. The release notes state: Creates project scaffolding with smart contract samples Supports context sensitive menus ...
5
votes
1answer
690 views

Truffle & TestRPC: how to use another address for transaction / sendTransaction Function parameters

I have a Smart Contract, created / migrated with Truffle to TestRPC. TestRPC provides several default accounts. If I call functions within the Smart Contract from the Truffle console it does that ...
5
votes
1answer
571 views

Is there any way to disable contract creation on a private network?

I want to use a private Ethereum chain for a specific purpose. I want users to be able to execute contracts that I have created or that I have initialized the blockchain with, but I do not want users ...
5
votes
1answer
8k views

Solidity compiler is giving error ( Expected token Semicolon got 'RBrace' )

I am compiling a contract from browser-solidity,but I am getting Error: Expected token Semicolon got 'RBrace' . The part of contract that throws error is: contract owned { address public owner; ...
5
votes
3answers
911 views

Do I need to be synced to the blockchain to create a contract?

I haven't been able to run the Greeter contract on the live network and am referring to these excellent Q&As for guidance. I have a feeling that it's because my client hasn't finished syncing with ...
5
votes
1answer
3k views

Deploying Smart Contract into Ethereum testnet

I have followed this guide https://ethereum.stackexchange.com/a/2787/2426 (or equivalently https://www.ethereum.org/greeter ) when trying to deploy a simple Smart Contract into Ethereum testnet. I am ...
5
votes
3answers
2k 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,...
5
votes
1answer
119 views

What happens if I call .at() with an invalid address?

Imagine that I have obtained the contract ABI, but I'm not sure if I got the right address it was deployed. If I do: var contract = web3.eth.contrat(abi); var deployed = contract.at('<invalid ...
5
votes
1answer
2k views

TypeError: Indexed expression has to be a type, mapping or array (is function (address) view external returns (string memory,string memory…)

I have 2 contracts first one is sub second one is main . First i deploy main and create a new subtoken. Then I want to access my maincontract in subToken contract but I cant :( When I compile this ...
5
votes
3answers
2k views

Why is my Greeter contract not mined on --testnet?

I'm working on the contracts tutorial. Here's the code (including contract): var greeterSource = 'contract mortal { address owner; function mortal() { owner = msg.sender; } function kill() { if (msg....
5
votes
1answer
4k views

How to deploy contract into local running node using solidity browser?

I am running a local ethereum node and I did unlock an account. Now I want to use the solidity browser to deploy that contract, but when I switch to the web3 provider deploy option and I press the ...
5
votes
3answers
3k 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 ...
5
votes
1answer
2k views

How to deploy truffle contracts to Rinkebey?

What are the parameters that I have to specify to be able to deploy solidity contracts using Truffle in the config file? I am using Metamask to store test ether and have a unique mnemonic to define ...
5
votes
1answer
426 views

Unable to deploy contract on public chain

I was trying to deploy a contract to public ethereum network using Mist. I was able to send transaction successfully but my transaction is get no confirmations. It has been around 45 minutes and my ...
5
votes
1answer
159 views

Receive deployed contract address by transaction hash with JSON-RPC request

I want to receive deployed contract address by transaction hash. Transcation example - 0x996a683acd59a2ad17461f76ce0f387a89a5ac257ec5d667556219c6acc7f45a. As you can see this contract was deployed by ...

1
2
3 4 5
25