Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pragma solidity ^0.4.11;
- contract Test {
- uint private val;
- function getVal() constant returns(uint) {
- return val;
- }
- function setVal(uint newVal) payable {
- val = newVal;
- }
- function() {
- val++;
- }
- }
- contract.getVal.call(function(err, val) {
- //
- });
- contract.setVal.sendTransaction(newVal,
- {
- gas: gas,
- from: web3.eth.defaultAccount
- },
- function(err, result) {
- //
- });
Add Comment
Please, Sign In to add comment