Ethereum Testnet

Welcome to the thread about the Ethereum Testnet. Here you can discuss everything about the testnet and potential problems that you might stumble upon.

It looks like it is using your ether to transact on testnet, but you said it doesn’t. Is it not real ether?

You can see at the top left that is says Rinkeby Test Network. That means that metamask is connected to one of the testnets.

1 Like

Hey Filip… I’m having a strange issue with code in the Rinkeby test net but not on the Javascript VM in Remix… I have a very simple Person contract (from earlier). It will return the average in Javascript VM but returns nothing in the Rinkeby testnet… I noticed this in other contracts as well… any thoughts?

Could you share your contract here? So I could take a look.

sure @filip, I double checked this… the getWackyAverage() doesn’t work in Rinkeby testnet… does work in javascript VM.

pragma solidity ^0.4.0;

contract Person {
   
    struct PersonStruct{ 
        string name;
        uint age;
    }
   
    PersonStruct[] personArray;
    
    function addPerson(string _name, uint _age){
        personArray.push(PersonStruct(_name, _age));
    }
    
    function getWackyAverage() returns (uint){
        uint total = 0;
        for (uint i=0; i<personArray.length; i++){
            total += personArray[i].age;
        }
            
        return total/personArray.length;
    }
}

Believe the getWackyAverage is being treated as a transaction, which do not have a return value. When using remix, you can tell by the colour of the button that’s used to perform the action i.e. pink buttons writes to the blockchain and blue buttons just reads from it.

Seeing as you’re not making any state changes, you can declare the getWackyAverage function with the view keyword like so: function getWackyAverage() public view returns (uint)

Unfortunately this doesn’t explain why the output appears in the JVM but should at least fix your issue.

2 Likes

Thanks takJohn… I had also noticed the button colors and will make the change. Funny about working in Javascript vm and not Rinkeby though.

1 Like

I’m not sure why this is the case. But without doing to much debugging, the right thing to do is to have the view keyword there anyway. It doesn’t make any sense to have that function as a transaction on the blockchain.

I created the contract in the testnet but i have a question. Who give you the contract address , because the address that i use to send the ether for the creation of the contract is not the contract address . so who or how the contract address is produced or created?

The contract address is generated automatically according the the ethereum protocol. If you want to know the details you can read more here https://ethereum.stackexchange.com/questions/760/how-is-the-address-of-an-ethereum-contract-computed.

The ether that you are paying when creating the contract is gas that goes to the miners just like for any other transaction on the eth blockchain. I hope I answered your question.

1 Like

Filip
I am having difficulty obtaining Ethereum for my address on the rinkeby testnet. I send a tweet but each time I try to input the tweel url it says invalid twitter status url.

the url for my tweet is: https://twitter.com/mginiger/status/1049372304122236931

Could you let me know what I’m doing wrong? Thank you

Filip
When I tried to obtain Ethereum using facebook the error message was no Ethereum address found to fund but the post included the Ethereum address copied from metamask. Again could you walk through the steps and show me what I’m doing wrong?
Thank you

Your twitter account is protected. Meaning it’s not public, so no one except your followers can see your tweets. That’s why it doesn’t work. You accounts needs to be public.

Filip

Thank you. I changed the privacy setting, sent the tweet with my Ethereum address 0x4146E5894674473EdF27dffc07D3670DEBc0BdAF, pasted the url https://faucet.rinkeby.io/ 21 minutes ago. The ether has not shown up in metamask. How can I see if there is any progress towards receiving the ether or is it just not working?
T
Sincerely,

Michael

It’s been over an hour now so this method of obtaining ether for the Rinkeby test net doesn’t seem to work. Please let me know how I can obtain the ether to test with. Thank you., Mike

Filip,

I did not receive the ether in my Metamask account from my tweet 12 hours ago. I did see my Ethereum address and the progress line to the right filled up the space very quickly but no ether showed up in the metamask account. I followed the instructions (they’re pretty straightforward) so I’ve got no idea what the problem is. I also am prevented from trying again for 24 hours so please let me know how to proceed.

Thank you,

Michael Giniger

Did you get any transaction hash from the faucet service?

I didn’t see any transaction for my Ethereum address 0x4146E5894674473EdF27dffc07D3670DEBc0BdAF when I looked at https://rinkeby.etherscan.io/address/0x4146E5894674473EdF27dffc07D3670DEBc0BdAF

Hi Filip

Let me know how best to proceed. What are the possible reasons that a transaction hash would not appear when I make the tweet with the correct Ethereum address and paste the url of the tweet into faucet? I copy the address of the account so that should be correct. How do we resolve/debug the problem?

It worked for me. I entered your tweet into the faucet and now you have ether. Look agan on etherscan.