I went to https://remix.ethereum.org and typed in this program and compiled it.
pragma solidity ^0.4.18;
contract test {
uint value = 1;
function next() public returns (uint) {
return value;
value = value + 1;
}
}
Under “details” I found the following byte code:
60806040526001600055348015601457600080fd5b5060a1806100236000396000f300608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634c8fe526146044575b600080fd5b348015604f57600080fd5b506056606c565b6040518082815260200191505060405180910390f35b600080549050905600a165627a7a723058204d6d8241bce5ed7959dedaaeb0a595827ce276f59b33e146d22f670aeae3fca50029
Back in mallet with the previous account still selected:
mallet> iele_createContract(0x1000,0,0,0x60806040526001600055348015601457600080fd5b5060a1806100236000396000f300608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634c8fe526146044575b600080fd5b348015604f57600080fd5b506056606c565b6040518082815260200191505060405180910390f35b600080549050905600a165627a7a723058204d6d8241bce5ed7959dedaaeb0a595827ce276f59b33e146d22f670aeae3fca50029,[0])
Enter password:
0x1cfc0d778fdf6853fbce46a6de388da396cea92db30bfc62257ab56e6168d934
The first 3 arguments are gas, gas price, value. I do not fully understand these.
The call has created the contract, it returned a transaction hash, the hash can NOT be found in the testnet block explorer Shouldn’t I be able to see it on blockexplorer?
In mallet I switch to another account that I created previously and funded.
mallet> listAccounts
0x40f18795bce5028ca2dd2445149b08a943d42135
0x9b751df64530478e52918414702eceb1ff274126 *
mallet> selectAccount(0x40f18795bce5028ca2dd2445149b08a943d42135)
Then I call the method of my contract:
mallet> iele_messageCall(0x9b751df64530478e52918414702eceb1ff274126,0x1000,0,0,"next")
Enter password:
0xbf3d34dc96e15a4c6814e353001d9740d0f8e2d43df5d2212058aeb9c87bd80e
However that transaction ref cannot be found using the explorer. I try again with more gas:
mallet> iele_messageCall(0x9b751df64530478e52918414702eceb1ff274126,0x1000000,0,0,"next")
Enter password:
0x3e82fc533dfcb84a5b66cf643b9a7103b27ac1be432a0dc6bc834ac36ebcf805
This transaction IS found in the explorer.
I’m pretty sure there is something wrong with the explorer, or possibly somewhere else? Why some transactions exist but not others, even though I receive hashes for them?
Also my contract function is meant to return a value, where can I see this?