Testnet - KEVM - some difficulties seeing transactions and contract output

After downloading mantis, you can use testnet like this:

ubuntu@ip-172-31-21-99:~$ cd mantis-1.0-daedalus-rc1/
ubuntu@ip-172-31-21-99:~/mantis-1.0-daedalus-rc1$ ./bin/mallet https://kevm-testnet.iohkdev.io:8546/
mallet> newAccount
Enter password: 
Repeat password: 
0x9b751df64530478e52918414702eceb1ff274126

mallet> selectAccount(0x9b751df64530478e52918414702eceb1ff274126)

mallet> getBalance
0

On another terminal, get test ADA from faucet like this:

ubuntu@ip-172-31-21-99:~/mantis-1.0-daedalus-rc1$ curl -X POST https://kevm-testnet.iohkdev.io:8099/faucet?address=0x9b751df64530478e52918414702eceb1ff274126
0x825ddff7867bd7321ab7cb2f58bee953fe6929b88ca5265575a2131aef997178

Back on mallet, check balance:

mallet> getBalance
10000000000000000

Using Google Chrome testnet block explorer https://testnet.iohkdev.io/goguen/explorer/ you can also see the transaction from the faucet to your account.
(TX HASH: 0x825ddff7867bd7321ab7cb2f58bee953fe6929b88ca5265575a2131aef997178)

Question: Is the block explorer meant to be able to look up accounts? Because that is not working. Also I could not get the block explorer to work on Safari, Brave or FireFox.

3 Likes

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 :frowning: 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?

2 Likes