Interacting with an Ethereum smart contract

Check the address of the current deployed contract Remember when you mined your contract, it told your its address. Now, reuse it! eth.getCode("0x5f3425ccedeae0eb36521c4cf93ec6544dbad9bd") Test the contract with a simple interaction get the latest web3-light.min.js js from https://github.com/ethereum/web3.js/releases and simply copy the dist/web3-light.min.js into the same folder as the following HTML file. then, use this html to interact with your contract on the local node: <!doctype> <html> <head> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bignumber.js/2.4.0/bignumber.min.js"></script> <script type="text/javascript" src="....

August 3, 2016 · 2 min · Me

Ethereum first smart contract

Launch your geth (or testrpc) private instance ./geth \ --identity "gethTest" \ --rpc --rpcport "9012" \ --rpccorsdomain "YOUR_TEST_DOMAIN_APP_RUN_FROM" \ --datadir "./testChain" \ --port "30303" \ --nodiscover \ --rpcapi "db,eth,net,web3" \ --networkid 1999 \ --dev console Within the console, compile your contract check this tutorial: https://www.ethereum.org/greeter I had an issue when I followed the contract tutorial, my contract would not be mined after I was trying to deploy it. The issue was that my account was locked :/ and the greeter contract stupidly silently fails… Here is the modified code to see the obvious error....

August 3, 2016 · 2 min · Me