Azure deployment - Ethereum 'contract is undefined

I am using Azure deployment for a single Ethereum client, the ensuing Geth console implements a JavaScript Runtime Environment. I prepared much of the Javascript code to get the contract initialized into a .js file. I loaded the .js file using loadScript. The loadScript returns true, which makes me believe the file was loaded ... Though later I get "contract is not defined".

Here is a fragment of mygb.js file
    var gbSource="contract GuestBook{ " +
        "       mapping (address => string) entryLog; " +
        " }";
Here is where mygb.js is being loaded and then use 'contract'
datadir: /home/gethuser/.ethereum
> loadScript('mygb.js')
I0117 00:48:07.294470    6455 solidity.go:114] solc, the solidity compiler commandline interface
Version: 0.2.0-0/Release-Linux/g++/int linked to libethereum-1.1.1-0/Release-Linux/g++/int

path: /usr/bin/solc
> var gb =, gbCallback);
ReferenceError: 'contract' is not defined
    at <anonymous>:1:17
When I run in the '>' prompt I get the message "Undefined as shown below.
> var gbSource='contract GuestBook{ mapping(address=>string)entryLog; function ..... function .... entryLog[msg.sender];}}'
What do I need to do to make "contract is not defined" and/or the undefined go away? What am I missing here?
Sign In or Register to comment.