13.06.2017 Views

Whitepaper - Ethereum Classic With Cover

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Ethereum</strong> <strong>Classic</strong> Documentation, Release 0.1<br />

Then you can either copy the content of this transaction in the clipboard, Edit the current transaction (you will<br />

have to rerun the blockchain then), or debug the transaction.<br />

JavaScript console<br />

Mix exposes the following objects into the global window context<br />

web3 - <strong>Ethereum</strong> JavaScript API<br />

contracts: A collection of contract objects. keys represents contracts name. values are is an objects containing the<br />

following properties:<br />

• contract: contract object instance (created as in web3.eth.contract)<br />

• address: contract address from the last deployed state (see below)<br />

• interface: contract ABI<br />

Check the JavaScript API Reference for further information.<br />

Using the JS console to add transactions and local calls<br />

In case the name of the contract is “Sample” with a function named “set”, it is possible to make a transaction to<br />

call “set” by writing:<br />

contracts["Sample"].contract.set(14)<br />

If a call can be made this will be done by writing:<br />

contracts["Sample"].contract.get.call()<br />

It is also possible to use all properties and functions of the web3 object:<br />

https://github.com/ethereum/wiki/wiki/JavaScript-API<br />

1.7. Contracts and Transactions 93

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!