0

I'm trying to run a contract on a private local network so that I can develop and deploy a contract on the mainnet for some ERC20 token.

Starting with the greeter tutorial, I compiled the default example as follow

$ solc -o target_greeter --bin --abi src/the_greeter.sol

I also created a testnet as follow:

$ geth --identity "SolidityTestNode" --rpc --rpcport "8080" --rpccorsdomain "*" --datadir testnet/ --port "30303" --nodiscover --rpcapi "db,eth,net,web3" --networkid 1999 init testnet/CustomGenesis.json

Then I connected to my local network via ethereum wallet by starting it as follow:

$ ethereumwallet --network test --rpc testnet/geth.ipc

I then assumed that I could deploy a contract as follow:

But it returns error Could not compile source code.

I also tried to enter that code in the geth console, but greeterFactory.new() line never returns the prompt and I don't see any syntax error in the example

How am I supposed to deploy the Greeter contract on my local testnet ? The tutorial isn't precise enough in that regard.

Thank you for your support.

Adrien Lemaire
  • 1,744
  • 2
  • 20
  • 29
  • 1
    Uh....you’re putting JavaScript inside the Solidity contract input section. Either use Truffle with the compiled contract or put the Solidity contract code into the UI. – Adam Kipnis May 04 '18 at 14:57
  • Oh... makes sense. It wasn't clear to me that the tutorial was about using an ethereum contract from javascript. Thanks for the precision – Adrien Lemaire May 05 '18 at 02:27

0 Answers0