Very new to Geth and Ethereum, and I'm just trying to create my first contract and deploy it to my private blockchain using Geth.
Geth version 1.7.3
Below is my Solidity contract code:
pragma solidity ^0.4.8;
contract Test {
uint256 public value;
function Test() {
value = 123;
}
}
I have compiled this contract with the browser compiler and Copying the Web3 deployment instructions from the Remix browser compiler into geth console, and I have also tried using the built in solidity compiler on my mac to compile and create a new contract. i'll note I'm not compiling from inside geth console, as I know that doesn't work anymore, I keep getting the error when I call:
testContract.new(<ContractCode>)
Below is the output of the code I run with the compiled contract with the error:
var test = testContract.new({ from: eth.accounts[0], data: "0x" + testOutput.contracts["Test.sol:Test"].bin, gas: 18000000000},
function (e, contract) {
console.log(e, contract);
if (typeof contract.address !== 'undefined') {
var test = testContract.new({ from: eth.accounts[0], data: "0x" +
testOutput.contracts["Test.sol:Test"].bin, gas: 18000000000},
function (e, contract) {
console.log(e, contract);
if (typeof contract.address !== 'undefined') {
console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);
}
});
Error: exceeds block gas limit undefined