3

I am trying to deploy a contract that I have compiled with solc using solc --bin mycontract.sol.

I used to be able to paste the result into Ethereum-Wallet and deploy the contract this way. However, this does not work for this contract (I expect the binary code is to large).

I have tried for a few hours now but I simply can not find a guide showing how to deploy a contract in any other way. But I am guessing I should be able to do it somehow using the geth commandline tool.

I could potentially just paste the solidity code into Ethereum-Wallet and let it compile the code. However, the contract uses imports which I am not sure how to get into Ethereum-Wallet.

3

You can do it, by using online compiler and geth commandline.

Step 1: First copy your contract into https://ethereum.github.io/browser-solidity/ , on the right handside of your page you would see Bytecode,Interface,Web3 deploy and uDApp text fields. What you should be interested here is the web3 deploy text field.

Step 2: copy the text into your geth commandline , just paste and you would see , something like Contract mined! address: 0x.... transactionHash: 0x.....

Now you can use the contract address.

  • I tried doing that, but I never see the "Contract mined!..." message. I am doing this on the testnet though. I think the testnet might be having some problems. At least blocks are being generated very infrequently. – Guut Boy Jun 30 '16 at 15:41
  • Are you connected to the network ( main or testnet )? or are you running in private network if so , are you mining ? @GuutBoy – Abhiram mishra Jun 30 '16 at 15:42
  • I am running on the testnet (morden). – Guut Boy Jun 30 '16 at 17:09
  • Also, this does not really answer the question. I specifically do not want to use the browser compiler, just solc. – Guut Boy Jun 30 '16 at 17:11
  • what are the geth arguments are you passing ? See if you have --verbosity 6 , this would help you test if you have enough ether, to be able to publish, and set your account by eth.defaultAccount and eth.coinbase etc. – Abhiram mishra Jun 30 '16 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.