The following code is compiled with solc 0.3 with correct --libraries
linking and deployed to morden. Math library is deployed just fine and can be accessed. However A
doesn't get deployed on morden with geth 1.3.5.
// on morden at 0xcb264e62f89c121f785dc61daa97c1e3134a6653
library Math {
function and(bool a, bool b) returns (bool c) {
return a && b;
}
}
contract A {
function testTrue() returns(bool){
return Math.and(true, true);
}
}
The transaction is accepted and a contract address generated, but no code is left on the chain:
> web3.eth.getTransactionReceipt('0x65b7915ecfad660a2076fee5ac800c94864bf2b1edf3ecb4432971af994404b7')
{
blockHash: "0x8e2ebd5d9fe2588470bc699afb94a3488bd68772115abd7eafc509f1124179c9",
blockNumber: 663022,
contractAddress: "0x1d9b45e1519fef452e2fdab6a5aa75d8eee35f99",
cumulativeGasUsed: 122279,
gasUsed: 90000,
logs: [],
transactionHash: "0x65b7915ecfad660a2076fee5ac800c94864bf2b1edf3ecb4432971af994404b7",
transactionIndex: 1
}
> web3.eth.getCode('0x1d9b45e1519fef452e2fdab6a5aa75d8eee35f99')
„0x"
A
is deployed with the following bytecode:
606060405260938060106000396000f3606060405260e060020a60003504634e4fb1fa8114601a575b005b608a7f9f6ee0fc0000000000000000000000000000000000000000000000000000000060609081526001606481905260845260009073cb264e62f89c121f785dc61daa97c1e3134a665390639f6ee0fc9060a4906020906044818660325a03f41560025750506040515191505090565b50604051602090f3
EDIT: solved. trivial out of gas error.