caktux
the develop branch shows 1.0.0 but does have the thawing PR merged, so the builds linked on the readme should be fine
eth.sendTransaction({from:eth.coinbase, to:eth.coinbase, value: web3.toWei(0.5, "ether"), gasLimit: 21000})
I'm doing exactly the example now:
eth.sendTransaction({from:eth.coinbase, to:eth.accounts[1], value: web3.toWei(0.05, "ether")})
still exceeds block gas limit. :(
{eth.accounts[2], to: '0xb5ce1861d98e85c84531dbc18720278328fd97f6', value: web3.toWei(1, "ether")})
Exceeds block gas limit
at InvalidResponse (<anonymous>:-60926:-126)
at send (<anonymous>:-124886:-126)
at sendTransaction (<anonymous>:-113803:-126)
at <anonymous>:1:1
<Semiel> In my case, it took me until now to realize that you have to manually set the gas on your transaction to 21000
contract testContract {
function go() constant returns (string) {
return "ETHEREUM!";
}
}
contract Digix {
address owner;
function Digix() {
owner = msg.sender;
}
}
web3.eth.getTransactionReceipt('0x6c929e1c3d860ee225d7f3a7addf9e3f740603d243260536dfa2f3cf02b51de4')
{ transactionHash: '0x6c929e1c3d860ee225d7f3a7addf9e3f740603d243260536dfa2f3cf02b51de4',
transactionIndex: 0,
blockNumber: 46402,
blockHash: '0x249ea54eada07708b29d7c424b8466dec9f1d98067b0be1b89c7ee660cca858d',
cumulativeGasUsed: 24000,
gasUsed: 24000,
contractAddress: '0x9a049f5d18c239efaa258af9f3e7002949a977a0',
logs: [] }
var helloDigix = "contract Digix { address owner;
function Digix() { owner = msg.sender;
}}"
var helloDigixCompiled = web3.eth.compile.solidity(helloDigix)
var sender = eth.accounts[1];
var receiver = eth.accounts[0];
var amount = web3.toWei(0.01, "ether")
eth.sendTransaction({from:sender, to:receiver, value: 1})
eth.pendingTransactions()
?
what would be a reliable way to send x amount of ether where the receiver pays the tx cost?
geth —vmdebug
it will output all VM steps
eth.getTransactionReceipt(hash)
?
curl
and RPC to submit transactions?
geth console
?
var txHash = web3…
eth.getTransactionReceipt(tx_hash)
after it has been mined and it should include the logs
call
you can let the contract return a value and you’ll get the value thru web3 from the call
call :)
my call function is:
function getMarkets(uint[] event_description_hashes) returns (uint[1024]) {
uint[1024] memory market_makers;
return market_makers;
}
Any reason why this should fail?
contract Test {
uint[10] test;
function setIndex(uint value, uint idx) {
test[idx] = value;
}
function get() returns (uint[10]) {
return test;
}
}
—unlock
, however then your password file also needs to contain multiple lines
getMarkets(uint[] event_description_hashes)
. I am checking.
var ethereum = ethereumContract.new({from:eth.coinbase, data: '00', gas: 30000}, function(e, contract){
console.log("CALLBACK!");
if(!e) {
if(!contract.address) {
console.log("Contract transaction send: TransactionHash: " + contract.transactionHash + " waiting to be mined...");
} else {
console.log("Contract mined! Address: " + contract.address);
console.log(contract);
}
} else {
console.log("error");
console.log(e);
}
})
eth.sendTransaction({
from: eth.coinbase,
value: web3.toWei(0.01, 'ether'),
data: 'deadbeef3'
})
> eth.sendTransaction({
...... from: eth.coinbase,
...... value: web3.toWei(0.01, 'ether'),
...... data: 'deadbeef3'
...... })
Invalid address
at InvalidResponse (<anonymous>:-60926:-102)
at send (<anonymous>:-124886:-102)
at sendTransaction (<anonymous>:-113803:-102)
at <anonymous>:1:2
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo " ("${ref#refs/heads/}") "
}
@obscuren Nothing urgent: I have now a small contract example which shows the wrong behaviour:
function getMarkets(uint[] event_description_hashes) returns (uint[1024]) {
uint[1024] memory market_makers;
market_makers[0] = 666;
return market_makers;
}
Calling this function from web3 returns an array with 1024 zeros. Expected is that element 0 has value 666.
Should I post this as an issue in the geth issue tracker?